summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--config_help.txt3
-rw-r--r--configure.json48
-rw-r--r--configure.pri23
-rw-r--r--dist/changes-5.13.07
-rw-r--r--doc/global/qt-html-templates-offline.qdocconf2
-rw-r--r--doc/global/qt-html-templates-online.qdocconf2
-rw-r--r--examples/corelib/serialization/convert/cborconverter.cpp13
-rw-r--r--examples/network/bearermonitor/bearermonitor.cpp6
-rw-r--r--examples/network/dnslookup/dnslookup.cpp24
-rw-r--r--examples/network/http/httpwindow.cpp2
-rw-r--r--examples/network/loopback/dialog.cpp6
-rw-r--r--examples/network/network-chat/client.cpp7
-rw-r--r--examples/network/network-chat/peermanager.cpp12
-rw-r--r--examples/network/network-chat/peermanager.h2
-rw-r--r--examples/network/torrent/addtorrentdialog.cpp3
-rw-r--r--examples/network/torrent/filemanager.cpp7
-rw-r--r--examples/network/torrent/mainwindow.cpp6
-rw-r--r--examples/network/torrent/metainfo.cpp8
-rw-r--r--examples/network/torrent/ratecontroller.cpp4
-rw-r--r--examples/network/torrent/torrentclient.cpp42
-rw-r--r--examples/network/torrent/torrentserver.cpp2
-rw-r--r--examples/sql/querymodel/customsqlmodel.cpp2
-rw-r--r--examples/widgets/animation/animatedtiles/main.cpp2
-rw-r--r--examples/widgets/animation/easing/window.cpp15
-rw-r--r--examples/widgets/animation/easing/window.h2
-rw-r--r--examples/widgets/animation/moveblocks/main.cpp7
-rw-r--r--examples/widgets/animation/states/main.cpp6
-rw-r--r--examples/widgets/animation/stickman/animation.cpp8
-rw-r--r--examples/widgets/animation/stickman/graphicsview.cpp4
-rw-r--r--examples/widgets/animation/stickman/graphicsview.h2
-rw-r--r--examples/widgets/animation/stickman/lifecycle.cpp23
-rw-r--r--examples/widgets/animation/stickman/stickman.cpp5
-rw-r--r--examples/widgets/animation/sub-attaq/animationmanager.cpp10
-rw-r--r--examples/widgets/animation/sub-attaq/boat.cpp15
-rw-r--r--examples/widgets/animation/sub-attaq/boat_p.h19
-rw-r--r--examples/widgets/animation/sub-attaq/bomb.cpp14
-rw-r--r--examples/widgets/animation/sub-attaq/graphicsscene.cpp24
-rw-r--r--examples/widgets/animation/sub-attaq/mainwindow.cpp3
-rw-r--r--examples/widgets/animation/sub-attaq/mainwindow.h2
-rw-r--r--examples/widgets/animation/sub-attaq/pixmapitem.cpp3
-rw-r--r--examples/widgets/animation/sub-attaq/pixmapitem.h2
-rw-r--r--examples/widgets/animation/sub-attaq/qanimationstate.cpp8
-rw-r--r--examples/widgets/animation/sub-attaq/states.cpp19
-rw-r--r--examples/widgets/animation/sub-attaq/submarine.cpp12
-rw-r--r--examples/widgets/animation/sub-attaq/submarine_p.h3
-rw-r--r--examples/widgets/animation/sub-attaq/torpedo.cpp14
-rw-r--r--examples/widgets/desktop/screenshot/screenshot.cpp3
-rw-r--r--examples/widgets/desktop/systray/main.cpp2
-rw-r--r--examples/widgets/desktop/systray/window.cpp2
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard.cpp4
-rw-r--r--examples/widgets/dialogs/findfiles/window.cpp4
-rw-r--r--examples/widgets/dialogs/standarddialogs/dialog.cpp7
-rw-r--r--examples/widgets/doc/dropsite.qdoc8
-rw-r--r--examples/widgets/doc/src/addressbook.qdoc11
-rw-r--r--examples/widgets/doc/src/diagramscene.qdoc2
-rw-r--r--examples/widgets/doc/src/fetchmore.qdoc2
-rw-r--r--examples/widgets/doc/src/orderform.qdoc2
-rw-r--r--examples/widgets/doc/src/plugandpaint.qdoc4
-rw-r--r--examples/widgets/doc/src/simpletreemodel.qdoc5
-rw-r--r--examples/widgets/doc/src/stardelegate.qdoc14
-rw-r--r--examples/widgets/draganddrop/dropsite/dropsitewindow.cpp3
-rw-r--r--examples/widgets/effects/fademessage/fademessage.cpp2
-rw-r--r--examples/widgets/gestures/imagegestures/imagewidget.cpp2
-rw-r--r--examples/widgets/graphicsview/boxes/glbuffers.cpp4
-rw-r--r--examples/widgets/graphicsview/boxes/glbuffers.h2
-rw-r--r--examples/widgets/graphicsview/boxes/qtbox.cpp24
-rw-r--r--examples/widgets/graphicsview/boxes/scene.cpp98
-rw-r--r--examples/widgets/graphicsview/chip/view.cpp32
-rw-r--r--examples/widgets/graphicsview/collidingmice/main.cpp2
-rw-r--r--examples/widgets/graphicsview/collidingmice/mouse.cpp11
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramitem.cpp5
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.cpp18
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.h2
-rw-r--r--examples/widgets/graphicsview/diagramscene/mainwindow.cpp86
-rw-r--r--examples/widgets/graphicsview/elasticnodes/graphwidget.cpp10
-rw-r--r--examples/widgets/graphicsview/elasticnodes/node.cpp7
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/customproxy.cpp12
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp6
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/main.cpp2
-rw-r--r--examples/widgets/graphicsview/flowlayout/flowlayout.cpp9
-rw-r--r--examples/widgets/itemviews/addressbook/adddialog.cpp38
-rw-r--r--examples/widgets/itemviews/addressbook/adddialog.h14
-rw-r--r--examples/widgets/itemviews/addressbook/addresswidget.cpp69
-rw-r--r--examples/widgets/itemviews/addressbook/addresswidget.h5
-rw-r--r--examples/widgets/itemviews/addressbook/mainwindow.cpp18
-rw-r--r--examples/widgets/itemviews/addressbook/mainwindow.h6
-rw-r--r--examples/widgets/itemviews/addressbook/newaddresstab.cpp21
-rw-r--r--examples/widgets/itemviews/addressbook/newaddresstab.h10
-rw-r--r--examples/widgets/itemviews/addressbook/tablemodel.cpp52
-rw-r--r--examples/widgets/itemviews/addressbook/tablemodel.h10
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/colorlisteditor.cpp10
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/colorlisteditor.h4
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/window.cpp17
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/filterwidget.cpp5
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/filterwidget.h2
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp6
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/window.cpp13
-rw-r--r--examples/widgets/itemviews/editabletreemodel/main.cpp4
-rw-r--r--examples/widgets/itemviews/editabletreemodel/mainwindow.cpp32
-rw-r--r--examples/widgets/itemviews/editabletreemodel/mainwindow.h3
-rw-r--r--examples/widgets/itemviews/editabletreemodel/treeitem.cpp22
-rw-r--r--examples/widgets/itemviews/editabletreemodel/treeitem.h5
-rw-r--r--examples/widgets/itemviews/editabletreemodel/treemodel.cpp66
-rw-r--r--examples/widgets/itemviews/editabletreemodel/treemodel.h2
-rw-r--r--examples/widgets/itemviews/fetchmore/filelistmodel.cpp25
-rw-r--r--examples/widgets/itemviews/fetchmore/filelistmodel.h3
-rw-r--r--examples/widgets/itemviews/fetchmore/window.cpp4
-rw-r--r--examples/widgets/itemviews/fetchmore/window.h2
-rw-r--r--examples/widgets/itemviews/interview/model.cpp3
-rw-r--r--examples/widgets/itemviews/interview/model.h4
-rw-r--r--examples/widgets/itemviews/pixelator/mainwindow.cpp2
-rw-r--r--examples/widgets/itemviews/pixelator/pixeldelegate.cpp14
-rw-r--r--examples/widgets/itemviews/pixelator/pixeldelegate.h6
-rw-r--r--examples/widgets/itemviews/puzzle/piecesmodel.cpp9
-rw-r--r--examples/widgets/itemviews/puzzle/piecesmodel.h10
-rw-r--r--examples/widgets/itemviews/simpledommodel/domitem.cpp30
-rw-r--r--examples/widgets/itemviews/simpledommodel/domitem.h6
-rw-r--r--examples/widgets/itemviews/simpledommodel/dommodel.cpp40
-rw-r--r--examples/widgets/itemviews/simpledommodel/dommodel.h2
-rw-r--r--examples/widgets/itemviews/simpledommodel/mainwindow.cpp9
-rw-r--r--examples/widgets/itemviews/simpledommodel/mainwindow.h2
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treeitem.cpp18
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treeitem.h8
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treemodel.cpp35
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treemodel.h2
-rw-r--r--examples/widgets/itemviews/simplewidgetmapper/window.h2
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/delegate.cpp7
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/delegate.h6
-rw-r--r--examples/widgets/itemviews/spreadsheet/main.cpp3
-rw-r--r--examples/widgets/itemviews/spreadsheet/printview.cpp5
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheet.cpp56
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheet.h4
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.cpp12
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.h4
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheetitem.cpp35
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheetitem.h7
-rw-r--r--examples/widgets/itemviews/stardelegate/main.cpp5
-rw-r--r--examples/widgets/itemviews/stardelegate/stardelegate.cpp8
-rw-r--r--examples/widgets/itemviews/stardelegate/stardelegate.h3
-rw-r--r--examples/widgets/itemviews/stardelegate/stareditor.cpp20
-rw-r--r--examples/widgets/itemviews/stardelegate/stareditor.h5
-rw-r--r--examples/widgets/itemviews/stardelegate/starrating.cpp27
-rw-r--r--examples/widgets/itemviews/stardelegate/starrating.h8
-rw-r--r--examples/widgets/itemviews/storageview/main.cpp7
-rw-r--r--examples/widgets/itemviews/storageview/storagemodel.cpp8
-rw-r--r--examples/widgets/itemviews/storageview/storagemodel.h2
-rw-r--r--examples/widgets/layouts/basiclayouts/dialog.cpp6
-rw-r--r--examples/widgets/layouts/borderlayout/borderlayout.cpp9
-rw-r--r--examples/widgets/layouts/dynamiclayouts/dialog.cpp2
-rw-r--r--examples/widgets/layouts/flowlayout/flowlayout.cpp13
-rw-r--r--examples/widgets/mainwindows/application/mainwindow.cpp8
-rw-r--r--examples/widgets/mainwindows/dockwidgets/mainwindow.cpp4
-rw-r--r--examples/widgets/mainwindows/mainwindow/colorswatch.cpp15
-rw-r--r--examples/widgets/mainwindows/mainwindow/toolbar.cpp9
-rw-r--r--examples/widgets/mainwindows/mdi/main.cpp3
-rw-r--r--examples/widgets/mainwindows/mdi/mainwindow.cpp9
-rw-r--r--examples/widgets/mainwindows/mdi/mdichild.cpp8
-rw-r--r--examples/widgets/mainwindows/sdi/main.cpp3
-rw-r--r--examples/widgets/mainwindows/sdi/mainwindow.cpp13
-rw-r--r--examples/widgets/painting/affine/main.cpp8
-rw-r--r--examples/widgets/painting/basicdrawing/window.cpp32
-rw-r--r--examples/widgets/painting/composition/composition.cpp62
-rw-r--r--examples/widgets/painting/composition/main.cpp4
-rw-r--r--examples/widgets/painting/concentriccircles/window.cpp4
-rw-r--r--examples/widgets/painting/deform/main.cpp8
-rw-r--r--examples/widgets/painting/deform/pathdeform.cpp51
-rw-r--r--examples/widgets/painting/deform/pathdeform.h4
-rw-r--r--examples/widgets/painting/fontsampler/mainwindow.cpp46
-rw-r--r--examples/widgets/painting/gradients/gradients.cpp2
-rw-r--r--examples/widgets/painting/gradients/main.cpp4
-rw-r--r--examples/widgets/painting/imagecomposition/imagecomposer.cpp9
-rw-r--r--examples/widgets/painting/painterpaths/window.cpp46
-rw-r--r--examples/widgets/painting/pathstroke/main.cpp4
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.cpp62
-rw-r--r--examples/widgets/painting/shared/arthurwidgets.cpp46
-rw-r--r--examples/widgets/painting/shared/hoverpoints.cpp6
-rw-r--r--examples/widgets/painting/transformations/window.cpp7
-rw-r--r--examples/widgets/richtext/calendar/mainwindow.cpp10
-rw-r--r--examples/widgets/richtext/orderform/mainwindow.cpp6
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/highlighter.cpp39
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/mainwindow.cpp13
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp2
-rw-r--r--examples/widgets/scroller/graphicsview/main.cpp3
-rw-r--r--examples/widgets/statemachine/factorial/main.cpp4
-rw-r--r--examples/widgets/statemachine/rogue/window.cpp6
-rw-r--r--examples/widgets/statemachine/trafficlight/main.cpp16
-rw-r--r--examples/widgets/statemachine/twowaybutton/main.cpp4
-rw-r--r--examples/widgets/tools/codecs/mainwindow.cpp14
-rw-r--r--examples/widgets/tools/codecs/previewform.cpp2
-rw-r--r--examples/widgets/tools/completer/mainwindow.cpp24
-rw-r--r--examples/widgets/tools/customcompleter/mainwindow.cpp10
-rw-r--r--examples/widgets/tools/customcompleter/textedit.cpp4
-rw-r--r--examples/widgets/tools/echoplugin/echowindow/echowindow.cpp3
-rw-r--r--examples/widgets/tools/i18n/languagechooser.cpp8
-rw-r--r--examples/widgets/tools/regexp/regexpdialog.cpp18
-rw-r--r--examples/widgets/tools/settingseditor/settingstree.cpp6
-rw-r--r--examples/widgets/tools/treemodelcompleter/mainwindow.cpp30
-rw-r--r--examples/widgets/tools/undo/mainwindow.cpp50
-rw-r--r--examples/widgets/tools/undoframework/mainwindow.cpp22
-rw-r--r--examples/widgets/touch/dials/main.cpp4
-rw-r--r--examples/widgets/touch/fingerpaint/mainwindow.cpp22
-rw-r--r--examples/widgets/touch/fingerpaint/scribblearea.cpp6
-rw-r--r--examples/widgets/touch/pinchzoom/mouse.cpp2
-rw-r--r--examples/widgets/tutorials/addressbook/part2/addressbook.cpp9
-rw-r--r--examples/widgets/tutorials/addressbook/part3/addressbook.cpp16
-rw-r--r--examples/widgets/tutorials/addressbook/part4/addressbook.cpp21
-rw-r--r--examples/widgets/tutorials/addressbook/part5/addressbook.cpp24
-rw-r--r--examples/widgets/tutorials/addressbook/part5/finddialog.cpp6
-rw-r--r--examples/widgets/tutorials/addressbook/part6/addressbook.cpp30
-rw-r--r--examples/widgets/tutorials/addressbook/part6/finddialog.cpp6
-rw-r--r--examples/widgets/tutorials/addressbook/part7/addressbook.cpp33
-rw-r--r--examples/widgets/tutorials/addressbook/part7/finddialog.cpp6
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part2/main.cpp3
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part3/main.cpp3
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part4/main.cpp10
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part5/main.cpp10
-rw-r--r--examples/widgets/tutorials/widgets/nestedlayouts/main.cpp35
-rw-r--r--examples/widgets/widgets/analogclock/analogclock.h2
-rw-r--r--examples/widgets/widgets/calculator/button.h2
-rw-r--r--examples/widgets/widgets/calculator/calculator.h2
-rw-r--r--examples/widgets/widgets/calendarwidget/window.cpp3
-rw-r--r--examples/widgets/widgets/calendarwidget/window.h2
-rw-r--r--examples/widgets/widgets/charactermap/characterwidget.h2
-rw-r--r--examples/widgets/widgets/charactermap/mainwindow.cpp5
-rw-r--r--examples/widgets/widgets/charactermap/mainwindow.h2
-rw-r--r--examples/widgets/widgets/codeeditor/codeeditor.h2
-rw-r--r--examples/widgets/widgets/digitalclock/digitalclock.h2
-rw-r--r--examples/widgets/widgets/elidedlabel/elidedlabel.h2
-rw-r--r--examples/widgets/widgets/elidedlabel/testwidget.h2
-rw-r--r--examples/widgets/widgets/groupbox/window.h2
-rw-r--r--examples/widgets/widgets/icons/mainwindow.cpp3
-rw-r--r--examples/widgets/widgets/icons/mainwindow.h2
-rw-r--r--examples/widgets/widgets/imageviewer/imageviewer.cpp7
-rw-r--r--examples/widgets/widgets/imageviewer/imageviewer.h2
-rw-r--r--examples/widgets/widgets/lineedits/window.cpp5
-rw-r--r--examples/widgets/widgets/lineedits/window.h2
-rw-r--r--examples/widgets/widgets/mousebuttons/buttontester.h5
-rw-r--r--examples/widgets/widgets/movie/movieplayer.h2
-rw-r--r--examples/widgets/widgets/scribble/mainwindow.cpp4
-rw-r--r--examples/widgets/widgets/scribble/mainwindow.h2
-rw-r--r--examples/widgets/widgets/scribble/scribblearea.h2
-rw-r--r--examples/widgets/widgets/shapedclock/shapedclock.h2
-rw-r--r--examples/widgets/widgets/sliders/slidersgroup.h2
-rw-r--r--examples/widgets/widgets/sliders/window.cpp3
-rw-r--r--examples/widgets/widgets/sliders/window.h2
-rw-r--r--examples/widgets/widgets/spinboxes/window.cpp3
-rw-r--r--examples/widgets/widgets/spinboxes/window.h2
-rw-r--r--examples/widgets/widgets/styles/widgetgallery.h2
-rw-r--r--examples/widgets/widgets/stylesheet/mainwindow.cpp3
-rw-r--r--examples/widgets/widgets/stylesheet/mainwindow.h2
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheeteditor.h2
-rw-r--r--examples/widgets/widgets/tablet/tabletapplication.h5
-rw-r--r--examples/widgets/widgets/tetrix/tetrixboard.h2
-rw-r--r--examples/widgets/widgets/tetrix/tetrixwindow.cpp3
-rw-r--r--examples/widgets/widgets/tetrix/tetrixwindow.h2
-rw-r--r--examples/widgets/widgets/tooltips/sortingbox.cpp7
-rw-r--r--examples/widgets/widgets/tooltips/sortingbox.h2
-rw-r--r--examples/widgets/widgets/validators/ledwidget.h2
-rw-r--r--examples/widgets/widgets/validators/localeselector.h2
-rw-r--r--examples/widgets/widgets/validators/main.cpp85
-rw-r--r--examples/widgets/widgets/validators/validators.pro4
-rw-r--r--examples/widgets/widgets/validators/validatorwidget.cpp122
-rw-r--r--examples/widgets/widgets/validators/validatorwidget.h (renamed from src/widgets/doc/snippets/code/doc_src_examples_dropsite.qdoc)23
-rw-r--r--examples/widgets/widgets/wiggly/dialog.h2
-rw-r--r--examples/widgets/widgets/wiggly/wigglywidget.h2
-rw-r--r--examples/widgets/widgets/windowflags/controllerwindow.cpp3
-rw-r--r--examples/widgets/widgets/windowflags/controllerwindow.h2
-rw-r--r--examples/widgets/widgets/windowflags/previewwindow.h2
-rw-r--r--mkspecs/common/clang.conf4
-rw-r--r--mkspecs/common/g++-win32.conf2
-rw-r--r--mkspecs/common/gcc-base.conf2
-rw-r--r--mkspecs/common/msvc-desktop.conf1
-rw-r--r--mkspecs/common/windows-desktop.conf5
-rw-r--r--mkspecs/common/winrt_winphone/qmake.conf2
-rw-r--r--mkspecs/features/android/sdk.prf2
-rw-r--r--mkspecs/features/coverage.prf7
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in95
-rw-r--r--mkspecs/features/default_post.prf4
-rw-r--r--mkspecs/features/qt_common.prf4
-rw-r--r--mkspecs/features/rtti.prf (renamed from mkspecs/features/win32/rtti.prf)0
-rw-r--r--mkspecs/features/rtti_off.prf (renamed from mkspecs/features/win32/rtti_off.prf)0
-rw-r--r--mkspecs/features/wayland-scanner.prf6
-rw-r--r--mkspecs/features/winrt/package_manifest.prf7
-rw-r--r--mkspecs/linux-clang-32/qmake.conf20
-rw-r--r--mkspecs/linux-clang-32/qplatformdefs.h40
-rw-r--r--mkspecs/linux-clang-libc++-32/qmake.conf10
-rw-r--r--mkspecs/linux-clang-libc++-32/qplatformdefs.h40
-rw-r--r--mkspecs/win32-g++/qmake.conf1
-rw-r--r--qmake/doc/qmake.qdocconf2
-rw-r--r--qmake/doc/src/qmake-manual.qdoc26
-rw-r--r--qmake/generators/makefile.cpp14
-rw-r--r--qmake/generators/unix/unixmake2.cpp2
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp23
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp95
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h2
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp29
-rw-r--r--qmake/generators/win32/msvc_vcproj.h5
-rw-r--r--qmake/generators/win32/winmakefile.cpp4
-rw-r--r--qmake/library/qmakeevaluator.cpp2
-rw-r--r--qmake/property.cpp14
-rw-r--r--src/3rdparty/sqlite.pri2
-rw-r--r--src/android/jar/jar.pro1
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/ExtractStyle.java42
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java16
-rw-r--r--src/android/java/src/org/qtproject/qt5/android/bindings/QtActivityLoader.java2
-rw-r--r--src/android/templates/AndroidManifest.xml2
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp4
-rw-r--r--src/corelib/codecs/qtextcodec.cpp12
-rw-r--r--src/corelib/configure.json14
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp2
-rw-r--r--src/corelib/doc/snippets/resource-system/mainwindow.cpp8
-rw-r--r--src/corelib/doc/src/containers.qdoc5
-rw-r--r--src/corelib/doc/src/resource-system.qdoc67
-rw-r--r--src/corelib/global/qconfig-bootstrapped.h5
-rw-r--r--src/corelib/global/qfloat16.h2
-rw-r--r--src/corelib/global/qglobal.cpp73
-rw-r--r--src/corelib/global/qglobal.h28
-rw-r--r--src/corelib/global/qglobal_p.h10
-rw-r--r--src/corelib/global/qlogging.h4
-rw-r--r--src/corelib/global/qnamespace.h6
-rw-r--r--src/corelib/global/qtypeinfo.h28
-rw-r--r--src/corelib/io/io.pri2
-rw-r--r--src/corelib/io/qabstractfileengine_p.h4
-rw-r--r--src/corelib/io/qbuffer.cpp4
-rw-r--r--src/corelib/io/qdebug.cpp142
-rw-r--r--src/corelib/io/qdebug.h7
-rw-r--r--src/corelib/io/qdir.cpp4
-rw-r--r--src/corelib/io/qdir.h6
-rw-r--r--src/corelib/io/qfile.cpp20
-rw-r--r--src/corelib/io/qfile.h8
-rw-r--r--src/corelib/io/qfiledevice.h2
-rw-r--r--src/corelib/io/qfileinfo.cpp7
-rw-r--r--src/corelib/io/qfileinfo.h5
-rw-r--r--src/corelib/io/qfilesystemiterator_p.h2
-rw-r--r--src/corelib/io/qnoncontiguousbytedevice_p.h12
-rw-r--r--src/corelib/io/qprocess.cpp10
-rw-r--r--src/corelib/io/qprocess.h9
-rw-r--r--src/corelib/io/qresource.cpp306
-rw-r--r--src/corelib/io/qresource.h11
-rw-r--r--src/corelib/io/qresource_p.h56
-rw-r--r--src/corelib/io/qsettings.cpp50
-rw-r--r--src/corelib/io/qsettings.h12
-rw-r--r--src/corelib/io/qstandardpaths_android.cpp14
-rw-r--r--src/corelib/io/qurlquery.cpp8
-rw-r--r--src/corelib/io/qurlquery.h9
-rw-r--r--src/corelib/io/qwindowspipereader_p.h2
-rw-r--r--src/corelib/io/qwindowspipewriter_p.h2
-rw-r--r--src/corelib/itemmodels/itemmodels.pri17
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.cpp21
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h6
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel_p.h7
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.cpp12
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.h3
-rw-r--r--src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp750
-rw-r--r--src/corelib/itemmodels/qconcatenatetablesproxymodel.h100
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp2
-rw-r--r--src/corelib/itemmodels/qstringlistmodel.cpp87
-rw-r--r--src/corelib/itemmodels/qstringlistmodel.h7
-rw-r--r--src/corelib/itemmodels/qtransposeproxymodel.cpp446
-rw-r--r--src/corelib/itemmodels/qtransposeproxymodel.h83
-rw-r--r--src/corelib/itemmodels/qtransposeproxymodel_p.h84
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp15
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp5
-rw-r--r--src/corelib/kernel/qjni_p.h2
-rw-r--r--src/corelib/kernel/qmetaobject.cpp6
-rw-r--r--src/corelib/kernel/qmetaobjectbuilder_p.h2
-rw-r--r--src/corelib/kernel/qmetatype.cpp617
-rw-r--r--src/corelib/kernel/qmetatype.h10
-rw-r--r--src/corelib/kernel/qmimedata.cpp5
-rw-r--r--src/corelib/kernel/qobject.cpp32
-rw-r--r--src/corelib/kernel/qobject.h8
-rw-r--r--src/corelib/kernel/qobject_p.h6
-rw-r--r--src/corelib/kernel/qobjectdefs_impl.h2
-rw-r--r--src/corelib/kernel/qppsobject_p.h2
-rw-r--r--src/corelib/kernel/qsystemerror.cpp5
-rw-r--r--src/corelib/kernel/qtranslator.cpp33
-rw-r--r--src/corelib/kernel/qvariant.h4
-rw-r--r--src/corelib/mimetypes/mime/packages/freedesktop.org.xml4417
-rw-r--r--src/corelib/mimetypes/mimetypes.qrc2
-rw-r--r--src/corelib/mimetypes/qmimedatabase.cpp64
-rw-r--r--src/corelib/mimetypes/qmimedatabase_p.h9
-rw-r--r--src/corelib/mimetypes/qmimeglobpattern.cpp6
-rw-r--r--src/corelib/mimetypes/qmimeprovider.cpp4
-rw-r--r--src/corelib/mimetypes/qmimeprovider_p.h16
-rw-r--r--src/corelib/mimetypes/qmimetypeparser_p.h2
-rw-r--r--src/corelib/plugin/qfactoryinterface.h3
-rw-r--r--src/corelib/plugin/qplugin.h26
-rw-r--r--src/corelib/serialization/qcborarray.cpp20
-rw-r--r--src/corelib/serialization/qcborarray.h7
-rw-r--r--src/corelib/serialization/qcborcommon.h5
-rw-r--r--src/corelib/serialization/qcbormap.cpp19
-rw-r--r--src/corelib/serialization/qcbormap.h14
-rw-r--r--src/corelib/serialization/qcborstream.cpp16
-rw-r--r--src/corelib/serialization/qcborvalue.cpp526
-rw-r--r--src/corelib/serialization/qcborvalue.h28
-rw-r--r--src/corelib/serialization/qdatastream.cpp8
-rw-r--r--src/corelib/serialization/qdatastream.h8
-rw-r--r--src/corelib/serialization/qjson_p.h2
-rw-r--r--src/corelib/serialization/qjsonarray.cpp33
-rw-r--r--src/corelib/serialization/qjsonarray.h7
-rw-r--r--src/corelib/serialization/qjsoncbor.cpp2
-rw-r--r--src/corelib/serialization/qjsondocument.cpp20
-rw-r--r--src/corelib/serialization/qjsondocument.h5
-rw-r--r--src/corelib/serialization/qjsonobject.cpp17
-rw-r--r--src/corelib/serialization/qjsonobject.h5
-rw-r--r--src/corelib/serialization/qjsonvalue.cpp75
-rw-r--r--src/corelib/serialization/qjsonvalue.h8
-rw-r--r--src/corelib/serialization/qxmlstream.g14
-rw-r--r--src/corelib/statemachine/qsignaleventgenerator_p.h2
-rw-r--r--src/corelib/statemachine/qsignaltransition_p.h2
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp4
-rw-r--r--src/corelib/thread/qresultstore.cpp15
-rw-r--r--src/corelib/thread/qresultstore.h2
-rw-r--r--src/corelib/tools/qbytearray.cpp4
-rw-r--r--src/corelib/tools/qbytearraylist.cpp22
-rw-r--r--src/corelib/tools/qbytearraylist.h10
-rw-r--r--src/corelib/tools/qcollator_p.h4
-rw-r--r--src/corelib/tools/qcommandlineparser.cpp2
-rw-r--r--src/corelib/tools/qdatetime.cpp22
-rw-r--r--src/corelib/tools/qfreelist_p.h2
-rw-r--r--src/corelib/tools/qlist.cpp24
-rw-r--r--src/corelib/tools/qlist.h93
-rw-r--r--src/corelib/tools/qlocale.cpp43
-rw-r--r--src/corelib/tools/qlocale.h11
-rw-r--r--src/corelib/tools/qlocale.qdoc627
-rw-r--r--src/corelib/tools/qlocale_data_p.h172
-rw-r--r--src/corelib/tools/qlocale_p.h8
-rw-r--r--src/corelib/tools/qmakearray_p.h4
-rw-r--r--src/corelib/tools/qoffsetstringarray_p.h198
-rw-r--r--src/corelib/tools/qsimd.cpp3
-rw-r--r--src/corelib/tools/qsimd_p.h8
-rw-r--r--src/corelib/tools/qstring.cpp30
-rw-r--r--src/corelib/tools/qstring.h6
-rw-r--r--src/corelib/tools/qstringlist.cpp52
-rw-r--r--src/corelib/tools/qstringlist.h26
-rw-r--r--src/corelib/tools/qvector.h185
-rw-r--r--src/corelib/tools/tools.pri1
-rw-r--r--src/dbus/dbus.pro5
-rw-r--r--src/dbus/doc/qtdbus.qdocconf2
-rw-r--r--src/dbus/qdbusargument.cpp2
-rw-r--r--src/dbus/qdbusargument.h12
-rw-r--r--src/dbus/qdbusargument_p.h4
-rw-r--r--src/dbus/qdbusconnection.h2
-rw-r--r--src/dbus/qdbusconnection_p.h22
-rw-r--r--src/dbus/qdbuserror.cpp145
-rw-r--r--src/dbus/qdbusintegrator.cpp89
-rw-r--r--src/dbus/qdbuspendingcall.cpp12
-rw-r--r--src/dbus/qdbuspendingcall.h2
-rw-r--r--src/dbus/qdbuspendingreply.cpp29
-rw-r--r--src/dbus/qdbuspendingreply.h3
-rw-r--r--src/dbus/qdbusreply.cpp2
-rw-r--r--src/dbus/qdbusreply.h4
-rw-r--r--src/dbus/qdbusservicewatcher.cpp11
-rw-r--r--src/dbus/qdbusutil.cpp30
-rw-r--r--src/gui/accessible/qaccessible.h2
-rw-r--r--src/gui/accessible/qaccessibleobject.h2
-rw-r--r--src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp4
-rw-r--r--src/gui/doc/src/richtext.qdoc3
-rw-r--r--src/gui/image/qicon.cpp7
-rw-r--r--src/gui/image/qimage.cpp58
-rw-r--r--src/gui/image/qimage.h5
-rw-r--r--src/gui/image/qimage_conversions.cpp336
-rw-r--r--src/gui/image/qimage_p.h1
-rw-r--r--src/gui/image/qimageiohandler.h2
-rw-r--r--src/gui/image/qimagereader.cpp2
-rw-r--r--src/gui/image/qpaintengine_pic_p.h2
-rw-r--r--src/gui/image/qpixmap.cpp9
-rw-r--r--src/gui/image/qpixmap_raster.cpp3
-rw-r--r--src/gui/image/qpixmap_win.cpp2
-rw-r--r--src/gui/image/qpnghandler.cpp20
-rw-r--r--src/gui/image/qppmhandler.cpp14
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.cpp6
-rw-r--r--src/gui/itemmodels/qstandarditemmodel_p.h2
-rw-r--r--src/gui/kernel/qdnd_p.h2
-rw-r--r--src/gui/kernel/qdrag.cpp2
-rw-r--r--src/gui/kernel/qdrag.h3
-rw-r--r--src/gui/kernel/qguiapplication.cpp26
-rw-r--r--src/gui/kernel/qguiapplication.h2
-rw-r--r--src/gui/kernel/qguiapplication_p.h6
-rw-r--r--src/gui/kernel/qkeymapper_p.h2
-rw-r--r--src/gui/kernel/qkeysequence.cpp6
-rw-r--r--src/gui/kernel/qoffscreensurface.h2
-rw-r--r--src/gui/kernel/qopenglcontext_p.h4
-rw-r--r--src/gui/kernel/qpalette.cpp6
-rw-r--r--src/gui/kernel/qpalette.h13
-rw-r--r--src/gui/kernel/qplatformclipboard.h3
-rw-r--r--src/gui/kernel/qplatformcursor.h2
-rw-r--r--src/gui/kernel/qplatformdialoghelper.cpp12
-rw-r--r--src/gui/kernel/qplatformdialoghelper.h3
-rw-r--r--src/gui/kernel/qplatformdrag.h4
-rw-r--r--src/gui/kernel/qplatformgraphicsbuffer.h2
-rw-r--r--src/gui/kernel/qplatforminputcontext.h2
-rw-r--r--src/gui/kernel/qplatformintegration.cpp7
-rw-r--r--src/gui/kernel/qplatformintegration.h4
-rw-r--r--src/gui/kernel/qplatformscreen.h4
-rw-r--r--src/gui/kernel/qplatformservices.h2
-rw-r--r--src/gui/kernel/qplatformsessionmanager.h4
-rw-r--r--src/gui/kernel/qplatformsurface.h2
-rw-r--r--src/gui/kernel/qplatformtheme.h4
-rw-r--r--src/gui/kernel/qplatformwindow.h4
-rw-r--r--src/gui/kernel/qsessionmanager_p.h2
-rw-r--r--src/gui/kernel/qsimpledrag_p.h2
-rw-r--r--src/gui/kernel/qstylehints.cpp51
-rw-r--r--src/gui/kernel/qstylehints.h4
-rw-r--r--src/gui/kernel/qwindow.cpp27
-rw-r--r--src/gui/kernel/qwindow.h5
-rw-r--r--src/gui/kernel/qwindow_p.h2
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h2
-rw-r--r--src/gui/opengl/qopengl.cpp11
-rw-r--r--src/gui/opengl/qopenglcustomshaderstage_p.h2
-rw-r--r--src/gui/opengl/qopenglext.h11
-rw-r--r--src/gui/opengl/qopenglfunctions.h18
-rw-r--r--src/gui/opengl/qopenglpaintdevice.h2
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp5
-rw-r--r--src/gui/opengl/qopenglpaintengine_p.h2
-rw-r--r--src/gui/opengl/qopenglshaderprogram.h11
-rw-r--r--src/gui/opengl/qopengltextureuploader.cpp28
-rw-r--r--src/gui/opengl/qopengltextureuploader_p.h2
-rw-r--r--src/gui/opengl/qopenglversionfunctions.h1
-rw-r--r--src/gui/painting/qblendfunctions.cpp18
-rw-r--r--src/gui/painting/qcolor.cpp71
-rw-r--r--src/gui/painting/qcolor.h18
-rw-r--r--src/gui/painting/qcompositionfunctions.cpp88
-rw-r--r--src/gui/painting/qcosmeticstroker.cpp2
-rw-r--r--src/gui/painting/qdatabuffer_p.h2
-rw-r--r--src/gui/painting/qdrawhelper.cpp591
-rw-r--r--src/gui/painting/qdrawhelper_avx2.cpp312
-rw-r--r--src/gui/painting/qdrawhelper_mips_dsp.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_mips_dsp_p.h2
-rw-r--r--src/gui/painting/qdrawhelper_neon.cpp126
-rw-r--r--src/gui/painting/qdrawhelper_neon_p.h2
-rw-r--r--src/gui/painting/qdrawhelper_p.h166
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp138
-rw-r--r--src/gui/painting/qdrawhelper_sse4.cpp83
-rw-r--r--src/gui/painting/qdrawhelper_ssse3.cpp169
-rw-r--r--src/gui/painting/qdrawhelper_x86_p.h7
-rw-r--r--src/gui/painting/qdrawingprimitive_sse2_p.h4
-rw-r--r--src/gui/painting/qimagescale_sse4.cpp4
-rw-r--r--src/gui/painting/qmemrotate.cpp14
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp127
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h1
-rw-r--r--src/gui/painting/qpaintengineex.cpp5
-rw-r--r--src/gui/painting/qpainter.cpp7
-rw-r--r--src/gui/painting/qpainter.h3
-rw-r--r--src/gui/painting/qpainter_p.h3
-rw-r--r--src/gui/painting/qpainterpath.cpp67
-rw-r--r--src/gui/painting/qpainterpath.h5
-rw-r--r--src/gui/painting/qpainterpath_p.h22
-rw-r--r--src/gui/painting/qpathclipper_p.h2
-rw-r--r--src/gui/painting/qpdf.cpp16
-rw-r--r--src/gui/painting/qpdf_p.h2
-rw-r--r--src/gui/painting/qpdfwriter.cpp2
-rw-r--r--src/gui/painting/qrgba64.h40
-rw-r--r--src/gui/painting/qstroker.cpp5
-rw-r--r--src/gui/painting/qstroker_p.h5
-rw-r--r--src/gui/painting/qvectorpath_p.h8
-rw-r--r--src/gui/text/qabstracttextdocumentlayout.h2
-rw-r--r--src/gui/text/qcssparser.cpp68
-rw-r--r--src/gui/text/qcssparser_p.h3
-rw-r--r--src/gui/text/qcssscanner.cpp847
-rw-r--r--src/gui/text/qfont.cpp153
-rw-r--r--src/gui/text/qfont.h19
-rw-r--r--src/gui/text/qfont_p.h8
-rw-r--r--src/gui/text/qfontdatabase.cpp54
-rw-r--r--src/gui/text/qfontengine.cpp2
-rw-r--r--src/gui/text/qfontmetrics.cpp31
-rw-r--r--src/gui/text/qfontmetrics.h33
-rw-r--r--src/gui/text/qsyntaxhighlighter.h2
-rw-r--r--src/gui/text/qtextdocumentfragment_p.h2
-rw-r--r--src/gui/text/qtextformat.cpp48
-rw-r--r--src/gui/text/qtextformat.h12
-rw-r--r--src/gui/text/qtextformat_p.h2
-rw-r--r--src/gui/text/qtexthtmlparser.cpp3
-rw-r--r--src/gui/text/qtextlayout.cpp21
-rw-r--r--src/gui/text/qtextlayout.h14
-rw-r--r--src/gui/text/qtextodfwriter.cpp28
-rw-r--r--src/gui/text/qzipreader_p.h2
-rw-r--r--src/gui/text/qzipwriter_p.h2
-rw-r--r--src/gui/util/qlayoutpolicy_p.h1
-rw-r--r--src/network/access/http2/bitstreams_p.h2
-rw-r--r--src/network/access/http2/hpacktable_p.h2
-rw-r--r--src/network/access/qabstractnetworkcache.cpp10
-rw-r--r--src/network/access/qftp_p.h2
-rw-r--r--src/network/access/qhstsstore_p.h2
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp6
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h2
-rw-r--r--src/network/access/qnetworkcookiejar.cpp21
-rw-r--r--src/network/bearer/qnetworkconfiguration_p.h2
-rw-r--r--src/network/configure.json43
-rw-r--r--src/network/kernel/qauthenticator.cpp15
-rw-r--r--src/network/kernel/qauthenticator_p.h2
-rw-r--r--src/network/kernel/qhostinfo.cpp29
-rw-r--r--src/network/kernel/qhostinfo.h7
-rw-r--r--src/network/kernel/qnetworkproxy_win.cpp4
-rw-r--r--src/network/socket/qabstractsocket.cpp34
-rw-r--r--src/network/socket/qabstractsocket.h2
-rw-r--r--src/network/socket/qabstractsocket_p.h1
-rw-r--r--src/network/socket/qabstractsocketengine_p.h2
-rw-r--r--src/network/socket/qhttpsocketengine_p.h2
-rw-r--r--src/network/socket/qnativesocketengine_p.h2
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp26
-rw-r--r--src/network/socket/qnativesocketengine_winrt_p.h2
-rw-r--r--src/network/socket/qsocks5socketengine_p.h2
-rw-r--r--src/network/ssl/qasn1element_p.h2
-rw-r--r--src/network/ssl/qdtls.h2
-rw-r--r--src/network/ssl/qocspresponse.cpp238
-rw-r--r--src/network/ssl/qocspresponse.h103
-rw-r--r--src/network/ssl/qocspresponse_p.h73
-rw-r--r--src/network/ssl/qssl.cpp26
-rw-r--r--src/network/ssl/qssl.h6
-rw-r--r--src/network/ssl/qsslcertificate.cpp3
-rw-r--r--src/network/ssl/qsslcertificate_openssl.cpp48
-rw-r--r--src/network/ssl/qsslcertificate_p.h18
-rw-r--r--src/network/ssl/qsslcertificate_qt.cpp34
-rw-r--r--src/network/ssl/qsslcertificate_schannel.cpp62
-rw-r--r--src/network/ssl/qsslconfiguration.cpp41
-rw-r--r--src/network/ssl/qsslconfiguration.h3
-rw-r--r--src/network/ssl/qsslconfiguration_p.h6
-rw-r--r--src/network/ssl/qsslcontext_openssl.cpp24
-rw-r--r--src/network/ssl/qsslcontext_openssl11.cpp17
-rw-r--r--src/network/ssl/qsslcontext_opensslpre11.cpp22
-rw-r--r--src/network/ssl/qsslellipticcurve.cpp2
-rw-r--r--src/network/ssl/qsslerror.cpp45
-rw-r--r--src/network/ssl/qsslerror.h12
-rw-r--r--src/network/ssl/qsslkey_openssl.cpp46
-rw-r--r--src/network/ssl/qsslkey_p.cpp8
-rw-r--r--src/network/ssl/qsslkey_p.h3
-rw-r--r--src/network/ssl/qsslkey_qt.cpp32
-rw-r--r--src/network/ssl/qsslkey_schannel.cpp174
-rw-r--r--src/network/ssl/qsslpresharedkeyauthenticator.cpp2
-rw-r--r--src/network/ssl/qsslsocket.cpp93
-rw-r--r--src/network/ssl/qsslsocket.h4
-rw-r--r--src/network/ssl/qsslsocket_mac.cpp289
-rw-r--r--src/network/ssl/qsslsocket_mac_p.h4
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp441
-rw-r--r--src/network/ssl/qsslsocket_openssl11.cpp16
-rw-r--r--src/network/ssl/qsslsocket_openssl11_symbols_p.h17
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h13
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp146
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols_p.h89
-rw-r--r--src/network/ssl/qsslsocket_opensslpre11.cpp16
-rw-r--r--src/network/ssl/qsslsocket_opensslpre11_symbols_p.h47
-rw-r--r--src/network/ssl/qsslsocket_p.h24
-rw-r--r--src/network/ssl/qsslsocket_qt.cpp307
-rw-r--r--src/network/ssl/qsslsocket_schannel.cpp1912
-rw-r--r--src/network/ssl/qsslsocket_schannel_p.h155
-rw-r--r--src/network/ssl/qsslsocket_winrt.cpp12
-rw-r--r--src/network/ssl/ssl.pri21
-rw-r--r--src/opengl/doc/qtopengl.qdocconf2
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h2
-rw-r--r--src/opengl/qgl.cpp29
-rw-r--r--src/opengl/qgl.h16
-rw-r--r--src/opengl/qglshaderprogram.h11
-rw-r--r--src/opengl/qgraphicsshadereffect_p.h2
-rw-r--r--src/platformheaders/doc/qtplatformheaders.qdocconf2
-rw-r--r--src/platformheaders/windowsfunctions/qwindowswindowfunctions.h9
-rw-r--r--src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc33
-rw-r--r--src/platformsupport/devicediscovery/qdevicediscovery_p.h2
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp8
-rw-r--r--src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp2
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp18
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h4
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h2
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp2
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite_p.h2
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsnativeimage_p.h2
-rw-r--r--src/platformsupport/glxconvenience/qglxconvenience.cpp15
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h2
-rw-r--r--src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp3
-rw-r--r--src/platformsupport/themes/genericunix/dbustray/qstatusnotifieritemadaptor.cpp3
-rw-r--r--src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h1
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp4
-rw-r--r--src/plugins/bearer/qnetworksession_impl.cpp4
-rw-r--r--src/plugins/generic/tuiotouch/qtuiohandler.cpp10
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp15
-rw-r--r--src/plugins/platforms/android/androidjniaccessibility.cpp5
-rw-r--r--src/plugins/platforms/android/extract-dummy.cpp10
-rw-r--r--src/plugins/platforms/android/extract.cpp40
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm46
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm1
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp2
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp5
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp88
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.h4
-rw-r--r--src/plugins/platforms/vnc/qvnc.cpp10
-rw-r--r--src/plugins/platforms/vnc/qvncscreen.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsnativeinterface.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp8
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h2
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp26
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h10
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_screens.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp6
-rw-r--r--src/plugins/platforms/xcb/qxcbeventqueue.cpp6
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbsessionmanager.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp33
-rw-r--r--src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h2
-rw-r--r--src/plugins/printsupport/cups/qcupsprintengine_p.h4
-rw-r--r--src/plugins/printsupport/windows/qwindowsprintersupport.h2
-rw-r--r--src/plugins/sqldrivers/mysql/qsql_mysql.cpp12
-rw-r--r--src/plugins/sqldrivers/odbc/qsql_odbc.cpp2
-rw-r--r--src/plugins/sqldrivers/psql/main.cpp8
-rw-r--r--src/plugins/sqldrivers/psql/qsql_psql.cpp195
-rw-r--r--src/plugins/sqldrivers/psql/qsql_psql_p.h4
-rw-r--r--src/plugins/styles/android/qandroidstyle_p.h2
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm2
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac_p.h2
-rw-r--r--src/plugins/styles/windowsvista/qwindowsvistastyle_p.h2
-rw-r--r--src/plugins/styles/windowsvista/qwindowsxpstyle.cpp4
-rw-r--r--src/plugins/styles/windowsvista/qwindowsxpstyle_p.h2
-rw-r--r--src/printsupport/dialogs/qprintdialog_unix.cpp2
-rw-r--r--src/printsupport/kernel/qplatformprintdevice.cpp26
-rw-r--r--src/printsupport/kernel/qprinter.cpp2
-rw-r--r--src/printsupport/kernel/qprinterinfo.cpp29
-rw-r--r--src/printsupport/kernel/qprinterinfo.h3
-rw-r--r--src/printsupport/widgets/qcupsjobwidget_p.h2
-rw-r--r--src/sql/doc/snippets/code/doc_src_sql-driver.qdoc13
-rw-r--r--src/sql/doc/src/sql-driver.qdoc17
-rw-r--r--src/sql/kernel/qsqldatabase.cpp44
-rw-r--r--src/sql/kernel/qsqldatabase.h1
-rw-r--r--src/sql/kernel/qsqldriver.cpp16
-rw-r--r--src/sql/models/qsqlrelationaldelegate.h2
-rw-r--r--src/sql/models/qsqltablemodel.cpp10
-rw-r--r--src/sql/models/qsqltablemodel.h3
-rw-r--r--src/testlib/configure.json6
-rw-r--r--src/testlib/doc/qttestlib.qdocconf2
-rw-r--r--src/testlib/doc/src/qttest-index.qdoc10
-rw-r--r--src/testlib/qabstractitemmodeltester.h4
-rw-r--r--src/testlib/qtest.h58
-rw-r--r--src/testlib/qtestblacklist.cpp42
-rw-r--r--src/testlib/qtestblacklist_p.h1
-rw-r--r--src/testlib/qtestcase.cpp144
-rw-r--r--src/testlib/qtestcase.h17
-rw-r--r--src/testlib/qtestcorelist_p.h17
-rw-r--r--src/testlib/qtestlog.cpp5
-rw-r--r--src/testlib/selfcover.pri28
-rw-r--r--src/testlib/testlib.pro1
-rw-r--r--src/tools/androiddeployqt/main.cpp4
-rw-r--r--src/tools/moc/generator.cpp10
-rw-r--r--src/tools/moc/moc.cpp2
-rw-r--r--src/tools/moc/moc.h72
-rwxr-xr-xsrc/tools/moc/util/generate.sh2
-rw-r--r--src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp3
-rw-r--r--src/tools/qfloat16-tables/gen_qfloat16_tables.cpp2
-rw-r--r--src/tools/qlalr/cppgenerator.cpp2
-rw-r--r--src/tools/qlalr/lalr.h2
-rw-r--r--src/tools/rcc/main.cpp37
-rw-r--r--src/tools/rcc/rcc.cpp271
-rw-r--r--src/tools/rcc/rcc.h26
-rw-r--r--src/tools/rcc/rcc.pro11
-rw-r--r--src/tools/tracegen/helpers.cpp2
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.cpp16
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.cpp401
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.h5
-rw-r--r--src/tools/uic/customwidgetsinfo.cpp39
-rw-r--r--src/tools/uic/customwidgetsinfo.h8
-rw-r--r--src/tools/uic/databaseinfo.h6
-rw-r--r--src/tools/uic/driver.cpp151
-rw-r--r--src/tools/uic/driver.h57
-rw-r--r--src/tools/uic/main.cpp2
-rw-r--r--src/tools/uic/shared/language.cpp144
-rw-r--r--src/tools/uic/shared/language.h81
-rw-r--r--src/tools/uic/shared/shared.pri5
-rw-r--r--src/tools/uic/treewalker.h1
-rw-r--r--src/tools/uic/uic.cpp61
-rw-r--r--src/tools/uic/uic.h7
-rw-r--r--src/tools/uic/uic.pri1
-rw-r--r--src/tools/uic/uic.pro1
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp8
-rw-r--r--src/widgets/dialogs/qdialog.cpp19
-rw-r--r--src/widgets/dialogs/qfiledialog_p.h2
-rw-r--r--src/widgets/dialogs/qfontdialog.cpp2
-rw-r--r--src/widgets/dialogs/qmessagebox.h4
-rw-r--r--src/widgets/dialogs/qprogressdialog.cpp10
-rw-r--r--src/widgets/dialogs/qsidebar.cpp2
-rw-r--r--src/widgets/dialogs/qwizard.cpp2
-rw-r--r--src/widgets/dialogs/qwizard_win_p.h2
-rw-r--r--src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc16
-rw-r--r--src/widgets/doc/snippets/qtreewidget-using/mainwindow.cpp4
-rw-r--r--src/widgets/doc/src/model-view-programming.qdoc16
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc18
-rw-r--r--src/widgets/effects/qgraphicseffect_p.h2
-rw-r--r--src/widgets/effects/qpixmapfilter.cpp5
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.h2
-rw-r--r--src/widgets/graphicsview/qgraphicslayout.h2
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutitem.h2
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp8
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h4
-rw-r--r--src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicssceneindex_p.h4
-rw-r--r--src/widgets/graphicsview/qsimplex_p.h2
-rw-r--r--src/widgets/itemviews/qabstractitemdelegate.cpp4
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp12
-rw-r--r--src/widgets/itemviews/qcolumnview_p.h1
-rw-r--r--src/widgets/itemviews/qcolumnviewgrip_p.h2
-rw-r--r--src/widgets/itemviews/qdatawidgetmapper.cpp1
-rw-r--r--src/widgets/itemviews/qdirmodel.cpp3
-rw-r--r--src/widgets/itemviews/qheaderview.cpp29
-rw-r--r--src/widgets/itemviews/qitemdelegate.cpp6
-rw-r--r--src/widgets/itemviews/qitemeditorfactory.cpp16
-rw-r--r--src/widgets/itemviews/qlistview.cpp35
-rw-r--r--src/widgets/itemviews/qlistview_p.h8
-rw-r--r--src/widgets/itemviews/qlistwidget.cpp180
-rw-r--r--src/widgets/itemviews/qlistwidget.h45
-rw-r--r--src/widgets/itemviews/qlistwidget_p.h4
-rw-r--r--src/widgets/itemviews/qstyleditemdelegate.cpp4
-rw-r--r--src/widgets/itemviews/qtableview.cpp43
-rw-r--r--src/widgets/itemviews/qtableview.h6
-rw-r--r--src/widgets/itemviews/qtableview_p.h1
-rw-r--r--src/widgets/itemviews/qtablewidget.cpp122
-rw-r--r--src/widgets/itemviews/qtablewidget.h33
-rw-r--r--src/widgets/itemviews/qtablewidget_p.h3
-rw-r--r--src/widgets/itemviews/qtreeview.cpp131
-rw-r--r--src/widgets/itemviews/qtreeview.h6
-rw-r--r--src/widgets/itemviews/qtreeview_p.h2
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp254
-rw-r--r--src/widgets/itemviews/qtreewidget.h65
-rw-r--r--src/widgets/itemviews/qtreewidget_p.h4
-rw-r--r--src/widgets/kernel/qapplication.cpp3
-rw-r--r--src/widgets/kernel/qapplication.h8
-rw-r--r--src/widgets/kernel/qformlayout.cpp15
-rw-r--r--src/widgets/kernel/qgesturemanager.cpp10
-rw-r--r--src/widgets/kernel/qwhatsthis.cpp6
-rw-r--r--src/widgets/kernel/qwidget.cpp35
-rw-r--r--src/widgets/kernel/qwidget.h5
-rw-r--r--src/widgets/kernel/qwidget_p.h3
-rw-r--r--src/widgets/kernel/qwidgetbackingstore_p.h2
-rw-r--r--src/widgets/statemachine/qbasickeyeventtransition_p.h2
-rw-r--r--src/widgets/statemachine/qbasicmouseeventtransition_p.h2
-rw-r--r--src/widgets/styles/qcommonstyle.cpp78
-rw-r--r--src/widgets/styles/qdrawutil.cpp2
-rw-r--r--src/widgets/styles/qfusionstyle.cpp58
-rw-r--r--src/widgets/styles/qfusionstyle_p_p.h2
-rw-r--r--src/widgets/styles/qstyle.h4
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp36
-rw-r--r--src/widgets/styles/qstylesheetstyle_p.h2
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp46
-rw-r--r--src/widgets/styles/qwindowsstyle_p.h2
-rw-r--r--src/widgets/util/qcompleter_p.h1
-rw-r--r--src/widgets/util/qflickgesture.cpp2
-rw-r--r--src/widgets/util/qflickgesture_p.h3
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp6
-rw-r--r--src/widgets/widgets/qcalendarwidget.cpp5
-rw-r--r--src/widgets/widgets/qcombobox.cpp7
-rw-r--r--src/widgets/widgets/qcombobox_p.h3
-rw-r--r--src/widgets/widgets/qcommandlinkbutton.h6
-rw-r--r--src/widgets/widgets/qdockwidget.cpp7
-rw-r--r--src/widgets/widgets/qdockwidget_p.h1
-rw-r--r--src/widgets/widgets/qlabel.cpp2
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp2
-rw-r--r--src/widgets/widgets/qmainwindow.cpp6
-rw-r--r--src/widgets/widgets/qmainwindow.h6
-rw-r--r--src/widgets/widgets/qmainwindowlayout.cpp2
-rw-r--r--src/widgets/widgets/qmainwindowlayout_p.h2
-rw-r--r--src/widgets/widgets/qmdiarea.cpp20
-rw-r--r--src/widgets/widgets/qmenu.cpp42
-rw-r--r--src/widgets/widgets/qmenu.h4
-rw-r--r--src/widgets/widgets/qmenu_p.h2
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp26
-rw-r--r--src/widgets/widgets/qplaintextedit.h4
-rw-r--r--src/widgets/widgets/qstatusbar.cpp2
-rw-r--r--src/widgets/widgets/qtextbrowser.cpp6
-rw-r--r--src/widgets/widgets/qtextedit.cpp29
-rw-r--r--src/widgets/widgets/qtextedit.h4
-rw-r--r--src/widgets/widgets/qtoolbar.cpp40
-rw-r--r--src/widgets/widgets/qtoolbar.h8
-rw-r--r--src/widgets/widgets/qtoolbararealayout.cpp2
-rw-r--r--src/widgets/widgets/qtoolbararealayout_p.h2
-rw-r--r--src/widgets/widgets/qwidgetresizehandler_p.h2
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp31
-rw-r--r--src/widgets/widgets/qwidgettextcontrol_p.h6
-rw-r--r--src/xml/dom/qdom.cpp14
-rw-r--r--src/xml/sax/qxml.cpp14
-rw-r--r--tests/auto/corelib/global/qglobal/qglobal.pro1
-rw-r--r--tests/auto/corelib/global/qglobal/tst_qglobal.cpp40
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp156
-rw-r--r--tests/auto/corelib/io/qprocess/tst_qprocess.cpp18
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp2
-rw-r--r--tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp8
-rw-r--r--tests/auto/corelib/itemmodels/itemmodels.pro2
-rw-r--r--tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/qconcatenatetablesproxymodel.pro5
-rw-r--r--tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp823
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp4
-rw-r--r--tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp4
-rw-r--r--tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp176
-rw-r--r--tests/auto/corelib/itemmodels/qtransposeproxymodel/qtransposeproxymodel.pro6
-rw-r--r--tests/auto/corelib/itemmodels/qtransposeproxymodel/tst_qtransposeproxymodel.cpp915
-rw-r--r--tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp100
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp38
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp1329
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp12
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/qpluginloader.pro1
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/staticplugin/.gitignore3
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/staticplugin/main.cpp (renamed from src/tools/uic/globaldefs.h)26
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/staticplugin/staticplugin.pro7
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst/tst.pro5
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp37
-rw-r--r--tests/auto/corelib/serialization/json/tst_qtjson.cpp170
-rw-r--r--tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp140
-rw-r--r--tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp141
-rw-r--r--tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp30
-rw-r--r--tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp26
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp22
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp40
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp18
-rw-r--r--tests/auto/corelib/tools/qoffsetstringarray/qoffsetstringarray.pro6
-rw-r--r--tests/auto/corelib/tools/qoffsetstringarray/tst_qoffsetstringarray.cpp121
-rw-r--r--tests/auto/corelib/tools/qpair/tst_qpair.cpp4
-rw-r--r--tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp64
-rw-r--r--tests/auto/corelib/tools/tools.pro1
-rw-r--r--tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp137
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp42
-rw-r--r--tests/auto/gui/image/qimagereader/tst_qimagereader.cpp2
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp6
-rw-r--r--tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp4
-rw-r--r--tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp2
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp2
-rw-r--r--tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp46
-rw-r--r--tests/auto/gui/kernel/qpalette/tst_qpalette.cpp38
-rw-r--r--tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp43
-rw-r--r--tests/auto/gui/text/qcssparser/tst_qcssparser.cpp21
-rw-r--r--tests/auto/gui/text/qfont/qfont.pro1
-rw-r--r--tests/auto/gui/text/qfont/testfont.qrc5
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp123
-rw-r--r--tests/auto/gui/text/qfont/weirdfont.otfbin0 -> 25008 bytes
-rw-r--r--tests/auto/gui/text/qfontcache/tst_qfontcache.cpp45
-rw-r--r--tests/auto/gui/text/qglyphrun/BLACKLIST1
-rw-r--r--tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp4
-rw-r--r--tests/auto/gui/text/qrawfont/BLACKLIST3
-rw-r--r--tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp51
-rw-r--r--tests/auto/network-settings.h14
-rw-r--r--tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp6
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp10
-rw-r--r--tests/auto/network/ssl/qocsp/certs/alice.crt24
-rw-r--r--tests/auto/network/ssl/qocsp/certs/alice.key28
-rw-r--r--tests/auto/network/ssl/qocsp/certs/ca1.crt24
-rw-r--r--tests/auto/network/ssl/qocsp/certs/ca1.key28
-rw-r--r--tests/auto/network/ssl/qocsp/certs/infbob.key28
-rw-r--r--tests/auto/network/ssl/qocsp/certs/infbobchain.crt49
-rw-r--r--tests/auto/network/ssl/qocsp/certs/ss1-private.key28
-rw-r--r--tests/auto/network/ssl/qocsp/certs/ss1.crt25
-rw-r--r--tests/auto/network/ssl/qocsp/qocsp.pro15
-rw-r--r--tests/auto/network/ssl/qocsp/tst_qocsp.cpp823
-rw-r--r--tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp4
-rw-r--r--tests/auto/network/ssl/qsslkey/keys/dh-pri-1024.derbin0 -> 293 bytes
-rw-r--r--tests/auto/network/ssl/qsslkey/keys/dh-pri-1024.pem9
-rw-r--r--tests/auto/network/ssl/qsslkey/keys/dh-pri-2048.derbin0 -> 554 bytes
-rw-r--r--tests/auto/network/ssl/qsslkey/keys/dh-pri-2048.pem14
-rw-r--r--tests/auto/network/ssl/qsslkey/keys/dh-pri-512.derbin0 -> 159 bytes
-rw-r--r--tests/auto/network/ssl/qsslkey/keys/dh-pri-512.pem6
-rw-r--r--tests/auto/network/ssl/qsslkey/keys/dh-pub-1024.derbin0 -> 291 bytes
-rw-r--r--tests/auto/network/ssl/qsslkey/keys/dh-pub-1024.pem9
-rw-r--r--tests/auto/network/ssl/qsslkey/keys/dh-pub-2048.derbin0 -> 552 bytes
-rw-r--r--tests/auto/network/ssl/qsslkey/keys/dh-pub-2048.pem14
-rw-r--r--tests/auto/network/ssl/qsslkey/keys/dh-pub-512.derbin0 -> 157 bytes
-rw-r--r--tests/auto/network/ssl/qsslkey/keys/dh-pub-512.pem6
-rwxr-xr-xtests/auto/network/ssl/qsslkey/keys/genkeys.sh21
-rw-r--r--tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp25
-rw-r--r--tests/auto/network/ssl/qsslsocket/certs/subjectAltNameIP.crt20
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp360
-rw-r--r--tests/auto/network/ssl/ssl.pro2
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_databases.h14
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp147
-rw-r--r--tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp14
-rw-r--r--tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp14
-rw-r--r--tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp10
-rw-r--r--tests/auto/testlib/outformat/outformat.pro7
-rw-r--r--tests/auto/testlib/outformat/tst_outformat.cpp71
-rw-r--r--tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro2
-rw-r--r--tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp4
-rw-r--r--tests/auto/testlib/qsignalspy/qsignalspy.pro2
-rw-r--r--tests/auto/testlib/selftests/alive/alive.pro2
-rw-r--r--tests/auto/testlib/selftests/assert/assert.pro2
-rw-r--r--tests/auto/testlib/selftests/badxml/badxml.pro2
-rw-r--r--tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro2
-rw-r--r--tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp4
-rw-r--r--tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro2
-rw-r--r--tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro2
-rw-r--r--tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro2
-rw-r--r--tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro2
-rw-r--r--tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro2
-rw-r--r--tests/auto/testlib/selftests/blacklisted/BLACKLIST14
-rw-r--r--tests/auto/testlib/selftests/blacklisted/blacklisted.pro2
-rw-r--r--tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp5
-rw-r--r--tests/auto/testlib/selftests/cmptest/cmptest.pro2
-rw-r--r--tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro2
-rw-r--r--tests/auto/testlib/selftests/counting/counting.pro2
-rw-r--r--tests/auto/testlib/selftests/crashes/crashes.pro2
-rw-r--r--tests/auto/testlib/selftests/datatable/datatable.pro2
-rw-r--r--tests/auto/testlib/selftests/datetime/datetime.pro2
-rw-r--r--tests/auto/testlib/selftests/deleteLater/deleteLater.pro2
-rw-r--r--tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro2
-rw-r--r--tests/auto/testlib/selftests/differentexec/differentexec.pro2
-rw-r--r--tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro2
-rw-r--r--tests/auto/testlib/selftests/expected_blacklisted.lightxml2
-rw-r--r--tests/auto/testlib/selftests/expected_blacklisted.tap43
-rw-r--r--tests/auto/testlib/selftests/expected_blacklisted.teamcity2
-rw-r--r--tests/auto/testlib/selftests/expected_blacklisted.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_blacklisted.xml2
-rw-r--r--tests/auto/testlib/selftests/expected_blacklisted.xunitxml4
-rw-r--r--tests/auto/testlib/selftests/expected_faildatatype.lightxml22
-rw-r--r--tests/auto/testlib/selftests/expected_faildatatype.tap16
-rw-r--r--tests/auto/testlib/selftests/expected_faildatatype.teamcity8
-rw-r--r--tests/auto/testlib/selftests/expected_faildatatype.txt9
-rw-r--r--tests/auto/testlib/selftests/expected_faildatatype.xml25
-rw-r--r--tests/auto/testlib/selftests/expected_faildatatype.xunitxml18
-rw-r--r--tests/auto/testlib/selftests/expected_failfetchtype.lightxml21
-rw-r--r--tests/auto/testlib/selftests/expected_failfetchtype.tap15
-rw-r--r--tests/auto/testlib/selftests/expected_failfetchtype.teamcity8
-rw-r--r--tests/auto/testlib/selftests/expected_failfetchtype.txt8
-rw-r--r--tests/auto/testlib/selftests/expected_failfetchtype.xml24
-rw-r--r--tests/auto/testlib/selftests/expected_failfetchtype.xunitxml16
-rw-r--r--tests/auto/testlib/selftests/expected_float.lightxml27
-rw-r--r--tests/auto/testlib/selftests/expected_float.tap78
-rw-r--r--tests/auto/testlib/selftests/expected_float.teamcity13
-rw-r--r--tests/auto/testlib/selftests/expected_float.txt16
-rw-r--r--tests/auto/testlib/selftests/expected_float.xml27
-rw-r--r--tests/auto/testlib/selftests/expected_float.xunitxml13
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.lightxml45
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.tap22
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.teamcity23
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.txt15
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.xml48
-rw-r--r--tests/auto/testlib/selftests/expected_testlib.xunitxml16
-rw-r--r--tests/auto/testlib/selftests/expected_watchdog.lightxml19
-rw-r--r--tests/auto/testlib/selftests/expected_watchdog.tap15
-rw-r--r--tests/auto/testlib/selftests/expected_watchdog.teamcity8
-rw-r--r--tests/auto/testlib/selftests/expected_watchdog.txt8
-rw-r--r--tests/auto/testlib/selftests/expected_watchdog.xml22
-rw-r--r--tests/auto/testlib/selftests/expected_watchdog.xunitxml16
-rw-r--r--tests/auto/testlib/selftests/expectfail/expectfail.pro2
-rw-r--r--tests/auto/testlib/selftests/failcleanup/failcleanup.pro2
-rw-r--r--tests/auto/testlib/selftests/faildatatype/BLACKLIST4
-rw-r--r--tests/auto/testlib/selftests/faildatatype/faildatatype.pro9
-rw-r--r--tests/auto/testlib/selftests/faildatatype/tst_faildatatype.cpp57
-rw-r--r--tests/auto/testlib/selftests/failfetchtype/BLACKLIST4
-rw-r--r--tests/auto/testlib/selftests/failfetchtype/failfetchtype.pro9
-rw-r--r--tests/auto/testlib/selftests/failfetchtype/tst_failfetchtype.cpp55
-rw-r--r--tests/auto/testlib/selftests/failinit/failinit.pro2
-rw-r--r--tests/auto/testlib/selftests/failinitdata/failinitdata.pro2
-rw-r--r--tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro2
-rw-r--r--tests/auto/testlib/selftests/findtestdata/findtestdata.pro2
-rw-r--r--tests/auto/testlib/selftests/float/float.pro2
-rw-r--r--tests/auto/testlib/selftests/float/tst_float.cpp39
-rwxr-xr-xtests/auto/testlib/selftests/generate_expected_output.py76
-rw-r--r--tests/auto/testlib/selftests/globaldata/globaldata.pro2
-rw-r--r--tests/auto/testlib/selftests/keyboard/keyboard.pro2
-rw-r--r--tests/auto/testlib/selftests/longstring/longstring.pro2
-rw-r--r--tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro2
-rw-r--r--tests/auto/testlib/selftests/mouse/mouse.pro2
-rw-r--r--tests/auto/testlib/selftests/multiexec/multiexec.pro2
-rw-r--r--tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro2
-rw-r--r--tests/auto/testlib/selftests/printdatatags/printdatatags.pro2
-rw-r--r--tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro2
-rw-r--r--tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro2
-rw-r--r--tests/auto/testlib/selftests/selftests.pri4
-rw-r--r--tests/auto/testlib/selftests/silent/silent.pro2
-rw-r--r--tests/auto/testlib/selftests/singleskip/singleskip.pro2
-rw-r--r--tests/auto/testlib/selftests/skip/skip.pro2
-rw-r--r--tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro2
-rw-r--r--tests/auto/testlib/selftests/skipinit/skipinit.pro2
-rw-r--r--tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro2
-rw-r--r--tests/auto/testlib/selftests/sleep/sleep.pro2
-rw-r--r--tests/auto/testlib/selftests/strcmp/strcmp.pro2
-rw-r--r--tests/auto/testlib/selftests/subtest/subtest.pro2
-rw-r--r--tests/auto/testlib/selftests/test/test.pro1
-rw-r--r--tests/auto/testlib/selftests/testlib/testlib.pro9
-rw-r--r--tests/auto/testlib/selftests/testlib/tst_testlib.cpp97
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp45
-rw-r--r--tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro2
-rw-r--r--tests/auto/testlib/selftests/verbose1/verbose1.pro2
-rw-r--r--tests/auto/testlib/selftests/verbose2/verbose2.pro2
-rw-r--r--tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro2
-rw-r--r--tests/auto/testlib/selftests/warnings/warnings.pro2
-rw-r--r--tests/auto/testlib/selftests/watchdog/tst_watchdog.cpp51
-rw-r--r--tests/auto/testlib/selftests/watchdog/watchdog.pro14
-rw-r--r--tests/auto/testlib/selftests/xunit/xunit.pro2
-rw-r--r--tests/auto/testlib/testlib.pro7
-rw-r--r--tests/auto/testserver.pri130
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp29
-rw-r--r--tests/auto/tools/rcc/data/images/images.expected7
-rw-r--r--tests/auto/tools/rcc/data/sizes/data/data-0.txt0
-rw-r--r--tests/auto/tools/rcc/data/sizes/data/data-1.txt1
-rw-r--r--tests/auto/tools/rcc/data/sizes/data/data-2.txt1
-rw-r--r--tests/auto/tools/rcc/data/sizes/data/data-35.txt1
-rw-r--r--tests/auto/tools/rcc/data/sizes/size-0.expected89
-rw-r--r--tests/auto/tools/rcc/data/sizes/size-0.qrc5
-rw-r--r--tests/auto/tools/rcc/data/sizes/size-1.expected90
-rw-r--r--tests/auto/tools/rcc/data/sizes/size-1.qrc5
-rw-r--r--tests/auto/tools/rcc/data/sizes/size-2-0-35-1.expected127
-rw-r--r--tests/auto/tools/rcc/data/sizes/size-2-0-35-1.qrc8
-rw-r--r--tests/auto/tools/rcc/rcc.pro7
-rw-r--r--tests/auto/tools/rcc/tst_rcc.cpp55
-rw-r--r--tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/Main_Window.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/Widget.ui.h10
-rw-r--r--tests/auto/tools/uic/baseline/addlinkdialog.ui.h8
-rw-r--r--tests/auto/tools/uic/baseline/addtorrentform.ui.h36
-rw-r--r--tests/auto/tools/uic/baseline/authenticationdialog.ui.h14
-rw-r--r--tests/auto/tools/uic/baseline/backside.ui.h40
-rw-r--r--tests/auto/tools/uic/baseline/batchtranslation.ui.h26
-rw-r--r--tests/auto/tools/uic/baseline/bookmarkdialog.ui.h14
-rw-r--r--tests/auto/tools/uic/baseline/bookwindow.ui.h18
-rw-r--r--tests/auto/tools/uic/baseline/browserwidget.ui.h36
-rw-r--r--tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h6
-rw-r--r--tests/auto/tools/uic/baseline/buttongroup.ui.h16
-rw-r--r--tests/auto/tools/uic/baseline/calculator.ui.h58
-rw-r--r--tests/auto/tools/uic/baseline/calculatorform.ui.h18
-rw-r--r--tests/auto/tools/uic/baseline/certificateinfo.ui.h8
-rw-r--r--tests/auto/tools/uic/baseline/chatdialog.ui.h6
-rw-r--r--tests/auto/tools/uic/baseline/chatmainwindow.ui.h52
-rw-r--r--tests/auto/tools/uic/baseline/chatsetnickname.ui.h12
-rw-r--r--tests/auto/tools/uic/baseline/config.ui.h78
-rw-r--r--tests/auto/tools/uic/baseline/connectdialog.ui.h14
-rw-r--r--tests/auto/tools/uic/baseline/controller.ui.h14
-rw-r--r--tests/auto/tools/uic/baseline/cookies.ui.h8
-rw-r--r--tests/auto/tools/uic/baseline/cookiesexceptions.ui.h20
-rw-r--r--tests/auto/tools/uic/baseline/default.ui.h146
-rw-r--r--tests/auto/tools/uic/baseline/dialog.ui.h10
-rw-r--r--tests/auto/tools/uic/baseline/downloaditem.ui.h14
-rw-r--r--tests/auto/tools/uic/baseline/downloads.ui.h8
-rw-r--r--tests/auto/tools/uic/baseline/embeddeddialog.ui.h22
-rw-r--r--tests/auto/tools/uic/baseline/enumnostdset.ui.h2
-rw-r--r--tests/auto/tools/uic/baseline/filespage.ui.h10
-rw-r--r--tests/auto/tools/uic/baseline/filternamedialog.ui.h6
-rw-r--r--tests/auto/tools/uic/baseline/filterpage.ui.h16
-rw-r--r--tests/auto/tools/uic/baseline/finddialog.ui.h74
-rw-r--r--tests/auto/tools/uic/baseline/form.ui.h8
-rw-r--r--tests/auto/tools/uic/baseline/formwindowsettings.ui.h28
-rw-r--r--tests/auto/tools/uic/baseline/generalpage.ui.h8
-rw-r--r--tests/auto/tools/uic/baseline/gridalignment.ui.h12
-rw-r--r--tests/auto/tools/uic/baseline/gridpanel.ui.h22
-rw-r--r--tests/auto/tools/uic/baseline/helpdialog.ui3
-rw-r--r--tests/auto/tools/uic/baseline/helpdialog.ui.h147
-rw-r--r--tests/auto/tools/uic/baseline/history.ui.h8
-rw-r--r--tests/auto/tools/uic/baseline/icontheme.ui.h10
-rw-r--r--tests/auto/tools/uic/baseline/idbased.ui.h14
-rw-r--r--tests/auto/tools/uic/baseline/identifierpage.ui.h10
-rw-r--r--tests/auto/tools/uic/baseline/imagedialog.ui.h22
-rw-r--r--tests/auto/tools/uic/baseline/inputpage.ui.h8
-rw-r--r--tests/auto/tools/uic/baseline/installdialog.ui.h16
-rw-r--r--tests/auto/tools/uic/baseline/languagesdialog.ui.h42
-rw-r--r--tests/auto/tools/uic/baseline/listwidgeteditor.ui.h46
-rw-r--r--tests/auto/tools/uic/baseline/mainwindow.ui.h50
-rw-r--r--tests/auto/tools/uic/baseline/mydialog.ui.h14
-rw-r--r--tests/auto/tools/uic/baseline/myform.ui.h24
-rw-r--r--tests/auto/tools/uic/baseline/newactiondialog.ui.h14
-rw-r--r--tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h8
-rw-r--r--tests/auto/tools/uic/baseline/newform.ui.h12
-rw-r--r--tests/auto/tools/uic/baseline/orderdialog.ui.h18
-rw-r--r--tests/auto/tools/uic/baseline/outputpage.ui.h8
-rw-r--r--tests/auto/tools/uic/baseline/pagefold.ui.h146
-rw-r--r--tests/auto/tools/uic/baseline/paletteeditor.ui.h26
-rw-r--r--tests/auto/tools/uic/baseline/passworddialog.ui.h12
-rw-r--r--tests/auto/tools/uic/baseline/pathpage.ui.h12
-rw-r--r--tests/auto/tools/uic/baseline/phrasebookbox.ui.h70
-rw-r--r--tests/auto/tools/uic/baseline/pixmapfunction.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/plugindialog.ui.h10
-rw-r--r--tests/auto/tools/uic/baseline/preferencesdialog.ui.h12
-rw-r--r--tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h18
-rw-r--r--tests/auto/tools/uic/baseline/previewdialogbase.ui.h20
-rw-r--r--tests/auto/tools/uic/baseline/previewwidget.ui.h28
-rw-r--r--tests/auto/tools/uic/baseline/proxy.ui.h12
-rw-r--r--tests/auto/tools/uic/baseline/qfiledialog.ui.h42
-rw-r--r--tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h82
-rw-r--r--tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h8
-rw-r--r--tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h44
-rw-r--r--tests/auto/tools/uic/baseline/qprintwidget.ui.h24
-rw-r--r--tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h30
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientdialog.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/qtgradienteditor.ui.h224
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientview.ui.h12
-rw-r--r--tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h4
-rw-r--r--tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h40
-rw-r--r--tests/auto/tools/uic/baseline/qttoolbardialog.ui.h68
-rw-r--r--tests/auto/tools/uic/baseline/querywidget.ui.h10
-rw-r--r--tests/auto/tools/uic/baseline/remotecontrol.ui.h28
-rw-r--r--tests/auto/tools/uic/baseline/saveformastemplate.ui.h12
-rw-r--r--tests/auto/tools/uic/baseline/settings.ui.h16
-rw-r--r--tests/auto/tools/uic/baseline/signalslotdialog.ui.h40
-rw-r--r--tests/auto/tools/uic/baseline/sslclient.ui.h24
-rw-r--r--tests/auto/tools/uic/baseline/sslerrors.ui.h12
-rw-r--r--tests/auto/tools/uic/baseline/statistics.ui.h28
-rw-r--r--tests/auto/tools/uic/baseline/stringlisteditor.ui.h44
-rw-r--r--tests/auto/tools/uic/baseline/stylesheeteditor.ui.h22
-rw-r--r--tests/auto/tools/uic/baseline/tabbedbrowser.ui.h18
-rw-r--r--tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h98
-rw-r--r--tests/auto/tools/uic/baseline/tetrixwindow.ui.h18
-rw-r--r--tests/auto/tools/uic/baseline/textfinder.ui.h12
-rw-r--r--tests/auto/tools/uic/baseline/topicchooser.ui.h14
-rw-r--r--tests/auto/tools/uic/baseline/translatedialog.ui.h62
-rw-r--r--tests/auto/tools/uic/baseline/translationsettings.ui.h14
-rw-r--r--tests/auto/tools/uic/baseline/treewidgeteditor.ui.h114
-rw-r--r--tests/auto/tools/uic/baseline/trpreviewtool.ui.h36
-rw-r--r--tests/auto/tools/uic/baseline/validators.ui.h30
-rw-r--r--tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h52
-rw-r--r--tests/auto/tools/uic/tst_uic.cpp38
-rw-r--r--tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp55
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp4
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp159
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp1
-rw-r--r--tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp126
-rw-r--r--tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp152
-rw-r--r--tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp240
-rw-r--r--tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp16
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp11
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp7
-rw-r--r--tests/auto/widgets/kernel/qwidgetmetatype/tst_qwidgetmetatype.cpp47
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp76
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp48
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp25
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp11
-rw-r--r--tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp62
-rw-r--r--tests/auto/widgets/widgets/qsplitter/BLACKLIST2
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp45
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/main.cpp8
-rw-r--r--tests/benchmarks/corelib/io/qtextstream/qtextstream.pro2
-rw-r--r--tests/benchmarks/corelib/mimetypes/qmimedatabase/main.cpp11
-rw-r--r--tests/benchmarks/corelib/tools/qmap/qmap.pro2
-rw-r--r--tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp10
-rw-r--r--tests/benchmarks/widgets/itemviews/itemviews.pro3
-rw-r--r--tests/benchmarks/widgets/itemviews/qlistview/qlistview.pro7
-rw-r--r--tests/benchmarks/widgets/itemviews/qlistview/tst_qlistview.cpp68
-rw-r--r--tests/libfuzzer/README37
-rw-r--r--tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/main.cpp36
-rw-r--r--tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro5
-rw-r--r--tests/libfuzzer/gui/text/qtextdocument/setHtml/main.cpp37
-rw-r--r--tests/libfuzzer/gui/text/qtextdocument/setHtml/setHtml.pro4
-rw-r--r--tests/manual/foreignwindows/main.cpp11
-rw-r--r--tests/manual/qcursor/grab_override/mainwindow.cpp4
-rw-r--r--tests/manual/qsslsocket/main.cpp12
-rw-r--r--tests/manual/widgets/itemviews/itemviews.pro8
-rw-r--r--tests/manual/widgets/itemviews/qconcatenatetablesproxymodel/main.cpp88
-rw-r--r--tests/manual/widgets/itemviews/qconcatenatetablesproxymodel/qconcatenatetablesproxymodel.pro8
-rw-r--r--tests/shared/filesystem.h32
-rw-r--r--tests/testserver/apache2/.gitattributes2
-rw-r--r--tests/testserver/common/.gitattributes2
-rwxr-xr-xtests/testserver/common/startup.sh4
-rw-r--r--tests/testserver/danted/.gitattributes2
-rwxr-xr-xtests/testserver/danted/danted.sh19
-rw-r--r--tests/testserver/docker-compose-for-macOS.yml99
-rw-r--r--tests/testserver/docker-compose-for-windows.yml99
-rw-r--r--tests/testserver/docker-compose.yml34
-rw-r--r--tests/testserver/ftp-proxy/.gitattributes2
-rw-r--r--tests/testserver/squid/.gitattributes2
-rw-r--r--tests/testserver/vsftpd/.gitattributes2
-rwxr-xr-xtests/testserver/vsftpd/vsftpd.sh7
-rw-r--r--util/lexgen/README3
-rw-r--r--util/lexgen/css3-simplified.lexgen2
-rw-r--r--util/lexgen/generator.cpp15
-rw-r--r--util/lexgen/main.cpp2
-rwxr-xr-xutil/local_database/cldr2qlocalexml.py139
-rw-r--r--util/local_database/enumdata.py1533
-rw-r--r--util/local_database/xpathlite.py4
1262 files changed, 30897 insertions, 12526 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 6c2b67442a..c92e38c48f 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -4,4 +4,4 @@ CONFIG += warning_clean
QT_SOURCE_TREE = $$PWD
QT_BUILD_TREE = $$shadowed($$PWD)
-MODULE_VERSION = 5.12.2
+MODULE_VERSION = 5.13.0
diff --git a/config_help.txt b/config_help.txt
index fb37cbaed9..223adf61d7 100644
--- a/config_help.txt
+++ b/config_help.txt
@@ -136,6 +136,9 @@ Build options:
for example, -sanitize address cannot be combined with
-sanitize thread.
+ -coverage {trace-pc-guard}
+ Add code coverage instrumentation (Clang only)
+
-c++std <edition> .... Select C++ standard <edition> [c++1z/c++14/c++11]
(Not supported with MSVC)
diff --git a/configure.json b/configure.json
index 9fce6d039e..f1a414fbf9 100644
--- a/configure.json
+++ b/configure.json
@@ -67,6 +67,7 @@
"commercial": "void",
"compile-examples": { "type": "boolean", "name": "compile_examples" },
"confirm-license": "void",
+ "coverage": "coverage",
"dbus": { "type": "optionalString", "values": [ "no", "yes", "linked", "runtime" ] },
"dbus-linked": { "type": "void", "name": "dbus", "value": "linked" },
"dbus-runtime": { "type": "void", "name": "dbus", "value": "runtime" },
@@ -135,7 +136,8 @@
"Werror": { "type": "boolean", "name": "warnings_are_errors" },
"widgets": "boolean",
"xplatform": "string",
- "zlib": { "type": "enum", "name": "system-zlib", "values": { "system": "yes", "qt": "no" } }
+ "zlib": { "type": "enum", "name": "system-zlib", "values": { "system": "yes", "qt": "no" } },
+ "zstd": "boolean"
},
"prefix": {
"D": "defines",
@@ -166,6 +168,21 @@
{ "libs": "-s USE_ZLIB=1", "condition": "config.wasm" }
]
},
+ "zstd": {
+ "label": "Zstandard",
+ "test": {
+ "include": "zstd.h",
+ "main": [
+ "(void) ZSTD_compress(NULL, 0, NULL, 0, 1);",
+ "unsigned long long n = ZSTD_getFrameContentSize(NULL, 0);",
+ "(void) ZSTD_decompress(NULL, 0, NULL, n);"
+ ]
+ },
+ "sources": [
+ { "type": "pkgConfig", "args": "libzstd >= 1.3" },
+ "-lzstd"
+ ]
+ },
"dbus": {
"label": "D-Bus >= 1.2",
"test": {
@@ -805,6 +822,16 @@
"condition": "features.sanitize_address || features.sanitize_thread || features.sanitize_memory || features.sanitize_undefined",
"output": [ "sanitizer", "publicConfig" ]
},
+ "coverage_trace_pc_guard": {
+ "label": "trace-pc-guard",
+ "autoDetect": false,
+ "output": [ "publicConfig" ]
+ },
+ "coverage": {
+ "label": "Code Coverage Instrumentation",
+ "condition": "features.coverage_trace_pc_guard",
+ "output": [ "publicConfig" ]
+ },
"GNUmake": {
"label": "GNU make",
"autoDetect": false,
@@ -1129,6 +1156,11 @@
"condition": "libs.zlib",
"output": [ "privateFeature" ]
},
+ "zstd": {
+ "label": "Zstandard support",
+ "condition": "libs.zstd",
+ "output": [ "privateFeature" ]
+ },
"thread": {
"label": "Thread support",
"purpose": "Provides QThread and related classes.",
@@ -1283,6 +1315,11 @@ Qt can be built in release mode with separate debug information, so
"type": "error",
"condition": "(features.rpath || features.rpath_dir) && var.QMAKE_LFLAGS_RPATH == ''",
"message": "This platform does not support RPATH"
+ },
+ {
+ "type": "error",
+ "condition": "features.coverage && !config.clang",
+ "message": "Command line option -coverage is only supported with clang compilers."
}
],
@@ -1417,6 +1454,12 @@ Configure with '-qreal float' to create a build that is binary-compatible with 5
"entries": [ "sanitize_address", "sanitize_thread", "sanitize_memory", "sanitize_undefined" ]
},
{
+ "message": "Code Coverage Instrumentation",
+ "type": "firstAvailableFeature",
+ "args": "coverage_trace_pc_guard",
+ "condition": "features.coverage"
+ },
+ {
"message": "Build parts",
"type": "buildParts"
},
@@ -1444,7 +1487,8 @@ Configure with '-qreal float' to create a build that is binary-compatible with 5
"entries": [
"pkg-config",
"libudev",
- "system-zlib"
+ "system-zlib",
+ "zstd"
]
}
]
diff --git a/configure.pri b/configure.pri
index 629ca78ff1..df890a7c49 100644
--- a/configure.pri
+++ b/configure.pri
@@ -58,6 +58,21 @@ defineTest(qtConfCommandline_sanitize) {
}
}
+defineTest(qtConfCommandline_coverage) {
+ arg = $${1}
+ val = $${2}
+ isEmpty(val): val = $$qtConfGetNextCommandlineArg()
+ !contains(val, "^-.*"):!isEmpty(val) {
+ equals(val, "trace-pc-guard") {
+ qtConfCommandlineSetInput("coverage_trace_pc_guard", "yes")
+ } else {
+ qtConfAddError("Invalid argument $$val to command line parameter $$arg")
+ }
+ } else {
+ qtConfAddError("Missing argument to command line parameter $$arg")
+ }
+}
+
# callbacks
defineReplace(qtConfFunc_crossCompile) {
@@ -603,14 +618,8 @@ defineTest(qtConfOutput_prepareOptions) {
target_arch = armeabi-v7a
platform = $$eval(config.input.android-ndk-platform)
- isEmpty(platform): equals(target_arch, arm64-v8a): \
- platform = android-21
-
- isEmpty(platform): equals(target_arch, x86_64): \
- platform = android-21
-
isEmpty(platform): \
- platform = android-16 ### the windows configure disagrees ...
+ platform = android-21
$${currentConfig}.output.devicePro += \
"DEFAULT_ANDROID_SDK_ROOT = $$val_escape(sdk_root)" \
diff --git a/dist/changes-5.13.0 b/dist/changes-5.13.0
new file mode 100644
index 0000000000..c6db991931
--- /dev/null
+++ b/dist/changes-5.13.0
@@ -0,0 +1,7 @@
+****************************************************************************
+* Important Source Incompatible Changes *
+****************************************************************************
+
+ - Moc generated files include the standard <memory> header file now.
+ A side effect of this is that code including the Moc output from within
+ a namespace will fail to compile.
diff --git a/doc/global/qt-html-templates-offline.qdocconf b/doc/global/qt-html-templates-offline.qdocconf
index d5780a35da..f9baab9d19 100644
--- a/doc/global/qt-html-templates-offline.qdocconf
+++ b/doc/global/qt-html-templates-offline.qdocconf
@@ -3,6 +3,8 @@ include(html-config.qdocconf)
include(html-header-offline.qdocconf)
include(html-footer.qdocconf)
+defines += offlinedocs
+
#uncomment if navigation bar is not wanted
#HTML.nonavigationbar = "true"
diff --git a/doc/global/qt-html-templates-online.qdocconf b/doc/global/qt-html-templates-online.qdocconf
index 69c399d05a..f1437a2d9c 100644
--- a/doc/global/qt-html-templates-online.qdocconf
+++ b/doc/global/qt-html-templates-online.qdocconf
@@ -4,6 +4,8 @@ HTML.tocdepth = 2
include(html-header-online.qdocconf)
include(html-footer-online.qdocconf)
+defines += onlinedocs
+
#uncomment if navigation bar is not wanted
#HTML.nonavigationbar = "true"
diff --git a/examples/corelib/serialization/convert/cborconverter.cpp b/examples/corelib/serialization/convert/cborconverter.cpp
index 41724c935e..f906c81062 100644
--- a/examples/corelib/serialization/convert/cborconverter.cpp
+++ b/examples/corelib/serialization/convert/cborconverter.cpp
@@ -84,19 +84,6 @@ static const char diagnosticHelp[] =
QT_BEGIN_NAMESPACE
-QDataStream &operator<<(QDataStream &ds, QCborSimpleType st)
-{
- return ds << quint8(st);
-}
-
-QDataStream &operator>>(QDataStream &ds, QCborSimpleType &st)
-{
- quint8 v;
- ds >> v;
- st = QCborSimpleType(v);
- return ds;
-}
-
QDataStream &operator<<(QDataStream &ds, QCborTag tag)
{
return ds << quint64(tag);
diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp
index f9b899b06b..1a54f5ec8a 100644
--- a/examples/network/bearermonitor/bearermonitor.cpp
+++ b/examples/network/bearermonitor/bearermonitor.cpp
@@ -142,7 +142,8 @@ void BearerMonitor::configurationAdded(const QNetworkConfiguration &config, QTre
treeWidget->addTopLevelItem(item);
if (config.type() == QNetworkConfiguration::ServiceNetwork) {
- foreach (const QNetworkConfiguration &child, config.children())
+ const QList<QNetworkConfiguration> children = config.children();
+ for (const QNetworkConfiguration &child : children)
configurationAdded(child, item);
}
}
@@ -181,7 +182,8 @@ void BearerMonitor::configurationChanged(const QNetworkConfiguration &config)
void BearerMonitor::updateSnapConfiguration(QTreeWidgetItem *parent, const QNetworkConfiguration &snap)
{
QMap<QString, QTreeWidgetItem *> itemMap;
- foreach (QTreeWidgetItem *item, parent->takeChildren())
+ const QList<QTreeWidgetItem *> children = parent->takeChildren();
+ for (QTreeWidgetItem *item : children)
itemMap.insert(item->data(0, Qt::UserRole).toString(), item);
QList<QNetworkConfiguration> allConfigurations = snap.children();
diff --git a/examples/network/dnslookup/dnslookup.cpp b/examples/network/dnslookup/dnslookup.cpp
index 63819b170c..a2d927d43d 100644
--- a/examples/network/dnslookup/dnslookup.cpp
+++ b/examples/network/dnslookup/dnslookup.cpp
@@ -172,35 +172,43 @@ void DnsManager::showResults()
printf("Error: %i (%s)\n", dns->error(), qPrintable(dns->errorString()));
// CNAME records
- foreach (const QDnsDomainNameRecord &record, dns->canonicalNameRecords())
+ const QList<QDnsDomainNameRecord> cnameRecords = dns->canonicalNameRecords();
+ for (const QDnsDomainNameRecord &record : cnameRecords)
printf("%s\t%i\tIN\tCNAME\t%s\n", qPrintable(record.name()), record.timeToLive(), qPrintable(record.value()));
// A and AAAA records
- foreach (const QDnsHostAddressRecord &record, dns->hostAddressRecords()) {
+ const QList<QDnsHostAddressRecord> aRecords = dns->hostAddressRecords();
+ for (const QDnsHostAddressRecord &record : aRecords) {
const char *type = (record.value().protocol() == QAbstractSocket::IPv6Protocol) ? "AAAA" : "A";
printf("%s\t%i\tIN\t%s\t%s\n", qPrintable(record.name()), record.timeToLive(), type, qPrintable(record.value().toString()));
}
// MX records
- foreach (const QDnsMailExchangeRecord &record, dns->mailExchangeRecords())
+ const QList<QDnsMailExchangeRecord> mxRecords = dns->mailExchangeRecords();
+ for (const QDnsMailExchangeRecord &record : mxRecords)
printf("%s\t%i\tIN\tMX\t%u %s\n", qPrintable(record.name()), record.timeToLive(), record.preference(), qPrintable(record.exchange()));
// NS records
- foreach (const QDnsDomainNameRecord &record, dns->nameServerRecords())
+ const QList<QDnsDomainNameRecord> nsRecords = dns->nameServerRecords();
+ for (const QDnsDomainNameRecord &record : nsRecords)
printf("%s\t%i\tIN\tNS\t%s\n", qPrintable(record.name()), record.timeToLive(), qPrintable(record.value()));
// PTR records
- foreach (const QDnsDomainNameRecord &record, dns->pointerRecords())
+ const QList<QDnsDomainNameRecord> ptrRecords = dns->pointerRecords();
+ for (const QDnsDomainNameRecord &record : ptrRecords)
printf("%s\t%i\tIN\tPTR\t%s\n", qPrintable(record.name()), record.timeToLive(), qPrintable(record.value()));
// SRV records
- foreach (const QDnsServiceRecord &record, dns->serviceRecords())
+ const QList<QDnsServiceRecord> srvRecords = dns->serviceRecords();
+ for (const QDnsServiceRecord &record : srvRecords)
printf("%s\t%i\tIN\tSRV\t%u %u %u %s\n", qPrintable(record.name()), record.timeToLive(), record.priority(), record.weight(), record.port(), qPrintable(record.target()));
// TXT records
- foreach (const QDnsTextRecord &record, dns->textRecords()) {
+ const QList<QDnsTextRecord> txtRecords = dns->textRecords();
+ for (const QDnsTextRecord &record : txtRecords) {
QStringList values;
- foreach (const QByteArray &ba, record.values())
+ const QList<QByteArray> dnsRecords = record.values();
+ for (const QByteArray &ba : dnsRecords)
values << "\"" + QString::fromLatin1(ba) + "\"";
printf("%s\t%i\tIN\tTXT\t%s\n", qPrintable(record.name()), record.timeToLive(), qPrintable(values.join(' ')));
}
diff --git a/examples/network/http/httpwindow.cpp b/examples/network/http/httpwindow.cpp
index ec90b8f7fe..39ffb3cc87 100644
--- a/examples/network/http/httpwindow.cpp
+++ b/examples/network/http/httpwindow.cpp
@@ -319,7 +319,7 @@ void HttpWindow::slotAuthenticationRequired(QNetworkReply *, QAuthenticator *aut
void HttpWindow::sslErrors(QNetworkReply *, const QList<QSslError> &errors)
{
QString errorString;
- foreach (const QSslError &error, errors) {
+ for (const QSslError &error : errors) {
if (!errorString.isEmpty())
errorString += '\n';
errorString += error.errorString();
diff --git a/examples/network/loopback/dialog.cpp b/examples/network/loopback/dialog.cpp
index b4e6b0fd5e..d87f024031 100644
--- a/examples/network/loopback/dialog.cpp
+++ b/examples/network/loopback/dialog.cpp
@@ -99,7 +99,7 @@ void Dialog::start()
startButton->setEnabled(false);
#ifndef QT_NO_CURSOR
- QApplication::setOverrideCursor(Qt::WaitCursor);
+ QGuiApplication::setOverrideCursor(Qt::WaitCursor);
#endif
bytesWritten = 0;
@@ -162,7 +162,7 @@ void Dialog::updateServerProgress()
tcpServerConnection->close();
startButton->setEnabled(true);
#ifndef QT_NO_CURSOR
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
}
}
@@ -198,6 +198,6 @@ void Dialog::displayError(QAbstractSocket::SocketError socketError)
serverStatusLabel->setText(tr("Server ready"));
startButton->setEnabled(true);
#ifndef QT_NO_CURSOR
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
}
diff --git a/examples/network/network-chat/client.cpp b/examples/network/network-chat/client.cpp
index 97c2c44b6b..b76ef18238 100644
--- a/examples/network/network-chat/client.cpp
+++ b/examples/network/network-chat/client.cpp
@@ -71,8 +71,7 @@ void Client::sendMessage(const QString &message)
if (message.isEmpty())
return;
- QList<Connection *> connections = peers.values();
- foreach (Connection *connection, connections)
+ for (Connection *connection : qAsConst(peers))
connection->sendMessage(message);
}
@@ -90,8 +89,8 @@ bool Client::hasConnection(const QHostAddress &senderIp, int senderPort) const
if (!peers.contains(senderIp))
return false;
- QList<Connection *> connections = peers.values(senderIp);
- foreach (Connection *connection, connections) {
+ const QList<Connection *> connections = peers.values(senderIp);
+ for (const Connection *connection : connections) {
if (connection->peerPort() == senderPort)
return true;
}
diff --git a/examples/network/network-chat/peermanager.cpp b/examples/network/network-chat/peermanager.cpp
index 38fa2e8e50..5c48edb1b9 100644
--- a/examples/network/network-chat/peermanager.cpp
+++ b/examples/network/network-chat/peermanager.cpp
@@ -104,9 +104,9 @@ void PeerManager::startBroadcasting()
broadcastTimer.start();
}
-bool PeerManager::isLocalHostAddress(const QHostAddress &address)
+bool PeerManager::isLocalHostAddress(const QHostAddress &address) const
{
- foreach (QHostAddress localAddress, ipAddresses) {
+ for (const QHostAddress &localAddress : ipAddresses) {
if (address.isEqual(localAddress))
return true;
}
@@ -125,7 +125,7 @@ void PeerManager::sendBroadcastDatagram()
}
bool validBroadcastAddresses = true;
- foreach (QHostAddress address, broadcastAddresses) {
+ for (const QHostAddress &address : qAsConst(broadcastAddresses)) {
if (broadcastSocket.writeDatagram(datagram, address,
broadcastPort) == -1)
validBroadcastAddresses = false;
@@ -182,8 +182,10 @@ void PeerManager::updateAddresses()
{
broadcastAddresses.clear();
ipAddresses.clear();
- foreach (QNetworkInterface interface, QNetworkInterface::allInterfaces()) {
- foreach (QNetworkAddressEntry entry, interface.addressEntries()) {
+ const QList<QNetworkInterface> interfaces = QNetworkInterface::allInterfaces();
+ for (const QNetworkInterface &interface : interfaces) {
+ const QList<QNetworkAddressEntry> entries = interface.addressEntries();
+ for (const QNetworkAddressEntry &entry : entries) {
QHostAddress broadcastAddress = entry.broadcast();
if (broadcastAddress != QHostAddress::Null && entry.ip() != QHostAddress::LocalHost) {
broadcastAddresses << broadcastAddress;
diff --git a/examples/network/network-chat/peermanager.h b/examples/network/network-chat/peermanager.h
index b79028235b..6105c83115 100644
--- a/examples/network/network-chat/peermanager.h
+++ b/examples/network/network-chat/peermanager.h
@@ -70,7 +70,7 @@ public:
void setServerPort(int port);
QString userName() const;
void startBroadcasting();
- bool isLocalHostAddress(const QHostAddress &address);
+ bool isLocalHostAddress(const QHostAddress &address) const;
signals:
void newConnection(Connection *connection);
diff --git a/examples/network/torrent/addtorrentdialog.cpp b/examples/network/torrent/addtorrentdialog.cpp
index 0d197ec5fa..c87110ac4a 100644
--- a/examples/network/torrent/addtorrentdialog.cpp
+++ b/examples/network/torrent/addtorrentdialog.cpp
@@ -148,7 +148,8 @@ void AddTorrentDialog::setTorrent(const QString &torrentFile)
ui.torrentContents->setHtml(metaInfo.singleFile().name);
} else {
QString html;
- foreach (MetaInfoMultiFile file, metaInfo.multiFiles()) {
+ const QList<MetaInfoMultiFile> multiFiles = metaInfo.multiFiles();
+ for (const MetaInfoMultiFile &file : multiFiles) {
QString name = metaInfo.name();
if (!name.isEmpty()) {
html += name;
diff --git a/examples/network/torrent/filemanager.cpp b/examples/network/torrent/filemanager.cpp
index d05408cebc..69345442c7 100644
--- a/examples/network/torrent/filemanager.cpp
+++ b/examples/network/torrent/filemanager.cpp
@@ -77,7 +77,7 @@ FileManager::~FileManager()
cond.wakeOne();
wait();
- foreach (QFile *file, files) {
+ for (QFile *file : qAsConst(files)) {
file->close();
delete file;
}
@@ -285,7 +285,8 @@ bool FileManager::generateFiles()
return false;
}
- foreach (const MetaInfoMultiFile &entry, metaInfo.multiFiles()) {
+ const QList<MetaInfoMultiFile> multiFiles = metaInfo.multiFiles();
+ for (const MetaInfoMultiFile &entry : multiFiles) {
QString filePath = QFileInfo(prefix + entry.path).path();
if (!QFile::exists(filePath)) {
if (!dir.mkpath(filePath)) {
@@ -437,7 +438,7 @@ void FileManager::verifyFileContents()
}
// Verify all pending pieces
- foreach (int index, newPendingVerificationRequests)
+ for (int index : qAsConst(newPendingVerificationRequests))
emit pieceVerified(index, verifySinglePiece(index));
}
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp
index 660472c05c..39b166101d 100644
--- a/examples/network/torrent/mainwindow.cpp
+++ b/examples/network/torrent/mainwindow.cpp
@@ -239,7 +239,7 @@ int MainWindow::rowOfClient(TorrentClient *client) const
// Return the row that displays this client's status, or -1 if the
// client is not known.
int row = 0;
- foreach (Job job, jobs) {
+ for (const Job &job : jobs) {
if (job.client == client)
return row;
++row;
@@ -358,7 +358,7 @@ bool MainWindow::addTorrent(const QString &fileName, const QString &destinationF
const QByteArray &resumeState)
{
// Check if the torrent is already being downloaded.
- foreach (Job job, jobs) {
+ for (const Job &job : qAsConst(jobs)) {
if (job.torrentFileName == fileName && job.destinationDirectory == destinationFolder) {
QMessageBox::warning(this, tr("Already downloading"),
tr("The torrent file %1 is "
@@ -684,7 +684,7 @@ void MainWindow::closeEvent(QCloseEvent *)
// them to signal that they have stopped.
jobsToStop = 0;
jobsStopped = 0;
- foreach (Job job, jobs) {
+ for (const Job &job : qAsConst(jobs)) {
++jobsToStop;
TorrentClient *client = job.client;
client->disconnect();
diff --git a/examples/network/torrent/metainfo.cpp b/examples/network/torrent/metainfo.cpp
index 565533e2f9..29b34b12a0 100644
--- a/examples/network/torrent/metainfo.cpp
+++ b/examples/network/torrent/metainfo.cpp
@@ -101,10 +101,10 @@ bool MetaInfo::parse(const QByteArray &data)
QList<QVariant> files = info.value("files").toList();
for (int i = 0; i < files.size(); ++i) {
- QMap<QByteArray, QVariant> file = qvariant_cast<Dictionary>(files.at(i));
- QList<QVariant> pathElements = file.value("path").toList();
+ const QMap<QByteArray, QVariant> file = qvariant_cast<Dictionary>(files.at(i));
+ const QList<QVariant> pathElements = file.value("path").toList();
QByteArray path;
- foreach (QVariant p, pathElements) {
+ for (const QVariant &p : pathElements) {
if (!path.isEmpty())
path += '/';
path += p.toByteArray();
@@ -221,7 +221,7 @@ qint64 MetaInfo::totalSize() const
return singleFile().length;
qint64 size = 0;
- foreach (MetaInfoMultiFile file, multiFiles())
+ for (const MetaInfoMultiFile &file : metaInfoMultiFiles)
size += file.length;
return size;
}
diff --git a/examples/network/torrent/ratecontroller.cpp b/examples/network/torrent/ratecontroller.cpp
index cec05c7455..47b49dba30 100644
--- a/examples/network/torrent/ratecontroller.cpp
+++ b/examples/network/torrent/ratecontroller.cpp
@@ -78,7 +78,7 @@ void RateController::removeSocket(PeerWireClient *socket)
void RateController::setDownloadLimit(int bytesPerSecond)
{
downLimit = bytesPerSecond;
- foreach (PeerWireClient *socket, sockets)
+ for (PeerWireClient *socket : qAsConst(sockets))
socket->setReadBufferSize(downLimit * 4);
}
@@ -108,7 +108,7 @@ void RateController::transfer()
}
QSet<PeerWireClient *> pendingSockets;
- foreach (PeerWireClient *client, sockets) {
+ for (PeerWireClient *client : qAsConst(sockets)) {
if (client->canTransferMore())
pendingSockets << client;
}
diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp
index 95232646ab..d01a5f3d9e 100644
--- a/examples/network/torrent/torrentclient.cpp
+++ b/examples/network/torrent/torrentclient.cpp
@@ -383,7 +383,7 @@ qint64 TorrentClient::uploadedBytes() const
int TorrentClient::connectedPeerCount() const
{
int tmp = 0;
- foreach (PeerWireClient *client, d->connections) {
+ for (PeerWireClient *client : d->connections) {
if (client->state() == QAbstractSocket::ConnectedState)
++tmp;
}
@@ -393,7 +393,7 @@ int TorrentClient::connectedPeerCount() const
int TorrentClient::seedCount() const
{
int tmp = 0;
- foreach (PeerWireClient *client, d->connections) {
+ for (PeerWireClient *client : d->connections) {
if (client->availablePieces().count(true) == d->pieceCount)
++tmp;
}
@@ -464,7 +464,7 @@ void TorrentClient::stop()
}
// Abort all existing connections
- foreach (PeerWireClient *client, d->connections) {
+ for (PeerWireClient *client : qAsConst(d->connections)) {
RateController::instance()->removeSocket(client);
ConnectionManager::instance()->removeConnection(client);
client->abort();
@@ -487,7 +487,7 @@ void TorrentClient::setPaused(bool paused)
// connections to 0. Keep the list of peers, so we can quickly
// resume later.
d->setState(Paused);
- foreach (PeerWireClient *client, d->connections)
+ for (PeerWireClient *client : qAsConst(d->connections))
client->abort();
d->connections.clear();
TorrentServer::instance()->removeClient(this);
@@ -622,7 +622,7 @@ void TorrentClient::pieceVerified(int pieceIndex, bool ok)
}
// Update the peer list so we know who's still interesting.
- foreach (TorrentPeer *peer, d->peers) {
+ for (TorrentPeer *peer : qAsConst(d->peers)) {
if (!peer->interesting)
continue;
bool interesting = false;
@@ -642,7 +642,7 @@ void TorrentClient::pieceVerified(int pieceIndex, bool ok)
d->incompletePieces.clearBit(pieceIndex);
// Notify connected peers.
- foreach (PeerWireClient *client, d->connections) {
+ for (PeerWireClient *client : qAsConst(d->connections)) {
if (client->state() == QAbstractSocket::ConnectedState
&& !client->availablePieces().testBit(pieceIndex)) {
client->sendPieceNotification(pieceIndex);
@@ -720,9 +720,9 @@ QList<TorrentPeer *> TorrentClient::weighedFreePeers() const
qint64 now = QDateTime::currentSecsSinceEpoch();
QList<TorrentPeer *> freePeers;
QMap<QString, int> connectionsPerPeer;
- foreach (TorrentPeer *peer, d->peers) {
+ for (TorrentPeer *peer : d->peers) {
bool busy = false;
- foreach (PeerWireClient *client, d->connections) {
+ for (PeerWireClient *client : d->connections) {
if (client->state() == PeerWireClient::ConnectedState
&& client->peerAddress() == peer->address
&& client->peerPort() == peer->port) {
@@ -742,7 +742,7 @@ QList<TorrentPeer *> TorrentClient::weighedFreePeers() const
// Assign points based on connection speed and pieces available.
QList<QPair<int, TorrentPeer *> > points;
- foreach (TorrentPeer *peer, freePeers) {
+ for (TorrentPeer *peer : qAsConst(freePeers)) {
int tmp = 0;
if (peer->interesting) {
tmp += peer->numCompletedPieces;
@@ -765,7 +765,7 @@ QList<TorrentPeer *> TorrentClient::weighedFreePeers() const
QMultiMap<int, TorrentPeer *> pointMap;
int lowestScore = 0;
int lastIndex = 0;
- foreach (PointPair point, points) {
+ for (const PointPair &point : qAsConst(points)) {
if (point.first > lowestScore) {
lowestScore = point.first;
++lastIndex;
@@ -816,7 +816,7 @@ void TorrentClient::setupOutgoingConnection()
PeerWireClient *client = qobject_cast<PeerWireClient *>(sender());
// Update connection statistics.
- foreach (TorrentPeer *peer, d->peers) {
+ for (TorrentPeer *peer : qAsConst(d->peers)) {
if (peer->port == client->peerPort() && peer->address == client->peerAddress()) {
peer->connectTime = peer->lastVisited - peer->connectStart;
break;
@@ -1085,7 +1085,7 @@ void TorrentClient::scheduleUploads()
// no use in unchoking them.
QList<PeerWireClient *> allClients = d->connections;
QMultiMap<int, PeerWireClient *> transferSpeeds;
- foreach (PeerWireClient *client, allClients) {
+ for (PeerWireClient *client : qAsConst(allClients)) {
if (client->state() == QAbstractSocket::ConnectedState
&& client->availablePieces().count(true) != d->pieceCount) {
if (d->state == Seeding) {
@@ -1143,7 +1143,7 @@ void TorrentClient::scheduleDownloads()
// Check what each client is doing, and assign payloads to those
// who are either idle or done.
- foreach (PeerWireClient *client, d->connections)
+ for (PeerWireClient *client : qAsConst(d->connections))
schedulePieceForClient(client);
}
@@ -1222,7 +1222,7 @@ void TorrentClient::schedulePieceForClient(PeerWireClient *client)
incompletePiecesAvailableToClient &= client->availablePieces();
// Remove all pieces that this client has already requested.
- foreach (int i, currentPieces)
+ for (int i : qAsConst(currentPieces))
incompletePiecesAvailableToClient.clearBit(i);
// Only continue if more pieces can be scheduled. If no pieces
@@ -1258,7 +1258,7 @@ void TorrentClient::schedulePieceForClient(PeerWireClient *client)
memset(occurrences, 0, d->pieceCount * sizeof(int));
// Count how many of each piece are available.
- foreach (PeerWireClient *peer, d->connections) {
+ for (PeerWireClient *peer : qAsConst(d->connections)) {
QBitArray peerPieces = peer->availablePieces();
int peerPiecesSize = peerPieces.size();
for (int i = 0; i < peerPiecesSize; ++i) {
@@ -1356,7 +1356,7 @@ void TorrentClient::requestMore(PeerWireClient *client)
// Starting with the first piece that we're waiting for, request
// blocks until the quota is filled up.
- foreach (TorrentPiece *piece, piecesInProgress) {
+ for (TorrentPiece *piece : qAsConst(piecesInProgress)) {
numBlocksInProgress += requestBlocks(client, piece, maxInProgress - numBlocksInProgress);
if (numBlocksInProgress == maxInProgress)
break;
@@ -1450,8 +1450,8 @@ void TorrentClient::peerUnchoked()
void TorrentClient::addToPeerList(const QList<TorrentPeer> &peerList)
{
// Add peers we don't already know of to our list of peers.
- QList<QHostAddress> addresses = QNetworkInterface::allAddresses();
- foreach (TorrentPeer peer, peerList) {
+ const QList<QHostAddress> addresses = QNetworkInterface::allAddresses();
+ for (const TorrentPeer &peer : peerList) {
if (addresses.contains(peer.address)
&& peer.port == TorrentServer::instance()->serverPort()) {
// Skip our own server.
@@ -1459,7 +1459,7 @@ void TorrentClient::addToPeerList(const QList<TorrentPeer> &peerList)
}
bool known = false;
- foreach (TorrentPeer *knownPeer, d->peers) {
+ for (const TorrentPeer *knownPeer : qAsConst(d->peers)) {
if (knownPeer->port == peer.port
&& knownPeer->address == peer.address) {
known = true;
@@ -1486,8 +1486,8 @@ void TorrentClient::addToPeerList(const QList<TorrentPeer> &peerList)
if (d->peers.size() > maxPeers) {
// Find what peers are currently connected & active
QSet<TorrentPeer *> activePeers;
- foreach (TorrentPeer *peer, d->peers) {
- foreach (PeerWireClient *client, d->connections) {
+ for (TorrentPeer *peer : qAsConst(d->peers)) {
+ for (const PeerWireClient *client : qAsConst(d->connections)) {
if (client->peer() == peer && (client->downloadSpeed() + client->uploadSpeed()) > 1024)
activePeers << peer;
}
diff --git a/examples/network/torrent/torrentserver.cpp b/examples/network/torrent/torrentserver.cpp
index da98529fe0..c68f33249c 100644
--- a/examples/network/torrent/torrentserver.cpp
+++ b/examples/network/torrent/torrentserver.cpp
@@ -102,7 +102,7 @@ void TorrentServer::removeClient()
void TorrentServer::processInfoHash(const QByteArray &infoHash)
{
PeerWireClient *peer = qobject_cast<PeerWireClient *>(sender());
- foreach (TorrentClient *client, clients) {
+ for (TorrentClient *client : qAsConst(clients)) {
if (client->state() >= TorrentClient::Searching && client->infoHash() == infoHash) {
peer->disconnect(peer, 0, this, 0);
client->setupIncomingConnection(peer);
diff --git a/examples/sql/querymodel/customsqlmodel.cpp b/examples/sql/querymodel/customsqlmodel.cpp
index 21bedee727..7be0a65882 100644
--- a/examples/sql/querymodel/customsqlmodel.cpp
+++ b/examples/sql/querymodel/customsqlmodel.cpp
@@ -67,7 +67,7 @@ QVariant CustomSqlModel::data(const QModelIndex &index, int role) const
else if (index.column() == 2)
return value.toString().toUpper();
}
- if (role == Qt::TextColorRole && index.column() == 1)
+ if (role == Qt::ForegroundRole && index.column() == 1)
return QVariant::fromValue(QColor(Qt::blue));
return value;
}
diff --git a/examples/widgets/animation/animatedtiles/main.cpp b/examples/widgets/animation/animatedtiles/main.cpp
index 8edd64e482..553b620e41 100644
--- a/examples/widgets/animation/animatedtiles/main.cpp
+++ b/examples/widgets/animation/animatedtiles/main.cpp
@@ -69,7 +69,7 @@ class Button : public QGraphicsWidget
{
Q_OBJECT
public:
- Button(const QPixmap &pixmap, QGraphicsItem *parent = 0)
+ Button(const QPixmap &pixmap, QGraphicsItem *parent = nullptr)
: QGraphicsWidget(parent), _pix(pixmap)
{
setAcceptHoverEvents(true);
diff --git a/examples/widgets/animation/easing/window.cpp b/examples/widgets/animation/easing/window.cpp
index 8c03e0534d..aa12147388 100644
--- a/examples/widgets/animation/easing/window.cpp
+++ b/examples/widgets/animation/easing/window.cpp
@@ -66,11 +66,16 @@ Window::Window(QWidget *parent)
m_ui.amplitudeSpinBox->setValue(dummy.amplitude());
m_ui.overshootSpinBox->setValue(dummy.overshoot());
- connect(m_ui.easingCurvePicker, SIGNAL(currentRowChanged(int)), this, SLOT(curveChanged(int)));
- connect(buttonGroup, SIGNAL(buttonClicked(int)), this, SLOT(pathChanged(int)));
- connect(m_ui.periodSpinBox, SIGNAL(valueChanged(double)), this, SLOT(periodChanged(double)));
- connect(m_ui.amplitudeSpinBox, SIGNAL(valueChanged(double)), this, SLOT(amplitudeChanged(double)));
- connect(m_ui.overshootSpinBox, SIGNAL(valueChanged(double)), this, SLOT(overshootChanged(double)));
+ connect(m_ui.easingCurvePicker, &QListWidget::currentRowChanged,
+ this, &Window::curveChanged);
+ connect(buttonGroup, QOverload<int>::of(&QButtonGroup::buttonClicked),
+ this, &Window::pathChanged);
+ connect(m_ui.periodSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
+ this, &Window::periodChanged);
+ connect(m_ui.amplitudeSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
+ this, &Window::amplitudeChanged);
+ connect(m_ui.overshootSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
+ this, &Window::overshootChanged);
createCurveIcons();
QPixmap pix(QLatin1String(":/images/qt-logo.png"));
diff --git a/examples/widgets/animation/easing/window.h b/examples/widgets/animation/easing/window.h
index 2b7b2a5bf3..541377a981 100644
--- a/examples/widgets/animation/easing/window.h
+++ b/examples/widgets/animation/easing/window.h
@@ -66,7 +66,7 @@ public:
class Window : public QWidget {
Q_OBJECT
public:
- Window(QWidget *parent = 0);
+ Window(QWidget *parent = nullptr);
private slots:
void curveChanged(int row);
void pathChanged(int index);
diff --git a/examples/widgets/animation/moveblocks/main.cpp b/examples/widgets/animation/moveblocks/main.cpp
index 6d17696108..d03b57cd5e 100644
--- a/examples/widgets/animation/moveblocks/main.cpp
+++ b/examples/widgets/animation/moveblocks/main.cpp
@@ -169,7 +169,8 @@ class GraphicsView : public QGraphicsView
{
Q_OBJECT
public:
- GraphicsView(QGraphicsScene *scene, QWidget *parent = NULL) : QGraphicsView(scene, parent)
+ GraphicsView(QGraphicsScene *scene, QWidget *parent = nullptr)
+ : QGraphicsView(scene, parent)
{
}
@@ -214,7 +215,7 @@ int main(int argc, char **argv)
QTimer timer;
timer.setInterval(1250);
timer.setSingleShot(true);
- QObject::connect(group, SIGNAL(entered()), &timer, SLOT(start()));
+ QObject::connect(group, &QState::entered, &timer, QOverload<>::of(&QTimer::start));
//![2]
//![3]
@@ -302,7 +303,7 @@ int main(int argc, char **argv)
//![7]
StateSwitcher *stateSwitcher = new StateSwitcher(&machine);
stateSwitcher->setObjectName("stateSwitcher");
- group->addTransition(&timer, SIGNAL(timeout()), stateSwitcher);
+ group->addTransition(&timer, &QTimer::timeout, stateSwitcher);
stateSwitcher->addState(state1, &animationGroup);
stateSwitcher->addState(state2, &animationGroup);
//![7]
diff --git a/examples/widgets/animation/states/main.cpp b/examples/widgets/animation/states/main.cpp
index 14d193c301..0f61b7457a 100644
--- a/examples/widgets/animation/states/main.cpp
+++ b/examples/widgets/animation/states/main.cpp
@@ -214,7 +214,7 @@ int main(int argc, char *argv[])
state3->assignProperty(p5, "opacity", qreal(1));
state3->assignProperty(p6, "opacity", qreal(1));
- QAbstractTransition *t1 = state1->addTransition(button, SIGNAL(clicked()), state2);
+ QAbstractTransition *t1 = state1->addTransition(button, &QAbstractButton::clicked, state2);
QSequentialAnimationGroup *animation1SubGroup = new QSequentialAnimationGroup;
animation1SubGroup->addPause(250);
animation1SubGroup->addAnimation(new QPropertyAnimation(box, "geometry"));
@@ -239,7 +239,7 @@ int main(int argc, char *argv[])
t1->addAnimation(new QPropertyAnimation(p5, "opacity"));
t1->addAnimation(new QPropertyAnimation(p6, "opacity"));
- QAbstractTransition *t2 = state2->addTransition(button, SIGNAL(clicked()), state3);
+ QAbstractTransition *t2 = state2->addTransition(button, &QAbstractButton::clicked, state3);
t2->addAnimation(new QPropertyAnimation(box, "geometry"));
t2->addAnimation(new QPropertyAnimation(widget, "geometry"));
t2->addAnimation(new QPropertyAnimation(p1, "pos"));
@@ -261,7 +261,7 @@ int main(int argc, char *argv[])
t2->addAnimation(new QPropertyAnimation(p5, "opacity"));
t2->addAnimation(new QPropertyAnimation(p6, "opacity"));
- QAbstractTransition *t3 = state3->addTransition(button, SIGNAL(clicked()), state1);
+ QAbstractTransition *t3 = state3->addTransition(button, &QAbstractButton::clicked, state1);
t3->addAnimation(new QPropertyAnimation(box, "geometry"));
t3->addAnimation(new QPropertyAnimation(widget, "geometry"));
t3->addAnimation(new QPropertyAnimation(p1, "pos"));
diff --git a/examples/widgets/animation/stickman/animation.cpp b/examples/widgets/animation/stickman/animation.cpp
index 94a92749bc..5c2d1682af 100644
--- a/examples/widgets/animation/stickman/animation.cpp
+++ b/examples/widgets/animation/stickman/animation.cpp
@@ -159,18 +159,16 @@ void Animation::save(QIODevice *device) const
QDataStream stream(device);
stream << m_name;
stream << m_frames.size();
- foreach (Frame *frame, m_frames) {
+ for (const Frame *frame : qAsConst(m_frames)) {
stream << frame->nodeCount();
- for (int i=0; i<frame->nodeCount(); ++i)
+ for (int i = 0; i < frame->nodeCount(); ++i)
stream << frame->nodePos(i);
}
}
void Animation::load(QIODevice *device)
{
- if (!m_frames.isEmpty())
- qDeleteAll(m_frames);
-
+ qDeleteAll(m_frames);
m_frames.clear();
QDataStream stream(device);
diff --git a/examples/widgets/animation/stickman/graphicsview.cpp b/examples/widgets/animation/stickman/graphicsview.cpp
index 9cb57fcd9e..7058e15345 100644
--- a/examples/widgets/animation/stickman/graphicsview.cpp
+++ b/examples/widgets/animation/stickman/graphicsview.cpp
@@ -55,7 +55,9 @@
#include <QtWidgets/QGraphicsScene>
#include <QtWidgets/QGraphicsView>
-GraphicsView::GraphicsView(QWidget *parent) : QGraphicsView(parent), m_editor(0) {}
+GraphicsView::GraphicsView(QWidget *parent)
+ : QGraphicsView(parent), m_editor(nullptr)
+{}
void GraphicsView::keyPressEvent(QKeyEvent *e)
{
diff --git a/examples/widgets/animation/stickman/graphicsview.h b/examples/widgets/animation/stickman/graphicsview.h
index 56396bb780..361fee219d 100644
--- a/examples/widgets/animation/stickman/graphicsview.h
+++ b/examples/widgets/animation/stickman/graphicsview.h
@@ -58,7 +58,7 @@ class GraphicsView: public QGraphicsView
{
Q_OBJECT
public:
- GraphicsView(QWidget *parent = 0);
+ GraphicsView(QWidget *parent = nullptr);
protected:
void resizeEvent(QResizeEvent *event) override;
diff --git a/examples/widgets/animation/stickman/lifecycle.cpp b/examples/widgets/animation/stickman/lifecycle.cpp
index dbe9a299b4..046e3f4cd1 100644
--- a/examples/widgets/animation/stickman/lifecycle.cpp
+++ b/examples/widgets/animation/stickman/lifecycle.cpp
@@ -61,11 +61,11 @@ class KeyPressTransition: public QSignalTransition
{
public:
KeyPressTransition(GraphicsView *receiver, Qt::Key key)
- : QSignalTransition(receiver, SIGNAL(keyPressed(int))), m_key(key)
+ : QSignalTransition(receiver, &GraphicsView::keyPressed), m_key(key)
{
}
KeyPressTransition(GraphicsView *receiver, Qt::Key key, QAbstractState *target)
- : QSignalTransition(receiver, SIGNAL(keyPressed(int))), m_key(key)
+ : QSignalTransition(receiver, &GraphicsView::keyPressed), m_key(key)
{
setTargetState(target);
}
@@ -132,8 +132,10 @@ LifeCycle::LifeCycle(StickMan *stickMan, GraphicsView *keyReceiver)
QTimer *timer = new QTimer(lightningBlink);
timer->setSingleShot(true);
timer->setInterval(100);
- QObject::connect(lightningBlink, SIGNAL(entered()), timer, SLOT(start()));
- QObject::connect(lightningBlink, SIGNAL(exited()), timer, SLOT(stop()));
+ QObject::connect(lightningBlink, &QAbstractState::entered,
+ timer, QOverload<>::of(&QTimer::start));
+ QObject::connect(lightningBlink, &QAbstractState::exited,
+ timer, &QTimer::stop);
//! [5]
m_dead = new QState(m_machine);
@@ -151,7 +153,7 @@ LifeCycle::LifeCycle(StickMan *stickMan, GraphicsView *keyReceiver)
// Lightning strikes at random
m_alive->addTransition(new LightningStrikesTransition(lightningBlink));
//! [0]
- lightningBlink->addTransition(timer, SIGNAL(timeout()), m_dead);
+ lightningBlink->addTransition(timer, &QTimer::timeout, m_dead);
//! [0]
m_machine->setInitialState(m_alive);
@@ -173,9 +175,8 @@ void LifeCycle::addActivity(const QString &fileName, Qt::Key key, QObject *sende
QState *state = makeState(m_alive, fileName);
m_alive->addTransition(new KeyPressTransition(m_keyReceiver, key, state));
- if((sender != NULL) || (signal != NULL)) {
+ if (sender || signal)
m_alive->addTransition(sender, signal, state);
- }
}
QState *LifeCycle::makeState(QState *parentState, const QString &animationFileName)
@@ -190,7 +191,7 @@ QState *LifeCycle::makeState(QState *parentState, const QString &animationFileNa
}
const int frameCount = animation.totalFrames();
- QState *previousState = 0;
+ QState *previousState = nullptr;
for (int i=0; i<frameCount; ++i) {
animation.setCurrentFrame(i);
@@ -202,18 +203,18 @@ QState *LifeCycle::makeState(QState *parentState, const QString &animationFileNa
//! [1]
frameState->setObjectName(QString::fromLatin1("frame %0").arg(i));
- if (previousState == 0)
+ if (previousState == nullptr)
topLevel->setInitialState(frameState);
else
//! [2]
- previousState->addTransition(previousState, SIGNAL(propertiesAssigned()), frameState);
+ previousState->addTransition(previousState, &QState::propertiesAssigned, frameState);
//! [2]
previousState = frameState;
}
// Loop
- previousState->addTransition(previousState, SIGNAL(propertiesAssigned()), topLevel->initialState());
+ previousState->addTransition(previousState, &QState::propertiesAssigned, topLevel->initialState());
return topLevel;
diff --git a/examples/widgets/animation/stickman/stickman.cpp b/examples/widgets/animation/stickman/stickman.cpp
index b7a2d87ada..5725f64eec 100644
--- a/examples/widgets/animation/stickman/stickman.cpp
+++ b/examples/widgets/animation/stickman/stickman.cpp
@@ -126,7 +126,7 @@ StickMan::StickMan()
// Set up start position of limbs
for (int i=0; i<NodeCount; ++i) {
m_nodes[i] = new Node(QPointF(Coords[i * 2], Coords[i * 2 + 1]), this);
- connect(m_nodes[i], SIGNAL(positionChanged()), this, SLOT(childPositionChanged()));
+ connect(m_nodes[i], &Node::positionChanged, this, &StickMan::childPositionChanged);
}
for (int i=0; i<BoneCount; ++i) {
@@ -176,8 +176,7 @@ Node *StickMan::node(int idx) const
{
if (idx >= 0 && idx < NodeCount)
return m_nodes[idx];
- else
- return 0;
+ return nullptr;
}
void StickMan::timerEvent(QTimerEvent *)
diff --git a/examples/widgets/animation/sub-attaq/animationmanager.cpp b/examples/widgets/animation/sub-attaq/animationmanager.cpp
index b6e399967f..a611641613 100644
--- a/examples/widgets/animation/sub-attaq/animationmanager.cpp
+++ b/examples/widgets/animation/sub-attaq/animationmanager.cpp
@@ -56,7 +56,7 @@
#include <QtCore/QDebug>
// the universe's only animation manager
-AnimationManager *AnimationManager::instance = 0;
+AnimationManager *AnimationManager::instance = nullptr;
AnimationManager::AnimationManager()
{
@@ -71,7 +71,7 @@ AnimationManager *AnimationManager::self()
void AnimationManager::registerAnimation(QAbstractAnimation *anim)
{
- QObject::connect(anim, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterAnimation_helper(QObject*)));
+ QObject::connect(anim, &QObject::destroyed, this, &AnimationManager::unregisterAnimation_helper);
animations.append(anim);
}
@@ -82,7 +82,7 @@ void AnimationManager::unregisterAnimation_helper(QObject *obj)
void AnimationManager::unregisterAnimation(QAbstractAnimation *anim)
{
- QObject::disconnect(anim, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterAnimation_helper(QObject*)));
+ QObject::disconnect(anim, &QObject::destroyed, this, &AnimationManager::unregisterAnimation_helper);
animations.removeAll(anim);
}
@@ -93,14 +93,14 @@ void AnimationManager::unregisterAllAnimations()
void AnimationManager::pauseAll()
{
- foreach (QAbstractAnimation* animation, animations) {
+ for (QAbstractAnimation *animation : qAsConst(animations)) {
if (animation->state() == QAbstractAnimation::Running)
animation->pause();
}
}
void AnimationManager::resumeAll()
{
- foreach (QAbstractAnimation* animation, animations) {
+ for (QAbstractAnimation *animation : qAsConst(animations)) {
if (animation->state() == QAbstractAnimation::Paused)
animation->resume();
}
diff --git a/examples/widgets/animation/sub-attaq/boat.cpp b/examples/widgets/animation/sub-attaq/boat.cpp
index 145d373e99..9037d54878 100644
--- a/examples/widgets/animation/sub-attaq/boat.cpp
+++ b/examples/widgets/animation/sub-attaq/boat.cpp
@@ -92,8 +92,9 @@ static QAbstractAnimation *setupDestroyAnimation(Boat *boat)
-Boat::Boat() : PixmapItem(QString("boat"), GraphicsScene::Big),
- speed(0), bombsAlreadyLaunched(0), direction(Boat::None), movementAnimation(0)
+Boat::Boat()
+ : PixmapItem(QString("boat"), GraphicsScene::Big),
+ speed(0), bombsAlreadyLaunched(0), direction(Boat::None)
{
setZValue(4);
setFlags(QGraphicsItem::ItemIsFocusable);
@@ -148,8 +149,8 @@ Boat::Boat() : PixmapItem(QString("boat"), GraphicsScene::Big),
stopState->addTransition(leftMoveStop);
//The animation is finished, it means we reached the border of the screen, the boat is stopped so we move to the stop state
- moveStateLeft->addTransition(movementAnimation, SIGNAL(finished()), stopState);
- moveStateRight->addTransition(movementAnimation, SIGNAL(finished()), stopState);
+ moveStateLeft->addTransition(movementAnimation, &QAbstractAnimation::finished, stopState);
+ moveStateRight->addTransition(movementAnimation, &QAbstractAnimation::finished, stopState);
//We set up the keys for dropping bombs
KeyLaunchTransition *upFireLeft = new KeyLaunchTransition(this, QEvent::KeyPress, Qt::Key_Up);
@@ -187,13 +188,13 @@ Boat::Boat() : PixmapItem(QString("boat"), GraphicsScene::Big),
destroyedState->setAnimation(destroyAnimation);
//Play a nice animation when the boat is destroyed
- moving->addTransition(this, SIGNAL(boatDestroyed()), destroyedState);
+ moving->addTransition(this, &Boat::boatDestroyed, destroyedState);
//Transition to final state when the destroyed animation is finished
- destroyedState->addTransition(destroyedState, SIGNAL(animationFinished()), final);
+ destroyedState->addTransition(destroyedState, &QAnimationState::animationFinished, final);
//The machine has finished to be executed, then the boat is dead
- connect(machine,SIGNAL(finished()), this, SIGNAL(boatExecutionFinished()));
+ connect(machine,&QState::finished, this, &Boat::boatExecutionFinished);
}
diff --git a/examples/widgets/animation/sub-attaq/boat_p.h b/examples/widgets/animation/sub-attaq/boat_p.h
index de11ff9555..8ebfeb27f5 100644
--- a/examples/widgets/animation/sub-attaq/boat_p.h
+++ b/examples/widgets/animation/sub-attaq/boat_p.h
@@ -146,7 +146,8 @@ private:
class MoveStateRight : public QState
{
public:
- explicit MoveStateRight(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ explicit MoveStateRight(Boat *boat, QState *parent = nullptr)
+ : QState(parent), boat(boat)
{
}
protected:
@@ -163,7 +164,8 @@ private:
class MoveStateLeft : public QState
{
public:
- explicit MoveStateLeft(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ explicit MoveStateLeft(Boat *boat, QState *parent = nullptr)
+ : QState(parent), boat(boat)
{
}
protected:
@@ -180,7 +182,8 @@ private:
class StopState : public QState
{
public:
- explicit StopState(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ explicit StopState(Boat *boat, QState *parent = nullptr)
+ : QState(parent), boat(boat)
{
}
protected:
@@ -198,13 +201,14 @@ private:
class LaunchStateRight : public QState
{
public:
- explicit LaunchStateRight(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ explicit LaunchStateRight(Boat *boat, QState *parent = nullptr)
+ : QState(parent), boat(boat)
{
}
protected:
void onEntry(QEvent *) override
{
- Bomb *b = new Bomb();
+ Bomb *b = new Bomb;
b->setPos(boat->x()+boat->size().width(),boat->y());
GraphicsScene *scene = static_cast<GraphicsScene *>(boat->scene());
scene->addItem(b);
@@ -219,13 +223,14 @@ private:
class LaunchStateLeft : public QState
{
public:
- explicit LaunchStateLeft(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ explicit LaunchStateLeft(Boat *boat, QState *parent = nullptr)
+ : QState(parent), boat(boat)
{
}
protected:
void onEntry(QEvent *) override
{
- Bomb *b = new Bomb();
+ Bomb *b = new Bomb;
b->setPos(boat->x() - b->size().width(), boat->y());
GraphicsScene *scene = static_cast<GraphicsScene *>(boat->scene());
scene->addItem(b);
diff --git a/examples/widgets/animation/sub-attaq/bomb.cpp b/examples/widgets/animation/sub-attaq/bomb.cpp
index a80d2d46c5..2b865137dd 100644
--- a/examples/widgets/animation/sub-attaq/bomb.cpp
+++ b/examples/widgets/animation/sub-attaq/bomb.cpp
@@ -83,8 +83,8 @@ void Bomb::launch(Bomb::Direction direction)
anim->setEndValue(QPointF(x() + delta*2,scene()->height()));
anim->setDuration(y()/2*60);
launchAnimation->addAnimation(anim);
- connect(anim,SIGNAL(valueChanged(QVariant)),this,SLOT(onAnimationLaunchValueChanged(QVariant)));
- connect(this, SIGNAL(bombExploded()), launchAnimation, SLOT(stop()));
+ connect(anim,&QVariantAnimation::valueChanged,this,&Bomb::onAnimationLaunchValueChanged);
+ connect(this, &Bomb::bombExploded, launchAnimation, &QAbstractAnimation::stop);
//We setup the state machine of the bomb
QStateMachine *machine = new QStateMachine(this);
@@ -98,13 +98,13 @@ void Bomb::launch(Bomb::Direction direction)
machine->setInitialState(launched);
//### Add a nice animation when the bomb is destroyed
- launched->addTransition(this, SIGNAL(bombExploded()),final);
+ launched->addTransition(this, &Bomb::bombExploded,final);
//If the animation is finished, then we move to the final state
- launched->addTransition(launched, SIGNAL(animationFinished()), final);
+ launched->addTransition(launched, &QAnimationState::animationFinished, final);
//The machine has finished to be executed, then the boat is dead
- connect(machine,SIGNAL(finished()),this, SIGNAL(bombExecutionFinished()));
+ connect(machine,&QState::finished,this, &Bomb::bombExecutionFinished);
machine->start();
@@ -112,7 +112,9 @@ void Bomb::launch(Bomb::Direction direction)
void Bomb::onAnimationLaunchValueChanged(const QVariant &)
{
- foreach (QGraphicsItem * item , collidingItems(Qt::IntersectsItemBoundingRect)) {
+ const QList<QGraphicsItem *> colItems =
+ collidingItems(Qt::IntersectsItemBoundingRect);
+ for (QGraphicsItem *item : colItems) {
if (item->type() == SubMarine::Type) {
SubMarine *s = static_cast<SubMarine *>(item);
destroy();
diff --git a/examples/widgets/animation/sub-attaq/graphicsscene.cpp b/examples/widgets/animation/sub-attaq/graphicsscene.cpp
index e0913f99f6..8f0dfc1357 100644
--- a/examples/widgets/animation/sub-attaq/graphicsscene.cpp
+++ b/examples/widgets/animation/sub-attaq/graphicsscene.cpp
@@ -191,15 +191,15 @@ void GraphicsScene::setupScene(QAction *newAction, QAction *quitAction)
lettersFadingState->setAnimation(lettersGroupFading);
//if new game then we fade out the welcome screen and start playing
- lettersMovingState->addTransition(newAction, SIGNAL(triggered()), lettersFadingState);
- lettersFadingState->addTransition(lettersFadingState, SIGNAL(animationFinished()), gameState);
+ lettersMovingState->addTransition(newAction, &QAction::triggered, lettersFadingState);
+ lettersFadingState->addTransition(lettersFadingState, &QAnimationState::animationFinished, gameState);
//New Game is triggered then player start playing
- gameState->addTransition(newAction, SIGNAL(triggered()), gameState);
+ gameState->addTransition(newAction, &QAction::triggered, gameState);
//Wanna quit, then connect to CTRL+Q
- gameState->addTransition(quitAction, SIGNAL(triggered()), final);
- lettersMovingState->addTransition(quitAction, SIGNAL(triggered()), final);
+ gameState->addTransition(quitAction, &QAction::triggered, final);
+ lettersMovingState->addTransition(quitAction, &QAction::triggered, final);
//Welcome screen is the initial state
machine->setInitialState(lettersMovingState);
@@ -207,27 +207,27 @@ void GraphicsScene::setupScene(QAction *newAction, QAction *quitAction)
machine->start();
//We reach the final state, then we quit
- connect(machine, SIGNAL(finished()), qApp, SLOT(quit()));
+ connect(machine, &QStateMachine::finished, qApp, &QApplication::quit);
}
void GraphicsScene::addItem(Bomb *bomb)
{
bombs.insert(bomb);
- connect(bomb,SIGNAL(bombExecutionFinished()),this, SLOT(onBombExecutionFinished()));
+ connect(bomb,&Bomb::bombExecutionFinished,this, &GraphicsScene::onBombExecutionFinished);
QGraphicsScene::addItem(bomb);
}
void GraphicsScene::addItem(Torpedo *torpedo)
{
torpedos.insert(torpedo);
- connect(torpedo,SIGNAL(torpedoExecutionFinished()),this, SLOT(onTorpedoExecutionFinished()));
+ connect(torpedo,&Torpedo::torpedoExecutionFinished,this, &GraphicsScene::onTorpedoExecutionFinished);
QGraphicsScene::addItem(torpedo);
}
void GraphicsScene::addItem(SubMarine *submarine)
{
submarines.insert(submarine);
- connect(submarine,SIGNAL(subMarineExecutionFinished()),this, SLOT(onSubMarineExecutionFinished()));
+ connect(submarine,&SubMarine::subMarineExecutionFinished,this, &GraphicsScene::onSubMarineExecutionFinished);
QGraphicsScene::addItem(submarine);
}
@@ -265,17 +265,17 @@ void GraphicsScene::onSubMarineExecutionFinished()
void GraphicsScene::clearScene()
{
- foreach (SubMarine *sub, submarines) {
+ for (SubMarine *sub : qAsConst(submarines)) {
sub->destroy();
sub->deleteLater();
}
- foreach (Torpedo *torpedo, torpedos) {
+ for (Torpedo *torpedo : qAsConst(torpedos)) {
torpedo->destroy();
torpedo->deleteLater();
}
- foreach (Bomb *bomb, bombs) {
+ for (Bomb *bomb : qAsConst(bombs)) {
bomb->destroy();
bomb->deleteLater();
}
diff --git a/examples/widgets/animation/sub-attaq/mainwindow.cpp b/examples/widgets/animation/sub-attaq/mainwindow.cpp
index b08a7d9f98..a4bb15b383 100644
--- a/examples/widgets/animation/sub-attaq/mainwindow.cpp
+++ b/examples/widgets/animation/sub-attaq/mainwindow.cpp
@@ -63,7 +63,8 @@
# include <QtOpenGL/QtOpenGL>
#endif
-MainWindow::MainWindow() : QMainWindow(0)
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
{
QMenu *file = menuBar()->addMenu(tr("&File"));
diff --git a/examples/widgets/animation/sub-attaq/mainwindow.h b/examples/widgets/animation/sub-attaq/mainwindow.h
index 8d3cc85cd1..c4fb9d324d 100644
--- a/examples/widgets/animation/sub-attaq/mainwindow.h
+++ b/examples/widgets/animation/sub-attaq/mainwindow.h
@@ -62,7 +62,7 @@ class MainWindow : public QMainWindow
{
Q_OBJECT
public:
- MainWindow();
+ MainWindow(QWidget *parent = nullptr);
private:
GraphicsScene *scene;
diff --git a/examples/widgets/animation/sub-attaq/pixmapitem.cpp b/examples/widgets/animation/sub-attaq/pixmapitem.cpp
index 0723cdfb5d..9475d5c3f8 100644
--- a/examples/widgets/animation/sub-attaq/pixmapitem.cpp
+++ b/examples/widgets/animation/sub-attaq/pixmapitem.cpp
@@ -54,7 +54,8 @@
//Qt
#include <QPainter>
-PixmapItem::PixmapItem(const QString &fileName,GraphicsScene::Mode mode, QGraphicsItem * parent) : QGraphicsObject(parent)
+PixmapItem::PixmapItem(const QString &fileName,GraphicsScene::Mode mode, QGraphicsItem * parent)
+ : QGraphicsObject(parent)
{
if (mode == GraphicsScene::Big)
pix = QPixmap(QStringLiteral(":/big/") + fileName);
diff --git a/examples/widgets/animation/sub-attaq/pixmapitem.h b/examples/widgets/animation/sub-attaq/pixmapitem.h
index de8ed67a38..ec5c01857f 100644
--- a/examples/widgets/animation/sub-attaq/pixmapitem.h
+++ b/examples/widgets/animation/sub-attaq/pixmapitem.h
@@ -60,7 +60,7 @@
class PixmapItem : public QGraphicsObject
{
public:
- PixmapItem(const QString &fileName, GraphicsScene::Mode mode, QGraphicsItem * parent = 0);
+ PixmapItem(const QString &fileName, GraphicsScene::Mode mode, QGraphicsItem *parent = nullptr);
PixmapItem(const QString &fileName, QGraphicsScene *scene);
QSizeF size() const;
QRectF boundingRect() const override;
diff --git a/examples/widgets/animation/sub-attaq/qanimationstate.cpp b/examples/widgets/animation/sub-attaq/qanimationstate.cpp
index ae24af6da3..ef88df8abe 100644
--- a/examples/widgets/animation/sub-attaq/qanimationstate.cpp
+++ b/examples/widgets/animation/sub-attaq/qanimationstate.cpp
@@ -73,7 +73,7 @@ QAnimationState *s = new QAnimationState(machine->rootState());
QPropertyAnimation *animation = new QPropertyAnimation(obj, "pos");
s->setAnimation(animation);
QState *s2 = new QState(machine->rootState());
-s->addTransition(s, SIGNAL(animationFinished()), s2);
+s->addTransition(s, &QAnimationState::animationFinished, s2);
machine.start();
\endcode
@@ -84,7 +84,7 @@ machine.start();
Constructs a new state with the given \a parent state.
*/
QAnimationState::QAnimationState(QState *parent)
- : QState(parent), m_animation(0)
+ : QState(parent), m_animation(nullptr)
{
}
@@ -107,13 +107,13 @@ void QAnimationState::setAnimation(QAbstractAnimation *animation)
//Disconnect from the previous animation if exist
if(m_animation)
- disconnect(m_animation, SIGNAL(finished()), this, SIGNAL(animationFinished()));
+ disconnect(m_animation, &QAbstractAnimation::finished, this, &QAnimationState::animationFinished);
m_animation = animation;
if (m_animation) {
//connect the new animation
- connect(m_animation, SIGNAL(finished()), this, SIGNAL(animationFinished()));
+ connect(m_animation, &QAbstractAnimation::finished, this, &QAnimationState::animationFinished);
}
}
diff --git a/examples/widgets/animation/sub-attaq/states.cpp b/examples/widgets/animation/sub-attaq/states.cpp
index e19704db7b..cda10ccdaf 100644
--- a/examples/widgets/animation/sub-attaq/states.cpp
+++ b/examples/widgets/animation/sub-attaq/states.cpp
@@ -67,11 +67,8 @@
#include <QtCore/QRandomGenerator>
PlayState::PlayState(GraphicsScene *scene, QState *parent)
- : QState(parent),
- scene(scene),
- machine(0),
- currentLevel(0),
- score(0)
+ : QState(parent), scene(scene), machine(nullptr),
+ currentLevel(0), score(0)
{
}
@@ -124,7 +121,7 @@ void PlayState::onEntry(QEvent *)
WinState *winState = new WinState(scene, this, machine);
//The boat has been destroyed then the game is finished
- levelState->addTransition(scene->boat, SIGNAL(boatExecutionFinished()),lostState);
+ levelState->addTransition(scene->boat, &Boat::boatExecutionFinished,lostState);
//This transition check if we won or not
WinTransition *winTransition = new WinTransition(scene, this, winState);
@@ -157,7 +154,7 @@ void PlayState::onEntry(QEvent *)
winState->addTransition(spaceTransition);
//We lost we should reach the final state
- lostState->addTransition(lostState, SIGNAL(finished()), final);
+ lostState->addTransition(lostState, &QState::finished, final);
machine->start();
}
@@ -291,8 +288,8 @@ UpdateScoreState::UpdateScoreState(QState *parent) : QState(parent)
/** Win transition */
UpdateScoreTransition::UpdateScoreTransition(GraphicsScene *scene, PlayState *game, QAbstractState *target)
- : QSignalTransition(scene,SIGNAL(subMarineDestroyed(int))),
- game(game), scene(scene)
+ : QSignalTransition(scene, &GraphicsScene::subMarineDestroyed),
+ game(game), scene(scene)
{
setTargetState(target);
}
@@ -309,8 +306,8 @@ bool UpdateScoreTransition::eventTest(QEvent *event)
/** Win transition */
WinTransition::WinTransition(GraphicsScene *scene, PlayState *game, QAbstractState *target)
- : QSignalTransition(scene,SIGNAL(allSubMarineDestroyed(int))),
- game(game), scene(scene)
+ : QSignalTransition(scene, &GraphicsScene::allSubMarineDestroyed),
+ game(game), scene(scene)
{
setTargetState(target);
}
diff --git a/examples/widgets/animation/sub-attaq/submarine.cpp b/examples/widgets/animation/sub-attaq/submarine.cpp
index a451185ce0..775e75ceed 100644
--- a/examples/widgets/animation/sub-attaq/submarine.cpp
+++ b/examples/widgets/animation/sub-attaq/submarine.cpp
@@ -106,7 +106,7 @@ SubMarine::SubMarine(int type, const QString &name, int points) : PixmapItem(QSt
//This is the initial state of the moving root state
moving->setInitialState(movement);
- movement->addTransition(this, SIGNAL(subMarineStateChanged()), moving);
+ movement->addTransition(this, &SubMarine::subMarineStateChanged, moving);
//This is the initial state of the machine
machine->setInitialState(moving);
@@ -115,23 +115,23 @@ SubMarine::SubMarine(int type, const QString &name, int points) : PixmapItem(QSt
QFinalState *final = new QFinalState(machine);
//If the moving animation is finished we move to the return state
- movement->addTransition(movement, SIGNAL(animationFinished()), rotation);
+ movement->addTransition(movement, &QAnimationState::animationFinished, rotation);
//If the return animation is finished we move to the moving state
- rotation->addTransition(rotation, SIGNAL(animationFinished()), movement);
+ rotation->addTransition(rotation, &QAnimationState::animationFinished, movement);
//This state play the destroyed animation
QAnimationState *destroyedState = new QAnimationState(machine);
destroyedState->setAnimation(setupDestroyAnimation(this));
//Play a nice animation when the submarine is destroyed
- moving->addTransition(this, SIGNAL(subMarineDestroyed()), destroyedState);
+ moving->addTransition(this, &SubMarine::subMarineDestroyed, destroyedState);
//Transition to final state when the destroyed animation is finished
- destroyedState->addTransition(destroyedState, SIGNAL(animationFinished()), final);
+ destroyedState->addTransition(destroyedState, &QAnimationState::animationFinished, final);
//The machine has finished to be executed, then the submarine is dead
- connect(machine,SIGNAL(finished()),this, SIGNAL(subMarineExecutionFinished()));
+ connect(machine,&QState::finished,this, &SubMarine::subMarineExecutionFinished);
machine->start();
}
diff --git a/examples/widgets/animation/sub-attaq/submarine_p.h b/examples/widgets/animation/sub-attaq/submarine_p.h
index 698b4b494f..1c2cb7ceac 100644
--- a/examples/widgets/animation/sub-attaq/submarine_p.h
+++ b/examples/widgets/animation/sub-attaq/submarine_p.h
@@ -80,7 +80,8 @@ public:
explicit MovementState(SubMarine *submarine, QState *parent = 0) : QAnimationState(parent)
{
movementAnimation = new QPropertyAnimation(submarine, "pos");
- connect(movementAnimation,SIGNAL(valueChanged(const QVariant &)),this,SLOT(onAnimationMovementValueChanged(const QVariant &)));
+ connect(movementAnimation, &QPropertyAnimation::valueChanged,
+ this, &MovementState::onAnimationMovementValueChanged);
setAnimation(movementAnimation);
AnimationManager::self()->registerAnimation(movementAnimation);
this->submarine = submarine;
diff --git a/examples/widgets/animation/sub-attaq/torpedo.cpp b/examples/widgets/animation/sub-attaq/torpedo.cpp
index 2e9d970326..92a3833452 100644
--- a/examples/widgets/animation/sub-attaq/torpedo.cpp
+++ b/examples/widgets/animation/sub-attaq/torpedo.cpp
@@ -73,8 +73,8 @@ void Torpedo::launch()
launchAnimation->setEndValue(QPointF(x(),qobject_cast<GraphicsScene *>(scene())->sealLevel() - 15));
launchAnimation->setEasingCurve(QEasingCurve::InQuad);
launchAnimation->setDuration(y()/currentSpeed*10);
- connect(launchAnimation,SIGNAL(valueChanged(QVariant)),this,SLOT(onAnimationLaunchValueChanged(QVariant)));
- connect(this,SIGNAL(torpedoExploded()), launchAnimation, SLOT(stop()));
+ connect(launchAnimation,&QVariantAnimation::valueChanged,this,&Torpedo::onAnimationLaunchValueChanged);
+ connect(this,&Torpedo::torpedoExploded, launchAnimation, &QAbstractAnimation::stop);
//We setup the state machine of the torpedo
QStateMachine *machine = new QStateMachine(this);
@@ -89,13 +89,13 @@ void Torpedo::launch()
machine->setInitialState(launched);
//### Add a nice animation when the torpedo is destroyed
- launched->addTransition(this, SIGNAL(torpedoExploded()),final);
+ launched->addTransition(this, &Torpedo::torpedoExploded,final);
//If the animation is finished, then we move to the final state
- launched->addTransition(launched, SIGNAL(animationFinished()), final);
+ launched->addTransition(launched, &QAnimationState::animationFinished, final);
//The machine has finished to be executed, then the boat is dead
- connect(machine,SIGNAL(finished()),this, SIGNAL(torpedoExecutionFinished()));
+ connect(machine,&QState::finished,this, &Torpedo::torpedoExecutionFinished);
machine->start();
}
@@ -111,7 +111,9 @@ void Torpedo::setCurrentSpeed(int speed)
void Torpedo::onAnimationLaunchValueChanged(const QVariant &)
{
- foreach (QGraphicsItem *item , collidingItems(Qt::IntersectsItemBoundingRect)) {
+ const QList<QGraphicsItem *> colItems =
+ collidingItems(Qt::IntersectsItemBoundingRect);
+ for (QGraphicsItem *item : colItems) {
if (Boat *b = qgraphicsitem_cast<Boat*>(item))
b->destroy();
}
diff --git a/examples/widgets/desktop/screenshot/screenshot.cpp b/examples/widgets/desktop/screenshot/screenshot.cpp
index 80f26ae282..715e6c780e 100644
--- a/examples/widgets/desktop/screenshot/screenshot.cpp
+++ b/examples/widgets/desktop/screenshot/screenshot.cpp
@@ -139,7 +139,8 @@ void Screenshot::saveScreenshot()
fileDialog.setFileMode(QFileDialog::AnyFile);
fileDialog.setDirectory(initialPath);
QStringList mimeTypes;
- foreach (const QByteArray &bf, QImageWriter::supportedMimeTypes())
+ const QList<QByteArray> baMimeTypes = QImageWriter::supportedMimeTypes();
+ for (const QByteArray &bf : baMimeTypes)
mimeTypes.append(QLatin1String(bf));
fileDialog.setMimeTypeFilters(mimeTypes);
fileDialog.selectMimeTypeFilter("image/" + format);
diff --git a/examples/widgets/desktop/systray/main.cpp b/examples/widgets/desktop/systray/main.cpp
index 49b0e10412..4e3e628767 100644
--- a/examples/widgets/desktop/systray/main.cpp
+++ b/examples/widgets/desktop/systray/main.cpp
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
if (!QSystemTrayIcon::isSystemTrayAvailable()) {
- QMessageBox::critical(0, QObject::tr("Systray"),
+ QMessageBox::critical(nullptr, QObject::tr("Systray"),
QObject::tr("I couldn't detect any system tray "
"on this system."));
return 1;
diff --git a/examples/widgets/desktop/systray/window.cpp b/examples/widgets/desktop/systray/window.cpp
index 05944c92a7..31fcd84821 100644
--- a/examples/widgets/desktop/systray/window.cpp
+++ b/examples/widgets/desktop/systray/window.cpp
@@ -176,7 +176,7 @@ void Window::showMessage()
//! [6]
void Window::messageClicked()
{
- QMessageBox::information(0, tr("Systray"),
+ QMessageBox::information(nullptr, tr("Systray"),
tr("Sorry, I already gave what help I could.\n"
"Maybe you should try asking a human?"));
}
diff --git a/examples/widgets/dialogs/classwizard/classwizard.cpp b/examples/widgets/dialogs/classwizard/classwizard.cpp
index 3eab2f5fb2..81adf85b0d 100644
--- a/examples/widgets/dialogs/classwizard/classwizard.cpp
+++ b/examples/widgets/dialogs/classwizard/classwizard.cpp
@@ -139,7 +139,7 @@ void ClassWizard::accept()
QFile headerFile(outputDir + '/' + header);
if (!headerFile.open(QFile::WriteOnly | QFile::Text)) {
- QMessageBox::warning(0, QObject::tr("Simple Wizard"),
+ QMessageBox::warning(nullptr, QObject::tr("Simple Wizard"),
QObject::tr("Cannot write file %1:\n%2")
.arg(headerFile.fileName())
.arg(headerFile.errorString()));
@@ -195,7 +195,7 @@ void ClassWizard::accept()
QFile implementationFile(outputDir + '/' + implementation);
if (!implementationFile.open(QFile::WriteOnly | QFile::Text)) {
- QMessageBox::warning(0, QObject::tr("Simple Wizard"),
+ QMessageBox::warning(nullptr, QObject::tr("Simple Wizard"),
QObject::tr("Cannot write file %1:\n%2")
.arg(implementationFile.fileName())
.arg(implementationFile.errorString()));
diff --git a/examples/widgets/dialogs/findfiles/window.cpp b/examples/widgets/dialogs/findfiles/window.cpp
index 1b16cdcd35..e1f7ccdcc4 100644
--- a/examples/widgets/dialogs/findfiles/window.cpp
+++ b/examples/widgets/dialogs/findfiles/window.cpp
@@ -182,7 +182,7 @@ QStringList Window::findFiles(const QStringList &files, const QString &text)
for (int i = 0; i < files.size(); ++i) {
progressDialog.setValue(i);
- progressDialog.setLabelText(tr("Searching file number %1 of %n...", 0, files.size()).arg(i));
+ progressDialog.setLabelText(tr("Searching file number %1 of %n...", nullptr, files.size()).arg(i));
QCoreApplication::processEvents();
//! [6]
@@ -237,7 +237,7 @@ void Window::showFiles(const QStringList &paths)
filesTable->setItem(row, 0, fileNameItem);
filesTable->setItem(row, 1, sizeItem);
}
- filesFoundLabel->setText(tr("%n file(s) found (Double click on a file to open it)", 0, paths.size()));
+ filesFoundLabel->setText(tr("%n file(s) found (Double click on a file to open it)", nullptr, paths.size()));
filesFoundLabel->setWordWrap(true);
}
//! [8]
diff --git a/examples/widgets/dialogs/standarddialogs/dialog.cpp b/examples/widgets/dialogs/standarddialogs/dialog.cpp
index 74a4131b38..1830b21e8f 100644
--- a/examples/widgets/dialogs/standarddialogs/dialog.cpp
+++ b/examples/widgets/dialogs/standarddialogs/dialog.cpp
@@ -65,7 +65,7 @@
class DialogOptionsWidget : public QGroupBox
{
public:
- explicit DialogOptionsWidget(QWidget *parent = 0);
+ explicit DialogOptionsWidget(QWidget *parent = nullptr);
void addCheckBox(const QString &text, int value);
void addSpacer();
@@ -99,9 +99,10 @@ void DialogOptionsWidget::addSpacer()
int DialogOptionsWidget::value() const
{
int result = 0;
- foreach (const CheckBoxEntry &checkboxEntry, checkBoxEntries)
+ for (const CheckBoxEntry &checkboxEntry : qAsConst(checkBoxEntries)) {
if (checkboxEntry.first->isChecked())
result |= checkboxEntry.second;
+ }
return result;
}
@@ -492,7 +493,7 @@ void Dialog::questionMessage()
void Dialog::warningMessage()
{
QMessageBox msgBox(QMessageBox::Warning, tr("QMessageBox::warning()"),
- MESSAGE, 0, this);
+ MESSAGE, nullptr, this);
msgBox.setDetailedText(MESSAGE_DETAILS);
msgBox.addButton(tr("Save &Again"), QMessageBox::AcceptRole);
msgBox.addButton(tr("&Continue"), QMessageBox::RejectRole);
diff --git a/examples/widgets/doc/dropsite.qdoc b/examples/widgets/doc/dropsite.qdoc
index 32bcfe8916..af8766a308 100644
--- a/examples/widgets/doc/dropsite.qdoc
+++ b/examples/widgets/doc/dropsite.qdoc
@@ -202,13 +202,7 @@
\snippet draganddrop/dropsite/dropsitewindow.cpp updateFormatsTable() part1
Once we are sure that \c mimeData is valid, we iterate through its
- supported formats using the \l{The foreach Keyword}{foreach keyword}.
- This keyword has the following format:
-
- \include code/doc_src_examples_dropsite.qdoc 0
-
- In our example, \c format is the \a variable and the \a container is a
- QStringList, obtained from \c mimeData->formats().
+ supported formats.
\note The \l{QMimeData::formats()}{formats()} function returns a
QStringList object, containing all the formats supported by the
diff --git a/examples/widgets/doc/src/addressbook.qdoc b/examples/widgets/doc/src/addressbook.qdoc
index 1fa0bfa9d4..e5e7fe5c2c 100644
--- a/examples/widgets/doc/src/addressbook.qdoc
+++ b/examples/widgets/doc/src/addressbook.qdoc
@@ -90,8 +90,8 @@
\snippet itemviews/addressbook/tablemodel.h 0
Two constructors are used, a default constructor which uses
- \c TableModel's own \c {QList<Contact>} and one that takes
- \c {QList<Contact>} as an argument, for convenience.
+ \c TableModel's own \c {QVector<Contact>} and one that takes
+ \c {QVector<Contact>} as an argument, for convenience.
\section1 TableModel Class Implementation
@@ -108,9 +108,6 @@
\c columnCount()'s value is always 2 because we only need space
for the \b Name and \b Address columns.
- \note The \c Q_UNUSED() macro prevents the compiler from
- generating warnings regarding unused parameters.
-
\snippet itemviews/addressbook/tablemodel.cpp 1
The \c data() function returns either a \b Name or
@@ -164,7 +161,7 @@
them here so that we can reuse the model in other programs.
The last function in \c {TableModel}, \c getContacts() returns the
- QList<Contact> object that holds all the contacts in the address
+ QVector<Contact> object that holds all the contacts in the address
book. We use this function later to obtain the list of contacts to
check for existing entries, write the contacts to a file and read
them back. Further explanation is given with \c AddressWidget.
@@ -233,7 +230,7 @@
\image addressbook-signals.png Signals and Slots Connections
- We provide 2 \c addEntry() functions: 1 which is intended to be
+ We provide two \c addEntry() functions: One which is intended to be
used to accept user input, and the other which performs the actual
task of adding new entries to the address book. We divide the
responsibility of adding entries into two parts to allow
diff --git a/examples/widgets/doc/src/diagramscene.qdoc b/examples/widgets/doc/src/diagramscene.qdoc
index ca4876f2e8..860dcc5cb9 100644
--- a/examples/widgets/doc/src/diagramscene.qdoc
+++ b/examples/widgets/doc/src/diagramscene.qdoc
@@ -589,7 +589,7 @@
\snippet graphicsview/diagramscene/diagramscene.cpp 14
The scene has single selection, i.e., only one item can be
- selected at any given time. The foreach will then loop one time
+ selected at any given time. The for loop will then loop one time
with the selected item or none if no item is selected. \c
isItemChange() is used to check whether a selected item exists
and also is of the specified diagram \a type.
diff --git a/examples/widgets/doc/src/fetchmore.qdoc b/examples/widgets/doc/src/fetchmore.qdoc
index df0cf3b8ec..a27efaf071 100644
--- a/examples/widgets/doc/src/fetchmore.qdoc
+++ b/examples/widgets/doc/src/fetchmore.qdoc
@@ -29,7 +29,7 @@
\example itemviews/fetchmore
\title Fetch More Example
\ingroup examples-itemviews
- \brief The Fetch More example shows how two add items to an item view
+ \brief The Fetch More example shows how to add items to an item view
model on demand.
\image fetchmore-example.png
diff --git a/examples/widgets/doc/src/orderform.qdoc b/examples/widgets/doc/src/orderform.qdoc
index de59fc402d..5c63081a77 100644
--- a/examples/widgets/doc/src/orderform.qdoc
+++ b/examples/widgets/doc/src/orderform.qdoc
@@ -191,7 +191,7 @@
We then set the \c{cursor}'s position back to its last position in
\c topFrame and fill in the customer's name (provided by the constructor)
- and address - using a \c foreach loop to traverse the QString, \c address.
+ and address - using a range-based for loop to traverse the QString, \c address.
\snippet richtext/orderform/mainwindow.cpp 4
diff --git a/examples/widgets/doc/src/plugandpaint.qdoc b/examples/widgets/doc/src/plugandpaint.qdoc
index d3044860ab..b37176da0e 100644
--- a/examples/widgets/doc/src/plugandpaint.qdoc
+++ b/examples/widgets/doc/src/plugandpaint.qdoc
@@ -171,8 +171,8 @@
\snippet tools/plugandpaint/app/mainwindow.cpp 8
We use QDir::entryList() to get a list of all files in that
- directory. Then we iterate over the result using \l foreach and
- try to load the plugin using QPluginLoader.
+ directory. Then we iterate over the result using a range-based for loop
+ and try to load the plugin using QPluginLoader.
The QObject provided by the plugin is accessible through
QPluginLoader::instance(). If the dynamic library isn't a Qt
diff --git a/examples/widgets/doc/src/simpletreemodel.qdoc b/examples/widgets/doc/src/simpletreemodel.qdoc
index a50197b04d..f5fe93897c 100644
--- a/examples/widgets/doc/src/simpletreemodel.qdoc
+++ b/examples/widgets/doc/src/simpletreemodel.qdoc
@@ -170,9 +170,8 @@
\snippet itemviews/simpletreemodel/treeitem.cpp 5
- Column data is returned by the \c data() function, taking advantage of
- QList's ability to provide sensible default values if the column number
- is out of range:
+ Column data is returned by the \c data() function. The bounds are checked
+ before accessing the container with the data:
\snippet itemviews/simpletreemodel/treeitem.cpp 6
diff --git a/examples/widgets/doc/src/stardelegate.qdoc b/examples/widgets/doc/src/stardelegate.qdoc
index 44d17662ca..0b91723a51 100644
--- a/examples/widgets/doc/src/stardelegate.qdoc
+++ b/examples/widgets/doc/src/stardelegate.qdoc
@@ -42,11 +42,11 @@
editing takes place.
Delegates are subclasses of QAbstractItemDelegate. Qt provides
- QItemDelegate, which inherits QAbstractItemDelegate and handles
+ QStyledItemDelegate, which inherits QAbstractItemDelegate and handles
the most common data types (notably \c int and QString). If we
need to support custom data types, or want to customize the
rendering or the editing for existing data types, we can subclass
- QAbstractItemDelegate or QItemDelegate. See \l{Delegate Classes}
+ QAbstractItemDelegate or QStyledItemDelegate. See \l{Delegate Classes}
for more information about delegates, and \l{Model/View
Programming} if you need a high-level introduction to Qt's
model/view architecture (including delegates).
@@ -62,9 +62,9 @@
expressed as stars, such as "2 out of 5 stars" or "5 out of
6 stars".
- \li \c StarDelegate inherits QItemDelegate and provides support
+ \li \c StarDelegate inherits QStyledItemDelegate and provides support
for \c StarRating (in addition to the data types already
- handled by QItemDelegate).
+ handled by QStyledItemDelegate).
\li \c StarEditor inherits QWidget and is used by \c StarDelegate
to let the user edit a star rating using the mouse.
@@ -80,12 +80,12 @@
\snippet itemviews/stardelegate/stardelegate.h 0
All public functions are reimplemented virtual functions from
- QItemDelegate to provide custom rendering and editing.
+ QStyledItemDelegate to provide custom rendering and editing.
\section1 StarDelegate Class Implementation
The \l{QAbstractItemDelegate::}{paint()} function is
- reimplemented from QItemDelegate and is called whenever the view
+ reimplemented from QStyledItemDelegate and is called whenever the view
needs to repaint an item:
\snippet itemviews/stardelegate/stardelegate.cpp 0
@@ -93,7 +93,7 @@
The function is invoked once for each item, represented by a
QModelIndex object from the model. If the data stored in the item
is a \c StarRating, we paint it ourselves; otherwise, we let
- QItemDelegate paint it for us. This ensures that the \c
+ QStyledItemDelegate paint it for us. This ensures that the \c
StarDelegate can handle the most common data types.
If the item is a \c StarRating, we draw the background if the
diff --git a/examples/widgets/draganddrop/dropsite/dropsitewindow.cpp b/examples/widgets/draganddrop/dropsite/dropsitewindow.cpp
index 28a42ee614..2dae83bb22 100644
--- a/examples/widgets/draganddrop/dropsite/dropsitewindow.cpp
+++ b/examples/widgets/draganddrop/dropsite/dropsitewindow.cpp
@@ -113,7 +113,8 @@ void DropSiteWindow::updateFormatsTable(const QMimeData *mimeData)
//! [updateFormatsTable() part1]
//! [updateFormatsTable() part2]
- for (const QString &format : mimeData->formats()) {
+ const QStringList formats = mimeData->formats();
+ for (const QString &format : formats) {
QTableWidgetItem *formatItem = new QTableWidgetItem(format);
formatItem->setFlags(Qt::ItemIsEnabled);
formatItem->setTextAlignment(Qt::AlignTop | Qt::AlignLeft);
diff --git a/examples/widgets/effects/fademessage/fademessage.cpp b/examples/widgets/effects/fademessage/fademessage.cpp
index 9943147bb7..4c3a70bb4f 100644
--- a/examples/widgets/effects/fademessage/fademessage.cpp
+++ b/examples/widgets/effects/fademessage/fademessage.cpp
@@ -131,7 +131,7 @@ void FadeMessage::setupScene()
QPushButton *press = new QPushButton;
press->setText(tr("Press me"));
- connect(press, SIGNAL(clicked()), SLOT(togglePopup()));
+ connect(press, &QAbstractButton::clicked, this, &FadeMessage::togglePopup);
m_scene.addWidget(press);
press->move(300, 500);
diff --git a/examples/widgets/gestures/imagegestures/imagewidget.cpp b/examples/widgets/gestures/imagegestures/imagewidget.cpp
index ca9affca70..0a6b963559 100644
--- a/examples/widgets/gestures/imagegestures/imagewidget.cpp
+++ b/examples/widgets/gestures/imagegestures/imagewidget.cpp
@@ -72,7 +72,7 @@ ImageWidget::ImageWidget(QWidget *parent)
void ImageWidget::grabGestures(const QList<Qt::GestureType> &gestures)
{
//! [enable gestures]
- foreach (Qt::GestureType gesture, gestures)
+ for (Qt::GestureType gesture : gestures)
grabGesture(gesture);
//! [enable gestures]
}
diff --git a/examples/widgets/graphicsview/boxes/glbuffers.cpp b/examples/widgets/graphicsview/boxes/glbuffers.cpp
index 851cd17796..b52b26c4ef 100644
--- a/examples/widgets/graphicsview/boxes/glbuffers.cpp
+++ b/examples/widgets/graphicsview/boxes/glbuffers.cpp
@@ -218,14 +218,14 @@ GLTextureCube::GLTextureCube(int size)
glBindTexture(GL_TEXTURE_CUBE_MAP, 0);
}
-GLTextureCube::GLTextureCube(const QStringList& fileNames, int size)
+GLTextureCube::GLTextureCube(const QStringList &fileNames, int size)
{
// TODO: Add error handling.
glBindTexture(GL_TEXTURE_CUBE_MAP, m_texture);
int index = 0;
- foreach (QString file, fileNames) {
+ for (const QString &file : fileNames) {
QImage image(file);
if (image.isNull()) {
m_failed = true;
diff --git a/examples/widgets/graphicsview/boxes/glbuffers.h b/examples/widgets/graphicsview/boxes/glbuffers.h
index 03c24a91d3..e2363d561e 100644
--- a/examples/widgets/graphicsview/boxes/glbuffers.h
+++ b/examples/widgets/graphicsview/boxes/glbuffers.h
@@ -129,7 +129,7 @@ class GLTextureCube : public GLTexture
{
public:
GLTextureCube(int size);
- explicit GLTextureCube(const QStringList& fileNames, int size = 0);
+ explicit GLTextureCube(const QStringList &fileNames, int size = 0);
void load(int size, int face, QRgb *data);
void bind() override;
void unbind() override;
diff --git a/examples/widgets/graphicsview/boxes/qtbox.cpp b/examples/widgets/graphicsview/boxes/qtbox.cpp
index 3a184dd0b6..68d5c251f4 100644
--- a/examples/widgets/graphicsview/boxes/qtbox.cpp
+++ b/examples/widgets/graphicsview/boxes/qtbox.cpp
@@ -127,10 +127,8 @@ void ItemBase::duplicateSelectedItems(QGraphicsScene *scene)
if (!scene)
return;
- QList<QGraphicsItem *> selected;
- selected = scene->selectedItems();
-
- foreach (QGraphicsItem *item, selected) {
+ const QList<QGraphicsItem *> selected = scene->selectedItems();
+ for (QGraphicsItem *item : selected) {
ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item);
if (itemBase)
scene->addItem(itemBase->createNew(itemBase->m_size, itemBase->pos().x() + itemBase->m_size, itemBase->pos().y()));
@@ -142,10 +140,8 @@ void ItemBase::deleteSelectedItems(QGraphicsScene *scene)
if (!scene)
return;
- QList<QGraphicsItem *> selected;
- selected = scene->selectedItems();
-
- foreach (QGraphicsItem *item, selected) {
+ const QList<QGraphicsItem *> selected = scene->selectedItems();
+ for (QGraphicsItem *item : selected) {
ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item);
if (itemBase)
delete itemBase;
@@ -157,10 +153,8 @@ void ItemBase::growSelectedItems(QGraphicsScene *scene)
if (!scene)
return;
- QList<QGraphicsItem *> selected;
- selected = scene->selectedItems();
-
- foreach (QGraphicsItem *item, selected) {
+ const QList<QGraphicsItem *> selected = scene->selectedItems();
+ for (QGraphicsItem *item : selected) {
ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item);
if (itemBase) {
itemBase->prepareGeometryChange();
@@ -176,10 +170,8 @@ void ItemBase::shrinkSelectedItems(QGraphicsScene *scene)
if (!scene)
return;
- QList<QGraphicsItem *> selected;
- selected = scene->selectedItems();
-
- foreach (QGraphicsItem *item, selected) {
+ const QList<QGraphicsItem *> selected = scene->selectedItems();
+ for (QGraphicsItem *item : selected) {
ItemBase *itemBase = qgraphicsitem_cast<ItemBase *>(item);
if (itemBase) {
itemBase->prepareGeometryChange();
diff --git a/examples/widgets/graphicsview/boxes/scene.cpp b/examples/widgets/graphicsview/boxes/scene.cpp
index 1637c1f781..7f62ac894b 100644
--- a/examples/widgets/graphicsview/boxes/scene.cpp
+++ b/examples/widgets/graphicsview/boxes/scene.cpp
@@ -111,7 +111,7 @@ ColorEdit::ColorEdit(QRgb initialColor, int id)
m_button->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
layout->addWidget(m_button);
- connect(m_lineEdit, SIGNAL(editingFinished()), this, SLOT(editDone()));
+ connect(m_lineEdit, &QLineEdit::editingFinished, this, &ColorEdit::editDone);
}
void ColorEdit::editDone()
@@ -166,7 +166,7 @@ FloatEdit::FloatEdit(float initialValue, int id)
m_lineEdit = new QLineEdit(QString::number(m_value));
layout->addWidget(m_lineEdit);
- connect(m_lineEdit, SIGNAL(editingFinished()), this, SLOT(editDone()));
+ connect(m_lineEdit, &QLineEdit::editingFinished, this, &FloatEdit::editDone);
}
void FloatEdit::editDone()
@@ -252,7 +252,7 @@ void TwoSidedGraphicsWidget::animateFlip()
.translate(-r.width() / 2, -r.height() / 2));
if ((m_current == 0 && m_angle > 0) || (m_current == 1 && m_angle < 180))
- QTimer::singleShot(25, this, SLOT(animateFlip()));
+ QTimer::singleShot(25, this, &TwoSidedGraphicsWidget::animateFlip);
}
QVariant GraphicsWidget::itemChange(GraphicsItemChange change, const QVariant &value)
@@ -307,19 +307,17 @@ RenderOptionsDialog::RenderOptionsDialog()
check->setCheckState(Qt::Unchecked);
// Dynamic cube maps are only enabled when multi-texturing and render to texture are available.
check->setEnabled(glActiveTexture && glGenFramebuffersEXT);
- connect(check, SIGNAL(stateChanged(int)), this, SIGNAL(dynamicCubemapToggled(int)));
+ connect(check, &QCheckBox::stateChanged, this, &RenderOptionsDialog::dynamicCubemapToggled);
layout->addWidget(check, 0, 0, 1, 2);
++row;
- QPalette palette;
-
// Load all .par files
// .par files have a simple syntax for specifying user adjustable uniform variables.
- QSet<QByteArray> uniforms;
- QList<QString> filter = QStringList("*.par");
- QList<QFileInfo> files = QDir(":/res/boxes/").entryInfoList(filter, QDir::Files | QDir::Readable);
+ const QList<QFileInfo> files = QDir(QStringLiteral(":/res/boxes/"))
+ .entryInfoList({ QStringLiteral("*.par") },
+ QDir::Files | QDir::Readable);
- foreach (QFileInfo fileInfo, files) {
+ for (const QFileInfo &fileInfo : files) {
QFile file(fileInfo.absoluteFilePath());
if (file.open(QIODevice::ReadOnly)) {
while (!file.atEnd()) {
@@ -356,7 +354,7 @@ RenderOptionsDialog::RenderOptionsDialog()
ColorEdit *colorEdit = new ColorEdit(it->toUInt(&ok, 16), m_parameterNames.size() - 1);
m_parameterEdits << colorEdit;
layout->addWidget(colorEdit);
- connect(colorEdit, SIGNAL(colorChanged(QRgb,int)), this, SLOT(setColorParameter(QRgb,int)));
+ connect(colorEdit, &ColorEdit::colorChanged, this, &RenderOptionsDialog::setColorParameter);
++row;
} else if (type == "float") {
layout->addWidget(new QLabel(m_parameterNames.back()));
@@ -364,7 +362,7 @@ RenderOptionsDialog::RenderOptionsDialog()
FloatEdit *floatEdit = new FloatEdit(it->toFloat(&ok), m_parameterNames.size() - 1);
m_parameterEdits << floatEdit;
layout->addWidget(floatEdit);
- connect(floatEdit, SIGNAL(valueChanged(float,int)), this, SLOT(setFloatParameter(float,int)));
+ connect(floatEdit, &FloatEdit::valueChanged, this, &RenderOptionsDialog::setFloatParameter);
++row;
}
}
@@ -375,13 +373,15 @@ RenderOptionsDialog::RenderOptionsDialog()
layout->addWidget(new QLabel(tr("Texture:")));
m_textureCombo = new QComboBox;
- connect(m_textureCombo, SIGNAL(currentIndexChanged(int)), this, SIGNAL(textureChanged(int)));
+ connect(m_textureCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ this, &RenderOptionsDialog::textureChanged);
layout->addWidget(m_textureCombo);
++row;
layout->addWidget(new QLabel(tr("Shader:")));
m_shaderCombo = new QComboBox;
- connect(m_shaderCombo, SIGNAL(currentIndexChanged(int)), this, SIGNAL(shaderChanged(int)));
+ connect(m_shaderCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ this, &RenderOptionsDialog::shaderChanged);
layout->addWidget(m_shaderCombo);
++row;
@@ -402,7 +402,7 @@ int RenderOptionsDialog::addShader(const QString &name)
void RenderOptionsDialog::emitParameterChanged()
{
- foreach (ParameterEdit *edit, m_parameterEdits)
+ for (ParameterEdit *edit : qAsConst(m_parameterEdits))
edit->emitChange();
}
@@ -439,15 +439,15 @@ ItemDialog::ItemDialog()
button = new QPushButton(tr("Add Qt box"));
layout->addWidget(button);
- connect(button, SIGNAL(clicked()), this, SLOT(triggerNewQtBox()));
+ connect(button, &QAbstractButton::clicked, this, &ItemDialog::triggerNewQtBox);
button = new QPushButton(tr("Add circle"));
layout->addWidget(button);
- connect(button, SIGNAL(clicked()), this, SLOT(triggerNewCircleItem()));
+ connect(button, &QAbstractButton::clicked, this, &ItemDialog::triggerNewCircleItem);
button = new QPushButton(tr("Add square"));
layout->addWidget(button);
- connect(button, SIGNAL(clicked()), this, SLOT(triggerNewSquareItem()));
+ connect(button, &QAbstractButton::clicked, this, &ItemDialog::triggerNewSquareItem);
layout->addStretch(1);
}
@@ -506,21 +506,21 @@ Scene::Scene(int width, int height, int maxTextureSize)
m_renderOptions->move(20, 120);
m_renderOptions->resize(m_renderOptions->sizeHint());
- connect(m_renderOptions, SIGNAL(dynamicCubemapToggled(int)), this, SLOT(toggleDynamicCubemap(int)));
- connect(m_renderOptions, SIGNAL(colorParameterChanged(QString,QRgb)), this, SLOT(setColorParameter(QString,QRgb)));
- connect(m_renderOptions, SIGNAL(floatParameterChanged(QString,float)), this, SLOT(setFloatParameter(QString,float)));
- connect(m_renderOptions, SIGNAL(textureChanged(int)), this, SLOT(setTexture(int)));
- connect(m_renderOptions, SIGNAL(shaderChanged(int)), this, SLOT(setShader(int)));
+ connect(m_renderOptions, &RenderOptionsDialog::dynamicCubemapToggled, this, &Scene::toggleDynamicCubemap);
+ connect(m_renderOptions, &RenderOptionsDialog::colorParameterChanged, this, &Scene::setColorParameter);
+ connect(m_renderOptions, &RenderOptionsDialog::floatParameterChanged, this, &Scene::setFloatParameter);
+ connect(m_renderOptions, &RenderOptionsDialog::textureChanged, this, &Scene::setTexture);
+ connect(m_renderOptions, &RenderOptionsDialog::shaderChanged, this, &Scene::setShader);
m_itemDialog = new ItemDialog;
- connect(m_itemDialog, SIGNAL(newItemTriggered(ItemDialog::ItemType)), this, SLOT(newItem(ItemDialog::ItemType)));
+ connect(m_itemDialog, &ItemDialog::newItemTriggered, this, &Scene::newItem);
TwoSidedGraphicsWidget *twoSided = new TwoSidedGraphicsWidget(this);
twoSided->setWidget(0, m_renderOptions);
twoSided->setWidget(1, m_itemDialog);
- connect(m_renderOptions, SIGNAL(doubleClicked()), twoSided, SLOT(flip()));
- connect(m_itemDialog, SIGNAL(doubleClicked()), twoSided, SLOT(flip()));
+ connect(m_renderOptions, &RenderOptionsDialog::doubleClicked, twoSided, &TwoSidedGraphicsWidget::flip);
+ connect(m_itemDialog, &ItemDialog::doubleClicked, twoSided, &TwoSidedGraphicsWidget::flip);
addItem(new QtBox(64, width - 64, height - 64));
addItem(new QtBox(64, width - 64, 64));
@@ -531,7 +531,7 @@ Scene::Scene(int width, int height, int maxTextureSize)
m_timer = new QTimer(this);
m_timer->setInterval(20);
- connect(m_timer, SIGNAL(timeout()), this, SLOT(update()));
+ connect(m_timer, &QTimer::timeout, this, [this](){ update(); });
m_timer->start();
m_time.start();
@@ -539,24 +539,15 @@ Scene::Scene(int width, int height, int maxTextureSize)
Scene::~Scene()
{
- if (m_box)
- delete m_box;
- foreach (GLTexture *texture, m_textures)
- if (texture) delete texture;
- if (m_mainCubemap)
- delete m_mainCubemap;
- foreach (QGLShaderProgram *program, m_programs)
- if (program) delete program;
- if (m_vertexShader)
- delete m_vertexShader;
- foreach (QGLShader *shader, m_fragmentShaders)
- if (shader) delete shader;
- foreach (GLRenderTargetCube *rt, m_cubemaps)
- if (rt) delete rt;
- if (m_environmentShader)
- delete m_environmentShader;
- if (m_environmentProgram)
- delete m_environmentProgram;
+ delete m_box;
+ qDeleteAll(m_textures);
+ delete m_mainCubemap;
+ qDeleteAll(m_programs);
+ delete m_vertexShader;
+ qDeleteAll(m_fragmentShaders);
+ qDeleteAll(m_cubemaps);
+ delete m_environmentShader;
+ delete m_environmentProgram;
}
void Scene::initGL()
@@ -601,15 +592,13 @@ void Scene::initGL()
m_mainCubemap = new GLRenderTargetCube(512);
- QStringList filter;
QList<QFileInfo> files;
// Load all .png files as textures
m_currentTexture = 0;
- filter = QStringList("*.png");
- files = QDir(":/res/boxes/").entryInfoList(filter, QDir::Files | QDir::Readable);
+ files = QDir(":/res/boxes/").entryInfoList({ QStringLiteral("*.png") }, QDir::Files | QDir::Readable);
- foreach (QFileInfo file, files) {
+ for (const QFileInfo &file : qAsConst(files)) {
GLTexture *texture = new GLTexture2D(file.absoluteFilePath(), qMin(256, m_maxTextureSize), qMin(256, m_maxTextureSize));
if (texture->failed()) {
delete texture;
@@ -624,9 +613,8 @@ void Scene::initGL()
// Load all .fsh files as fragment shaders
m_currentShader = 0;
- filter = QStringList("*.fsh");
- files = QDir(":/res/boxes/").entryInfoList(filter, QDir::Files | QDir::Readable);
- foreach (QFileInfo file, files) {
+ files = QDir(":/res/boxes/").entryInfoList({ QStringLiteral("*.fsh") }, QDir::Files | QDir::Readable);
+ for (const QFileInfo &file : qAsConst(files)) {
QGLShaderProgram *program = new QGLShaderProgram;
QGLShader* shader = new QGLShader(QGLShader::Fragment);
shader->compileSourceFile(file.absoluteFilePath());
@@ -662,7 +650,7 @@ void Scene::initGL()
m_renderOptions->emitParameterChanged();
}
-static void loadMatrix(const QMatrix4x4& m)
+static void loadMatrix(const QMatrix4x4 &m)
{
// static to prevent glLoadMatrixf to fail on certain drivers
static GLfloat mat[16];
@@ -1051,7 +1039,7 @@ void Scene::toggleDynamicCubemap(int state)
void Scene::setColorParameter(const QString &name, QRgb color)
{
// set the color in all programs
- foreach (QGLShaderProgram *program, m_programs) {
+ for (QGLShaderProgram *program : qAsConst(m_programs)) {
program->bind();
program->setUniformValue(program->uniformLocation(name), QColor(color));
program->release();
@@ -1061,7 +1049,7 @@ void Scene::setColorParameter(const QString &name, QRgb color)
void Scene::setFloatParameter(const QString &name, float value)
{
// set the color in all programs
- foreach (QGLShaderProgram *program, m_programs) {
+ for (QGLShaderProgram *program : qAsConst(m_programs)) {
program->bind();
program->setUniformValue(program->uniformLocation(name), value);
program->release();
diff --git a/examples/widgets/graphicsview/chip/view.cpp b/examples/widgets/graphicsview/chip/view.cpp
index 491f1a54cf..9676c13ff7 100644
--- a/examples/widgets/graphicsview/chip/view.cpp
+++ b/examples/widgets/graphicsview/chip/view.cpp
@@ -190,22 +190,22 @@ View::View(const QString &name, QWidget *parent)
topLayout->addWidget(resetButton, 2, 1);
setLayout(topLayout);
- connect(resetButton, SIGNAL(clicked()), this, SLOT(resetView()));
- connect(zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(setupMatrix()));
- connect(rotateSlider, SIGNAL(valueChanged(int)), this, SLOT(setupMatrix()));
- connect(graphicsView->verticalScrollBar(), SIGNAL(valueChanged(int)),
- this, SLOT(setResetButtonEnabled()));
- connect(graphicsView->horizontalScrollBar(), SIGNAL(valueChanged(int)),
- this, SLOT(setResetButtonEnabled()));
- connect(selectModeButton, SIGNAL(toggled(bool)), this, SLOT(togglePointerMode()));
- connect(dragModeButton, SIGNAL(toggled(bool)), this, SLOT(togglePointerMode()));
- connect(antialiasButton, SIGNAL(toggled(bool)), this, SLOT(toggleAntialiasing()));
- connect(openGlButton, SIGNAL(toggled(bool)), this, SLOT(toggleOpenGL()));
- connect(rotateLeftIcon, SIGNAL(clicked()), this, SLOT(rotateLeft()));
- connect(rotateRightIcon, SIGNAL(clicked()), this, SLOT(rotateRight()));
- connect(zoomInIcon, SIGNAL(clicked()), this, SLOT(zoomIn()));
- connect(zoomOutIcon, SIGNAL(clicked()), this, SLOT(zoomOut()));
- connect(printButton, SIGNAL(clicked()), this, SLOT(print()));
+ connect(resetButton, &QAbstractButton::clicked, this, &View::resetView);
+ connect(zoomSlider, &QAbstractSlider::valueChanged, this, &View::setupMatrix);
+ connect(rotateSlider, &QAbstractSlider::valueChanged, this, &View::setupMatrix);
+ connect(graphicsView->verticalScrollBar(), &QAbstractSlider::valueChanged,
+ this, &View::setResetButtonEnabled);
+ connect(graphicsView->horizontalScrollBar(), &QAbstractSlider::valueChanged,
+ this, &View::setResetButtonEnabled);
+ connect(selectModeButton, &QAbstractButton::toggled, this, &View::togglePointerMode);
+ connect(dragModeButton, &QAbstractButton::toggled, this, &View::togglePointerMode);
+ connect(antialiasButton, &QAbstractButton::toggled, this, &View::toggleAntialiasing);
+ connect(openGlButton, &QAbstractButton::toggled, this, &View::toggleOpenGL);
+ connect(rotateLeftIcon, &QAbstractButton::clicked, this, &View::rotateLeft);
+ connect(rotateRightIcon, &QAbstractButton::clicked, this, &View::rotateRight);
+ connect(zoomInIcon, &QAbstractButton::clicked, this, &View::zoomIn);
+ connect(zoomOutIcon, &QAbstractButton::clicked, this, &View::zoomOut);
+ connect(printButton, &QAbstractButton::clicked, this, &View::print);
setupMatrix();
}
diff --git a/examples/widgets/graphicsview/collidingmice/main.cpp b/examples/widgets/graphicsview/collidingmice/main.cpp
index 91aee70b86..dfb20815b9 100644
--- a/examples/widgets/graphicsview/collidingmice/main.cpp
+++ b/examples/widgets/graphicsview/collidingmice/main.cpp
@@ -92,7 +92,7 @@ int main(int argc, char **argv)
view.show();
QTimer timer;
- QObject::connect(&timer, SIGNAL(timeout()), &scene, SLOT(advance()));
+ QObject::connect(&timer, &QTimer::timeout, &scene, &QGraphicsScene::advance);
timer.start(1000 / 33);
return app.exec();
diff --git a/examples/widgets/graphicsview/collidingmice/mouse.cpp b/examples/widgets/graphicsview/collidingmice/mouse.cpp
index 14f887f6e3..a8fcc05d76 100644
--- a/examples/widgets/graphicsview/collidingmice/mouse.cpp
+++ b/examples/widgets/graphicsview/collidingmice/mouse.cpp
@@ -160,11 +160,12 @@ void Mouse::advance(int step)
// Try not to crash with any other mice
//! [7]
- QList<QGraphicsItem *> dangerMice = scene()->items(QPolygonF()
- << mapToScene(0, 0)
- << mapToScene(-30, -50)
- << mapToScene(30, -50));
- foreach (QGraphicsItem *item, dangerMice) {
+ const QList<QGraphicsItem *> dangerMice = scene()->items(QPolygonF()
+ << mapToScene(0, 0)
+ << mapToScene(-30, -50)
+ << mapToScene(30, -50));
+
+ for (const QGraphicsItem *item : dangerMice) {
if (item == this)
continue;
diff --git a/examples/widgets/graphicsview/diagramscene/diagramitem.cpp b/examples/widgets/graphicsview/diagramscene/diagramitem.cpp
index db6dabee56..3aa685635e 100644
--- a/examples/widgets/graphicsview/diagramscene/diagramitem.cpp
+++ b/examples/widgets/graphicsview/diagramscene/diagramitem.cpp
@@ -111,7 +111,7 @@ void DiagramItem::removeArrow(Arrow *arrow)
//! [2]
void DiagramItem::removeArrows()
{
- foreach (Arrow *arrow, arrows) {
+ for (Arrow *arrow : qAsConst(arrows)) {
arrow->startItem()->removeArrow(arrow);
arrow->endItem()->removeArrow(arrow);
scene()->removeItem(arrow);
@@ -154,9 +154,8 @@ void DiagramItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
QVariant DiagramItem::itemChange(GraphicsItemChange change, const QVariant &value)
{
if (change == QGraphicsItem::ItemPositionChange) {
- foreach (Arrow *arrow, arrows) {
+ for (Arrow *arrow : qAsConst(arrows))
arrow->updatePosition();
- }
}
return value;
diff --git a/examples/widgets/graphicsview/diagramscene/diagramscene.cpp b/examples/widgets/graphicsview/diagramscene/diagramscene.cpp
index bbbc512b55..40272834c3 100644
--- a/examples/widgets/graphicsview/diagramscene/diagramscene.cpp
+++ b/examples/widgets/graphicsview/diagramscene/diagramscene.cpp
@@ -169,10 +169,10 @@ void DiagramScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
textItem->setFont(myFont);
textItem->setTextInteractionFlags(Qt::TextEditorInteraction);
textItem->setZValue(1000.0);
- connect(textItem, SIGNAL(lostFocus(DiagramTextItem*)),
- this, SLOT(editorLostFocus(DiagramTextItem*)));
- connect(textItem, SIGNAL(selectedChange(QGraphicsItem*)),
- this, SIGNAL(itemSelected(QGraphicsItem*)));
+ connect(textItem, &DiagramTextItem::lostFocus,
+ this, &DiagramScene::editorLostFocus);
+ connect(textItem, &DiagramTextItem::selectedChange,
+ this, &DiagramScene::itemSelected);
addItem(textItem);
textItem->setDefaultTextColor(myTextColor);
textItem->setPos(mouseEvent->scenePos());
@@ -234,12 +234,10 @@ void DiagramScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
//! [13]
//! [14]
-bool DiagramScene::isItemChange(int type)
+bool DiagramScene::isItemChange(int type) const
{
- foreach (QGraphicsItem *item, selectedItems()) {
- if (item->type() == type)
- return true;
- }
- return false;
+ const QList<QGraphicsItem *> items = selectedItems();
+ const auto cb = [type](const QGraphicsItem *item) { return item->type() == type; };
+ return std::find_if(items.begin(), items.end(), cb) != items.end();
}
//! [14]
diff --git a/examples/widgets/graphicsview/diagramscene/diagramscene.h b/examples/widgets/graphicsview/diagramscene/diagramscene.h
index 95f7f3c621..15063d58b7 100644
--- a/examples/widgets/graphicsview/diagramscene/diagramscene.h
+++ b/examples/widgets/graphicsview/diagramscene/diagramscene.h
@@ -100,7 +100,7 @@ protected:
void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) override;
private:
- bool isItemChange(int type);
+ bool isItemChange(int type) const;
DiagramItem::DiagramType myItemType;
QMenu *myItemMenu;
diff --git a/examples/widgets/graphicsview/diagramscene/mainwindow.cpp b/examples/widgets/graphicsview/diagramscene/mainwindow.cpp
index 36353674ea..07f92f61c1 100644
--- a/examples/widgets/graphicsview/diagramscene/mainwindow.cpp
+++ b/examples/widgets/graphicsview/diagramscene/mainwindow.cpp
@@ -67,12 +67,12 @@ MainWindow::MainWindow()
scene = new DiagramScene(itemMenu, this);
scene->setSceneRect(QRectF(0, 0, 5000, 5000));
- connect(scene, SIGNAL(itemInserted(DiagramItem*)),
- this, SLOT(itemInserted(DiagramItem*)));
- connect(scene, SIGNAL(textInserted(QGraphicsTextItem*)),
- this, SLOT(textInserted(QGraphicsTextItem*)));
- connect(scene, SIGNAL(itemSelected(QGraphicsItem*)),
- this, SLOT(itemSelected(QGraphicsItem*)));
+ connect(scene, &DiagramScene::itemInserted,
+ this, &MainWindow::itemInserted);
+ connect(scene, &DiagramScene::textInserted,
+ this, &MainWindow::textInserted);
+ connect(scene, &DiagramScene::itemSelected,
+ this, &MainWindow::itemSelected);
createToolbars();
QHBoxLayout *layout = new QHBoxLayout;
@@ -92,8 +92,8 @@ MainWindow::MainWindow()
//! [1]
void MainWindow::backgroundButtonGroupClicked(QAbstractButton *button)
{
- QList<QAbstractButton *> buttons = backgroundButtonGroup->buttons();
- foreach (QAbstractButton *myButton, buttons) {
+ const QList<QAbstractButton *> buttons = backgroundButtonGroup->buttons();
+ for (QAbstractButton *myButton : buttons) {
if (myButton != button)
button->setChecked(false);
}
@@ -115,8 +115,8 @@ void MainWindow::backgroundButtonGroupClicked(QAbstractButton *button)
//! [2]
void MainWindow::buttonGroupClicked(int id)
{
- QList<QAbstractButton *> buttons = buttonGroup->buttons();
- foreach (QAbstractButton *button, buttons) {
+ const QList<QAbstractButton *> buttons = buttonGroup->buttons();
+ for (QAbstractButton *button : buttons) {
if (buttonGroup->button(id) != button)
button->setChecked(false);
}
@@ -132,7 +132,8 @@ void MainWindow::buttonGroupClicked(int id)
//! [3]
void MainWindow::deleteItem()
{
- foreach (QGraphicsItem *item, scene->selectedItems()) {
+ QList<QGraphicsItem *> selectedItems = scene->selectedItems();
+ for (QGraphicsItem *item : qAsConst(selectedItems)) {
if (item->type() == Arrow::Type) {
scene->removeItem(item);
Arrow *arrow = qgraphicsitem_cast<Arrow *>(item);
@@ -142,7 +143,8 @@ void MainWindow::deleteItem()
}
}
- foreach (QGraphicsItem *item, scene->selectedItems()) {
+ selectedItems = scene->selectedItems();
+ for (QGraphicsItem *item : qAsConst(selectedItems)) {
if (item->type() == DiagramItem::Type)
qgraphicsitem_cast<DiagramItem *>(item)->removeArrows();
scene->removeItem(item);
@@ -165,10 +167,10 @@ void MainWindow::bringToFront()
return;
QGraphicsItem *selectedItem = scene->selectedItems().first();
- QList<QGraphicsItem *> overlapItems = selectedItem->collidingItems();
+ const QList<QGraphicsItem *> overlapItems = selectedItem->collidingItems();
qreal zValue = 0;
- foreach (QGraphicsItem *item, overlapItems) {
+ for (const QGraphicsItem *item : overlapItems) {
if (item->zValue() >= zValue && item->type() == DiagramItem::Type)
zValue = item->zValue() + 0.1;
}
@@ -183,10 +185,10 @@ void MainWindow::sendToBack()
return;
QGraphicsItem *selectedItem = scene->selectedItems().first();
- QList<QGraphicsItem *> overlapItems = selectedItem->collidingItems();
+ const QList<QGraphicsItem *> overlapItems = selectedItem->collidingItems();
qreal zValue = 0;
- foreach (QGraphicsItem *item, overlapItems) {
+ for (const QGraphicsItem *item : overlapItems) {
if (item->zValue() <= zValue && item->type() == DiagramItem::Type)
zValue = item->zValue() - 0.1;
}
@@ -332,8 +334,8 @@ void MainWindow::createToolBox()
{
buttonGroup = new QButtonGroup(this);
buttonGroup->setExclusive(false);
- connect(buttonGroup, SIGNAL(buttonClicked(int)),
- this, SLOT(buttonGroupClicked(int)));
+ connect(buttonGroup, QOverload<int>::of(&QButtonGroup::buttonClicked),
+ this, &MainWindow::buttonGroupClicked);
QGridLayout *layout = new QGridLayout;
layout->addWidget(createCellWidget(tr("Conditional"), DiagramItem::Conditional), 0, 0);
layout->addWidget(createCellWidget(tr("Process"), DiagramItem::Step),0, 1);
@@ -359,8 +361,8 @@ void MainWindow::createToolBox()
itemWidget->setLayout(layout);
backgroundButtonGroup = new QButtonGroup(this);
- connect(backgroundButtonGroup, SIGNAL(buttonClicked(QAbstractButton*)),
- this, SLOT(backgroundButtonGroupClicked(QAbstractButton*)));
+ connect(backgroundButtonGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
+ this, &MainWindow::backgroundButtonGroupClicked);
QGridLayout *backgroundLayout = new QGridLayout;
backgroundLayout->addWidget(createBackgroundCellWidget(tr("Blue Grid"),
@@ -395,44 +397,44 @@ void MainWindow::createActions()
tr("Bring to &Front"), this);
toFrontAction->setShortcut(tr("Ctrl+F"));
toFrontAction->setStatusTip(tr("Bring item to front"));
- connect(toFrontAction, SIGNAL(triggered()), this, SLOT(bringToFront()));
+ connect(toFrontAction, &QAction::triggered, this, &MainWindow::bringToFront);
//! [23]
sendBackAction = new QAction(QIcon(":/images/sendtoback.png"), tr("Send to &Back"), this);
sendBackAction->setShortcut(tr("Ctrl+T"));
sendBackAction->setStatusTip(tr("Send item to back"));
- connect(sendBackAction, SIGNAL(triggered()), this, SLOT(sendToBack()));
+ connect(sendBackAction, &QAction::triggered, this, &MainWindow::sendToBack);
deleteAction = new QAction(QIcon(":/images/delete.png"), tr("&Delete"), this);
deleteAction->setShortcut(tr("Delete"));
deleteAction->setStatusTip(tr("Delete item from diagram"));
- connect(deleteAction, SIGNAL(triggered()), this, SLOT(deleteItem()));
+ connect(deleteAction, &QAction::triggered, this, &MainWindow::deleteItem);
exitAction = new QAction(tr("E&xit"), this);
exitAction->setShortcuts(QKeySequence::Quit);
exitAction->setStatusTip(tr("Quit Scenediagram example"));
- connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(exitAction, &QAction::triggered, this, &QWidget::close);
boldAction = new QAction(tr("Bold"), this);
boldAction->setCheckable(true);
QPixmap pixmap(":/images/bold.png");
boldAction->setIcon(QIcon(pixmap));
boldAction->setShortcut(tr("Ctrl+B"));
- connect(boldAction, SIGNAL(triggered()), this, SLOT(handleFontChange()));
+ connect(boldAction, &QAction::triggered, this, &MainWindow::handleFontChange);
italicAction = new QAction(QIcon(":/images/italic.png"), tr("Italic"), this);
italicAction->setCheckable(true);
italicAction->setShortcut(tr("Ctrl+I"));
- connect(italicAction, SIGNAL(triggered()), this, SLOT(handleFontChange()));
+ connect(italicAction, &QAction::triggered, this, &MainWindow::handleFontChange);
underlineAction = new QAction(QIcon(":/images/underline.png"), tr("Underline"), this);
underlineAction->setCheckable(true);
underlineAction->setShortcut(tr("Ctrl+U"));
- connect(underlineAction, SIGNAL(triggered()), this, SLOT(handleFontChange()));
+ connect(underlineAction, &QAction::triggered, this, &MainWindow::handleFontChange);
aboutAction = new QAction(tr("A&bout"), this);
aboutAction->setShortcut(tr("F1"));
- connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));
+ connect(aboutAction, &QAction::triggered, this, &MainWindow::about);
}
//! [24]
@@ -462,8 +464,8 @@ void MainWindow::createToolbars()
editToolBar->addAction(sendBackAction);
fontCombo = new QFontComboBox();
- connect(fontCombo, SIGNAL(currentFontChanged(QFont)),
- this, SLOT(currentFontChanged(QFont)));
+ connect(fontCombo, &QFontComboBox::currentFontChanged,
+ this, &MainWindow::currentFontChanged);
fontSizeCombo = new QComboBox;
fontSizeCombo->setEditable(true);
@@ -471,8 +473,8 @@ void MainWindow::createToolbars()
fontSizeCombo->addItem(QString().setNum(i));
QIntValidator *validator = new QIntValidator(2, 64, this);
fontSizeCombo->setValidator(validator);
- connect(fontSizeCombo, SIGNAL(currentIndexChanged(QString)),
- this, SLOT(fontSizeChanged(QString)));
+ connect(fontSizeCombo, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
+ this, &MainWindow::fontSizeChanged);
fontColorToolButton = new QToolButton;
fontColorToolButton->setPopupMode(QToolButton::MenuButtonPopup);
@@ -480,8 +482,8 @@ void MainWindow::createToolbars()
textAction = fontColorToolButton->menu()->defaultAction();
fontColorToolButton->setIcon(createColorToolButtonIcon(":/images/textpointer.png", Qt::black));
fontColorToolButton->setAutoFillBackground(true);
- connect(fontColorToolButton, SIGNAL(clicked()),
- this, SLOT(textButtonTriggered()));
+ connect(fontColorToolButton, &QAbstractButton::clicked,
+ this, &MainWindow::textButtonTriggered);
//! [26]
fillColorToolButton = new QToolButton;
@@ -490,8 +492,8 @@ void MainWindow::createToolbars()
fillAction = fillColorToolButton->menu()->defaultAction();
fillColorToolButton->setIcon(createColorToolButtonIcon(
":/images/floodfill.png", Qt::white));
- connect(fillColorToolButton, SIGNAL(clicked()),
- this, SLOT(fillButtonTriggered()));
+ connect(fillColorToolButton, &QAbstractButton::clicked,
+ this, &MainWindow::fillButtonTriggered);
//! [26]
lineColorToolButton = new QToolButton;
@@ -500,8 +502,8 @@ void MainWindow::createToolbars()
lineAction = lineColorToolButton->menu()->defaultAction();
lineColorToolButton->setIcon(createColorToolButtonIcon(
":/images/linecolor.png", Qt::black));
- connect(lineColorToolButton, SIGNAL(clicked()),
- this, SLOT(lineButtonTriggered()));
+ connect(lineColorToolButton, &QAbstractButton::clicked,
+ this, &MainWindow::lineButtonTriggered);
textToolBar = addToolBar(tr("Font"));
textToolBar->addWidget(fontCombo);
@@ -526,16 +528,16 @@ void MainWindow::createToolbars()
pointerTypeGroup = new QButtonGroup(this);
pointerTypeGroup->addButton(pointerButton, int(DiagramScene::MoveItem));
pointerTypeGroup->addButton(linePointerButton, int(DiagramScene::InsertLine));
- connect(pointerTypeGroup, SIGNAL(buttonClicked(int)),
- this, SLOT(pointerGroupClicked(int)));
+ connect(pointerTypeGroup, QOverload<int>::of(&QButtonGroup::buttonClicked),
+ this, &MainWindow::pointerGroupClicked);
sceneScaleCombo = new QComboBox;
QStringList scales;
scales << tr("50%") << tr("75%") << tr("100%") << tr("125%") << tr("150%");
sceneScaleCombo->addItems(scales);
sceneScaleCombo->setCurrentIndex(2);
- connect(sceneScaleCombo, SIGNAL(currentIndexChanged(QString)),
- this, SLOT(sceneScaleChanged(QString)));
+ connect(sceneScaleCombo, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
+ this, &MainWindow::sceneScaleChanged);
pointerToolbar = addToolBar(tr("Pointer type"));
pointerToolbar->addWidget(pointerButton);
diff --git a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
index 81928a4ee1..6b817b2a21 100644
--- a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
+++ b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
@@ -164,16 +164,17 @@ void GraphWidget::timerEvent(QTimerEvent *event)
Q_UNUSED(event);
QList<Node *> nodes;
- foreach (QGraphicsItem *item, scene()->items()) {
+ const QList<QGraphicsItem *> items = scene()->items();
+ for (QGraphicsItem *item : items) {
if (Node *node = qgraphicsitem_cast<Node *>(item))
nodes << node;
}
- foreach (Node *node, nodes)
+ for (Node *node : qAsConst(nodes))
node->calculateForces();
bool itemsMoved = false;
- foreach (Node *node, nodes) {
+ for (Node *node : qAsConst(nodes)) {
if (node->advancePosition())
itemsMoved = true;
}
@@ -246,7 +247,8 @@ void GraphWidget::scaleView(qreal scaleFactor)
void GraphWidget::shuffle()
{
- foreach (QGraphicsItem *item, scene()->items()) {
+ const QList<QGraphicsItem *> items = scene()->items();
+ for (QGraphicsItem *item : items) {
if (qgraphicsitem_cast<Node *>(item))
item->setPos(-150 + QRandomGenerator::global()->bounded(300), -150 + QRandomGenerator::global()->bounded(300));
}
diff --git a/examples/widgets/graphicsview/elasticnodes/node.cpp b/examples/widgets/graphicsview/elasticnodes/node.cpp
index 71737c984b..d4fa3d2b4f 100644
--- a/examples/widgets/graphicsview/elasticnodes/node.cpp
+++ b/examples/widgets/graphicsview/elasticnodes/node.cpp
@@ -94,7 +94,8 @@ void Node::calculateForces()
// Sum up all forces pushing this item away
qreal xvel = 0;
qreal yvel = 0;
- foreach (QGraphicsItem *item, scene()->items()) {
+ const QList<QGraphicsItem *> items = scene()->items();
+ for (QGraphicsItem *item : items) {
Node *node = qgraphicsitem_cast<Node *>(item);
if (!node)
continue;
@@ -113,7 +114,7 @@ void Node::calculateForces()
//! [4]
// Now subtract all forces pulling items together
double weight = (edgeList.size() + 1) * 10;
- foreach (Edge *edge, edgeList) {
+ for (const Edge *edge : qAsConst(edgeList)) {
QPointF vec;
if (edge->sourceNode() == this)
vec = mapToItem(edge->destNode(), 0, 0);
@@ -194,7 +195,7 @@ QVariant Node::itemChange(GraphicsItemChange change, const QVariant &value)
{
switch (change) {
case ItemPositionHasChanged:
- foreach (Edge *edge, edgeList)
+ for (Edge *edge : qAsConst(edgeList))
edge->adjust();
graph->itemMoved();
break;
diff --git a/examples/widgets/graphicsview/embeddeddialogs/customproxy.cpp b/examples/widgets/graphicsview/embeddeddialogs/customproxy.cpp
index 158c31d9c1..f510ebc07f 100644
--- a/examples/widgets/graphicsview/embeddeddialogs/customproxy.cpp
+++ b/examples/widgets/graphicsview/embeddeddialogs/customproxy.cpp
@@ -55,13 +55,13 @@
#include <QGraphicsScene>
CustomProxy::CustomProxy(QGraphicsItem *parent, Qt::WindowFlags wFlags)
- : QGraphicsProxyWidget(parent, wFlags), popupShown(false), currentPopup(0)
+ : QGraphicsProxyWidget(parent, wFlags), popupShown(false), currentPopup(nullptr)
{
timeLine = new QTimeLine(250, this);
- connect(timeLine, SIGNAL(valueChanged(qreal)),
- this, SLOT(updateStep(qreal)));
- connect(timeLine, SIGNAL(stateChanged(QTimeLine::State)),
- this, SLOT(stateChanged(QTimeLine::State)));
+ connect(timeLine, &QTimeLine::valueChanged,
+ this, &CustomProxy::updateStep);
+ connect(timeLine, &QTimeLine::stateChanged,
+ this, &CustomProxy::stateChanged);
}
QRectF CustomProxy::boundingRect() const
@@ -133,7 +133,7 @@ QVariant CustomProxy::itemChange(GraphicsItemChange change, const QVariant &valu
currentPopup->installSceneEventFilter(this);
} else if (scene()) {
currentPopup->removeSceneEventFilter(this);
- currentPopup = 0;
+ currentPopup = nullptr;
}
} else if (currentPopup && change == ItemSceneHasChanged) {
currentPopup->installSceneEventFilter(this);
diff --git a/examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp b/examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp
index 0c3ed86565..0c831360cf 100644
--- a/examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp
+++ b/examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp
@@ -60,7 +60,8 @@ EmbeddedDialog::EmbeddedDialog(QWidget *parent)
ui->setupUi(this);
ui->layoutDirection->setCurrentIndex(layoutDirection() != Qt::LeftToRight);
- foreach (QString styleName, QStyleFactory::keys()) {
+ const QStringList styleKeys = QStyleFactory::keys();
+ for (const QString &styleName : styleKeys) {
ui->style->addItem(styleName);
if (style()->objectName().toLower() == styleName.toLower())
ui->style->setCurrentIndex(ui->style->count() - 1);
@@ -101,7 +102,8 @@ static void setStyleHelper(QWidget *widget, QStyle *style)
{
widget->setStyle(style);
widget->setPalette(style->standardPalette());
- foreach (QObject *child, widget->children()) {
+ const QObjectList children = widget->children();
+ for (QObject *child : children) {
if (QWidget *childWidget = qobject_cast<QWidget *>(child))
setStyleHelper(childWidget, style);
}
diff --git a/examples/widgets/graphicsview/embeddeddialogs/main.cpp b/examples/widgets/graphicsview/embeddeddialogs/main.cpp
index cbd5dd5890..501405e3ff 100644
--- a/examples/widgets/graphicsview/embeddeddialogs/main.cpp
+++ b/examples/widgets/graphicsview/embeddeddialogs/main.cpp
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
for (int y = 0; y < gridSize; ++y) {
for (int x = 0; x < gridSize; ++x) {
- CustomProxy *proxy = new CustomProxy(0, Qt::Window);
+ CustomProxy *proxy = new CustomProxy(nullptr, Qt::Window);
proxy->setWidget(new EmbeddedDialog);
QRectF rect = proxy->boundingRect();
diff --git a/examples/widgets/graphicsview/flowlayout/flowlayout.cpp b/examples/widgets/graphicsview/flowlayout/flowlayout.cpp
index 065c3e00ea..ab6bbb7aa4 100644
--- a/examples/widgets/graphicsview/flowlayout/flowlayout.cpp
+++ b/examples/widgets/graphicsview/flowlayout/flowlayout.cpp
@@ -154,8 +154,7 @@ QSizeF FlowLayout::minSize(const QSizeF &constraint) const
} else if (constraint.height() >= 0) { // width for height?
// not supported
} else {
- QGraphicsLayoutItem *item;
- foreach (item, m_items)
+ for (const QGraphicsLayoutItem *item : qAsConst(m_items))
size = size.expandedTo(item->effectiveSizeHint(Qt::MinimumSize));
size += QSize(left + right, top + bottom);
}
@@ -167,10 +166,9 @@ QSizeF FlowLayout::prefSize() const
qreal left, right;
getContentsMargins(&left, 0, &right, 0);
- QGraphicsLayoutItem *item;
qreal maxh = 0;
qreal totalWidth = 0;
- foreach (item, m_items) {
+ for (const QGraphicsLayoutItem *item : qAsConst(m_items)) {
if (totalWidth > 0)
totalWidth += spacing(Qt::Horizontal);
QSizeF pref = item->effectiveSizeHint(Qt::PreferredSize);
@@ -187,10 +185,9 @@ QSizeF FlowLayout::prefSize() const
QSizeF FlowLayout::maxSize() const
{
- QGraphicsLayoutItem *item;
qreal totalWidth = 0;
qreal totalHeight = 0;
- foreach (item, m_items) {
+ for (const QGraphicsLayoutItem *item : qAsConst(m_items)) {
if (totalWidth > 0)
totalWidth += spacing(Qt::Horizontal);
if (totalHeight > 0)
diff --git a/examples/widgets/itemviews/addressbook/adddialog.cpp b/examples/widgets/itemviews/addressbook/adddialog.cpp
index 1ce2d3110a..bf87307253 100644
--- a/examples/widgets/itemviews/addressbook/adddialog.cpp
+++ b/examples/widgets/itemviews/addressbook/adddialog.cpp
@@ -54,17 +54,16 @@
//! [0]
AddDialog::AddDialog(QWidget *parent)
- : QDialog(parent)
+ : QDialog(parent),
+ nameText(new QLineEdit),
+ addressText(new QTextEdit)
{
- nameLabel = new QLabel("Name");
- addressLabel = new QLabel("Address");
- okButton = new QPushButton("OK");
- cancelButton = new QPushButton("Cancel");
+ auto nameLabel = new QLabel(tr("Name"));
+ auto addressLabel = new QLabel(tr("Address"));
+ auto okButton = new QPushButton(tr("OK"));
+ auto cancelButton = new QPushButton(tr("Cancel"));
- nameText = new QLineEdit;
- addressText = new QTextEdit;
-
- QGridLayout *gLayout = new QGridLayout;
+ auto gLayout = new QGridLayout;
gLayout->setColumnStretch(1, 2);
gLayout->addWidget(nameLabel, 0, 0);
gLayout->addWidget(nameText, 0, 1);
@@ -72,13 +71,13 @@ AddDialog::AddDialog(QWidget *parent)
gLayout->addWidget(addressLabel, 1, 0, Qt::AlignLeft|Qt::AlignTop);
gLayout->addWidget(addressText, 1, 1, Qt::AlignLeft);
- QHBoxLayout *buttonLayout = new QHBoxLayout;
+ auto buttonLayout = new QHBoxLayout;
buttonLayout->addWidget(okButton);
buttonLayout->addWidget(cancelButton);
gLayout->addLayout(buttonLayout, 2, 1, Qt::AlignRight);
- QVBoxLayout *mainLayout = new QVBoxLayout;
+ auto mainLayout = new QVBoxLayout;
mainLayout->addLayout(gLayout);
setLayout(mainLayout);
@@ -87,4 +86,21 @@ AddDialog::AddDialog(QWidget *parent)
setWindowTitle(tr("Add a Contact"));
}
+
+QString AddDialog::name() const
+{
+ return nameText->text();
+}
+
+QString AddDialog::address() const
+{
+ return addressText->toPlainText();
+}
+
+void AddDialog::editAddress(const QString &name, const QString &address)
+{
+ nameText->setReadOnly(true);
+ nameText->setText(name);
+ addressText->setPlainText(address);
+}
//! [0]
diff --git a/examples/widgets/itemviews/addressbook/adddialog.h b/examples/widgets/itemviews/addressbook/adddialog.h
index 16fa7bc650..2867034122 100644
--- a/examples/widgets/itemviews/addressbook/adddialog.h
+++ b/examples/widgets/itemviews/addressbook/adddialog.h
@@ -66,15 +66,15 @@ class AddDialog : public QDialog
Q_OBJECT
public:
- AddDialog(QWidget *parent = 0);
- QLineEdit *nameText;
- QTextEdit *addressText;
+ AddDialog(QWidget *parent = nullptr);
+
+ QString name() const;
+ QString address() const;
+ void editAddress(const QString &name, const QString &address);
private:
- QLabel *nameLabel;
- QLabel *addressLabel;
- QPushButton *okButton;
- QPushButton *cancelButton;
+ QLineEdit *nameText;
+ QTextEdit *addressText;
};
//! [0]
diff --git a/examples/widgets/itemviews/addressbook/addresswidget.cpp b/examples/widgets/itemviews/addressbook/addresswidget.cpp
index 143f6266dd..b1b65174ee 100644
--- a/examples/widgets/itemviews/addressbook/addresswidget.cpp
+++ b/examples/widgets/itemviews/addressbook/addresswidget.cpp
@@ -48,21 +48,21 @@
**
****************************************************************************/
-#include "adddialog.h"
#include "addresswidget.h"
+#include "adddialog.h"
#include <QtWidgets>
//! [0]
AddressWidget::AddressWidget(QWidget *parent)
- : QTabWidget(parent)
+ : QTabWidget(parent),
+ table(new TableModel(this)),
+ newAddressTab(new NewAddressTab(this))
{
- table = new TableModel(this);
- newAddressTab = new NewAddressTab(this);
connect(newAddressTab, &NewAddressTab::sendDetails,
this, &AddressWidget::addEntry);
- addTab(newAddressTab, "Address Book");
+ addTab(newAddressTab, tr("Address Book"));
setupTabs();
}
@@ -73,17 +73,13 @@ void AddressWidget::showAddEntryDialog()
{
AddDialog aDialog;
- if (aDialog.exec()) {
- QString name = aDialog.nameText->text();
- QString address = aDialog.addressText->toPlainText();
-
- addEntry(name, address);
- }
+ if (aDialog.exec())
+ addEntry(aDialog.name(), aDialog.address());
}
//! [2]
//! [3]
-void AddressWidget::addEntry(QString name, QString address)
+void AddressWidget::addEntry(const QString &name, const QString &address)
{
if (!table->getContacts().contains({ name, address })) {
table->insertRows(0, 1, QModelIndex());
@@ -107,12 +103,12 @@ void AddressWidget::editEntry()
QSortFilterProxyModel *proxy = static_cast<QSortFilterProxyModel*>(temp->model());
QItemSelectionModel *selectionModel = temp->selectionModel();
- QModelIndexList indexes = selectionModel->selectedRows();
+ const QModelIndexList indexes = selectionModel->selectedRows();
QString name;
QString address;
int row = -1;
- foreach (QModelIndex index, indexes) {
+ for (const QModelIndex &index : indexes) {
row = proxy->mapToSource(index).row();
QModelIndex nameIndex = table->index(row, 0, QModelIndex());
QVariant varName = table->data(nameIndex, Qt::DisplayRole);
@@ -127,15 +123,12 @@ void AddressWidget::editEntry()
//! [4b]
AddDialog aDialog;
aDialog.setWindowTitle(tr("Edit a Contact"));
-
- aDialog.nameText->setReadOnly(true);
- aDialog.nameText->setText(name);
- aDialog.addressText->setText(address);
+ aDialog.editAddress(name, address);
if (aDialog.exec()) {
- QString newAddress = aDialog.addressText->toPlainText();
+ const QString newAddress = aDialog.address();
if (newAddress != address) {
- QModelIndex index = table->index(row, 1, QModelIndex());
+ const QModelIndex index = table->index(row, 1, QModelIndex());
table->setData(index, newAddress, Qt::EditRole);
}
}
@@ -149,52 +142,46 @@ void AddressWidget::removeEntry()
QSortFilterProxyModel *proxy = static_cast<QSortFilterProxyModel*>(temp->model());
QItemSelectionModel *selectionModel = temp->selectionModel();
- QModelIndexList indexes = selectionModel->selectedRows();
+ const QModelIndexList indexes = selectionModel->selectedRows();
- foreach (QModelIndex index, indexes) {
+ for (QModelIndex index : indexes) {
int row = proxy->mapToSource(index).row();
table->removeRows(row, 1, QModelIndex());
}
- if (table->rowCount(QModelIndex()) == 0) {
- insertTab(0, newAddressTab, "Address Book");
- }
+ if (table->rowCount(QModelIndex()) == 0)
+ insertTab(0, newAddressTab, tr("Address Book"));
}
//! [5]
//! [1]
void AddressWidget::setupTabs()
{
- QStringList groups;
- groups << "ABC" << "DEF" << "GHI" << "JKL" << "MNO" << "PQR" << "STU" << "VW" << "XYZ";
+ const auto groups = { "ABC", "DEF", "GHI", "JKL", "MNO", "PQR", "STU", "VW", "XYZ" };
- for (int i = 0; i < groups.size(); ++i) {
- QString str = groups.at(i);
- QString regExp = QString("^[%1].*").arg(str);
+ for (const QString &str : groups) {
+ const auto regExp = QRegularExpression(QString("^[%1].*").arg(str),
+ QRegularExpression::CaseInsensitiveOption);
- proxyModel = new QSortFilterProxyModel(this);
+ auto proxyModel = new QSortFilterProxyModel(this);
proxyModel->setSourceModel(table);
- proxyModel->setFilterRegExp(QRegExp(regExp, Qt::CaseInsensitive));
+ proxyModel->setFilterRegularExpression(regExp);
proxyModel->setFilterKeyColumn(0);
QTableView *tableView = new QTableView;
tableView->setModel(proxyModel);
-
tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
tableView->horizontalHeader()->setStretchLastSection(true);
tableView->verticalHeader()->hide();
tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
tableView->setSelectionMode(QAbstractItemView::SingleSelection);
-
tableView->setSortingEnabled(true);
- connect(tableView->selectionModel(),
- &QItemSelectionModel::selectionChanged,
- this, &AddressWidget::selectionChanged);
+ connect(tableView->selectionModel(), &QItemSelectionModel::selectionChanged,
+ this, &AddressWidget::selectionChanged);
- connect(this, &QTabWidget::currentChanged, this, [this](int tabIndex) {
- auto *tableView = qobject_cast<QTableView *>(widget(tabIndex));
- if (tableView)
+ connect(this, &QTabWidget::currentChanged, this, [this, tableView](int tabIndex) {
+ if (widget(tabIndex) == tableView)
emit selectionChanged(tableView->selectionModel()->selection());
});
@@ -214,7 +201,7 @@ void AddressWidget::readFromFile(const QString &fileName)
return;
}
- QList<Contact> contacts;
+ QVector<Contact> contacts;
QDataStream in(&file);
in >> contacts;
diff --git a/examples/widgets/itemviews/addressbook/addresswidget.h b/examples/widgets/itemviews/addressbook/addresswidget.h
index de5a2da766..111ea98328 100644
--- a/examples/widgets/itemviews/addressbook/addresswidget.h
+++ b/examples/widgets/itemviews/addressbook/addresswidget.h
@@ -68,13 +68,13 @@ class AddressWidget : public QTabWidget
Q_OBJECT
public:
- AddressWidget(QWidget *parent = 0);
+ AddressWidget(QWidget *parent = nullptr);
void readFromFile(const QString &fileName);
void writeToFile(const QString &fileName);
public slots:
void showAddEntryDialog();
- void addEntry(QString name, QString address);
+ void addEntry(const QString &name, const QString &address);
void editEntry();
void removeEntry();
@@ -86,7 +86,6 @@ private:
TableModel *table;
NewAddressTab *newAddressTab;
- QSortFilterProxyModel *proxyModel;
};
//! [0]
diff --git a/examples/widgets/itemviews/addressbook/mainwindow.cpp b/examples/widgets/itemviews/addressbook/mainwindow.cpp
index 6d8b15b032..42966de375 100644
--- a/examples/widgets/itemviews/addressbook/mainwindow.cpp
+++ b/examples/widgets/itemviews/addressbook/mainwindow.cpp
@@ -56,8 +56,9 @@
//! [0]
MainWindow::MainWindow()
+ : QMainWindow(),
+ addressWidget(new AddressWidget)
{
- addressWidget = new AddressWidget;
setCentralWidget(addressWidget);
createMenus();
setWindowTitle(tr("Address Book"));
@@ -67,28 +68,29 @@ MainWindow::MainWindow()
//! [1a]
void MainWindow::createMenus()
{
- fileMenu = menuBar()->addMenu(tr("&File"));
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
- openAct = new QAction(tr("&Open..."), this);
+ QAction *openAct = new QAction(tr("&Open..."), this);
fileMenu->addAction(openAct);
connect(openAct, &QAction::triggered, this, &MainWindow::openFile);
//! [1a]
- saveAct = new QAction(tr("&Save As..."), this);
+ QAction *saveAct = new QAction(tr("&Save As..."), this);
fileMenu->addAction(saveAct);
connect(saveAct, &QAction::triggered, this, &MainWindow::saveFile);
fileMenu->addSeparator();
- exitAct = new QAction(tr("E&xit"), this);
+ QAction *exitAct = new QAction(tr("E&xit"), this);
fileMenu->addAction(exitAct);
connect(exitAct, &QAction::triggered, this, &QWidget::close);
- toolMenu = menuBar()->addMenu(tr("&Tools"));
+ QMenu *toolMenu = menuBar()->addMenu(tr("&Tools"));
- addAct = new QAction(tr("&Add Entry..."), this);
+ QAction *addAct = new QAction(tr("&Add Entry..."), this);
toolMenu->addAction(addAct);
- connect(addAct, &QAction::triggered, addressWidget, &AddressWidget::showAddEntryDialog);
+ connect(addAct, &QAction::triggered,
+ addressWidget, &AddressWidget::showAddEntryDialog);
//! [1b]
editAct = new QAction(tr("&Edit Entry..."), this);
diff --git a/examples/widgets/itemviews/addressbook/mainwindow.h b/examples/widgets/itemviews/addressbook/mainwindow.h
index 3d323e5799..fca5934e68 100644
--- a/examples/widgets/itemviews/addressbook/mainwindow.h
+++ b/examples/widgets/itemviews/addressbook/mainwindow.h
@@ -72,12 +72,6 @@ private:
void createMenus();
AddressWidget *addressWidget;
- QMenu *fileMenu;
- QMenu *toolMenu;
- QAction *openAct;
- QAction *saveAct;
- QAction *exitAct;
- QAction *addAct;
QAction *editAct;
QAction *removeAct;
};
diff --git a/examples/widgets/itemviews/addressbook/newaddresstab.cpp b/examples/widgets/itemviews/addressbook/newaddresstab.cpp
index f0a7369796..ef725d723f 100644
--- a/examples/widgets/itemviews/addressbook/newaddresstab.cpp
+++ b/examples/widgets/itemviews/addressbook/newaddresstab.cpp
@@ -48,24 +48,23 @@
**
****************************************************************************/
-#include "adddialog.h"
#include "newaddresstab.h"
+#include "adddialog.h"
#include <QtWidgets>
//! [0]
NewAddressTab::NewAddressTab(QWidget *parent)
+ : QWidget(parent)
{
- Q_UNUSED(parent);
+ auto descriptionLabel = new QLabel(tr("There are currently no contacts in your address book. "
+ "\nClick Add to add new contacts."));
- descriptionLabel = new QLabel(tr("There are currently no contacts in your address book. "
- "\nClick Add to add new contacts."));
-
- addButton = new QPushButton(tr("Add"));
+ auto addButton = new QPushButton(tr("Add"));
connect(addButton, &QAbstractButton::clicked, this, &NewAddressTab::addEntry);
- mainLayout = new QVBoxLayout;
+ auto mainLayout = new QVBoxLayout;
mainLayout->addWidget(descriptionLabel);
mainLayout->addWidget(addButton, 0, Qt::AlignCenter);
@@ -78,11 +77,7 @@ void NewAddressTab::addEntry()
{
AddDialog aDialog;
- if (aDialog.exec()) {
- QString name = aDialog.nameText->text();
- QString address = aDialog.addressText->toPlainText();
-
- emit sendDetails(name, address);
- }
+ if (aDialog.exec())
+ emit sendDetails(aDialog.name(), aDialog.address());
}
//! [1]
diff --git a/examples/widgets/itemviews/addressbook/newaddresstab.h b/examples/widgets/itemviews/addressbook/newaddresstab.h
index 05c7a8dada..6a147e3c7c 100644
--- a/examples/widgets/itemviews/addressbook/newaddresstab.h
+++ b/examples/widgets/itemviews/addressbook/newaddresstab.h
@@ -65,19 +65,13 @@ class NewAddressTab : public QWidget
Q_OBJECT
public:
- NewAddressTab(QWidget *parent = 0);
+ NewAddressTab(QWidget *parent = nullptr);
public slots:
void addEntry();
signals:
- void sendDetails(QString name, QString address);
-
-private:
- QLabel *descriptionLabel;
- QPushButton *addButton;
- QVBoxLayout *mainLayout;
-
+ void sendDetails(const QString &name, const QString &address);
};
//! [0]
diff --git a/examples/widgets/itemviews/addressbook/tablemodel.cpp b/examples/widgets/itemviews/addressbook/tablemodel.cpp
index b3704f857e..ddf79a3fa3 100644
--- a/examples/widgets/itemviews/addressbook/tablemodel.cpp
+++ b/examples/widgets/itemviews/addressbook/tablemodel.cpp
@@ -56,9 +56,9 @@ TableModel::TableModel(QObject *parent)
{
}
-TableModel::TableModel(QList<Contact> contacts, QObject *parent)
- : QAbstractTableModel(parent)
- , contacts(contacts)
+TableModel::TableModel(const QVector<Contact> &contacts, QObject *parent)
+ : QAbstractTableModel(parent),
+ contacts(contacts)
{
}
//! [0]
@@ -66,14 +66,12 @@ TableModel::TableModel(QList<Contact> contacts, QObject *parent)
//! [1]
int TableModel::rowCount(const QModelIndex &parent) const
{
- Q_UNUSED(parent);
- return contacts.size();
+ return parent.isValid() ? 0 : contacts.size();
}
int TableModel::columnCount(const QModelIndex &parent) const
{
- Q_UNUSED(parent);
- return 2;
+ return parent.isValid() ? 0 : 2;
}
//! [1]
@@ -89,10 +87,14 @@ QVariant TableModel::data(const QModelIndex &index, int role) const
if (role == Qt::DisplayRole) {
const auto &contact = contacts.at(index.row());
- if (index.column() == 0)
- return contact.name;
- else if (index.column() == 1)
- return contact.address;
+ switch (index.column()) {
+ case 0:
+ return contact.name;
+ case 1:
+ return contact.address;
+ default:
+ break;
+ }
}
return QVariant();
}
@@ -108,12 +110,10 @@ QVariant TableModel::headerData(int section, Qt::Orientation orientation, int ro
switch (section) {
case 0:
return tr("Name");
-
case 1:
return tr("Address");
-
default:
- return QVariant();
+ break;
}
}
return QVariant();
@@ -152,19 +152,21 @@ bool TableModel::removeRows(int position, int rows, const QModelIndex &index)
bool TableModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
if (index.isValid() && role == Qt::EditRole) {
- int row = index.row();
-
+ const int row = index.row();
auto contact = contacts.value(row);
- if (index.column() == 0)
- contact.name = value.toString();
- else if (index.column() == 1)
- contact.address = value.toString();
- else
- return false;
-
+ switch (index.column()) {
+ case 0:
+ contact.name = value.toString();
+ break;
+ case 1:
+ contact.address = value.toString();
+ break;
+ default:
+ return false;
+ }
contacts.replace(row, contact);
- emit dataChanged(index, index, {role});
+ emit dataChanged(index, index, {Qt::DisplayRole, Qt::EditRole});
return true;
}
@@ -184,7 +186,7 @@ Qt::ItemFlags TableModel::flags(const QModelIndex &index) const
//! [7]
//! [8]
-QList<Contact> TableModel::getContacts() const
+const QVector<Contact> &TableModel::getContacts() const
{
return contacts;
}
diff --git a/examples/widgets/itemviews/addressbook/tablemodel.h b/examples/widgets/itemviews/addressbook/tablemodel.h
index 1004a35d31..e4025fc734 100644
--- a/examples/widgets/itemviews/addressbook/tablemodel.h
+++ b/examples/widgets/itemviews/addressbook/tablemodel.h
@@ -52,7 +52,7 @@
#define TABLEMODEL_H
#include <QAbstractTableModel>
-#include <QList>
+#include <QVector>
//! [0]
@@ -82,8 +82,8 @@ class TableModel : public QAbstractTableModel
Q_OBJECT
public:
- TableModel(QObject *parent = 0);
- TableModel(QList<Contact> contacts, QObject *parent = 0);
+ TableModel(QObject *parent = nullptr);
+ TableModel(const QVector<Contact> &contacts, QObject *parent = nullptr);
int rowCount(const QModelIndex &parent) const override;
int columnCount(const QModelIndex &parent) const override;
@@ -93,10 +93,10 @@ public:
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex()) override;
bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex()) override;
- QList<Contact> getContacts() const;
+ const QVector<Contact> &getContacts() const;
private:
- QList<Contact> contacts;
+ QVector<Contact> contacts;
};
//! [0]
diff --git a/examples/widgets/itemviews/coloreditorfactory/colorlisteditor.cpp b/examples/widgets/itemviews/coloreditorfactory/colorlisteditor.cpp
index 75d809a44f..0b65c53477 100644
--- a/examples/widgets/itemviews/coloreditorfactory/colorlisteditor.cpp
+++ b/examples/widgets/itemviews/coloreditorfactory/colorlisteditor.cpp
@@ -48,10 +48,10 @@
**
****************************************************************************/
-#include <QtWidgets>
-
#include "colorlisteditor.h"
+#include <QtWidgets>
+
ColorListEditor::ColorListEditor(QWidget *widget) : QComboBox(widget)
{
populateList();
@@ -65,16 +65,16 @@ QColor ColorListEditor::color() const
//! [0]
//! [1]
-void ColorListEditor::setColor(QColor color)
+void ColorListEditor::setColor(const QColor &color)
{
- setCurrentIndex(findData(color, int(Qt::DecorationRole)));
+ setCurrentIndex(findData(color, Qt::DecorationRole));
}
//! [1]
//! [2]
void ColorListEditor::populateList()
{
- QStringList colorNames = QColor::colorNames();
+ const QStringList colorNames = QColor::colorNames();
for (int i = 0; i < colorNames.size(); ++i) {
QColor color(colorNames[i]);
diff --git a/examples/widgets/itemviews/coloreditorfactory/colorlisteditor.h b/examples/widgets/itemviews/coloreditorfactory/colorlisteditor.h
index f284c07c89..f9d736d298 100644
--- a/examples/widgets/itemviews/coloreditorfactory/colorlisteditor.h
+++ b/examples/widgets/itemviews/coloreditorfactory/colorlisteditor.h
@@ -65,11 +65,11 @@ class ColorListEditor : public QComboBox
Q_PROPERTY(QColor color READ color WRITE setColor USER true)
public:
- ColorListEditor(QWidget *widget = 0);
+ ColorListEditor(QWidget *widget = nullptr);
public:
QColor color() const;
- void setColor(QColor c);
+ void setColor(const QColor &color);
private:
void populateList();
diff --git a/examples/widgets/itemviews/coloreditorfactory/window.cpp b/examples/widgets/itemviews/coloreditorfactory/window.cpp
index f7ce821d31..e4a9379d8f 100644
--- a/examples/widgets/itemviews/coloreditorfactory/window.cpp
+++ b/examples/widgets/itemviews/coloreditorfactory/window.cpp
@@ -48,11 +48,11 @@
**
****************************************************************************/
-#include <QtWidgets>
-
#include "window.h"
#include "colorlisteditor.h"
+#include <QtWidgets>
+
//! [0]
Window::Window()
{
@@ -71,19 +71,18 @@ Window::Window()
void Window::createGUI()
{
- QList<QPair<QString, QColor> > list;
- list << QPair<QString, QColor>(tr("Alice"), QColor("aliceblue")) <<
- QPair<QString, QColor>(tr("Neptun"), QColor("aquamarine")) <<
- QPair<QString, QColor>(tr("Ferdinand"), QColor("springgreen"));
+ const QVector<QPair<QString, QColor> > list =
+ {{ tr("Alice"), QColor("aliceblue") },
+ { tr("Neptun"), QColor("aquamarine") },
+ { tr("Ferdinand"), QColor("springgreen") }};
QTableWidget *table = new QTableWidget(3, 2);
- table->setHorizontalHeaderLabels(QStringList() << tr("Name")
- << tr("Hair Color"));
+ table->setHorizontalHeaderLabels({ tr("Name"), tr("Hair Color") });
table->verticalHeader()->setVisible(false);
table->resize(150, 50);
for (int i = 0; i < 3; ++i) {
- QPair<QString, QColor> pair = list.at(i);
+ const QPair<QString, QColor> &pair = list.at(i);
QTableWidgetItem *nameItem = new QTableWidgetItem(pair.first);
QTableWidgetItem *colorItem = new QTableWidgetItem;
diff --git a/examples/widgets/itemviews/customsortfiltermodel/filterwidget.cpp b/examples/widgets/itemviews/customsortfiltermodel/filterwidget.cpp
index 74d88caae6..302042a6b3 100644
--- a/examples/widgets/itemviews/customsortfiltermodel/filterwidget.cpp
+++ b/examples/widgets/itemviews/customsortfiltermodel/filterwidget.cpp
@@ -52,13 +52,11 @@
#include <QIcon>
#include <QPixmap>
-#include <QImage>
#include <QMenu>
#include <QAction>
#include <QActionGroup>
#include <QToolButton>
#include <QWidgetAction>
-#include <QDebug>
FilterWidget::FilterWidget(QWidget *parent)
: QLineEdit(parent)
@@ -127,7 +125,8 @@ QRegExp::PatternSyntax FilterWidget::patternSyntax() const
void FilterWidget::setPatternSyntax(QRegExp::PatternSyntax s)
{
- foreach (QAction *a, m_patternGroup->actions()) {
+ const QList<QAction*> actions = m_patternGroup->actions();
+ for (QAction *a : actions) {
if (patternSyntaxFromAction(a) == s) {
a->setChecked(true);
break;
diff --git a/examples/widgets/itemviews/customsortfiltermodel/filterwidget.h b/examples/widgets/itemviews/customsortfiltermodel/filterwidget.h
index ea12954e52..70214b862e 100644
--- a/examples/widgets/itemviews/customsortfiltermodel/filterwidget.h
+++ b/examples/widgets/itemviews/customsortfiltermodel/filterwidget.h
@@ -67,7 +67,7 @@ class FilterWidget : public QLineEdit
Q_PROPERTY(Qt::CaseSensitivity caseSensitivity READ caseSensitivity WRITE setCaseSensitivity)
Q_PROPERTY(QRegExp::PatternSyntax patternSyntax READ patternSyntax WRITE setPatternSyntax)
public:
- explicit FilterWidget(QWidget *parent = 0);
+ explicit FilterWidget(QWidget *parent = nullptr);
Qt::CaseSensitivity caseSensitivity() const;
void setCaseSensitivity(Qt::CaseSensitivity);
diff --git a/examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp b/examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
index 35426657d9..4753d04d9b 100644
--- a/examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
+++ b/examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp
@@ -48,10 +48,10 @@
**
****************************************************************************/
-#include <QtWidgets>
-
#include "mysortfilterproxymodel.h"
+#include <QtWidgets>
+
//! [0]
MySortFilterProxyModel::MySortFilterProxyModel(QObject *parent)
: QSortFilterProxyModel(parent)
@@ -77,7 +77,7 @@ void MySortFilterProxyModel::setFilterMaximumDate(const QDate &date)
//! [3]
bool MySortFilterProxyModel::filterAcceptsRow(int sourceRow,
- const QModelIndex &sourceParent) const
+ const QModelIndex &sourceParent) const
{
QModelIndex index0 = sourceModel()->index(sourceRow, 0, sourceParent);
QModelIndex index1 = sourceModel()->index(sourceRow, 1, sourceParent);
diff --git a/examples/widgets/itemviews/customsortfiltermodel/window.cpp b/examples/widgets/itemviews/customsortfiltermodel/window.cpp
index bfd2350da0..3356c971ad 100644
--- a/examples/widgets/itemviews/customsortfiltermodel/window.cpp
+++ b/examples/widgets/itemviews/customsortfiltermodel/window.cpp
@@ -48,12 +48,12 @@
**
****************************************************************************/
-#include <QtWidgets>
-
-#include "mysortfilterproxymodel.h"
#include "window.h"
+#include "mysortfilterproxymodel.h"
#include "filterwidget.h"
+#include <QtWidgets>
+
//! [0]
Window::Window()
{
@@ -75,7 +75,7 @@ Window::Window()
//! [3]
filterWidget = new FilterWidget;
- filterWidget->setText("Grace|Sports");
+ filterWidget->setText(tr("Grace|Sports"));
connect(filterWidget, &FilterWidget::filterChanged, this, &Window::textFilterChanged);
filterPatternLabel = new QLabel(tr("&Filter pattern:"));
@@ -137,6 +137,11 @@ void Window::setSourceModel(QAbstractItemModel *model)
{
proxyModel->setSourceModel(model);
sourceView->setModel(model);
+
+ for (int i = 0; i < proxyModel->columnCount(); ++i)
+ proxyView->resizeColumnToContents(i);
+ for (int i = 0; i < model->columnCount(); ++i)
+ sourceView->resizeColumnToContents(i);
}
//! [7]
diff --git a/examples/widgets/itemviews/editabletreemodel/main.cpp b/examples/widgets/itemviews/editabletreemodel/main.cpp
index 80f6842730..5e9ff214a3 100644
--- a/examples/widgets/itemviews/editabletreemodel/main.cpp
+++ b/examples/widgets/itemviews/editabletreemodel/main.cpp
@@ -48,10 +48,10 @@
**
****************************************************************************/
-#include <QApplication>
-
#include "mainwindow.h"
+#include <QApplication>
+
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(editabletreemodel);
diff --git a/examples/widgets/itemviews/editabletreemodel/mainwindow.cpp b/examples/widgets/itemviews/editabletreemodel/mainwindow.cpp
index 0c54d8930f..7faa325469 100644
--- a/examples/widgets/itemviews/editabletreemodel/mainwindow.cpp
+++ b/examples/widgets/itemviews/editabletreemodel/mainwindow.cpp
@@ -58,8 +58,7 @@ MainWindow::MainWindow(QWidget *parent)
{
setupUi(this);
- QStringList headers;
- headers << tr("Title") << tr("Description");
+ const QStringList headers({tr("Title"), tr("Description")});
QFile file(":/default.txt");
file.open(QIODevice::ReadOnly);
@@ -87,7 +86,7 @@ MainWindow::MainWindow(QWidget *parent)
void MainWindow::insertChild()
{
- QModelIndex index = view->selectionModel()->currentIndex();
+ const QModelIndex index = view->selectionModel()->currentIndex();
QAbstractItemModel *model = view->model();
if (model->columnCount(index) == 0) {
@@ -99,10 +98,10 @@ void MainWindow::insertChild()
return;
for (int column = 0; column < model->columnCount(index); ++column) {
- QModelIndex child = model->index(0, column, index);
- model->setData(child, QVariant("[No data]"), Qt::EditRole);
+ const QModelIndex child = model->index(0, column, index);
+ model->setData(child, QVariant(tr("[No data]")), Qt::EditRole);
if (!model->headerData(column, Qt::Horizontal).isValid())
- model->setHeaderData(column, Qt::Horizontal, QVariant("[No header]"), Qt::EditRole);
+ model->setHeaderData(column, Qt::Horizontal, QVariant(tr("[No header]")), Qt::EditRole);
}
view->selectionModel()->setCurrentIndex(model->index(0, 0, index),
@@ -127,7 +126,7 @@ bool MainWindow::insertColumn()
void MainWindow::insertRow()
{
- QModelIndex index = view->selectionModel()->currentIndex();
+ const QModelIndex index = view->selectionModel()->currentIndex();
QAbstractItemModel *model = view->model();
if (!model->insertRow(index.row()+1, index.parent()))
@@ -136,19 +135,18 @@ void MainWindow::insertRow()
updateActions();
for (int column = 0; column < model->columnCount(index.parent()); ++column) {
- QModelIndex child = model->index(index.row()+1, column, index.parent());
- model->setData(child, QVariant("[No data]"), Qt::EditRole);
+ const QModelIndex child = model->index(index.row() + 1, column, index.parent());
+ model->setData(child, QVariant(tr("[No data]")), Qt::EditRole);
}
}
bool MainWindow::removeColumn()
{
QAbstractItemModel *model = view->model();
- int column = view->selectionModel()->currentIndex().column();
+ const int column = view->selectionModel()->currentIndex().column();
// Insert columns in each child of the parent item.
- bool changed = model->removeColumn(column);
-
+ const bool changed = model->removeColumn(column);
if (changed)
updateActions();
@@ -157,7 +155,7 @@ bool MainWindow::removeColumn()
void MainWindow::removeRow()
{
- QModelIndex index = view->selectionModel()->currentIndex();
+ const QModelIndex index = view->selectionModel()->currentIndex();
QAbstractItemModel *model = view->model();
if (model->removeRow(index.row(), index.parent()))
updateActions();
@@ -165,19 +163,19 @@ void MainWindow::removeRow()
void MainWindow::updateActions()
{
- bool hasSelection = !view->selectionModel()->selection().isEmpty();
+ const bool hasSelection = !view->selectionModel()->selection().isEmpty();
removeRowAction->setEnabled(hasSelection);
removeColumnAction->setEnabled(hasSelection);
- bool hasCurrent = view->selectionModel()->currentIndex().isValid();
+ const bool hasCurrent = view->selectionModel()->currentIndex().isValid();
insertRowAction->setEnabled(hasCurrent);
insertColumnAction->setEnabled(hasCurrent);
if (hasCurrent) {
view->closePersistentEditor(view->selectionModel()->currentIndex());
- int row = view->selectionModel()->currentIndex().row();
- int column = view->selectionModel()->currentIndex().column();
+ const int row = view->selectionModel()->currentIndex().row();
+ const int column = view->selectionModel()->currentIndex().column();
if (view->selectionModel()->currentIndex().parent().isValid())
statusBar()->showMessage(tr("Position: (%1,%2)").arg(row).arg(column));
else
diff --git a/examples/widgets/itemviews/editabletreemodel/mainwindow.h b/examples/widgets/itemviews/editabletreemodel/mainwindow.h
index dbc745e25d..314b0cb1fa 100644
--- a/examples/widgets/itemviews/editabletreemodel/mainwindow.h
+++ b/examples/widgets/itemviews/editabletreemodel/mainwindow.h
@@ -54,14 +54,13 @@
#include "ui_mainwindow.h"
#include <QMainWindow>
-#include <QModelIndex>
class MainWindow : public QMainWindow, private Ui::MainWindow
{
Q_OBJECT
public:
- MainWindow(QWidget *parent = 0);
+ MainWindow(QWidget *parent = nullptr);
public slots:
void updateActions();
diff --git a/examples/widgets/itemviews/editabletreemodel/treeitem.cpp b/examples/widgets/itemviews/editabletreemodel/treeitem.cpp
index 8fbe86ad1e..027a5f8849 100644
--- a/examples/widgets/itemviews/editabletreemodel/treeitem.cpp
+++ b/examples/widgets/itemviews/editabletreemodel/treeitem.cpp
@@ -56,14 +56,11 @@
#include "treeitem.h"
-#include <QStringList>
-
//! [0]
TreeItem::TreeItem(const QVector<QVariant> &data, TreeItem *parent)
-{
- parentItem = parent;
- itemData = data;
-}
+ : itemData(data),
+ parentItem(parent)
+{}
//! [0]
//! [1]
@@ -76,7 +73,9 @@ TreeItem::~TreeItem()
//! [2]
TreeItem *TreeItem::child(int number)
{
- return childItems.value(number);
+ if (number < 0 || number >= childItems.size())
+ return nullptr;
+ return childItems.at(number);
}
//! [2]
@@ -92,7 +91,6 @@ int TreeItem::childNumber() const
{
if (parentItem)
return parentItem->childItems.indexOf(const_cast<TreeItem*>(this));
-
return 0;
}
//! [4]
@@ -107,7 +105,9 @@ int TreeItem::columnCount() const
//! [6]
QVariant TreeItem::data(int column) const
{
- return itemData.value(column);
+ if (column < 0 || column >= itemData.size())
+ return QVariant();
+ return itemData.at(column);
}
//! [6]
@@ -136,7 +136,7 @@ bool TreeItem::insertColumns(int position, int columns)
for (int column = 0; column < columns; ++column)
itemData.insert(position, QVariant());
- foreach (TreeItem *child, childItems)
+ for (TreeItem *child : qAsConst(childItems))
child->insertColumns(position, columns);
return true;
@@ -171,7 +171,7 @@ bool TreeItem::removeColumns(int position, int columns)
for (int column = 0; column < columns; ++column)
itemData.remove(position);
- foreach (TreeItem *child, childItems)
+ for (TreeItem *child : qAsConst(childItems))
child->removeColumns(position, columns);
return true;
diff --git a/examples/widgets/itemviews/editabletreemodel/treeitem.h b/examples/widgets/itemviews/editabletreemodel/treeitem.h
index fd65f12268..867be5f380 100644
--- a/examples/widgets/itemviews/editabletreemodel/treeitem.h
+++ b/examples/widgets/itemviews/editabletreemodel/treeitem.h
@@ -51,7 +51,6 @@
#ifndef TREEITEM_H
#define TREEITEM_H
-#include <QList>
#include <QVariant>
#include <QVector>
@@ -59,7 +58,7 @@
class TreeItem
{
public:
- explicit TreeItem(const QVector<QVariant> &data, TreeItem *parent = 0);
+ explicit TreeItem(const QVector<QVariant> &data, TreeItem *parent = nullptr);
~TreeItem();
TreeItem *child(int number);
@@ -75,7 +74,7 @@ public:
bool setData(int column, const QVariant &value);
private:
- QList<TreeItem*> childItems;
+ QVector<TreeItem*> childItems;
QVector<QVariant> itemData;
TreeItem *parentItem;
};
diff --git a/examples/widgets/itemviews/editabletreemodel/treemodel.cpp b/examples/widgets/itemviews/editabletreemodel/treemodel.cpp
index 72818372d7..836c2e8651 100644
--- a/examples/widgets/itemviews/editabletreemodel/treemodel.cpp
+++ b/examples/widgets/itemviews/editabletreemodel/treemodel.cpp
@@ -48,21 +48,21 @@
**
****************************************************************************/
-#include <QtWidgets>
-
-#include "treeitem.h"
#include "treemodel.h"
+#include "treeitem.h"
+
+#include <QtWidgets>
//! [0]
TreeModel::TreeModel(const QStringList &headers, const QString &data, QObject *parent)
: QAbstractItemModel(parent)
{
QVector<QVariant> rootData;
- foreach (QString header, headers)
+ for (const QString &header : headers)
rootData << header;
rootItem = new TreeItem(rootData);
- setupModelData(data.split(QString("\n")), rootItem);
+ setupModelData(data.split('\n'), rootItem);
}
//! [0]
@@ -74,8 +74,9 @@ TreeModel::~TreeModel()
//! [1]
//! [2]
-int TreeModel::columnCount(const QModelIndex & /* parent */) const
+int TreeModel::columnCount(const QModelIndex &parent) const
{
+ Q_UNUSED(parent);
return rootItem->columnCount();
}
//! [2]
@@ -97,7 +98,7 @@ QVariant TreeModel::data(const QModelIndex &index, int role) const
Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const
{
if (!index.isValid())
- return 0;
+ return Qt::NoItemFlags;
return Qt::ItemIsEditable | QAbstractItemModel::flags(index);
}
@@ -133,21 +134,20 @@ QModelIndex TreeModel::index(int row, int column, const QModelIndex &parent) con
//! [6]
TreeItem *parentItem = getItem(parent);
+ if (!parentItem)
+ return QModelIndex();
TreeItem *childItem = parentItem->child(row);
if (childItem)
return createIndex(row, column, childItem);
- else
- return QModelIndex();
+ return QModelIndex();
}
//! [6]
bool TreeModel::insertColumns(int position, int columns, const QModelIndex &parent)
{
- bool success;
-
beginInsertColumns(parent, position, position + columns - 1);
- success = rootItem->insertColumns(position, columns);
+ const bool success = rootItem->insertColumns(position, columns);
endInsertColumns();
return success;
@@ -156,10 +156,13 @@ bool TreeModel::insertColumns(int position, int columns, const QModelIndex &pare
bool TreeModel::insertRows(int position, int rows, const QModelIndex &parent)
{
TreeItem *parentItem = getItem(parent);
- bool success;
+ if (!parentItem)
+ return false;
beginInsertRows(parent, position, position + rows - 1);
- success = parentItem->insertChildren(position, rows, rootItem->columnCount());
+ const bool success = parentItem->insertChildren(position,
+ rows,
+ rootItem->columnCount());
endInsertRows();
return success;
@@ -172,9 +175,9 @@ QModelIndex TreeModel::parent(const QModelIndex &index) const
return QModelIndex();
TreeItem *childItem = getItem(index);
- TreeItem *parentItem = childItem->parent();
+ TreeItem *parentItem = childItem ? childItem->parent() : nullptr;
- if (parentItem == rootItem)
+ if (parentItem == rootItem || !parentItem)
return QModelIndex();
return createIndex(parentItem->childNumber(), 0, parentItem);
@@ -183,10 +186,8 @@ QModelIndex TreeModel::parent(const QModelIndex &index) const
bool TreeModel::removeColumns(int position, int columns, const QModelIndex &parent)
{
- bool success;
-
beginRemoveColumns(parent, position, position + columns - 1);
- success = rootItem->removeColumns(position, columns);
+ const bool success = rootItem->removeColumns(position, columns);
endRemoveColumns();
if (rootItem->columnCount() == 0)
@@ -198,10 +199,11 @@ bool TreeModel::removeColumns(int position, int columns, const QModelIndex &pare
bool TreeModel::removeRows(int position, int rows, const QModelIndex &parent)
{
TreeItem *parentItem = getItem(parent);
- bool success = true;
+ if (!parentItem)
+ return false;
beginRemoveRows(parent, position, position + rows - 1);
- success = parentItem->removeChildren(position, rows);
+ const bool success = parentItem->removeChildren(position, rows);
endRemoveRows();
return success;
@@ -210,9 +212,9 @@ bool TreeModel::removeRows(int position, int rows, const QModelIndex &parent)
//! [8]
int TreeModel::rowCount(const QModelIndex &parent) const
{
- TreeItem *parentItem = getItem(parent);
+ const TreeItem *parentItem = getItem(parent);
- return parentItem->childCount();
+ return parentItem ? parentItem->childCount() : 0;
}
//! [8]
@@ -225,7 +227,7 @@ bool TreeModel::setData(const QModelIndex &index, const QVariant &value, int rol
bool result = item->setData(index.column(), value);
if (result)
- emit dataChanged(index, index, {role});
+ emit dataChanged(index, index, {Qt::DisplayRole, Qt::EditRole});
return result;
}
@@ -236,7 +238,7 @@ bool TreeModel::setHeaderData(int section, Qt::Orientation orientation,
if (role != Qt::EditRole || orientation != Qt::Horizontal)
return false;
- bool result = rootItem->setData(section, value);
+ const bool result = rootItem->setData(section, value);
if (result)
emit headerDataChanged(orientation, section, section);
@@ -246,8 +248,8 @@ bool TreeModel::setHeaderData(int section, Qt::Orientation orientation,
void TreeModel::setupModelData(const QStringList &lines, TreeItem *parent)
{
- QList<TreeItem*> parents;
- QList<int> indentations;
+ QVector<TreeItem*> parents;
+ QVector<int> indentations;
parents << parent;
indentations << 0;
@@ -261,14 +263,15 @@ void TreeModel::setupModelData(const QStringList &lines, TreeItem *parent)
++position;
}
- QString lineData = lines[number].mid(position).trimmed();
+ const QString lineData = lines[number].mid(position).trimmed();
if (!lineData.isEmpty()) {
// Read the column data from the rest of the line.
- QStringList columnStrings = lineData.split("\t", QString::SkipEmptyParts);
+ const QStringList columnStrings = lineData.split('\t', QString::SkipEmptyParts);
QVector<QVariant> columnData;
- for (int column = 0; column < columnStrings.count(); ++column)
- columnData << columnStrings[column];
+ columnData.reserve(columnStrings.size());
+ for (const QString &columnString : columnStrings)
+ columnData << columnString;
if (position > indentations.last()) {
// The last child of the current parent is now the new parent
@@ -291,7 +294,6 @@ void TreeModel::setupModelData(const QStringList &lines, TreeItem *parent)
for (int column = 0; column < columnData.size(); ++column)
parent->child(parent->childCount() - 1)->setData(column, columnData[column]);
}
-
++number;
}
}
diff --git a/examples/widgets/itemviews/editabletreemodel/treemodel.h b/examples/widgets/itemviews/editabletreemodel/treemodel.h
index d76d138831..8419f9cb9d 100644
--- a/examples/widgets/itemviews/editabletreemodel/treemodel.h
+++ b/examples/widgets/itemviews/editabletreemodel/treemodel.h
@@ -64,7 +64,7 @@ class TreeModel : public QAbstractItemModel
public:
TreeModel(const QStringList &headers, const QString &data,
- QObject *parent = 0);
+ QObject *parent = nullptr);
~TreeModel();
//! [0] //! [1]
diff --git a/examples/widgets/itemviews/fetchmore/filelistmodel.cpp b/examples/widgets/itemviews/fetchmore/filelistmodel.cpp
index 086d45eca3..3ee80617c0 100644
--- a/examples/widgets/itemviews/fetchmore/filelistmodel.cpp
+++ b/examples/widgets/itemviews/fetchmore/filelistmodel.cpp
@@ -50,20 +50,18 @@
#include "filelistmodel.h"
-#include <QApplication>
-#include <QBrush>
+#include <QGuiApplication>
#include <QDir>
#include <QPalette>
FileListModel::FileListModel(QObject *parent)
- : QAbstractListModel(parent)
-{
-}
+ : QAbstractListModel(parent), fileCount(0)
+{}
//![4]
-int FileListModel::rowCount(const QModelIndex & /* parent */) const
+int FileListModel::rowCount(const QModelIndex &parent) const
{
- return fileCount;
+ return parent.isValid() ? 0 : fileCount;
}
QVariant FileListModel::data(const QModelIndex &index, int role) const
@@ -88,25 +86,26 @@ QVariant FileListModel::data(const QModelIndex &index, int role) const
//![4]
//![1]
-bool FileListModel::canFetchMore(const QModelIndex & /* index */) const
+bool FileListModel::canFetchMore(const QModelIndex &parent) const
{
- if (fileCount < fileList.size())
- return true;
- else
+ if (parent.isValid())
return false;
+ return (fileCount < fileList.size());
}
//![1]
//![2]
-void FileListModel::fetchMore(const QModelIndex & /* index */)
+void FileListModel::fetchMore(const QModelIndex &parent)
{
+ if (parent.isValid())
+ return;
int remainder = fileList.size() - fileCount;
int itemsToFetch = qMin(100, remainder);
if (itemsToFetch <= 0)
return;
- beginInsertRows(QModelIndex(), fileCount, fileCount+itemsToFetch-1);
+ beginInsertRows(QModelIndex(), fileCount, fileCount + itemsToFetch - 1);
fileCount += itemsToFetch;
diff --git a/examples/widgets/itemviews/fetchmore/filelistmodel.h b/examples/widgets/itemviews/fetchmore/filelistmodel.h
index 9251eaf959..35cf6f7b46 100644
--- a/examples/widgets/itemviews/fetchmore/filelistmodel.h
+++ b/examples/widgets/itemviews/fetchmore/filelistmodel.h
@@ -52,7 +52,6 @@
#define FILELISTMODEL_H
#include <QAbstractListModel>
-#include <QList>
#include <QStringList>
//![0]
@@ -61,7 +60,7 @@ class FileListModel : public QAbstractListModel
Q_OBJECT
public:
- FileListModel(QObject *parent = 0);
+ FileListModel(QObject *parent = nullptr);
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
diff --git a/examples/widgets/itemviews/fetchmore/window.cpp b/examples/widgets/itemviews/fetchmore/window.cpp
index 886f76d6ab..d71ac7059d 100644
--- a/examples/widgets/itemviews/fetchmore/window.cpp
+++ b/examples/widgets/itemviews/fetchmore/window.cpp
@@ -48,8 +48,8 @@
**
****************************************************************************/
-#include "filelistmodel.h"
#include "window.h"
+#include "filelistmodel.h"
#include <QtWidgets>
@@ -66,7 +66,7 @@ Window::Window(QWidget *parent)
QListView *view = new QListView;
view->setModel(model);
- logViewer = new QTextBrowser;
+ logViewer = new QTextBrowser(this);
logViewer->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
connect(lineEdit, &QLineEdit::textChanged,
diff --git a/examples/widgets/itemviews/fetchmore/window.h b/examples/widgets/itemviews/fetchmore/window.h
index f234683785..61bcb94bde 100644
--- a/examples/widgets/itemviews/fetchmore/window.h
+++ b/examples/widgets/itemviews/fetchmore/window.h
@@ -62,7 +62,7 @@ class Window : public QWidget
Q_OBJECT
public:
- Window(QWidget *parent = 0);
+ Window(QWidget *parent = nullptr);
public slots:
void updateLog(int number);
diff --git a/examples/widgets/itemviews/interview/model.cpp b/examples/widgets/itemviews/interview/model.cpp
index a8f3a6f31e..feaf8bb98c 100644
--- a/examples/widgets/itemviews/interview/model.cpp
+++ b/examples/widgets/itemviews/interview/model.cpp
@@ -50,14 +50,13 @@
#include "model.h"
-#include <QIcon>
#include <QPixmap>
Model::Model(int rows, int columns, QObject *parent)
: QAbstractItemModel(parent),
services(QPixmap(":/images/services.png")),
rc(rows), cc(columns),
- tree(new QVector<Node>(rows, Node(0)))
+ tree(new QVector<Node>(rows, Node()))
{
}
diff --git a/examples/widgets/itemviews/interview/model.h b/examples/widgets/itemviews/interview/model.h
index 969cf693b2..132f1d01aa 100644
--- a/examples/widgets/itemviews/interview/model.h
+++ b/examples/widgets/itemviews/interview/model.h
@@ -61,7 +61,7 @@ class Model : public QAbstractItemModel
Q_OBJECT
public:
- Model(int rows, int columns, QObject *parent = 0);
+ Model(int rows, int columns, QObject *parent = nullptr);
~Model();
QModelIndex index(int row, int column, const QModelIndex &parent) const override;
@@ -80,7 +80,7 @@ private:
struct Node
{
- Node(Node *parent = 0) : parent(parent), children(0) {}
+ Node(Node *parent = nullptr) : parent(parent), children(nullptr) {}
~Node() { delete children; }
Node *parent;
QVector<Node> *children;
diff --git a/examples/widgets/itemviews/pixelator/mainwindow.cpp b/examples/widgets/itemviews/pixelator/mainwindow.cpp
index 63617f0169..f6b67e4dba 100644
--- a/examples/widgets/itemviews/pixelator/mainwindow.cpp
+++ b/examples/widgets/itemviews/pixelator/mainwindow.cpp
@@ -48,8 +48,8 @@
**
****************************************************************************/
-#include "imagemodel.h"
#include "mainwindow.h"
+#include "imagemodel.h"
#include "pixeldelegate.h"
#include <QtWidgets>
diff --git a/examples/widgets/itemviews/pixelator/pixeldelegate.cpp b/examples/widgets/itemviews/pixelator/pixeldelegate.cpp
index ecf44c1224..dc8736c836 100644
--- a/examples/widgets/itemviews/pixelator/pixeldelegate.cpp
+++ b/examples/widgets/itemviews/pixelator/pixeldelegate.cpp
@@ -54,10 +54,8 @@
//! [0]
PixelDelegate::PixelDelegate(QObject *parent)
- : QAbstractItemDelegate(parent)
-{
- pixelSize = 12;
-}
+ : QAbstractItemDelegate(parent), pixelSize(12)
+{}
//! [0]
//! [1]
@@ -70,11 +68,11 @@ void PixelDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
//! [1]
//! [3]
- int size = qMin(option.rect.width(), option.rect.height());
+ const int size = qMin(option.rect.width(), option.rect.height());
//! [3] //! [4]
- int brightness = index.model()->data(index, Qt::DisplayRole).toInt();
- double radius = (size / 2.0) - (brightness / 255.0 * size / 2.0);
- if (radius == 0.0)
+ const int brightness = index.model()->data(index, Qt::DisplayRole).toInt();
+ const double radius = (size / 2.0) - (brightness / 255.0 * size / 2.0);
+ if (qFuzzyIsNull(radius))
return;
//! [4]
diff --git a/examples/widgets/itemviews/pixelator/pixeldelegate.h b/examples/widgets/itemviews/pixelator/pixeldelegate.h
index d968d9e8d2..9f52221a28 100644
--- a/examples/widgets/itemviews/pixelator/pixeldelegate.h
+++ b/examples/widgets/itemviews/pixelator/pixeldelegate.h
@@ -61,7 +61,7 @@ class QObject;
class QPainter;
QT_END_NAMESPACE
-static const int ItemSize = 256;
+static constexpr int ItemSize = 256;
//! [0]
class PixelDelegate : public QAbstractItemDelegate
@@ -69,13 +69,13 @@ class PixelDelegate : public QAbstractItemDelegate
Q_OBJECT
public:
- PixelDelegate(QObject *parent = 0);
+ PixelDelegate(QObject *parent = nullptr);
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
QSize sizeHint(const QStyleOptionViewItem &option,
- const QModelIndex &index ) const override;
+ const QModelIndex &index) const override;
public slots:
void setPixelSize(int size);
diff --git a/examples/widgets/itemviews/puzzle/piecesmodel.cpp b/examples/widgets/itemviews/puzzle/piecesmodel.cpp
index 28b46836f4..a9c53ed2cd 100644
--- a/examples/widgets/itemviews/puzzle/piecesmodel.cpp
+++ b/examples/widgets/itemviews/puzzle/piecesmodel.cpp
@@ -134,7 +134,7 @@ QMimeData *PiecesModel::mimeData(const QModelIndexList &indexes) const
QDataStream stream(&encodedData, QIODevice::WriteOnly);
- foreach (QModelIndex index, indexes) {
+ for (const QModelIndex &index : indexes) {
if (index.isValid()) {
QPixmap pixmap = qvariant_cast<QPixmap>(data(index, Qt::UserRole));
QPoint location = data(index, Qt::UserRole+1).toPoint();
@@ -190,10 +190,7 @@ bool PiecesModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
int PiecesModel::rowCount(const QModelIndex &parent) const
{
- if (parent.isValid())
- return 0;
- else
- return pixmaps.size();
+ return parent.isValid() ? 0 : pixmaps.size();
}
Qt::DropActions PiecesModel::supportedDropActions() const
@@ -201,7 +198,7 @@ Qt::DropActions PiecesModel::supportedDropActions() const
return Qt::CopyAction | Qt::MoveAction;
}
-void PiecesModel::addPieces(const QPixmap& pixmap)
+void PiecesModel::addPieces(const QPixmap &pixmap)
{
if (!pixmaps.isEmpty()) {
beginRemoveRows(QModelIndex(), 0, pixmaps.size() - 1);
diff --git a/examples/widgets/itemviews/puzzle/piecesmodel.h b/examples/widgets/itemviews/puzzle/piecesmodel.h
index bd979f4c7e..2a96603707 100644
--- a/examples/widgets/itemviews/puzzle/piecesmodel.h
+++ b/examples/widgets/itemviews/puzzle/piecesmodel.h
@@ -52,10 +52,10 @@
#define PIECESLIST_H
#include <QAbstractListModel>
-#include <QList>
#include <QPixmap>
#include <QPoint>
#include <QStringList>
+#include <QVector>
QT_BEGIN_NAMESPACE
class QMimeData;
@@ -66,7 +66,7 @@ class PiecesModel : public QAbstractListModel
Q_OBJECT
public:
- explicit PiecesModel(int pieceSize, QObject *parent = 0);
+ explicit PiecesModel(int pieceSize, QObject *parent = nullptr);
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
@@ -80,11 +80,11 @@ public:
Qt::DropActions supportedDropActions() const override;
void addPiece(const QPixmap &pixmap, const QPoint &location);
- void addPieces(const QPixmap& pixmap);
+ void addPieces(const QPixmap &pixmap);
private:
- QList<QPoint> locations;
- QList<QPixmap> pixmaps;
+ QVector<QPoint> locations;
+ QVector<QPixmap> pixmaps;
int m_PieceSize;
};
diff --git a/examples/widgets/itemviews/simpledommodel/domitem.cpp b/examples/widgets/itemviews/simpledommodel/domitem.cpp
index c8b35b2e0a..a2dc9530f0 100644
--- a/examples/widgets/itemviews/simpledommodel/domitem.cpp
+++ b/examples/widgets/itemviews/simpledommodel/domitem.cpp
@@ -53,23 +53,20 @@
#include <QtXml>
//! [0]
-DomItem::DomItem(QDomNode &node, int row, DomItem *parent)
-{
- domNode = node;
+DomItem::DomItem(const QDomNode &node, int row, DomItem *parent)
+ : domNode(node),
//! [0]
- // Record the item's location within its parent.
+ // Record the item's location within its parent.
//! [1]
- rowNumber = row;
- parentItem = parent;
-}
+ parentItem(parent),
+ rowNumber(row)
+{}
//! [1]
//! [2]
DomItem::~DomItem()
{
- QHash<int,DomItem*>::iterator it;
- for (it = childItems.begin(); it != childItems.end(); ++it)
- delete it.value();
+ qDeleteAll(childItems);
}
//! [2]
@@ -90,21 +87,22 @@ DomItem *DomItem::parent()
//! [5]
DomItem *DomItem::child(int i)
{
- if (childItems.contains(i))
- return childItems[i];
+ DomItem *childItem = childItems.value(i);
+ if (childItem)
+ return childItem;
+ // if child does not yet exist, create it
if (i >= 0 && i < domNode.childNodes().count()) {
QDomNode childNode = domNode.childNodes().item(i);
- DomItem *childItem = new DomItem(childNode, i, this);
+ childItem = new DomItem(childNode, i, this);
childItems[i] = childItem;
- return childItem;
}
- return 0;
+ return childItem;
}
//! [5]
//! [6]
-int DomItem::row()
+int DomItem::row() const
{
return rowNumber;
}
diff --git a/examples/widgets/itemviews/simpledommodel/domitem.h b/examples/widgets/itemviews/simpledommodel/domitem.h
index b5db16009c..4a74db5139 100644
--- a/examples/widgets/itemviews/simpledommodel/domitem.h
+++ b/examples/widgets/itemviews/simpledommodel/domitem.h
@@ -58,16 +58,16 @@
class DomItem
{
public:
- DomItem(QDomNode &node, int row, DomItem *parent = 0);
+ DomItem(const QDomNode &node, int row, DomItem *parent = nullptr);
~DomItem();
DomItem *child(int i);
DomItem *parent();
QDomNode node() const;
- int row();
+ int row() const;
private:
QDomNode domNode;
- QHash<int,DomItem*> childItems;
+ QHash<int, DomItem *> childItems;
DomItem *parentItem;
int rowNumber;
};
diff --git a/examples/widgets/itemviews/simpledommodel/dommodel.cpp b/examples/widgets/itemviews/simpledommodel/dommodel.cpp
index f9ba0b5801..8e15252ebb 100644
--- a/examples/widgets/itemviews/simpledommodel/dommodel.cpp
+++ b/examples/widgets/itemviews/simpledommodel/dommodel.cpp
@@ -48,16 +48,17 @@
**
****************************************************************************/
-#include "domitem.h"
#include "dommodel.h"
+#include "domitem.h"
#include <QtXml>
//! [0]
-DomModel::DomModel(QDomDocument document, QObject *parent)
- : QAbstractItemModel(parent), domDocument(document)
+DomModel::DomModel(const QDomDocument &document, QObject *parent)
+ : QAbstractItemModel(parent),
+ domDocument(document),
+ rootItem(new DomItem(domDocument, 0))
{
- rootItem = new DomItem(domDocument, 0);
}
//! [0]
@@ -69,8 +70,9 @@ DomModel::~DomModel()
//! [1]
//! [2]
-int DomModel::columnCount(const QModelIndex &/*parent*/) const
+int DomModel::columnCount(const QModelIndex &parent) const
{
+ Q_UNUSED(parent);
return 3;
}
//! [2]
@@ -84,28 +86,31 @@ QVariant DomModel::data(const QModelIndex &index, int role) const
if (role != Qt::DisplayRole)
return QVariant();
- DomItem *item = static_cast<DomItem*>(index.internalPointer());
+ const DomItem *item = static_cast<DomItem*>(index.internalPointer());
- QDomNode node = item->node();
+ const QDomNode node = item->node();
//! [3] //! [4]
- QStringList attributes;
- QDomNamedNodeMap attributeMap = node.attributes();
switch (index.column()) {
case 0:
return node.nodeName();
case 1:
+ {
+ const QDomNamedNodeMap attributeMap = node.attributes();
+ QStringList attributes;
for (int i = 0; i < attributeMap.count(); ++i) {
QDomNode attribute = attributeMap.item(i);
attributes << attribute.nodeName() + "=\""
- +attribute.nodeValue() + '"';
+ + attribute.nodeValue() + '"';
}
return attributes.join(' ');
+ }
case 2:
- return node.nodeValue().split("\n").join(' ');
+ return node.nodeValue().split('\n').join(' ');
default:
- return QVariant();
+ break;
}
+ return QVariant();
}
//! [4]
@@ -113,7 +118,7 @@ QVariant DomModel::data(const QModelIndex &index, int role) const
Qt::ItemFlags DomModel::flags(const QModelIndex &index) const
{
if (!index.isValid())
- return 0;
+ return Qt::NoItemFlags;
return QAbstractItemModel::flags(index);
}
@@ -132,17 +137,15 @@ QVariant DomModel::headerData(int section, Qt::Orientation orientation,
case 2:
return tr("Value");
default:
- return QVariant();
+ break;
}
}
-
return QVariant();
}
//! [6]
//! [7]
-QModelIndex DomModel::index(int row, int column, const QModelIndex &parent)
- const
+QModelIndex DomModel::index(int row, int column, const QModelIndex &parent) const
{
if (!hasIndex(row, column, parent))
return QModelIndex();
@@ -159,8 +162,7 @@ QModelIndex DomModel::index(int row, int column, const QModelIndex &parent)
DomItem *childItem = parentItem->child(row);
if (childItem)
return createIndex(row, column, childItem);
- else
- return QModelIndex();
+ return QModelIndex();
}
//! [8]
diff --git a/examples/widgets/itemviews/simpledommodel/dommodel.h b/examples/widgets/itemviews/simpledommodel/dommodel.h
index 411f58295c..a91bb33cf9 100644
--- a/examples/widgets/itemviews/simpledommodel/dommodel.h
+++ b/examples/widgets/itemviews/simpledommodel/dommodel.h
@@ -63,7 +63,7 @@ class DomModel : public QAbstractItemModel
Q_OBJECT
public:
- explicit DomModel(QDomDocument document, QObject *parent = 0);
+ explicit DomModel(const QDomDocument &document, QObject *parent = nullptr);
~DomModel();
QVariant data(const QModelIndex &index, int role) const override;
diff --git a/examples/widgets/itemviews/simpledommodel/mainwindow.cpp b/examples/widgets/itemviews/simpledommodel/mainwindow.cpp
index 7d43d0fc02..86543b07a6 100644
--- a/examples/widgets/itemviews/simpledommodel/mainwindow.cpp
+++ b/examples/widgets/itemviews/simpledommodel/mainwindow.cpp
@@ -48,22 +48,23 @@
**
****************************************************************************/
-#include "dommodel.h"
#include "mainwindow.h"
+#include "dommodel.h"
#include <QDomDocument>
#include <QTreeView>
#include <QMenuBar>
#include <QFileDialog>
-MainWindow::MainWindow() : QMainWindow(), model(0)
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent),
+ model(new DomModel(QDomDocument(), this)),
+ view(new QTreeView(this))
{
fileMenu = menuBar()->addMenu(tr("&File"));
fileMenu->addAction(tr("&Open..."), this, &MainWindow::openFile, QKeySequence::Open);
fileMenu->addAction(tr("E&xit"), this, &QWidget::close, QKeySequence::Quit);
- model = new DomModel(QDomDocument(), this);
- view = new QTreeView(this);
view->setModel(model);
setCentralWidget(view);
diff --git a/examples/widgets/itemviews/simpledommodel/mainwindow.h b/examples/widgets/itemviews/simpledommodel/mainwindow.h
index 938a1c54c1..b3f8d77f35 100644
--- a/examples/widgets/itemviews/simpledommodel/mainwindow.h
+++ b/examples/widgets/itemviews/simpledommodel/mainwindow.h
@@ -65,7 +65,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
- MainWindow();
+ MainWindow(QWidget *parent = nullptr);
public slots:
void openFile();
diff --git a/examples/widgets/itemviews/simpletreemodel/treeitem.cpp b/examples/widgets/itemviews/simpletreemodel/treeitem.cpp
index e11639ff67..41fe24e737 100644
--- a/examples/widgets/itemviews/simpletreemodel/treeitem.cpp
+++ b/examples/widgets/itemviews/simpletreemodel/treeitem.cpp
@@ -54,16 +54,12 @@
A container for items of data supplied by the simple tree model.
*/
-#include <QStringList>
-
#include "treeitem.h"
//! [0]
-TreeItem::TreeItem(const QList<QVariant> &data, TreeItem *parent)
-{
- m_parentItem = parent;
- m_itemData = data;
-}
+TreeItem::TreeItem(const QVector<QVariant> &data, TreeItem *parent)
+ : m_itemData(data), m_parentItem(parent)
+{}
//! [0]
//! [1]
@@ -83,7 +79,9 @@ void TreeItem::appendChild(TreeItem *item)
//! [3]
TreeItem *TreeItem::child(int row)
{
- return m_childItems.value(row);
+ if (row < 0 || row >= m_childItems.size())
+ return nullptr;
+ return m_childItems.at(row);
}
//! [3]
@@ -104,7 +102,9 @@ int TreeItem::columnCount() const
//! [6]
QVariant TreeItem::data(int column) const
{
- return m_itemData.value(column);
+ if (column < 0 || column >= m_itemData.size())
+ return QVariant();
+ return m_itemData.at(column);
}
//! [6]
diff --git a/examples/widgets/itemviews/simpletreemodel/treeitem.h b/examples/widgets/itemviews/simpletreemodel/treeitem.h
index 8d0bb49627..390433597d 100644
--- a/examples/widgets/itemviews/simpletreemodel/treeitem.h
+++ b/examples/widgets/itemviews/simpletreemodel/treeitem.h
@@ -51,14 +51,14 @@
#ifndef TREEITEM_H
#define TREEITEM_H
-#include <QList>
#include <QVariant>
+#include <QVector>
//! [0]
class TreeItem
{
public:
- explicit TreeItem(const QList<QVariant> &data, TreeItem *parentItem = 0);
+ explicit TreeItem(const QVector<QVariant> &data, TreeItem *parentItem = nullptr);
~TreeItem();
void appendChild(TreeItem *child);
@@ -71,8 +71,8 @@ public:
TreeItem *parentItem();
private:
- QList<TreeItem*> m_childItems;
- QList<QVariant> m_itemData;
+ QVector<TreeItem*> m_childItems;
+ QVector<QVariant> m_itemData;
TreeItem *m_parentItem;
};
//! [0]
diff --git a/examples/widgets/itemviews/simpletreemodel/treemodel.cpp b/examples/widgets/itemviews/simpletreemodel/treemodel.cpp
index 1de970d398..cfa65846ed 100644
--- a/examples/widgets/itemviews/simpletreemodel/treemodel.cpp
+++ b/examples/widgets/itemviews/simpletreemodel/treemodel.cpp
@@ -55,8 +55,8 @@
models.
*/
-#include "treeitem.h"
#include "treemodel.h"
+#include "treeitem.h"
#include <QStringList>
@@ -64,10 +64,8 @@
TreeModel::TreeModel(const QString &data, QObject *parent)
: QAbstractItemModel(parent)
{
- QList<QVariant> rootData;
- rootData << "Title" << "Summary";
- rootItem = new TreeItem(rootData);
- setupModelData(data.split(QString("\n")), rootItem);
+ rootItem = new TreeItem({tr("Title"), tr("Summary")});
+ setupModelData(data.split('\n'), rootItem);
}
//! [0]
@@ -83,8 +81,7 @@ int TreeModel::columnCount(const QModelIndex &parent) const
{
if (parent.isValid())
return static_cast<TreeItem*>(parent.internalPointer())->columnCount();
- else
- return rootItem->columnCount();
+ return rootItem->columnCount();
}
//! [2]
@@ -107,7 +104,7 @@ QVariant TreeModel::data(const QModelIndex &index, int role) const
Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const
{
if (!index.isValid())
- return 0;
+ return Qt::NoItemFlags;
return QAbstractItemModel::flags(index);
}
@@ -125,8 +122,7 @@ QVariant TreeModel::headerData(int section, Qt::Orientation orientation,
//! [5]
//! [6]
-QModelIndex TreeModel::index(int row, int column, const QModelIndex &parent)
- const
+QModelIndex TreeModel::index(int row, int column, const QModelIndex &parent) const
{
if (!hasIndex(row, column, parent))
return QModelIndex();
@@ -141,8 +137,7 @@ QModelIndex TreeModel::index(int row, int column, const QModelIndex &parent)
TreeItem *childItem = parentItem->child(row);
if (childItem)
return createIndex(row, column, childItem);
- else
- return QModelIndex();
+ return QModelIndex();
}
//! [6]
@@ -180,8 +175,8 @@ int TreeModel::rowCount(const QModelIndex &parent) const
void TreeModel::setupModelData(const QStringList &lines, TreeItem *parent)
{
- QList<TreeItem*> parents;
- QList<int> indentations;
+ QVector<TreeItem*> parents;
+ QVector<int> indentations;
parents << parent;
indentations << 0;
@@ -195,14 +190,15 @@ void TreeModel::setupModelData(const QStringList &lines, TreeItem *parent)
position++;
}
- QString lineData = lines[number].mid(position).trimmed();
+ const QString lineData = lines[number].mid(position).trimmed();
if (!lineData.isEmpty()) {
// Read the column data from the rest of the line.
- QStringList columnStrings = lineData.split("\t", QString::SkipEmptyParts);
- QList<QVariant> columnData;
- for (int column = 0; column < columnStrings.count(); ++column)
- columnData << columnStrings[column];
+ const QStringList columnStrings = lineData.split('\t', QString::SkipEmptyParts);
+ QVector<QVariant> columnData;
+ columnData.reserve(columnStrings.count());
+ for (const QString &columnString : columnStrings)
+ columnData << columnString;
if (position > indentations.last()) {
// The last child of the current parent is now the new parent
@@ -222,7 +218,6 @@ void TreeModel::setupModelData(const QStringList &lines, TreeItem *parent)
// Append a new item to the current parent's list of children.
parents.last()->appendChild(new TreeItem(columnData, parents.last()));
}
-
++number;
}
}
diff --git a/examples/widgets/itemviews/simpletreemodel/treemodel.h b/examples/widgets/itemviews/simpletreemodel/treemodel.h
index 800728fb82..76fd03f112 100644
--- a/examples/widgets/itemviews/simpletreemodel/treemodel.h
+++ b/examples/widgets/itemviews/simpletreemodel/treemodel.h
@@ -63,7 +63,7 @@ class TreeModel : public QAbstractItemModel
Q_OBJECT
public:
- explicit TreeModel(const QString &data, QObject *parent = 0);
+ explicit TreeModel(const QString &data, QObject *parent = nullptr);
~TreeModel();
QVariant data(const QModelIndex &index, int role) const override;
diff --git a/examples/widgets/itemviews/simplewidgetmapper/window.h b/examples/widgets/itemviews/simplewidgetmapper/window.h
index baa087f8ae..d04b528e16 100644
--- a/examples/widgets/itemviews/simplewidgetmapper/window.h
+++ b/examples/widgets/itemviews/simplewidgetmapper/window.h
@@ -69,7 +69,7 @@ class Window : public QWidget
Q_OBJECT
public:
- Window(QWidget *parent = 0);
+ Window(QWidget *parent = nullptr);
private slots:
void updateButtons(int row);
diff --git a/examples/widgets/itemviews/spinboxdelegate/delegate.cpp b/examples/widgets/itemviews/spinboxdelegate/delegate.cpp
index e7e03688c3..f0fe524a60 100644
--- a/examples/widgets/itemviews/spinboxdelegate/delegate.cpp
+++ b/examples/widgets/itemviews/spinboxdelegate/delegate.cpp
@@ -68,8 +68,8 @@ SpinBoxDelegate::SpinBoxDelegate(QObject *parent)
//! [1]
QWidget *SpinBoxDelegate::createEditor(QWidget *parent,
- const QStyleOptionViewItem &/* option */,
- const QModelIndex &/* index */) const
+ const QStyleOptionViewItem &/* option */,
+ const QModelIndex &/* index */) const
{
QSpinBox *editor = new QSpinBox(parent);
editor->setFrame(false);
@@ -105,7 +105,8 @@ void SpinBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
//! [4]
void SpinBoxDelegate::updateEditorGeometry(QWidget *editor,
- const QStyleOptionViewItem &option, const QModelIndex &/* index */) const
+ const QStyleOptionViewItem &option,
+ const QModelIndex &/* index */) const
{
editor->setGeometry(option.rect);
}
diff --git a/examples/widgets/itemviews/spinboxdelegate/delegate.h b/examples/widgets/itemviews/spinboxdelegate/delegate.h
index 47ef1555f7..5dbdda9cd0 100644
--- a/examples/widgets/itemviews/spinboxdelegate/delegate.h
+++ b/examples/widgets/itemviews/spinboxdelegate/delegate.h
@@ -59,7 +59,7 @@ class SpinBoxDelegate : public QStyledItemDelegate
Q_OBJECT
public:
- SpinBoxDelegate(QObject *parent = 0);
+ SpinBoxDelegate(QObject *parent = nullptr);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
@@ -68,8 +68,8 @@ public:
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const override;
- void updateEditorGeometry(QWidget *editor,
- const QStyleOptionViewItem &option, const QModelIndex &index) const override;
+ void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option,
+ const QModelIndex &index) const override;
};
//! [0]
diff --git a/examples/widgets/itemviews/spreadsheet/main.cpp b/examples/widgets/itemviews/spreadsheet/main.cpp
index 769edbdf03..548dc8d604 100644
--- a/examples/widgets/itemviews/spreadsheet/main.cpp
+++ b/examples/widgets/itemviews/spreadsheet/main.cpp
@@ -53,7 +53,8 @@
#include <QApplication>
#include <QLayout>
-int main(int argc, char** argv) {
+int main(int argc, char **argv)
+{
Q_INIT_RESOURCE(spreadsheet);
QApplication app(argc, argv);
SpreadSheet sheet(10, 6);
diff --git a/examples/widgets/itemviews/spreadsheet/printview.cpp b/examples/widgets/itemviews/spreadsheet/printview.cpp
index 31424e9070..7db1a6bad9 100644
--- a/examples/widgets/itemviews/spreadsheet/printview.cpp
+++ b/examples/widgets/itemviews/spreadsheet/printview.cpp
@@ -48,12 +48,11 @@
**
****************************************************************************/
+#include "printview.h"
+
#ifndef QT_NO_PRINTER
#include <QPrinter>
#endif
-#include <QStyleOptionViewItem>
-
-#include "printview.h"
PrintView::PrintView()
{
diff --git a/examples/widgets/itemviews/spreadsheet/spreadsheet.cpp b/examples/widgets/itemviews/spreadsheet/spreadsheet.cpp
index 621f655b02..421b4a240c 100644
--- a/examples/widgets/itemviews/spreadsheet/spreadsheet.cpp
+++ b/examples/widgets/itemviews/spreadsheet/spreadsheet.cpp
@@ -48,36 +48,30 @@
**
****************************************************************************/
-#include <QtWidgets>
-#if defined(QT_PRINTSUPPORT_LIB)
-#include <QtPrintSupport/qtprintsupportglobal.h>
-#if QT_CONFIG(printdialog)
-#include <QPrinter>
-#include <QPrintDialog>
-#endif
-#if QT_CONFIG(printpreviewdialog)
-#include <QPrintPreviewDialog>
-#endif
-#endif
-
#include "spreadsheet.h"
#include "spreadsheetdelegate.h"
#include "spreadsheetitem.h"
#include "printview.h"
+#include <QtWidgets>
+#if defined(QT_PRINTSUPPORT_LIB)
+#include <QtPrintSupport>
+#endif
+
SpreadSheet::SpreadSheet(int rows, int cols, QWidget *parent)
- : QMainWindow(parent)
+ : QMainWindow(parent),
+ toolBar(new QToolBar(this)),
+ cellLabel(new QLabel(toolBar)),
+ table(new QTableWidget(rows, cols, this)),
+ formulaInput(new QLineEdit(this))
{
- addToolBar(toolBar = new QToolBar());
- formulaInput = new QLineEdit();
+ addToolBar(toolBar);
- cellLabel = new QLabel(toolBar);
cellLabel->setMinimumSize(80, 0);
toolBar->addWidget(cellLabel);
toolBar->addWidget(formulaInput);
- table = new QTableWidget(rows, cols, this);
table->setSizeAdjustPolicy(QTableWidget::AdjustToContents);
for (int c = 0; c < cols; ++c) {
QString character(QChar('A' + c));
@@ -88,7 +82,7 @@ SpreadSheet::SpreadSheet(int rows, int cols, QWidget *parent)
table->setItemDelegate(new SpreadSheetDelegate());
createActions();
- updateColor(0);
+ updateColor(nullptr);
setupMenuBar();
setupContents();
setupContextMenu();
@@ -103,7 +97,8 @@ SpreadSheet::SpreadSheet(int rows, int cols, QWidget *parent)
this, &SpreadSheet::updateLineEdit);
connect(table, &QTableWidget::itemChanged,
this, &SpreadSheet::updateStatus);
- connect(formulaInput, &QLineEdit::returnPressed, this, &SpreadSheet::returnPressed);
+ connect(formulaInput, &QLineEdit::returnPressed,
+ this, &SpreadSheet::returnPressed);
connect(table, &QTableWidget::itemChanged,
this, &SpreadSheet::updateLineEdit);
@@ -245,11 +240,11 @@ void SpreadSheet::selectColor()
if (!col.isValid())
return;
- QList<QTableWidgetItem*> selected = table->selectedItems();
- if (selected.count() == 0)
+ const QList<QTableWidgetItem *> selected = table->selectedItems();
+ if (selected.isEmpty())
return;
- foreach (QTableWidgetItem *i, selected) {
+ for (QTableWidgetItem *i : selected) {
if (i)
i->setBackgroundColor(col);
}
@@ -259,8 +254,8 @@ void SpreadSheet::selectColor()
void SpreadSheet::selectFont()
{
- QList<QTableWidgetItem*> selected = table->selectedItems();
- if (selected.count() == 0)
+ const QList<QTableWidgetItem *> selected = table->selectedItems();
+ if (selected.isEmpty())
return;
bool ok = false;
@@ -268,7 +263,7 @@ void SpreadSheet::selectFont()
if (!ok)
return;
- foreach (QTableWidgetItem *i, selected) {
+ for (QTableWidgetItem *i : selected) {
if (i)
i->setFont(fnt);
}
@@ -397,7 +392,7 @@ void SpreadSheet::actionSum()
int col_last = 0;
int col_cur = 0;
- QList<QTableWidgetItem*> selected = table->selectedItems();
+ const QList<QTableWidgetItem *> selected = table->selectedItems();
if (!selected.isEmpty()) {
QTableWidgetItem *first = selected.first();
@@ -408,7 +403,7 @@ void SpreadSheet::actionSum()
col_last = table->column(last);
}
- QTableWidgetItem *current = table->currentItem();
+ const QTableWidgetItem *current = table->currentItem();
if (current) {
row_cur = table->row(current);
@@ -435,7 +430,7 @@ void SpreadSheet::actionMath_helper(const QString &title, const QString &op)
QString cell2 = "C2";
QString out = "C3";
- QTableWidgetItem *current = table->currentItem();
+ const QTableWidgetItem *current = table->currentItem();
if (current)
out = encode_pos(table->currentRow(), table->currentColumn());
@@ -468,8 +463,9 @@ void SpreadSheet::actionDivide()
void SpreadSheet::clear()
{
- foreach (QTableWidgetItem *i, table->selectedItems())
- i->setText("");
+ const QList<QTableWidgetItem *> selectedItems = table->selectedItems();
+ for (QTableWidgetItem *i : selectedItems)
+ i->setText(QString());
}
void SpreadSheet::setupContextMenu()
diff --git a/examples/widgets/itemviews/spreadsheet/spreadsheet.h b/examples/widgets/itemviews/spreadsheet/spreadsheet.h
index a90d1d8c20..b36a377156 100644
--- a/examples/widgets/itemviews/spreadsheet/spreadsheet.h
+++ b/examples/widgets/itemviews/spreadsheet/spreadsheet.h
@@ -65,10 +65,8 @@ QT_END_NAMESPACE
class SpreadSheet : public QMainWindow
{
Q_OBJECT
-
public:
-
- SpreadSheet(int rows, int cols, QWidget *parent = 0);
+ SpreadSheet(int rows, int cols, QWidget *parent = nullptr);
public slots:
void updateStatus(QTableWidgetItem *item);
diff --git a/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.cpp b/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.cpp
index aaf8902af5..eadd5fadb8 100644
--- a/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.cpp
+++ b/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.cpp
@@ -53,11 +53,12 @@
#include <QtWidgets>
SpreadSheetDelegate::SpreadSheetDelegate(QObject *parent)
- : QItemDelegate(parent) {}
+ : QItemDelegate(parent)
+{}
QWidget *SpreadSheetDelegate::createEditor(QWidget *parent,
- const QStyleOptionViewItem &,
- const QModelIndex &index) const
+ const QStyleOptionViewItem &,
+ const QModelIndex &index) const
{
if (index.column() == 1) {
QDateTimeEdit *editor = new QDateTimeEdit(parent);
@@ -92,7 +93,7 @@ void SpreadSheetDelegate::commitAndCloseEditor()
}
void SpreadSheetDelegate::setEditorData(QWidget *editor,
- const QModelIndex &index) const
+ const QModelIndex &index) const
{
QLineEdit *edit = qobject_cast<QLineEdit*>(editor);
if (edit) {
@@ -109,7 +110,8 @@ void SpreadSheetDelegate::setEditorData(QWidget *editor,
}
void SpreadSheetDelegate::setModelData(QWidget *editor,
- QAbstractItemModel *model, const QModelIndex &index) const
+ QAbstractItemModel *model,
+ const QModelIndex &index) const
{
QLineEdit *edit = qobject_cast<QLineEdit *>(editor);
if (edit) {
diff --git a/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.h b/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.h
index 333467720f..c89459cadf 100644
--- a/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.h
+++ b/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.h
@@ -51,8 +51,6 @@
#ifndef SPREADSHEETDELEGATE_H
#define SPREADSHEETDELEGATE_H
-#include "spreadsheet.h"
-
#include <QItemDelegate>
class SpreadSheetDelegate : public QItemDelegate
@@ -60,7 +58,7 @@ class SpreadSheetDelegate : public QItemDelegate
Q_OBJECT
public:
- SpreadSheetDelegate(QObject *parent = 0);
+ SpreadSheetDelegate(QObject *parent = nullptr);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &,
const QModelIndex &index) const override;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
diff --git a/examples/widgets/itemviews/spreadsheet/spreadsheetitem.cpp b/examples/widgets/itemviews/spreadsheet/spreadsheetitem.cpp
index 4c18fa8251..62d3a6fdcd 100644
--- a/examples/widgets/itemviews/spreadsheet/spreadsheetitem.cpp
+++ b/examples/widgets/itemviews/spreadsheet/spreadsheetitem.cpp
@@ -50,19 +50,9 @@
#include "spreadsheetitem.h"
-SpreadSheetItem::SpreadSheetItem()
- : QTableWidgetItem(), isResolving(false)
-{
-}
-
-SpreadSheetItem::SpreadSheetItem(const QString &text)
- : QTableWidgetItem(text), isResolving(false)
-{
-}
-
QTableWidgetItem *SpreadSheetItem::clone() const
{
- SpreadSheetItem *item = new SpreadSheetItem();
+ SpreadSheetItem *item = new SpreadSheetItem;
*item = *this;
return item;
}
@@ -75,21 +65,20 @@ QVariant SpreadSheetItem::data(int role) const
if (role == Qt::DisplayRole)
return display();
- QString t = display().toString();
- bool isNumber = false;
- int number = t.toInt(&isNumber);
+ const QString t = display().toString();
- if (role == Qt::TextColorRole) {
- if (!isNumber)
- return QVariant::fromValue(QColor(Qt::black));
- else if (number < 0)
- return QVariant::fromValue(QColor(Qt::red));
- return QVariant::fromValue(QColor(Qt::blue));
+ if (role == Qt::ForegroundRole) {
+ bool isNumber = false;
+ const int number = t.toInt(&isNumber);
+ QColor color = Qt::black;
+ if (isNumber)
+ color = (number < 0) ? Qt::red : Qt::blue;
+ return QVariant::fromValue(color);
}
- if (role == Qt::TextAlignmentRole)
- if (!t.isEmpty() && (t.at(0).isNumber() || t.at(0) == '-'))
- return (int)(Qt::AlignRight | Qt::AlignVCenter);
+ if (role == Qt::TextAlignmentRole)
+ if (!t.isEmpty() && (t.at(0).isNumber() || t.at(0) == '-'))
+ return int(Qt::AlignRight | Qt::AlignVCenter);
return QTableWidgetItem::data(role);
}
diff --git a/examples/widgets/itemviews/spreadsheet/spreadsheetitem.h b/examples/widgets/itemviews/spreadsheet/spreadsheetitem.h
index 46460df527..159f4a7eea 100644
--- a/examples/widgets/itemviews/spreadsheet/spreadsheetitem.h
+++ b/examples/widgets/itemviews/spreadsheet/spreadsheetitem.h
@@ -58,8 +58,7 @@
class SpreadSheetItem : public QTableWidgetItem
{
public:
- SpreadSheetItem();
- SpreadSheetItem(const QString &text);
+ using QTableWidgetItem::QTableWidgetItem;
QTableWidgetItem *clone() const override;
@@ -74,10 +73,10 @@ public:
static QVariant computeFormula(const QString &formula,
const QTableWidget *widget,
- const QTableWidgetItem *self = 0);
+ const QTableWidgetItem *self = nullptr);
private:
- mutable bool isResolving;
+ mutable bool isResolving = false;
};
#endif // SPREADSHEETITEM_H
diff --git a/examples/widgets/itemviews/stardelegate/main.cpp b/examples/widgets/itemviews/stardelegate/main.cpp
index 51ca30c73a..452976bba0 100644
--- a/examples/widgets/itemviews/stardelegate/main.cpp
+++ b/examples/widgets/itemviews/stardelegate/main.cpp
@@ -101,10 +101,7 @@ int main(int argc, char *argv[])
tableWidget.setEditTriggers(QAbstractItemView::DoubleClicked
| QAbstractItemView::SelectedClicked);
tableWidget.setSelectionBehavior(QAbstractItemView::SelectRows);
-
- QStringList headerLabels;
- headerLabels << "Title" << "Genre" << "Artist" << "Rating";
- tableWidget.setHorizontalHeaderLabels(headerLabels);
+ tableWidget.setHorizontalHeaderLabels({"Title", "Genre", "Artist", "Rating"});
populateTableWidget(&tableWidget);
diff --git a/examples/widgets/itemviews/stardelegate/stardelegate.cpp b/examples/widgets/itemviews/stardelegate/stardelegate.cpp
index da5902a160..41ae5a920f 100644
--- a/examples/widgets/itemviews/stardelegate/stardelegate.cpp
+++ b/examples/widgets/itemviews/stardelegate/stardelegate.cpp
@@ -65,7 +65,7 @@ void StarDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
painter->fillRect(option.rect, option.palette.highlight());
starRating.paint(painter, option.rect, option.palette,
- StarRating::ReadOnly);
+ StarRating::EditMode::ReadOnly);
} else {
QStyledItemDelegate::paint(painter, option, index);
}
@@ -79,9 +79,8 @@ QSize StarDelegate::sizeHint(const QStyleOptionViewItem &option,
if (index.data().canConvert<StarRating>()) {
StarRating starRating = qvariant_cast<StarRating>(index.data());
return starRating.sizeHint();
- } else {
- return QStyledItemDelegate::sizeHint(option, index);
}
+ return QStyledItemDelegate::sizeHint(option, index);
}
//! [1]
@@ -96,9 +95,8 @@ QWidget *StarDelegate::createEditor(QWidget *parent,
connect(editor, &StarEditor::editingFinished,
this, &StarDelegate::commitAndCloseEditor);
return editor;
- } else {
- return QStyledItemDelegate::createEditor(parent, option, index);
}
+ return QStyledItemDelegate::createEditor(parent, option, index);
}
//! [2]
diff --git a/examples/widgets/itemviews/stardelegate/stardelegate.h b/examples/widgets/itemviews/stardelegate/stardelegate.h
index ffc65fbedd..1fc31f8ee8 100644
--- a/examples/widgets/itemviews/stardelegate/stardelegate.h
+++ b/examples/widgets/itemviews/stardelegate/stardelegate.h
@@ -57,9 +57,8 @@
class StarDelegate : public QStyledItemDelegate
{
Q_OBJECT
-
public:
- StarDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent) {}
+ using QStyledItemDelegate::QStyledItemDelegate;
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
diff --git a/examples/widgets/itemviews/stardelegate/stareditor.cpp b/examples/widgets/itemviews/stardelegate/stareditor.cpp
index 19a4b54d9e..43706eeae0 100644
--- a/examples/widgets/itemviews/stardelegate/stareditor.cpp
+++ b/examples/widgets/itemviews/stardelegate/stareditor.cpp
@@ -48,11 +48,11 @@
**
****************************************************************************/
-#include <QtWidgets>
-
#include "stareditor.h"
#include "starrating.h"
+#include <QtWidgets>
+
//! [0]
StarEditor::StarEditor(QWidget *parent)
: QWidget(parent)
@@ -71,35 +71,37 @@ QSize StarEditor::sizeHint() const
void StarEditor::paintEvent(QPaintEvent *)
{
QPainter painter(this);
- myStarRating.paint(&painter, rect(), this->palette(),
- StarRating::Editable);
+ myStarRating.paint(&painter, rect(), palette(),
+ StarRating::EditMode::Editable);
}
//! [1]
//! [2]
void StarEditor::mouseMoveEvent(QMouseEvent *event)
{
- int star = starAtPosition(event->x());
+ const int star = starAtPosition(event->x());
if (star != myStarRating.starCount() && star != -1) {
myStarRating.setStarCount(star);
update();
}
+ QWidget::mouseMoveEvent(event);
}
//! [2]
//! [3]
-void StarEditor::mouseReleaseEvent(QMouseEvent * /* event */)
+void StarEditor::mouseReleaseEvent(QMouseEvent *event)
{
emit editingFinished();
+ QWidget::mouseReleaseEvent(event);
}
//! [3]
//! [4]
-int StarEditor::starAtPosition(int x)
+int StarEditor::starAtPosition(int x) const
{
- int star = (x / (myStarRating.sizeHint().width()
- / myStarRating.maxStarCount())) + 1;
+ const int star = (x / (myStarRating.sizeHint().width()
+ / myStarRating.maxStarCount())) + 1;
if (star <= 0 || star > myStarRating.maxStarCount())
return -1;
diff --git a/examples/widgets/itemviews/stardelegate/stareditor.h b/examples/widgets/itemviews/stardelegate/stareditor.h
index 4a4c3a4954..8b1bf2efed 100644
--- a/examples/widgets/itemviews/stardelegate/stareditor.h
+++ b/examples/widgets/itemviews/stardelegate/stareditor.h
@@ -59,9 +59,8 @@
class StarEditor : public QWidget
{
Q_OBJECT
-
public:
- StarEditor(QWidget *parent = 0);
+ StarEditor(QWidget *parent = nullptr);
QSize sizeHint() const override;
void setStarRating(const StarRating &starRating) {
@@ -78,7 +77,7 @@ protected:
void mouseReleaseEvent(QMouseEvent *event) override;
private:
- int starAtPosition(int x);
+ int starAtPosition(int x) const;
StarRating myStarRating;
};
diff --git a/examples/widgets/itemviews/stardelegate/starrating.cpp b/examples/widgets/itemviews/stardelegate/starrating.cpp
index 845e474de9..15e14965e3 100644
--- a/examples/widgets/itemviews/stardelegate/starrating.cpp
+++ b/examples/widgets/itemviews/stardelegate/starrating.cpp
@@ -48,19 +48,18 @@
**
****************************************************************************/
+#include "starrating.h"
+
#include <QtWidgets>
#include <cmath>
-#include "starrating.h"
-
-const int PaintingScaleFactor = 20;
+constexpr int PaintingScaleFactor = 20;
//! [0]
StarRating::StarRating(int starCount, int maxStarCount)
+ : myStarCount(starCount),
+ myMaxStarCount(maxStarCount)
{
- myStarCount = starCount;
- myMaxStarCount = maxStarCount;
-
starPolygon << QPointF(1.0, 0.5);
for (int i = 1; i < 5; ++i)
starPolygon << QPointF(0.5 + 0.5 * std::cos(0.8 * i * 3.14),
@@ -87,23 +86,19 @@ void StarRating::paint(QPainter *painter, const QRect &rect,
painter->setRenderHint(QPainter::Antialiasing, true);
painter->setPen(Qt::NoPen);
+ painter->setBrush(mode == EditMode::Editable ?
+ palette.highlight() :
+ palette.foreground());
- if (mode == Editable) {
- painter->setBrush(palette.highlight());
- } else {
- painter->setBrush(palette.foreground());
- }
-
- int yOffset = (rect.height() - PaintingScaleFactor) / 2;
+ const int yOffset = (rect.height() - PaintingScaleFactor) / 2;
painter->translate(rect.x(), rect.y() + yOffset);
painter->scale(PaintingScaleFactor, PaintingScaleFactor);
for (int i = 0; i < myMaxStarCount; ++i) {
- if (i < myStarCount) {
+ if (i < myStarCount)
painter->drawPolygon(starPolygon, Qt::WindingFill);
- } else if (mode == Editable) {
+ else if (mode == EditMode::Editable)
painter->drawPolygon(diamondPolygon, Qt::WindingFill);
- }
painter->translate(1.0, 0.0);
}
diff --git a/examples/widgets/itemviews/stardelegate/starrating.h b/examples/widgets/itemviews/stardelegate/starrating.h
index fa77311914..fc3028db58 100644
--- a/examples/widgets/itemviews/stardelegate/starrating.h
+++ b/examples/widgets/itemviews/stardelegate/starrating.h
@@ -51,15 +51,15 @@
#ifndef STARRATING_H
#define STARRATING_H
-#include <QMetaType>
-#include <QPointF>
-#include <QVector>
+#include <QPainter>
+#include <QPolygonF>
+#include <QSize>
//! [0]
class StarRating
{
public:
- enum EditMode { Editable, ReadOnly };
+ enum class EditMode { Editable, ReadOnly };
explicit StarRating(int starCount = 1, int maxStarCount = 5);
diff --git a/examples/widgets/itemviews/storageview/main.cpp b/examples/widgets/itemviews/storageview/main.cpp
index f349e58fad..8f23a4820a 100644
--- a/examples/widgets/itemviews/storageview/main.cpp
+++ b/examples/widgets/itemviews/storageview/main.cpp
@@ -49,10 +49,9 @@
**
****************************************************************************/
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QHeaderView>
-#include <QtWidgets/QShortcut>
-#include <QtWidgets/QTreeView>
+#include <QApplication>
+#include <QShortcut>
+#include <QTreeView>
#include "storagemodel.h"
diff --git a/examples/widgets/itemviews/storageview/storagemodel.cpp b/examples/widgets/itemviews/storageview/storagemodel.cpp
index 063f126d86..b98fc8445c 100644
--- a/examples/widgets/itemviews/storageview/storagemodel.cpp
+++ b/examples/widgets/itemviews/storageview/storagemodel.cpp
@@ -53,14 +53,6 @@
#include <QDir>
#include <QLocale>
-#include <qmath.h>
-#include <algorithm>
-#include <cmath>
-
-StorageModel::StorageModel(QObject *parent) :
- QAbstractTableModel(parent)
-{
-}
void StorageModel::refresh()
{
diff --git a/examples/widgets/itemviews/storageview/storagemodel.h b/examples/widgets/itemviews/storageview/storagemodel.h
index 787b2f04de..597218c220 100644
--- a/examples/widgets/itemviews/storageview/storagemodel.h
+++ b/examples/widgets/itemviews/storageview/storagemodel.h
@@ -74,7 +74,7 @@ public:
ColumnCount
};
- explicit StorageModel(QObject *parent = nullptr);
+ using QAbstractTableModel::QAbstractTableModel;
int columnCount(const QModelIndex &parent) const override;
int rowCount(const QModelIndex &parent) const override;
diff --git a/examples/widgets/layouts/basiclayouts/dialog.cpp b/examples/widgets/layouts/basiclayouts/dialog.cpp
index 7acbc50eb7..8376820545 100644
--- a/examples/widgets/layouts/basiclayouts/dialog.cpp
+++ b/examples/widgets/layouts/basiclayouts/dialog.cpp
@@ -69,8 +69,8 @@ Dialog::Dialog()
buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
| QDialogButtonBox::Cancel);
- connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
- connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+ connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
+ connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
//! [1]
//! [2]
@@ -99,7 +99,7 @@ void Dialog::createMenu()
exitAction = fileMenu->addAction(tr("E&xit"));
menuBar->addMenu(fileMenu);
- connect(exitAction, SIGNAL(triggered()), this, SLOT(accept()));
+ connect(exitAction, &QAction::triggered, this, &QDialog::accept);
}
//! [6]
diff --git a/examples/widgets/layouts/borderlayout/borderlayout.cpp b/examples/widgets/layouts/borderlayout/borderlayout.cpp
index 9b142584c9..c929d3b2a4 100644
--- a/examples/widgets/layouts/borderlayout/borderlayout.cpp
+++ b/examples/widgets/layouts/borderlayout/borderlayout.cpp
@@ -98,10 +98,7 @@ int BorderLayout::count() const
QLayoutItem *BorderLayout::itemAt(int index) const
{
ItemWrapper *wrapper = list.value(index);
- if (wrapper)
- return wrapper->item;
- else
- return 0;
+ return wrapper ? wrapper->item : nullptr;
}
QSize BorderLayout::minimumSize() const
@@ -111,7 +108,7 @@ QSize BorderLayout::minimumSize() const
void BorderLayout::setGeometry(const QRect &rect)
{
- ItemWrapper *center = 0;
+ ItemWrapper *center = nullptr;
int eastWidth = 0;
int westWidth = 0;
int northHeight = 0;
@@ -189,7 +186,7 @@ QLayoutItem *BorderLayout::takeAt(int index)
ItemWrapper *layoutStruct = list.takeAt(index);
return layoutStruct->item;
}
- return 0;
+ return nullptr;
}
void BorderLayout::add(QLayoutItem *item, Position position)
diff --git a/examples/widgets/layouts/dynamiclayouts/dialog.cpp b/examples/widgets/layouts/dynamiclayouts/dialog.cpp
index f46053372a..baf3b4cf1e 100644
--- a/examples/widgets/layouts/dynamiclayouts/dialog.cpp
+++ b/examples/widgets/layouts/dynamiclayouts/dialog.cpp
@@ -104,7 +104,7 @@ void Dialog::rotateWidgets()
{
Q_ASSERT(rotatableWidgets.count() % 2 == 0);
- foreach (QWidget *widget, rotatableWidgets)
+ for (QWidget *widget : qAsConst(rotatableWidgets))
rotatableLayout->removeWidget(widget);
rotatableWidgets.enqueue(rotatableWidgets.dequeue());
diff --git a/examples/widgets/layouts/flowlayout/flowlayout.cpp b/examples/widgets/layouts/flowlayout/flowlayout.cpp
index 9203da0ba1..53613b8b20 100644
--- a/examples/widgets/layouts/flowlayout/flowlayout.cpp
+++ b/examples/widgets/layouts/flowlayout/flowlayout.cpp
@@ -116,8 +116,7 @@ QLayoutItem *FlowLayout::takeAt(int index)
{
if (index >= 0 && index < itemList.size())
return itemList.takeAt(index);
- else
- return 0;
+ return nullptr;
}
//! [5]
@@ -156,8 +155,7 @@ QSize FlowLayout::sizeHint() const
QSize FlowLayout::minimumSize() const
{
QSize size;
- QLayoutItem *item;
- foreach (item, itemList)
+ for (const QLayoutItem *item : qAsConst(itemList))
size = size.expandedTo(item->minimumSize());
size += QSize(2*margin(), 2*margin());
@@ -177,9 +175,8 @@ int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
//! [9]
//! [10]
- QLayoutItem *item;
- foreach (item, itemList) {
- QWidget *wid = item->widget();
+ for (QLayoutItem *item : qAsConst(itemList)) {
+ const QWidget *wid = item->widget();
int spaceX = horizontalSpacing();
if (spaceX == -1)
spaceX = wid->style()->layoutSpacing(
@@ -215,7 +212,7 @@ int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const
return -1;
} else if (parent->isWidgetType()) {
QWidget *pw = static_cast<QWidget *>(parent);
- return pw->style()->pixelMetric(pm, 0, pw);
+ return pw->style()->pixelMetric(pm, nullptr, pw);
} else {
return static_cast<QLayout *>(parent)->spacing();
}
diff --git a/examples/widgets/mainwindows/application/mainwindow.cpp b/examples/widgets/mainwindows/application/mainwindow.cpp
index dc93fe4eb2..4b639ead18 100644
--- a/examples/widgets/mainwindows/application/mainwindow.cpp
+++ b/examples/widgets/mainwindows/application/mainwindow.cpp
@@ -337,11 +337,11 @@ void MainWindow::loadFile(const QString &fileName)
QTextStream in(&file);
#ifndef QT_NO_CURSOR
- QApplication::setOverrideCursor(Qt::WaitCursor);
+ QGuiApplication::setOverrideCursor(Qt::WaitCursor);
#endif
textEdit->setPlainText(in.readAll());
#ifndef QT_NO_CURSOR
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
setCurrentFile(fileName);
@@ -364,11 +364,11 @@ bool MainWindow::saveFile(const QString &fileName)
QTextStream out(&file);
#ifndef QT_NO_CURSOR
- QApplication::setOverrideCursor(Qt::WaitCursor);
+ QGuiApplication::setOverrideCursor(Qt::WaitCursor);
#endif
out << textEdit->toPlainText();
#ifndef QT_NO_CURSOR
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
setCurrentFile(fileName);
diff --git a/examples/widgets/mainwindows/dockwidgets/mainwindow.cpp b/examples/widgets/mainwindows/dockwidgets/mainwindow.cpp
index 47a6e78265..a62765cdab 100644
--- a/examples/widgets/mainwindows/dockwidgets/mainwindow.cpp
+++ b/examples/widgets/mainwindows/dockwidgets/mainwindow.cpp
@@ -161,9 +161,9 @@ void MainWindow::save()
}
QTextStream out(&file);
- QApplication::setOverrideCursor(Qt::WaitCursor);
+ QGuiApplication::setOverrideCursor(Qt::WaitCursor);
out << textEdit->toHtml();
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
statusBar()->showMessage(tr("Saved '%1'").arg(fileName), 2000);
}
diff --git a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
index 720f9a2085..4e4c15ccaf 100644
--- a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
+++ b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
@@ -454,8 +454,8 @@ void ColorSwatch::updateContextMenu()
tabMenu->clear();
splitHMenu->clear();
splitVMenu->clear();
- QList<ColorSwatch*> dock_list = mainWindow->findChildren<ColorSwatch*>();
- foreach (ColorSwatch *dock, dock_list) {
+ const QList<ColorSwatch *> dockList = mainWindow->findChildren<ColorSwatch*>();
+ for (const ColorSwatch *dock : dockList) {
tabMenu->addAction(dock->objectName());
splitHMenu->addAction(dock->objectName());
splitVMenu->addAction(dock->objectName());
@@ -464,7 +464,8 @@ void ColorSwatch::updateContextMenu()
static ColorSwatch *findByName(const QMainWindow *mainWindow, const QString &name)
{
- foreach (ColorSwatch *dock, mainWindow->findChildren<ColorSwatch*>()) {
+ const QList<ColorSwatch *> dockList = mainWindow->findChildren<ColorSwatch*>();
+ for (ColorSwatch *dock : dockList) {
if (name == dock->objectName())
return dock;
}
@@ -584,7 +585,7 @@ void ColorSwatch::changeVerticalTitleBar(bool on)
QSize BlueTitleBar::minimumSizeHint() const
{
QDockWidget *dw = qobject_cast<QDockWidget*>(parentWidget());
- Q_ASSERT(dw != 0);
+ Q_ASSERT(dw);
QSize result(leftPm.width() + rightPm.width(), centerPm.height());
if (dw->features() & QDockWidget::DockWidgetVerticalTitleBar)
result.transpose();
@@ -605,7 +606,7 @@ void BlueTitleBar::paintEvent(QPaintEvent*)
QRect rect = this->rect();
QDockWidget *dw = qobject_cast<QDockWidget*>(parentWidget());
- Q_ASSERT(dw != 0);
+ Q_ASSERT(dw);
if (dw->features() & QDockWidget::DockWidgetVerticalTitleBar) {
QSize s = rect.size();
@@ -632,7 +633,7 @@ void BlueTitleBar::mouseReleaseEvent(QMouseEvent *event)
QRect rect = this->rect();
QDockWidget *dw = qobject_cast<QDockWidget*>(parentWidget());
- Q_ASSERT(dw != 0);
+ Q_ASSERT(dw);
if (dw->features() & QDockWidget::DockWidgetVerticalTitleBar) {
QPoint p = pos;
@@ -676,7 +677,7 @@ void BlueTitleBar::mouseReleaseEvent(QMouseEvent *event)
void BlueTitleBar::updateMask()
{
QDockWidget *dw = qobject_cast<QDockWidget*>(parent());
- Q_ASSERT(dw != 0);
+ Q_ASSERT(dw);
QRect rect = dw->rect();
QPixmap bitmap(dw->size());
diff --git a/examples/widgets/mainwindows/mainwindow/toolbar.cpp b/examples/widgets/mainwindows/mainwindow/toolbar.cpp
index 7c96f5b1be..36d4108b1e 100644
--- a/examples/widgets/mainwindows/mainwindow/toolbar.cpp
+++ b/examples/widgets/mainwindows/mainwindow/toolbar.cpp
@@ -208,7 +208,7 @@ ToolBar::ToolBar(const QString &title, QWidget *parent)
void ToolBar::updateMenu()
{
QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parentWidget());
- Q_ASSERT(mainWindow != 0);
+ Q_ASSERT(mainWindow);
const Qt::ToolBarArea area = mainWindow->toolBarArea(this);
const Qt::ToolBarAreas areas = allowedAreas();
@@ -244,7 +244,8 @@ void ToolBar::order()
{
QList<QAction *> ordered;
QList<QAction *> actions1 = actions();
- foreach (QAction *action, findChildren<QAction *>()) {
+ const QList<QAction *> childActions = findChildren<QAction *>();
+ for (QAction *action : childActions) {
if (!actions1.contains(action))
continue;
actions1.removeAll(action);
@@ -313,7 +314,7 @@ void ToolBar::place(Qt::ToolBarArea area, bool p)
return;
QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parentWidget());
- Q_ASSERT(mainWindow != 0);
+ Q_ASSERT(mainWindow);
mainWindow->addToolBar(area, this);
@@ -355,7 +356,7 @@ void ToolBar::placeBottom(bool p)
void ToolBar::insertToolBarBreak()
{
QMainWindow *mainWindow = qobject_cast<QMainWindow *>(parentWidget());
- Q_ASSERT(mainWindow != 0);
+ Q_ASSERT(mainWindow);
mainWindow->insertToolBarBreak(this);
}
diff --git a/examples/widgets/mainwindows/mdi/main.cpp b/examples/widgets/mainwindows/mdi/main.cpp
index e23f5f6e60..950244ad53 100644
--- a/examples/widgets/mainwindows/mdi/main.cpp
+++ b/examples/widgets/mainwindows/mdi/main.cpp
@@ -70,7 +70,8 @@ int main(int argc, char *argv[])
parser.process(app);
MainWindow mainWin;
- foreach (const QString &fileName, parser.positionalArguments())
+ const QStringList posArgs = parser.positionalArguments();
+ for (const QString &fileName : posArgs)
mainWin.openFile(fileName);
mainWin.show();
return app.exec();
diff --git a/examples/widgets/mainwindows/mdi/mainwindow.cpp b/examples/widgets/mainwindows/mdi/mainwindow.cpp
index 188de1893e..b952d19e2e 100644
--- a/examples/widgets/mainwindows/mdi/mainwindow.cpp
+++ b/examples/widgets/mainwindows/mdi/mainwindow.cpp
@@ -242,7 +242,7 @@ void MainWindow::about()
void MainWindow::updateMenus()
{
- bool hasMdiChild = (activeMdiChild() != 0);
+ bool hasMdiChild = (activeMdiChild() != nullptr);
saveAct->setEnabled(hasMdiChild);
saveAsAct->setEnabled(hasMdiChild);
#ifndef QT_NO_CLIPBOARD
@@ -483,19 +483,20 @@ MdiChild *MainWindow::activeMdiChild() const
{
if (QMdiSubWindow *activeSubWindow = mdiArea->activeSubWindow())
return qobject_cast<MdiChild *>(activeSubWindow->widget());
- return 0;
+ return nullptr;
}
QMdiSubWindow *MainWindow::findMdiChild(const QString &fileName) const
{
QString canonicalFilePath = QFileInfo(fileName).canonicalFilePath();
- foreach (QMdiSubWindow *window, mdiArea->subWindowList()) {
+ const QList<QMdiSubWindow *> subWindows = mdiArea->subWindowList();
+ for (QMdiSubWindow *window : subWindows) {
MdiChild *mdiChild = qobject_cast<MdiChild *>(window->widget());
if (mdiChild->currentFile() == canonicalFilePath)
return window;
}
- return 0;
+ return nullptr;
}
void MainWindow::switchLayoutDirection()
diff --git a/examples/widgets/mainwindows/mdi/mdichild.cpp b/examples/widgets/mainwindows/mdi/mdichild.cpp
index 006c84574a..16f2040de0 100644
--- a/examples/widgets/mainwindows/mdi/mdichild.cpp
+++ b/examples/widgets/mainwindows/mdi/mdichild.cpp
@@ -82,9 +82,9 @@ bool MdiChild::loadFile(const QString &fileName)
}
QTextStream in(&file);
- QApplication::setOverrideCursor(Qt::WaitCursor);
+ QGuiApplication::setOverrideCursor(Qt::WaitCursor);
setPlainText(in.readAll());
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
setCurrentFile(fileName);
@@ -124,9 +124,9 @@ bool MdiChild::saveFile(const QString &fileName)
}
QTextStream out(&file);
- QApplication::setOverrideCursor(Qt::WaitCursor);
+ QGuiApplication::setOverrideCursor(Qt::WaitCursor);
out << toPlainText();
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
setCurrentFile(fileName);
return true;
diff --git a/examples/widgets/mainwindows/sdi/main.cpp b/examples/widgets/mainwindows/sdi/main.cpp
index 6e29fafd6f..7a18c0c39c 100644
--- a/examples/widgets/mainwindows/sdi/main.cpp
+++ b/examples/widgets/mainwindows/sdi/main.cpp
@@ -68,7 +68,8 @@ int main(int argc, char *argv[])
parser.process(app);
MainWindow *mainWin = nullptr;
- foreach (const QString &file, parser.positionalArguments()) {
+ const QStringList posArgs = parser.positionalArguments();
+ for (const QString &file : posArgs) {
MainWindow *newWin = new MainWindow(file);
newWin->tile(mainWin);
newWin->show();
diff --git a/examples/widgets/mainwindows/sdi/mainwindow.cpp b/examples/widgets/mainwindows/sdi/mainwindow.cpp
index 301c85c144..62a74b26e6 100644
--- a/examples/widgets/mainwindows/sdi/mainwindow.cpp
+++ b/examples/widgets/mainwindows/sdi/mainwindow.cpp
@@ -338,9 +338,9 @@ void MainWindow::loadFile(const QString &fileName)
}
QTextStream in(&file);
- QApplication::setOverrideCursor(Qt::WaitCursor);
+ QGuiApplication::setOverrideCursor(Qt::WaitCursor);
textEdit->setPlainText(in.readAll());
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
setCurrentFile(fileName);
statusBar()->showMessage(tr("File loaded"), 2000);
@@ -434,9 +434,9 @@ bool MainWindow::saveFile(const QString &fileName)
}
QTextStream out(&file);
- QApplication::setOverrideCursor(Qt::WaitCursor);
+ QGuiApplication::setOverrideCursor(Qt::WaitCursor);
out << textEdit->toPlainText();
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
setCurrentFile(fileName);
statusBar()->showMessage(tr("File saved"), 2000);
@@ -472,11 +472,12 @@ MainWindow *MainWindow::findMainWindow(const QString &fileName) const
{
QString canonicalFilePath = QFileInfo(fileName).canonicalFilePath();
- foreach (QWidget *widget, QApplication::topLevelWidgets()) {
+ const QList<QWidget *> topLevelWidgets = QApplication::topLevelWidgets();
+ for (QWidget *widget : topLevelWidgets) {
MainWindow *mainWin = qobject_cast<MainWindow *>(widget);
if (mainWin && mainWin->curFile == canonicalFilePath)
return mainWin;
}
- return 0;
+ return nullptr;
}
diff --git a/examples/widgets/painting/affine/main.cpp b/examples/widgets/painting/affine/main.cpp
index a820c784f0..6ce8efe482 100644
--- a/examples/widgets/painting/affine/main.cpp
+++ b/examples/widgets/painting/affine/main.cpp
@@ -58,12 +58,12 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
- XFormWidget xformWidget(0);
- QStyle *arthurStyle = new ArthurStyle();
+ XFormWidget xformWidget(nullptr);
+ QStyle *arthurStyle = new ArthurStyle;
xformWidget.setStyle(arthurStyle);
- QList<QWidget *> widgets = xformWidget.findChildren<QWidget *>();
- foreach (QWidget *w, widgets) {
+ const QList<QWidget *> widgets = xformWidget.findChildren<QWidget *>();
+ for (QWidget *w : widgets) {
w->setStyle(arthurStyle);
w->setAttribute(Qt::WA_AcceptTouchEvents);
}
diff --git a/examples/widgets/painting/basicdrawing/window.cpp b/examples/widgets/painting/basicdrawing/window.cpp
index c80237e914..65f6971d13 100644
--- a/examples/widgets/painting/basicdrawing/window.cpp
+++ b/examples/widgets/painting/basicdrawing/window.cpp
@@ -157,22 +157,22 @@ Window::Window()
//! [7]
//! [8]
- connect(shapeComboBox, SIGNAL(activated(int)),
- this, SLOT(shapeChanged()));
- connect(penWidthSpinBox, SIGNAL(valueChanged(int)),
- this, SLOT(penChanged()));
- connect(penStyleComboBox, SIGNAL(activated(int)),
- this, SLOT(penChanged()));
- connect(penCapComboBox, SIGNAL(activated(int)),
- this, SLOT(penChanged()));
- connect(penJoinComboBox, SIGNAL(activated(int)),
- this, SLOT(penChanged()));
- connect(brushStyleComboBox, SIGNAL(activated(int)),
- this, SLOT(brushChanged()));
- connect(antialiasingCheckBox, SIGNAL(toggled(bool)),
- renderArea, SLOT(setAntialiased(bool)));
- connect(transformationsCheckBox, SIGNAL(toggled(bool)),
- renderArea, SLOT(setTransformed(bool)));
+ connect(shapeComboBox, QOverload<int>::of(&QComboBox::activated),
+ this, &Window::shapeChanged);
+ connect(penWidthSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
+ this, &Window::penChanged);
+ connect(penStyleComboBox, QOverload<int>::of(&QComboBox::activated),
+ this, &Window::penChanged);
+ connect(penCapComboBox, QOverload<int>::of(&QComboBox::activated),
+ this, &Window::penChanged);
+ connect(penJoinComboBox, QOverload<int>::of(&QComboBox::activated),
+ this, &Window::penChanged);
+ connect(brushStyleComboBox, QOverload<int>::of(&QComboBox::activated),
+ this, &Window::brushChanged);
+ connect(antialiasingCheckBox, &QAbstractButton::toggled,
+ renderArea, &RenderArea::setAntialiased);
+ connect(transformationsCheckBox, &QAbstractButton::toggled,
+ renderArea, &RenderArea::setTransformed);
//! [8]
//! [9]
diff --git a/examples/widgets/painting/composition/composition.cpp b/examples/widgets/painting/composition/composition.cpp
index e0abc5875c..96088cca4a 100644
--- a/examples/widgets/painting/composition/composition.cpp
+++ b/examples/widgets/painting/composition/composition.cpp
@@ -76,68 +76,68 @@ CompositionWidget::CompositionWidget(QWidget *parent)
modesGroup->setTitle(tr("Mode"));
rbClear = new QRadioButton(tr("Clear"), modesGroup);
- connect(rbClear, SIGNAL(clicked()), view, SLOT(setClearMode()));
+ connect(rbClear, &QAbstractButton::clicked, view, &CompositionRenderer::setClearMode);
rbSource = new QRadioButton(tr("Source"), modesGroup);
- connect(rbSource, SIGNAL(clicked()), view, SLOT(setSourceMode()));
+ connect(rbSource, &QAbstractButton::clicked, view, &CompositionRenderer::setSourceMode);
rbDest = new QRadioButton(tr("Destination"), modesGroup);
- connect(rbDest, SIGNAL(clicked()), view, SLOT(setDestMode()));
+ connect(rbDest, &QAbstractButton::clicked, view, &CompositionRenderer::setDestMode);
rbSourceOver = new QRadioButton(tr("Source Over"), modesGroup);
- connect(rbSourceOver, SIGNAL(clicked()), view, SLOT(setSourceOverMode()));
+ connect(rbSourceOver, &QAbstractButton::clicked, view, &CompositionRenderer::setSourceOverMode);
rbDestOver = new QRadioButton(tr("Destination Over"), modesGroup);
- connect(rbDestOver, SIGNAL(clicked()), view, SLOT(setDestOverMode()));
+ connect(rbDestOver, &QAbstractButton::clicked, view, &CompositionRenderer::setDestOverMode);
rbSourceIn = new QRadioButton(tr("Source In"), modesGroup);
- connect(rbSourceIn, SIGNAL(clicked()), view, SLOT(setSourceInMode()));
+ connect(rbSourceIn, &QAbstractButton::clicked, view, &CompositionRenderer::setSourceInMode);
rbDestIn = new QRadioButton(tr("Dest In"), modesGroup);
- connect(rbDestIn, SIGNAL(clicked()), view, SLOT(setDestInMode()));
+ connect(rbDestIn, &QAbstractButton::clicked, view, &CompositionRenderer::setDestInMode);
rbSourceOut = new QRadioButton(tr("Source Out"), modesGroup);
- connect(rbSourceOut, SIGNAL(clicked()), view, SLOT(setSourceOutMode()));
+ connect(rbSourceOut, &QAbstractButton::clicked, view, &CompositionRenderer::setSourceOutMode);
rbDestOut = new QRadioButton(tr("Dest Out"), modesGroup);
- connect(rbDestOut, SIGNAL(clicked()), view, SLOT(setDestOutMode()));
+ connect(rbDestOut, &QAbstractButton::clicked, view, &CompositionRenderer::setDestOutMode);
rbSourceAtop = new QRadioButton(tr("Source Atop"), modesGroup);
- connect(rbSourceAtop, SIGNAL(clicked()), view, SLOT(setSourceAtopMode()));
+ connect(rbSourceAtop, &QAbstractButton::clicked, view, &CompositionRenderer::setSourceAtopMode);
rbDestAtop = new QRadioButton(tr("Dest Atop"), modesGroup);
- connect(rbDestAtop, SIGNAL(clicked()), view, SLOT(setDestAtopMode()));
+ connect(rbDestAtop, &QAbstractButton::clicked, view, &CompositionRenderer::setDestAtopMode);
rbXor = new QRadioButton(tr("Xor"), modesGroup);
- connect(rbXor, SIGNAL(clicked()), view, SLOT(setXorMode()));
+ connect(rbXor, &QAbstractButton::clicked, view, &CompositionRenderer::setXorMode);
rbPlus = new QRadioButton(tr("Plus"), modesGroup);
- connect(rbPlus, SIGNAL(clicked()), view, SLOT(setPlusMode()));
+ connect(rbPlus, &QAbstractButton::clicked, view, &CompositionRenderer::setPlusMode);
rbMultiply = new QRadioButton(tr("Multiply"), modesGroup);
- connect(rbMultiply, SIGNAL(clicked()), view, SLOT(setMultiplyMode()));
+ connect(rbMultiply, &QAbstractButton::clicked, view, &CompositionRenderer::setMultiplyMode);
rbScreen = new QRadioButton(tr("Screen"), modesGroup);
- connect(rbScreen, SIGNAL(clicked()), view, SLOT(setScreenMode()));
+ connect(rbScreen, &QAbstractButton::clicked, view, &CompositionRenderer::setScreenMode);
rbOverlay = new QRadioButton(tr("Overlay"), modesGroup);
- connect(rbOverlay, SIGNAL(clicked()), view, SLOT(setOverlayMode()));
+ connect(rbOverlay, &QAbstractButton::clicked, view, &CompositionRenderer::setOverlayMode);
rbDarken = new QRadioButton(tr("Darken"), modesGroup);
- connect(rbDarken, SIGNAL(clicked()), view, SLOT(setDarkenMode()));
+ connect(rbDarken, &QAbstractButton::clicked, view, &CompositionRenderer::setDarkenMode);
rbLighten = new QRadioButton(tr("Lighten"), modesGroup);
- connect(rbLighten, SIGNAL(clicked()), view, SLOT(setLightenMode()));
+ connect(rbLighten, &QAbstractButton::clicked, view, &CompositionRenderer::setLightenMode);
rbColorDodge = new QRadioButton(tr("Color Dodge"), modesGroup);
- connect(rbColorDodge, SIGNAL(clicked()), view, SLOT(setColorDodgeMode()));
+ connect(rbColorDodge, &QAbstractButton::clicked, view, &CompositionRenderer::setColorDodgeMode);
rbColorBurn = new QRadioButton(tr("Color Burn"), modesGroup);
- connect(rbColorBurn, SIGNAL(clicked()), view, SLOT(setColorBurnMode()));
+ connect(rbColorBurn, &QAbstractButton::clicked, view, &CompositionRenderer::setColorBurnMode);
rbHardLight = new QRadioButton(tr("Hard Light"), modesGroup);
- connect(rbHardLight, SIGNAL(clicked()), view, SLOT(setHardLightMode()));
+ connect(rbHardLight, &QAbstractButton::clicked, view, &CompositionRenderer::setHardLightMode);
rbSoftLight = new QRadioButton(tr("Soft Light"), modesGroup);
- connect(rbSoftLight, SIGNAL(clicked()), view, SLOT(setSoftLightMode()));
+ connect(rbSoftLight, &QAbstractButton::clicked, view, &CompositionRenderer::setSoftLightMode);
rbDifference = new QRadioButton(tr("Difference"), modesGroup);
- connect(rbDifference, SIGNAL(clicked()), view, SLOT(setDifferenceMode()));
+ connect(rbDifference, &QAbstractButton::clicked, view, &CompositionRenderer::setDifferenceMode);
rbExclusion = new QRadioButton(tr("Exclusion"), modesGroup);
- connect(rbExclusion, SIGNAL(clicked()), view, SLOT(setExclusionMode()));
+ connect(rbExclusion, &QAbstractButton::clicked, view, &CompositionRenderer::setExclusionMode);
QGroupBox *circleColorGroup = new QGroupBox(mainGroup);
circleColorGroup->setTitle(tr("Circle color"));
QSlider *circleColorSlider = new QSlider(Qt::Horizontal, circleColorGroup);
circleColorSlider->setRange(0, 359);
circleColorSlider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
- connect(circleColorSlider, SIGNAL(valueChanged(int)), view, SLOT(setCircleColor(int)));
+ connect(circleColorSlider, &QAbstractSlider::valueChanged, view, &CompositionRenderer::setCircleColor);
QGroupBox *circleAlphaGroup = new QGroupBox(mainGroup);
circleAlphaGroup->setTitle(tr("Circle alpha"));
QSlider *circleAlphaSlider = new QSlider(Qt::Horizontal, circleAlphaGroup);
circleAlphaSlider->setRange(0, 255);
circleAlphaSlider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
- connect(circleAlphaSlider, SIGNAL(valueChanged(int)), view, SLOT(setCircleAlpha(int)));
+ connect(circleAlphaSlider, &QAbstractSlider::valueChanged, view, &CompositionRenderer::setCircleAlpha);
QPushButton *showSourceButton = new QPushButton(mainGroup);
showSourceButton->setText(tr("Show Source"));
@@ -209,13 +209,13 @@ CompositionWidget::CompositionWidget(QWidget *parent)
view->loadDescription(":res/composition/composition.html");
view->loadSourceFile(":res/composition/composition.cpp");
- connect(whatsThisButton, SIGNAL(clicked(bool)), view, SLOT(setDescriptionEnabled(bool)));
- connect(view, SIGNAL(descriptionEnabledChanged(bool)), whatsThisButton, SLOT(setChecked(bool)));
- connect(showSourceButton, SIGNAL(clicked()), view, SLOT(showSource()));
+ connect(whatsThisButton, &QAbstractButton::clicked, view, &ArthurFrame::setDescriptionEnabled);
+ connect(view, &ArthurFrame::descriptionEnabledChanged, whatsThisButton, &QAbstractButton::setChecked);
+ connect(showSourceButton, &QAbstractButton::clicked, view, &ArthurFrame::showSource);
#if QT_CONFIG(opengl)
- connect(enableOpenGLButton, SIGNAL(clicked(bool)), view, SLOT(enableOpenGL(bool)));
+ connect(enableOpenGLButton, &QAbstractButton::clicked, view, &ArthurFrame::enableOpenGL);
#endif
- connect(animateButton, SIGNAL(toggled(bool)), view, SLOT(setAnimationEnabled(bool)));
+ connect(animateButton, &QAbstractButton::toggled, view, &CompositionRenderer::setAnimationEnabled);
circleColorSlider->setValue(270);
circleAlphaSlider->setValue(200);
diff --git a/examples/widgets/painting/composition/main.cpp b/examples/widgets/painting/composition/main.cpp
index 1f4ead7165..2eaeaba2c5 100644
--- a/examples/widgets/painting/composition/main.cpp
+++ b/examples/widgets/painting/composition/main.cpp
@@ -60,8 +60,8 @@ int main(int argc, char *argv[])
QStyle *arthurStyle = new ArthurStyle();
compWidget.setStyle(arthurStyle);
- QList<QWidget *> widgets = compWidget.findChildren<QWidget *>();
- foreach (QWidget *w, widgets)
+ const QList<QWidget *> widgets = compWidget.findChildren<QWidget *>();
+ for (QWidget *w : widgets)
w->setStyle(arthurStyle);
compWidget.show();
diff --git a/examples/widgets/painting/concentriccircles/window.cpp b/examples/widgets/painting/concentriccircles/window.cpp
index 0f65dc2285..45258e0bc4 100644
--- a/examples/widgets/painting/concentriccircles/window.cpp
+++ b/examples/widgets/painting/concentriccircles/window.cpp
@@ -77,8 +77,8 @@ Window::Window()
circleWidgets[i][j]->setAntialiased(j != 0);
circleWidgets[i][j]->setFloatBased(i != 0);
- connect(timer, SIGNAL(timeout()),
- circleWidgets[i][j], SLOT(nextAnimationFrame()));
+ connect(timer, &QTimer::timeout,
+ circleWidgets[i][j], &CircleWidget::nextAnimationFrame);
layout->addWidget(circleWidgets[i][j], i + 1, j + 1);
}
diff --git a/examples/widgets/painting/deform/main.cpp b/examples/widgets/painting/deform/main.cpp
index 85e83207c0..28e3d6823d 100644
--- a/examples/widgets/painting/deform/main.cpp
+++ b/examples/widgets/painting/deform/main.cpp
@@ -60,12 +60,12 @@ int main(int argc, char **argv)
bool smallScreen = QApplication::arguments().contains("-small-screen");
- PathDeformWidget deformWidget(0, smallScreen);
+ PathDeformWidget deformWidget(nullptr, smallScreen);
- QStyle *arthurStyle = new ArthurStyle();
+ QStyle *arthurStyle = new ArthurStyle;
deformWidget.setStyle(arthurStyle);
- QList<QWidget *> widgets = deformWidget.findChildren<QWidget *>();
- foreach (QWidget *w, widgets)
+ const QList<QWidget *> widgets = deformWidget.findChildren<QWidget *>();
+ for (QWidget *w : widgets)
w->setStyle(arthurStyle);
if (smallScreen)
diff --git a/examples/widgets/painting/deform/pathdeform.cpp b/examples/widgets/painting/deform/pathdeform.cpp
index 7c3fe45277..0eda76a831 100644
--- a/examples/widgets/painting/deform/pathdeform.cpp
+++ b/examples/widgets/painting/deform/pathdeform.cpp
@@ -152,19 +152,19 @@ void PathDeformControls::layoutForDesktop()
mainLayout->addWidget(mainGroup);
mainLayout->setMargin(0);
- connect(radiusSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setRadius(int)));
- connect(deformSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setIntensity(int)));
- connect(fontSizeSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setFontSize(int)));
- connect(animateButton, SIGNAL(clicked(bool)), m_renderer, SLOT(setAnimated(bool)));
+ connect(radiusSlider, &QAbstractSlider::valueChanged, m_renderer, &PathDeformRenderer::setRadius);
+ connect(deformSlider, &QAbstractSlider::valueChanged, m_renderer, &PathDeformRenderer::setIntensity);
+ connect(fontSizeSlider, &QAbstractSlider::valueChanged, m_renderer, &PathDeformRenderer::setFontSize);
+ connect(animateButton, &QAbstractButton::clicked, m_renderer, &PathDeformRenderer::setAnimated);
#if QT_CONFIG(opengl)
- connect(enableOpenGLButton, SIGNAL(clicked(bool)), m_renderer, SLOT(enableOpenGL(bool)));
+ connect(enableOpenGLButton, &QAbstractButton::clicked, m_renderer, &ArthurFrame::enableOpenGL);
#endif
- connect(textInput, SIGNAL(textChanged(QString)), m_renderer, SLOT(setText(QString)));
- connect(m_renderer, SIGNAL(descriptionEnabledChanged(bool)),
- whatsThisButton, SLOT(setChecked(bool)));
- connect(whatsThisButton, SIGNAL(clicked(bool)), m_renderer, SLOT(setDescriptionEnabled(bool)));
- connect(showSourceButton, SIGNAL(clicked()), m_renderer, SLOT(showSource()));
+ connect(textInput, &QLineEdit::textChanged, m_renderer, &PathDeformRenderer::setText);
+ connect(m_renderer, &ArthurFrame::descriptionEnabledChanged,
+ whatsThisButton, &QAbstractButton::setChecked);
+ connect(whatsThisButton, &QAbstractButton::clicked, m_renderer, &ArthurFrame::setDescriptionEnabled);
+ connect(showSourceButton, &QAbstractButton::clicked, m_renderer, &ArthurFrame::showSource);
animateButton->animateClick();
deformSlider->setValue(80);
@@ -229,14 +229,14 @@ void PathDeformControls::layoutForSmallScreen()
mainLayout->addWidget(okButton);
mainLayout->addWidget(quitButton);
- connect(quitButton, SIGNAL(clicked()), this, SIGNAL(quitPressed()));
- connect(okButton, SIGNAL(clicked()), this, SIGNAL(okPressed()));
- connect(radiusSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setRadius(int)));
- connect(deformSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setIntensity(int)));
- connect(fontSizeSlider, SIGNAL(valueChanged(int)), m_renderer, SLOT(setFontSize(int)));
- connect(animateButton, SIGNAL(clicked(bool)), m_renderer, SLOT(setAnimated(bool)));
+ connect(quitButton, &QAbstractButton::clicked, this, &PathDeformControls::quitPressed);
+ connect(okButton, &QAbstractButton::clicked, this, &PathDeformControls::okPressed);
+ connect(radiusSlider, &QAbstractSlider::valueChanged, m_renderer, &PathDeformRenderer::setRadius);
+ connect(deformSlider, &QAbstractSlider::valueChanged, m_renderer, &PathDeformRenderer::setIntensity);
+ connect(fontSizeSlider, &QAbstractSlider::valueChanged, m_renderer, &PathDeformRenderer::setFontSize);
+ connect(animateButton, &QAbstractButton::clicked, m_renderer, &PathDeformRenderer::setAnimated);
#if QT_CONFIG(opengl)
- connect(enableOpenGLButton, SIGNAL(clicked(bool)), m_renderer, SLOT(enableOpenGL(bool)));
+ connect(enableOpenGLButton, &QAbstractButton::clicked, m_renderer, &ArthurFrame::enableOpenGL);
#endif
@@ -272,9 +272,12 @@ PathDeformWidget::PathDeformWidget(QWidget *parent, bool smallScreen)
m_renderer->loadDescription(":res/deform/pathdeform.html");
m_renderer->setDescriptionEnabled(false);
- connect(m_renderer, SIGNAL(clicked()), this, SLOT(showControls()));
- connect(m_controls, SIGNAL(okPressed()), this, SLOT(hideControls()));
- connect(m_controls, SIGNAL(quitPressed()), QCoreApplication::instance(), SLOT(quit()));
+ connect(m_renderer, &PathDeformRenderer::clicked,
+ this, &PathDeformWidget::showControls);
+ connect(m_controls, &PathDeformControls::okPressed,
+ this, &PathDeformWidget::hideControls);
+ connect(m_controls, &PathDeformControls::quitPressed,
+ qApp, &QCoreApplication::quit);
}
@@ -288,16 +291,16 @@ void PathDeformWidget::hideControls()
m_controls->hide();
}
-void PathDeformWidget::setStyle( QStyle * style )
+void PathDeformWidget::setStyle(QStyle *style)
{
QWidget::setStyle(style);
- if (m_controls == 0)
+ if (!m_controls)
return;
m_controls->setStyle(style);
- QList<QWidget *> widgets = m_controls->findChildren<QWidget *>();
- foreach (QWidget *w, widgets)
+ const QList<QWidget *> widgets = m_controls->findChildren<QWidget *>();
+ for (QWidget *w : widgets)
w->setStyle(style);
}
diff --git a/examples/widgets/painting/deform/pathdeform.h b/examples/widgets/painting/deform/pathdeform.h
index 68908045b9..b7c7386e2a 100644
--- a/examples/widgets/painting/deform/pathdeform.h
+++ b/examples/widgets/painting/deform/pathdeform.h
@@ -135,7 +135,7 @@ signals:
void okPressed();
void quitPressed();
private:
- PathDeformRenderer* m_renderer;
+ PathDeformRenderer *m_renderer;
void layoutForDesktop();
void layoutForSmallScreen();
};
@@ -145,7 +145,7 @@ class PathDeformWidget : public QWidget
Q_OBJECT
public:
PathDeformWidget(QWidget *parent, bool smallScreen);
- void setStyle (QStyle * style );
+ void setStyle(QStyle *style);
private:
PathDeformRenderer *m_renderer;
diff --git a/examples/widgets/painting/fontsampler/mainwindow.cpp b/examples/widgets/painting/fontsampler/mainwindow.cpp
index bd15438df9..a464eee3ff 100644
--- a/examples/widgets/painting/fontsampler/mainwindow.cpp
+++ b/examples/widgets/painting/fontsampler/mainwindow.cpp
@@ -71,11 +71,12 @@ MainWindow::MainWindow(QWidget *parent)
markedCount = 0;
setupFontTree();
- connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
- connect(fontTree, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
- this, SLOT(showFont(QTreeWidgetItem*)));
- connect(fontTree, SIGNAL(itemChanged(QTreeWidgetItem*,int)),
- this, SLOT(updateStyles(QTreeWidgetItem*,int)));
+ connect(quitAction, &QAction::triggered,
+ qApp, &QApplication::quit);
+ connect(fontTree, &QTreeWidget::currentItemChanged,
+ this, &MainWindow::showFont);
+ connect(fontTree, &QTreeWidget::itemChanged,
+ this, &MainWindow::updateStyles);
fontTree->setItemSelected(fontTree->topLevelItem(0), true);
showFont(fontTree->topLevelItem(0));
@@ -85,9 +86,10 @@ void MainWindow::setupFontTree()
{
QFontDatabase database;
fontTree->setColumnCount(1);
- fontTree->setHeaderLabels(QStringList() << tr("Font"));
+ fontTree->setHeaderLabels({ tr("Font") });
- foreach (QString family, database.families()) {
+ const QStringList fontFamilies = database.families();
+ for (const QString &family : fontFamilies) {
const QStringList styles = database.styles(family);
if (styles.isEmpty())
continue;
@@ -97,7 +99,7 @@ void MainWindow::setupFontTree()
familyItem->setCheckState(0, Qt::Unchecked);
familyItem->setFlags(familyItem->flags() | Qt::ItemIsAutoTristate);
- foreach (QString style, styles) {
+ for (const QString &style : styles) {
QTreeWidgetItem *styleItem = new QTreeWidgetItem(familyItem);
styleItem->setText(0, style);
styleItem->setCheckState(0, Qt::Unchecked);
@@ -109,10 +111,10 @@ void MainWindow::setupFontTree()
void MainWindow::on_clearAction_triggered()
{
- QTreeWidgetItem *currentItem = fontTree->currentItem();
- foreach (QTreeWidgetItem *item, fontTree->selectedItems())
- fontTree->setItemSelected(item, false);
- fontTree->setItemSelected(currentItem, true);
+ const QList<QTreeWidgetItem *> items = fontTree->selectedItems();
+ for (QTreeWidgetItem *item : items)
+ item->setSelected(false);
+ fontTree->currentItem()->setSelected(true);
}
void MainWindow::on_markAction_triggered()
@@ -127,8 +129,8 @@ void MainWindow::on_unmarkAction_triggered()
void MainWindow::markUnmarkFonts(Qt::CheckState state)
{
- QList<QTreeWidgetItem *> items = fontTree->selectedItems();
- foreach (QTreeWidgetItem *item, items) {
+ const QList<QTreeWidgetItem *> items = fontTree->selectedItems();
+ for (QTreeWidgetItem *item : items) {
if (item->checkState(0) != state)
item->setCheckState(0, state);
}
@@ -285,8 +287,8 @@ void MainWindow::on_printPreviewAction_triggered()
QPrinter printer(QPrinter::HighResolution);
QPrintPreviewDialog preview(&printer, this);
- connect(&preview, SIGNAL(paintRequested(QPrinter*)),
- this, SLOT(printDocument(QPrinter*)));
+ connect(&preview, &QPrintPreviewDialog::paintRequested,
+ this, &MainWindow::printDocument);
preview.exec();
#endif
}
@@ -294,19 +296,19 @@ void MainWindow::on_printPreviewAction_triggered()
void MainWindow::printPage(int index, QPainter *painter, QPrinter *printer)
{
#if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printdialog)
- QString family = pageMap.keys()[index];
- StyleItems items = pageMap[family];
+ const QString family = (pageMap.begin() + index).key();
+ const StyleItems items = pageMap.value(family);
// Find the dimensions of the text on each page.
qreal width = 0.0;
qreal height = 0.0;
- foreach (QTreeWidgetItem *item, items) {
+ for (const QTreeWidgetItem *item : items) {
QString style = item->text(0);
int weight = item->data(0, Qt::UserRole).toInt();
bool italic = item->data(0, Qt::UserRole + 1).toBool();
// Calculate the maximum width and total height of the text.
- foreach (int size, sampleSizes) {
+ for (int size : qAsConst(sampleSizes)) {
QFont font(family, size, weight, italic);
font.setStyleName(style);
font = QFont(font, painter->device());
@@ -334,13 +336,13 @@ void MainWindow::printPage(int index, QPainter *painter, QPrinter *printer)
qreal x = -width / 2.0;
qreal y = -height / 2.0 - remainingHeight / 4.0 + spaceHeight;
- foreach (QTreeWidgetItem *item, items) {
+ for (const QTreeWidgetItem *item : items) {
QString style = item->text(0);
int weight = item->data(0, Qt::UserRole).toInt();
bool italic = item->data(0, Qt::UserRole + 1).toBool();
// Draw each line of text.
- foreach (int size, sampleSizes) {
+ for (int size : qAsConst(sampleSizes)) {
QFont font(family, size, weight, italic);
font.setStyleName(style);
font = QFont(font, painter->device());
diff --git a/examples/widgets/painting/gradients/gradients.cpp b/examples/widgets/painting/gradients/gradients.cpp
index 004f6710cd..fd6eaeb0d9 100644
--- a/examples/widgets/painting/gradients/gradients.cpp
+++ b/examples/widgets/painting/gradients/gradients.cpp
@@ -421,7 +421,7 @@ GradientWidget::GradientWidget(QWidget *parent)
m_renderer->loadSourceFile(":res/gradients/gradients.cpp");
m_renderer->loadDescription(":res/gradients/gradients.html");
- QTimer::singleShot(50, this, SLOT(setDefault1()));
+ QTimer::singleShot(50, this, &GradientWidget::setDefault1);
}
void GradientWidget::setDefault(int config)
diff --git a/examples/widgets/painting/gradients/main.cpp b/examples/widgets/painting/gradients/main.cpp
index 6c5261fe6b..539d67e40e 100644
--- a/examples/widgets/painting/gradients/main.cpp
+++ b/examples/widgets/painting/gradients/main.cpp
@@ -61,8 +61,8 @@ int main(int argc, char *argv[])
GradientWidget gradientWidget(0);
QStyle *arthurStyle = new ArthurStyle();
gradientWidget.setStyle(arthurStyle);
- QList<QWidget *> widgets = gradientWidget.findChildren<QWidget *>();
- foreach (QWidget *w, widgets) {
+ const QList<QWidget *> widgets = gradientWidget.findChildren<QWidget *>();
+ for (QWidget *w : widgets) {
w->setStyle(arthurStyle);
w->setAttribute(Qt::WA_AcceptTouchEvents);
}
diff --git a/examples/widgets/painting/imagecomposition/imagecomposer.cpp b/examples/widgets/painting/imagecomposition/imagecomposer.cpp
index d53017b955..ffdc8f433c 100644
--- a/examples/widgets/painting/imagecomposition/imagecomposer.cpp
+++ b/examples/widgets/painting/imagecomposition/imagecomposer.cpp
@@ -100,9 +100,12 @@ ImageComposer::ImageComposer()
//! [2]
//! [3]
- connect(sourceButton, SIGNAL(clicked()), this, SLOT(chooseSource()));
- connect(operatorComboBox, SIGNAL(activated(int)), this, SLOT(recalculateResult()));
- connect(destinationButton, SIGNAL(clicked()), this, SLOT(chooseDestination()));
+ connect(sourceButton, &QAbstractButton::clicked,
+ this, &ImageComposer::chooseSource);
+ connect(operatorComboBox, QOverload<int>::of(&QComboBox::activated),
+ this, &ImageComposer::recalculateResult);
+ connect(destinationButton, &QAbstractButton::clicked,
+ this, &ImageComposer::chooseDestination);
//! [3]
//! [4]
diff --git a/examples/widgets/painting/painterpaths/window.cpp b/examples/widgets/painting/painterpaths/window.cpp
index a987937b39..6fb3218313 100644
--- a/examples/widgets/painting/painterpaths/window.cpp
+++ b/examples/widgets/painting/painterpaths/window.cpp
@@ -194,22 +194,30 @@ Window::Window()
//! [12]
//! [16]
- connect(fillRuleComboBox, SIGNAL(activated(int)), this, SLOT(fillRuleChanged()));
- connect(fillColor1ComboBox, SIGNAL(activated(int)), this, SLOT(fillGradientChanged()));
- connect(fillColor2ComboBox, SIGNAL(activated(int)), this, SLOT(fillGradientChanged()));
- connect(penColorComboBox, SIGNAL(activated(int)), this, SLOT(penColorChanged()));
-
- for(QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); it++) {
- connect(penWidthSpinBox, SIGNAL(valueChanged(int)), *it, SLOT(setPenWidth(int)));
- connect(rotationAngleSpinBox, SIGNAL(valueChanged(int)), *it, SLOT(setRotationAngle(int)));
+ connect(fillRuleComboBox, QOverload<int>::of(&QComboBox::activated),
+ this, &Window::fillRuleChanged);
+ connect(fillColor1ComboBox, QOverload<int>::of(&QComboBox::activated),
+ this, &Window::fillGradientChanged);
+ connect(fillColor2ComboBox, QOverload<int>::of(&QComboBox::activated),
+ this, &Window::fillGradientChanged);
+ connect(penColorComboBox, QOverload<int>::of(&QComboBox::activated),
+ this, &Window::penColorChanged);
+
+ for (RenderArea *area : qAsConst(renderAreas)) {
+ connect(penWidthSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
+ area, &RenderArea::setPenWidth);
+ connect(rotationAngleSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
+ area, &RenderArea::setRotationAngle);
}
//! [16] //! [17]
QGridLayout *topLayout = new QGridLayout;
- int i=0;
- for(QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); it++, i++)
- topLayout->addWidget(*it, i / 3, i % 3);
+ int i = 0;
+ for (RenderArea *area : qAsConst(renderAreas)) {
+ topLayout->addWidget(area, i / 3, i % 3);
+ ++i;
+ }
QGridLayout *mainLayout = new QGridLayout;
mainLayout->addLayout(topLayout, 0, 0, 1, 4);
@@ -243,8 +251,8 @@ void Window::fillRuleChanged()
{
Qt::FillRule rule = (Qt::FillRule)currentItemData(fillRuleComboBox).toInt();
- for (QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); ++it)
- (*it)->setFillRule(rule);
+ for (RenderArea *area : qAsConst(renderAreas))
+ area->setFillRule(rule);
}
//! [19]
@@ -254,8 +262,8 @@ void Window::fillGradientChanged()
QColor color1 = qvariant_cast<QColor>(currentItemData(fillColor1ComboBox));
QColor color2 = qvariant_cast<QColor>(currentItemData(fillColor2ComboBox));
- for (QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); ++it)
- (*it)->setFillGradient(color1, color2);
+ for (RenderArea *area : qAsConst(renderAreas))
+ area->setFillGradient(color1, color2);
}
//! [20]
@@ -264,16 +272,16 @@ void Window::penColorChanged()
{
QColor color = qvariant_cast<QColor>(currentItemData(penColorComboBox));
- for (QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); ++it)
- (*it)->setPenColor(color);
+ for (RenderArea *area : qAsConst(renderAreas))
+ area->setPenColor(color);
}
//! [21]
//! [22]
void Window::populateWithColors(QComboBox *comboBox)
{
- QStringList colorNames = QColor::colorNames();
- foreach (QString name, colorNames)
+ const QStringList colorNames = QColor::colorNames();
+ for (const QString &name : colorNames)
comboBox->addItem(name, QColor(name));
}
//! [22]
diff --git a/examples/widgets/painting/pathstroke/main.cpp b/examples/widgets/painting/pathstroke/main.cpp
index 3a63203118..57c85d73a3 100644
--- a/examples/widgets/painting/pathstroke/main.cpp
+++ b/examples/widgets/painting/pathstroke/main.cpp
@@ -63,8 +63,8 @@ int main(int argc, char **argv)
PathStrokeWidget pathStrokeWidget(smallScreen);
QStyle *arthurStyle = new ArthurStyle();
pathStrokeWidget.setStyle(arthurStyle);
- QList<QWidget *> widgets = pathStrokeWidget.findChildren<QWidget *>();
- foreach (QWidget *w, widgets) {
+ const QList<QWidget *> widgets = pathStrokeWidget.findChildren<QWidget *>();
+ for (QWidget *w : widgets) {
w->setStyle(arthurStyle);
w->setAttribute(Qt::WA_AcceptTouchEvents);
}
diff --git a/examples/widgets/painting/pathstroke/pathstroke.cpp b/examples/widgets/painting/pathstroke/pathstroke.cpp
index b04998afac..cad0b8732c 100644
--- a/examples/widgets/painting/pathstroke/pathstroke.cpp
+++ b/examples/widgets/painting/pathstroke/pathstroke.cpp
@@ -164,24 +164,24 @@ void PathStrokeControls::createCommonControls(QWidget* parent)
// Connections
- connect(flatCap, SIGNAL(clicked()), m_renderer, SLOT(setFlatCap()));
- connect(squareCap, SIGNAL(clicked()), m_renderer, SLOT(setSquareCap()));
- connect(roundCap, SIGNAL(clicked()), m_renderer, SLOT(setRoundCap()));
+ connect(flatCap, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setFlatCap);
+ connect(squareCap, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setSquareCap);
+ connect(roundCap, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setRoundCap);
- connect(bevelJoin, SIGNAL(clicked()), m_renderer, SLOT(setBevelJoin()));
- connect(miterJoin, SIGNAL(clicked()), m_renderer, SLOT(setMiterJoin()));
- connect(svgMiterJoin, SIGNAL(clicked()), m_renderer, SLOT(setSvgMiterJoin()));
- connect(roundJoin, SIGNAL(clicked()), m_renderer, SLOT(setRoundJoin()));
+ connect(bevelJoin, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setBevelJoin);
+ connect(miterJoin, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setMiterJoin);
+ connect(svgMiterJoin, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setSvgMiterJoin);
+ connect(roundJoin, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setRoundJoin);
- connect(curveMode, SIGNAL(clicked()), m_renderer, SLOT(setCurveMode()));
- connect(lineMode, SIGNAL(clicked()), m_renderer, SLOT(setLineMode()));
+ connect(curveMode, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setCurveMode);
+ connect(lineMode, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setLineMode);
- connect(solidLine, SIGNAL(clicked()), m_renderer, SLOT(setSolidLine()));
- connect(dashLine, SIGNAL(clicked()), m_renderer, SLOT(setDashLine()));
- connect(dotLine, SIGNAL(clicked()), m_renderer, SLOT(setDotLine()));
- connect(dashDotLine, SIGNAL(clicked()), m_renderer, SLOT(setDashDotLine()));
- connect(dashDotDotLine, SIGNAL(clicked()), m_renderer, SLOT(setDashDotDotLine()));
- connect(customDashLine, SIGNAL(clicked()), m_renderer, SLOT(setCustomDashLine()));
+ connect(solidLine, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setSolidLine);
+ connect(dashLine, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setDashLine);
+ connect(dotLine, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setDotLine);
+ connect(dashDotLine, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setDashDotLine);
+ connect(dashDotDotLine, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setDashDotDotLine);
+ connect(customDashLine, &QAbstractButton::clicked, m_renderer, &PathStrokeRenderer::setCustomDashLine);
// Set the defaults:
flatCap->setChecked(true);
@@ -247,17 +247,17 @@ void PathStrokeControls::layoutForDesktop()
// Set up connections
- connect(animated, SIGNAL(toggled(bool)), m_renderer, SLOT(setAnimation(bool)));
+ connect(animated, &QAbstractButton::toggled, m_renderer, &PathStrokeRenderer::setAnimation);
- connect(penWidth, SIGNAL(valueChanged(int)), m_renderer, SLOT(setPenWidth(int)));
+ connect(penWidth, &QAbstractSlider::valueChanged, m_renderer, &PathStrokeRenderer::setPenWidth);
- connect(showSourceButton, SIGNAL(clicked()), m_renderer, SLOT(showSource()));
+ connect(showSourceButton, &QAbstractButton::clicked, m_renderer, &ArthurFrame::showSource);
#if QT_CONFIG(opengl)
- connect(enableOpenGLButton, SIGNAL(clicked(bool)), m_renderer, SLOT(enableOpenGL(bool)));
+ connect(enableOpenGLButton, &QAbstractButton::clicked, m_renderer, &ArthurFrame::enableOpenGL);
#endif
- connect(whatsThisButton, SIGNAL(clicked(bool)), m_renderer, SLOT(setDescriptionEnabled(bool)));
- connect(m_renderer, SIGNAL(descriptionEnabledChanged(bool)),
- whatsThisButton, SLOT(setChecked(bool)));
+ connect(whatsThisButton, &QAbstractButton::clicked, m_renderer, &ArthurFrame::setDescriptionEnabled);
+ connect(m_renderer, &ArthurFrame::descriptionEnabledChanged,
+ whatsThisButton, &QAbstractButton::setChecked);
// Set the defaults
@@ -327,12 +327,12 @@ void PathStrokeControls::layoutForSmallScreens()
mainLayout->addWidget(okBtn, 2, 2, Qt::AlignHCenter | Qt::AlignTop);
#if QT_CONFIG(opengl)
- connect(enableOpenGLButton, SIGNAL(clicked(bool)), m_renderer, SLOT(enableOpenGL(bool)));
+ connect(enableOpenGLButton, &QAbstractButton::clicked, m_renderer, &ArthurFrame::enableOpenGL);
#endif
- connect(penWidth, SIGNAL(valueChanged(int)), m_renderer, SLOT(setPenWidth(int)));
- connect(quitBtn, SIGNAL(clicked()), this, SLOT(emitQuitSignal()));
- connect(okBtn, SIGNAL(clicked()), this, SLOT(emitOkSignal()));
+ connect(penWidth, &QAbstractSlider::valueChanged, m_renderer, &PathStrokeRenderer::setPenWidth);
+ connect(quitBtn, &QAbstractButton::clicked, this, &PathStrokeControls::emitQuitSignal);
+ connect(okBtn, &QAbstractButton::clicked, this, &PathStrokeControls::emitOkSignal);
m_renderer->setAnimation(true);
penWidth->setValue(50);
@@ -368,8 +368,8 @@ PathStrokeWidget::PathStrokeWidget(bool smallScreen)
m_renderer->loadSourceFile(":res/pathstroke/pathstroke.cpp");
m_renderer->loadDescription(":res/pathstroke/pathstroke.html");
- connect(m_renderer, SIGNAL(clicked()), this, SLOT(showControls()));
- connect(m_controls, SIGNAL(okPressed()), this, SLOT(hideControls()));
+ connect(m_renderer, &PathStrokeRenderer::clicked, this, &PathStrokeWidget::showControls);
+ connect(m_controls, &PathStrokeControls::okPressed, this, &PathStrokeWidget::hideControls);
connect(m_controls, SIGNAL(quitPressed()), QApplication::instance(), SLOT(quit()));
}
@@ -390,8 +390,8 @@ void PathStrokeWidget::setStyle( QStyle * style )
{
m_controls->setStyle(style);
- QList<QWidget *> widgets = m_controls->findChildren<QWidget *>();
- foreach (QWidget *w, widgets)
+ const QList<QWidget *> widgets = m_controls->findChildren<QWidget *>();
+ for (QWidget *w : widgets)
w->setStyle(style);
}
}
@@ -605,7 +605,7 @@ bool PathStrokeRenderer::event(QEvent *e)
{
const QTouchEvent *const event = static_cast<const QTouchEvent*>(e);
const QList<QTouchEvent::TouchPoint> points = event->touchPoints();
- foreach (const QTouchEvent::TouchPoint &touchPoint, points) {
+ for (const QTouchEvent::TouchPoint &touchPoint : points) {
const int id = touchPoint.id();
switch (touchPoint.state()) {
case Qt::TouchPointPressed:
diff --git a/examples/widgets/painting/shared/arthurwidgets.cpp b/examples/widgets/painting/shared/arthurwidgets.cpp
index 442fb69ac1..bdac5de13c 100644
--- a/examples/widgets/painting/shared/arthurwidgets.cpp
+++ b/examples/widgets/painting/shared/arthurwidgets.cpp
@@ -330,32 +330,40 @@ void ArthurFrame::showSource()
QString contents;
if (m_sourceFileName.isEmpty()) {
- contents = QString("No source for widget: '%1'").arg(objectName());
+ contents = tr("No source for widget: '%1'").arg(objectName());
} else {
QFile f(m_sourceFileName);
if (!f.open(QFile::ReadOnly))
- contents = QString("Could not open file: '%1'").arg(m_sourceFileName);
+ contents = tr("Could not open file: '%1'").arg(m_sourceFileName);
else
contents = f.readAll();
}
- contents.replace('&', "&amp;");
- contents.replace('<', "&lt;");
- contents.replace('>', "&gt;");
-
- QStringList keywords;
- keywords << "for " << "if " << "switch " << " int " << "#include " << "const"
- << "void " << "uint " << "case " << "double " << "#define " << "static"
- << "new" << "this";
-
- foreach (QString keyword, keywords)
+ contents.replace(QLatin1Char('&'), QStringLiteral("&amp;"));
+ contents.replace(QLatin1Char('<'), QStringLiteral("&lt;"));
+ contents.replace(QLatin1Char('>'), QStringLiteral("&gt;"));
+
+ static const QString keywords[] = {
+ QStringLiteral("for "), QStringLiteral("if "),
+ QStringLiteral("switch "), QStringLiteral(" int "),
+ QStringLiteral("#include "), QStringLiteral("const"),
+ QStringLiteral("void "), QStringLiteral("uint "),
+ QStringLiteral("case "), QStringLiteral("double "),
+ QStringLiteral("#define "), QStringLiteral("static"),
+ QStringLiteral("new"), QStringLiteral("this")
+ };
+
+ for (const QString &keyword : keywords)
contents.replace(keyword, QLatin1String("<font color=olive>") + keyword + QLatin1String("</font>"));
- contents.replace("(int ", "(<font color=olive><b>int </b></font>");
+ contents.replace(QStringLiteral("(int "), QStringLiteral("(<font color=olive><b>int </b></font>"));
- QStringList ppKeywords;
- ppKeywords << "#ifdef" << "#ifndef" << "#if" << "#endif" << "#else";
+ static const QString ppKeywords[] = {
+ QStringLiteral("#ifdef"), QStringLiteral("#ifndef"),
+ QStringLiteral("#if"), QStringLiteral("#endif"),
+ QStringLiteral("#else")
+ };
- foreach (QString keyword, ppKeywords)
+ for (const QString &keyword : ppKeywords)
contents.replace(keyword, QLatin1String("<font color=navy>") + keyword + QLatin1String("</font>"));
contents.replace(QRegularExpression("(\\d\\d?)"), QLatin1String("<font color=navy>\\1</font>"));
@@ -366,12 +374,10 @@ void ArthurFrame::showSource()
QRegularExpression stringLiteralRe("(\".+?\")");
contents.replace(stringLiteralRe, QLatin1String("<font color=green>\\1</font>"));
- QString html = contents;
- html.prepend("<html><pre>");
- html.append("</pre></html>");
+ const QString html = QStringLiteral("<html><pre>") + contents + QStringLiteral("</pre></html>");
QTextBrowser *sourceViewer = new QTextBrowser(0);
- sourceViewer->setWindowTitle("Source: " + m_sourceFileName.mid(5));
+ sourceViewer->setWindowTitle(tr("Source: %1").arg(m_sourceFileName.midRef(5)));
sourceViewer->setParent(this, Qt::Dialog);
sourceViewer->setAttribute(Qt::WA_DeleteOnClose);
sourceViewer->setLineWrapMode(QTextEdit::NoWrap);
diff --git a/examples/widgets/painting/shared/hoverpoints.cpp b/examples/widgets/painting/shared/hoverpoints.cpp
index 7cd8cc0b29..74c78088ad 100644
--- a/examples/widgets/painting/shared/hoverpoints.cpp
+++ b/examples/widgets/painting/shared/hoverpoints.cpp
@@ -73,8 +73,8 @@ HoverPoints::HoverPoints(QWidget *widget, PointShape shape)
m_editable = true;
m_enabled = true;
- connect(this, SIGNAL(pointsChanged(QPolygonF)),
- m_widget, SLOT(update()));
+ connect(this, &HoverPoints::pointsChanged,
+ m_widget, QOverload<>::of(&QWidget::update));
}
@@ -174,7 +174,7 @@ bool HoverPoints::eventFilter(QObject *object, QEvent *event)
const QTouchEvent *const touchEvent = static_cast<const QTouchEvent*>(event);
const QList<QTouchEvent::TouchPoint> points = touchEvent->touchPoints();
const qreal pointSize = qMax(m_pointSize.width(), m_pointSize.height());
- foreach (const QTouchEvent::TouchPoint &touchPoint, points) {
+ for (const QTouchEvent::TouchPoint &touchPoint : points) {
const int id = touchPoint.id();
switch (touchPoint.state()) {
case Qt::TouchPointPressed:
diff --git a/examples/widgets/painting/transformations/window.cpp b/examples/widgets/painting/transformations/window.cpp
index d8babb2e00..8261c4e12e 100644
--- a/examples/widgets/painting/transformations/window.cpp
+++ b/examples/widgets/painting/transformations/window.cpp
@@ -79,8 +79,8 @@ Window::Window()
operationComboBoxes[i]->addItem(tr("Scale to 75%"));
operationComboBoxes[i]->addItem(tr("Translate by (50, 50)"));
- connect(operationComboBoxes[i], SIGNAL(activated(int)),
- this, SLOT(operationChanged()));
+ connect(operationComboBoxes[i], QOverload<int>::of(&QComboBox::activated),
+ this, &Window::operationChanged);
layout->addWidget(transformedRenderAreas[i], 0, i + 1);
layout->addWidget(operationComboBoxes[i], 1, i + 1);
@@ -159,7 +159,8 @@ void Window::setupShapes()
shapes.append(text);
shapes.append(truck);
- connect(shapeComboBox, SIGNAL(activated(int)), this, SLOT(shapeSelected(int)));
+ connect(shapeComboBox, QOverload<int>::of(&QComboBox::activated),
+ this, &Window::shapeSelected);
}
//! [7]
diff --git a/examples/widgets/richtext/calendar/mainwindow.cpp b/examples/widgets/richtext/calendar/mainwindow.cpp
index 38dc0e2849..3ddb1cf7ad 100644
--- a/examples/widgets/richtext/calendar/mainwindow.cpp
+++ b/examples/widgets/richtext/calendar/mainwindow.cpp
@@ -86,10 +86,12 @@ MainWindow::MainWindow()
//! [2]
//! [3]
- connect(monthCombo, SIGNAL(activated(int)), this, SLOT(setMonth(int)));
- connect(yearEdit, SIGNAL(dateChanged(QDate)), this, SLOT(setYear(QDate)));
- connect(fontSizeSpinBox, SIGNAL(valueChanged(int)),
- this, SLOT(setFontSize(int)));
+ connect(monthCombo, QOverload<int>::of(&QComboBox::activated),
+ this, &MainWindow::setMonth);
+ connect(yearEdit, &QDateTimeEdit::dateChanged,
+ this, &MainWindow::setYear);
+ connect(fontSizeSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
+ this, &MainWindow::setFontSize);
//! [3]
fontSizeSpinBox->setValue(10);
diff --git a/examples/widgets/richtext/orderform/mainwindow.cpp b/examples/widgets/richtext/orderform/mainwindow.cpp
index b207ee4dbc..0b6a2cac6c 100644
--- a/examples/widgets/richtext/orderform/mainwindow.cpp
+++ b/examples/widgets/richtext/orderform/mainwindow.cpp
@@ -66,7 +66,7 @@ MainWindow::MainWindow()
QMenu *fileMenu = new QMenu(tr("&File"), this);
QAction *newAction = fileMenu->addAction(tr("&New..."));
newAction->setShortcuts(QKeySequence::New);
- printAction = fileMenu->addAction(tr("&Print..."), this, SLOT(printFile()));
+ printAction = fileMenu->addAction(tr("&Print..."), this, &MainWindow::printFile);
printAction->setShortcuts(QKeySequence::Print);
printAction->setEnabled(false);
QAction *quitAction = fileMenu->addAction(tr("E&xit"));
@@ -126,8 +126,8 @@ void MainWindow::createLetter(const QString &name, const QString &address,
cursor.setPosition(topFrame->lastPosition());
cursor.insertText(name, textFormat);
- QString line;
- foreach (line, address.split("\n")) {
+ const QStringList lines = address.split('\n');
+ for (const QString &line : lines) {
cursor.insertBlock();
cursor.insertText(line);
}
diff --git a/examples/widgets/richtext/syntaxhighlighter/highlighter.cpp b/examples/widgets/richtext/syntaxhighlighter/highlighter.cpp
index 6c420c328a..0c10eed6cf 100644
--- a/examples/widgets/richtext/syntaxhighlighter/highlighter.cpp
+++ b/examples/widgets/richtext/syntaxhighlighter/highlighter.cpp
@@ -58,18 +58,19 @@ Highlighter::Highlighter(QTextDocument *parent)
keywordFormat.setForeground(Qt::darkBlue);
keywordFormat.setFontWeight(QFont::Bold);
- QStringList keywordPatterns;
- keywordPatterns << "\\bchar\\b" << "\\bclass\\b" << "\\bconst\\b"
- << "\\bdouble\\b" << "\\benum\\b" << "\\bexplicit\\b"
- << "\\bfriend\\b" << "\\binline\\b" << "\\bint\\b"
- << "\\blong\\b" << "\\bnamespace\\b" << "\\boperator\\b"
- << "\\bprivate\\b" << "\\bprotected\\b" << "\\bpublic\\b"
- << "\\bshort\\b" << "\\bsignals\\b" << "\\bsigned\\b"
- << "\\bslots\\b" << "\\bstatic\\b" << "\\bstruct\\b"
- << "\\btemplate\\b" << "\\btypedef\\b" << "\\btypename\\b"
- << "\\bunion\\b" << "\\bunsigned\\b" << "\\bvirtual\\b"
- << "\\bvoid\\b" << "\\bvolatile\\b" << "\\bbool\\b";
- foreach (const QString &pattern, keywordPatterns) {
+ const QString keywordPatterns[] = {
+ QStringLiteral("\\bchar\\b"), QStringLiteral("\\bclass\\b"), QStringLiteral("\\bconst\\b"),
+ QStringLiteral("\\bdouble\\b"), QStringLiteral("\\benum\\b"), QStringLiteral("\\bexplicit\\b"),
+ QStringLiteral("\\bfriend\\b"), QStringLiteral("\\binline\\b"), QStringLiteral("\\bint\\b"),
+ QStringLiteral("\\blong\\b"), QStringLiteral("\\bnamespace\\b"), QStringLiteral("\\boperator\\b"),
+ QStringLiteral("\\bprivate\\b"), QStringLiteral("\\bprotected\\b"), QStringLiteral("\\bpublic\\b"),
+ QStringLiteral("\\bshort\\b"), QStringLiteral("\\bsignals\\b"), QStringLiteral("\\bsigned\\b"),
+ QStringLiteral("\\bslots\\b"), QStringLiteral("\\bstatic\\b"), QStringLiteral("\\bstruct\\b"),
+ QStringLiteral("\\btemplate\\b"), QStringLiteral("\\btypedef\\b"), QStringLiteral("\\btypename\\b"),
+ QStringLiteral("\\bunion\\b"), QStringLiteral("\\bunsigned\\b"), QStringLiteral("\\bvirtual\\b"),
+ QStringLiteral("\\bvoid\\b"), QStringLiteral("\\bvolatile\\b"), QStringLiteral("\\bbool\\b")
+ };
+ for (const QString &pattern : keywordPatterns) {
rule.pattern = QRegularExpression(pattern);
rule.format = keywordFormat;
highlightingRules.append(rule);
@@ -80,14 +81,14 @@ Highlighter::Highlighter(QTextDocument *parent)
//! [2]
classFormat.setFontWeight(QFont::Bold);
classFormat.setForeground(Qt::darkMagenta);
- rule.pattern = QRegularExpression("\\bQ[A-Za-z]+\\b");
+ rule.pattern = QRegularExpression(QStringLiteral("\\bQ[A-Za-z]+\\b"));
rule.format = classFormat;
highlightingRules.append(rule);
//! [2]
//! [3]
singleLineCommentFormat.setForeground(Qt::red);
- rule.pattern = QRegularExpression("//[^\n]*");
+ rule.pattern = QRegularExpression(QStringLiteral("//[^\n]*"));
rule.format = singleLineCommentFormat;
highlightingRules.append(rule);
@@ -96,7 +97,7 @@ Highlighter::Highlighter(QTextDocument *parent)
//! [4]
quotationFormat.setForeground(Qt::darkGreen);
- rule.pattern = QRegularExpression("\".*\"");
+ rule.pattern = QRegularExpression(QStringLiteral("\".*\""));
rule.format = quotationFormat;
highlightingRules.append(rule);
//! [4]
@@ -104,21 +105,21 @@ Highlighter::Highlighter(QTextDocument *parent)
//! [5]
functionFormat.setFontItalic(true);
functionFormat.setForeground(Qt::blue);
- rule.pattern = QRegularExpression("\\b[A-Za-z0-9_]+(?=\\()");
+ rule.pattern = QRegularExpression(QStringLiteral("\\b[A-Za-z0-9_]+(?=\\()"));
rule.format = functionFormat;
highlightingRules.append(rule);
//! [5]
//! [6]
- commentStartExpression = QRegularExpression("/\\*");
- commentEndExpression = QRegularExpression("\\*/");
+ commentStartExpression = QRegularExpression(QStringLiteral("/\\*"));
+ commentEndExpression = QRegularExpression(QStringLiteral("\\*/"));
}
//! [6]
//! [7]
void Highlighter::highlightBlock(const QString &text)
{
- foreach (const HighlightingRule &rule, highlightingRules) {
+ for (const HighlightingRule &rule : qAsConst(highlightingRules)) {
QRegularExpressionMatchIterator matchIterator = rule.pattern.globalMatch(text);
while (matchIterator.hasNext()) {
QRegularExpressionMatch match = matchIterator.next();
diff --git a/examples/widgets/richtext/syntaxhighlighter/mainwindow.cpp b/examples/widgets/richtext/syntaxhighlighter/mainwindow.cpp
index dd58f1f45b..2dba0ba73e 100644
--- a/examples/widgets/richtext/syntaxhighlighter/mainwindow.cpp
+++ b/examples/widgets/richtext/syntaxhighlighter/mainwindow.cpp
@@ -117,9 +117,12 @@ void MainWindow::setupFileMenu()
QMenu *fileMenu = new QMenu(tr("&File"), this);
menuBar()->addMenu(fileMenu);
- fileMenu->addAction(tr("&New"), this, SLOT(newFile()), QKeySequence::New);
- fileMenu->addAction(tr("&Open..."), this, SLOT(openFile()), QKeySequence::Open);
- fileMenu->addAction(tr("E&xit"), qApp, SLOT(quit()), QKeySequence::Quit);
+ fileMenu->addAction(tr("&New"), this,
+ &MainWindow::newFile, QKeySequence::New);
+ fileMenu->addAction(tr("&Open..."),
+ this, [this](){ openFile(); }, QKeySequence::Open);
+ fileMenu->addAction(tr("E&xit"), qApp,
+ &QApplication::quit, QKeySequence::Quit);
}
void MainWindow::setupHelpMenu()
@@ -127,6 +130,6 @@ void MainWindow::setupHelpMenu()
QMenu *helpMenu = new QMenu(tr("&Help"), this);
menuBar()->addMenu(helpMenu);
- helpMenu->addAction(tr("&About"), this, SLOT(about()));
- helpMenu->addAction(tr("About &Qt"), qApp, SLOT(aboutQt()));
+ helpMenu->addAction(tr("&About"), this, &MainWindow::about);
+ helpMenu->addAction(tr("About &Qt"), qApp, &QApplication::aboutQt);
}
diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp
index 0d51ce61ad..00ea0325dc 100644
--- a/examples/widgets/richtext/textedit/textedit.cpp
+++ b/examples/widgets/richtext/textedit/textedit.cpp
@@ -377,7 +377,7 @@ void TextEdit::setupTextActions()
comboSize->setEditable(true);
const QList<int> standardSizes = QFontDatabase::standardSizes();
- foreach (int size, standardSizes)
+ for (int size : standardSizes)
comboSize->addItem(QString::number(size));
comboSize->setCurrentIndex(standardSizes.indexOf(QApplication::font().pointSize()));
diff --git a/examples/widgets/scroller/graphicsview/main.cpp b/examples/widgets/scroller/graphicsview/main.cpp
index c33a3091ed..d6b2956d50 100644
--- a/examples/widgets/scroller/graphicsview/main.cpp
+++ b/examples/widgets/scroller/graphicsview/main.cpp
@@ -117,7 +117,8 @@ public:
QRectF boundingRect() const override
{
QRectF rect;
- foreach (QGraphicsItem *item, childItems())
+ const auto items = childItems();
+ for (const QGraphicsItem *item : items)
rect |= item->boundingRect().translated(item->pos());
return rect;
}
diff --git a/examples/widgets/statemachine/factorial/main.cpp b/examples/widgets/statemachine/factorial/main.cpp
index f100aa0110..2d25822828 100644
--- a/examples/widgets/statemachine/factorial/main.cpp
+++ b/examples/widgets/statemachine/factorial/main.cpp
@@ -100,7 +100,7 @@ class FactorialLoopTransition : public QSignalTransition
{
public:
FactorialLoopTransition(Factorial *fact)
- : QSignalTransition(fact, SIGNAL(xChanged(int))), m_fact(fact)
+ : QSignalTransition(fact, &Factorial::xChanged), m_fact(fact)
{}
bool eventTest(QEvent *e) override
@@ -130,7 +130,7 @@ class FactorialDoneTransition : public QSignalTransition
{
public:
FactorialDoneTransition(Factorial *fact)
- : QSignalTransition(fact, SIGNAL(xChanged(int))), m_fact(fact)
+ : QSignalTransition(fact, &Factorial::xChanged), m_fact(fact)
{}
bool eventTest(QEvent *e) override
diff --git a/examples/widgets/statemachine/rogue/window.cpp b/examples/widgets/statemachine/rogue/window.cpp
index 059fbf1003..a5363e2758 100644
--- a/examples/widgets/statemachine/rogue/window.cpp
+++ b/examples/widgets/statemachine/rogue/window.cpp
@@ -66,7 +66,8 @@ Window::Window()
font = QFont("Monospace");
}
else {
- foreach (QString family, database.families()) {
+ const QStringList fontFamilies = database.families();
+ for (const QString &family : fontFamilies ) {
if (database.isFixedPitch(family)) {
font = QFont(family);
break;
@@ -217,7 +218,8 @@ void Window::buildMachine()
//![5]
machine->setInitialState(inputState);
- connect(machine, SIGNAL(finished()), qApp, SLOT(quit()));
+ connect(machine, &QStateMachine::finished,
+ qApp, &QApplication::quit);
machine->start();
}
diff --git a/examples/widgets/statemachine/trafficlight/main.cpp b/examples/widgets/statemachine/trafficlight/main.cpp
index 21df91d8b0..b348d4f65d 100644
--- a/examples/widgets/statemachine/trafficlight/main.cpp
+++ b/examples/widgets/statemachine/trafficlight/main.cpp
@@ -132,11 +132,11 @@ QState *createLightState(LightWidget *light, int duration, QState *parent = 0)
timer->setInterval(duration);
timer->setSingleShot(true);
QState *timing = new QState(lightState);
- QObject::connect(timing, SIGNAL(entered()), light, SLOT(turnOn()));
- QObject::connect(timing, SIGNAL(entered()), timer, SLOT(start()));
- QObject::connect(timing, SIGNAL(exited()), light, SLOT(turnOff()));
+ QObject::connect(timing, &QAbstractState::entered, light, &LightWidget::turnOn);
+ QObject::connect(timing, &QAbstractState::entered, timer, QOverload<>::of(&QTimer::start));
+ QObject::connect(timing, &QAbstractState::exited, light, &LightWidget::turnOff);
QFinalState *done = new QFinalState(lightState);
- timing->addTransition(timer, SIGNAL(timeout()), done);
+ timing->addTransition(timer, &QTimer::timeout, done);
lightState->setInitialState(timing);
return lightState;
}
@@ -159,14 +159,14 @@ public:
redGoingYellow->setObjectName("redGoingYellow");
QState *yellowGoingGreen = createLightState(widget->yellowLight(), 1000);
yellowGoingGreen->setObjectName("yellowGoingGreen");
- redGoingYellow->addTransition(redGoingYellow, SIGNAL(finished()), yellowGoingGreen);
+ redGoingYellow->addTransition(redGoingYellow, &QState::finished, yellowGoingGreen);
QState *greenGoingYellow = createLightState(widget->greenLight(), 3000);
greenGoingYellow->setObjectName("greenGoingYellow");
- yellowGoingGreen->addTransition(yellowGoingGreen, SIGNAL(finished()), greenGoingYellow);
+ yellowGoingGreen->addTransition(yellowGoingGreen, &QState::finished, greenGoingYellow);
QState *yellowGoingRed = createLightState(widget->yellowLight(), 1000);
yellowGoingRed->setObjectName("yellowGoingRed");
- greenGoingYellow->addTransition(greenGoingYellow, SIGNAL(finished()), yellowGoingRed);
- yellowGoingRed->addTransition(yellowGoingRed, SIGNAL(finished()), redGoingYellow);
+ greenGoingYellow->addTransition(greenGoingYellow, &QState::finished, yellowGoingRed);
+ yellowGoingRed->addTransition(yellowGoingRed, &QState::finished, redGoingYellow);
machine->addState(redGoingYellow);
machine->addState(yellowGoingGreen);
diff --git a/examples/widgets/statemachine/twowaybutton/main.cpp b/examples/widgets/statemachine/twowaybutton/main.cpp
index 5c778aba70..3d4fef3bbe 100644
--- a/examples/widgets/statemachine/twowaybutton/main.cpp
+++ b/examples/widgets/statemachine/twowaybutton/main.cpp
@@ -69,8 +69,8 @@ int main(int argc, char **argv)
//! [1]
//! [2]
- off->addTransition(&button, SIGNAL(clicked()), on);
- on->addTransition(&button, SIGNAL(clicked()), off);
+ off->addTransition(&button, &QAbstractButton::clicked, on);
+ on->addTransition(&button, &QAbstractButton::clicked, off);
//! [2]
//! [3]
diff --git a/examples/widgets/tools/codecs/mainwindow.cpp b/examples/widgets/tools/codecs/mainwindow.cpp
index 229c2ccfd4..53db9fe61f 100644
--- a/examples/widgets/tools/codecs/mainwindow.cpp
+++ b/examples/widgets/tools/codecs/mainwindow.cpp
@@ -127,11 +127,10 @@ void MainWindow::about()
void MainWindow::aboutToShowSaveAsMenu()
{
- QString currentText = textEdit->toPlainText();
-
- foreach (QAction *action, saveAsActs) {
- QByteArray codecName = action->data().toByteArray();
- QTextCodec *codec = QTextCodec::codecForName(codecName);
+ const QString currentText = textEdit->toPlainText();
+ for (QAction *action : qAsConst(saveAsActs)) {
+ const QByteArray codecName = action->data().toByteArray();
+ const QTextCodec *codec = QTextCodec::codecForName(codecName);
action->setVisible(codec && codec->canEncode(currentText));
}
}
@@ -142,7 +141,8 @@ void MainWindow::findCodecs()
QRegularExpression iso8859RegExp("^ISO[- ]8859-([0-9]+).*$");
QRegularExpressionMatch match;
- foreach (int mib, QTextCodec::availableMibs()) {
+ const QList<int> mibs = QTextCodec::availableMibs();
+ for (int mib : mibs) {
QTextCodec *codec = QTextCodec::codecForMib(mib);
QString sortKey = codec->name().toUpper();
@@ -177,7 +177,7 @@ void MainWindow::createMenus()
QMenu *saveAsMenu = fileMenu->addMenu(tr("&Save As"));
connect(saveAsMenu, &QMenu::aboutToShow,
this, &MainWindow::aboutToShowSaveAsMenu);
- foreach (const QTextCodec *codec, codecs) {
+ for (const QTextCodec *codec : qAsConst(codecs)) {
const QByteArray name = codec->name();
QAction *action = saveAsMenu->addAction(tr("%1...").arg(QLatin1String(name)));
action->setData(QVariant(name));
diff --git a/examples/widgets/tools/codecs/previewform.cpp b/examples/widgets/tools/codecs/previewform.cpp
index d19b9c0833..206b5757cd 100644
--- a/examples/widgets/tools/codecs/previewform.cpp
+++ b/examples/widgets/tools/codecs/previewform.cpp
@@ -182,7 +182,7 @@ PreviewForm::PreviewForm(QWidget *parent)
void PreviewForm::setCodecList(const QList<QTextCodec *> &list)
{
encodingComboBox->clear();
- foreach (const QTextCodec *codec, list) {
+ for (const QTextCodec *codec : list) {
encodingComboBox->addItem(QLatin1String(codec->name()),
QVariant(codec->mibEnum()));
}
diff --git a/examples/widgets/tools/completer/mainwindow.cpp b/examples/widgets/tools/completer/mainwindow.cpp
index d63d523548..114ff0fd7c 100644
--- a/examples/widgets/tools/completer/mainwindow.cpp
+++ b/examples/widgets/tools/completer/mainwindow.cpp
@@ -102,10 +102,14 @@ MainWindow::MainWindow(QWidget *parent)
contentsLabel = new QLabel;
contentsLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- connect(modelCombo, SIGNAL(activated(int)), this, SLOT(changeModel()));
- connect(modeCombo, SIGNAL(activated(int)), this, SLOT(changeMode(int)));
- connect(caseCombo, SIGNAL(activated(int)), this, SLOT(changeCase(int)));
- connect(maxVisibleSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changeMaxVisible(int)));
+ connect(modelCombo, QOverload<int>::of(&QComboBox::activated),
+ this, &MainWindow::changeModel);
+ connect(modeCombo, QOverload<int>::of(&QComboBox::activated),
+ this, &MainWindow::changeMode);
+ connect(caseCombo, QOverload<int>::of(&QComboBox::activated),
+ this, &MainWindow::changeCase);
+ connect(maxVisibleSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
+ this, &MainWindow::changeMaxVisible);
//! [2]
//! [3]
@@ -136,9 +140,9 @@ void MainWindow::createMenu()
QAction *aboutAct = new QAction(tr("About"), this);
QAction *aboutQtAct = new QAction(tr("About Qt"), this);
- connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
- connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
- connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+ connect(exitAction, &QAction::triggered, qApp, &QApplication::quit);
+ connect(aboutAct, &QAction::triggered, this, &MainWindow::about);
+ connect(aboutQtAct, &QAction::triggered, qApp, &QApplication::aboutQt);
QMenu* fileMenu = menuBar()->addMenu(tr("File"));
fileMenu->addAction(exitAction);
@@ -159,7 +163,7 @@ QAbstractItemModel *MainWindow::modelFromFile(const QString& fileName)
//! [6]
#ifndef QT_NO_CURSOR
- QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+ QGuiApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
#endif
QStringList words;
@@ -170,7 +174,7 @@ QAbstractItemModel *MainWindow::modelFromFile(const QString& fileName)
}
#ifndef QT_NO_CURSOR
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
//! [6]
@@ -271,7 +275,7 @@ void MainWindow::changeModel()
changeCase(caseCombo->currentIndex());
completer->setWrapAround(wrapCheckBox->isChecked());
lineEdit->setCompleter(completer);
- connect(wrapCheckBox, SIGNAL(clicked(bool)), completer, SLOT(setWrapAround(bool)));
+ connect(wrapCheckBox, &QAbstractButton::clicked, completer, &QCompleter::setWrapAround);
}
//! [14]
diff --git a/examples/widgets/tools/customcompleter/mainwindow.cpp b/examples/widgets/tools/customcompleter/mainwindow.cpp
index 26948d0c8e..39f5f39617 100644
--- a/examples/widgets/tools/customcompleter/mainwindow.cpp
+++ b/examples/widgets/tools/customcompleter/mainwindow.cpp
@@ -79,9 +79,9 @@ void MainWindow::createMenu()
QAction *aboutAct = new QAction(tr("About"), this);
QAction *aboutQtAct = new QAction(tr("About Qt"), this);
- connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
- connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
- connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+ connect(exitAction, &QAction::triggered, qApp, &QApplication::quit);
+ connect(aboutAct, &QAction::triggered, this, &MainWindow::about);
+ connect(aboutQtAct, &QAction::triggered, qApp, &QApplication::aboutQt);
QMenu* fileMenu = menuBar()->addMenu(tr("File"));
fileMenu->addAction(exitAction);
@@ -100,7 +100,7 @@ QAbstractItemModel *MainWindow::modelFromFile(const QString& fileName)
return new QStringListModel(completer);
#ifndef QT_NO_CURSOR
- QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+ QGuiApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
#endif
QStringList words;
@@ -111,7 +111,7 @@ QAbstractItemModel *MainWindow::modelFromFile(const QString& fileName)
}
#ifndef QT_NO_CURSOR
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
return new QStringListModel(words, completer);
}
diff --git a/examples/widgets/tools/customcompleter/textedit.cpp b/examples/widgets/tools/customcompleter/textedit.cpp
index 5512e72843..d42f7b38bb 100644
--- a/examples/widgets/tools/customcompleter/textedit.cpp
+++ b/examples/widgets/tools/customcompleter/textedit.cpp
@@ -88,8 +88,8 @@ void TextEdit::setCompleter(QCompleter *completer)
c->setWidget(this);
c->setCompletionMode(QCompleter::PopupCompletion);
c->setCaseSensitivity(Qt::CaseInsensitive);
- QObject::connect(c, SIGNAL(activated(QString)),
- this, SLOT(insertCompletion(QString)));
+ QObject::connect(c, QOverload<const QString &>::of(&QCompleter::activated),
+ this, &TextEdit::insertCompletion);
}
//! [2]
diff --git a/examples/widgets/tools/echoplugin/echowindow/echowindow.cpp b/examples/widgets/tools/echoplugin/echowindow/echowindow.cpp
index 64b59d506e..6886a4cd88 100644
--- a/examples/widgets/tools/echoplugin/echowindow/echowindow.cpp
+++ b/examples/widgets/tools/echoplugin/echowindow/echowindow.cpp
@@ -113,7 +113,8 @@ bool EchoWindow::loadPlugin()
}
#endif
pluginsDir.cd("plugins");
- foreach (QString fileName, pluginsDir.entryList(QDir::Files)) {
+ const QStringList entries = pluginsDir.entryList(QDir::Files);
+ for (const QString &fileName : entries) {
QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(fileName));
QObject *plugin = pluginLoader.instance();
if (plugin) {
diff --git a/examples/widgets/tools/i18n/languagechooser.cpp b/examples/widgets/tools/i18n/languagechooser.cpp
index 58cf9d4047..f07d0ddee3 100644
--- a/examples/widgets/tools/i18n/languagechooser.cpp
+++ b/examples/widgets/tools/i18n/languagechooser.cpp
@@ -148,14 +148,14 @@ void LanguageChooser::checkBoxToggled()
void LanguageChooser::showAll()
{
- foreach (QCheckBox *checkBox, qmFileForCheckBoxMap.keys())
- checkBox->setChecked(true);
+ for (auto it = qmFileForCheckBoxMap.keyBegin(); it != qmFileForCheckBoxMap.keyEnd(); ++it)
+ (*it)->setChecked(true);
}
void LanguageChooser::hideAll()
{
- foreach (QCheckBox *checkBox, qmFileForCheckBoxMap.keys())
- checkBox->setChecked(false);
+ for (auto it = qmFileForCheckBoxMap.keyBegin(); it != qmFileForCheckBoxMap.keyEnd(); ++it)
+ (*it)->setChecked(false);
}
QStringList LanguageChooser::findQmFiles()
diff --git a/examples/widgets/tools/regexp/regexpdialog.cpp b/examples/widgets/tools/regexp/regexpdialog.cpp
index 7b3fee5794..bf61d09974 100644
--- a/examples/widgets/tools/regexp/regexpdialog.cpp
+++ b/examples/widgets/tools/regexp/regexpdialog.cpp
@@ -135,15 +135,15 @@ RegExpDialog::RegExpDialog(QWidget *parent)
}
setLayout(mainLayout);
- connect(patternComboBox, SIGNAL(editTextChanged(QString)),
- this, SLOT(refresh()));
- connect(textComboBox, SIGNAL(editTextChanged(QString)),
- this, SLOT(refresh()));
- connect(caseSensitiveCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(refresh()));
- connect(minimalCheckBox, SIGNAL(toggled(bool)), this, SLOT(refresh()));
- connect(syntaxComboBox, SIGNAL(currentIndexChanged(int)),
- this, SLOT(refresh()));
+ connect(patternComboBox, &QComboBox::editTextChanged,
+ this, &RegExpDialog::refresh);
+ connect(textComboBox, &QComboBox::editTextChanged,
+ this, &RegExpDialog::refresh);
+ connect(caseSensitiveCheckBox, &QAbstractButton::toggled,
+ this, &RegExpDialog::refresh);
+ connect(minimalCheckBox, &QAbstractButton::toggled, this, &RegExpDialog::refresh);
+ connect(syntaxComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ this, &RegExpDialog::refresh);
patternComboBox->addItem(tr("[A-Za-z_]+([A-Za-z_0-9]*)"));
textComboBox->addItem(tr("(10 + delta4) * 32"));
diff --git a/examples/widgets/tools/settingseditor/settingstree.cpp b/examples/widgets/tools/settingseditor/settingstree.cpp
index 4ca843784e..8585792787 100644
--- a/examples/widgets/tools/settingseditor/settingstree.cpp
+++ b/examples/widgets/tools/settingseditor/settingstree.cpp
@@ -170,7 +170,8 @@ void SettingsTree::updateChildItems(QTreeWidgetItem *parent)
{
int dividerIndex = 0;
- foreach (QString group, settings->childGroups()) {
+ const QStringList childGroups = settings->childGroups();
+ for (const QString &group : childGroups) {
QTreeWidgetItem *child;
int childIndex = findChild(parent, group, dividerIndex);
if (childIndex != -1) {
@@ -190,7 +191,8 @@ void SettingsTree::updateChildItems(QTreeWidgetItem *parent)
settings->endGroup();
}
- foreach (const QString &key, settings->childKeys()) {
+ const QStringList childKeys = settings->childKeys();
+ for (const QString &key : childKeys) {
QTreeWidgetItem *child;
int childIndex = findChild(parent, key, 0);
diff --git a/examples/widgets/tools/treemodelcompleter/mainwindow.cpp b/examples/widgets/tools/treemodelcompleter/mainwindow.cpp
index a8b51c7aa0..dec3cb0496 100644
--- a/examples/widgets/tools/treemodelcompleter/mainwindow.cpp
+++ b/examples/widgets/tools/treemodelcompleter/mainwindow.cpp
@@ -61,8 +61,8 @@ MainWindow::MainWindow(QWidget *parent)
completer = new TreeModelCompleter(this);
completer->setModel(modelFromFile(":/resources/treemodel.txt"));
completer->setSeparator(QLatin1String("."));
- QObject::connect(completer, SIGNAL(highlighted(QModelIndex)),
- this, SLOT(highlight(QModelIndex)));
+ QObject::connect(completer, QOverload<const QModelIndex &>::of(&TreeModelCompleter::highlighted),
+ this, &MainWindow::highlight);
QWidget *centralWidget = new QWidget;
@@ -91,18 +91,18 @@ MainWindow::MainWindow(QWidget *parent)
QLineEdit *separatorLineEdit = new QLineEdit;
separatorLineEdit->setText(completer->separator());
- connect(separatorLineEdit, SIGNAL(textChanged(QString)),
- completer, SLOT(setSeparator(QString)));
+ connect(separatorLineEdit, &QLineEdit::textChanged,
+ completer, &TreeModelCompleter::setSeparator);
QCheckBox *wrapCheckBox = new QCheckBox;
wrapCheckBox->setText(tr("Wrap around completions"));
wrapCheckBox->setChecked(completer->wrapAround());
- connect(wrapCheckBox, SIGNAL(clicked(bool)), completer, SLOT(setWrapAround(bool)));
+ connect(wrapCheckBox, &QAbstractButton::clicked, completer, &QCompleter::setWrapAround);
contentsLabel = new QLabel;
contentsLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- connect(separatorLineEdit, SIGNAL(textChanged(QString)),
- this, SLOT(updateContentsLabel(QString)));
+ connect(separatorLineEdit, &QLineEdit::textChanged,
+ this, &MainWindow::updateContentsLabel);
treeView = new QTreeView;
treeView->setModel(completer->model());
@@ -111,8 +111,10 @@ MainWindow::MainWindow(QWidget *parent)
//! [1]
//! [2]
- connect(modeCombo, SIGNAL(activated(int)), this, SLOT(changeMode(int)));
- connect(caseCombo, SIGNAL(activated(int)), this, SLOT(changeCase(int)));
+ connect(modeCombo, QOverload<int>::of(&QComboBox::activated),
+ this, &MainWindow::changeMode);
+ connect(caseCombo, QOverload<int>::of(&QComboBox::activated),
+ this, &MainWindow::changeMode);
lineEdit = new QLineEdit;
lineEdit->setCompleter(completer);
@@ -145,9 +147,9 @@ void MainWindow::createMenu()
QAction *aboutAct = new QAction(tr("About"), this);
QAction *aboutQtAct = new QAction(tr("About Qt"), this);
- connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
- connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
- connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+ connect(exitAction, &QAction::triggered, qApp, &QApplication::quit);
+ connect(aboutAct, &QAction::triggered, this, &MainWindow::about);
+ connect(aboutQtAct, &QAction::triggered, qApp, &QApplication::aboutQt);
QMenu* fileMenu = menuBar()->addMenu(tr("File"));
fileMenu->addAction(exitAction);
@@ -180,7 +182,7 @@ QAbstractItemModel *MainWindow::modelFromFile(const QString& fileName)
return new QStringListModel(completer);
#ifndef QT_NO_CURSOR
- QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+ QGuiApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
#endif
QStringList words;
@@ -218,7 +220,7 @@ QAbstractItemModel *MainWindow::modelFromFile(const QString& fileName)
}
#ifndef QT_NO_CURSOR
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
return model;
diff --git a/examples/widgets/tools/undo/mainwindow.cpp b/examples/widgets/tools/undo/mainwindow.cpp
index 5976163f3f..118d604742 100644
--- a/examples/widgets/tools/undo/mainwindow.cpp
+++ b/examples/widgets/tools/undo/mainwindow.cpp
@@ -68,25 +68,25 @@ MainWindow::MainWindow(QWidget *parent)
documentTabs->removeTab(0);
delete w;
- connect(actionOpen, SIGNAL(triggered()), this, SLOT(openDocument()));
- connect(actionClose, SIGNAL(triggered()), this, SLOT(closeDocument()));
- connect(actionNew, SIGNAL(triggered()), this, SLOT(newDocument()));
- connect(actionSave, SIGNAL(triggered()), this, SLOT(saveDocument()));
- connect(actionExit, SIGNAL(triggered()), this, SLOT(close()));
- connect(actionRed, SIGNAL(triggered()), this, SLOT(setShapeColor()));
- connect(actionGreen, SIGNAL(triggered()), this, SLOT(setShapeColor()));
- connect(actionBlue, SIGNAL(triggered()), this, SLOT(setShapeColor()));
- connect(actionAddCircle, SIGNAL(triggered()), this, SLOT(addShape()));
- connect(actionAddRectangle, SIGNAL(triggered()), this, SLOT(addShape()));
- connect(actionAddTriangle, SIGNAL(triggered()), this, SLOT(addShape()));
- connect(actionRemoveShape, SIGNAL(triggered()), this, SLOT(removeShape()));
- connect(actionAddRobot, SIGNAL(triggered()), this, SLOT(addRobot()));
- connect(actionAddSnowman, SIGNAL(triggered()), this, SLOT(addSnowman()));
- connect(actionAbout, SIGNAL(triggered()), this, SLOT(about()));
- connect(actionAboutQt, SIGNAL(triggered()), this, SLOT(aboutQt()));
-
- connect(undoLimit, SIGNAL(valueChanged(int)), this, SLOT(updateActions()));
- connect(documentTabs, SIGNAL(currentChanged(int)), this, SLOT(updateActions()));
+ connect(actionOpen, &QAction::triggered, this, &MainWindow::openDocument);
+ connect(actionClose, &QAction::triggered, this, &MainWindow::closeDocument);
+ connect(actionNew, &QAction::triggered, this, &MainWindow::newDocument);
+ connect(actionSave, &QAction::triggered, this, &MainWindow::saveDocument);
+ connect(actionExit, &QAction::triggered, this, &QWidget::close);
+ connect(actionRed, &QAction::triggered, this, &MainWindow::setShapeColor);
+ connect(actionGreen, &QAction::triggered, this, &MainWindow::setShapeColor);
+ connect(actionBlue, &QAction::triggered, this, &MainWindow::setShapeColor);
+ connect(actionAddCircle, &QAction::triggered, this, &MainWindow::addShape);
+ connect(actionAddRectangle, &QAction::triggered, this, &MainWindow::addShape);
+ connect(actionAddTriangle, &QAction::triggered, this, &MainWindow::addShape);
+ connect(actionRemoveShape, &QAction::triggered, this, &MainWindow::removeShape);
+ connect(actionAddRobot, &QAction::triggered, this, &MainWindow::addRobot);
+ connect(actionAddSnowman, &QAction::triggered, this, &MainWindow::addSnowman);
+ connect(actionAbout, &QAction::triggered, this, &MainWindow::about);
+ connect(actionAboutQt, &QAction::triggered, this, &MainWindow::aboutQt);
+
+ connect(undoLimit, QOverload<int>::of(&QSpinBox::valueChanged), this, &MainWindow::updateActions);
+ connect(documentTabs, &QTabWidget::currentChanged, this, &MainWindow::updateActions);
actionOpen->setShortcut(QString("Ctrl+O"));
actionClose->setShortcut(QString("Ctrl+W"));
@@ -226,9 +226,9 @@ void MainWindow::addDocument(Document *doc)
return;
m_undoGroup->addStack(doc->undoStack());
documentTabs->addTab(doc, fixedWindowTitle(doc));
- connect(doc, SIGNAL(currentShapeChanged(QString)), this, SLOT(updateActions()));
- connect(doc->undoStack(), SIGNAL(indexChanged(int)), this, SLOT(updateActions()));
- connect(doc->undoStack(), SIGNAL(cleanChanged(bool)), this, SLOT(updateActions()));
+ connect(doc, &Document::currentShapeChanged, this, &MainWindow::updateActions);
+ connect(doc->undoStack(), &QUndoStack::indexChanged, this, &MainWindow::updateActions);
+ connect(doc->undoStack(), &QUndoStack::cleanChanged, this, &MainWindow::updateActions);
setCurrentDocument(doc);
}
@@ -251,9 +251,9 @@ void MainWindow::removeDocument(Document *doc)
documentTabs->removeTab(index);
m_undoGroup->removeStack(doc->undoStack());
- disconnect(doc, SIGNAL(currentShapeChanged(QString)), this, SLOT(updateActions()));
- disconnect(doc->undoStack(), SIGNAL(indexChanged(int)), this, SLOT(updateActions()));
- disconnect(doc->undoStack(), SIGNAL(cleanChanged(bool)), this, SLOT(updateActions()));
+ disconnect(doc, &Document::currentShapeChanged, this, &MainWindow::updateActions);
+ disconnect(doc->undoStack(), &QUndoStack::indexChanged, this, &MainWindow::updateActions);
+ disconnect(doc->undoStack(), &QUndoStack::cleanChanged, this, &MainWindow::updateActions);
if (documentTabs->count() == 0) {
newDocument();
diff --git a/examples/widgets/tools/undoframework/mainwindow.cpp b/examples/widgets/tools/undoframework/mainwindow.cpp
index b2f5405b73..e95d50d164 100644
--- a/examples/widgets/tools/undoframework/mainwindow.cpp
+++ b/examples/widgets/tools/undoframework/mainwindow.cpp
@@ -70,8 +70,8 @@ MainWindow::MainWindow()
diagramScene->setBackgroundBrush(pixmapBrush);
diagramScene->setSceneRect(QRect(0, 0, 500, 500));
- connect(diagramScene, SIGNAL(itemMoved(DiagramItem*,QPointF)),
- this, SLOT(itemMoved(DiagramItem*,QPointF)));
+ connect(diagramScene, &DiagramScene::itemMoved,
+ this, &MainWindow::itemMoved);
setWindowTitle("Undo Framework");
QGraphicsView *view = new QGraphicsView(diagramScene);
@@ -95,18 +95,18 @@ void MainWindow::createActions()
{
deleteAction = new QAction(tr("&Delete Item"), this);
deleteAction->setShortcut(tr("Del"));
- connect(deleteAction, SIGNAL(triggered()), this, SLOT(deleteItem()));
+ connect(deleteAction, &QAction::triggered, this, &MainWindow::deleteItem);
//! [2] //! [3]
//! [3] //! [4]
addBoxAction = new QAction(tr("Add &Box"), this);
//! [4]
addBoxAction->setShortcut(tr("Ctrl+O"));
- connect(addBoxAction, SIGNAL(triggered()), this, SLOT(addBox()));
+ connect(addBoxAction, &QAction::triggered, this, &MainWindow::addBox);
addTriangleAction = new QAction(tr("Add &Triangle"), this);
addTriangleAction->setShortcut(tr("Ctrl+T"));
- connect(addTriangleAction, SIGNAL(triggered()), this, SLOT(addTriangle()));
+ connect(addTriangleAction, &QAction::triggered, this, &MainWindow::addTriangle);
//! [5]
undoAction = undoStack->createUndoAction(this, tr("&Undo"));
@@ -118,13 +118,13 @@ void MainWindow::createActions()
exitAction = new QAction(tr("E&xit"), this);
exitAction->setShortcuts(QKeySequence::Quit);
- connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(exitAction, &QAction::triggered, this, &QWidget::close);
aboutAction = new QAction(tr("&About"), this);
QList<QKeySequence> aboutShortcuts;
aboutShortcuts << tr("Ctrl+A") << tr("Ctrl+B");
aboutAction->setShortcuts(aboutShortcuts);
- connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));
+ connect(aboutAction, &QAction::triggered, this, &MainWindow::about);
}
//! [6]
@@ -140,10 +140,10 @@ void MainWindow::createMenus()
editMenu->addAction(redoAction);
editMenu->addSeparator();
editMenu->addAction(deleteAction);
- connect(editMenu, SIGNAL(aboutToShow()),
- this, SLOT(itemMenuAboutToShow()));
- connect(editMenu, SIGNAL(aboutToHide()),
- this, SLOT(itemMenuAboutToHide()));
+ connect(editMenu, &QMenu::aboutToShow,
+ this, &MainWindow::itemMenuAboutToShow);
+ connect(editMenu, &QMenu::aboutToHide,
+ this, &MainWindow::itemMenuAboutToHide);
//! [7]
itemMenu = menuBar()->addMenu(tr("&Item"));
diff --git a/examples/widgets/touch/dials/main.cpp b/examples/widgets/touch/dials/main.cpp
index 071f485de3..059dfdc716 100644
--- a/examples/widgets/touch/dials/main.cpp
+++ b/examples/widgets/touch/dials/main.cpp
@@ -60,8 +60,8 @@ int main(int argc, char **argv)
QWidget window;
Ui::Dials dialsUi;
dialsUi.setupUi(&window);
- QList<QAbstractSlider *> sliders = window.findChildren<QAbstractSlider *>();
- foreach (QAbstractSlider *slider, sliders)
+ const QList<QAbstractSlider *> sliders = window.findChildren<QAbstractSlider *>();
+ for (QAbstractSlider *slider : sliders)
slider->setAttribute(Qt::WA_AcceptTouchEvents);
window.showMaximized();
return app.exec();
diff --git a/examples/widgets/touch/fingerpaint/mainwindow.cpp b/examples/widgets/touch/fingerpaint/mainwindow.cpp
index 0e45eea240..2f7ec38d1a 100644
--- a/examples/widgets/touch/fingerpaint/mainwindow.cpp
+++ b/examples/widgets/touch/fingerpaint/mainwindow.cpp
@@ -127,34 +127,35 @@ void MainWindow::createActions()
{
openAct = new QAction(tr("&Open..."), this);
openAct->setShortcut(tr("Ctrl+O"));
- connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+ connect(openAct, &QAction::triggered, this, &MainWindow::open);
- foreach (QByteArray format, QImageWriter::supportedImageFormats()) {
+ const QList<QByteArray> imageFormats = QImageWriter::supportedImageFormats();
+ for (const QByteArray &format : imageFormats) {
QString text = tr("%1...").arg(QString(format).toUpper());
QAction *action = new QAction(text, this);
action->setData(format);
- connect(action, SIGNAL(triggered()), this, SLOT(save()));
+ connect(action, &QAction::triggered, this, &MainWindow::save);
saveAsActs.append(action);
}
printAct = new QAction(tr("&Print..."), this);
- connect(printAct, SIGNAL(triggered()), scribbleArea, SLOT(print()));
+ connect(printAct, &QAction::triggered, scribbleArea, &ScribbleArea::print);
exitAct = new QAction(tr("E&xit"), this);
exitAct->setShortcut(tr("Ctrl+Q"));
- connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+ connect(exitAct, &QAction::triggered, this, &QWidget::close);
clearScreenAct = new QAction(tr("&Clear Screen"), this);
clearScreenAct->setShortcut(tr("Ctrl+L"));
- connect(clearScreenAct, SIGNAL(triggered()),
- scribbleArea, SLOT(clearImage()));
+ connect(clearScreenAct, &QAction::triggered,
+ scribbleArea, &ScribbleArea::clearImage);
aboutAct = new QAction(tr("&About"), this);
- connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+ connect(aboutAct, &QAction::triggered, this, &MainWindow::about);
aboutQtAct = new QAction(tr("About &Qt"), this);
- connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+ connect(aboutQtAct, &QAction::triggered, qApp, &QApplication::aboutQt);
}
//! [14]
@@ -163,8 +164,7 @@ void MainWindow::createMenus()
//! [15] //! [16]
{
saveAsMenu = new QMenu(tr("&Save As"), this);
- foreach (QAction *action, saveAsActs)
- saveAsMenu->addAction(action);
+ saveAsMenu->addActions(saveAsActs);
fileMenu = new QMenu(tr("&File"), this);
fileMenu->addAction(openAct);
diff --git a/examples/widgets/touch/fingerpaint/scribblearea.cpp b/examples/widgets/touch/fingerpaint/scribblearea.cpp
index aa4e60c934..0b0c4476d9 100644
--- a/examples/widgets/touch/fingerpaint/scribblearea.cpp
+++ b/examples/widgets/touch/fingerpaint/scribblearea.cpp
@@ -195,9 +195,9 @@ bool ScribbleArea::event(QEvent *event)
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
{
- QTouchEvent *touch = static_cast<QTouchEvent *>(event);
- QList<QTouchEvent::TouchPoint> touchPoints = static_cast<QTouchEvent *>(event)->touchPoints();
- foreach (const QTouchEvent::TouchPoint &touchPoint, touchPoints) {
+ const QTouchEvent *touch = static_cast<QTouchEvent *>(event);
+ const QList<QTouchEvent::TouchPoint> touchPoints = static_cast<QTouchEvent *>(event)->touchPoints();
+ for (const QTouchEvent::TouchPoint &touchPoint : touchPoints) {
switch (touchPoint.state()) {
case Qt::TouchPointStationary:
case Qt::TouchPointReleased:
diff --git a/examples/widgets/touch/pinchzoom/mouse.cpp b/examples/widgets/touch/pinchzoom/mouse.cpp
index 1e6814be13..1dfd7d749c 100644
--- a/examples/widgets/touch/pinchzoom/mouse.cpp
+++ b/examples/widgets/touch/pinchzoom/mouse.cpp
@@ -163,7 +163,7 @@ void Mouse::timerEvent(QTimerEvent *)
<< mapToScene(0, 0)
<< mapToScene(-30, -50)
<< mapToScene(30, -50));
- foreach (QGraphicsItem *item, dangerMice) {
+ for (QGraphicsItem *item : dangerMice) {
if (item == this)
continue;
diff --git a/examples/widgets/tutorials/addressbook/part2/addressbook.cpp b/examples/widgets/tutorials/addressbook/part2/addressbook.cpp
index 34fa5d2060..d5ee394abd 100644
--- a/examples/widgets/tutorials/addressbook/part2/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part2/addressbook.cpp
@@ -74,9 +74,12 @@ AddressBook::AddressBook(QWidget *parent)
cancelButton->hide();
//! [pushbutton declaration]
//! [connecting signals and slots]
- connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
- connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
- connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+ connect(addButton, &QPushButton::clicked,
+ this, &AddressBook::addContact);
+ connect(submitButton, &QPushButton::clicked,
+ this, &AddressBook::submitContact);
+ connect(cancelButton, &QPushButton::clicked,
+ this, &AddressBook::cancel);
//! [connecting signals and slots]
//! [vertical layout]
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
diff --git a/examples/widgets/tutorials/addressbook/part3/addressbook.cpp b/examples/widgets/tutorials/addressbook/part3/addressbook.cpp
index caef83970a..b6d48f7a0d 100644
--- a/examples/widgets/tutorials/addressbook/part3/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part3/addressbook.cpp
@@ -74,13 +74,17 @@ AddressBook::AddressBook(QWidget *parent)
previousButton = new QPushButton(tr("&Previous"));
previousButton->setEnabled(false);
//! [navigation pushbuttons]
-
- connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
- connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
- connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
+ connect(addButton, &QPushButton::clicked,
+ this, &AddressBook::addContact);
+ connect(submitButton, &QPushButton::clicked,
+ this, &AddressBook::submitContact);
+ connect(cancelButton, &QPushButton::clicked,
+ this, &AddressBook::cancel);
//! [connecting navigation signals]
- connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
- connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
+ connect(nextButton, &QPushButton::clicked,
+ this, &AddressBook::next);
+ connect(previousButton, &QPushButton::clicked,
+ this, &AddressBook::previous);
//! [connecting navigation signals]
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
diff --git a/examples/widgets/tutorials/addressbook/part4/addressbook.cpp b/examples/widgets/tutorials/addressbook/part4/addressbook.cpp
index 92f0776727..77ce216c07 100644
--- a/examples/widgets/tutorials/addressbook/part4/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part4/addressbook.cpp
@@ -79,15 +79,22 @@ AddressBook::AddressBook(QWidget *parent)
previousButton = new QPushButton(tr("&Previous"));
previousButton->setEnabled(false);
- connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
- connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
+ connect(addButton, &QPushButton::clicked,
+ this, &AddressBook::addContact);
+ connect(submitButton, &QPushButton::clicked,
+ this, &AddressBook::submitContact);
//! [connecting edit and remove]
- connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
- connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
+ connect(editButton, &QPushButton::clicked,
+ this, &AddressBook::editContact);
+ connect(removeButton, &QPushButton::clicked,
+ this, &AddressBook::removeContact);
//! [connecting edit and remove]
- connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
- connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
- connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
+ connect(cancelButton, &QPushButton::clicked,
+ this, &AddressBook::cancel);
+ connect(nextButton, &QPushButton::clicked,
+ this, &AddressBook::next);
+ connect(previousButton, &QPushButton::clicked,
+ this, &AddressBook::previous);
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
buttonLayout1->addWidget(addButton);
diff --git a/examples/widgets/tutorials/addressbook/part5/addressbook.cpp b/examples/widgets/tutorials/addressbook/part5/addressbook.cpp
index 6e09ec287d..5505a0e35c 100644
--- a/examples/widgets/tutorials/addressbook/part5/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part5/addressbook.cpp
@@ -86,16 +86,24 @@ AddressBook::AddressBook(QWidget *parent)
dialog = new FindDialog(this);
//! [instantiating FindDialog]
- connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
- connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
- connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
- connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
- connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
+ connect(addButton, &QPushButton::clicked,
+ this, &AddressBook::addContact);
+ connect(submitButton, &QPushButton::clicked,
+ this, &AddressBook::submitContact);
+ connect(editButton, &QPushButton::clicked,
+ this, &AddressBook::editContact);
+ connect(removeButton, &QPushButton::clicked,
+ this, &AddressBook::removeContact);
+ connect(cancelButton, &QPushButton::clicked,
+ this, &AddressBook::cancel);
//! [signals and slots for find]
- connect(findButton, SIGNAL(clicked()), this, SLOT(findContact()));
+ connect(findButton, &QPushButton::clicked,
+ this, &AddressBook::findContact);
//! [signals and slots for find]
- connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
- connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
+ connect(nextButton, &QPushButton::clicked,
+ this, &AddressBook::next);
+ connect(previousButton, &QPushButton::clicked,
+ this, &AddressBook::previous);
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
buttonLayout1->addWidget(addButton);
diff --git a/examples/widgets/tutorials/addressbook/part5/finddialog.cpp b/examples/widgets/tutorials/addressbook/part5/finddialog.cpp
index b0d9a5e6e3..615b39d42f 100644
--- a/examples/widgets/tutorials/addressbook/part5/finddialog.cpp
+++ b/examples/widgets/tutorials/addressbook/part5/finddialog.cpp
@@ -68,8 +68,10 @@ FindDialog::FindDialog(QWidget *parent)
setLayout(layout);
setWindowTitle(tr("Find a Contact"));
- connect(findButton, SIGNAL(clicked()), this, SLOT(findClicked()));
- connect(findButton, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(findButton, &QPushButton::clicked,
+ this, &FindDialog::findClicked);
+ connect(findButton, &QPushButton::clicked,
+ this, &FindDialog::accept);
}
//! [constructor]
//! [findClicked() function]
diff --git a/examples/widgets/tutorials/addressbook/part6/addressbook.cpp b/examples/widgets/tutorials/addressbook/part6/addressbook.cpp
index b2e361a45e..8e740cfffc 100644
--- a/examples/widgets/tutorials/addressbook/part6/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part6/addressbook.cpp
@@ -92,16 +92,26 @@ AddressBook::AddressBook(QWidget *parent)
dialog = new FindDialog(this);
- connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
- connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
- connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
- connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
- connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
- connect(findButton, SIGNAL(clicked()), this, SLOT(findContact()));
- connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
- connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
- connect(loadButton, SIGNAL(clicked()), this, SLOT(loadFromFile()));
- connect(saveButton, SIGNAL(clicked()), this, SLOT(saveToFile()));
+ connect(addButton, &QPushButton::clicked,
+ this, &AddressBook::addContact);
+ connect(submitButton, &QPushButton::clicked,
+ this, &AddressBook::submitContact);
+ connect(editButton, &QPushButton::clicked,
+ this, &AddressBook::editContact);
+ connect(removeButton, &QPushButton::clicked,
+ this, &AddressBook::removeContact);
+ connect(cancelButton, &QPushButton::clicked,
+ this, &AddressBook::cancel);
+ connect(findButton, &QPushButton::clicked,
+ this, &AddressBook::findContact);
+ connect(nextButton, &QPushButton::clicked,
+ this, &AddressBook::next);
+ connect(previousButton, &QPushButton::clicked,
+ this, &AddressBook::previous);
+ connect(loadButton, &QPushButton::clicked,
+ this, &AddressBook::loadFromFile);
+ connect(saveButton, &QPushButton::clicked,
+ this, &AddressBook::saveToFile);
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
buttonLayout1->addWidget(addButton);
diff --git a/examples/widgets/tutorials/addressbook/part6/finddialog.cpp b/examples/widgets/tutorials/addressbook/part6/finddialog.cpp
index 6a1e6b116f..c25cccd552 100644
--- a/examples/widgets/tutorials/addressbook/part6/finddialog.cpp
+++ b/examples/widgets/tutorials/addressbook/part6/finddialog.cpp
@@ -67,8 +67,10 @@ FindDialog::FindDialog(QWidget *parent)
setLayout(layout);
setWindowTitle(tr("Find a Contact"));
- connect(findButton, SIGNAL(clicked()), this, SLOT(findClicked()));
- connect(findButton, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(findButton, &QPushButton::clicked,
+ this, &FindDialog::findClicked);
+ connect(findButton, &QPushButton::clicked,
+ this, &FindDialog::accept);
}
void FindDialog::findClicked()
diff --git a/examples/widgets/tutorials/addressbook/part7/addressbook.cpp b/examples/widgets/tutorials/addressbook/part7/addressbook.cpp
index e946c873e3..717d0882af 100644
--- a/examples/widgets/tutorials/addressbook/part7/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part7/addressbook.cpp
@@ -92,17 +92,28 @@ AddressBook::AddressBook(QWidget *parent)
dialog = new FindDialog(this);
- connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
- connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
- connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
- connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
- connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
- connect(findButton, SIGNAL(clicked()), this, SLOT(findContact()));
- connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
- connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
- connect(loadButton, SIGNAL(clicked()), this, SLOT(loadFromFile()));
- connect(saveButton, SIGNAL(clicked()), this, SLOT(saveToFile()));
- connect(exportButton, SIGNAL(clicked()), this, SLOT(exportAsVCard()));
+ connect(addButton, &QPushButton::clicked,
+ this, &AddressBook::addContact);
+ connect(submitButton, &QPushButton::clicked,
+ this, &AddressBook::submitContact);
+ connect(editButton, &QPushButton::clicked,
+ this, &AddressBook::editContact);
+ connect(removeButton, &QPushButton::clicked,
+ this, &AddressBook::removeContact);
+ connect(cancelButton, &QPushButton::clicked,
+ this, &AddressBook::cancel);
+ connect(findButton, &QPushButton::clicked,
+ this, &AddressBook::findContact);
+ connect(nextButton, &QPushButton::clicked,
+ this, &AddressBook::next);
+ connect(previousButton, &QPushButton::clicked,
+ this, &AddressBook::previous);
+ connect(loadButton, &QPushButton::clicked,
+ this, &AddressBook::loadFromFile);
+ connect(saveButton, &QPushButton::clicked,
+ this, &AddressBook::saveToFile);
+ connect(exportButton, &QPushButton::clicked,
+ this, &AddressBook::exportAsVCard);
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
buttonLayout1->addWidget(addButton);
diff --git a/examples/widgets/tutorials/addressbook/part7/finddialog.cpp b/examples/widgets/tutorials/addressbook/part7/finddialog.cpp
index 6a1e6b116f..c25cccd552 100644
--- a/examples/widgets/tutorials/addressbook/part7/finddialog.cpp
+++ b/examples/widgets/tutorials/addressbook/part7/finddialog.cpp
@@ -67,8 +67,10 @@ FindDialog::FindDialog(QWidget *parent)
setLayout(layout);
setWindowTitle(tr("Find a Contact"));
- connect(findButton, SIGNAL(clicked()), this, SLOT(findClicked()));
- connect(findButton, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(findButton, &QPushButton::clicked,
+ this, &FindDialog::findClicked);
+ connect(findButton, &QPushButton::clicked,
+ this, &FindDialog::accept);
}
void FindDialog::findClicked()
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part2/main.cpp b/examples/widgets/tutorials/gettingStarted/gsQt/part2/main.cpp
index 90f5f1a6b3..8bf83859a0 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part2/main.cpp
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part2/main.cpp
@@ -57,7 +57,8 @@ int main(int argc, char *argv[])
QTextEdit *textEdit = new QTextEdit;
QPushButton *quitButton = new QPushButton("&Quit");
- QObject::connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
+ QObject::connect(quitButton, &QPushButton::clicked,
+ qApp, &QApplication::quit);
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(textEdit);
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part3/main.cpp b/examples/widgets/tutorials/gettingStarted/gsQt/part3/main.cpp
index 0a60c1cf16..d4b43eb034 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part3/main.cpp
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part3/main.cpp
@@ -71,7 +71,8 @@ Notepad::Notepad()
textEdit = new QTextEdit;
quitButton = new QPushButton(tr("Quit"));
- connect(quitButton, SIGNAL(clicked()), this, SLOT(quit()));
+ connect(quitButton, &QPushButton::clicked,
+ this, &Notepad::quit);
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(textEdit);
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part4/main.cpp b/examples/widgets/tutorials/gettingStarted/gsQt/part4/main.cpp
index 6d9e96a3d4..8c5fbc70ca 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part4/main.cpp
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part4/main.cpp
@@ -73,14 +73,16 @@ private:
Notepad::Notepad()
{
-
loadAction = new QAction(tr("&Load"), this);
saveAction = new QAction(tr("&Save"), this);
exitAction = new QAction(tr("E&xit"), this);
- connect(loadAction, SIGNAL(triggered()), this, SLOT(load()));
- connect(saveAction, SIGNAL(triggered()), this, SLOT(save()));
- connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(loadAction, &QAction::triggered,
+ this, &Notepad::load);
+ connect(saveAction, &QAction::triggered,
+ this, &Notepad::save);
+ connect(exitAction, &QAction::triggered,
+ qApp, &QApplication::quit);
fileMenu = menuBar()->addMenu(tr("&File"));
fileMenu->addAction(loadAction);
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part5/main.cpp b/examples/widgets/tutorials/gettingStarted/gsQt/part5/main.cpp
index b2b4a73874..cc3e1a261c 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part5/main.cpp
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part5/main.cpp
@@ -73,14 +73,16 @@ private:
Notepad::Notepad()
{
-
openAction = new QAction(tr("&Load"), this);
saveAction = new QAction(tr("&Save"), this);
exitAction = new QAction(tr("E&xit"), this);
- connect(openAction, SIGNAL(triggered()), this, SLOT(open()));
- connect(saveAction, SIGNAL(triggered()), this, SLOT(save()));
- connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(openAction, &QAction::triggered,
+ this, &Notepad::open);
+ connect(saveAction, &QAction::triggered,
+ this, &Notepad::save);
+ connect(exitAction, &QAction::triggered,
+ qApp, &QApplication::quit);
fileMenu = menuBar()->addMenu(tr("&File"));
fileMenu->addAction(openAction);
diff --git a/examples/widgets/tutorials/widgets/nestedlayouts/main.cpp b/examples/widgets/tutorials/widgets/nestedlayouts/main.cpp
index 9acc74b469..8880dbe3d0 100644
--- a/examples/widgets/tutorials/widgets/nestedlayouts/main.cpp
+++ b/examples/widgets/tutorials/widgets/nestedlayouts/main.cpp
@@ -76,25 +76,26 @@ int main(int argc, char *argv[])
//! [set up the model]
QStandardItemModel model;
- model.setHorizontalHeaderLabels(
- QStringList() << QApplication::translate("nestedlayouts", "Name")
- << QApplication::translate("nestedlayouts", "Office"));
+ model.setHorizontalHeaderLabels({ 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");
+ const QStringList rows[] = {
+ QStringList{ QStringLiteral("Verne Nilsen"), QStringLiteral("123") },
+ QStringList{ QStringLiteral("Carlos Tang"), QStringLiteral("77") },
+ QStringList{ QStringLiteral("Bronwyn Hawcroft"), QStringLiteral("119") },
+ QStringList{ QStringLiteral("Alessandro Hanssen"), QStringLiteral("32") },
+ QStringList{ QStringLiteral("Andrew John Bakken"), QStringLiteral("54") },
+ QStringList{ QStringLiteral("Vanessa Weatherley"), QStringLiteral("85") },
+ QStringList{ QStringLiteral("Rebecca Dickens"), QStringLiteral("17") },
+ QStringList{ QStringLiteral("David Bradley"), QStringLiteral("42") },
+ QStringList{ QStringLiteral("Knut Walters"), QStringLiteral("25") },
+ QStringList{ QStringLiteral("Andrea Jones"), QStringLiteral("34") }
+ };
- foreach (QStringList row, rows) {
- QList<QStandardItem *> items;
- foreach (QString text, row)
+ QList<QStandardItem *> items;
+ for (const QStringList &row : rows) {
+ items.clear();
+ for (const QString &text : row)
items.append(new QStandardItem(text));
model.appendRow(items);
}
diff --git a/examples/widgets/widgets/analogclock/analogclock.h b/examples/widgets/widgets/analogclock/analogclock.h
index 19e580d1ac..e2486a915f 100644
--- a/examples/widgets/widgets/analogclock/analogclock.h
+++ b/examples/widgets/widgets/analogclock/analogclock.h
@@ -59,7 +59,7 @@ class AnalogClock : public QWidget
Q_OBJECT
public:
- AnalogClock(QWidget *parent = 0);
+ AnalogClock(QWidget *parent = nullptr);
protected:
void paintEvent(QPaintEvent *event) override;
diff --git a/examples/widgets/widgets/calculator/button.h b/examples/widgets/widgets/calculator/button.h
index 057640700f..7c6f26867f 100644
--- a/examples/widgets/widgets/calculator/button.h
+++ b/examples/widgets/widgets/calculator/button.h
@@ -59,7 +59,7 @@ class Button : public QToolButton
Q_OBJECT
public:
- explicit Button(const QString &text, QWidget *parent = 0);
+ explicit Button(const QString &text, QWidget *parent = nullptr);
QSize sizeHint() const override;
};
diff --git a/examples/widgets/widgets/calculator/calculator.h b/examples/widgets/widgets/calculator/calculator.h
index 6d7e336347..937de185e7 100644
--- a/examples/widgets/widgets/calculator/calculator.h
+++ b/examples/widgets/widgets/calculator/calculator.h
@@ -64,7 +64,7 @@ class Calculator : public QWidget
Q_OBJECT
public:
- Calculator(QWidget *parent = 0);
+ Calculator(QWidget *parent = nullptr);
private slots:
void digitClicked();
diff --git a/examples/widgets/widgets/calendarwidget/window.cpp b/examples/widgets/widgets/calendarwidget/window.cpp
index c3a0e1e3f7..a1c1746786 100644
--- a/examples/widgets/widgets/calendarwidget/window.cpp
+++ b/examples/widgets/widgets/calendarwidget/window.cpp
@@ -53,7 +53,8 @@
#include "window.h"
//! [0]
-Window::Window()
+Window::Window(QWidget *parent)
+ : QWidget(parent)
{
createPreviewGroupBox();
createGeneralOptionsGroupBox();
diff --git a/examples/widgets/widgets/calendarwidget/window.h b/examples/widgets/widgets/calendarwidget/window.h
index fa01fc4db6..83ea494fc2 100644
--- a/examples/widgets/widgets/calendarwidget/window.h
+++ b/examples/widgets/widgets/calendarwidget/window.h
@@ -70,7 +70,7 @@ class Window : public QWidget
Q_OBJECT
public:
- Window();
+ Window(QWidget *parent = nullptr);
private slots:
void localeChanged(int index);
diff --git a/examples/widgets/widgets/charactermap/characterwidget.h b/examples/widgets/widgets/charactermap/characterwidget.h
index 53add51e6f..34e061e96b 100644
--- a/examples/widgets/widgets/charactermap/characterwidget.h
+++ b/examples/widgets/widgets/charactermap/characterwidget.h
@@ -68,7 +68,7 @@ class CharacterWidget : public QWidget
Q_OBJECT
public:
- CharacterWidget(QWidget *parent = 0);
+ CharacterWidget(QWidget *parent = nullptr);
QSize sizeHint() const override;
public slots:
diff --git a/examples/widgets/widgets/charactermap/mainwindow.cpp b/examples/widgets/widgets/charactermap/mainwindow.cpp
index d3ac55483c..1b6f77bf30 100644
--- a/examples/widgets/widgets/charactermap/mainwindow.cpp
+++ b/examples/widgets/widgets/charactermap/mainwindow.cpp
@@ -57,7 +57,8 @@
Q_DECLARE_METATYPE(QFontComboBox::FontFilter)
-MainWindow::MainWindow()
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
{
QMenu *fileMenu = menuBar()->addMenu(tr("File"));
fileMenu->addAction(tr("Quit"), this, &QWidget::close);
@@ -187,7 +188,7 @@ void MainWindow::filterChanged(int f)
const QFontComboBox::FontFilter filter =
filterCombo->itemData(f).value<QFontComboBox::FontFilter>();
fontCombo->setFontFilters(filter);
- statusBar()->showMessage(tr("%n font(s) found", 0, fontCombo->count()));
+ statusBar()->showMessage(tr("%n font(s) found", nullptr, fontCombo->count()));
}
void MainWindow::findSizes(const QFont &font)
diff --git a/examples/widgets/widgets/charactermap/mainwindow.h b/examples/widgets/widgets/charactermap/mainwindow.h
index eac16b35fa..79fe9f9cc8 100644
--- a/examples/widgets/widgets/charactermap/mainwindow.h
+++ b/examples/widgets/widgets/charactermap/mainwindow.h
@@ -70,7 +70,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
- MainWindow();
+ MainWindow(QWidget *parent = nullptr);
public slots:
void filterChanged(int);
diff --git a/examples/widgets/widgets/codeeditor/codeeditor.h b/examples/widgets/widgets/codeeditor/codeeditor.h
index 65be76d81d..fcfc188cf2 100644
--- a/examples/widgets/widgets/codeeditor/codeeditor.h
+++ b/examples/widgets/widgets/codeeditor/codeeditor.h
@@ -70,7 +70,7 @@ class CodeEditor : public QPlainTextEdit
Q_OBJECT
public:
- CodeEditor(QWidget *parent = 0);
+ CodeEditor(QWidget *parent = nullptr);
void lineNumberAreaPaintEvent(QPaintEvent *event);
int lineNumberAreaWidth();
diff --git a/examples/widgets/widgets/digitalclock/digitalclock.h b/examples/widgets/widgets/digitalclock/digitalclock.h
index 4365b965bf..31c12f39ab 100644
--- a/examples/widgets/widgets/digitalclock/digitalclock.h
+++ b/examples/widgets/widgets/digitalclock/digitalclock.h
@@ -59,7 +59,7 @@ class DigitalClock : public QLCDNumber
Q_OBJECT
public:
- DigitalClock(QWidget *parent = 0);
+ DigitalClock(QWidget *parent = nullptr);
private slots:
void showTime();
diff --git a/examples/widgets/widgets/elidedlabel/elidedlabel.h b/examples/widgets/widgets/elidedlabel/elidedlabel.h
index 8a2a40f49a..9d4fe5fef3 100644
--- a/examples/widgets/widgets/elidedlabel/elidedlabel.h
+++ b/examples/widgets/widgets/elidedlabel/elidedlabel.h
@@ -65,7 +65,7 @@ class ElidedLabel : public QFrame
Q_PROPERTY(bool isElided READ isElided)
public:
- explicit ElidedLabel(const QString &text, QWidget *parent = 0);
+ explicit ElidedLabel(const QString &text, QWidget *parent = nullptr);
void setText(const QString &text);
const QString & text() const { return content; }
diff --git a/examples/widgets/widgets/elidedlabel/testwidget.h b/examples/widgets/widgets/elidedlabel/testwidget.h
index 840bc98b40..cd309d2316 100644
--- a/examples/widgets/widgets/elidedlabel/testwidget.h
+++ b/examples/widgets/widgets/elidedlabel/testwidget.h
@@ -64,7 +64,7 @@ class TestWidget : public QWidget
Q_OBJECT
public:
- TestWidget(QWidget *parent = 0);
+ TestWidget(QWidget *parent = nullptr);
protected:
void resizeEvent(QResizeEvent *event) override;
diff --git a/examples/widgets/widgets/groupbox/window.h b/examples/widgets/widgets/groupbox/window.h
index 566fafa151..1f041fd003 100644
--- a/examples/widgets/widgets/groupbox/window.h
+++ b/examples/widgets/widgets/groupbox/window.h
@@ -63,7 +63,7 @@ class Window : public QWidget
Q_OBJECT
public:
- Window(QWidget *parent = 0);
+ Window(QWidget *parent = nullptr);
private:
QGroupBox *createFirstExclusiveGroup();
diff --git a/examples/widgets/widgets/icons/mainwindow.cpp b/examples/widgets/widgets/icons/mainwindow.cpp
index f704b8306f..904245494c 100644
--- a/examples/widgets/widgets/icons/mainwindow.cpp
+++ b/examples/widgets/widgets/icons/mainwindow.cpp
@@ -60,7 +60,8 @@ enum { OtherSize = QStyle::PM_CustomBase };
//! [40]
//! [0]
-MainWindow::MainWindow()
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
{
QWidget *centralWidget = new QWidget(this);
setCentralWidget(centralWidget);
diff --git a/examples/widgets/widgets/icons/mainwindow.h b/examples/widgets/widgets/icons/mainwindow.h
index e3888e5fb1..1949bd235c 100644
--- a/examples/widgets/widgets/icons/mainwindow.h
+++ b/examples/widgets/widgets/icons/mainwindow.h
@@ -74,7 +74,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
- MainWindow();
+ MainWindow(QWidget *parent = nullptr);
void loadImages(const QStringList &fileNames);
diff --git a/examples/widgets/widgets/imageviewer/imageviewer.cpp b/examples/widgets/widgets/imageviewer/imageviewer.cpp
index 327abf7e43..b1346d9ccb 100644
--- a/examples/widgets/widgets/imageviewer/imageviewer.cpp
+++ b/examples/widgets/widgets/imageviewer/imageviewer.cpp
@@ -59,10 +59,9 @@
#include "imageviewer.h"
//! [0]
-ImageViewer::ImageViewer()
- : imageLabel(new QLabel)
- , scrollArea(new QScrollArea)
- , scaleFactor(1)
+ImageViewer::ImageViewer(QWidget *parent)
+ : QMainWindow(parent), imageLabel(new QLabel),
+ scrollArea(new QScrollArea), scaleFactor(1)
{
imageLabel->setBackgroundRole(QPalette::Base);
imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
diff --git a/examples/widgets/widgets/imageviewer/imageviewer.h b/examples/widgets/widgets/imageviewer/imageviewer.h
index f4a62cafe9..7e53105b33 100644
--- a/examples/widgets/widgets/imageviewer/imageviewer.h
+++ b/examples/widgets/widgets/imageviewer/imageviewer.h
@@ -71,7 +71,7 @@ class ImageViewer : public QMainWindow
Q_OBJECT
public:
- ImageViewer();
+ ImageViewer(QWidget *parent = nullptr);
bool loadFile(const QString &);
private slots:
diff --git a/examples/widgets/widgets/lineedits/window.cpp b/examples/widgets/widgets/lineedits/window.cpp
index ffb1edc5ce..0926f6f20b 100644
--- a/examples/widgets/widgets/lineedits/window.cpp
+++ b/examples/widgets/widgets/lineedits/window.cpp
@@ -53,7 +53,8 @@
#include "window.h"
//! [0]
-Window::Window()
+Window::Window(QWidget *parent)
+ : QWidget(parent)
{
QGroupBox *echoGroup = new QGroupBox(tr("Echo"));
@@ -205,7 +206,7 @@ void Window::validatorChanged(int index)
{
switch (index) {
case 0:
- validatorLineEdit->setValidator(0);
+ validatorLineEdit->setValidator(nullptr);
break;
case 1:
validatorLineEdit->setValidator(new QIntValidator(
diff --git a/examples/widgets/widgets/lineedits/window.h b/examples/widgets/widgets/lineedits/window.h
index 2070b3b84c..3231588f4f 100644
--- a/examples/widgets/widgets/lineedits/window.h
+++ b/examples/widgets/widgets/lineedits/window.h
@@ -64,7 +64,7 @@ class Window : public QWidget
Q_OBJECT
public:
- Window();
+ Window(QWidget *parent = nullptr);
public slots:
void echoChanged(int);
diff --git a/examples/widgets/widgets/mousebuttons/buttontester.h b/examples/widgets/widgets/mousebuttons/buttontester.h
index d99dcceb18..231733bd44 100644
--- a/examples/widgets/widgets/mousebuttons/buttontester.h
+++ b/examples/widgets/widgets/mousebuttons/buttontester.h
@@ -59,13 +59,14 @@
class ButtonTester : public QTextEdit
{
Q_OBJECT
-
+public:
+ using QTextEdit::QTextEdit;
protected:
void mousePressEvent(QMouseEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
void mouseDoubleClickEvent(QMouseEvent *event) override;
#if QT_CONFIG(wheelevent)
- void wheelEvent(QWheelEvent * event) override;
+ void wheelEvent(QWheelEvent *event) override;
#endif
int buttonByNumber(const Qt::MouseButton button);
QString enumNameFromValue(const Qt::MouseButton button);
diff --git a/examples/widgets/widgets/movie/movieplayer.h b/examples/widgets/widgets/movie/movieplayer.h
index 9fa9604025..7d143bd37c 100644
--- a/examples/widgets/widgets/movie/movieplayer.h
+++ b/examples/widgets/widgets/movie/movieplayer.h
@@ -70,7 +70,7 @@ class MoviePlayer : public QWidget
Q_OBJECT
public:
- MoviePlayer(QWidget *parent = 0);
+ MoviePlayer(QWidget *parent = nullptr);
void openFile(const QString &fileName);
private slots:
diff --git a/examples/widgets/widgets/scribble/mainwindow.cpp b/examples/widgets/widgets/scribble/mainwindow.cpp
index d54e5ce0f9..b8d01d505c 100644
--- a/examples/widgets/widgets/scribble/mainwindow.cpp
+++ b/examples/widgets/widgets/scribble/mainwindow.cpp
@@ -54,9 +54,9 @@
#include "scribblearea.h"
//! [0]
-MainWindow::MainWindow()
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent), scribbleArea(new ScribbleArea(this))
{
- scribbleArea = new ScribbleArea;
setCentralWidget(scribbleArea);
createActions();
diff --git a/examples/widgets/widgets/scribble/mainwindow.h b/examples/widgets/widgets/scribble/mainwindow.h
index 9e0ddaff71..e57ff065ac 100644
--- a/examples/widgets/widgets/scribble/mainwindow.h
+++ b/examples/widgets/widgets/scribble/mainwindow.h
@@ -62,7 +62,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
- MainWindow();
+ MainWindow(QWidget *parent = nullptr);
protected:
void closeEvent(QCloseEvent *event) override;
diff --git a/examples/widgets/widgets/scribble/scribblearea.h b/examples/widgets/widgets/scribble/scribblearea.h
index 7729fb5b89..100c45e133 100644
--- a/examples/widgets/widgets/scribble/scribblearea.h
+++ b/examples/widgets/widgets/scribble/scribblearea.h
@@ -62,7 +62,7 @@ class ScribbleArea : public QWidget
Q_OBJECT
public:
- ScribbleArea(QWidget *parent = 0);
+ ScribbleArea(QWidget *parent = nullptr);
bool openImage(const QString &fileName);
bool saveImage(const QString &fileName, const char *fileFormat);
diff --git a/examples/widgets/widgets/shapedclock/shapedclock.h b/examples/widgets/widgets/shapedclock/shapedclock.h
index 6468d21618..a854d956b3 100644
--- a/examples/widgets/widgets/shapedclock/shapedclock.h
+++ b/examples/widgets/widgets/shapedclock/shapedclock.h
@@ -59,7 +59,7 @@ class ShapedClock : public QWidget
Q_OBJECT
public:
- ShapedClock(QWidget *parent = 0);
+ ShapedClock(QWidget *parent = nullptr);
QSize sizeHint() const override;
protected:
diff --git a/examples/widgets/widgets/sliders/slidersgroup.h b/examples/widgets/widgets/sliders/slidersgroup.h
index 76dcbee0d8..7be8a3b4f8 100644
--- a/examples/widgets/widgets/sliders/slidersgroup.h
+++ b/examples/widgets/widgets/sliders/slidersgroup.h
@@ -66,7 +66,7 @@ class SlidersGroup : public QGroupBox
public:
SlidersGroup(Qt::Orientation orientation, const QString &title,
- QWidget *parent = 0);
+ QWidget *parent = nullptr);
signals:
void valueChanged(int value);
diff --git a/examples/widgets/widgets/sliders/window.cpp b/examples/widgets/widgets/sliders/window.cpp
index 16b60dde49..16467e71be 100644
--- a/examples/widgets/widgets/sliders/window.cpp
+++ b/examples/widgets/widgets/sliders/window.cpp
@@ -54,7 +54,8 @@
#include "window.h"
//! [0]
-Window::Window()
+Window::Window(QWidget *parent)
+ : QWidget(parent)
{
horizontalSliders = new SlidersGroup(Qt::Horizontal, tr("Horizontal"));
verticalSliders = new SlidersGroup(Qt::Vertical, tr("Vertical"));
diff --git a/examples/widgets/widgets/sliders/window.h b/examples/widgets/widgets/sliders/window.h
index 9c4c14fa37..4894781ac2 100644
--- a/examples/widgets/widgets/sliders/window.h
+++ b/examples/widgets/widgets/sliders/window.h
@@ -69,7 +69,7 @@ class Window : public QWidget
Q_OBJECT
public:
- Window();
+ Window(QWidget *parent = nullptr);
private:
void createControls(const QString &title);
diff --git a/examples/widgets/widgets/spinboxes/window.cpp b/examples/widgets/widgets/spinboxes/window.cpp
index 54604e35aa..eb660faace 100644
--- a/examples/widgets/widgets/spinboxes/window.cpp
+++ b/examples/widgets/widgets/spinboxes/window.cpp
@@ -53,7 +53,8 @@
#include "window.h"
//! [0]
-Window::Window()
+Window::Window(QWidget *parent)
+ : QWidget(parent)
{
createSpinBoxes();
createDateTimeEdits();
diff --git a/examples/widgets/widgets/spinboxes/window.h b/examples/widgets/widgets/spinboxes/window.h
index 97e9ac1083..138773a5aa 100644
--- a/examples/widgets/widgets/spinboxes/window.h
+++ b/examples/widgets/widgets/spinboxes/window.h
@@ -67,7 +67,7 @@ class Window : public QWidget
Q_OBJECT
public:
- Window();
+ Window(QWidget *parent = nullptr);
public slots:
void changePrecision(int decimals);
diff --git a/examples/widgets/widgets/styles/widgetgallery.h b/examples/widgets/widgets/styles/widgetgallery.h
index ec6edff536..9ee65c21c4 100644
--- a/examples/widgets/widgets/styles/widgetgallery.h
+++ b/examples/widgets/widgets/styles/widgetgallery.h
@@ -78,7 +78,7 @@ class WidgetGallery : public QDialog
Q_OBJECT
public:
- WidgetGallery(QWidget *parent = 0);
+ WidgetGallery(QWidget *parent = nullptr);
private slots:
void changeStyle(const QString &styleName);
diff --git a/examples/widgets/widgets/stylesheet/mainwindow.cpp b/examples/widgets/widgets/stylesheet/mainwindow.cpp
index 9acd90658a..eb4b3a2424 100644
--- a/examples/widgets/widgets/stylesheet/mainwindow.cpp
+++ b/examples/widgets/widgets/stylesheet/mainwindow.cpp
@@ -53,7 +53,8 @@
#include "mainwindow.h"
#include "stylesheeteditor.h"
-MainWindow::MainWindow()
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
{
ui.setupUi(this);
diff --git a/examples/widgets/widgets/stylesheet/mainwindow.h b/examples/widgets/widgets/stylesheet/mainwindow.h
index 46d3ecbb93..8af4c01da0 100644
--- a/examples/widgets/widgets/stylesheet/mainwindow.h
+++ b/examples/widgets/widgets/stylesheet/mainwindow.h
@@ -62,7 +62,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
- MainWindow();
+ MainWindow(QWidget *parent = nullptr);
private slots:
void on_editStyleAction_triggered();
diff --git a/examples/widgets/widgets/stylesheet/stylesheeteditor.h b/examples/widgets/widgets/stylesheet/stylesheeteditor.h
index 65a3018adb..f51af7877c 100644
--- a/examples/widgets/widgets/stylesheet/stylesheeteditor.h
+++ b/examples/widgets/widgets/stylesheet/stylesheeteditor.h
@@ -60,7 +60,7 @@ class StyleSheetEditor : public QDialog
Q_OBJECT
public:
- StyleSheetEditor(QWidget *parent = 0);
+ StyleSheetEditor(QWidget *parent = nullptr);
private slots:
void on_styleCombo_activated(const QString &styleName);
diff --git a/examples/widgets/widgets/tablet/tabletapplication.h b/examples/widgets/widgets/tablet/tabletapplication.h
index 6b3b2a1730..9b4a4f1886 100644
--- a/examples/widgets/widgets/tablet/tabletapplication.h
+++ b/examples/widgets/widgets/tablet/tabletapplication.h
@@ -61,15 +61,14 @@ class TabletApplication : public QApplication
Q_OBJECT
public:
- TabletApplication(int &argv, char **args)
- : QApplication(argv, args) {}
+ using QApplication::QApplication;
bool event(QEvent *event) override;
void setCanvas(TabletCanvas *canvas)
{ m_canvas = canvas; }
private:
- TabletCanvas *m_canvas;
+ TabletCanvas *m_canvas = nullptr;
};
//! [0]
diff --git a/examples/widgets/widgets/tetrix/tetrixboard.h b/examples/widgets/widgets/tetrix/tetrixboard.h
index 7c6871dfbd..86bcfa4d6e 100644
--- a/examples/widgets/widgets/tetrix/tetrixboard.h
+++ b/examples/widgets/widgets/tetrix/tetrixboard.h
@@ -67,7 +67,7 @@ class TetrixBoard : public QFrame
Q_OBJECT
public:
- TetrixBoard(QWidget *parent = 0);
+ TetrixBoard(QWidget *parent = nullptr);
void setNextPieceLabel(QLabel *label);
QSize sizeHint() const override;
diff --git a/examples/widgets/widgets/tetrix/tetrixwindow.cpp b/examples/widgets/widgets/tetrix/tetrixwindow.cpp
index 7e951aceb8..970a38c1dc 100644
--- a/examples/widgets/widgets/tetrix/tetrixwindow.cpp
+++ b/examples/widgets/widgets/tetrix/tetrixwindow.cpp
@@ -54,7 +54,8 @@
#include "tetrixwindow.h"
//! [0]
-TetrixWindow::TetrixWindow()
+TetrixWindow::TetrixWindow(QWidget *parent)
+ : QWidget(parent)
{
board = new TetrixBoard;
//! [0]
diff --git a/examples/widgets/widgets/tetrix/tetrixwindow.h b/examples/widgets/widgets/tetrix/tetrixwindow.h
index a21cef2ecf..02226ffe1c 100644
--- a/examples/widgets/widgets/tetrix/tetrixwindow.h
+++ b/examples/widgets/widgets/tetrix/tetrixwindow.h
@@ -67,7 +67,7 @@ class TetrixWindow : public QWidget
Q_OBJECT
public:
- TetrixWindow();
+ TetrixWindow(QWidget *parent = nullptr);
private:
QLabel *createLabel(const QString &text);
diff --git a/examples/widgets/widgets/tooltips/sortingbox.cpp b/examples/widgets/widgets/tooltips/sortingbox.cpp
index 4769a30c64..5f8d96f110 100644
--- a/examples/widgets/widgets/tooltips/sortingbox.cpp
+++ b/examples/widgets/widgets/tooltips/sortingbox.cpp
@@ -55,7 +55,8 @@
#include "sortingbox.h"
//! [0]
-SortingBox::SortingBox()
+SortingBox::SortingBox(QWidget *parent)
+ : QWidget(parent)
{
//! [0] //! [1]
setMouseTracking(true);
@@ -63,7 +64,7 @@ SortingBox::SortingBox()
setBackgroundRole(QPalette::Base);
//! [2]
- itemInMotion = 0;
+ itemInMotion = nullptr;
//! [3]
newCircleButton = createToolButton(tr("New Circle"),
@@ -178,7 +179,7 @@ void SortingBox::mouseReleaseEvent(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton && itemInMotion) {
moveItemTo(event->pos());
- itemInMotion = 0;
+ itemInMotion = nullptr;
}
}
//! [13]
diff --git a/examples/widgets/widgets/tooltips/sortingbox.h b/examples/widgets/widgets/tooltips/sortingbox.h
index 2ac27614a5..12bdeff1f6 100644
--- a/examples/widgets/widgets/tooltips/sortingbox.h
+++ b/examples/widgets/widgets/tooltips/sortingbox.h
@@ -67,7 +67,7 @@ class SortingBox : public QWidget
Q_OBJECT
public:
- SortingBox();
+ SortingBox(QWidget *parent = nullptr);
protected:
bool event(QEvent *event) override;
diff --git a/examples/widgets/widgets/validators/ledwidget.h b/examples/widgets/widgets/validators/ledwidget.h
index dcbfb176c2..c4b406db23 100644
--- a/examples/widgets/widgets/validators/ledwidget.h
+++ b/examples/widgets/widgets/validators/ledwidget.h
@@ -59,7 +59,7 @@ class LEDWidget : public QLabel
{
Q_OBJECT
public:
- LEDWidget(QWidget *parent = 0);
+ LEDWidget(QWidget *parent = nullptr);
public slots:
void flash();
diff --git a/examples/widgets/widgets/validators/localeselector.h b/examples/widgets/widgets/validators/localeselector.h
index 05290eae81..611e2da66e 100644
--- a/examples/widgets/widgets/validators/localeselector.h
+++ b/examples/widgets/widgets/validators/localeselector.h
@@ -58,7 +58,7 @@ class LocaleSelector : public QComboBox
Q_OBJECT
public:
- LocaleSelector(QWidget *parent = 0);
+ LocaleSelector(QWidget *parent = nullptr);
signals:
void localeSelected(const QLocale &locale);
diff --git a/examples/widgets/widgets/validators/main.cpp b/examples/widgets/widgets/validators/main.cpp
index d8ba2943d0..1fbf12410d 100644
--- a/examples/widgets/widgets/validators/main.cpp
+++ b/examples/widgets/widgets/validators/main.cpp
@@ -48,88 +48,9 @@
**
****************************************************************************/
-#include <qdebug.h>
-#include <QApplication>
-#include <QLineEdit>
-#include <QValidator>
-
-#include "ui_validators.h"
-
-class ValidatorWidget : public QWidget, public Ui::ValidatorsForm
-{
- Q_OBJECT
-public:
- ValidatorWidget(QWidget *parent = 0);
-
-private slots:
- void updateValidator();
- void updateDoubleValidator();
- void _setLocale(const QLocale &l) { setLocale(l); updateValidator(); updateDoubleValidator(); }
-
-private:
- QIntValidator *validator;
- QDoubleValidator *doubleValidator;
-};
-
-ValidatorWidget::ValidatorWidget(QWidget *parent)
- : QWidget(parent)
-{
- setupUi(this);
-
- connect(localeSelector, SIGNAL(localeSelected(QLocale)), this, SLOT(_setLocale(QLocale)));
-
- connect(minVal, SIGNAL(editingFinished()), this, SLOT(updateValidator()));
- connect(maxVal, SIGNAL(editingFinished()), this, SLOT(updateValidator()));
- connect(editor, SIGNAL(editingFinished()), ledWidget, SLOT(flash()));
-
- connect(doubleMaxVal, SIGNAL(editingFinished()), this, SLOT(updateDoubleValidator()));
- connect(doubleMinVal, SIGNAL(editingFinished()), this, SLOT(updateDoubleValidator()));
- connect(doubleDecimals, SIGNAL(valueChanged(int)), this, SLOT(updateDoubleValidator()));
- connect(doubleFormat, SIGNAL(activated(int)), this, SLOT(updateDoubleValidator()));
- connect(doubleEditor, SIGNAL(editingFinished()), doubleLedWidget, SLOT(flash()));
+#include "validatorwidget.h"
- validator = 0;
- doubleValidator = 0;
- updateValidator();
- updateDoubleValidator();
-};
-
-void ValidatorWidget::updateValidator()
-{
- QIntValidator *v = new QIntValidator(minVal->value(), maxVal->value(), this);
- v->setLocale(locale());
- editor->setValidator(v);
- delete validator;
- validator = v;
-
- QString s = editor->text();
- int i = 0;
- if (validator->validate(s, i) == QValidator::Invalid) {
- editor->clear();
- } else {
- editor->setText(s);
- }
-}
-
-void ValidatorWidget::updateDoubleValidator()
-{
- QDoubleValidator *v
- = new QDoubleValidator(doubleMinVal->value(), doubleMaxVal->value(),
- doubleDecimals->value(), this);
- v->setNotation(static_cast<QDoubleValidator::Notation>(doubleFormat->currentIndex()));
- v->setLocale(locale());
- doubleEditor->setValidator(v);
- delete doubleValidator;
- doubleValidator = v;
-
- QString s = doubleEditor->text();
- int i = 0;
- if (doubleValidator->validate(s, i) == QValidator::Invalid) {
- doubleEditor->clear();
- } else {
- doubleEditor->setText(s);
- }
-}
+#include <QApplication>
int main(int argc, char **argv)
{
@@ -142,5 +63,3 @@ int main(int argc, char **argv)
return app.exec();
}
-
-#include "main.moc"
diff --git a/examples/widgets/widgets/validators/validators.pro b/examples/widgets/widgets/validators/validators.pro
index ab1eb7809b..029cf95aca 100644
--- a/examples/widgets/widgets/validators/validators.pro
+++ b/examples/widgets/widgets/validators/validators.pro
@@ -4,8 +4,8 @@ requires(qtConfig(combobox))
FORMS += validators.ui
RESOURCES += validators.qrc
-SOURCES += main.cpp ledwidget.cpp localeselector.cpp
-HEADERS += ledwidget.h localeselector.h
+SOURCES += main.cpp ledwidget.cpp localeselector.cpp validatorwidget.cpp
+HEADERS += ledwidget.h localeselector.h validatorwidget.h
# install
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/widgets/validators
diff --git a/examples/widgets/widgets/validators/validatorwidget.cpp b/examples/widgets/widgets/validators/validatorwidget.cpp
new file mode 100644
index 0000000000..fa0a55aa52
--- /dev/null
+++ b/examples/widgets/widgets/validators/validatorwidget.cpp
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "validatorwidget.h"
+
+#include <QtWidgets>
+
+ValidatorWidget::ValidatorWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ setupUi(this);
+
+ connect(localeSelector, &LocaleSelector::localeSelected,
+ this, &ValidatorWidget::setLocale);
+ connect(localeSelector, &LocaleSelector::localeSelected,
+ this, &ValidatorWidget::updateValidator);
+ connect(localeSelector, &LocaleSelector::localeSelected,
+ this, &ValidatorWidget::updateDoubleValidator);
+
+ connect(minVal, &QSpinBox::editingFinished,
+ this, &ValidatorWidget::updateValidator);
+ connect(maxVal, &QSpinBox::editingFinished,
+ this, &ValidatorWidget::updateValidator);
+ connect(editor, &QLineEdit::editingFinished,
+ ledWidget, &LEDWidget::flash);
+
+ connect(doubleMaxVal, &QDoubleSpinBox::editingFinished,
+ this, &ValidatorWidget::updateDoubleValidator);
+ connect(doubleMinVal, &QDoubleSpinBox::editingFinished,
+ this, &ValidatorWidget::updateDoubleValidator);
+ connect(doubleDecimals, QOverload<int>::of(&QSpinBox::valueChanged),
+ this, &ValidatorWidget::updateDoubleValidator);
+ connect(doubleFormat, QOverload<int>::of(&QComboBox::activated),
+ this, &ValidatorWidget::updateDoubleValidator);
+ connect(doubleEditor, &QLineEdit::editingFinished,
+ doubleLedWidget, &LEDWidget::flash);
+
+ updateValidator();
+ updateDoubleValidator();
+}
+
+void ValidatorWidget::updateValidator()
+{
+ QIntValidator *v = new QIntValidator(minVal->value(), maxVal->value(), this);
+ v->setLocale(locale());
+ delete editor->validator();
+ editor->setValidator(v);
+
+ QString s = editor->text();
+ int i = 0;
+ if (v->validate(s, i) == QValidator::Invalid) {
+ editor->clear();
+ } else {
+ editor->setText(s);
+ }
+}
+
+void ValidatorWidget::updateDoubleValidator()
+{
+ QDoubleValidator *v
+ = new QDoubleValidator(doubleMinVal->value(), doubleMaxVal->value(),
+ doubleDecimals->value(), this);
+ v->setNotation(static_cast<QDoubleValidator::Notation>(doubleFormat->currentIndex()));
+ v->setLocale(locale());
+ delete doubleEditor->validator();
+ doubleEditor->setValidator(v);
+
+ QString s = doubleEditor->text();
+ int i = 0;
+ if (v->validate(s, i) == QValidator::Invalid) {
+ doubleEditor->clear();
+ } else {
+ doubleEditor->setText(s);
+ }
+}
diff --git a/src/widgets/doc/snippets/code/doc_src_examples_dropsite.qdoc b/examples/widgets/widgets/validators/validatorwidget.h
index a91933cdce..bcc4a9b91e 100644
--- a/src/widgets/doc/snippets/code/doc_src_examples_dropsite.qdoc
+++ b/examples/widgets/widgets/validators/validatorwidget.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
@@ -48,8 +48,17 @@
**
****************************************************************************/
-//! [0]
-\code
-foreach(variable, container)
-\endcode
-//! [0]
+#include <QWidget>
+
+#include "ui_validators.h"
+
+class ValidatorWidget : public QWidget, public Ui::ValidatorsForm
+{
+ Q_OBJECT
+public:
+ ValidatorWidget(QWidget *parent = nullptr);
+
+private slots:
+ void updateValidator();
+ void updateDoubleValidator();
+};
diff --git a/examples/widgets/widgets/wiggly/dialog.h b/examples/widgets/widgets/wiggly/dialog.h
index a0981dc6b6..357b6354b5 100644
--- a/examples/widgets/widgets/wiggly/dialog.h
+++ b/examples/widgets/widgets/wiggly/dialog.h
@@ -59,7 +59,7 @@ class Dialog : public QDialog
Q_OBJECT
public:
- explicit Dialog(QWidget *parent = 0);
+ explicit Dialog(QWidget *parent = nullptr);
};
//! [0]
diff --git a/examples/widgets/widgets/wiggly/wigglywidget.h b/examples/widgets/widgets/wiggly/wigglywidget.h
index 58a7d045e1..1d909c34da 100644
--- a/examples/widgets/widgets/wiggly/wigglywidget.h
+++ b/examples/widgets/widgets/wiggly/wigglywidget.h
@@ -60,7 +60,7 @@ class WigglyWidget : public QWidget
Q_OBJECT
public:
- WigglyWidget(QWidget *parent = 0);
+ WigglyWidget(QWidget *parent = nullptr);
public slots:
void setText(const QString &newText) { text = newText; }
diff --git a/examples/widgets/widgets/windowflags/controllerwindow.cpp b/examples/widgets/widgets/windowflags/controllerwindow.cpp
index 78323810ed..c19f23c513 100644
--- a/examples/widgets/widgets/windowflags/controllerwindow.cpp
+++ b/examples/widgets/widgets/windowflags/controllerwindow.cpp
@@ -53,7 +53,8 @@
#include "controllerwindow.h"
//! [0]
-ControllerWindow::ControllerWindow()
+ControllerWindow::ControllerWindow(QWidget *parent)
+ : QWidget(parent)
{
previewWindow = new PreviewWindow(this);
diff --git a/examples/widgets/widgets/windowflags/controllerwindow.h b/examples/widgets/widgets/windowflags/controllerwindow.h
index cfb88ed20f..43ec67e27f 100644
--- a/examples/widgets/widgets/windowflags/controllerwindow.h
+++ b/examples/widgets/widgets/windowflags/controllerwindow.h
@@ -69,7 +69,7 @@ class ControllerWindow : public QWidget
Q_OBJECT
public:
- ControllerWindow();
+ ControllerWindow(QWidget *parent = nullptr);
private slots:
void updatePreview();
diff --git a/examples/widgets/widgets/windowflags/previewwindow.h b/examples/widgets/widgets/windowflags/previewwindow.h
index e9efd09507..9bb487e8ab 100644
--- a/examples/widgets/widgets/windowflags/previewwindow.h
+++ b/examples/widgets/widgets/windowflags/previewwindow.h
@@ -64,7 +64,7 @@ class PreviewWindow : public QWidget
Q_OBJECT
public:
- PreviewWindow(QWidget *parent = 0);
+ PreviewWindow(QWidget *parent = nullptr);
void setWindowFlags(Qt::WindowFlags flags);
diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf
index 5800aaa5b4..dacd1539cf 100644
--- a/mkspecs/common/clang.conf
+++ b/mkspecs/common/clang.conf
@@ -44,3 +44,7 @@ QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_AR_LTCG = llvm-ar cqs
QMAKE_NM_LTCG = llvm-nm -P
QMAKE_RANLIB_LTCG = true # No need to run, since llvm-ar has "s"
+
+QMAKE_CFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
+QMAKE_CXXFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
+QMAKE_LFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf
index f0df324b64..c3a1f3a373 100644
--- a/mkspecs/common/g++-win32.conf
+++ b/mkspecs/common/g++-win32.conf
@@ -31,8 +31,6 @@ QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS_SSE2 += -mstackrealign
-QMAKE_CXXFLAGS_RTTI_ON = -frtti
-QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
QMAKE_INCDIR =
diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
index c2669e4833..44b4267207 100644
--- a/mkspecs/common/gcc-base.conf
+++ b/mkspecs/common/gcc-base.conf
@@ -68,6 +68,8 @@ QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP
QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_EXCEPTIONS_OFF += $$QMAKE_CFLAGS_EXCEPTIONS_OFF
+QMAKE_CXXFLAGS_RTTI_ON = -frtti
+QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
QMAKE_CXXFLAGS_SPLIT_SECTIONS += $$QMAKE_CFLAGS_SPLIT_SECTIONS
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_CXXFLAGS_LTCG_FATOBJECTS = $$QMAKE_CFLAGS_LTCG_FATOBJECTS
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf
index c0d4bd2acc..0b94e5a3f5 100644
--- a/mkspecs/common/msvc-desktop.conf
+++ b/mkspecs/common/msvc-desktop.conf
@@ -115,4 +115,5 @@ VCSOLUTION_EXTENSION = .sln
VCPROJ_KEYWORD = Qt4VSv1.0
include(angle.conf)
+include(windows-desktop.conf)
include(windows-vulkan.conf)
diff --git a/mkspecs/common/windows-desktop.conf b/mkspecs/common/windows-desktop.conf
new file mode 100644
index 0000000000..c1f2955e1b
--- /dev/null
+++ b/mkspecs/common/windows-desktop.conf
@@ -0,0 +1,5 @@
+# This file contains initializations for Windows Desktop platforms (non-UWP)
+
+WINDOWS_TARGET_PLATFORM_VERSION = $$(WindowsSDKVersion)
+# The version number might have a trailing backslash due to a VS bug.
+WINDOWS_TARGET_PLATFORM_VERSION ~= s/\\\\$//
diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf
index 375e084127..03fb96f2c5 100644
--- a/mkspecs/common/winrt_winphone/qmake.conf
+++ b/mkspecs/common/winrt_winphone/qmake.conf
@@ -97,6 +97,8 @@ WINRT_ASSETS_PATH = $$PWD/assets
WINRT_MANIFEST.capabilities = defaults
WINRT_MANIFEST.capabilities_device = defaults
+WINDOWS_TARGET_PLATFORM_VERSION = $$(UCRTVERSION)
+
include(../angle.conf)
load(qt_config)
diff --git a/mkspecs/features/android/sdk.prf b/mkspecs/features/android/sdk.prf
index eee7ac2d5d..fe7b9a27bd 100644
--- a/mkspecs/features/android/sdk.prf
+++ b/mkspecs/features/android/sdk.prf
@@ -1,6 +1,6 @@
API_VERSION_TO_USE = $$(ANDROID_API_VERSION)
isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = $$API_VERSION
-isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-16
+isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-21
ANDROID_JAR_FILE = $$ANDROID_SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar
!exists($$ANDROID_JAR_FILE) {
diff --git a/mkspecs/features/coverage.prf b/mkspecs/features/coverage.prf
new file mode 100644
index 0000000000..b8b37e1b80
--- /dev/null
+++ b/mkspecs/features/coverage.prf
@@ -0,0 +1,7 @@
+# Coverage flags
+
+coverage_trace_pc_guard {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_COVERAGE_TRACE_PC_GUARD
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_COVERAGE_TRACE_PC_GUARD
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_COVERAGE_TRACE_PC_GUARD
+}
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index 3ed6dd5889..acd302d4b2 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -48,6 +48,49 @@ but not all the files it references.
endif()
endmacro()
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configuration lib_deps link_flags)
+ set(_lib_deps)
+ set(_link_flags)
+ if(EXISTS \"${prl_file_location}\")
+ file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS[ \\t]*=\")
+ string(REGEX REPLACE \"QMAKE_PRL_LIBS[ \\t]*=[ \\t]*([^\\n]*)\" \"\\\\1\" _static_depends ${_prl_strings})
+ string(REGEX REPLACE \"[ \\t]+\" \";\" _static_depends ${_static_depends})
+ set(_search_paths)
+ foreach(_flag ${_static_depends})
+ if(_flag MATCHES \"^-l(.*)$\")
+ set(_lib \"${CMAKE_MATCH_1}\")
+ if(_lib MATCHES \"^pthread$\")
+ find_package(Threads REQUIRED)
+ list(APPEND _lib_deps Threads::Threads)
+ else()
+ if(_search_paths)
+ find_library(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH ${_lib} HINTS ${_search_paths} NO_DEFAULT_PATH)
+ endif()
+ find_library(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH ${_lib})
+ mark_as_advanced(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH)
+ if(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH)
+ list(APPEND _lib_deps
+ ${_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH}
+ )
+ else()
+ message(FATAL_ERROR \"Library not found: ${_lib}\")
+ endif()
+ endif()
+ elseif(_flag MATCHES \"^-L(.*)$\")
+ list(APPEND _search_paths \"${CMAKE_MATCH_1}\")
+ else()
+ list(APPEND _link_flags ${_flag})
+ endif()
+ endforeach()
+ endif()
+
+ string(REPLACE \";\" \" \" _link_flags \"${_link_flags}\")
+ set(${lib_deps} ${_lib_deps} PARENT_SCOPE)
+ set(${link_flags} \"SHELL:${_link_flags}\" PARENT_SCOPE)
+endfunction()
+!!ENDIF
+
!!IF !equals(TEMPLATE, aux)
macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
@@ -58,15 +101,29 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
!!ENDIF
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
+ set(_deps
+ ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ ${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}
+!!ENDIF
+ )
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
+ \"INTERFACE_LINK_LIBRARIES\" \"${_deps}\"
\"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
!!IF !isEmpty(CMAKE_LIB_SONAME)
\"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\"
!!ENDIF
# For backward compatibility with CMake < 2.8.12
- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
+ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_deps}\"
)
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+
+ if(NOT CMAKE_VERSION VERSION_LESS \"3.13\")
+ set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
+ \"INTERFACE_LINK_OPTIONS\" \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\"
+ )
+ endif()
+!!ENDIF
!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
@@ -215,6 +272,40 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ENDIF
!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ if(NOT Qt5_EXCLUDE_STATIC_DEPENDENCIES)
+!!IF !isEmpty(CMAKE_DEBUG_TYPE)
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
+ )
+!!ELSE
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
+ )
+!!ENDIF
+!!ENDIF
+
+!!IF !isEmpty(CMAKE_RELEASE_TYPE)
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
+ )
+!!ELSE
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
+ )
+!!ENDIF
+!!ENDIF
+ endif()
+
add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
!!ELSE
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index fbf1f3b8df..d90da49781 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -90,6 +90,10 @@ staticlib:unix {
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_STATIC_LIB
}
+defined(WINDOWS_TARGET_PLATFORM_VERSION, var):isEmpty(WINDOWS_TARGET_PLATFORM_MIN_VERSION) {
+ WINDOWS_TARGET_PLATFORM_MIN_VERSION = $$WINDOWS_TARGET_PLATFORM_VERSION
+}
+
incredibuild_xge {
CONFIG -= incredibuild_xge
CONFIG = incredibuild_xge $$CONFIG
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
index 6cb2e78c1c..ae859a81ff 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
@@ -105,10 +105,10 @@ warnings_are_errors:warning_clean {
# compiler.
clang {
# Apple clang 4.0-4.2,5.0-5.1,6.0-6.4,7.0-7.3,8.0-8.3,9.0-9.2
- # Regular clang 3.x-6.0
+ # Regular clang 3.x-7.0
apple_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}
reg_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}
- contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]|7\\.[0123]|8\\.[0123]|9\\.[012]")|contains(reg_ver, "[345]\\.|6\\.0") {
+ contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]|7\\.[0123]|8\\.[0123]|9\\.[012]")|contains(reg_ver, "[345]\\.|[67]\\.0") {
QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR
}
} else:intel_icc:linux {
diff --git a/mkspecs/features/win32/rtti.prf b/mkspecs/features/rtti.prf
index 6d720d2438..6d720d2438 100644
--- a/mkspecs/features/win32/rtti.prf
+++ b/mkspecs/features/rtti.prf
diff --git a/mkspecs/features/win32/rtti_off.prf b/mkspecs/features/rtti_off.prf
index b520bfa8b7..b520bfa8b7 100644
--- a/mkspecs/features/win32/rtti_off.prf
+++ b/mkspecs/features/rtti_off.prf
diff --git a/mkspecs/features/wayland-scanner.prf b/mkspecs/features/wayland-scanner.prf
index 2360917a3b..79bf02f25b 100644
--- a/mkspecs/features/wayland-scanner.prf
+++ b/mkspecs/features/wayland-scanner.prf
@@ -22,7 +22,7 @@ wayland_server_header.name = wayland ${QMAKE_FILE_BASE}
wayland_server_header.input = WAYLANDSERVERSOURCES WAYLANDSERVERSOURCES_SYSTEM
wayland_server_header.variable_out = HEADERS
wayland_server_header.output = wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
-wayland_server_header.commands = $$QMAKE_WAYLAND_SCANNER server-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+wayland_server_header.commands = $$QMAKE_WAYLAND_SCANNER --include-core-only server-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
silent:wayland_server_header.commands = @echo Wayland server header ${QMAKE_FILE_IN} && $$wayland_server_header.commands
QMAKE_EXTRA_COMPILERS += wayland_server_header
@@ -30,7 +30,7 @@ wayland_client_header.name = wayland ${QMAKE_FILE_BASE}
wayland_client_header.input = WAYLANDCLIENTSOURCES WAYLANDCLIENTSOURCES_SYSTEM
wayland_client_header.variable_out = HEADERS
wayland_client_header.output = wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
-wayland_client_header.commands = $$QMAKE_WAYLAND_SCANNER client-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+wayland_client_header.commands = $$QMAKE_WAYLAND_SCANNER --include-core-only client-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
silent:wayland_client_header.commands = @echo Wayland client header ${QMAKE_FILE_IN} && $$wayland_client_header.commands
QMAKE_EXTRA_COMPILERS += wayland_client_header
@@ -38,7 +38,7 @@ wayland_code.name = wayland ${QMAKE_FILE_BASE}
wayland_code.input = WAYLANDCLIENTSOURCES WAYLANDSERVERSOURCES
wayland_code.variable_out = SOURCES
wayland_code.output = wayland-${QMAKE_FILE_BASE}-protocol.c
-wayland_code.commands = $$QMAKE_WAYLAND_SCANNER code < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+wayland_code.commands = $$QMAKE_WAYLAND_SCANNER --include-core-only code < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
silent:wayland_code.commands = @echo Wayland code header ${QMAKE_FILE_IN} && $$wayland_code.commands
QMAKE_EXTRA_COMPILERS += wayland_code
diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf
index 143b884dbf..969343cfd7 100644
--- a/mkspecs/features/winrt/package_manifest.prf
+++ b/mkspecs/features/winrt/package_manifest.prf
@@ -69,9 +69,10 @@
isEmpty(WINRT_MANIFEST.foreground): WINRT_MANIFEST.foreground = light
isEmpty(WINRT_MANIFEST.default_language): WINRT_MANIFEST.default_language = en
*-msvc2015|*-msvc2017 {
- isEmpty(WINRT_MANIFEST.minVersion): WINRT_MANIFEST.minVersion = $$(UCRTVersion)
- isEmpty(WINRT_MANIFEST.minVersion): error("No UCRTVersion found in environment."))
- isEmpty(WINRT_MANIFEST.maxVersionTested): WINRT_MANIFEST.maxVersionTested = $$WINRT_MANIFEST.minVersion
+ isEmpty(WINRT_MANIFEST.minVersion): \
+ WINRT_MANIFEST.minVersion = $$WINDOWS_TARGET_PLATFORM_VERSION
+ isEmpty(WINRT_MANIFEST.maxVersionTested): \
+ WINRT_MANIFEST.maxVersionTested = $$WINDOWS_TARGET_PLATFORM_MIN_VERSION
}
INDENT = "$$escape_expand(\\r\\n) "
diff --git a/mkspecs/linux-clang-32/qmake.conf b/mkspecs/linux-clang-32/qmake.conf
new file mode 100644
index 0000000000..de872e7431
--- /dev/null
+++ b/mkspecs/linux-clang-32/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for linux-clang
+#
+
+MAKEFILE_GENERATOR = UNIX
+CONFIG += incremental
+
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../common/linux.conf)
+
+QMAKE_CFLAGS = -m32
+QMAKE_LFLAGS = -m32
+
+include(../common/gcc-base-unix.conf)
+include(../common/clang.conf)
+
+QMAKE_LFLAGS += -ccc-gcc-name g++
+
+load(qt_config)
diff --git a/mkspecs/linux-clang-32/qplatformdefs.h b/mkspecs/linux-clang-32/qplatformdefs.h
new file mode 100644
index 0000000000..8f5ce17858
--- /dev/null
+++ b/mkspecs/linux-clang-32/qplatformdefs.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../linux-clang/qplatformdefs.h"
diff --git a/mkspecs/linux-clang-libc++-32/qmake.conf b/mkspecs/linux-clang-libc++-32/qmake.conf
new file mode 100644
index 0000000000..f4c006d383
--- /dev/null
+++ b/mkspecs/linux-clang-libc++-32/qmake.conf
@@ -0,0 +1,10 @@
+#
+# qmake configuration for linux-clang and libc++
+#
+
+include(../linux-clang-32/qmake.conf)
+
+QMAKE_CXXFLAGS += -stdlib=libc++
+QMAKE_LFLAGS += -stdlib=libc++
+
+load(qt_config)
diff --git a/mkspecs/linux-clang-libc++-32/qplatformdefs.h b/mkspecs/linux-clang-libc++-32/qplatformdefs.h
new file mode 100644
index 0000000000..8f5ce17858
--- /dev/null
+++ b/mkspecs/linux-clang-libc++-32/qplatformdefs.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../linux-clang/qplatformdefs.h"
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
index ed131c6823..9bd2f5525f 100644
--- a/mkspecs/win32-g++/qmake.conf
+++ b/mkspecs/win32-g++/qmake.conf
@@ -8,6 +8,7 @@
#
include(../common/g++-win32.conf)
+include(../common/windows-desktop.conf)
# modifications to g++-win32.conf
diff --git a/qmake/doc/qmake.qdocconf b/qmake/doc/qmake.qdocconf
index 3493a697f4..cf8f911372 100644
--- a/qmake/doc/qmake.qdocconf
+++ b/qmake/doc/qmake.qdocconf
@@ -25,6 +25,8 @@ sources = src/qmake-manual.qdoc
imagedirs = images
exampledirs = snippets
+tagfile = qmake.tags
+
depends += \
activeqt \
qt3d \
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index fb8bad32a2..3601fe7748 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -2788,6 +2788,26 @@
See also \l{#DEPENDPATH}{DEPENDPATH}.
+ \target WINDOWS_TARGET_PLATFORM_VERSION
+ \section1 WINDOWS_TARGET_PLATFORM_VERSION
+
+ Specifies the targeted Windows version; this corresponds to the tag
+ \c{WindowsTargetPlatformVersion} in vcxproj files.
+
+ On desktop Windows, the default value is the value of the environment
+ variable \c{WindowsSDKVersion}.
+
+ On WinRT, the default value is the value of the environment variable
+ \c{UCRTVERSION}.
+
+ \target WINDOWS_TARGET_PLATFORM_MIN_VERSION
+ \section1 WINDOWS_TARGET_PLATFORM_MIN_VERSION
+
+ Specifies the minimum version of the Windows target platform; this
+ corresponds to the tag \c{WindowsTargetPlatformMinVersion} in vcxproj files.
+
+ Defaults to \c{WINDOWS_TARGET_PLATFORM_VERSION}.
+
\target WINRT_MANIFEST
\section1 WINRT_MANIFEST
@@ -2921,10 +2941,12 @@
\li The version number of the package. Defaults to \c{1.0.0.0}.
\row
\li minVersion
- \li The minimum required Windows version to run the package. Defaults to the environment variable \c UCRTVersion.
+ \li The minimum required Windows version to run the package.
+ Defaults to \c{WINDOWS_TARGET_PLATFORM_VERSION}.
\row
\li maxVersionTested
- \li The maximum Windows version the package has been tested against. Defaults to \c WINRT_MANIFEST.minVersion
+ \li The maximum Windows version the package has been tested against.
+ Defaults to \c{WINDOWS_TARGET_PLATFORM_MIN_VERSION}.
\endtable
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index f824f12bce..9ea0fe3a22 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -627,7 +627,7 @@ MakefileGenerator::init()
compiler.flags |= Compiler::CompilerNoCheckDeps;
compilers.append(compiler);
}
- for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
+ for (ProStringList::ConstIterator it = quc.cbegin(); it != quc.cend(); ++it) {
const ProStringList &inputs = v[ProKey(*it + ".input")];
for(x = 0; x < inputs.size(); ++x) {
Compiler compiler;
@@ -1910,7 +1910,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
replaceExtraCompilerVariables(tmp_out, input, QString(), NoShell),
FileFixifyFromOutdir));
} else {
- for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
+ for (ProStringList::ConstIterator input = tmp_inputs.cbegin(); input != tmp_inputs.cend(); ++input) {
t << ' ' << escapeDependencyPath(fileFixify(
replaceExtraCompilerVariables(tmp_out, (*input).toQString(), QString(), NoShell),
FileFixifyFromOutdir));
@@ -1945,7 +1945,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
const QString del_statement("-$(DEL_FILE)");
if(!wrote_clean) {
QStringList dels;
- for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
+ for (ProStringList::ConstIterator input = tmp_inputs.cbegin(); input != tmp_inputs.cend(); ++input) {
QString tinp = (*input).toQString();
QString out = replaceExtraCompilerVariables(tmp_out, tinp, QString(), NoShell);
for (const QString &rc : qAsConst(raw_clean)) {
@@ -1974,7 +1974,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
if(!cleans.isEmpty())
t << valGlue(cleans, "\n\t" + del_statement, "\n\t" + del_statement, "");
if(!wrote_clean_cmds) {
- for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
+ for (ProStringList::ConstIterator input = tmp_inputs.cbegin(); input != tmp_inputs.cend(); ++input) {
QString tinp = (*input).toQString();
t << "\n\t" << replaceExtraCompilerVariables(tmp_clean_cmds, tinp,
replaceExtraCompilerVariables(tmp_out, tinp, QString(), NoShell), TargetShell);
@@ -1993,7 +1993,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
QStringList deps, inputs;
if(!tmp_dep.isEmpty())
deps += fileFixify(tmp_dep, FileFixifyFromOutdir);
- for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
+ for (ProStringList::ConstIterator input = tmp_inputs.cbegin(); input != tmp_inputs.cend(); ++input) {
QString inpf = (*input).toQString();
deps += findDependencies(inpf);
inputs += Option::fixPathToTargetOS(inpf, false);
@@ -2068,7 +2068,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
t << "\n\t" << cmd << endl << endl;
continue;
}
- for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
+ for (ProStringList::ConstIterator input = tmp_inputs.cbegin(); input != tmp_inputs.cend(); ++input) {
QString inpf = (*input).toQString();
QStringList deps;
deps << fileFixify(inpf, FileFixifyFromOutdir);
@@ -3388,7 +3388,7 @@ MakefileGenerator::writePkgConfigFile()
libs << "QMAKE_LIBS_PRIVATE";
libs << "QMAKE_LFLAGS_THREAD"; //not sure about this one, but what about things like -pthread?
t << "Libs.private:";
- for (ProStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it)
+ for (ProStringList::ConstIterator it = libs.cbegin(); it != libs.cend(); ++it)
t << ' ' << fixLibFlags((*it).toKey()).join(' ');
t << endl;
}
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 4b33713a75..fa283d0291 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -1487,7 +1487,7 @@ UnixMakefileGenerator::writeLibtoolFile()
ProStringList libs;
libs << "LIBS" << "QMAKE_LIBS";
t << "dependency_libs='";
- for (ProStringList::ConstIterator it = libs.begin(); it != libs.end(); ++it)
+ for (ProStringList::ConstIterator it = libs.cbegin(); it != libs.cend(); ++it)
t << fixLibFlags((*it).toKey()).join(' ') << ' ';
t << "'\n\n";
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index ad2976aa01..0e95766f8e 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -34,7 +34,6 @@
#include <qscopedpointer.h>
#include <qstringlist.h>
#include <qfileinfo.h>
-#include <qversionnumber.h>
QT_BEGIN_NAMESPACE
@@ -625,31 +624,17 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
<< tagValue("RootNamespace", tool.Name)
<< tagValue("Keyword", tool.Keyword);
- QString windowsTargetPlatformVersion;
if (isWinRT) {
xml << tagValue("MinimumVisualStudioVersion", tool.Version)
<< tagValue("DefaultLanguage", "en")
<< tagValue("AppContainerApplication", "true")
<< tagValue("ApplicationType", "Windows Store")
<< tagValue("ApplicationTypeRevision", tool.SdkVersion);
- if (tool.SdkVersion == "10.0")
- windowsTargetPlatformVersion = qgetenv("UCRTVERSION");
- } else {
- QByteArray winSDKVersionStr = qgetenv("WindowsSDKVersion").trimmed();
-
- // This environment variable might end with a backslash due to a VS bug.
- if (winSDKVersionStr.endsWith('\\'))
- winSDKVersionStr.chop(1);
-
- QVersionNumber winSDKVersion = QVersionNumber::fromString(
- QString::fromLocal8Bit(winSDKVersionStr));
- if (!winSDKVersion.isNull())
- windowsTargetPlatformVersion = winSDKVersionStr;
- }
- if (!windowsTargetPlatformVersion.isEmpty()) {
- xml << tagValue("WindowsTargetPlatformVersion", windowsTargetPlatformVersion)
- << tagValue("WindowsTargetPlatformMinVersion", windowsTargetPlatformVersion);
}
+ if (!tool.WindowsTargetPlatformVersion.isEmpty())
+ xml << tagValue("WindowsTargetPlatformVersion", tool.WindowsTargetPlatformVersion);
+ if (!tool.WindowsTargetPlatformMinVersion.isEmpty())
+ xml << tagValue("WindowsTargetPlatformMinVersion", tool.WindowsTargetPlatformMinVersion);
xml << closetag();
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 4f0cee65e1..7caa94c512 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -2213,8 +2213,49 @@ void VCFilter::addFiles(const ProStringList& fileList)
void VCFilter::modifyPCHstage(QString str)
{
- bool autogenSourceFile = Project->autogenPrecompCPP;
- bool pchThroughSourceFile = !Project->precompCPP.isEmpty();
+ const bool isHFile = (str == Project->precompH);
+ const bool pchThroughSourceFile = !Project->precompSource.isEmpty();
+ if (isHFile && pchThroughSourceFile && Project->autogenPrecompSource) {
+ useCustomBuildTool = true;
+ QString toFile(Project->precompSource);
+ CustomBuildTool.Description = "Generating precompiled header source file '" + toFile + "' ...";
+ CustomBuildTool.Outputs += toFile;
+
+ QStringList lines;
+ CustomBuildTool.CommandLine +=
+ "echo /*-------------------------------------------------------------------- >" + toFile;
+ lines << "* Precompiled header source file used by Visual Studio.NET to generate";
+ lines << "* the .pch file.";
+ lines << "*";
+ lines << "* Due to issues with the dependencies checker within the IDE, it";
+ lines << "* sometimes fails to recompile the PCH file, if we force the IDE to";
+ lines << "* create the PCH file directly from the header file.";
+ lines << "*";
+ lines << "* This file is auto-generated by qmake since no PRECOMPILED_SOURCE was";
+ lines << "* specified, and is used as the common stdafx.cpp. The file is only";
+ lines << QLatin1String("* generated when creating ")
+ + (Config->CompilerVersion < NET2010 ? ".vcproj" : ".vcxproj")
+ + " project files, and is not used for";
+ lines << "* command line compilations by nmake.";
+ lines << "*";
+ lines << "* WARNING: All changes made in this file will be lost.";
+ lines << "--------------------------------------------------------------------*/";
+ lines << "#include \"" + Project->precompHFilename + "\"";
+ for (const QString &line : qAsConst(lines))
+ CustomBuildTool.CommandLine += "echo " + line + ">>" + toFile;
+ return;
+ }
+
+ useCompilerTool = true;
+ const bool isPrecompSource = pchThroughSourceFile && (str == Project->precompSource);
+ if (isPrecompSource) {
+ CompilerTool.UsePrecompiledHeader = pchCreateUsingSpecific;
+ if (Project->autogenPrecompSource)
+ CompilerTool.PrecompiledHeaderThrough = Project->precompHFilename;
+ CompilerTool.ForcedIncludeFiles = QStringList("$(NOINHERIT)");
+ return;
+ }
+
bool isCFile = false;
for (QStringList::Iterator it = Option::c_ext.begin(); it != Option::c_ext.end(); ++it) {
if (str.endsWith(*it)) {
@@ -2222,53 +2263,13 @@ void VCFilter::modifyPCHstage(QString str)
break;
}
}
- const bool isHFile = (str == Project->precompH);
- bool isCPPFile = pchThroughSourceFile && (str == Project->precompCPP);
-
- if(!isCFile && !isHFile && !isCPPFile)
- return;
-
- if(isHFile && pchThroughSourceFile) {
- if (autogenSourceFile) {
- useCustomBuildTool = true;
- QString toFile(Project->precompCPP);
- CustomBuildTool.Description = "Generating precompiled header source file '" + toFile + "' ...";
- CustomBuildTool.Outputs += toFile;
-
- QStringList lines;
- CustomBuildTool.CommandLine +=
- "echo /*-------------------------------------------------------------------- >" + toFile;
- lines << "* Precompiled header source file used by Visual Studio.NET to generate";
- lines << "* the .pch file.";
- lines << "*";
- lines << "* Due to issues with the dependencies checker within the IDE, it";
- lines << "* sometimes fails to recompile the PCH file, if we force the IDE to";
- lines << "* create the PCH file directly from the header file.";
- lines << "*";
- lines << "* This file is auto-generated by qmake since no PRECOMPILED_SOURCE was";
- lines << "* specified, and is used as the common stdafx.cpp. The file is only";
- lines << QLatin1String("* generated when creating ")
- + (Config->CompilerVersion < NET2010 ? ".vcproj" : ".vcxproj")
- + " project files, and is not used for";
- lines << "* command line compilations by nmake.";
- lines << "*";
- lines << "* WARNING: All changes made in this file will be lost.";
- lines << "--------------------------------------------------------------------*/";
- lines << "#include \"" + Project->precompHFilename + "\"";
- for (const QString &line : qAsConst(lines))
- CustomBuildTool.CommandLine += "echo " + line + ">>" + toFile;
- }
- return;
- }
- useCompilerTool = true;
- // Setup PCH options
- CompilerTool.UsePrecompiledHeader = (isCFile ? pchNone : pchCreateUsingSpecific);
- if (isCFile)
+ bool pchCompatible = (isCFile == Project->pchIsCFile);
+ if (!pchCompatible) {
+ CompilerTool.UsePrecompiledHeader = pchNone;
CompilerTool.PrecompiledHeaderThrough = QLatin1String("$(NOINHERIT)");
- else if (autogenSourceFile)
- CompilerTool.PrecompiledHeaderThrough = Project->precompHFilename;
- CompilerTool.ForcedIncludeFiles = QStringList("$(NOINHERIT)");
+ CompilerTool.ForcedIncludeFiles = QStringList("$(NOINHERIT)");
+ }
}
VCFilterFile VCFilter::findFile(const QString &filePath, bool *found) const
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index 9d1a170489..f8f9804c27 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -1123,6 +1123,8 @@ public:
QString SccLocalPath;
QString PlatformName;
QString SdkVersion;
+ QString WindowsTargetPlatformVersion;
+ QString WindowsTargetPlatformMinVersion;
// Single projects
QList<VCProjectSingleConfig> SingleProjects;
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 95c16661e7..d231260886 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -191,6 +191,10 @@ bool VcprojGenerator::writeProjectMakefile()
mergedProject.SccProjectName = mergedProjects.at(0)->vcProject.SccProjectName;
mergedProject.SccLocalPath = mergedProjects.at(0)->vcProject.SccLocalPath;
mergedProject.PlatformName = mergedProjects.at(0)->vcProject.PlatformName;
+ mergedProject.WindowsTargetPlatformVersion =
+ project->first("WINDOWS_TARGET_PLATFORM_VERSION").toQString();
+ mergedProject.WindowsTargetPlatformMinVersion =
+ project->first("WINDOWS_TARGET_PLATFORM_MIN_VERSION").toQString();
XmlOutput xmlOut(t);
projectWriter->write(xmlOut, mergedProject);
@@ -473,8 +477,8 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt
// Add all unknown libs to the deps
QStringList where = QStringList() << "LIBS" << "LIBS_PRIVATE"
<< "QMAKE_LIBS" << "QMAKE_LIBS_PRIVATE";
- for (QStringList::ConstIterator wit = where.begin();
- wit != where.end(); ++wit) {
+ for (QStringList::ConstIterator wit = where.cbegin();
+ wit != where.cend(); ++wit) {
const ProStringList &l = tmp_proj.values(ProKey(*wit));
for (ProStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
const QString opt = fixLibFlag(*it).toQString();
@@ -771,8 +775,9 @@ void VcprojGenerator::init()
// Setup PCH variables
precompH = project->first("PRECOMPILED_HEADER").toQString();
- precompCPP = project->first("PRECOMPILED_SOURCE").toQString();
- usePCH = !precompH.isEmpty() && project->isActiveConfig("precompile_header");
+ precompSource = project->first("PRECOMPILED_SOURCE").toQString();
+ pchIsCFile = project->isActiveConfig("precompile_header_c");
+ usePCH = !precompH.isEmpty() && (pchIsCFile || project->isActiveConfig("precompile_header"));
if (usePCH) {
precompHFilename = fileInfo(precompH).fileName();
// Created files
@@ -786,13 +791,15 @@ void VcprojGenerator::init()
project->values("PRECOMPILED_OBJECT") = ProStringList(precompObj);
project->values("PRECOMPILED_PCH") = ProStringList(precompPch);
- autogenPrecompCPP = precompCPP.isEmpty() && project->isActiveConfig("autogen_precompile_source");
- if (autogenPrecompCPP) {
- precompCPP = precompH
- + (Option::cpp_ext.count() ? Option::cpp_ext.at(0) : QLatin1String(".cpp"));
- project->values("GENERATED_SOURCES") += precompCPP;
- } else if (!precompCPP.isEmpty()) {
- project->values("SOURCES") += precompCPP;
+ autogenPrecompSource = precompSource.isEmpty() && project->isActiveConfig("autogen_precompile_source");
+ if (autogenPrecompSource) {
+ precompSource = precompH
+ + (pchIsCFile
+ ? (Option::c_ext.count() ? Option::c_ext.at(0) : QLatin1String(".c"))
+ : (Option::cpp_ext.count() ? Option::cpp_ext.at(0) : QLatin1String(".cpp")));
+ project->values("GENERATED_SOURCES") += precompSource;
+ } else if (!precompSource.isEmpty()) {
+ project->values("SOURCES") += precompSource;
}
}
diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h
index 6af5ec7007..6f9743cb09 100644
--- a/qmake/generators/win32/msvc_vcproj.h
+++ b/qmake/generators/win32/msvc_vcproj.h
@@ -57,15 +57,16 @@ public:
~VcprojGenerator();
QString defaultMakefile() const;
- QString precompH, precompHFilename, precompCPP,
+ QString precompH, precompHFilename, precompSource,
precompObj, precompPch;
- bool autogenPrecompCPP;
+ bool autogenPrecompSource;
static bool hasBuiltinCompiler(const QString &file);
QHash<QString, QStringList> extraCompilerSources;
QHash<QString, QString> extraCompilerOutputs;
const QString customBuildToolFilterFileSuffix;
bool usePCH;
+ bool pchIsCFile = false;
VCProjectWriter *projectWriter;
protected:
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 6046e5791e..a855fcd0a5 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -114,8 +114,8 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
goto found;
}
QString libBase = (*dir_it).local() + '/' + lib + verovr;
- for (ProStringList::ConstIterator extit = impexts.begin();
- extit != impexts.end(); ++extit) {
+ for (ProStringList::ConstIterator extit = impexts.cbegin();
+ extit != impexts.cend(); ++extit) {
if (exists(libBase + '.' + *extit)) {
(*it) = cand + verovr + '.' + *extit;
goto found;
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
index 432339d48e..ade8e15a39 100644
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -1190,7 +1190,7 @@ bool QMakeEvaluator::loadSpecInternal()
# ifdef Q_OS_UNIX
if (m_qmakespec.endsWith(QLatin1String("/default-host"))
|| m_qmakespec.endsWith(QLatin1String("/default"))) {
- QString rspec = QFileInfo(m_qmakespec).readLink();
+ QString rspec = QFileInfo(m_qmakespec).symLinkTarget();
if (!rspec.isEmpty())
m_qmakespec = QDir::cleanPath(QDir(m_qmakespec).absoluteFilePath(rspec));
}
diff --git a/qmake/property.cpp b/qmake/property.cpp
index c0a3ec0dab..432ff55664 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -178,8 +178,8 @@ QMakeProperty::exec()
}
return true;
}
- for(QStringList::ConstIterator it = Option::prop::properties.begin();
- it != Option::prop::properties.end(); it++) {
+ for (QStringList::ConstIterator it = Option::prop::properties.cbegin();
+ it != Option::prop::properties.cend(); it++) {
if(Option::prop::properties.count() > 1)
fprintf(stdout, "%s:", (*it).toLatin1().constData());
const ProKey pkey(*it);
@@ -191,11 +191,11 @@ QMakeProperty::exec()
}
}
} else if(Option::qmake_mode == Option::QMAKE_SET_PROPERTY) {
- for(QStringList::ConstIterator it = Option::prop::properties.begin();
- it != Option::prop::properties.end(); it++) {
+ for (QStringList::ConstIterator it = Option::prop::properties.cbegin();
+ it != Option::prop::properties.cend(); it++) {
QString var = (*it);
it++;
- if(it == Option::prop::properties.end()) {
+ if (it == Option::prop::properties.cend()) {
ret = false;
break;
}
@@ -203,8 +203,8 @@ QMakeProperty::exec()
setValue(var, (*it));
}
} else if(Option::qmake_mode == Option::QMAKE_UNSET_PROPERTY) {
- for(QStringList::ConstIterator it = Option::prop::properties.begin();
- it != Option::prop::properties.end(); it++) {
+ for (QStringList::ConstIterator it = Option::prop::properties.cbegin();
+ it != Option::prop::properties.cend(); it++) {
QString var = (*it);
if(!var.startsWith("."))
remove(var);
diff --git a/src/3rdparty/sqlite.pri b/src/3rdparty/sqlite.pri
index cb8b888a6a..068764c726 100644
--- a/src/3rdparty/sqlite.pri
+++ b/src/3rdparty/sqlite.pri
@@ -1,5 +1,5 @@
CONFIG(release, debug|release):DEFINES *= NDEBUG
-DEFINES += SQLITE_ENABLE_COLUMN_METADATA SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE SQLITE_ENABLE_FTS3 SQLITE_ENABLE_FTS3_PARENTHESIS SQLITE_ENABLE_FTS5 SQLITE_ENABLE_RTREE
+DEFINES += SQLITE_ENABLE_COLUMN_METADATA SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE SQLITE_ENABLE_FTS3 SQLITE_ENABLE_FTS3_PARENTHESIS SQLITE_ENABLE_FTS5 SQLITE_ENABLE_RTREE SQLITE_ENABLE_JSON1
!contains(CONFIG, largefile):DEFINES += SQLITE_DISABLE_LFS
qtConfig(posix_fallocate): DEFINES += HAVE_POSIX_FALLOCATE=1
winrt {
diff --git a/src/android/jar/jar.pro b/src/android/jar/jar.pro
index bda15a0a00..ac6fc79968 100644
--- a/src/android/jar/jar.pro
+++ b/src/android/jar/jar.pro
@@ -2,7 +2,6 @@ TARGET = QtAndroid
CONFIG += java
DESTDIR = $$[QT_INSTALL_PREFIX/get]/jar
-API_VERSION = android-16
PATHPREFIX = $$PWD/src/org/qtproject/qt5/android/
diff --git a/src/android/jar/src/org/qtproject/qt5/android/ExtractStyle.java b/src/android/jar/src/org/qtproject/qt5/android/ExtractStyle.java
index 3f74383a82..e6de354ac4 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/ExtractStyle.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/ExtractStyle.java
@@ -89,8 +89,6 @@ import android.view.inputmethod.EditorInfo;
public class ExtractStyle {
- native static int[] extractChunkInfo(byte[] chunkData);
- native static int[] extractNativeChunkInfo(int nativeChunk);
native static int[] extractChunkInfo20(byte[] chunkData);
native static int[] extractNativeChunkInfo20(long nativeChunk);
@@ -345,10 +343,7 @@ public class ExtractStyle {
}
public void drawPatch(Bitmap bmp, byte[] chunks, RectF dst, Paint paint) {
- if (Build.VERSION.SDK_INT > 19)
- chunkData = extractChunkInfo20(chunks);
- else
- chunkData = extractChunkInfo(chunks);
+ chunkData = extractChunkInfo20(chunks);
}
}
@@ -698,10 +693,6 @@ public class ExtractStyle {
json.put("thicknessRatio",gradientStateClass.getField("mThicknessRatio").getFloat(obj));
json.put("innerRadius",gradientStateClass.getField("mInnerRadius").getInt(obj));
json.put("thickness",gradientStateClass.getField("mThickness").getInt(obj));
- if (Build.VERSION.SDK_INT < 20) {
- json.put("solidColor",gradientStateClass.getField("mSolidColor").getInt(obj));
- json.put("strokeColor",gradientStateClass.getField("mStrokeColor").getInt(obj));
- }
} catch (Exception e) {
e.printStackTrace();
}
@@ -802,14 +793,7 @@ public class ExtractStyle {
Object state = getAccessibleField(NinePatchDrawable.class, "mNinePatchState").get(d);
np = (NinePatch) getAccessibleField(state.getClass(), "mNinePatch").get(state);
}
- if (Build.VERSION.SDK_INT < 19)
- return getJsonChunkInfo(extractChunkInfo((byte[]) getAccessibleField(np.getClass(), "mChunk").get(np)));
- else
- {
- if (Build.VERSION.SDK_INT > 19)
- return getJsonChunkInfo(extractNativeChunkInfo20(getAccessibleField(np.getClass(), "mNativeChunk").getLong(np)));
- return getJsonChunkInfo(extractNativeChunkInfo(getAccessibleField(np.getClass(), "mNativeChunk").getInt(np)));
- }
+ return getJsonChunkInfo(extractNativeChunkInfo20(getAccessibleField(np.getClass(), "mNativeChunk").getLong(np)));
}
class DrawableCache
@@ -1016,16 +1000,12 @@ public class ExtractStyle {
json.put("gravity", bitmapDrawable.getGravity());
json.put("tileModeX", bitmapDrawable.getTileModeX());
json.put("tileModeY", bitmapDrawable.getTileModeY());
- if (Build.VERSION.SDK_INT >= 18) {
- json.put("antialias", (Boolean) BitmapDrawable.class.getMethod("hasAntiAlias").invoke(bitmapDrawable));
- json.put("mipMap", (Boolean) BitmapDrawable.class.getMethod("hasMipMap").invoke(bitmapDrawable));
- }
- if (Build.VERSION.SDK_INT >= 21) {
- json.put("tintMode", (PorterDuff.Mode) BitmapDrawable.class.getMethod("getTintMode").invoke(bitmapDrawable));
- ColorStateList tintList = (ColorStateList) BitmapDrawable.class.getMethod("getTint").invoke(bitmapDrawable);
- if (tintList != null)
- json.put("tintList", getColorStateList(tintList));
- }
+ json.put("antialias", (Boolean) BitmapDrawable.class.getMethod("hasAntiAlias").invoke(bitmapDrawable));
+ json.put("mipMap", (Boolean) BitmapDrawable.class.getMethod("hasMipMap").invoke(bitmapDrawable));
+ json.put("tintMode", (PorterDuff.Mode) BitmapDrawable.class.getMethod("getTintMode").invoke(bitmapDrawable));
+ ColorStateList tintList = (ColorStateList) BitmapDrawable.class.getMethod("getTint").invoke(bitmapDrawable);
+ if (tintList != null)
+ json.put("tintList", getColorStateList(tintList));
} catch (Exception e) {
e.printStackTrace();
}
@@ -1758,10 +1738,8 @@ public class ExtractStyle {
json.put("Switch_switchPadding", a.getDimensionPixelSize(getField(styleableClass, "Switch_switchPadding"), 0));
json.put("Switch_thumbTextPadding", a.getDimensionPixelSize(getField(styleableClass, "Switch_thumbTextPadding"), 0));
- if (Build.VERSION.SDK_INT >= 21) {
- json.put("Switch_showText", a.getBoolean(getField(styleableClass, "Switch_showText"), true));
- json.put("Switch_splitTrack", a.getBoolean(getField(styleableClass, "Switch_splitTrack"), false));
- }
+ json.put("Switch_showText", a.getBoolean(getField(styleableClass, "Switch_showText"), true));
+ json.put("Switch_splitTrack", a.getBoolean(getField(styleableClass, "Switch_splitTrack"), false));
a.recycle();
jsonWriter.name(styleName).value(json);
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
index 02033859e9..4485ed6338 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
@@ -161,15 +161,13 @@ public class QtActivityDelegate
m_activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
m_activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
try {
- if (Build.VERSION.SDK_INT >= 19) {
- int flags = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
- flags |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
- flags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
- flags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
- flags |= View.SYSTEM_UI_FLAG_FULLSCREEN;
- flags |= View.class.getDeclaredField("SYSTEM_UI_FLAG_IMMERSIVE_STICKY").getInt(null);
- m_activity.getWindow().getDecorView().setSystemUiVisibility(flags | View.INVISIBLE);
- }
+ int flags = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
+ flags |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
+ flags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
+ flags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
+ flags |= View.SYSTEM_UI_FLAG_FULLSCREEN;
+ flags |= View.class.getDeclaredField("SYSTEM_UI_FLAG_IMMERSIVE_STICKY").getInt(null);
+ m_activity.getWindow().getDecorView().setSystemUiVisibility(flags | View.INVISIBLE);
} catch (Exception e) {
e.printStackTrace();
}
diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivityLoader.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivityLoader.java
index 759daf4393..6beb5e3161 100644
--- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivityLoader.java
+++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivityLoader.java
@@ -132,7 +132,7 @@ public class QtActivityLoader extends QtLoader {
return;
}
- if (Build.VERSION.SDK_INT < 16) {
+ if (Build.VERSION.SDK_INT < 21) {
// fatal error, show the error and quit
AlertDialog errorDialog = new AlertDialog.Builder(m_activity).create();
if (m_contextInfo.metaData.containsKey("android.app.unsupported_android_version"))
diff --git a/src/android/templates/AndroidManifest.xml b/src/android/templates/AndroidManifest.xml
index 678ba4f0bd..992ceb3aa2 100644
--- a/src/android/templates/AndroidManifest.xml
+++ b/src/android/templates/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest package="org.qtproject.example" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
- <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
+ <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28"/>
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index 28c03553c5..271be248ec 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -303,6 +303,6 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State newState,
}
}
-#include "moc_qpropertyanimation.cpp"
-
QT_END_NAMESPACE
+
+#include "moc_qpropertyanimation.cpp"
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 466c575c3e..804e0b2935 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -505,9 +505,9 @@ QTextCodec::~QTextCodec()
globalData->allCodecs.removeOne(this);
- auto it = globalData->codecCache.cbegin();
+ auto it = globalData->codecCache.begin();
- while (it != globalData->codecCache.cend()) {
+ while (it != globalData->codecCache.end()) {
if (it.value() == this)
it = globalData->codecCache.erase(it);
else
@@ -695,11 +695,9 @@ void QTextCodec::setCodecForLocale(QTextCodec *c)
\threadsafe
Returns a pointer to the codec most suitable for this locale.
- On Windows, the codec will be based on a system locale. On Unix
- systems, the codec will might fall back to using the \e iconv
- library if no builtin codec for the locale can be found.
-
- Note that in these cases the codec's name will be "System".
+ The codec will be retrieved from ICU where that backend is in use, otherwise
+ it may be obtained from an OS-specific API. In the latter case, the codec's
+ name may be "System".
*/
QTextCodec* QTextCodec::codecForLocale()
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index a22a7459bd..948aa0829b 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -876,6 +876,20 @@
"condition": "features.proxymodel",
"output": [ "publicFeature", "feature" ]
},
+ "transposeproxymodel": {
+ "label": "QTransposeProxyModel",
+ "purpose": "Provides a proxy to swap rows and columns of a model.",
+ "section": "ItemViews",
+ "condition": "features.proxymodel",
+ "output": [ "publicFeature", "feature" ]
+ },
+ "concatenatetablesproxymodel": {
+ "label": "QConcatenateTablesProxyModel",
+ "purpose": "Supports concatenating source models.",
+ "section": "ItemViews",
+ "condition": "features.proxymodel",
+ "output": [ "publicFeature", "feature" ]
+ },
"stringlistmodel": {
"label": "QStringListModel",
"purpose": "Provides a model that supplies strings to views.",
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp
index cc3f689710..0e746cd6e6 100644
--- a/src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_tools_qlistdata.cpp
@@ -146,7 +146,7 @@ list.move(1, 4);
//! [12]
QList<QString> list;
list << "A" << "B" << "C" << "D" << "E" << "F";
-list.swap(1, 4);
+list.swapItemsAt(1, 4);
// list: ["A", "E", "C", "D", "B", "F"]
//! [12]
diff --git a/src/corelib/doc/snippets/resource-system/mainwindow.cpp b/src/corelib/doc/snippets/resource-system/mainwindow.cpp
index bbeeec64ac..86e93aaa62 100644
--- a/src/corelib/doc/snippets/resource-system/mainwindow.cpp
+++ b/src/corelib/doc/snippets/resource-system/mainwindow.cpp
@@ -338,11 +338,11 @@ void MainWindow::loadFile(const QString &fileName)
QTextStream in(&file);
#ifndef QT_NO_CURSOR
- QApplication::setOverrideCursor(Qt::WaitCursor);
+ QGuiApplication::setOverrideCursor(Qt::WaitCursor);
#endif
textEdit->setPlainText(in.readAll());
#ifndef QT_NO_CURSOR
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
setCurrentFile(fileName);
@@ -365,11 +365,11 @@ bool MainWindow::saveFile(const QString &fileName)
QTextStream out(&file);
#ifndef QT_NO_CURSOR
- QApplication::setOverrideCursor(Qt::WaitCursor);
+ QGuiApplication::setOverrideCursor(Qt::WaitCursor);
#endif
out << textEdit->toPlainText();
#ifndef QT_NO_CURSOR
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
setCurrentFile(fileName);
diff --git a/src/corelib/doc/src/containers.qdoc b/src/corelib/doc/src/containers.qdoc
index a1c32bb007..e6c95129db 100644
--- a/src/corelib/doc/src/containers.qdoc
+++ b/src/corelib/doc/src/containers.qdoc
@@ -171,8 +171,9 @@
The values stored in the various containers can be of any
\e{assignable data type}. To qualify, a type must provide a
- default constructor, a copy constructor, and an assignment
- operator. This covers most data types you are likely to want to
+ copy constructor, and an assignment operator. For some
+ operations a default constructor is also required. This
+ covers most data types you are likely to want to
store in a container, including basic types such as \c int and \c
double, pointer types, and Qt data types such as QString, QDate,
and QTime, but it doesn't cover QObject or any QObject subclass
diff --git a/src/corelib/doc/src/resource-system.qdoc b/src/corelib/doc/src/resource-system.qdoc
index 9b6b613f79..69ec5e556b 100644
--- a/src/corelib/doc/src/resource-system.qdoc
+++ b/src/corelib/doc/src/resource-system.qdoc
@@ -100,6 +100,9 @@
See the QLocale documentation for a description of the format to use
for locale strings.
+ See QFileSelector for an additional mechanism to select locale-specific
+ resources, in addition to the ability to select OS-specific and other
+ features.
\section2 External Binary Resources
@@ -143,24 +146,70 @@
\section1 Compression
- Resources are compressed by default (in the \c ZIP format). It is
- possible to turn off compression. This can be useful if your
- resources already contain a compressed format, such as \c .png
- files. You do this by giving the \c {-no-compress} command line
- argument.
+ \c rcc attempts to compress the content to optimize disk space usage in the
+ final binaries. By default, it will perform a heuristic check to determine
+ whether compressing is worth it and will store the content uncompressed if
+ it fails to sufficiently compress. To control the threshold, you can use
+ the \c {-threshold} option, which tells \c rcc the percentage of the
+ original file size that must be gained for it to store the file in
+ compressed form.
+
+ \code
+ rcc -threshold 25 myresources.qrc
+ \endcode
+
+ The default value is "70", indicating that the compressed file must be 70%
+ smaller than the original (no more than 30% of the original file size).
+
+ It is possible to turn off compression, if desired. This can be useful if
+ your resources already contain a compressed format, such as \c .png files,
+ and you do not want to incur the CPU cost at build time to confirm that it
+ can't be compressed. Another reason is if disk usage is not a problem and
+ the application would prefer to keep the content as clean memory pages at
+ runtime. You do this by giving the \c {-no-compress} command line argument.
\code
rcc -no-compress myresources.qrc
\endcode
- \c rcc also gives you some control over the compression. You can
- specify the compression level and the threshold level to consider
- while compressing files, for example:
+ \c rcc also gives you some control over the compression level and
+ compression algorithm, for example:
\code
- rcc -compress 2 -threshold 3 myresources.qrc
+ rcc -compress 2 -compress-algo zlib myresources.qrc
\endcode
+ \c rcc supports the following compression algorithms and compression
+ levels:
+
+ \list
+ \li \c{best}: use the best algorithm among the ones below, at its highest
+ compression level, to achieve the most compression at the expense of
+ using a lot of CPU time during compilation. This value is useful in the
+ XML file to indicate a file should be most compressed, regardless of
+ which algorithms \c rcc supports.
+
+ \li \c{zstd}: use the \l{Zstandard}{https://zstd.net} library to compress
+ contents. Valid compression levels range from 1 to 19, 1 is least
+ compression (least CPU time) and 19 is the most compression (most CPU
+ time). The default level is 14. A special value of 0 tells the \c{zstd}
+ library to choose an implementation-defined default.
+
+ \li \c{zlib}: use the \l{zlib}{https://zlib.net} library to compress
+ contents. Valid compression levels range from 1 to 9, with 1the least
+ compression (least CPU time) and 9 the most compression (most CPU time).
+ The special value 0 means "no compression" and should not be used. The
+ default is implementation-defined, but usually is level 6.
+
+ \li \c{none}: no compression. This is the same as the \c{-no-compress}
+ option.
+ \endlist
+
+ Support for both Zstandard and zlib are optional. If a given library was
+ not detected at compile time, attempting to pass \c {-compress-algo} for
+ that library will result in an error. The default compression algorithm is
+ \c zstd if it is enabled, \c zlib if not.
+
\section1 Using Resources in the Application
In the application, resource paths can be used in most places
diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h
index dfcc3c9c7f..10458e41d7 100644
--- a/src/corelib/global/qconfig-bootstrapped.h
+++ b/src/corelib/global/qconfig-bootstrapped.h
@@ -122,6 +122,11 @@
#define QT_NO_TRANSLATION
#define QT_FEATURE_translation -1
+// rcc.pro will DEFINES+= this
+#ifndef QT_FEATURE_zstd
+#define QT_FEATURE_zstd -1
+#endif
+
#ifdef QT_BUILD_QMAKE
#define QT_FEATURE_commandlineparser -1
#define QT_NO_COMPRESS
diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h
index 3e50ad8467..42cb1357f1 100644
--- a/src/corelib/global/qfloat16.h
+++ b/src/corelib/global/qfloat16.h
@@ -67,11 +67,9 @@ QT_BEGIN_NAMESPACE
class qfloat16
{
public:
-#ifndef Q_QDOC
Q_DECL_CONSTEXPR inline qfloat16() Q_DECL_NOTHROW : b16(0) { }
inline qfloat16(float f) Q_DECL_NOTHROW;
inline operator float() const Q_DECL_NOTHROW;
-#endif
private:
quint16 b16;
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 8d80a32ad5..3f0b78ec55 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -525,6 +525,31 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value));
made private. In that case, no error would be reported, but your
application would probably crash when you called a member function
of \c{w}.
+
+ \sa Q_DISABLE_COPY_MOVE, Q_DISABLE_MOVE
+*/
+
+/*!
+ \macro Q_DISABLE_MOVE(Class)
+ \relates QObject
+
+ Disables the use of move constructors and move assignment operators
+ for the given \a Class.
+
+ \sa Q_DISABLE_COPY, Q_DISABLE_COPY_MOVE
+ \since 5.13
+*/
+
+/*!
+ \macro Q_DISABLE_COPY_MOVE(Class)
+ \relates QObject
+
+ A convenience macro that disables the use of copy constructors, assignment
+ operators, move constructors and move assignment operators for the given
+ \a Class, combining Q_DISABLE_COPY and Q_DISABLE_MOVE.
+
+ \sa Q_DISABLE_COPY, Q_DISABLE_MOVE
+ \since 5.13
*/
/*!
@@ -2144,11 +2169,20 @@ struct QUnixOSVersion
static QString unquote(const char *begin, const char *end)
{
+ // man os-release says:
+ // Variable assignment values must be enclosed in double
+ // or single quotes if they include spaces, semicolons or
+ // other special characters outside of A–Z, a–z, 0–9. Shell
+ // special characters ("$", quotes, backslash, backtick)
+ // must be escaped with backslashes, following shell style.
+ // All strings should be in UTF-8 format, and non-printable
+ // characters should not be used. It is not supported to
+ // concatenate multiple individually quoted strings.
if (*begin == '"') {
Q_ASSERT(end[-1] == '"');
- return QString::fromLatin1(begin + 1, end - begin - 2);
+ return QString::fromUtf8(begin + 1, end - begin - 2);
}
- return QString::fromLatin1(begin, end - begin);
+ return QString::fromUtf8(begin, end - begin);
}
static QByteArray getEtcFileContent(const char *filename)
{
@@ -3245,6 +3279,34 @@ void *qMemSet(void *dest, int c, size_t n) { return memset(dest, c, n); }
// add thread-safety for the Qt wrappers.
static QBasicMutex environmentMutex;
+/*
+ Wraps tzset(), which accesses the environment, so should only be called while
+ we hold the lock on the environment mutex.
+*/
+void qTzSet()
+{
+ QMutexLocker locker(&environmentMutex);
+#if defined(Q_OS_WIN)
+ _tzset();
+#else
+ tzset();
+#endif // Q_OS_WIN
+}
+
+/*
+ Wrap mktime(), which is specified to behave as if it called tzset(), hence
+ shares its implicit environment-dependence.
+*/
+time_t qMkTime(struct tm *when)
+{
+ QMutexLocker locker(&environmentMutex);
+ return mktime(when);
+}
+
+// Also specified to behave as if they call tzset():
+// localtime() -- but not localtime_r(), which we use when threaded
+// strftime() -- not used (except in tests)
+
/*!
\relates <QtGlobal>
\threadsafe
@@ -4043,6 +4105,13 @@ bool qunsetenv(const char *varName)
Example of a movable type:
\snippet code/src_corelib_global_qglobal.cpp 39
+
+ Qt will try to detect the class of a type using std::is_trivial or
+ std::is_trivially_copyable. Use this macro to tune the behavior.
+ For instance many types would be candidates for Q_MOVABLE_TYPE despite
+ not being trivially-copyable. For binary compatibility reasons, QList
+ optimizations are only enabled if there is an explicit
+ Q_DECLARE_TYPEINFO even for trivially-copyable types.
*/
/*!
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index ccab228804..1e4ccae65b 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -372,6 +372,14 @@ typedef double qreal;
Class(const Class &) Q_DECL_EQ_DELETE;\
Class &operator=(const Class &) Q_DECL_EQ_DELETE;
+#define Q_DISABLE_MOVE(Class) \
+ Class(Class &&) = delete; \
+ Class &operator=(Class &&) = delete;
+
+#define Q_DISABLE_COPY_MOVE(Class) \
+ Q_DISABLE_COPY(Class) \
+ Q_DISABLE_MOVE(Class)
+
/*
No, this is not an evil backdoor. QT_BUILD_INTERNAL just exports more symbols
for Qt's internal unit tests. If you want slower loading times and more
@@ -591,11 +599,11 @@ Q_DECL_CONSTEXPR inline qint64 qRound64(float d)
{ return d >= 0.0f ? qint64(d + 0.5f) : qint64(d - float(qint64(d-1)) + 0.5f) + qint64(d-1); }
template <typename T>
-Q_DECL_CONSTEXPR inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
+constexpr inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
template <typename T>
-Q_DECL_CONSTEXPR inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
+constexpr inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
template <typename T>
-Q_DECL_CONSTEXPR inline const T &qBound(const T &min, const T &val, const T &max)
+constexpr inline const T &qBound(const T &min, const T &val, const T &max)
{ return qMax(min, qMin(max, val)); }
#ifndef Q_FORWARD_DECLARE_OBJC_CLASS
@@ -1005,6 +1013,15 @@ QForeachContainer<typename std::decay<T>::type> qMakeForeachContainer(T &&t)
}
}
+
+#if __cplusplus >= 201703L
+// Use C++17 if statement with initializer. User's code ends up in a else so
+// scoping of different ifs is not broken
+#define Q_FOREACH(variable, container) \
+for (auto _container_ = QtPrivate::qMakeForeachContainer(container); \
+ _container_.i != _container_.e; ++_container_.i) \
+ if (variable = *_container_.i; false) {} else
+#else
// Explanation of the control word:
// - it's initialized to 1
// - that means both the inner and outer loops start
@@ -1019,7 +1036,7 @@ for (auto _container_ = QtPrivate::qMakeForeachContainer(container); \
_container_.control && _container_.i != _container_.e; \
++_container_.i, _container_.control ^= 1) \
for (variable = *_container_.i; _container_.control; _container_.control = 0)
-
+#endif
#endif // QT_NO_FOREACH
#define Q_FOREVER for(;;)
@@ -1192,9 +1209,6 @@ namespace QtPrivate {
//like std::enable_if
template <bool B, typename T = void> struct QEnableIf;
template <typename T> struct QEnableIf<true, T> { typedef T Type; };
-
-template <bool B, typename T, typename F> struct QConditional { typedef T Type; };
-template <typename T, typename F> struct QConditional<false, T, F> { typedef F Type; };
}
QT_END_NAMESPACE
diff --git a/src/corelib/global/qglobal_p.h b/src/corelib/global/qglobal_p.h
index 0f092e9006..d52f6268e4 100644
--- a/src/corelib/global/qglobal_p.h
+++ b/src/corelib/global/qglobal_p.h
@@ -61,6 +61,16 @@
#endif
#if defined(__cplusplus)
+#include <time.h>
+
+QT_BEGIN_NAMESPACE
+
+// These behave as if they consult the environment, so need to share its locking:
+Q_CORE_EXPORT void qTzSet();
+Q_CORE_EXPORT time_t qMkTime(struct tm *when);
+
+QT_END_NAMESPACE
+
#if !QT_HAS_BUILTIN(__builtin_available)
#include <initializer_list>
#include <QtCore/qoperatingsystemversion.h>
diff --git a/src/corelib/global/qlogging.h b/src/corelib/global/qlogging.h
index 16e01183bd..dded09999b 100644
--- a/src/corelib/global/qlogging.h
+++ b/src/corelib/global/qlogging.h
@@ -153,9 +153,9 @@ private:
#endif
#ifdef QT_MESSAGELOGCONTEXT
- #define QT_MESSAGELOG_FILE __FILE__
+ #define QT_MESSAGELOG_FILE static_cast<const char *>(__FILE__)
#define QT_MESSAGELOG_LINE __LINE__
- #define QT_MESSAGELOG_FUNC Q_FUNC_INFO
+ #define QT_MESSAGELOG_FUNC static_cast<const char *>(Q_FUNC_INFO)
#else
#define QT_MESSAGELOG_FILE nullptr
#define QT_MESSAGELOG_LINE 0
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index dec2c44637..41b94bf15a 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -516,7 +516,7 @@ public:
AA_SetPalette = 19,
AA_EnableHighDpiScaling = 20,
AA_DisableHighDpiScaling = 21,
- AA_UseStyleSheetPropagationInWidgetStyles = 22, // ### Qt 6: remove me
+ AA_UseStyleSheetPropagationInWidgetStyles = 22,
AA_DontUseNativeDialogs = 23,
AA_SynthesizeMouseForUnhandledTabletEvents = 24,
AA_CompressHighFrequencyEvents = 25,
@@ -1504,9 +1504,11 @@ public:
// Metadata
FontRole = 6,
TextAlignmentRole = 7,
+#if QT_DEPRECATED_SINCE(5, 13)
BackgroundColorRole = 8,
- BackgroundRole = 8,
TextColorRole = 9,
+#endif
+ BackgroundRole = 8,
ForegroundRole = 9,
CheckStateRole = 10,
// Accessibility
diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h
index 4f79c48c51..567ff5c08e 100644
--- a/src/corelib/global/qtypeinfo.h
+++ b/src/corelib/global/qtypeinfo.h
@@ -49,6 +49,26 @@ QT_BEGIN_NAMESPACE
QTypeInfo - type trait functionality
*/
+template <typename T>
+static constexpr bool qIsRelocatable()
+{
+#if defined(Q_CC_CLANG) || !defined(Q_CC_GNU) || Q_CC_GNU >= 501
+ return std::is_trivially_copyable<T>::value && std::is_trivially_destructible<T>::value;
+#else
+ return std::is_enum<T>::value || std::is_integral<T>::value;
+#endif
+}
+
+template <typename T>
+static constexpr bool qIsTrivial()
+{
+#if defined(Q_CC_CLANG) || !defined(Q_CC_GNU) || Q_CC_GNU >= 501
+ return std::is_trivial<T>::value;
+#else
+ return std::is_enum<T>::value || std::is_integral<T>::value;
+#endif
+}
+
/*
The catch-all template.
*/
@@ -61,9 +81,9 @@ public:
isSpecialized = std::is_enum<T>::value, // don't require every enum to be marked manually
isPointer = false,
isIntegral = std::is_integral<T>::value,
- isComplex = !isIntegral && !std::is_enum<T>::value,
+ isComplex = !qIsTrivial<T>(),
isStatic = true,
- isRelocatable = std::is_enum<T>::value,
+ isRelocatable = qIsRelocatable<T>(),
isLarge = (sizeof(T)>sizeof(void*)),
isDummy = false, //### Qt6: remove
sizeOf = sizeof(T)
@@ -248,9 +268,9 @@ class QTypeInfo<TYPE > \
public: \
enum { \
isSpecialized = true, \
- isComplex = (((FLAGS) & Q_PRIMITIVE_TYPE) == 0), \
+ isComplex = (((FLAGS) & Q_PRIMITIVE_TYPE) == 0) && !qIsTrivial<TYPE>(), \
isStatic = (((FLAGS) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), \
- isRelocatable = !isStatic || ((FLAGS) & Q_RELOCATABLE_TYPE), \
+ isRelocatable = !isStatic || ((FLAGS) & Q_RELOCATABLE_TYPE) || qIsRelocatable<TYPE>(), \
isLarge = (sizeof(TYPE)>sizeof(void*)), \
isPointer = false, \
isIntegral = std::is_integral< TYPE >::value, \
diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri
index 086d642c26..9b6044752f 100644
--- a/src/corelib/io/io.pri
+++ b/src/corelib/io/io.pri
@@ -79,6 +79,8 @@ SOURCES += \
io/qloggingcategory.cpp \
io/qloggingregistry.cpp
+qtConfig(zstd): QMAKE_USE_PRIVATE += zstd
+
qtConfig(filesystemwatcher) {
HEADERS += \
io/qfilesystemwatcher.h \
diff --git a/src/corelib/io/qabstractfileengine_p.h b/src/corelib/io/qabstractfileengine_p.h
index 00c415b521..4a7fe7bff5 100644
--- a/src/corelib/io/qabstractfileengine_p.h
+++ b/src/corelib/io/qabstractfileengine_p.h
@@ -208,7 +208,7 @@ protected:
QScopedPointer<QAbstractFileEnginePrivate> d_ptr;
private:
Q_DECLARE_PRIVATE(QAbstractFileEngine)
- Q_DISABLE_COPY(QAbstractFileEngine)
+ Q_DISABLE_COPY_MOVE(QAbstractFileEngine)
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractFileEngine::FileFlags)
@@ -245,7 +245,7 @@ protected:
virtual QVariant entryInfo(EntryInfoType type) const;
private:
- Q_DISABLE_COPY(QAbstractFileEngineIterator)
+ Q_DISABLE_COPY_MOVE(QAbstractFileEngineIterator)
friend class QDirIterator;
friend class QDirIteratorPrivate;
void setPath(const QString &path);
diff --git a/src/corelib/io/qbuffer.cpp b/src/corelib/io/qbuffer.cpp
index e0b9c41323..7b3fa2ccad 100644
--- a/src/corelib/io/qbuffer.cpp
+++ b/src/corelib/io/qbuffer.cpp
@@ -60,8 +60,8 @@ public:
QByteArray *buf;
QByteArray defaultBuf;
- virtual qint64 peek(char *data, qint64 maxSize) override;
- virtual QByteArray peek(qint64 maxSize) override;
+ qint64 peek(char *data, qint64 maxSize) override;
+ QByteArray peek(qint64 maxSize) override;
#ifndef QT_NO_QOBJECT
// private slots
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp
index 4d56d1a179..15c5e0ce96 100644
--- a/src/corelib/io/qdebug.cpp
+++ b/src/corelib/io/qdebug.cpp
@@ -356,7 +356,7 @@ QDebug &QDebug::resetFormat()
stream->space = true;
if (stream->context.version > 1)
stream->flags = 0;
- stream->setVerbosity(Stream::DefaultVerbosity);
+ stream->setVerbosity(DefaultVerbosity);
return *this;
}
@@ -461,7 +461,7 @@ QDebug &QDebug::resetFormat()
The allowed range is from 0 to 7. The default value is 2.
- \sa setVerbosity()
+ \sa setVerbosity(), VerbosityLevel
*/
/*!
@@ -472,7 +472,31 @@ QDebug &QDebug::resetFormat()
The allowed range is from 0 to 7. The default value is 2.
- \sa verbosity()
+ \sa verbosity(), VerbosityLevel
+*/
+
+/*!
+ \fn QDebug &QDebug::verbosity(int verbosityLevel)
+ \since 5.13
+
+ Sets the verbosity of the stream to \a verbosityLevel and returns a reference to the stream.
+
+ The allowed range is from 0 to 7. The default value is 2.
+
+ \sa verbosity(), setVerbosity(), VerbosityLevel
+*/
+
+/*!
+ \enum QDebug::VerbosityLevel
+ \since 5.13
+
+ This enum describes the range of verbosity levels.
+
+ \value MinimumVerbosity
+ \value DefaultVerbosity
+ \value MaximumVerbosity
+
+ \sa verbosity(), setVerbosity()
*/
/*!
@@ -892,37 +916,127 @@ void qt_QMetaEnum_flagDebugOperator(QDebug &debug, size_t sizeofT, int value)
#ifndef QT_NO_QOBJECT
/*!
+ \fn QDebug qt_QMetaEnum_debugOperator(QDebug &, int value, const QMetaObject *, const char *name)
\internal
+
+ Formats the given enum \a value for debug output.
+
+ The supported verbosity are:
+
+ 0: Just the key, or value with enum name if no key is found:
+
+ MyEnum2
+ MyEnum(123)
+ MyScopedEnum::Enum3
+ MyScopedEnum(456)
+
+ 1: Same as 0, but treating all enums as scoped:
+
+ MyEnum::MyEnum2
+ MyEnum(123)
+ MyScopedEnum::Enum3
+ MyScopedEnum(456)
+
+ 2: The QDebug default. Same as 0, and includes class/namespace scope:
+
+ MyNamespace::MyClass::MyEnum2
+ MyNamespace::MyClass::MyEnum(123)
+ MyNamespace::MyClass::MyScopedEnum::Enum3
+ MyNamespace::MyClass::MyScopedEnum(456)
+
+ 3: Same as 2, but treating all enums as scoped:
+
+ MyNamespace::MyClass::MyEnum::MyEnum2
+ MyNamespace::MyClass::MyEnum(123)
+ MyNamespace::MyClass::MyScopedEnum::Enum3
+ MyNamespace::MyClass::MyScopedEnum(456)
*/
QDebug qt_QMetaEnum_debugOperator(QDebug &dbg, int value, const QMetaObject *meta, const char *name)
{
QDebugStateSaver saver(dbg);
dbg.nospace();
QMetaEnum me = meta->enumerator(meta->indexOfEnumerator(name));
- const char *key = me.valueToKey(value);
- if (key) {
+
+ const int verbosity = dbg.verbosity();
+ if (verbosity >= QDebug::DefaultVerbosity) {
if (const char *scope = me.scope())
dbg << scope << "::";
- if (me.isScoped())
- dbg << me.enumName() << "::";
- dbg << key;
- } else {
- dbg << meta->className() << "::" << name << "(" << value << ")";
}
+
+ const char *key = me.valueToKey(value);
+ const bool scoped = me.isScoped() || verbosity & 1;
+ if (scoped || !key)
+ dbg << me.enumName() << (!key ? "(" : "::");
+
+ if (key)
+ dbg << key;
+ else
+ dbg << value << ")";
+
return dbg;
}
+/*!
+ \fn QDebug qt_QMetaEnum_flagDebugOperator(QDebug &, quint64 value, const QMetaObject *, const char *name)
+ \internal
+
+ Formats the given flag \a value for debug output.
+
+ The supported verbosity are:
+
+ 0: Just the key(s):
+
+ MyFlag1
+ MyFlag2|MyFlag3
+ MyScopedFlag(MyFlag2)
+ MyScopedFlag(MyFlag2|MyFlag3)
+
+ 1: Same as 0, but treating all flags as scoped:
+
+ MyFlag(MyFlag1)
+ MyFlag(MyFlag2|MyFlag3)
+ MyScopedFlag(MyFlag2)
+ MyScopedFlag(MyFlag2|MyFlag3)
+
+ 2: The QDebug default. Same as 1, and includes class/namespace scope:
+
+ QFlags<MyNamespace::MyClass::MyFlag>(MyFlag1)
+ QFlags<MyNamespace::MyClass::MyFlag>(MyFlag2|MyFlag3)
+ QFlags<MyNamespace::MyClass::MyScopedFlag>(MyFlag2)
+ QFlags<MyNamespace::MyClass::MyScopedFlag>(MyFlag2|MyFlag3)
+ */
QDebug qt_QMetaEnum_flagDebugOperator(QDebug &debug, quint64 value, const QMetaObject *meta, const char *name)
{
+ const int verbosity = debug.verbosity();
+
QDebugStateSaver saver(debug);
debug.resetFormat();
debug.noquote();
debug.nospace();
- debug << "QFlags<";
+
const QMetaEnum me = meta->enumerator(meta->indexOfEnumerator(name));
- if (const char *scope = me.scope())
- debug << scope << "::";
- debug << me.enumName() << ">(" << me.valueToKeys(value) << ')';
+
+ const bool classScope = verbosity >= QDebug::DefaultVerbosity;
+ if (classScope) {
+ debug << "QFlags<";
+
+ if (const char *scope = me.scope())
+ debug << scope << "::";
+ }
+
+ const bool enumScope = me.isScoped() || verbosity > QDebug::MinimumVerbosity;
+ if (enumScope) {
+ debug << me.enumName();
+ if (classScope)
+ debug << ">";
+ debug << "(";
+ }
+
+ debug << me.valueToKeys(value);
+
+ if (enumScope)
+ debug << ')';
+
return debug;
}
#endif // !QT_NO_QOBJECT
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 9d1ce51da5..91fde75fa5 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -67,7 +67,7 @@ class Q_CORE_EXPORT QDebug
friend class QMessageLogger;
friend class QDebugStateSaverPrivate;
struct Stream {
- enum { DefaultVerbosity = 2, VerbosityShift = 29, VerbosityMask = 0x7 };
+ enum { VerbosityShift = 29, VerbosityMask = 0x7 };
Stream(QIODevice *device) : ts(device), ref(1), type(QtDebugMsg),
space(true), message_output(false), flags(DefaultVerbosity << VerbosityShift) {}
@@ -92,7 +92,7 @@ class Q_CORE_EXPORT QDebug
void setFlag(FormatFlag flag) { if (context.version > 1) { flags |= flag; } }
void unsetFlag(FormatFlag flag) { if (context.version > 1) { flags &= ~flag; } }
int verbosity() const
- { return context.version > 1 ? (flags >> VerbosityShift) & VerbosityMask : int(Stream::DefaultVerbosity); }
+ { return context.version > 1 ? (flags >> VerbosityShift) & VerbosityMask : int(DefaultVerbosity); }
void setVerbosity(int v)
{
if (context.version > 1) {
@@ -123,8 +123,10 @@ public:
inline QDebug &space() { stream->space = true; stream->ts << ' '; return *this; }
inline QDebug &nospace() { stream->space = false; return *this; }
inline QDebug &maybeSpace() { if (stream->space) stream->ts << ' '; return *this; }
+ inline QDebug &verbosity(int verbosityLevel) { setVerbosity(verbosityLevel); return *this; }
int verbosity() const { return stream->verbosity(); }
void setVerbosity(int verbosityLevel) { stream->setVerbosity(verbosityLevel); }
+ enum VerbosityLevel { MinimumVerbosity = 0, DefaultVerbosity = 2, MaximumVerbosity = 7 };
bool autoInsertSpaces() const { return stream->space; }
void setAutoInsertSpaces(bool b) { stream->space = b; }
@@ -195,6 +197,7 @@ public:
inline QNoDebug &quote() { return *this; }
inline QNoDebug &noquote() { return *this; }
inline QNoDebug &maybeQuote(const char = '"') { return *this; }
+ inline QNoDebug &verbosity(int) { return *this; }
template<typename T>
inline QNoDebug &operator<<(const T &) { return *this; }
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index f7778943c9..9c4ae5a1c0 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -1069,6 +1069,7 @@ void QDir::setNameFilters(const QStringList &nameFilters)
d->nameFilters = nameFilters;
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
@@ -1088,6 +1089,7 @@ void QDir::addResourceSearchPath(const QString &path)
Q_UNUSED(path)
#endif
}
+#endif
#ifdef QT_BUILD_CORE_LIB
/*!
@@ -1815,6 +1817,7 @@ QDir &QDir::operator=(const QDir &dir)
return *this;
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\overload
\obsolete
@@ -1828,6 +1831,7 @@ QDir &QDir::operator=(const QString &path)
d_ptr->setPath(path);
return *this;
}
+#endif
/*!
\fn void QDir::swap(QDir &other)
diff --git a/src/corelib/io/qdir.h b/src/corelib/io/qdir.h
index 45c59d9e1d..9abb833ab1 100644
--- a/src/corelib/io/qdir.h
+++ b/src/corelib/io/qdir.h
@@ -105,7 +105,10 @@ public:
~QDir();
QDir &operator=(const QDir &);
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use QDir::setPath() instead")
QDir &operator=(const QString &path);
+#endif
#ifdef Q_COMPILER_RVALUE_REFS
QDir &operator=(QDir &&other) Q_DECL_NOTHROW { swap(other); return *this; }
#endif
@@ -118,7 +121,10 @@ public:
QString absolutePath() const;
QString canonicalPath() const;
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use QDir::addSearchPath() instead")
static void addResourceSearchPath(const QString &path);
+#endif
static void setSearchPaths(const QString &prefix, const QStringList &searchPaths);
static void addSearchPath(const QString &prefix, const QString &path);
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 3166fa1b83..ef97d67653 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -454,7 +454,13 @@ QFile::exists(const QString &fileName)
\sa fileName(), setFileName()
*/
+QString QFile::symLinkTarget() const
+{
+ Q_D(const QFile);
+ return d->engine()->fileName(QAbstractFileEngine::LinkName);
+}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
@@ -463,9 +469,9 @@ QFile::exists(const QString &fileName)
QString
QFile::readLink() const
{
- Q_D(const QFile);
- return d->engine()->fileName(QAbstractFileEngine::LinkName);
+ return symLinkTarget();
}
+#endif
/*!
\fn static QString QFile::symLinkTarget(const QString &fileName)
@@ -478,7 +484,12 @@ QFile::readLink() const
This name may not represent an existing file; it is only a string.
QFile::exists() returns \c true if the symlink points to an existing file.
*/
+QString QFile::symLinkTarget(const QString &fileName)
+{
+ return QFileInfo(fileName).symLinkTarget();
+}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
@@ -487,8 +498,9 @@ QFile::readLink() const
QString
QFile::readLink(const QString &fileName)
{
- return QFileInfo(fileName).readLink();
+ return symLinkTarget(fileName);
}
+#endif
/*!
Removes the file specified by fileName(). Returns \c true if successful;
@@ -808,7 +820,7 @@ QFile::copy(const QString &newName)
if (error) {
out.close();
close();
- d->setError(QFile::CopyError, tr("Cannot open for output"));
+ d->setError(QFile::CopyError, tr("Cannot open for output: %1").arg(out.errorString()));
} else {
if (!d->engine()->cloneTo(out.d_func()->engine())) {
char block[4096];
diff --git a/src/corelib/io/qfile.h b/src/corelib/io/qfile.h
index e6f3d942fe..cf1465ec70 100644
--- a/src/corelib/io/qfile.h
+++ b/src/corelib/io/qfile.h
@@ -107,10 +107,14 @@ public:
bool exists() const;
static bool exists(const QString &fileName);
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use QFile::symLinkTarget() instead")
QString readLink() const;
+ QT_DEPRECATED_X("Use QFile::symLinkTarget(QString) instead")
static QString readLink(const QString &fileName);
- inline QString symLinkTarget() const { return readLink(); }
- inline static QString symLinkTarget(const QString &fileName) { return readLink(fileName); }
+#endif
+ QString symLinkTarget() const;
+ static QString symLinkTarget(const QString &fileName);
bool remove();
static bool remove(const QString &fileName);
diff --git a/src/corelib/io/qfiledevice.h b/src/corelib/io/qfiledevice.h
index af41bec2f6..2d524193c5 100644
--- a/src/corelib/io/qfiledevice.h
+++ b/src/corelib/io/qfiledevice.h
@@ -100,7 +100,7 @@ public:
FileError error() const;
void unsetError();
- virtual void close() override;
+ void close() override;
bool isSequential() const override;
diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp
index 185e061d8f..998382021d 100644
--- a/src/corelib/io/qfileinfo.cpp
+++ b/src/corelib/io/qfileinfo.cpp
@@ -1107,6 +1107,7 @@ bool QFileInfo::isRoot() const
\sa exists(), isSymLink(), isDir(), isFile()
*/
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
@@ -1114,6 +1115,12 @@ bool QFileInfo::isRoot() const
*/
QString QFileInfo::readLink() const
{
+ return symLinkTarget();
+}
+#endif
+
+QString QFileInfo::symLinkTarget() const
+{
Q_D(const QFileInfo);
if (d->isDefaultConstructed)
return QLatin1String("");
diff --git a/src/corelib/io/qfileinfo.h b/src/corelib/io/qfileinfo.h
index f295a86015..baea18fab1 100644
--- a/src/corelib/io/qfileinfo.h
+++ b/src/corelib/io/qfileinfo.h
@@ -116,8 +116,11 @@ public:
bool isRoot() const;
bool isBundle() const;
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use QFileInfo::symLinkTarget() instead")
QString readLink() const;
- inline QString symLinkTarget() const { return readLink(); }
+#endif
+ QString symLinkTarget() const;
QString owner() const;
uint ownerId() const;
diff --git a/src/corelib/io/qfilesystemiterator_p.h b/src/corelib/io/qfilesystemiterator_p.h
index 081487e66e..5e4e424e69 100644
--- a/src/corelib/io/qfilesystemiterator_p.h
+++ b/src/corelib/io/qfilesystemiterator_p.h
@@ -96,7 +96,7 @@ private:
int lastError;
#endif
- Q_DISABLE_COPY(QFileSystemIterator)
+ Q_DISABLE_COPY_MOVE(QFileSystemIterator)
};
QT_END_NAMESPACE
diff --git a/src/corelib/io/qnoncontiguousbytedevice_p.h b/src/corelib/io/qnoncontiguousbytedevice_p.h
index ebed1120db..bbc4ea5ae2 100644
--- a/src/corelib/io/qnoncontiguousbytedevice_p.h
+++ b/src/corelib/io/qnoncontiguousbytedevice_p.h
@@ -179,13 +179,13 @@ class QByteDeviceWrappingIoDevice : public QIODevice
public:
QByteDeviceWrappingIoDevice (QNonContiguousByteDevice *bd);
~QByteDeviceWrappingIoDevice ();
- virtual bool isSequential () const override;
- virtual bool atEnd () const override;
- virtual bool reset () override;
- virtual qint64 size () const override;
+ bool isSequential() const override;
+ bool atEnd() const override;
+ bool reset() override;
+ qint64 size() const override;
protected:
- virtual qint64 readData ( char * data, qint64 maxSize ) override;
- virtual qint64 writeData ( const char * data, qint64 maxSize ) override;
+ qint64 readData(char *data, qint64 maxSize) override;
+ qint64 writeData(const char *data, qint64 maxSize) override;
QNonContiguousByteDevice *byteDevice;
};
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index e1f4a3a311..83849980ae 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -813,6 +813,7 @@ void QProcessPrivate::Channel::clear()
\a newState argument is the state QProcess changed to.
*/
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\fn void QProcess::finished(int exitCode)
\obsolete
@@ -820,6 +821,7 @@ void QProcessPrivate::Channel::clear()
Use finished(int exitCode, QProcess::ExitStatus status) instead.
*/
+#endif
/*!
\fn void QProcess::finished(int exitCode, QProcess::ExitStatus exitStatus)
@@ -1172,7 +1174,9 @@ bool QProcessPrivate::_q_processDied()
//emit q->standardOutputClosed();
//emit q->standardErrorClosed();
+#if QT_DEPRECATED_SINCE(5, 13)
emit q->finished(exitCode);
+#endif
emit q->finished(exitCode, exitStatus);
}
#if defined QPROCESS_DEBUG
@@ -1264,6 +1268,7 @@ QProcess::~QProcess()
d->cleanup();
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
Returns the read channel mode of the QProcess. This function is
@@ -1287,6 +1292,7 @@ void QProcess::setReadChannelMode(ProcessChannelMode mode)
{
setProcessChannelMode(mode);
}
+#endif
/*!
\since 4.2
@@ -2473,7 +2479,7 @@ QProcess::ExitStatus QProcess::exitStatus() const
int QProcess::execute(const QString &program, const QStringList &arguments)
{
QProcess process;
- process.setReadChannelMode(ForwardedChannels);
+ process.setProcessChannelMode(ForwardedChannels);
process.start(program, arguments);
if (!process.waitForFinished(-1) || process.error() == FailedToStart)
return -2;
@@ -2496,7 +2502,7 @@ int QProcess::execute(const QString &program, const QStringList &arguments)
int QProcess::execute(const QString &command)
{
QProcess process;
- process.setReadChannelMode(ForwardedChannels);
+ process.setProcessChannelMode(ForwardedChannels);
process.start(command);
if (!process.waitForFinished(-1) || process.error() == FailedToStart)
return -2;
diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h
index 474fc87de8..42cf769698 100644
--- a/src/corelib/io/qprocess.h
+++ b/src/corelib/io/qprocess.h
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
class QProcessPrivate;
-#if !defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
+#if !defined(Q_OS_WIN)
typedef qint64 Q_PID;
#else
QT_END_NAMESPACE
@@ -172,8 +172,12 @@ public:
QStringList arguments() const;
void setArguments(const QStringList & arguments);
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use QProcess::processChannelMode() instead")
ProcessChannelMode readChannelMode() const;
+ QT_DEPRECATED_X("Use QProcess::setProcessChannelMode() instead")
void setReadChannelMode(ProcessChannelMode mode);
+#endif
ProcessChannelMode processChannelMode() const;
void setProcessChannelMode(ProcessChannelMode mode);
InputChannelMode inputChannelMode() const;
@@ -269,7 +273,10 @@ public Q_SLOTS:
Q_SIGNALS:
void started(QPrivateSignal);
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use QProcess::finished(int, QProcess::ExitStatus) instead")
void finished(int exitCode); // ### Qt 6: merge the two signals with a default value
+#endif
void finished(int exitCode, QProcess::ExitStatus exitStatus);
#if QT_DEPRECATED_SINCE(5,6)
void error(QProcess::ProcessError error);
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index 564a3e5f51..e541b0ee20 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -56,16 +57,46 @@
#include "private/qabstractfileengine_p.h"
#include "private/qnumeric_p.h"
#include "private/qsimd_p.h"
+#include "private/qtools_p.h"
#include "private/qsystemerror_p.h"
+#if QT_CONFIG(zstd)
+# include <zstd.h>
+#endif
+
#ifdef Q_OS_UNIX
# include "private/qcore_unix_p.h"
#endif
+#if defined(Q_OS_UNIX) && !defined(Q_OS_NACL) && !defined(Q_OS_INTEGRITY)
+# define QT_USE_MMAP
+# include <sys/mman.h>
+#endif
+
//#define DEBUG_RESOURCE_MATCH
QT_BEGIN_NAMESPACE
+// Symbols used by code generated by RCC.
+// They cause compilation errors if the RCC content couldn't
+// be interpreted by this QtCore version.
+#if defined(__ELF__) || defined(__APPLE__) // same as RCC generates
+# define RCC_FEATURE_SYMBOL(feature) \
+ extern Q_CORE_EXPORT const quint8 qt_resourceFeature ## feature; \
+ const quint8 qt_resourceFeature ## feature = 0;
+#else
+# define RCC_FEATURE_SYMBOL(feature) \
+ Q_CORE_EXPORT quint8 qResourceFeature ## feature() { return 0; }
+#endif
+
+#ifndef QT_NO_COMPRESS
+RCC_FEATURE_SYMBOL(Zlib)
+#endif
+#if QT_CONFIG(zstd)
+RCC_FEATURE_SYMBOL(Zstd)
+#endif
+
+#undef RCC_FEATURE_SYMBOL
class QStringSplitter
{
@@ -98,11 +129,15 @@ public:
//resource glue
class QResourceRoot
{
+public:
enum Flags
{
+ // must match rcc.h
Compressed = 0x01,
- Directory = 0x02
+ Directory = 0x02,
+ CompressedZstd = 0x04
};
+private:
const uchar *tree, *names, *payloads;
int version;
inline int findOffset(int node) const { return node * (14 + (version >= 0x02 ? 8 : 0)); } //sizeof each tree element
@@ -117,7 +152,15 @@ public:
virtual ~QResourceRoot() { }
int findNode(const QString &path, const QLocale &locale=QLocale()) const;
inline bool isContainer(int node) const { return flags(node) & Directory; }
- inline bool isCompressed(int node) const { return flags(node) & Compressed; }
+ QResource::Compression compressionAlgo(int node)
+ {
+ uint compressionFlags = flags(node) & (Compressed | CompressedZstd);
+ if (compressionFlags == Compressed)
+ return QResource::ZlibCompression;
+ if (compressionFlags == CompressedZstd)
+ return QResource::ZstdCompression;
+ return QResource::NoCompression;
+ }
const uchar *data(int node, qint64 *size) const;
quint64 lastModified(int node) const;
QStringList children(int node) const;
@@ -229,6 +272,23 @@ static inline QStringList *resourceSearchPaths()
\sa {The Qt Resource System}, QFile, QDir, QFileInfo
*/
+/*!
+ \enum QResource::Compression
+ \since 5.13
+
+ This enum is used by compressionAlgorithm() to indicate which algorithm the
+ RCC tool used to compress the payload.
+
+ \value NoCompression Contents are not compressed (isCompressed() is false).
+ \value ZlibCompression Contents are compressed using \l{zlib}{https://zlib.net} and can
+ be decompressed using the qUncompress() function.
+ \value ZstdCompression Contents are compressed using \l{zstd}{https://zstd.net}. To
+ decompress, use the \c{ZSTD_decompress} function from the zstd
+ library.
+
+ \sa compressionAlgorithm(), isCopressed()
+*/
+
class QResourcePrivate {
public:
inline QResourcePrivate(QResource *_q) : q_ptr(_q) { clear(); }
@@ -243,12 +303,13 @@ public:
QLocale locale;
QString fileName, absoluteFilePath;
QList<QResourceRoot*> related;
- uint container : 1;
- mutable uint compressed : 1;
mutable qint64 size;
+ mutable quint64 lastModified;
mutable const uchar *data;
mutable QStringList children;
- mutable quint64 lastModified;
+ mutable quint8 compressionAlgo;
+ bool container;
+ /* 2 or 6 padding bytes */
QResource *q_ptr;
Q_DECLARE_PUBLIC(QResource)
@@ -258,7 +319,7 @@ void
QResourcePrivate::clear()
{
absoluteFilePath.clear();
- compressed = 0;
+ compressionAlgo = QResource::NoCompression;
data = 0;
size = 0;
children.clear();
@@ -287,11 +348,11 @@ QResourcePrivate::load(const QString &file)
container = res->isContainer(node);
if(!container) {
data = res->data(node, &size);
- compressed = res->isCompressed(node);
+ compressionAlgo = res->compressionAlgo(node);
} else {
- data = 0;
+ data = nullptr;
size = 0;
- compressed = 0;
+ compressionAlgo = QResource::NoCompression;
}
lastModified = res->lastModified(node);
} else if(res->isContainer(node) != container) {
@@ -301,9 +362,9 @@ QResourcePrivate::load(const QString &file)
related.append(res);
} else if(res->mappingRootSubdir(file)) {
container = true;
- data = 0;
+ data = nullptr;
size = 0;
- compressed = 0;
+ compressionAlgo = QResource::NoCompression;
lastModified = 0;
res->ref.ref();
related.append(res);
@@ -493,16 +554,41 @@ bool QResource::isValid() const
/*!
Returns \c true if the resource represents a file and the data backing it
- is in a compressed format, false otherwise.
+ is in a compressed format, false otherwise. If the data is compressed,
+ check compressionAlgorithm() to verify what algorithm to use to decompress
+ the data.
- \sa data(), isFile()
+ \sa data(), compressionType(), isFile()
*/
bool QResource::isCompressed() const
{
+ return compressionAlgorithm() != NoCompression;
+}
+
+/*!
+ \since 5.13
+
+ Returns the compression type that this resource is compressed with, if any.
+ If it is not compressed, this function returns QResource::NoCompression.
+
+ If this function returns QResource::ZlibCompression, you may decompress the
+ data using the qUncompress() function. Up until Qt 5.13, this was the only
+ possible compression algorithm.
+
+ If this function returns QResource::ZstdCompression, you need to use the
+ Zstandard library functios (\c{<zstd.h> header). Qt does not provide a
+ wrapper.
+
+ See \l{http://facebook.github.io/zstd/zstd_manual.html}{Zstandard manual}.
+
+ \sa isCompressed(), data(), isFile()
+*/
+QResource::Compression QResource::compressionAlgorithm() const
+{
Q_D(const QResource);
d->ensureInitialized();
- return d->compressed;
+ return Compression(d->compressionAlgo);
}
/*!
@@ -573,6 +659,7 @@ QStringList QResource::children() const
return d->children;
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
@@ -614,6 +701,7 @@ QResource::searchPaths()
QMutexLocker lock(resourceMutex());
return *resourceSearchPaths();
}
+#endif
inline uint QResourceRoot::hash(int node) const
{
@@ -853,7 +941,7 @@ Q_CORE_EXPORT bool qRegisterResourceData(int version, const unsigned char *tree,
const unsigned char *name, const unsigned char *data)
{
QMutexLocker lock(resourceMutex());
- if ((version == 0x01 || version == 0x2) && resourceList()) {
+ if (version >= 0x01 && version <= 0x3 && resourceList()) {
bool found = false;
QResourceRoot res(version, tree, name, data);
for(int i = 0; i < resourceList()->size(); ++i) {
@@ -879,7 +967,7 @@ Q_CORE_EXPORT bool qUnregisterResourceData(int version, const unsigned char *tre
return false;
QMutexLocker lock(resourceMutex());
- if ((version == 0x01 || version == 0x02) && resourceList()) {
+ if (version >= 0x01 && version <= 0x3 && resourceList()) {
QResourceRoot res(version, tree, name, data);
for(int i = 0; i < resourceList()->size(); ) {
if(*resourceList()->at(i) == res) {
@@ -906,11 +994,11 @@ public:
inline QDynamicBufferResourceRoot(const QString &_root) : root(_root), buffer(0) { }
inline ~QDynamicBufferResourceRoot() { }
inline const uchar *mappingBuffer() const { return buffer; }
- virtual QString mappingRoot() const override { return root; }
- virtual ResourceRootType type() const override { return Resource_Buffer; }
+ QString mappingRoot() const override { return root; }
+ ResourceRootType type() const override { return Resource_Buffer; }
// size == -1 means "unknown"
- bool registerSelf(const uchar *b, int size)
+ bool registerSelf(const uchar *b, qsizetype size)
{
// 5 int "pointers"
if (size >= 0 && size < 20)
@@ -938,11 +1026,27 @@ public:
const int name_offset = qFromBigEndian<qint32>(b + offset);
offset += 4;
+ quint32 file_flags = 0;
+ if (version >= 3) {
+ file_flags = qFromBigEndian<qint32>(b + offset);
+ offset += 4;
+ }
+
// Some sanity checking for sizes. This is _not_ a security measure.
if (size >= 0 && (tree_offset >= size || data_offset >= size || name_offset >= size))
return false;
- if (version == 0x01 || version == 0x02) {
+ // And some sanity checking for features
+ quint32 acceptableFlags = 0;
+#ifndef QT_NO_COMPRESS
+ acceptableFlags |= Compressed;
+#endif
+ if (QT_CONFIG(zstd))
+ acceptableFlags |= CompressedZstd;
+ if (file_flags & ~acceptableFlags)
+ return false;
+
+ if (version >= 0x01 && version <= 0x03) {
buffer = b;
setSource(version, b+tree_offset, b+name_offset, b+data_offset);
return true;
@@ -951,28 +1055,12 @@ public:
}
};
-#if defined(Q_OS_UNIX) && !defined (Q_OS_NACL) && !defined(Q_OS_INTEGRITY)
-#define QT_USE_MMAP
-#endif
-
-// most of the headers below are already included in qplatformdefs.h
-// also this lacks Large File support but that's probably irrelevant
-#if defined(QT_USE_MMAP)
-// for mmap
-QT_BEGIN_INCLUDE_NAMESPACE
-#include <sys/mman.h>
-#include <errno.h>
-QT_END_INCLUDE_NAMESPACE
-#endif
-
-
-
class QDynamicFileResourceRoot: public QDynamicBufferResourceRoot
{
QString fileName;
// for mmap'ed files, this is what needs to be unmapped.
uchar *unmapPointer;
- unsigned int unmapLength;
+ qsizetype unmapLength;
public:
inline QDynamicFileResourceRoot(const QString &_root) : QDynamicBufferResourceRoot(_root), unmapPointer(0), unmapLength(0) { }
@@ -989,76 +1077,78 @@ public:
}
}
QString mappingFile() const { return fileName; }
- virtual ResourceRootType type() const override { return Resource_File; }
-
- bool registerSelf(const QString &f) {
- bool fromMM = false;
- uchar *data = 0;
- unsigned int data_len = 0;
+ ResourceRootType type() const override { return Resource_File; }
-#ifdef QT_USE_MMAP
+ bool registerSelf(const QString &f);
+};
#ifndef MAP_FILE
-#define MAP_FILE 0
+# define MAP_FILE 0
#endif
#ifndef MAP_FAILED
-#define MAP_FAILED -1
+# define MAP_FAILED reinterpret_cast<void *>(-1)
#endif
- int fd = QT_OPEN(QFile::encodeName(f), O_RDONLY,
+bool QDynamicFileResourceRoot::registerSelf(const QString &f)
+{
+ bool fromMM = false;
+ uchar *data = nullptr;
+ qsizetype data_len = 0;
+
+#ifdef QT_USE_MMAP
+ int fd = QT_OPEN(QFile::encodeName(f), O_RDONLY,
#if defined(Q_OS_WIN)
- _S_IREAD | _S_IWRITE
+ _S_IREAD | _S_IWRITE
#else
- 0666
+ 0666
#endif
- );
- if (fd >= 0) {
- QT_STATBUF st;
- if (!QT_FSTAT(fd, &st)) {
- uchar *ptr;
- ptr = reinterpret_cast<uchar *>(
- mmap(0, st.st_size, // any address, whole file
- PROT_READ, // read-only memory
- MAP_FILE | MAP_PRIVATE, // swap-backed map from file
- fd, 0)); // from offset 0 of fd
- if (ptr && ptr != reinterpret_cast<uchar *>(MAP_FAILED)) {
- data = ptr;
- data_len = st.st_size;
- fromMM = true;
- }
+ );
+ if (fd >= 0) {
+ QT_STATBUF st;
+ if (!QT_FSTAT(fd, &st) && st.st_size <= std::numeric_limits<qsizetype>::max()) {
+ int protection = PROT_READ; // read-only memory
+ int flags = MAP_FILE | MAP_PRIVATE; // swap-backed map from file
+ void *ptr = QT_MMAP(nullptr, st.st_size, // any address, whole file
+ protection, flags,
+ fd, 0); // from offset 0 of fd
+ if (ptr != MAP_FAILED) {
+ data = static_cast<uchar *>(ptr);
+ data_len = st.st_size;
+ fromMM = true;
}
- ::close(fd);
}
+ QT_CLOSE(fd);
+ }
#endif // QT_USE_MMAP
- if(!data) {
- QFile file(f);
- if (!file.exists())
- return false;
- data_len = file.size();
- data = new uchar[data_len];
-
- bool ok = false;
- if (file.open(QIODevice::ReadOnly))
- ok = (data_len == (uint)file.read((char*)data, data_len));
- if (!ok) {
- delete [] data;
- data = 0;
- data_len = 0;
- return false;
+ if (!data) {
+ QFile file(f);
+ bool ok = false;
+ if (file.open(QIODevice::ReadOnly)) {
+ qint64 fsize = file.size();
+ if (fsize <= std::numeric_limits<qsizetype>::max()) {
+ data_len = file.size();
+ data = new uchar[data_len];
+ ok = (data_len == file.read((char*)data, data_len));
}
- fromMM = false;
}
- if (data && QDynamicBufferResourceRoot::registerSelf(data, data_len)) {
- if(fromMM) {
- unmapPointer = data;
- unmapLength = data_len;
- }
- fileName = f;
- return true;
+ if (!ok) {
+ delete [] data;
+ data = nullptr;
+ data_len = 0;
+ return false;
}
- return false;
+ fromMM = false;
}
-};
+ if (data && QDynamicBufferResourceRoot::registerSelf(data, data_len)) {
+ if (fromMM) {
+ unmapPointer = data;
+ unmapLength = data_len;
+ }
+ fileName = f;
+ return true;
+ }
+ return false;
+}
static QString qt_resource_fixResourceRoot(QString r) {
if(!r.isEmpty()) {
@@ -1531,12 +1621,40 @@ bool QResourceFileEnginePrivate::unmap(uchar *ptr)
void QResourceFileEnginePrivate::uncompress() const
{
- if (resource.isCompressed() && uncompressed.isEmpty() && resource.size()) {
+ if (uncompressed.isEmpty() && resource.size()) {
+ quint64 size;
+ switch (resource.compressionAlgorithm()) {
+ case QResource::NoCompression:
+ return; // nothing to do
+
+ case QResource::ZlibCompression:
#ifndef QT_NO_COMPRESS
- uncompressed = qUncompress(resource.data(), resource.size());
+ uncompressed = qUncompress(resource.data(), resource.size());
#else
- Q_ASSERT(!"QResourceFileEngine::open: Qt built without support for compression");
+ Q_ASSERT(!"QResourceFileEngine::open: Qt built without support for Zlib compression");
#endif
+ break;
+
+ case QResource::ZstdCompression:
+#if QT_CONFIG(zstd)
+ size = ZSTD_getFrameContentSize(resource.data(), resource.size());
+ if (!ZSTD_isError(size)) {
+ if (size >= MaxAllocSize) {
+ qWarning("QResourceFileEngine::open: content bigger than memory (size %lld)", size);
+ } else {
+ uncompressed = QByteArray(size, Qt::Uninitialized);
+ size = ZSTD_decompress(const_cast<char *>(uncompressed.data()), size,
+ resource.data(), resource.size());
+ }
+ }
+ if (ZSTD_isError(size))
+ qWarning("QResourceFileEngine::open: error decoding: %s", ZSTD_getErrorName(size));
+#else
+ Q_UNUSED(size);
+ Q_ASSERT(!"QResourceFileEngine::open: Qt built without support for Zstd compression");
+#endif
+ break;
+ }
}
}
diff --git a/src/corelib/io/qresource.h b/src/corelib/io/qresource.h
index 895cf0456e..5e798de436 100644
--- a/src/corelib/io/qresource.h
+++ b/src/corelib/io/qresource.h
@@ -54,6 +54,12 @@ class QResourcePrivate;
class Q_CORE_EXPORT QResource
{
public:
+ enum Compression {
+ NoCompression,
+ ZlibCompression,
+ ZstdCompression
+ };
+
QResource(const QString &file=QString(), const QLocale &locale=QLocale());
~QResource();
@@ -67,12 +73,17 @@ public:
bool isValid() const;
bool isCompressed() const;
+ Compression compressionAlgorithm() const;
qint64 size() const;
const uchar *data() const;
QDateTime lastModified() const;
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use QDir::addSearchPath() instead")
static void addSearchPath(const QString &path);
+ QT_DEPRECATED_X("Use QDir::searchPaths() instead")
static QStringList searchPaths();
+#endif
static bool registerResource(const QString &rccFilename, const QString &resourceRoot=QString());
static bool unregisterResource(const QString &rccFilename, const QString &resourceRoot=QString());
diff --git a/src/corelib/io/qresource_p.h b/src/corelib/io/qresource_p.h
index dcfe46704c..7451de8809 100644
--- a/src/corelib/io/qresource_p.h
+++ b/src/corelib/io/qresource_p.h
@@ -64,49 +64,49 @@ public:
explicit QResourceFileEngine(const QString &path);
~QResourceFileEngine();
- virtual void setFileName(const QString &file) override;
+ void setFileName(const QString &file) override;
- virtual bool open(QIODevice::OpenMode flags) override ;
- virtual bool close() override;
- virtual bool flush() override;
- virtual qint64 size() const override;
- virtual qint64 pos() const override;
+ bool open(QIODevice::OpenMode flags) override;
+ bool close() override;
+ bool flush() override;
+ qint64 size() const override;
+ qint64 pos() const override;
virtual bool atEnd() const;
- virtual bool seek(qint64) override;
- virtual qint64 read(char *data, qint64 maxlen) override;
- virtual qint64 write(const char *data, qint64 len) override;
+ bool seek(qint64) override;
+ qint64 read(char *data, qint64 maxlen) override;
+ qint64 write(const char *data, qint64 len) override;
- virtual bool remove() override;
- virtual bool copy(const QString &newName) override;
- virtual bool rename(const QString &newName) override;
- virtual bool link(const QString &newName) override;
+ bool remove() override;
+ bool copy(const QString &newName) override;
+ bool rename(const QString &newName) override;
+ bool link(const QString &newName) override;
- virtual bool isSequential() const override;
+ bool isSequential() const override;
- virtual bool isRelativePath() const override;
+ bool isRelativePath() const override;
- virtual bool mkdir(const QString &dirName, bool createParentDirectories) const override;
- virtual bool rmdir(const QString &dirName, bool recurseParentDirectories) const override;
+ bool mkdir(const QString &dirName, bool createParentDirectories) const override;
+ bool rmdir(const QString &dirName, bool recurseParentDirectories) const override;
- virtual bool setSize(qint64 size) override;
+ bool setSize(qint64 size) override;
- virtual QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const override;
+ QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const override;
- virtual bool caseSensitive() const override;
+ bool caseSensitive() const override;
- virtual FileFlags fileFlags(FileFlags type) const override;
+ FileFlags fileFlags(FileFlags type) const override;
- virtual bool setPermissions(uint perms) override;
+ bool setPermissions(uint perms) override;
- virtual QString fileName(QAbstractFileEngine::FileName file) const override;
+ QString fileName(QAbstractFileEngine::FileName file) const override;
- virtual uint ownerId(FileOwner) const override;
- virtual QString owner(FileOwner) const override;
+ uint ownerId(FileOwner) const override;
+ QString owner(FileOwner) const override;
- virtual QDateTime fileTime(FileTime time) const override;
+ QDateTime fileTime(FileTime time) const override;
- virtual Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) override;
- virtual Iterator *endEntryList() override;
+ Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames) override;
+ Iterator *endEntryList() override;
bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0) override;
bool supportsExtension(Extension extension) const override;
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 0d2bd72d75..47b3548817 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -62,8 +62,8 @@
#include "qrect.h"
#endif // !QT_NO_GEOM_VARIANT
-#ifndef QT_NO_QOBJECT
-#include "qcoreapplication.h"
+#ifndef QT_BUILD_QMAKE
+# include "qcoreapplication.h"
#endif
#ifndef QT_BOOTSTRAPPED
@@ -2661,9 +2661,10 @@ QSettings::QSettings(const QString &fileName, Format format, QObject *parent)
called, the QSettings object will not be able to read or write
any settings, and status() will return AccessError.
- On \macos and iOS, if both a name and an Internet domain are specified
- for the organization, the domain is preferred over the name. On
- other platforms, the name is preferred over the domain.
+ You should supply both the domain (used by default on \macos and iOS) and
+ the name (used by default elsewhere), although the code will cope if you
+ supply only one, which will then be used (on all platforms), at odds with
+ the usual naming of the file on platforms for which it isn't the default.
\sa QCoreApplication::setOrganizationName(),
QCoreApplication::setOrganizationDomain(),
@@ -2671,8 +2672,21 @@ QSettings::QSettings(const QString &fileName, Format format, QObject *parent)
setDefaultFormat()
*/
QSettings::QSettings(QObject *parent)
- : QObject(*QSettingsPrivate::create(globalDefaultFormat, UserScope,
-#ifdef Q_OS_MAC
+ : QSettings(UserScope, parent)
+{
+}
+
+/*!
+ \since 5.13
+
+ Constructs a QSettings object in the same way as
+ QSettings(QObject *parent) but with the given \a scope.
+
+ \sa QSettings(QObject *parent)
+*/
+QSettings::QSettings(Scope scope, QObject *parent)
+ : QObject(*QSettingsPrivate::create(globalDefaultFormat, scope,
+#ifdef Q_OS_DARWIN
QCoreApplication::organizationDomain().isEmpty()
? QCoreApplication::organizationName()
: QCoreApplication::organizationDomain()
@@ -2711,6 +2725,25 @@ QSettings::QSettings(const QString &fileName, Format format)
{
d_ptr->q_ptr = this;
}
+
+# ifndef QT_BUILD_QMAKE
+QSettings::QSettings(Scope scope)
+ : d_ptr(QSettingsPrivate::create(globalDefaultFormat, scope,
+# ifdef Q_OS_DARWIN
+ QCoreApplication::organizationDomain().isEmpty()
+ ? QCoreApplication::organizationName()
+ : QCoreApplication::organizationDomain()
+# else
+ QCoreApplication::organizationName().isEmpty()
+ ? QCoreApplication::organizationDomain()
+ : QCoreApplication::organizationName()
+# endif
+ , QCoreApplication::applicationName())
+ )
+{
+ d_ptr->q_ptr = this;
+}
+# endif
#endif
/*!
@@ -3411,6 +3444,7 @@ QSettings::Format QSettings::defaultFormat()
return globalDefaultFormat;
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
@@ -3444,7 +3478,7 @@ void QSettings::setUserIniPath(const QString &dir)
setPath(NativeFormat, UserScope, dir);
#endif
}
-
+#endif
/*!
\since 4.1
diff --git a/src/corelib/io/qsettings.h b/src/corelib/io/qsettings.h
index 7a9eebe11b..07c746d043 100644
--- a/src/corelib/io/qsettings.h
+++ b/src/corelib/io/qsettings.h
@@ -129,6 +129,7 @@ public:
const QString &application = QString(), QObject *parent = nullptr);
QSettings(const QString &fileName, Format format, QObject *parent = nullptr);
explicit QSettings(QObject *parent = nullptr);
+ explicit QSettings(Scope scope, QObject *parent = nullptr);
#else
explicit QSettings(const QString &organization,
const QString &application = QString());
@@ -137,6 +138,9 @@ public:
QSettings(Format format, Scope scope, const QString &organization,
const QString &application = QString());
QSettings(const QString &fileName, Format format);
+# ifndef QT_BUILD_QMAKE
+ explicit QSettings(Scope scope = UserScope);
+# endif
#endif
~QSettings();
@@ -183,8 +187,12 @@ public:
static void setDefaultFormat(Format format);
static Format defaultFormat();
- static void setSystemIniPath(const QString &dir); // ### Qt 6: remove (use setPath() instead)
- static void setUserIniPath(const QString &dir); // ### Qt 6: remove (use setPath() instead)
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use QSettings::setPath() instead")
+ static void setSystemIniPath(const QString &dir);
+ QT_DEPRECATED_X("Use QSettings::setPath() instead")
+ static void setUserIniPath(const QString &dir);
+#endif
static void setPath(Format format, Scope scope, const QString &path);
typedef QMap<QString, QVariant> SettingsMap;
diff --git a/src/corelib/io/qstandardpaths_android.cpp b/src/corelib/io/qstandardpaths_android.cpp
index 0667d170c7..83108e4387 100644
--- a/src/corelib/io/qstandardpaths_android.cpp
+++ b/src/corelib/io/qstandardpaths_android.cpp
@@ -239,10 +239,7 @@ QString QStandardPaths::writableLocation(StandardLocation type)
case QStandardPaths::PicturesLocation:
return getExternalStoragePublicDirectory("DIRECTORY_PICTURES");
case QStandardPaths::DocumentsLocation:
- if (QtAndroidPrivate::androidSdkVersion() > 18)
- return getExternalStoragePublicDirectory("DIRECTORY_DOCUMENTS");
- else
- return getExternalStorageDirectory() + QLatin1String("/Documents");
+ return getExternalStoragePublicDirectory("DIRECTORY_DOCUMENTS");
case QStandardPaths::DownloadLocation:
return getExternalStoragePublicDirectory("DIRECTORY_DOWNLOADS");
case QStandardPaths::GenericConfigLocation:
@@ -295,13 +292,8 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
}
if (type == DocumentsLocation) {
- if (QtAndroidPrivate::androidSdkVersion() > 18) {
- return QStringList() << writableLocation(type)
- << getExternalFilesDir("DIRECTORY_DOCUMENTS");
- } else {
- return QStringList() << writableLocation(type)
- << getExternalFilesDir() + QLatin1String("/Documents");
- }
+ return QStringList() << writableLocation(type)
+ << getExternalFilesDir("DIRECTORY_DOCUMENTS");
}
if (type == DownloadLocation) {
diff --git a/src/corelib/io/qurlquery.cpp b/src/corelib/io/qurlquery.cpp
index 97e7b8a4eb..10c3f836c8 100644
--- a/src/corelib/io/qurlquery.cpp
+++ b/src/corelib/io/qurlquery.cpp
@@ -145,6 +145,14 @@ QT_BEGIN_NAMESPACE
\since 5.2
*/
+/*!
+ \fn QUrlQuery(std::initializer_list<QPair<QString, QString>> list)
+
+ \since 5.13
+
+ Constructs a QUrlQuery object from the \a list of key/value pair.
+*/
+
typedef QList<QPair<QString, QString> > Map;
class QUrlQueryPrivate : public QSharedData
diff --git a/src/corelib/io/qurlquery.h b/src/corelib/io/qurlquery.h
index 092d002543..e3688aae2c 100644
--- a/src/corelib/io/qurlquery.h
+++ b/src/corelib/io/qurlquery.h
@@ -48,6 +48,8 @@
#include <QtCore/qstringlist.h>
#endif
+#include <initializer_list>
+
QT_BEGIN_NAMESPACE
Q_CORE_EXPORT uint qHash(const QUrlQuery &key, uint seed = 0) Q_DECL_NOTHROW;
@@ -59,6 +61,13 @@ public:
QUrlQuery();
explicit QUrlQuery(const QUrl &url);
explicit QUrlQuery(const QString &queryString);
+ QUrlQuery(std::initializer_list<QPair<QString, QString>> list)
+ : QUrlQuery()
+ {
+ for (const QPair<QString, QString> &item : list)
+ addQueryItem(item.first, item.second);
+ }
+
QUrlQuery(const QUrlQuery &other);
QUrlQuery &operator=(const QUrlQuery &other);
#ifdef Q_COMPILER_RVALUE_REFS
diff --git a/src/corelib/io/qwindowspipereader_p.h b/src/corelib/io/qwindowspipereader_p.h
index e52aa4c33d..c757753c9c 100644
--- a/src/corelib/io/qwindowspipereader_p.h
+++ b/src/corelib/io/qwindowspipereader_p.h
@@ -97,7 +97,7 @@ private:
class Overlapped : public OVERLAPPED
{
- Q_DISABLE_COPY(Overlapped)
+ Q_DISABLE_COPY_MOVE(Overlapped)
public:
explicit Overlapped(QWindowsPipeReader *reader);
void clear();
diff --git a/src/corelib/io/qwindowspipewriter_p.h b/src/corelib/io/qwindowspipewriter_p.h
index d6671c3f27..6c269e86b7 100644
--- a/src/corelib/io/qwindowspipewriter_p.h
+++ b/src/corelib/io/qwindowspipewriter_p.h
@@ -134,7 +134,7 @@ private:
class Overlapped : public OVERLAPPED
{
- Q_DISABLE_COPY(Overlapped)
+ Q_DISABLE_COPY_MOVE(Overlapped)
public:
explicit Overlapped(QWindowsPipeWriter *pipeWriter);
void clear();
diff --git a/src/corelib/itemmodels/itemmodels.pri b/src/corelib/itemmodels/itemmodels.pri
index 068a8c4b3a..ebeac6e211 100644
--- a/src/corelib/itemmodels/itemmodels.pri
+++ b/src/corelib/itemmodels/itemmodels.pri
@@ -20,6 +20,14 @@ qtConfig(proxymodel) {
SOURCES += \
itemmodels/qabstractproxymodel.cpp
+ qtConfig(concatenatetablesproxymodel) {
+ HEADERS += \
+ itemmodels/qconcatenatetablesproxymodel.h
+
+ SOURCES += \
+ itemmodels/qconcatenatetablesproxymodel.cpp
+ }
+
qtConfig(identityproxymodel) {
HEADERS += \
itemmodels/qidentityproxymodel.h
@@ -35,6 +43,15 @@ qtConfig(proxymodel) {
SOURCES += \
itemmodels/qsortfilterproxymodel.cpp
}
+
+ qtConfig(transposeproxymodel) {
+ HEADERS += \
+ itemmodels/qtransposeproxymodel.h \
+ itemmodels/qtransposeproxymodel_p.h
+
+ SOURCES += \
+ itemmodels/qtransposeproxymodel.cpp
+ }
}
qtConfig(stringlistmodel) {
diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp
index e816add91d..75e13ff994 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.cpp
+++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
@@ -77,7 +77,7 @@ void QPersistentModelIndexData::destroy(QPersistentModelIndexData *data)
{
Q_ASSERT(data);
Q_ASSERT(data->ref.load() == 0);
- QAbstractItemModel *model = const_cast<QAbstractItemModel *>(data->model);
+ QAbstractItemModel *model = const_cast<QAbstractItemModel *>(data->index.model());
// a valid persistent model index with a null model pointer can only happen if the model was destroyed
if (model) {
QAbstractItemModelPrivate *p = model->d_func();
@@ -512,10 +512,8 @@ QAbstractItemModel *QAbstractItemModelPrivate::staticEmptyModel()
void QAbstractItemModelPrivate::invalidatePersistentIndexes()
{
- for (QPersistentModelIndexData *data : qAsConst(persistent.indexes)) {
+ for (QPersistentModelIndexData *data : qAsConst(persistent.indexes))
data->index = QModelIndex();
- data->model = 0;
- }
persistent.indexes.clear();
}
@@ -530,7 +528,6 @@ void QAbstractItemModelPrivate::invalidatePersistentIndex(const QModelIndex &ind
QPersistentModelIndexData *data = *it;
persistent.indexes.erase(it);
data->index = QModelIndex();
- data->model = 0;
}
}
@@ -863,7 +860,6 @@ void QAbstractItemModelPrivate::rowsRemoved(const QModelIndex &parent,
QPersistentModelIndexData *data = *it;
persistent.indexes.erase(persistent.indexes.constFind(data->index));
data->index = QModelIndex();
- data->model = 0;
}
}
@@ -958,7 +954,6 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent,
QPersistentModelIndexData *data = *it;
persistent.indexes.erase(persistent.indexes.constFind(data->index));
data->index = QModelIndex();
- data->model = 0;
}
}
@@ -3294,8 +3289,6 @@ void QAbstractItemModel::changePersistentIndex(const QModelIndex &from, const QM
data->index = to;
if (to.isValid())
d->persistent.insertMultiAtEnd(to, data);
- else
- data->model = 0;
}
}
@@ -3328,8 +3321,6 @@ void QAbstractItemModel::changePersistentIndexList(const QModelIndexList &from,
data->index = to.at(i);
if (data->index.isValid())
toBeReinserted << data;
- else
- data->model = 0;
}
}
@@ -3959,7 +3950,7 @@ bool QAbstractListModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
/*!
\internal
- QHash::insertMulti insert the value before the old value. and find() return the new value.
+ QMultiHash::insert inserts the value before the old value. and find() return the new value.
We need insertMultiAtEnd because we don't want to overwrite the old one, which should be removed later
There should be only one instance QPersistentModelIndexData per index, but in some intermediate state there may be
@@ -3969,9 +3960,9 @@ bool QAbstractListModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
*/
void QAbstractItemModelPrivate::Persistent::insertMultiAtEnd(const QModelIndex& key, QPersistentModelIndexData *data)
{
- QHash<QModelIndex,QPersistentModelIndexData *>::iterator newIt =
- indexes.insertMulti(key, data);
- QHash<QModelIndex,QPersistentModelIndexData *>::iterator it = newIt + 1;
+ QHash<QModelIndex,QPersistentModelIndexData *>::iterator newIt = indexes.insert(key, data);
+ QHash<QModelIndex,QPersistentModelIndexData *>::iterator it = newIt;
+ ++it;
while (it != indexes.end() && it.key() == key) {
qSwap(*newIt,*it);
newIt = it;
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h
index bec71b0606..c34876d1d6 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.h
+++ b/src/corelib/itemmodels/qabstractitemmodel.h
@@ -163,6 +163,7 @@ typedef QList<QModelIndex> QModelIndexList;
class QMimeData;
class QAbstractItemModelPrivate;
+class QTransposeProxyModelPrivate;
template <class Key, class T> class QMap;
@@ -173,6 +174,7 @@ class Q_CORE_EXPORT QAbstractItemModel : public QObject
friend class QPersistentModelIndexData;
friend class QAbstractItemViewPrivate;
friend class QIdentityProxyModel;
+ friend class QTransposeProxyModelPrivate;
public:
explicit QAbstractItemModel(QObject *parent = nullptr);
@@ -300,7 +302,9 @@ public Q_SLOTS:
virtual void revert();
protected Q_SLOTS:
- // Qt 6: Make virtual
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ virtual
+#endif
void resetInternalData();
protected:
diff --git a/src/corelib/itemmodels/qabstractitemmodel_p.h b/src/corelib/itemmodels/qabstractitemmodel_p.h
index 12fd93d217..e6085eca94 100644
--- a/src/corelib/itemmodels/qabstractitemmodel_p.h
+++ b/src/corelib/itemmodels/qabstractitemmodel_p.h
@@ -65,11 +65,10 @@ QT_REQUIRE_CONFIG(itemmodel);
class QPersistentModelIndexData
{
public:
- QPersistentModelIndexData() : model(0) {}
- QPersistentModelIndexData(const QModelIndex &idx) : index(idx), model(idx.model()) {}
+ QPersistentModelIndexData() {}
+ QPersistentModelIndexData(const QModelIndex &idx) : index(idx) {}
QModelIndex index;
QAtomicInt ref;
- const QAbstractItemModel *model;
static QPersistentModelIndexData *create(const QModelIndex &index);
static void destroy(QPersistentModelIndexData *data);
};
@@ -142,7 +141,7 @@ public:
struct Persistent {
Persistent() {}
- QHash<QModelIndex, QPersistentModelIndexData *> indexes;
+ QMultiHash<QModelIndex, QPersistentModelIndexData *> indexes;
QStack<QVector<QPersistentModelIndexData *> > moved;
QStack<QVector<QPersistentModelIndexData *> > invalidated;
void insertMultiAtEnd(const QModelIndex& key, QPersistentModelIndexData *data);
diff --git a/src/corelib/itemmodels/qabstractproxymodel.cpp b/src/corelib/itemmodels/qabstractproxymodel.cpp
index 62b3ee85b9..c863406afd 100644
--- a/src/corelib/itemmodels/qabstractproxymodel.cpp
+++ b/src/corelib/itemmodels/qabstractproxymodel.cpp
@@ -313,6 +313,18 @@ bool QAbstractProxyModel::setHeaderData(int section, Qt::Orientation orientation
return d->model->setHeaderData(sourceSection, orientation, value, role);
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+/*!
+ \reimp
+ \since 6.0
+ */
+bool QAbstractProxyModel::clearItemData(const QModelIndex &index)
+{
+ Q_D(QAbstractProxyModel);
+ return d->model->clearItemData(mapToSource(index));
+}
+#endif
+
/*!
\reimp
*/
diff --git a/src/corelib/itemmodels/qabstractproxymodel.h b/src/corelib/itemmodels/qabstractproxymodel.h
index 08ecf9d15f..c9a73b6a31 100644
--- a/src/corelib/itemmodels/qabstractproxymodel.h
+++ b/src/corelib/itemmodels/qabstractproxymodel.h
@@ -78,6 +78,9 @@ public:
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
bool setItemData(const QModelIndex& index, const QMap<int, QVariant> &roles) override;
bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole) override;
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ bool clearItemData(const QModelIndex &index) override;
+#endif
QModelIndex buddy(const QModelIndex &index) const override;
bool canFetchMore(const QModelIndex &parent) const override;
diff --git a/src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp b/src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp
new file mode 100644
index 0000000000..bbfe2dce16
--- /dev/null
+++ b/src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp
@@ -0,0 +1,750 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qconcatenatetablesproxymodel.h"
+#include <private/qabstractitemmodel_p.h>
+#include "qsize.h"
+#include "qdebug.h"
+
+QT_BEGIN_NAMESPACE
+
+class QConcatenateTablesProxyModelPrivate : public QAbstractItemModelPrivate
+{
+ Q_DECLARE_PUBLIC(QConcatenateTablesProxyModel);
+
+public:
+ QConcatenateTablesProxyModelPrivate();
+
+ int computeRowsPrior(const QAbstractItemModel *sourceModel) const;
+
+ struct SourceModelForRowResult
+ {
+ SourceModelForRowResult() : sourceModel(Q_NULLPTR), sourceRow(-1) {}
+ QAbstractItemModel *sourceModel;
+ int sourceRow;
+ };
+ SourceModelForRowResult sourceModelForRow(int row) const;
+
+ void _q_slotRowsAboutToBeInserted(const QModelIndex &, int start, int end);
+ void _q_slotRowsInserted(const QModelIndex &, int start, int end);
+ void _q_slotRowsAboutToBeRemoved(const QModelIndex &, int start, int end);
+ void _q_slotRowsRemoved(const QModelIndex &, int start, int end);
+ void _q_slotColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end);
+ void _q_slotColumnsInserted(const QModelIndex &parent, int, int);
+ void _q_slotColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
+ void _q_slotColumnsRemoved(const QModelIndex &parent, int, int);
+ void _q_slotDataChanged(const QModelIndex &from, const QModelIndex &to, const QVector<int> &roles);
+ void _q_slotSourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint);
+ void _q_slotSourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint);
+ void _q_slotModelAboutToBeReset();
+ void _q_slotModelReset();
+ int columnCountAfterChange(const QAbstractItemModel *model, int newCount) const;
+ int calculatedColumnCount() const;
+ void updateColumnCount();
+ bool mapDropCoordinatesToSource(int row, int column, const QModelIndex &parent,
+ int *sourceRow, int *sourceColumn, QModelIndex *sourceParent, QAbstractItemModel **sourceModel) const;
+
+ QVector<QAbstractItemModel *> m_models;
+ int m_rowCount; // have to maintain it here since we can't compute during model destruction
+ int m_columnCount;
+
+ // for columns{AboutToBe,}{Inserted,Removed}
+ int m_newColumnCount;
+
+ // for layoutAboutToBeChanged/layoutChanged
+ QVector<QPersistentModelIndex> layoutChangePersistentIndexes;
+ QVector<QModelIndex> layoutChangeProxyIndexes;
+};
+
+QConcatenateTablesProxyModelPrivate::QConcatenateTablesProxyModelPrivate()
+ : m_rowCount(0),
+ m_columnCount(0),
+ m_newColumnCount(0)
+{
+}
+
+/*!
+ \since 5.13
+ \class QConcatenateTablesProxyModel
+ \inmodule QtCore
+ \brief The QConcatenateTablesProxyModel class proxies multiple source models, concatenating their rows
+
+ \ingroup model-view
+
+ QConcatenateTablesProxyModel takes multiple source models and concatenates their rows.
+
+ In other words, the proxy will have all rows of the first source model,
+ followed by all rows of the second source model, and so on.
+
+ If the source models don't have the same number of columns, the proxy will only
+ have as many columns as the source model with the smallest number of columns.
+ Additional columns in other source models will simply be ignored.
+
+ Source models can be added and removed at runtime, and the column count is adjusted accordingly.
+
+ This proxy does not inherit from QAbstractProxyModel because it uses multiple source
+ models, rather than a single one.
+
+ Only flat models (lists and tables) are supported, tree models are not.
+
+ \sa QAbstractProxyModel, {Model/View Programming}, QIdentityProxyModel, QAbstractItemModel
+ */
+
+
+/*!
+ Constructs a concatenate-rows proxy model with the given \a parent.
+*/
+QConcatenateTablesProxyModel::QConcatenateTablesProxyModel(QObject *parent)
+ : QAbstractItemModel(*new QConcatenateTablesProxyModelPrivate, parent)
+{
+}
+
+/*!
+ Destroys this proxy model.
+*/
+QConcatenateTablesProxyModel::~QConcatenateTablesProxyModel()
+{
+}
+
+/*!
+ Returns the proxy index for a given \a sourceIndex, which can be from any of the source models.
+*/
+QModelIndex QConcatenateTablesProxyModel::mapFromSource(const QModelIndex &sourceIndex) const
+{
+ Q_D(const QConcatenateTablesProxyModel);
+ if (!sourceIndex.isValid())
+ return QModelIndex();
+ const QAbstractItemModel *sourceModel = sourceIndex.model();
+ if (!d->m_models.contains(const_cast<QAbstractItemModel *>(sourceModel))) {
+ qWarning("QConcatenateTablesProxyModel: index from wrong model passed to mapFromSource");
+ Q_ASSERT(!"QConcatenateTablesProxyModel: index from wrong model passed to mapFromSource");
+ return QModelIndex();
+ }
+ if (sourceIndex.column() >= d->m_columnCount)
+ return QModelIndex();
+ int rowsPrior = d_func()->computeRowsPrior(sourceModel);
+ return createIndex(rowsPrior + sourceIndex.row(), sourceIndex.column(), sourceIndex.internalPointer());
+}
+
+/*!
+ Returns the source index for a given proxy index.
+*/
+QModelIndex QConcatenateTablesProxyModel::mapToSource(const QModelIndex &proxyIndex) const
+{
+ Q_D(const QConcatenateTablesProxyModel);
+ Q_ASSERT(checkIndex(proxyIndex));
+ if (!proxyIndex.isValid())
+ return QModelIndex();
+ if (proxyIndex.model() != this) {
+ qWarning("QConcatenateTablesProxyModel: index from wrong model passed to mapToSource");
+ Q_ASSERT(!"QConcatenateTablesProxyModel: index from wrong model passed to mapToSource");
+ return QModelIndex();
+ }
+ const int row = proxyIndex.row();
+ const auto result = d->sourceModelForRow(row);
+ if (!result.sourceModel)
+ return QModelIndex();
+ return result.sourceModel->index(result.sourceRow, proxyIndex.column());
+}
+
+/*!
+ \reimp
+*/
+QVariant QConcatenateTablesProxyModel::data(const QModelIndex &index, int role) const
+{
+ const QModelIndex sourceIndex = mapToSource(index);
+ Q_ASSERT(checkIndex(index, CheckIndexOption::IndexIsValid));
+ if (!sourceIndex.isValid())
+ return QVariant();
+ return sourceIndex.data(role);
+}
+
+/*!
+ \reimp
+*/
+bool QConcatenateTablesProxyModel::setData(const QModelIndex &index, const QVariant &value, int role)
+{
+ Q_ASSERT(checkIndex(index, CheckIndexOption::IndexIsValid));
+ const QModelIndex sourceIndex = mapToSource(index);
+ Q_ASSERT(sourceIndex.isValid());
+ const auto sourceModel = const_cast<QAbstractItemModel *>(sourceIndex.model());
+ return sourceModel->setData(sourceIndex, value, role);
+}
+
+/*!
+ \reimp
+*/
+QMap<int, QVariant> QConcatenateTablesProxyModel::itemData(const QModelIndex &proxyIndex) const
+{
+ Q_ASSERT(checkIndex(proxyIndex));
+ const QModelIndex sourceIndex = mapToSource(proxyIndex);
+ Q_ASSERT(sourceIndex.isValid());
+ return sourceIndex.model()->itemData(sourceIndex);
+}
+
+/*!
+ \reimp
+*/
+bool QConcatenateTablesProxyModel::setItemData(const QModelIndex &proxyIndex, const QMap<int, QVariant> &roles)
+{
+ Q_ASSERT(checkIndex(proxyIndex));
+ const QModelIndex sourceIndex = mapToSource(proxyIndex);
+ Q_ASSERT(sourceIndex.isValid());
+ const auto sourceModel = const_cast<QAbstractItemModel *>(sourceIndex.model());
+ return sourceModel->setItemData(sourceIndex, roles);
+}
+
+/*!
+ Returns the flags for the given index.
+ If the index is valid, the flags come from the source model for this index.
+ If the index is invalid (as used to determine if dropping onto an empty area
+ in the view is allowed, for instance), the flags from the first model are returned.
+*/
+Qt::ItemFlags QConcatenateTablesProxyModel::flags(const QModelIndex &index) const
+{
+ Q_D(const QConcatenateTablesProxyModel);
+ if (d->m_models.isEmpty())
+ return Qt::NoItemFlags;
+ Q_ASSERT(checkIndex(index));
+ if (!index.isValid())
+ return d->m_models.at(0)->flags(index);
+ const QModelIndex sourceIndex = mapToSource(index);
+ Q_ASSERT(sourceIndex.isValid());
+ return sourceIndex.model()->flags(sourceIndex);
+}
+
+/*!
+ This method returns the horizontal header data for the first source model,
+ and the vertical header data for the source model corresponding to each row.
+ \reimp
+*/
+QVariant QConcatenateTablesProxyModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ Q_D(const QConcatenateTablesProxyModel);
+ if (d->m_models.isEmpty())
+ return QVariant();
+ switch (orientation) {
+ case Qt::Horizontal:
+ return d->m_models.at(0)->headerData(section, orientation, role);
+ case Qt::Vertical: {
+ const auto result = d->sourceModelForRow(section);
+ Q_ASSERT(result.sourceModel);
+ return result.sourceModel->headerData(result.sourceRow, orientation, role);
+ }
+ }
+ return QVariant();
+}
+
+/*!
+ This method returns the column count of the source model with the smallest number of columns.
+ \reimp
+*/
+int QConcatenateTablesProxyModel::columnCount(const QModelIndex &parent) const
+{
+ Q_D(const QConcatenateTablesProxyModel);
+ if (parent.isValid())
+ return 0; // flat model
+ return d->m_columnCount;
+}
+
+/*!
+ \reimp
+*/
+QModelIndex QConcatenateTablesProxyModel::index(int row, int column, const QModelIndex &parent) const
+{
+ Q_D(const QConcatenateTablesProxyModel);
+ Q_ASSERT(hasIndex(row, column, parent));
+ if (!hasIndex(row, column, parent))
+ return QModelIndex();
+ Q_ASSERT(checkIndex(parent, QAbstractItemModel::CheckIndexOption::ParentIsInvalid)); // flat model
+ const auto result = d->sourceModelForRow(row);
+ Q_ASSERT(result.sourceModel);
+ return mapFromSource(result.sourceModel->index(result.sourceRow, column));
+}
+
+/*!
+ \reimp
+*/
+QModelIndex QConcatenateTablesProxyModel::parent(const QModelIndex &index) const
+{
+ Q_UNUSED(index);
+ return QModelIndex(); // flat model, no hierarchy
+}
+
+/*!
+ \reimp
+*/
+int QConcatenateTablesProxyModel::rowCount(const QModelIndex &parent) const
+{
+ Q_D(const QConcatenateTablesProxyModel);
+ Q_ASSERT(checkIndex(parent, QAbstractItemModel::CheckIndexOption::ParentIsInvalid)); // flat model
+ Q_UNUSED(parent);
+ return d->m_rowCount;
+}
+
+/*!
+ This method returns the mime types for the first source model.
+ \reimp
+*/
+QStringList QConcatenateTablesProxyModel::mimeTypes() const
+{
+ Q_D(const QConcatenateTablesProxyModel);
+ if (d->m_models.isEmpty())
+ return QStringList();
+ return d->m_models.at(0)->mimeTypes();
+}
+
+/*!
+ The call is forwarded to the source model of the first index in the list of \a indexes.
+
+ Important: please note that this proxy only supports dragging a single row.
+ It will assert if called with indexes from multiple rows, because dragging rows that
+ might come from different source models cannot be implemented generically by this proxy model.
+ Each piece of data in the QMimeData needs to be merged, which is data-type-specific.
+ Reimplement this method in a subclass if you want to support dragging multiple rows.
+
+ \reimp
+*/
+QMimeData *QConcatenateTablesProxyModel::mimeData(const QModelIndexList &indexes) const
+{
+ Q_D(const QConcatenateTablesProxyModel);
+ if (indexes.isEmpty())
+ return nullptr;
+ const QModelIndex firstIndex = indexes.first();
+ Q_ASSERT(checkIndex(firstIndex, CheckIndexOption::IndexIsValid));
+ const auto result = d->sourceModelForRow(firstIndex.row());
+ QModelIndexList sourceIndexes;
+ sourceIndexes.reserve(indexes.count());
+ for (const QModelIndex &index : indexes) {
+ const QModelIndex sourceIndex = mapToSource(index);
+ Q_ASSERT(sourceIndex.model() == result.sourceModel); // see documentation above
+ sourceIndexes.append(sourceIndex);
+ }
+ return result.sourceModel->mimeData(sourceIndexes);
+}
+
+
+bool QConcatenateTablesProxyModelPrivate::mapDropCoordinatesToSource(int row, int column, const QModelIndex &parent,
+ int *sourceRow, int *sourceColumn, QModelIndex *sourceParent, QAbstractItemModel **sourceModel) const
+{
+ Q_Q(const QConcatenateTablesProxyModel);
+ *sourceColumn = column;
+ if (!parent.isValid()) {
+ // Drop after the last item
+ if (row == -1 || row == m_rowCount) {
+ *sourceRow = -1;
+ *sourceModel = m_models.constLast();
+ return true;
+ }
+ // Drop between toplevel items
+ const auto result = sourceModelForRow(row);
+ Q_ASSERT(result.sourceModel);
+ *sourceRow = result.sourceRow;
+ *sourceModel = result.sourceModel;
+ return true;
+ } else {
+ if (row > -1)
+ return false; // flat model, no dropping as new children of items
+ // Drop onto item
+ const int targetRow = parent.row();
+ const auto result = sourceModelForRow(targetRow);
+ Q_ASSERT(result.sourceModel);
+ const QModelIndex sourceIndex = q->mapToSource(parent);
+ *sourceRow = -1;
+ *sourceParent = sourceIndex;
+ *sourceModel = result.sourceModel;
+ return true;
+ }
+}
+
+/*!
+ \reimp
+*/
+bool QConcatenateTablesProxyModel::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const
+{
+ Q_D(const QConcatenateTablesProxyModel);
+ if (d->m_models.isEmpty())
+ return false;
+
+ int sourceRow, sourceColumn;
+ QModelIndex sourceParent;
+ QAbstractItemModel *sourceModel;
+ if (!d->mapDropCoordinatesToSource(row, column, parent, &sourceRow, &sourceColumn, &sourceParent, &sourceModel))
+ return false;
+ return sourceModel->canDropMimeData(data, action, sourceRow, sourceColumn, sourceParent);
+}
+
+/*!
+ QConcatenateTablesProxyModel handles dropping onto an item, between items, and after the last item.
+ In all cases the call is forwarded to the underlying source model.
+ When dropping onto an item, the source model for this item is called.
+ When dropping between items, the source model immediately below the drop position is called.
+ When dropping after the last item, the last source model is called.
+
+ \reimp
+*/
+bool QConcatenateTablesProxyModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
+{
+ Q_D(const QConcatenateTablesProxyModel);
+ if (d->m_models.isEmpty())
+ return false;
+ int sourceRow, sourceColumn;
+ QModelIndex sourceParent;
+ QAbstractItemModel *sourceModel;
+ if (!d->mapDropCoordinatesToSource(row, column, parent, &sourceRow, &sourceColumn, &sourceParent, &sourceModel))
+ return false;
+
+ return sourceModel->dropMimeData(data, action, sourceRow, sourceColumn, sourceParent);
+}
+
+/*!
+ \reimp
+*/
+QSize QConcatenateTablesProxyModel::span(const QModelIndex &index) const
+{
+ Q_D(const QConcatenateTablesProxyModel);
+ Q_ASSERT(checkIndex(index));
+ if (d->m_models.isEmpty() || !index.isValid())
+ return QSize();
+ const QModelIndex sourceIndex = mapToSource(index);
+ Q_ASSERT(sourceIndex.isValid());
+ return sourceIndex.model()->span(sourceIndex);
+}
+
+/*!
+ Adds a source model \a sourceModel, below all previously added source models.
+
+ The ownership of \a sourceModel is not affected by this.
+
+ The same source model cannot be added more than once.
+ */
+void QConcatenateTablesProxyModel::addSourceModel(QAbstractItemModel *sourceModel)
+{
+ Q_D(QConcatenateTablesProxyModel);
+ Q_ASSERT(sourceModel);
+ Q_ASSERT(!d->m_models.contains(sourceModel));
+ connect(sourceModel, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>)), this, SLOT(_q_slotDataChanged(QModelIndex,QModelIndex,QVector<int>)));
+ connect(sourceModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(_q_slotRowsInserted(QModelIndex,int,int)));
+ connect(sourceModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(_q_slotRowsRemoved(QModelIndex,int,int)));
+ connect(sourceModel, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), this, SLOT(_q_slotRowsAboutToBeInserted(QModelIndex,int,int)));
+ connect(sourceModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), this, SLOT(_q_slotRowsAboutToBeRemoved(QModelIndex,int,int)));
+
+ connect(sourceModel, SIGNAL(columnsInserted(QModelIndex,int,int)), this, SLOT(_q_slotColumnsInserted(QModelIndex,int,int)));
+ connect(sourceModel, SIGNAL(columnsRemoved(QModelIndex,int,int)), this, SLOT(_q_slotColumnsRemoved(QModelIndex,int,int)));
+ connect(sourceModel, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)), this, SLOT(_q_slotColumnsAboutToBeInserted(QModelIndex,int,int)));
+ connect(sourceModel, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)), this, SLOT(_q_slotColumnsAboutToBeRemoved(QModelIndex,int,int)));
+
+ connect(sourceModel, SIGNAL(layoutAboutToBeChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)),
+ this, SLOT(_q_slotSourceLayoutAboutToBeChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)));
+ connect(sourceModel, SIGNAL(layoutChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)),
+ this, SLOT(_q_slotSourceLayoutChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint)));
+ connect(sourceModel, SIGNAL(modelAboutToBeReset()), this, SLOT(_q_slotModelAboutToBeReset()));
+ connect(sourceModel, SIGNAL(modelReset()), this, SLOT(_q_slotModelReset()));
+
+ const int newRows = sourceModel->rowCount();
+ if (newRows > 0)
+ beginInsertRows(QModelIndex(), d->m_rowCount, d->m_rowCount + newRows - 1);
+ d->m_rowCount += newRows;
+ d->m_models.append(sourceModel);
+ if (newRows > 0)
+ endInsertRows();
+
+ d->updateColumnCount();
+}
+
+/*!
+ Removes the source model \a sourceModel, which was previously added to this proxy.
+
+ The ownership of \a sourceModel is not affected by this.
+*/
+void QConcatenateTablesProxyModel::removeSourceModel(QAbstractItemModel *sourceModel)
+{
+ Q_D(QConcatenateTablesProxyModel);
+ Q_ASSERT(d->m_models.contains(sourceModel));
+ disconnect(sourceModel, 0, this, 0);
+
+ const int rowsRemoved = sourceModel->rowCount();
+ const int rowsPrior = d->computeRowsPrior(sourceModel); // location of removed section
+
+ if (rowsRemoved > 0)
+ beginRemoveRows(QModelIndex(), rowsPrior, rowsPrior + rowsRemoved - 1);
+ d->m_models.removeOne(sourceModel);
+ d->m_rowCount -= rowsRemoved;
+ if (rowsRemoved > 0)
+ endRemoveRows();
+
+ d->updateColumnCount();
+}
+
+void QConcatenateTablesProxyModelPrivate::_q_slotRowsAboutToBeInserted(const QModelIndex &parent, int start, int end)
+{
+ Q_Q(QConcatenateTablesProxyModel);
+ if (parent.isValid()) // not supported, the proxy is a flat model
+ return;
+ const QAbstractItemModel * const model = static_cast<QAbstractItemModel *>(q->sender());
+ const int rowsPrior = computeRowsPrior(model);
+ q->beginInsertRows(QModelIndex(), rowsPrior + start, rowsPrior + end);
+}
+
+void QConcatenateTablesProxyModelPrivate::_q_slotRowsInserted(const QModelIndex &parent, int start, int end)
+{
+ Q_Q(QConcatenateTablesProxyModel);
+ if (parent.isValid()) // flat model
+ return;
+ m_rowCount += end - start + 1;
+ q->endInsertRows();
+}
+
+void QConcatenateTablesProxyModelPrivate::_q_slotRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
+{
+ Q_Q(QConcatenateTablesProxyModel);
+ if (parent.isValid()) // flat model
+ return;
+ const QAbstractItemModel * const model = static_cast<QAbstractItemModel *>(q->sender());
+ const int rowsPrior = computeRowsPrior(model);
+ q->beginRemoveRows(QModelIndex(), rowsPrior + start, rowsPrior + end);
+}
+
+void QConcatenateTablesProxyModelPrivate::_q_slotRowsRemoved(const QModelIndex &parent, int start, int end)
+{
+ Q_Q(QConcatenateTablesProxyModel);
+ if (parent.isValid()) // flat model
+ return;
+ m_rowCount -= end - start + 1;
+ q->endRemoveRows();
+}
+
+void QConcatenateTablesProxyModelPrivate::_q_slotColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end)
+{
+ Q_Q(QConcatenateTablesProxyModel);
+ if (parent.isValid()) // flat model
+ return;
+ const QAbstractItemModel * const model = static_cast<QAbstractItemModel *>(q->sender());
+ const int oldColCount = model->columnCount();
+ const int newColCount = columnCountAfterChange(model, oldColCount + end - start + 1);
+ Q_ASSERT(newColCount >= oldColCount);
+ if (newColCount > oldColCount)
+ // If the underlying models have a different number of columns (example: 2 and 3), inserting 2 columns in
+ // the first model leads to inserting only one column in the proxy, since qMin(2+2,3) == 3.
+ q->beginInsertColumns(QModelIndex(), start, qMin(end, start + newColCount - oldColCount - 1));
+ m_newColumnCount = newColCount;
+}
+
+void QConcatenateTablesProxyModelPrivate::_q_slotColumnsInserted(const QModelIndex &parent, int start, int end)
+{
+ Q_UNUSED(start);
+ Q_UNUSED(end);
+ Q_Q(QConcatenateTablesProxyModel);
+ if (parent.isValid()) // flat model
+ return;
+ if (m_newColumnCount != m_columnCount) {
+ m_columnCount = m_newColumnCount;
+ q->endInsertColumns();
+ }
+}
+
+void QConcatenateTablesProxyModelPrivate::_q_slotColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
+{
+ Q_Q(QConcatenateTablesProxyModel);
+ if (parent.isValid()) // flat model
+ return;
+ const QAbstractItemModel * const model = static_cast<QAbstractItemModel *>(q->sender());
+ const int oldColCount = model->columnCount();
+ const int newColCount = columnCountAfterChange(model, oldColCount - (end - start + 1));
+ Q_ASSERT(newColCount <= oldColCount);
+ if (newColCount < oldColCount)
+ q->beginRemoveColumns(QModelIndex(), start, qMax(end, start + oldColCount - newColCount - 1));
+ m_newColumnCount = newColCount;
+}
+
+void QConcatenateTablesProxyModelPrivate::_q_slotColumnsRemoved(const QModelIndex &parent, int start, int end)
+{
+ Q_Q(QConcatenateTablesProxyModel);
+ Q_UNUSED(start);
+ Q_UNUSED(end);
+ if (parent.isValid()) // flat model
+ return;
+ if (m_newColumnCount != m_columnCount) {
+ m_columnCount = m_newColumnCount;
+ q->endRemoveColumns();
+ }
+}
+
+void QConcatenateTablesProxyModelPrivate::_q_slotDataChanged(const QModelIndex &from, const QModelIndex &to, const QVector<int> &roles)
+{
+ Q_Q(QConcatenateTablesProxyModel);
+ Q_ASSERT(from.isValid());
+ Q_ASSERT(to.isValid());
+ const QModelIndex myFrom = q->mapFromSource(from);
+ Q_ASSERT(q->checkIndex(myFrom, QAbstractItemModel::CheckIndexOption::IndexIsValid));
+ const QModelIndex myTo = q->mapFromSource(to);
+ Q_ASSERT(q->checkIndex(myTo, QAbstractItemModel::CheckIndexOption::IndexIsValid));
+ emit q->dataChanged(myFrom, myTo, roles);
+}
+
+void QConcatenateTablesProxyModelPrivate::_q_slotSourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint)
+{
+ Q_Q(QConcatenateTablesProxyModel);
+
+ if (!sourceParents.isEmpty() && !sourceParents.contains(QModelIndex()))
+ return;
+
+ emit q->layoutAboutToBeChanged({}, hint);
+
+ const QModelIndexList persistentIndexList = q->persistentIndexList();
+ layoutChangePersistentIndexes.reserve(persistentIndexList.size());
+ layoutChangeProxyIndexes.reserve(persistentIndexList.size());
+
+ for (const QPersistentModelIndex &proxyPersistentIndex : persistentIndexList) {
+ layoutChangeProxyIndexes.append(proxyPersistentIndex);
+ Q_ASSERT(proxyPersistentIndex.isValid());
+ const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex);
+ Q_ASSERT(srcPersistentIndex.isValid());
+ layoutChangePersistentIndexes << srcPersistentIndex;
+ }
+}
+
+void QConcatenateTablesProxyModelPrivate::_q_slotSourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint)
+{
+ Q_Q(QConcatenateTablesProxyModel);
+ if (!sourceParents.isEmpty() && !sourceParents.contains(QModelIndex()))
+ return;
+ for (int i = 0; i < layoutChangeProxyIndexes.size(); ++i) {
+ const QModelIndex proxyIdx = layoutChangeProxyIndexes.at(i);
+ const QModelIndex newProxyIdx = q->mapFromSource(layoutChangePersistentIndexes.at(i));
+ q->changePersistentIndex(proxyIdx, newProxyIdx);
+ }
+
+ layoutChangePersistentIndexes.clear();
+ layoutChangeProxyIndexes.clear();
+
+ emit q->layoutChanged({}, hint);
+}
+
+void QConcatenateTablesProxyModelPrivate::_q_slotModelAboutToBeReset()
+{
+ Q_Q(QConcatenateTablesProxyModel);
+ Q_ASSERT(m_models.contains(const_cast<QAbstractItemModel *>(static_cast<const QAbstractItemModel *>(q->sender()))));
+ q->beginResetModel();
+ // A reset might reduce both rowCount and columnCount, and we can't notify of both at the same time,
+ // and notifying of one after the other leaves an intermediary invalid situation.
+ // So the only safe choice is to forward it as a full reset.
+}
+
+void QConcatenateTablesProxyModelPrivate::_q_slotModelReset()
+{
+ Q_Q(QConcatenateTablesProxyModel);
+ Q_ASSERT(m_models.contains(const_cast<QAbstractItemModel *>(static_cast<const QAbstractItemModel *>(q->sender()))));
+ m_columnCount = calculatedColumnCount();
+ m_rowCount = computeRowsPrior(nullptr);
+ q->endResetModel();
+}
+
+int QConcatenateTablesProxyModelPrivate::calculatedColumnCount() const
+{
+ if (m_models.isEmpty())
+ return 0;
+
+ const auto it = std::min_element(m_models.begin(), m_models.end(), [](const QAbstractItemModel* model1, const QAbstractItemModel* model2) {
+ return model1->columnCount() < model2->columnCount();
+ });
+ return (*it)->columnCount();
+}
+
+void QConcatenateTablesProxyModelPrivate::updateColumnCount()
+{
+ Q_Q(QConcatenateTablesProxyModel);
+ const int newColumnCount = calculatedColumnCount();
+ const int columnDiff = newColumnCount - m_columnCount;
+ if (columnDiff > 0) {
+ q->beginInsertColumns(QModelIndex(), m_columnCount, m_columnCount + columnDiff - 1);
+ m_columnCount = newColumnCount;
+ q->endInsertColumns();
+ } else if (columnDiff < 0) {
+ const int lastColumn = m_columnCount - 1;
+ q->beginRemoveColumns(QModelIndex(), lastColumn + columnDiff + 1, lastColumn);
+ m_columnCount = newColumnCount;
+ q->endRemoveColumns();
+ }
+}
+
+int QConcatenateTablesProxyModelPrivate::columnCountAfterChange(const QAbstractItemModel *model, int newCount) const
+{
+ int newColumnCount = 0;
+ for (int i = 0; i < m_models.count(); ++i) {
+ const QAbstractItemModel *mod = m_models.at(i);
+ const int colCount = mod == model ? newCount : mod->columnCount();
+ if (i == 0)
+ newColumnCount = colCount;
+ else
+ newColumnCount = qMin(colCount, newColumnCount);
+ }
+ return newColumnCount;
+}
+
+int QConcatenateTablesProxyModelPrivate::computeRowsPrior(const QAbstractItemModel *sourceModel) const
+{
+ int rowsPrior = 0;
+ for (const QAbstractItemModel *model : m_models) {
+ if (model == sourceModel)
+ break;
+ rowsPrior += model->rowCount();
+ }
+ return rowsPrior;
+}
+
+QConcatenateTablesProxyModelPrivate::SourceModelForRowResult QConcatenateTablesProxyModelPrivate::sourceModelForRow(int row) const
+{
+ QConcatenateTablesProxyModelPrivate::SourceModelForRowResult result;
+ int rowCount = 0;
+ for (QAbstractItemModel *model : m_models) {
+ const int subRowCount = model->rowCount();
+ if (rowCount + subRowCount > row) {
+ result.sourceModel = model;
+ break;
+ }
+ rowCount += subRowCount;
+ }
+ result.sourceRow = row - rowCount;
+ return result;
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qconcatenatetablesproxymodel.cpp"
diff --git a/src/corelib/itemmodels/qconcatenatetablesproxymodel.h b/src/corelib/itemmodels/qconcatenatetablesproxymodel.h
new file mode 100644
index 0000000000..85fc6a9c72
--- /dev/null
+++ b/src/corelib/itemmodels/qconcatenatetablesproxymodel.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QCONCATENATEROWSPROXYMODEL_H
+#define QCONCATENATEROWSPROXYMODEL_H
+
+#include <QtCore/qabstractitemmodel.h>
+
+QT_BEGIN_NAMESPACE
+
+class QConcatenateTablesProxyModelPrivate;
+
+class Q_CORE_EXPORT QConcatenateTablesProxyModel : public QAbstractItemModel
+{
+ Q_OBJECT
+
+public:
+ explicit QConcatenateTablesProxyModel(QObject *parent = nullptr);
+ ~QConcatenateTablesProxyModel();
+
+ Q_SCRIPTABLE void addSourceModel(QAbstractItemModel *sourceModel);
+ Q_SCRIPTABLE void removeSourceModel(QAbstractItemModel *sourceModel);
+
+ QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
+ QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
+
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
+ bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
+ QMap<int, QVariant> itemData(const QModelIndex &proxyIndex) const override;
+ bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles) override;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
+ QModelIndex parent(const QModelIndex &index) const override;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
+ QStringList mimeTypes() const override;
+ QMimeData *mimeData(const QModelIndexList &indexes) const override;
+ bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const override;
+ bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
+ QSize span(const QModelIndex &index) const override;
+
+private:
+ Q_DECLARE_PRIVATE(QConcatenateTablesProxyModel)
+ Q_DISABLE_COPY(QConcatenateTablesProxyModel)
+
+ Q_PRIVATE_SLOT(d_func(), void _q_slotRowsAboutToBeInserted(const QModelIndex &, int start, int end))
+ Q_PRIVATE_SLOT(d_func(), void _q_slotRowsInserted(const QModelIndex &, int start, int end))
+ Q_PRIVATE_SLOT(d_func(), void _q_slotRowsAboutToBeRemoved(const QModelIndex &, int start, int end))
+ Q_PRIVATE_SLOT(d_func(), void _q_slotRowsRemoved(const QModelIndex &, int start, int end))
+ Q_PRIVATE_SLOT(d_func(), void _q_slotColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end))
+ Q_PRIVATE_SLOT(d_func(), void _q_slotColumnsInserted(const QModelIndex &parent, int, int))
+ Q_PRIVATE_SLOT(d_func(), void _q_slotColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end))
+ Q_PRIVATE_SLOT(d_func(), void _q_slotColumnsRemoved(const QModelIndex &parent, int, int))
+ Q_PRIVATE_SLOT(d_func(), void _q_slotDataChanged(const QModelIndex &from, const QModelIndex &to, const QVector<int> &roles))
+ Q_PRIVATE_SLOT(d_func(), void _q_slotSourceLayoutAboutToBeChanged(QList<QPersistentModelIndex>, QAbstractItemModel::LayoutChangeHint))
+ Q_PRIVATE_SLOT(d_func(), void _q_slotSourceLayoutChanged(const QList<QPersistentModelIndex> &, QAbstractItemModel::LayoutChangeHint))
+ Q_PRIVATE_SLOT(d_func(), void _q_slotModelAboutToBeReset())
+ Q_PRIVATE_SLOT(d_func(), void _q_slotModelReset())
+};
+
+QT_END_NAMESPACE
+
+#endif // QCONCATENATEROWSPROXYMODEL_H
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
index 87960b0863..d13e6199db 100644
--- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
@@ -424,7 +424,7 @@ public:
void updateChildrenMapping(const QModelIndex &source_parent, Mapping *parent_mapping,
Qt::Orientation orient, int start, int end, int delta_item_count, bool remove);
- virtual void _q_sourceModelDestroyed() override;
+ void _q_sourceModelDestroyed() override;
bool needsReorder(const QVector<int> &source_rows, const QModelIndex &source_parent) const;
diff --git a/src/corelib/itemmodels/qstringlistmodel.cpp b/src/corelib/itemmodels/qstringlistmodel.cpp
index f92a0d6676..a248cdcd38 100644
--- a/src/corelib/itemmodels/qstringlistmodel.cpp
+++ b/src/corelib/itemmodels/qstringlistmodel.cpp
@@ -136,6 +136,42 @@ QModelIndex QStringListModel::sibling(int row, int column, const QModelIndex &id
}
/*!
+ \reimp
+ \since 5.13
+*/
+QMap<int, QVariant> QStringListModel::itemData(const QModelIndex &index) const
+{
+ if (!checkIndex(index, CheckIndexOption::IndexIsValid | CheckIndexOption::ParentIsInvalid))
+ return QMap<int, QVariant>{};
+ const QVariant displayData = lst.at(index.row());
+ return QMap<int, QVariant>{{
+ std::make_pair<int>(Qt::DisplayRole, displayData),
+ std::make_pair<int>(Qt::EditRole, displayData)
+ }};
+}
+
+/*!
+ \reimp
+ \since 5.13
+ If \a roles contains both Qt::DisplayRole and Qt::EditRole, the latter will take precedence
+*/
+bool QStringListModel::setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles)
+{
+ if (roles.isEmpty())
+ return false;
+ if (std::any_of(roles.keyBegin(), roles.keyEnd(), [](int role) -> bool {
+ return role != Qt::DisplayRole && role != Qt::EditRole;
+ })) {
+ return false;
+ }
+ auto roleIter = roles.constFind(Qt::EditRole);
+ if (roleIter == roles.constEnd())
+ roleIter = roles.constFind(Qt::DisplayRole);
+ Q_ASSERT(roleIter != roles.constEnd());
+ return setData(index, roleIter.value(), roleIter.key());
+}
+
+/*!
Returns data for the specified \a role, from the item with the
given \a index.
@@ -188,18 +224,23 @@ bool QStringListModel::setData(const QModelIndex &index, const QVariant &value,
if (lst.at(index.row()) == valueString)
return true;
lst.replace(index.row(), valueString);
- QVector<int> roles;
- roles.reserve(2);
- roles.append(Qt::DisplayRole);
- roles.append(Qt::EditRole);
- emit dataChanged(index, index, roles);
- // once Q_COMPILER_UNIFORM_INIT can be used, change to:
- // emit dataChanged(index, index, {Qt::DisplayRole, Qt::EditRole});
+ emit dataChanged(index, index, {Qt::DisplayRole, Qt::EditRole});
return true;
}
return false;
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+/*!
+ \reimp
+ \since 6.0
+ */
+bool QStringListModel::clearItemData(const QModelIndex &index)
+{
+ return setData(index, QVariant(), Qt::EditRole);
+}
+#endif
+
/*!
Inserts \a count rows into the model, beginning at the given \a row.
@@ -252,6 +293,38 @@ bool QStringListModel::removeRows(int row, int count, const QModelIndex &parent)
return true;
}
+/*!
+ \since 5.13
+ \reimp
+*/
+bool QStringListModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)
+{
+ if (sourceRow < 0
+ || sourceRow + count - 1 >= rowCount(sourceParent)
+ || destinationChild <= 0
+ || destinationChild > rowCount(destinationParent)
+ || sourceRow == destinationChild - 1
+ || count <= 0) {
+ return false;
+ }
+ if (!beginMoveRows(QModelIndex(), sourceRow, sourceRow + count - 1, QModelIndex(), destinationChild))
+ return false;
+ /*
+ QList::move assumes that the second argument is the index where the item will end up to
+ i.e. the valid range for that argument is from 0 to QList::size()-1
+ QAbstractItemModel::moveRows when source and destinations have the same parent assumes that
+ the item will end up being in the row BEFORE the one indicated by destinationChild
+ i.e. the valid range for that argument is from 1 to QList::size()
+ For this reason we remove 1 from destinationChild when using it inside QList
+ */
+ destinationChild--;
+ const int fromRow = destinationChild < sourceRow ? (sourceRow + count - 1) : sourceRow;
+ while (count--)
+ lst.move(fromRow, destinationChild);
+ endMoveRows();
+ return true;
+}
+
static bool ascendingLessThan(const QPair<QString, int> &s1, const QPair<QString, int> &s2)
{
return s1.first < s2.first;
diff --git a/src/corelib/itemmodels/qstringlistmodel.h b/src/corelib/itemmodels/qstringlistmodel.h
index 53376285c6..86725ea80b 100644
--- a/src/corelib/itemmodels/qstringlistmodel.h
+++ b/src/corelib/itemmodels/qstringlistmodel.h
@@ -59,11 +59,18 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ bool clearItemData(const QModelIndex &index) override;
+#endif
Qt::ItemFlags flags(const QModelIndex &index) const override;
bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
+ bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override;
+
+ QMap<int, QVariant> itemData(const QModelIndex &index) const override;
+ bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles) override;
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
diff --git a/src/corelib/itemmodels/qtransposeproxymodel.cpp b/src/corelib/itemmodels/qtransposeproxymodel.cpp
new file mode 100644
index 0000000000..dd84b97118
--- /dev/null
+++ b/src/corelib/itemmodels/qtransposeproxymodel.cpp
@@ -0,0 +1,446 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Luca Beldi <v.ronin@yahoo.it>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qtransposeproxymodel.h"
+#include <private/qtransposeproxymodel_p.h>
+#include <QtCore/qvector.h>
+#include <QtCore/qmetaobject.h>
+#include <QtCore/qsize.h>
+
+QT_BEGIN_NAMESPACE
+
+QModelIndex QTransposeProxyModelPrivate::uncheckedMapToSource(const QModelIndex &proxyIndex) const
+{
+ if (!model || !proxyIndex.isValid())
+ return QModelIndex();
+ if (proxyIndex.internalPointer())
+ return model->createIndex(proxyIndex.column(), proxyIndex.row(), proxyIndex.internalPointer());
+ return model->index(proxyIndex.column(), proxyIndex.row());
+}
+
+QModelIndex QTransposeProxyModelPrivate::uncheckedMapFromSource(const QModelIndex &sourceIndex) const
+{
+ if (!model || !sourceIndex.isValid())
+ return QModelIndex();
+ Q_Q(const QTransposeProxyModel);
+ return q->createIndex(sourceIndex.column(), sourceIndex.row(), sourceIndex.internalPointer());
+}
+
+void QTransposeProxyModelPrivate::onLayoutChanged(const QList<QPersistentModelIndex> &parents, QAbstractItemModel::LayoutChangeHint hint)
+{
+ Q_Q(QTransposeProxyModel);
+ QModelIndexList toList;
+ toList.reserve(layoutChangePersistentIndexes.size());
+ for (const QPersistentModelIndex &persistIdx : qAsConst(layoutChangePersistentIndexes))
+ toList << q->mapFromSource(persistIdx);
+ q->changePersistentIndexList(layoutChangeProxyIndexes, toList);
+ layoutChangeProxyIndexes.clear();
+ layoutChangePersistentIndexes.clear();
+ QList<QPersistentModelIndex> proxyParents;
+ proxyParents.reserve(parents.size());
+ for (const QPersistentModelIndex &srcParent : parents)
+ proxyParents << q->mapFromSource(srcParent);
+ QAbstractItemModel::LayoutChangeHint proxyHint = QAbstractItemModel::NoLayoutChangeHint;
+ if (hint == QAbstractItemModel::VerticalSortHint)
+ proxyHint = QAbstractItemModel::HorizontalSortHint;
+ else if (hint == QAbstractItemModel::HorizontalSortHint)
+ proxyHint = QAbstractItemModel::VerticalSortHint;
+ q->layoutChanged(proxyParents, proxyHint);
+}
+
+void QTransposeProxyModelPrivate::onLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &parents, QAbstractItemModel::LayoutChangeHint hint)
+{
+ Q_Q(QTransposeProxyModel);
+ const QModelIndexList proxyPersistentIndexes = q->persistentIndexList();
+ layoutChangeProxyIndexes.clear();
+ layoutChangePersistentIndexes.clear();
+ layoutChangeProxyIndexes.reserve(proxyPersistentIndexes.size());
+ layoutChangePersistentIndexes.reserve(proxyPersistentIndexes.size());
+ for (const QPersistentModelIndex &proxyPersistentIndex : proxyPersistentIndexes) {
+ layoutChangeProxyIndexes << proxyPersistentIndex;
+ Q_ASSERT(proxyPersistentIndex.isValid());
+ const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex);
+ Q_ASSERT(srcPersistentIndex.isValid());
+ layoutChangePersistentIndexes << srcPersistentIndex;
+ }
+ QList<QPersistentModelIndex> proxyParents;
+ proxyParents.reserve(parents.size());
+ for (auto& srcParent : parents)
+ proxyParents << q->mapFromSource(srcParent);
+ QAbstractItemModel::LayoutChangeHint proxyHint = QAbstractItemModel::NoLayoutChangeHint;
+ if (hint == QAbstractItemModel::VerticalSortHint)
+ proxyHint = QAbstractItemModel::HorizontalSortHint;
+ else if (hint == QAbstractItemModel::HorizontalSortHint)
+ proxyHint = QAbstractItemModel::VerticalSortHint;
+ q->layoutAboutToBeChanged(proxyParents, proxyHint);
+}
+
+void QTransposeProxyModelPrivate::onDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int>& roles)
+{
+ Q_Q(QTransposeProxyModel);
+ q->dataChanged(q->mapFromSource(topLeft), q->mapFromSource(bottomRight), roles);
+}
+
+void QTransposeProxyModelPrivate::onHeaderDataChanged(Qt::Orientation orientation, int first, int last)
+{
+ Q_Q(QTransposeProxyModel);
+ q->headerDataChanged(orientation == Qt::Horizontal ? Qt::Vertical : Qt::Horizontal, first, last);
+}
+
+void QTransposeProxyModelPrivate::onColumnsAboutToBeInserted(const QModelIndex &parent, int first, int last)
+{
+ Q_Q(QTransposeProxyModel);
+ q->beginInsertRows(q->mapFromSource(parent), first, last);
+}
+
+void QTransposeProxyModelPrivate::onColumnsAboutToBeRemoved(const QModelIndex &parent, int first, int last)
+{
+ Q_Q(QTransposeProxyModel);
+ q->beginRemoveRows(q->mapFromSource(parent), first, last);
+}
+
+void QTransposeProxyModelPrivate::onColumnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn)
+{
+ Q_Q(QTransposeProxyModel);
+ q->beginMoveRows(q->mapFromSource(sourceParent), sourceStart, sourceEnd, q->mapFromSource(destinationParent), destinationColumn);
+}
+
+void QTransposeProxyModelPrivate::onRowsAboutToBeInserted(const QModelIndex &parent, int first, int last)
+{
+ Q_Q(QTransposeProxyModel);
+ q->beginInsertColumns(q->mapFromSource(parent), first, last);
+}
+
+void QTransposeProxyModelPrivate::onRowsAboutToBeRemoved(const QModelIndex &parent, int first, int last)
+{
+ Q_Q(QTransposeProxyModel);
+ q->beginRemoveColumns(q->mapFromSource(parent), first, last);
+}
+
+void QTransposeProxyModelPrivate::onRowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow)
+{
+ Q_Q(QTransposeProxyModel);
+ q->beginMoveColumns(q->mapFromSource(sourceParent), sourceStart, sourceEnd, q->mapFromSource(destinationParent), destinationRow);
+}
+
+/*!
+ \since 5.13
+ \class QTransposeProxyModel
+ \brief This proxy transposes the source model
+ \details This model will make the rows of the source model become columns of the proxy model and vice-versa.
+
+ If the model is a tree, the parents will be transposed as well. For example, if an index in the source model had parent `index(2,0)`, it will have parent `index(0,2)` in the proxy.
+*/
+
+/*!
+ Constructs a new proxy model with the given \a parent.
+*/
+QTransposeProxyModel::QTransposeProxyModel(QObject* parent)
+ : QAbstractProxyModel(*new QTransposeProxyModelPrivate, parent)
+{}
+
+/*!
+ Destructs the proxy model.
+*/
+QTransposeProxyModel::~QTransposeProxyModel() = default;
+
+/*!
+ \internal
+*/
+QTransposeProxyModel::QTransposeProxyModel(QTransposeProxyModelPrivate &dd, QObject *parent)
+ : QAbstractProxyModel(dd, parent)
+{}
+
+/*!
+ \reimp
+*/
+void QTransposeProxyModel::setSourceModel(QAbstractItemModel* newSourceModel)
+{
+ Q_D(QTransposeProxyModel);
+ if (newSourceModel == d->model)
+ return;
+ beginResetModel();
+ if (d->model) {
+ for (const QMetaObject::Connection& discIter : qAsConst(d->sourceConnections))
+ disconnect(discIter);
+ }
+ d->sourceConnections.clear();
+ QAbstractProxyModel::setSourceModel(newSourceModel);
+ if (d->model) {
+ using namespace std::placeholders;
+ d->sourceConnections = QVector<QMetaObject::Connection>{
+ connect(d->model, &QAbstractItemModel::modelAboutToBeReset, this, &QTransposeProxyModel::beginResetModel),
+ connect(d->model, &QAbstractItemModel::modelReset, this, &QTransposeProxyModel::endResetModel),
+ connect(d->model, &QAbstractItemModel::dataChanged, this, std::bind(&QTransposeProxyModelPrivate::onDataChanged, d, _1, _2, _3)),
+ connect(d->model, &QAbstractItemModel::headerDataChanged, this, std::bind(&QTransposeProxyModelPrivate::onHeaderDataChanged, d, _1, _2, _3)),
+ connect(d->model, &QAbstractItemModel::columnsAboutToBeInserted, this, std::bind(&QTransposeProxyModelPrivate::onColumnsAboutToBeInserted, d, _1, _2, _3)),
+ connect(d->model, &QAbstractItemModel::columnsAboutToBeMoved, this, std::bind(&QTransposeProxyModelPrivate::onColumnsAboutToBeMoved, d, _1, _2, _3, _4, _5)),
+ connect(d->model, &QAbstractItemModel::columnsAboutToBeRemoved, this, std::bind(&QTransposeProxyModelPrivate::onColumnsAboutToBeRemoved, d, _1, _2, _3)),
+ connect(d->model, &QAbstractItemModel::columnsInserted, this, &QTransposeProxyModel::endInsertRows),
+ connect(d->model, &QAbstractItemModel::columnsRemoved, this, &QTransposeProxyModel::endRemoveRows),
+ connect(d->model, &QAbstractItemModel::columnsMoved, this, &QTransposeProxyModel::endMoveRows),
+ connect(d->model, &QAbstractItemModel::rowsAboutToBeInserted, this, std::bind(&QTransposeProxyModelPrivate::onRowsAboutToBeInserted, d, _1, _2, _3)),
+ connect(d->model, &QAbstractItemModel::rowsAboutToBeMoved, this, std::bind(&QTransposeProxyModelPrivate::onRowsAboutToBeMoved, d, _1, _2, _3, _4, _5)),
+ connect(d->model, &QAbstractItemModel::rowsAboutToBeRemoved, this, std::bind(&QTransposeProxyModelPrivate::onRowsAboutToBeRemoved, d, _1, _2, _3)),
+ connect(d->model, &QAbstractItemModel::rowsInserted, this, &QTransposeProxyModel::endInsertColumns),
+ connect(d->model, &QAbstractItemModel::rowsRemoved, this, &QTransposeProxyModel::endRemoveColumns),
+ connect(d->model, &QAbstractItemModel::rowsMoved, this, &QTransposeProxyModel::endMoveColumns),
+ connect(d->model, &QAbstractItemModel::layoutAboutToBeChanged, this, std::bind(&QTransposeProxyModelPrivate::onLayoutAboutToBeChanged, d, _1, _2)),
+ connect(d->model, &QAbstractItemModel::layoutChanged, this, std::bind(&QTransposeProxyModelPrivate::onLayoutChanged, d, _1, _2))
+ };
+ }
+ endResetModel();
+}
+
+/*!
+ \reimp
+*/
+int QTransposeProxyModel::rowCount(const QModelIndex &parent) const
+{
+ Q_D(const QTransposeProxyModel);
+ if (!d->model)
+ return 0;
+ Q_ASSERT(checkIndex(parent));
+ return d->model->columnCount(mapToSource(parent));
+}
+
+/*!
+ \reimp
+*/
+int QTransposeProxyModel::columnCount(const QModelIndex &parent) const
+{
+ Q_D(const QTransposeProxyModel);
+ if (!d->model)
+ return 0;
+ Q_ASSERT(checkIndex(parent));
+ return d->model->rowCount(mapToSource(parent));
+}
+
+/*!
+ \reimp
+*/
+QVariant QTransposeProxyModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ Q_D(const QTransposeProxyModel);
+ if (!d->model)
+ return QVariant();
+ return d->model->headerData(section, orientation == Qt::Horizontal ? Qt::Vertical : Qt::Horizontal, role);
+}
+
+/*!
+ \reimp
+*/
+bool QTransposeProxyModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role)
+{
+ Q_D(QTransposeProxyModel);
+ if (!d->model)
+ return false;
+ return d->model->setHeaderData(section, orientation == Qt::Horizontal ? Qt::Vertical : Qt::Horizontal, value, role);
+}
+
+/*!
+ \reimp
+*/
+bool QTransposeProxyModel::setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles)
+{
+ Q_D(QTransposeProxyModel);
+ Q_ASSERT(checkIndex(index));
+ if (!d->model || !index.isValid())
+ return false;
+ return d->model->setItemData(mapToSource(index), roles);
+}
+
+/*!
+ \reimp
+*/
+QSize QTransposeProxyModel::span(const QModelIndex &index) const
+{
+ Q_D(const QTransposeProxyModel);
+ Q_ASSERT(checkIndex(index));
+ if (!d->model || !index.isValid())
+ return QSize();
+ return d->model->span(mapToSource(index)).transposed();
+}
+
+/*!
+ \reimp
+*/
+QMap<int, QVariant> QTransposeProxyModel::itemData(const QModelIndex &index) const
+{
+ Q_D(const QTransposeProxyModel);
+ if (!d->model)
+ return QMap<int, QVariant>();
+ Q_ASSERT(checkIndex(index));
+ return d->model->itemData(mapToSource(index));
+}
+
+/*!
+ \reimp
+*/
+QModelIndex QTransposeProxyModel::mapFromSource(const QModelIndex &sourceIndex) const
+{
+ Q_D(const QTransposeProxyModel);
+ if (!d->model || !sourceIndex.isValid())
+ return QModelIndex();
+ Q_ASSERT(d->model->checkIndex(sourceIndex));
+ return d->uncheckedMapFromSource(sourceIndex);
+}
+
+/*!
+ \reimp
+*/
+QModelIndex QTransposeProxyModel::mapToSource(const QModelIndex &proxyIndex) const
+{
+ Q_D(const QTransposeProxyModel);
+ Q_ASSERT(checkIndex(proxyIndex));
+ if (!d->model || !proxyIndex.isValid())
+ return QModelIndex();
+ return d->uncheckedMapToSource(proxyIndex);
+}
+
+/*!
+ \reimp
+*/
+QModelIndex QTransposeProxyModel::parent(const QModelIndex &index) const
+{
+ Q_D(const QTransposeProxyModel);
+ Q_ASSERT(checkIndex(index, CheckIndexOption::DoNotUseParent));
+ if (!d->model || !index.isValid())
+ return QModelIndex();
+ return d->uncheckedMapFromSource(d->uncheckedMapToSource(index).parent());
+}
+
+/*!
+ \reimp
+*/
+QModelIndex QTransposeProxyModel::index(int row, int column, const QModelIndex &parent) const
+{
+ Q_D(const QTransposeProxyModel);
+ Q_ASSERT(checkIndex(parent));
+ if (!d->model)
+ return QModelIndex();
+ return mapFromSource(d->model->index(column, row, mapToSource(parent)));
+}
+
+/*!
+ \reimp
+*/
+bool QTransposeProxyModel::insertRows(int row, int count, const QModelIndex &parent)
+{
+ Q_D(QTransposeProxyModel);
+ Q_ASSERT(checkIndex(parent));
+ if (!d->model)
+ return false;
+ return d->model->insertColumns(row, count, mapToSource(parent));
+}
+
+/*!
+ \reimp
+*/
+bool QTransposeProxyModel::removeRows(int row, int count, const QModelIndex &parent)
+{
+ Q_D(QTransposeProxyModel);
+ Q_ASSERT(checkIndex(parent));
+ if (!d->model)
+ return false;
+ return d->model->removeColumns(row, count, mapToSource(parent));
+}
+
+/*!
+ \reimp
+*/
+bool QTransposeProxyModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)
+{
+ Q_D(QTransposeProxyModel);
+ Q_ASSERT(checkIndex(sourceParent));
+ Q_ASSERT(checkIndex(destinationParent));
+ if (!d->model)
+ return false;
+ return d->model->moveColumns(mapToSource(sourceParent), sourceRow, count, mapToSource(destinationParent), destinationChild);
+}
+
+/*!
+ \reimp
+*/
+bool QTransposeProxyModel::insertColumns(int column, int count, const QModelIndex &parent)
+{
+ Q_D(QTransposeProxyModel);
+ Q_ASSERT(checkIndex(parent));
+ if (!d->model)
+ return false;
+ return d->model->insertRows(column, count, mapToSource(parent));
+}
+
+/*!
+ \reimp
+*/
+bool QTransposeProxyModel::removeColumns(int column, int count, const QModelIndex &parent)
+{
+ Q_D(QTransposeProxyModel);
+ Q_ASSERT(checkIndex(parent));
+ if (!d->model)
+ return false;
+ return d->model->removeRows(column, count, mapToSource(parent));
+}
+
+/*!
+ \reimp
+*/
+bool QTransposeProxyModel::moveColumns(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)
+{
+ Q_D(QTransposeProxyModel);
+ Q_ASSERT(checkIndex(sourceParent));
+ Q_ASSERT(checkIndex(destinationParent));
+ if (!d->model)
+ return false;
+ return d->model->moveRows(mapToSource(sourceParent), sourceRow, count, mapToSource(destinationParent), destinationChild);
+}
+
+/*!
+ \reimp
+ This method will perform no action. Use a QSortFilterProxyModel on top of this one if you require sorting.
+*/
+void QTransposeProxyModel::sort(int column, Qt::SortOrder order)
+{
+ Q_UNUSED(column)
+ Q_UNUSED(order)
+ return;
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/itemmodels/qtransposeproxymodel.h b/src/corelib/itemmodels/qtransposeproxymodel.h
new file mode 100644
index 0000000000..879266d931
--- /dev/null
+++ b/src/corelib/itemmodels/qtransposeproxymodel.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Luca Beldi <v.ronin@yahoo.it>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTRANSPOSEPROXYMODEL_H
+#define QTRANSPOSEPROXYMODEL_H
+
+#include <QtCore/qabstractproxymodel.h>
+#include <QtCore/qscopedpointer.h>
+
+QT_BEGIN_NAMESPACE
+
+class QTransposeProxyModelPrivate;
+
+class Q_CORE_EXPORT QTransposeProxyModel : public QAbstractProxyModel
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(QTransposeProxyModel)
+ Q_DECLARE_PRIVATE(QTransposeProxyModel)
+public:
+ explicit QTransposeProxyModel(QObject* parent = nullptr);
+ ~QTransposeProxyModel();
+ void setSourceModel(QAbstractItemModel* newSourceModel) override;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
+ bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole) override;
+ bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles) override;
+ QSize span(const QModelIndex &index) const override;
+ QMap<int, QVariant> itemData(const QModelIndex &index) const override;
+ QModelIndex mapFromSource(const QModelIndex &sourceIndex) const override;
+ QModelIndex mapToSource(const QModelIndex &proxyIndex) const override;
+ QModelIndex parent(const QModelIndex &index) const override;
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
+ bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
+ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
+ bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override;
+ bool insertColumns(int column, int count, const QModelIndex &parent = QModelIndex()) override;
+ bool removeColumns(int column, int count, const QModelIndex &parent = QModelIndex()) override;
+ bool moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild) override;
+ void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
+protected:
+ QTransposeProxyModel(QTransposeProxyModelPrivate &, QObject *parent);
+};
+
+QT_END_NAMESPACE
+
+#endif // QTRANSPOSEPROXYMODEL_H
diff --git a/src/corelib/itemmodels/qtransposeproxymodel_p.h b/src/corelib/itemmodels/qtransposeproxymodel_p.h
new file mode 100644
index 0000000000..fb5ce5c117
--- /dev/null
+++ b/src/corelib/itemmodels/qtransposeproxymodel_p.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Luca Beldi <v.ronin@yahoo.it>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTRANSPOSEPROXYMODEL_P_H
+#define QTRANSPOSEPROXYMODEL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qtransposeproxymodel.h"
+#include <private/qabstractproxymodel_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QTransposeProxyModelPrivate : public QAbstractProxyModelPrivate
+{
+ Q_DECLARE_PUBLIC(QTransposeProxyModel)
+ Q_DISABLE_COPY(QTransposeProxyModelPrivate)
+private:
+ QTransposeProxyModelPrivate() = default;
+ QVector<QMetaObject::Connection> sourceConnections;
+ QVector<QPersistentModelIndex> layoutChangePersistentIndexes;
+ QModelIndexList layoutChangeProxyIndexes;
+ QModelIndex uncheckedMapToSource(const QModelIndex &proxyIndex) const;
+ QModelIndex uncheckedMapFromSource(const QModelIndex &sourceIndex) const;
+ void onLayoutChanged(const QList<QPersistentModelIndex> &parents, QAbstractItemModel::LayoutChangeHint hint);
+ void onLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &parents, QAbstractItemModel::LayoutChangeHint hint);
+ void onDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int>& roles);
+ void onHeaderDataChanged(Qt::Orientation orientation, int first, int last);
+ void onColumnsAboutToBeInserted(const QModelIndex &parent, int first, int last);
+ void onColumnsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
+ void onColumnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn);
+ void onRowsAboutToBeInserted(const QModelIndex &parent, int first, int last);
+ void onRowsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
+ void onRowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow);
+};
+
+QT_END_NAMESPACE
+
+#endif //QTRANSPOSEPROXYMODEL_P_H
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index b6b4da3885..e5098b8415 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -1265,7 +1265,11 @@ bool QCoreApplication::closingDown()
\l{QCoreApplication::sendPostedEvents()}{sendPostedEvents()} from
within that local loop.
- Calling this function processes events only for the calling thread.
+ Calling this function processes events only for the calling thread,
+ and returns after all available events have been processed. Available
+ events are events queued before the function call. This means that
+ events that are posted while the function runs will be queued until
+ a later round of event processing.
\threadsafe
@@ -1282,7 +1286,7 @@ void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags)
/*!
\overload processEvents()
- Processes pending events for the calling thread for \a maxtime
+ Processes pending events for the calling thread for \a ms
milliseconds or until there are no more events to process,
whichever is shorter.
@@ -1291,11 +1295,14 @@ void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags)
Calling this function processes events only for the calling thread.
+ \note Unlike the \l{QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags)}{processEvents()}
+ overload, this function also processes events that are posted while the function runs.
+
\threadsafe
\sa exec(), QTimer, QEventLoop::processEvents()
*/
-void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags, int maxtime)
+void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags, int ms)
{
// ### Qt 6: consider splitting this method into a public and a private
// one, so that a user-invoked processEvents can be detected
@@ -1306,7 +1313,7 @@ void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags, int m
QElapsedTimer start;
start.start();
while (data->eventDispatcher.load()->processEvents(flags & ~QEventLoop::WaitForMoreEvents)) {
- if (start.elapsed() > maxtime)
+ if (start.elapsed() > ms)
break;
}
}
diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
index 45c6e29e4b..34c2dde6a8 100644
--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
+++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
@@ -86,9 +86,10 @@ static gboolean socketNotifierSourceCheck(GSource *source)
p->pollfd.fd, t[int(p->socketNotifier->type())]);
// ### note, modifies src->pollfds!
p->socketNotifier->setEnabled(false);
+ i--;
+ } else {
+ pending = pending || ((p->pollfd.revents & p->pollfd.events) != 0);
}
-
- pending = ((p->pollfd.revents & p->pollfd.events) != 0);
}
return pending;
diff --git a/src/corelib/kernel/qjni_p.h b/src/corelib/kernel/qjni_p.h
index 52abd51dc1..ec8525e6e1 100644
--- a/src/corelib/kernel/qjni_p.h
+++ b/src/corelib/kernel/qjni_p.h
@@ -76,7 +76,7 @@ public:
private:
friend class QAndroidJniEnvironment;
- Q_DISABLE_COPY(QJNIEnvironmentPrivate)
+ Q_DISABLE_COPY_MOVE(QJNIEnvironmentPrivate)
JNIEnv *jniEnv;
};
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index 5de2717078..27153e0c4d 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -2257,9 +2257,9 @@ bool QMetaMethod::invoke(QObject *object,
return false;
// check connection type
- QThread *currentThread = QThread::currentThread();
- QThread *objectThread = object->thread();
if (connectionType == Qt::AutoConnection) {
+ QThread *currentThread = QThread::currentThread();
+ QThread *objectThread = object->thread();
connectionType = currentThread == objectThread
? Qt::DirectConnection
: Qt::QueuedConnection;
@@ -2342,6 +2342,8 @@ bool QMetaMethod::invoke(QObject *object,
0, -1, nargs, types, args));
} else { // blocking queued connection
#if QT_CONFIG(thread)
+ QThread *currentThread = QThread::currentThread();
+ QThread *objectThread = object->thread();
if (currentThread == objectThread) {
qWarning("QMetaMethod::invoke: Dead lock detected in "
"BlockingQueuedConnection: Receiver is %s(%p)",
diff --git a/src/corelib/kernel/qmetaobjectbuilder_p.h b/src/corelib/kernel/qmetaobjectbuilder_p.h
index 115ec835aa..6100835bad 100644
--- a/src/corelib/kernel/qmetaobjectbuilder_p.h
+++ b/src/corelib/kernel/qmetaobjectbuilder_p.h
@@ -184,7 +184,7 @@ public:
#endif
private:
- Q_DISABLE_COPY(QMetaObjectBuilder)
+ Q_DISABLE_COPY_MOVE(QMetaObjectBuilder)
QMetaObjectBuilderPrivate *d;
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 632b86959d..b9e35e28e4 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -290,6 +290,10 @@ struct DefinedTypesFilter {
\value QJsonObject QJsonObject
\value QJsonArray QJsonArray
\value QJsonDocument QJsonDocument
+ \value QCborValue QCborValue
+ \value QCborArray QCborArray
+ \value QCborMap QCborMap
+ \value QCborSimpleType QCborSimpleType
\value QModelIndex QModelIndex
\value QPersistentModelIndex QPersistentModelIndex (since 5.5)
\value QUuid QUuid
@@ -373,6 +377,13 @@ struct DefinedTypesFilter {
*/
/*!
+ \fn int QMetaType::id() const
+ \since 5.13
+
+ Returns id type hold by this QMetatype instance.
+*/
+
+/*!
\fn bool QMetaType::sizeOf() const
\since 5.0
@@ -1374,236 +1385,197 @@ int QMetaType::type(const QT_PREPEND_NAMESPACE(QByteArray) &typeName)
}
#ifndef QT_NO_DATASTREAM
-/*!
- Writes the object pointed to by \a data with the ID \a type to
- the given \a stream. Returns \c true if the object is saved
- successfully; otherwise returns \c false.
- The type must have been registered with qRegisterMetaType() and
- qRegisterMetaTypeStreamOperators() beforehand.
+namespace
+{
- Normally, you should not need to call this function directly.
- Instead, use QVariant's \c operator<<(), which relies on save()
- to stream custom types.
+template<typename T>
+class HasStreamOperator
+{
+ struct Yes { char unused[1]; };
+ struct No { char unused[2]; };
+ Q_STATIC_ASSERT(sizeof(Yes) != sizeof(No));
+
+ template<class C> static decltype(std::declval<QDataStream&>().operator>>(std::declval<C&>()), Yes()) load(int);
+ template<class C> static decltype(operator>>(std::declval<QDataStream&>(), std::declval<C&>()), Yes()) load(int);
+ template<class C> static No load(...);
+ template<class C> static decltype(operator<<(std::declval<QDataStream&>(), std::declval<const C&>()), Yes()) saveFunction(int);
+ template<class C> static decltype(std::declval<QDataStream&>().operator<<(std::declval<const C&>()), Yes()) saveMethod(int);
+ template<class C> static No saveMethod(...);
+ template<class C> static No saveFunction(...);
+ static constexpr bool LoadValue = QtMetaTypePrivate::TypeDefinition<T>::IsAvailable && (sizeof(load<T>(0)) == sizeof(Yes));
+ static constexpr bool SaveValue = QtMetaTypePrivate::TypeDefinition<T>::IsAvailable &&
+ ((sizeof(saveMethod<T>(0)) == sizeof(Yes)) || (sizeof(saveFunction<T>(0)) == sizeof(Yes)));
+public:
+ static constexpr bool Value = LoadValue && SaveValue;
+};
- \sa load(), qRegisterMetaTypeStreamOperators()
-*/
-bool QMetaType::save(QDataStream &stream, int type, const void *data)
+// Quick sanity checks
+Q_STATIC_ASSERT(HasStreamOperator<NS(QJsonDocument)>::Value);
+Q_STATIC_ASSERT(!HasStreamOperator<void*>::Value);
+Q_STATIC_ASSERT(HasStreamOperator<qint8>::Value);
+
+template<typename T, bool IsAcceptedType = DefinedTypesFilter::Acceptor<T>::IsAccepted && HasStreamOperator<T>::Value>
+struct FilteredOperatorSwitch
+{
+ static bool load(QDataStream &stream, T *data, int)
+ {
+ stream >> *data;
+ return true;
+ }
+ static bool save(QDataStream &stream, const T *data, int)
+ {
+ stream << *data;
+ return true;
+ }
+};
+template<typename T>
+struct FilteredOperatorSwitch<T, /* IsAcceptedType = */ false>
{
- if (!data || !isRegistered(type))
+ static const QMetaTypeInterface* getMetaTypeInterface(int type)
+ {
+ if (QModulesPrivate::QTypeModuleInfo<T>::IsGui && qMetaTypeGuiHelper)
+ return &qMetaTypeGuiHelper[type - QMetaType::FirstGuiType];
+ else if (QModulesPrivate::QTypeModuleInfo<T>::IsWidget && qMetaTypeWidgetsHelper)
+ return &qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType];
+ return nullptr;
+ }
+ static bool save(QDataStream &stream, const T *data, int type)
+ {
+ if (auto interface = getMetaTypeInterface(type)) {
+ interface->saveOp(stream, data);
+ return true;
+ }
return false;
-
- switch(type) {
- case QMetaType::UnknownType:
- case QMetaType::Void:
- case QMetaType::VoidStar:
- case QMetaType::QObjectStar:
-#if QT_CONFIG(itemmodel)
- case QMetaType::QModelIndex:
- case QMetaType::QPersistentModelIndex:
-#endif
- case QMetaType::QJsonValue:
- case QMetaType::QJsonObject:
- case QMetaType::QJsonArray:
- case QMetaType::QJsonDocument:
- case QMetaType::QCborValue:
- case QMetaType::QCborArray:
- case QMetaType::QCborMap:
+ }
+ static bool load(QDataStream &stream, T *data, int type)
+ {
+ if (auto interface = getMetaTypeInterface(type)) {
+ interface->loadOp(stream, data);
+ return true;
+ }
return false;
- case QMetaType::Nullptr:
- stream << *static_cast<const std::nullptr_t *>(data);
- return true;
- case QMetaType::Long:
- stream << qlonglong(*static_cast<const long *>(data));
- break;
- case QMetaType::Int:
- stream << *static_cast<const int *>(data);
- break;
- case QMetaType::Short:
- stream << *static_cast<const short *>(data);
- break;
- case QMetaType::Char:
+ }
+};
+
+class SaveOperatorSwitch
+{
+public:
+ QDataStream &stream;
+ int m_type;
+
+ template<typename T>
+ bool delegate(const T *data)
+ {
+ return FilteredOperatorSwitch<T>::save(stream, data, m_type);
+ }
+ bool delegate(const char *data)
+ {
// force a char to be signed
- stream << *static_cast<const signed char *>(data);
- break;
- case QMetaType::ULong:
- stream << qulonglong(*static_cast<const ulong *>(data));
- break;
- case QMetaType::UInt:
- stream << *static_cast<const uint *>(data);
- break;
- case QMetaType::LongLong:
- stream << *static_cast<const qlonglong *>(data);
- break;
- case QMetaType::ULongLong:
- stream << *static_cast<const qulonglong *>(data);
- break;
- case QMetaType::UShort:
- stream << *static_cast<const ushort *>(data);
- break;
- case QMetaType::SChar:
- stream << *static_cast<const signed char *>(data);
- break;
- case QMetaType::UChar:
- stream << *static_cast<const uchar *>(data);
- break;
- case QMetaType::Bool:
- stream << qint8(*static_cast<const bool *>(data));
- break;
- case QMetaType::Float:
- stream << *static_cast<const float *>(data);
- break;
- case QMetaType::Double:
- stream << *static_cast<const double *>(data);
- break;
- case QMetaType::QChar:
- stream << *static_cast<const NS(QChar) *>(data);
- break;
-#ifndef QT_BOOTSTRAPPED
- case QMetaType::QVariantMap:
- stream << *static_cast<const NS(QVariantMap)*>(data);
- break;
- case QMetaType::QVariantHash:
- stream << *static_cast<const NS(QVariantHash)*>(data);
- break;
- case QMetaType::QVariantList:
- stream << *static_cast<const NS(QVariantList)*>(data);
- break;
- case QMetaType::QVariant:
- stream << *static_cast<const NS(QVariant)*>(data);
- break;
- case QMetaType::QByteArrayList:
- stream << *static_cast<const NS(QByteArrayList)*>(data);
- break;
-#endif
- case QMetaType::QByteArray:
- stream << *static_cast<const NS(QByteArray)*>(data);
- break;
- case QMetaType::QString:
- stream << *static_cast<const NS(QString)*>(data);
- break;
- case QMetaType::QStringList:
- stream << *static_cast<const NS(QStringList)*>(data);
- break;
-#ifndef QT_BOOTSTRAPPED
- case QMetaType::QBitArray:
- stream << *static_cast<const NS(QBitArray)*>(data);
- break;
-#endif
- case QMetaType::QDate:
- stream << *static_cast<const NS(QDate)*>(data);
- break;
- case QMetaType::QTime:
- stream << *static_cast<const NS(QTime)*>(data);
- break;
- case QMetaType::QDateTime:
- stream << *static_cast<const NS(QDateTime)*>(data);
- break;
-#ifndef QT_BOOTSTRAPPED
- case QMetaType::QUrl:
- stream << *static_cast<const NS(QUrl)*>(data);
- break;
-#endif
- case QMetaType::QLocale:
- stream << *static_cast<const NS(QLocale)*>(data);
- break;
-#ifndef QT_NO_GEOM_VARIANT
- case QMetaType::QRect:
- stream << *static_cast<const NS(QRect)*>(data);
- break;
- case QMetaType::QRectF:
- stream << *static_cast<const NS(QRectF)*>(data);
- break;
- case QMetaType::QSize:
- stream << *static_cast<const NS(QSize)*>(data);
- break;
- case QMetaType::QSizeF:
- stream << *static_cast<const NS(QSizeF)*>(data);
- break;
- case QMetaType::QLine:
- stream << *static_cast<const NS(QLine)*>(data);
- break;
- case QMetaType::QLineF:
- stream << *static_cast<const NS(QLineF)*>(data);
- break;
- case QMetaType::QPoint:
- stream << *static_cast<const NS(QPoint)*>(data);
- break;
- case QMetaType::QPointF:
- stream << *static_cast<const NS(QPointF)*>(data);
- break;
-#endif
-#ifndef QT_NO_REGEXP
- case QMetaType::QRegExp:
- stream << *static_cast<const NS(QRegExp)*>(data);
- break;
-#endif
-#if QT_CONFIG(regularexpression)
- case QMetaType::QRegularExpression:
- stream << *static_cast<const NS(QRegularExpression)*>(data);
- break;
-#endif // QT_CONFIG(regularexpression)
-#ifndef QT_BOOTSTRAPPED
- case QMetaType::QEasingCurve:
- stream << *static_cast<const NS(QEasingCurve)*>(data);
- break;
- case QMetaType::QCborSimpleType:
- stream << *static_cast<const quint8 *>(data);
- break;
-#endif // QT_BOOTSTRAPPED
- case QMetaType::QFont:
- case QMetaType::QPixmap:
- case QMetaType::QBrush:
- case QMetaType::QColor:
- case QMetaType::QPalette:
- case QMetaType::QImage:
- case QMetaType::QPolygon:
- case QMetaType::QPolygonF:
- case QMetaType::QRegion:
- case QMetaType::QBitmap:
- case QMetaType::QCursor:
- case QMetaType::QKeySequence:
- case QMetaType::QPen:
- case QMetaType::QTextLength:
- case QMetaType::QTextFormat:
- case QMetaType::QMatrix:
- case QMetaType::QTransform:
- case QMetaType::QMatrix4x4:
- case QMetaType::QVector2D:
- case QMetaType::QVector3D:
- case QMetaType::QVector4D:
- case QMetaType::QQuaternion:
- case QMetaType::QIcon:
- if (!qMetaTypeGuiHelper)
- return false;
- qMetaTypeGuiHelper[type - FirstGuiType].saveOp(stream, data);
- break;
- case QMetaType::QSizePolicy:
- if (!qMetaTypeWidgetsHelper)
- return false;
- qMetaTypeWidgetsHelper[type - FirstWidgetsType].saveOp(stream, data);
- break;
- case QMetaType::QUuid:
- stream << *static_cast<const NS(QUuid)*>(data);
- break;
- default: {
+ stream << qint8(*data);
+ return true;
+ }
+ bool delegate(const long *data)
+ {
+ stream << qlonglong(*data);
+ return true;
+ }
+ bool delegate(const unsigned long *data)
+ {
+ stream << qulonglong(*data);
+ return true;
+ }
+ bool delegate(const QMetaTypeSwitcher::NotBuiltinType *data)
+ {
const QVector<QCustomTypeInfo> * const ct = customTypes();
if (!ct)
return false;
-
- SaveOperator saveOp = 0;
+ QMetaType::SaveOperator saveOp = nullptr;
{
QReadLocker locker(customTypesLock());
- saveOp = ct->at(type - User).saveOp;
+ saveOp = ct->at(m_type - QMetaType::User).saveOp;
}
-
if (!saveOp)
return false;
saveOp(stream, data);
- break; }
+ return true;
}
+ bool delegate(const void*) { return false; }
+ bool delegate(const QMetaTypeSwitcher::UnknownType*) { return false; }
+};
+class LoadOperatorSwitch
+{
+public:
+ QDataStream &stream;
+ int m_type;
- return true;
+ template<typename T>
+ bool delegate(const T *data)
+ {
+ return FilteredOperatorSwitch<T>::load(stream, const_cast<T*>(data), m_type);
+ }
+ bool delegate(const char *data)
+ {
+ // force a char to be signed
+ qint8 c;
+ stream >> c;
+ *const_cast<char*>(data) = c;
+ return true;
+ }
+ bool delegate(const long *data)
+ {
+ qlonglong l;
+ stream >> l;
+ *const_cast<long*>(data) = l;
+ return true;
+ }
+ bool delegate(const unsigned long *data)
+ {
+ qlonglong l;
+ stream >> l;
+ *const_cast<unsigned long*>(data) = l;
+ return true;
+ }
+ bool delegate(const QMetaTypeSwitcher::NotBuiltinType *data)
+ {
+ const QVector<QCustomTypeInfo> * const ct = customTypes();
+ if (!ct)
+ return false;
+ QMetaType::LoadOperator loadOp = nullptr;
+ {
+ QReadLocker locker(customTypesLock());
+ loadOp = ct->at(m_type - QMetaType::User).loadOp;
+ }
+ if (!loadOp)
+ return false;
+ loadOp(stream, const_cast<QMetaTypeSwitcher::NotBuiltinType*>(data));
+ return true;
+ }
+ bool delegate(const void*) { return false; }
+ bool delegate(const QMetaTypeSwitcher::UnknownType*) { return false; }
+};
+} // namespace
+
+/*!
+ Writes the object pointed to by \a data with the ID \a type to
+ the given \a stream. Returns \c true if the object is saved
+ successfully; otherwise returns \c false.
+
+ The type must have been registered with qRegisterMetaType() and
+ qRegisterMetaTypeStreamOperators() beforehand.
+
+ Normally, you should not need to call this function directly.
+ Instead, use QVariant's \c operator<<(), which relies on save()
+ to stream custom types.
+
+ \sa load(), qRegisterMetaTypeStreamOperators()
+*/
+bool QMetaType::save(QDataStream &stream, int type, const void *data)
+{
+ if (!data)
+ return false;
+ SaveOperatorSwitch saveOp{stream, type};
+ return QMetaTypeSwitcher::switcher<bool>(saveOp, type, data);
}
/*!
@@ -1622,225 +1594,10 @@ bool QMetaType::save(QDataStream &stream, int type, const void *data)
*/
bool QMetaType::load(QDataStream &stream, int type, void *data)
{
- if (!data || !isRegistered(type))
- return false;
-
- switch(type) {
- case QMetaType::UnknownType:
- case QMetaType::Void:
- case QMetaType::VoidStar:
- case QMetaType::QObjectStar:
-#if QT_CONFIG(itemmodel)
- case QMetaType::QModelIndex:
- case QMetaType::QPersistentModelIndex:
-#endif
- case QMetaType::QJsonValue:
- case QMetaType::QJsonObject:
- case QMetaType::QJsonArray:
- case QMetaType::QJsonDocument:
- case QMetaType::QCborValue:
- case QMetaType::QCborArray:
- case QMetaType::QCborMap:
+ if (!data)
return false;
- case QMetaType::Nullptr:
- stream >> *static_cast<std::nullptr_t *>(data);
- return true;
- case QMetaType::Long: {
- qlonglong l;
- stream >> l;
- *static_cast<long *>(data) = long(l);
- break; }
- case QMetaType::Int:
- stream >> *static_cast<int *>(data);
- break;
- case QMetaType::Short:
- stream >> *static_cast<short *>(data);
- break;
- case QMetaType::Char:
- // force a char to be signed
- stream >> *static_cast<signed char *>(data);
- break;
- case QMetaType::ULong: {
- qulonglong ul;
- stream >> ul;
- *static_cast<ulong *>(data) = ulong(ul);
- break; }
- case QMetaType::UInt:
- stream >> *static_cast<uint *>(data);
- break;
- case QMetaType::LongLong:
- stream >> *static_cast<qlonglong *>(data);
- break;
- case QMetaType::ULongLong:
- stream >> *static_cast<qulonglong *>(data);
- break;
- case QMetaType::UShort:
- stream >> *static_cast<ushort *>(data);
- break;
- case QMetaType::SChar:
- stream >> *static_cast<signed char *>(data);
- break;
- case QMetaType::UChar:
- stream >> *static_cast<uchar *>(data);
- break;
- case QMetaType::Bool: {
- qint8 b;
- stream >> b;
- *static_cast<bool *>(data) = b;
- break; }
- case QMetaType::Float:
- stream >> *static_cast<float *>(data);
- break;
- case QMetaType::Double:
- stream >> *static_cast<double *>(data);
- break;
- case QMetaType::QChar:
- stream >> *static_cast< NS(QChar)*>(data);
- break;
-#ifndef QT_BOOTSTRAPPED
- case QMetaType::QVariantMap:
- stream >> *static_cast< NS(QVariantMap)*>(data);
- break;
- case QMetaType::QVariantHash:
- stream >> *static_cast< NS(QVariantHash)*>(data);
- break;
- case QMetaType::QVariantList:
- stream >> *static_cast< NS(QVariantList)*>(data);
- break;
- case QMetaType::QVariant:
- stream >> *static_cast< NS(QVariant)*>(data);
- break;
- case QMetaType::QByteArrayList:
- stream >> *static_cast< NS(QByteArrayList)*>(data);
- break;
-#endif
- case QMetaType::QByteArray:
- stream >> *static_cast< NS(QByteArray)*>(data);
- break;
- case QMetaType::QString:
- stream >> *static_cast< NS(QString)*>(data);
- break;
- case QMetaType::QStringList:
- stream >> *static_cast< NS(QStringList)*>(data);
- break;
-#ifndef QT_BOOTSTRAPPED
- case QMetaType::QBitArray:
- stream >> *static_cast< NS(QBitArray)*>(data);
- break;
-#endif
- case QMetaType::QDate:
- stream >> *static_cast< NS(QDate)*>(data);
- break;
- case QMetaType::QTime:
- stream >> *static_cast< NS(QTime)*>(data);
- break;
- case QMetaType::QDateTime:
- stream >> *static_cast< NS(QDateTime)*>(data);
- break;
-#ifndef QT_BOOTSTRAPPED
- case QMetaType::QUrl:
- stream >> *static_cast< NS(QUrl)*>(data);
- break;
-#endif
- case QMetaType::QLocale:
- stream >> *static_cast< NS(QLocale)*>(data);
- break;
-#ifndef QT_NO_GEOM_VARIANT
- case QMetaType::QRect:
- stream >> *static_cast< NS(QRect)*>(data);
- break;
- case QMetaType::QRectF:
- stream >> *static_cast< NS(QRectF)*>(data);
- break;
- case QMetaType::QSize:
- stream >> *static_cast< NS(QSize)*>(data);
- break;
- case QMetaType::QSizeF:
- stream >> *static_cast< NS(QSizeF)*>(data);
- break;
- case QMetaType::QLine:
- stream >> *static_cast< NS(QLine)*>(data);
- break;
- case QMetaType::QLineF:
- stream >> *static_cast< NS(QLineF)*>(data);
- break;
- case QMetaType::QPoint:
- stream >> *static_cast< NS(QPoint)*>(data);
- break;
- case QMetaType::QPointF:
- stream >> *static_cast< NS(QPointF)*>(data);
- break;
-#endif
-#ifndef QT_NO_REGEXP
- case QMetaType::QRegExp:
- stream >> *static_cast< NS(QRegExp)*>(data);
- break;
-#endif
-#if QT_CONFIG(regularexpression)
- case QMetaType::QRegularExpression:
- stream >> *static_cast< NS(QRegularExpression)*>(data);
- break;
-#endif // QT_CONFIG(regularexpression)
-#ifndef QT_BOOTSTRAPPED
- case QMetaType::QEasingCurve:
- stream >> *static_cast< NS(QEasingCurve)*>(data);
- break;
- case QMetaType::QCborSimpleType:
- stream >> *static_cast<quint8 *>(data);
- break;
-#endif // QT_BOOTSTRAPPED
- case QMetaType::QFont:
- case QMetaType::QPixmap:
- case QMetaType::QBrush:
- case QMetaType::QColor:
- case QMetaType::QPalette:
- case QMetaType::QImage:
- case QMetaType::QPolygon:
- case QMetaType::QPolygonF:
- case QMetaType::QRegion:
- case QMetaType::QBitmap:
- case QMetaType::QCursor:
- case QMetaType::QKeySequence:
- case QMetaType::QPen:
- case QMetaType::QTextLength:
- case QMetaType::QTextFormat:
- case QMetaType::QMatrix:
- case QMetaType::QTransform:
- case QMetaType::QMatrix4x4:
- case QMetaType::QVector2D:
- case QMetaType::QVector3D:
- case QMetaType::QVector4D:
- case QMetaType::QQuaternion:
- case QMetaType::QIcon:
- if (!qMetaTypeGuiHelper)
- return false;
- qMetaTypeGuiHelper[type - FirstGuiType].loadOp(stream, data);
- break;
- case QMetaType::QSizePolicy:
- if (!qMetaTypeWidgetsHelper)
- return false;
- qMetaTypeWidgetsHelper[type - FirstWidgetsType].loadOp(stream, data);
- break;
- case QMetaType::QUuid:
- stream >> *static_cast< NS(QUuid)*>(data);
- break;
- default: {
- const QVector<QCustomTypeInfo> * const ct = customTypes();
- if (!ct)
- return false;
-
- LoadOperator loadOp = 0;
- {
- QReadLocker locker(customTypesLock());
- loadOp = ct->at(type - User).loadOp;
- }
-
- if (!loadOp)
- return false;
- loadOp(stream, data);
- break; }
- }
- return true;
+ LoadOperatorSwitch loadOp{stream, type};
+ return QMetaTypeSwitcher::switcher<bool>(loadOp, type, data);
}
#endif // QT_NO_DATASTREAM
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index ed7feee775..a47fbfe28d 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -570,6 +570,7 @@ public:
inline bool isValid() const;
inline bool isRegistered() const;
+ inline int id() const;
inline int sizeOf() const;
inline TypeFlags flags() const;
inline const QMetaObject *metaObject() const;
@@ -1976,7 +1977,9 @@ QT_FOR_EACH_STATIC_WIDGETS_CLASS(QT_FORWARD_DECLARE_STATIC_TYPES_ITER)
typedef QList<QVariant> QVariantList;
typedef QMap<QString, QVariant> QVariantMap;
typedef QHash<QString, QVariant> QVariantHash;
-#ifndef Q_CLANG_QDOC
+#ifdef Q_CLANG_QDOC
+class QByteArrayList;
+#else
typedef QList<QByteArray> QByteArrayList;
#endif
@@ -2221,6 +2224,11 @@ inline bool QMetaType::isRegistered() const
return isValid();
}
+inline int QMetaType::id() const
+{
+ return m_typeId;
+}
+
inline void *QMetaType::create(const void *copy) const
{
// ### TODO Qt6 remove the extension
diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp
index c8ad1bc43f..9a98db21d3 100644
--- a/src/corelib/kernel/qmimedata.cpp
+++ b/src/corelib/kernel/qmimedata.cpp
@@ -51,6 +51,7 @@ QT_BEGIN_NAMESPACE
static inline QString textUriListLiteral() { return QStringLiteral("text/uri-list"); }
static inline QString textHtmlLiteral() { return QStringLiteral("text/html"); }
static inline QString textPlainLiteral() { return QStringLiteral("text/plain"); }
+static inline QString textPlainUtf8Literal() { return QStringLiteral("text/plain;charset=utf-8"); }
static inline QString applicationXColorLiteral() { return QStringLiteral("application/x-color"); }
static inline QString applicationXQtImageLiteral() { return QStringLiteral("application/x-qt-image"); }
@@ -399,6 +400,10 @@ bool QMimeData::hasUrls() const
QString QMimeData::text() const
{
Q_D(const QMimeData);
+ QVariant utf8Text = d->retrieveTypedData(textPlainUtf8Literal(), QVariant::String);
+ if (!utf8Text.isNull())
+ return utf8Text.toString();
+
QVariant data = d->retrieveTypedData(textPlainLiteral(), QVariant::String);
return data.toString();
}
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 42c39f18e3..73b8c33efe 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -1824,12 +1824,15 @@ void QObject::killTimer(int id)
/*!
\fn template<typename T> QList<T> QObject::findChildren(const QRegExp &regExp, Qt::FindChildOptions options) const
\overload findChildren()
+ \obsolete
Returns the children of this object that can be cast to type T
and that have names matching the regular expression \a regExp,
or an empty list if there are no such objects.
The search is performed recursively, unless \a options specifies the
option FindDirectChildrenOnly.
+
+ Use the findChildren overload taking a QRegularExpression instead.
*/
/*!
@@ -2148,7 +2151,8 @@ void QObject::removeEventFilter(QObject *obj)
\fn void QObject::destroyed(QObject *obj)
This signal is emitted immediately before the object \a obj is
- destroyed, and can not be blocked.
+ destroyed, after any instances of QPointer have been notified,
+ and can not be blocked.
All the objects's children are destroyed immediately after this
signal is emitted.
@@ -3673,10 +3677,12 @@ void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_i
return;
}
- void *empty_argv[] = { 0 };
+ void *empty_argv[] = { nullptr };
+ if (!argv)
+ argv = empty_argv;
+
if (qt_signal_spy_callback_set.signal_begin_callback != 0) {
- qt_signal_spy_callback_set.signal_begin_callback(sender, signal_index,
- argv ? argv : empty_argv);
+ qt_signal_spy_callback_set.signal_begin_callback(sender, signal_index, argv);
}
Q_TRACE(QMetaObject_activate_begin_signal, sender, signal_index);
@@ -3739,7 +3745,7 @@ void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_i
// put into the event queue
if ((c->connectionType == Qt::AutoConnection && !receiverInSameThread)
|| (c->connectionType == Qt::QueuedConnection)) {
- queued_activate(sender, signal_index, c, argv ? argv : empty_argv, locker);
+ queued_activate(sender, signal_index, c, argv, locker);
continue;
#if QT_CONFIG(thread)
} else if (c->connectionType == Qt::BlockingQueuedConnection) {
@@ -3751,8 +3757,8 @@ void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_i
}
QSemaphore semaphore;
QMetaCallEvent *ev = c->isSlotObject ?
- new QMetaCallEvent(c->slotObj, sender, signal_index, 0, 0, argv ? argv : empty_argv, &semaphore) :
- new QMetaCallEvent(c->method_offset, c->method_relative, c->callFunction, sender, signal_index, 0, 0, argv ? argv : empty_argv, &semaphore);
+ new QMetaCallEvent(c->slotObj, sender, signal_index, 0, 0, argv, &semaphore) :
+ new QMetaCallEvent(c->method_offset, c->method_relative, c->callFunction, sender, signal_index, 0, 0, argv, &semaphore);
QCoreApplication::postEvent(receiver, ev);
locker.unlock();
semaphore.acquire();
@@ -3771,7 +3777,7 @@ void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_i
QScopedPointer<QtPrivate::QSlotObjectBase, QSlotObjectBaseDeleter> obj(c->slotObj);
locker.unlock();
Q_TRACE(QMetaObject_activate_begin_slot_functor, obj.data());
- obj->call(receiver, argv ? argv : empty_argv);
+ obj->call(receiver, argv);
Q_TRACE(QMetaObject_activate_end_slot_functor, obj.data());
// Make sure the slot object gets destroyed before the mutex is locked again, as the
@@ -3787,10 +3793,10 @@ void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_i
const auto callFunction = c->callFunction;
locker.unlock();
if (qt_signal_spy_callback_set.slot_begin_callback != 0)
- qt_signal_spy_callback_set.slot_begin_callback(receiver, methodIndex, argv ? argv : empty_argv);
+ qt_signal_spy_callback_set.slot_begin_callback(receiver, methodIndex, argv);
Q_TRACE(QMetaObject_activate_begin_slot, receiver, methodIndex);
- callFunction(receiver, QMetaObject::InvokeMetaMethod, method_relative, argv ? argv : empty_argv);
+ callFunction(receiver, QMetaObject::InvokeMetaMethod, method_relative, argv);
Q_TRACE(QMetaObject_activate_end_slot, receiver, methodIndex);
if (qt_signal_spy_callback_set.slot_end_callback != 0)
@@ -3801,13 +3807,11 @@ void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_i
locker.unlock();
if (qt_signal_spy_callback_set.slot_begin_callback != 0) {
- qt_signal_spy_callback_set.slot_begin_callback(receiver,
- method,
- argv ? argv : empty_argv);
+ qt_signal_spy_callback_set.slot_begin_callback(receiver, method, argv);
}
Q_TRACE(QMetaObject_activate_begin_slot, receiver, method);
- metacall(receiver, QMetaObject::InvokeMetaMethod, method, argv ? argv : empty_argv);
+ metacall(receiver, QMetaObject::InvokeMetaMethod, method, argv);
Q_TRACE(QMetaObject_activate_end_slot, receiver, method);
if (qt_signal_spy_callback_set.slot_end_callback != 0)
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index aac9bcdee9..52c1b8e555 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -176,7 +176,9 @@ public:
}
#ifndef QT_NO_REGEXP
+#if QT_DEPRECATED_SINCE(5, 13)
template<typename T>
+ QT_DEPRECATED_X("Use findChildren(const RegularExpression &, ...) instead.")
inline QList<T> findChildren(const QRegExp &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
{
typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type ObjType;
@@ -186,6 +188,7 @@ public:
return list;
}
#endif
+#endif
#if QT_CONFIG(regularexpression)
template<typename T>
@@ -517,7 +520,10 @@ inline T qobject_cast(const QObject *object)
template <class T> inline const char * qobject_interface_iid()
{ return nullptr; }
-#if !defined(Q_MOC_RUN) && !defined(Q_CLANG_QDOC)
+
+#if defined(Q_CLANG_QDOC)
+# define Q_DECLARE_INTERFACE(IFace, IId)
+#elif !defined(Q_MOC_RUN)
# define Q_DECLARE_INTERFACE(IFace, IId) \
template <> inline const char *qobject_interface_iid<IFace *>() \
{ return IId; } \
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index 5dfef786ec..a762e6f529 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -407,7 +407,7 @@ private:
class QBoolBlocker
{
- Q_DISABLE_COPY(QBoolBlocker)
+ Q_DISABLE_COPY_MOVE(QBoolBlocker)
public:
explicit inline QBoolBlocker(bool &b, bool value=true):block(b), reset(b){block = value;}
inline ~QBoolBlocker(){block = reset; }
@@ -432,9 +432,9 @@ struct Q_CORE_EXPORT QAbstractDynamicMetaObject : public QDynamicMetaObjectData,
{
~QAbstractDynamicMetaObject();
- virtual QAbstractDynamicMetaObject *toDynamicMetaObject(QObject *) override { return this; }
+ QAbstractDynamicMetaObject *toDynamicMetaObject(QObject *) override { return this; }
virtual int createProperty(const char *, const char *) { return -1; }
- virtual int metaCall(QObject *, QMetaObject::Call c, int _id, void **a) override
+ int metaCall(QObject *, QMetaObject::Call c, int _id, void **a) override
{ return metaCall(c, _id, a); }
virtual int metaCall(QMetaObject::Call, int _id, void **) { return _id; } // Compat overload
};
diff --git a/src/corelib/kernel/qobjectdefs_impl.h b/src/corelib/kernel/qobjectdefs_impl.h
index 8afff1fb98..aa6bd84e95 100644
--- a/src/corelib/kernel/qobjectdefs_impl.h
+++ b/src/corelib/kernel/qobjectdefs_impl.h
@@ -395,7 +395,7 @@ namespace QtPrivate {
protected:
~QSlotObjectBase() {}
private:
- Q_DISABLE_COPY(QSlotObjectBase)
+ Q_DISABLE_COPY_MOVE(QSlotObjectBase)
};
// implementation of QSlotObjectBase for which the slot is a pointer to member function of a QObject
diff --git a/src/corelib/kernel/qppsobject_p.h b/src/corelib/kernel/qppsobject_p.h
index abcf00fa05..a3bf3a5bc1 100644
--- a/src/corelib/kernel/qppsobject_p.h
+++ b/src/corelib/kernel/qppsobject_p.h
@@ -119,7 +119,7 @@ Q_SIGNALS:
private:
Q_DECLARE_PRIVATE(QPpsObject)
- Q_DISABLE_COPY(QPpsObject)
+ Q_DISABLE_COPY_MOVE(QPpsObject)
};
QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qsystemerror.cpp b/src/corelib/kernel/qsystemerror.cpp
index 53c3136857..9d0394e4a5 100644
--- a/src/corelib/kernel/qsystemerror.cpp
+++ b/src/corelib/kernel/qsystemerror.cpp
@@ -152,10 +152,7 @@ QString QSystemError::string(ErrorScope errorScope, int errorCode)
case NativeError:
#if defined (Q_OS_WIN)
return windowsErrorString(errorCode);
-#else
- //unix: fall through as native and standard library are the same
- Q_FALLTHROUGH();
-#endif
+#endif // else unix: native and standard library are the same
case StandardLibraryError:
return standardLibraryErrorString(errorCode);
default:
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index 744bbfbff5..dc39490ab0 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -61,14 +61,8 @@
#if defined(Q_OS_UNIX) && !defined(Q_OS_INTEGRITY)
#define QT_USE_MMAP
#include "private/qcore_unix_p.h"
-#endif
-
-// most of the headers below are already included in qplatformdefs.h
-// also this lacks Large File support but that's probably irrelevant
-#if defined(QT_USE_MMAP)
// for mmap
#include <sys/mman.h>
-#include <errno.h>
#endif
#include <stdlib.h>
@@ -302,7 +296,7 @@ public:
bool used_mmap : 1;
#endif
char *unmapPointer; // used memory (mmap, new or resource file)
- quint32 unmapLength;
+ qsizetype unmapLength;
// The resource object in case we loaded the translations from a resource
QResource *resource;
@@ -322,7 +316,7 @@ public:
uint numerusRulesLength;
bool do_load(const QString &filename, const QString &directory);
- bool do_load(const uchar *data, int len, const QString &directory);
+ bool do_load(const uchar *data, qsizetype len, const QString &directory);
QString do_translate(const char *context, const char *sourceText, const char *comment,
int n) const;
void clear();
@@ -553,7 +547,7 @@ bool QTranslatorPrivate::do_load(const QString &realname, const QString &directo
return false;
qint64 fileSize = file.size();
- if (fileSize < MagicLength || quint32(-1) <= fileSize)
+ if (fileSize < MagicLength || fileSize > std::numeric_limits<qsizetype>::max())
return false;
{
@@ -563,7 +557,7 @@ bool QTranslatorPrivate::do_load(const QString &realname, const QString &directo
return false;
}
- d->unmapLength = quint32(fileSize);
+ d->unmapLength = qsizetype(fileSize);
#ifdef QT_USE_MMAP
@@ -571,21 +565,20 @@ bool QTranslatorPrivate::do_load(const QString &realname, const QString &directo
#define MAP_FILE 0
#endif
#ifndef MAP_FAILED
-#define MAP_FAILED -1
+#define MAP_FAILED reinterpret_cast<void *>(-1)
#endif
int fd = file.handle();
if (fd >= 0) {
- char *ptr;
- ptr = reinterpret_cast<char *>(
- mmap(0, d->unmapLength, // any address, whole file
- PROT_READ, // read-only memory
- MAP_FILE | MAP_PRIVATE, // swap-backed map from file
- fd, 0)); // from offset 0 of fd
- if (ptr && ptr != reinterpret_cast<char *>(MAP_FAILED)) {
+ int protection = PROT_READ; // read-only memory
+ int flags = MAP_FILE | MAP_PRIVATE; // swap-backed map from file
+ void *ptr = QT_MMAP(nullptr, d->unmapLength,// any address, whole file
+ protection, flags,
+ fd, 0); // from offset 0 of fd
+ if (ptr != MAP_FAILED) {
file.close();
d->used_mmap = true;
- d->unmapPointer = ptr;
+ d->unmapPointer = static_cast<char *>(ptr);
ok = true;
}
}
@@ -815,7 +808,7 @@ static quint32 read32(const uchar *data)
return qFromBigEndian<quint32>(data);
}
-bool QTranslatorPrivate::do_load(const uchar *data, int len, const QString &directory)
+bool QTranslatorPrivate::do_load(const uchar *data, qsizetype len, const QString &directory)
{
bool ok = true;
const uchar *end = data + len;
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index ff73c27b6e..f95502e75f 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -55,6 +55,8 @@
#if QT_HAS_INCLUDE(<variant>) && __cplusplus >= 201703L
#include <variant>
+#elif defined(Q_CLANG_QDOC)
+namespace std { template<typename...> struct variant; }
#endif
QT_BEGIN_NAMESPACE
@@ -365,7 +367,7 @@ class Q_CORE_EXPORT QVariant
static inline QVariant fromValue(const T &value)
{ return qVariantFromValue(value); }
-#if defined(Q_CLANG_QDOC) || (QT_HAS_INCLUDE(<variant>) && __cplusplus >= 201703L)
+#if QT_HAS_INCLUDE(<variant>) && __cplusplus >= 201703L
template<typename... Types>
static inline QVariant fromStdVariant(const std::variant<Types...> &value)
{
diff --git a/src/corelib/mimetypes/mime/packages/freedesktop.org.xml b/src/corelib/mimetypes/mime/packages/freedesktop.org.xml
index b749fe41ac..d384ffb2d5 100644
--- a/src/corelib/mimetypes/mime/packages/freedesktop.org.xml
+++ b/src/corelib/mimetypes/mime/packages/freedesktop.org.xml
@@ -64,20 +64,32 @@
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-atari-2600-rom">
<comment>Atari 2600</comment>
+ <comment xml:lang="ast">Atari 2600</comment>
<comment xml:lang="ca">Atari 2600</comment>
+ <comment xml:lang="cs">Atari 2600</comment>
<comment xml:lang="da">Atari 2600</comment>
<comment xml:lang="de">Atari 2600</comment>
+ <comment xml:lang="en_GB">Atari 2600</comment>
<comment xml:lang="es">Atari 2600</comment>
+ <comment xml:lang="eu">Atari 2600</comment>
<comment xml:lang="fi">Atari 2600</comment>
<comment xml:lang="fr">Atari 2600</comment>
+ <comment xml:lang="ga">Atari 2600</comment>
<comment xml:lang="he">אטארי 2600</comment>
+ <comment xml:lang="hr">Atari 2600</comment>
<comment xml:lang="hu">Atari 2600</comment>
+ <comment xml:lang="id">Atari 2600</comment>
+ <comment xml:lang="it">Atari 2600</comment>
<comment xml:lang="kk">Atari 2600</comment>
<comment xml:lang="ko">Atari 2600</comment>
+ <comment xml:lang="oc">Atari 2600</comment>
<comment xml:lang="pl">Atari 2600</comment>
<comment xml:lang="pt_BR">Atari 2600</comment>
<comment xml:lang="ru">Atari 2600</comment>
<comment xml:lang="sk">Atari 2600</comment>
+ <comment xml:lang="sr">Атари 2600</comment>
+ <comment xml:lang="sv">Atari 2600</comment>
+ <comment xml:lang="tr">Atari 2600</comment>
<comment xml:lang="uk">Atari 2600</comment>
<comment xml:lang="zh_CN">雅达利 2600</comment>
<comment xml:lang="zh_TW">Atari 2600</comment>
@@ -86,20 +98,32 @@
</mime-type>
<mime-type type="application/x-atari-7800-rom">
<comment>Atari 7800</comment>
+ <comment xml:lang="ast">Atari 7800</comment>
<comment xml:lang="ca">Atari 7800</comment>
+ <comment xml:lang="cs">Atari 7800</comment>
<comment xml:lang="da">Atari 7800</comment>
<comment xml:lang="de">Atari 7800</comment>
+ <comment xml:lang="en_GB">Atari 7800</comment>
<comment xml:lang="es">Atari 7800</comment>
+ <comment xml:lang="eu">Atari 7800</comment>
<comment xml:lang="fi">Atari 7800</comment>
<comment xml:lang="fr">Atari 7800</comment>
+ <comment xml:lang="ga">Atari 7800</comment>
<comment xml:lang="he">אטארי 7800</comment>
+ <comment xml:lang="hr">Atari 7800</comment>
<comment xml:lang="hu">Atari 7800</comment>
+ <comment xml:lang="id">Atari 7800</comment>
+ <comment xml:lang="it">Atari 7800</comment>
<comment xml:lang="kk">Atari 7800</comment>
<comment xml:lang="ko">Atari 7800</comment>
+ <comment xml:lang="oc">Atari 7800</comment>
<comment xml:lang="pl">Atari 7800</comment>
<comment xml:lang="pt_BR">Atari 7800</comment>
<comment xml:lang="ru">Atari 7800</comment>
<comment xml:lang="sk">Atari 7800</comment>
+ <comment xml:lang="sr">Атари 7800</comment>
+ <comment xml:lang="sv">Atari 7800</comment>
+ <comment xml:lang="tr">Atari 7800</comment>
<comment xml:lang="uk">Atari 7800</comment>
<comment xml:lang="zh_CN">雅达利 7800</comment>
<comment xml:lang="zh_TW">Atari 7800</comment>
@@ -109,6 +133,35 @@
<match value="ATARI7800" type="string" offset="1"/>
</magic>
</mime-type>
+ <mime-type type="application/x-atari-lynx-rom">
+ <comment>Atari Lynx</comment>
+ <comment xml:lang="ast">Atari Lynx</comment>
+ <comment xml:lang="ca">Atari Lynx</comment>
+ <comment xml:lang="cs">Atari Lynx</comment>
+ <comment xml:lang="de">Atari Lynx</comment>
+ <comment xml:lang="en_GB">Atari Lynx</comment>
+ <comment xml:lang="es">Atari Lynx</comment>
+ <comment xml:lang="fi">Atari Lynx</comment>
+ <comment xml:lang="hr">Atari Lynx</comment>
+ <comment xml:lang="hu">Atari Lynx</comment>
+ <comment xml:lang="id">Atari Lynx</comment>
+ <comment xml:lang="it">Atari Lynx</comment>
+ <comment xml:lang="kk">Atari Lynx</comment>
+ <comment xml:lang="ko">Atari Lynx</comment>
+ <comment xml:lang="pl">Atari Lynx</comment>
+ <comment xml:lang="pt_BR">Atari Lynx</comment>
+ <comment xml:lang="ru">Atari Lynx</comment>
+ <comment xml:lang="sk">Atari Lynx</comment>
+ <comment xml:lang="sv">Atari Lynx</comment>
+ <comment xml:lang="uk">Atari Lynx</comment>
+ <comment xml:lang="zh_CN">雅达利 Lynx</comment>
+ <comment xml:lang="zh_TW">Atari Lynx</comment>
+ <generic-icon name="application-x-executable"/>
+ <glob pattern="*.lnx"/>
+ <magic>
+ <match value="LYNX" type="string" offset="0"/>
+ </magic>
+ </mime-type>
<mime-type type="application/andrew-inset">
<comment>ATK inset</comment>
<comment xml:lang="ar">شكل ATK</comment>
@@ -146,7 +199,7 @@
<comment xml:lang="pt">Suplemento ATK</comment>
<comment xml:lang="pt_BR">Conjunto de entrada do ATK</comment>
<comment xml:lang="ro">Inset ATK</comment>
- <comment xml:lang="ru">вкладка ATK</comment>
+ <comment xml:lang="ru">Вкладка ATK</comment>
<comment xml:lang="sk">Vložka ATK</comment>
<comment xml:lang="sl">Vložka ATK</comment>
<comment xml:lang="sq">Inset ATK</comment>
@@ -165,6 +218,7 @@
<mime-type type="application/epub+zip">
<comment>electronic book document</comment>
<comment xml:lang="ar">مستند كتاب إلكتروني</comment>
+ <comment xml:lang="ast">documentu de llibru electrónicu</comment>
<comment xml:lang="be@latin">elektronnaja kniha</comment>
<comment xml:lang="bg">Документ — електронна книга</comment>
<comment xml:lang="ca">document de llibre electrònic</comment>
@@ -181,7 +235,7 @@
<comment xml:lang="ga">leabhar leictreonach</comment>
<comment xml:lang="gl">documento de libro electrónico</comment>
<comment xml:lang="he">מסמך מסוג ספר אלקטרוני</comment>
- <comment xml:lang="hr">dokument elektroničke knjige</comment>
+ <comment xml:lang="hr">Dokument elektroničke knjige</comment>
<comment xml:lang="hu">elektronikus könyvdokumentum</comment>
<comment xml:lang="ia">Documento de libro electronic</comment>
<comment xml:lang="id">dokumen buku elektronik</comment>
@@ -198,7 +252,7 @@
<comment xml:lang="pt">documento de livro eletrónico</comment>
<comment xml:lang="pt_BR">Documento de livro eletrônico</comment>
<comment xml:lang="ro">document carte electronică</comment>
- <comment xml:lang="ru">электронная книга</comment>
+ <comment xml:lang="ru">Электронная книга</comment>
<comment xml:lang="sk">Dokument elektronickej knihy</comment>
<comment xml:lang="sl">dokument elektronske knjige</comment>
<comment xml:lang="sq">Dokument libri elektronik</comment>
@@ -224,6 +278,7 @@
<mime-type type="application/illustrator">
<comment>Adobe Illustrator document</comment>
<comment xml:lang="ar">مستند أدوبي المصور</comment>
+ <comment xml:lang="ast">Documentu d'Adobe Illustrator</comment>
<comment xml:lang="be@latin">Dakument Adobe Illustrator</comment>
<comment xml:lang="bg">Документ — Adobe Illustrator</comment>
<comment xml:lang="ca">document d'Adobe Illustrator</comment>
@@ -244,7 +299,7 @@
<comment xml:lang="hr">Adobe Illustrator dokument</comment>
<comment xml:lang="hu">Adobe Illustrator-dokumentum</comment>
<comment xml:lang="ia">Documento Adobe Illustrator</comment>
- <comment xml:lang="id">Dokumen Adobe Illustrator</comment>
+ <comment xml:lang="id">dokumen Adobe Illustrator</comment>
<comment xml:lang="it">Documento Adobe Illustrator</comment>
<comment xml:lang="ja">Adobe Illustrator ドキュメント</comment>
<comment xml:lang="ka">Adobe Illustrator-ის დოკუმენტი</comment>
@@ -261,11 +316,11 @@
<comment xml:lang="pt">documento Adobe Illustrator</comment>
<comment xml:lang="pt_BR">Documento do Adobe Illustrator</comment>
<comment xml:lang="ro">Document Adobe Illustrator</comment>
- <comment xml:lang="ru">документ Adobe Illustrator</comment>
+ <comment xml:lang="ru">Документ Adobe Illustrator</comment>
<comment xml:lang="sk">Dokument Adobe Illustrator</comment>
<comment xml:lang="sl">Dokument Adobe Illustrator</comment>
<comment xml:lang="sq">Dokument Adobe Illustrator</comment>
- <comment xml:lang="sr">документ Адобе Илустратора</comment>
+ <comment xml:lang="sr">документ Адобе илустратора</comment>
<comment xml:lang="sv">Adobe Illustrator-dokument</comment>
<comment xml:lang="tr">Adobe Illustrator belgesi</comment>
<comment xml:lang="uk">документ Adobe Illustrator</comment>
@@ -274,10 +329,12 @@
<comment xml:lang="zh_TW">Adobe Illustrator 文件</comment>
<generic-icon name="image-x-generic"/>
<glob pattern="*.ai"/>
+ <alias type="application/vnd.adobe.illustrator"/>
</mime-type>
<mime-type type="application/mac-binhex40">
<comment>Macintosh BinHex-encoded file</comment>
<comment xml:lang="ar">ملف Macintosh BinHex مشفر</comment>
+ <comment xml:lang="ast">Ficheru codificáu en BinHex de Machintosh</comment>
<comment xml:lang="az">Macintosh BinHex-kodlanmış fayl</comment>
<comment xml:lang="be@latin">Fajł Macintosh, BinHex-zakadavany</comment>
<comment xml:lang="bg">Файл — кодиран във формат BinHex за Macintosh</comment>
@@ -297,10 +354,10 @@
<comment xml:lang="ga">comhad ionchódaithe le Macintosh BinHex</comment>
<comment xml:lang="gl">ficheiro de Macintosh codificado con BinHex</comment>
<comment xml:lang="he">קובץ בקידוד Macintosh BinHex</comment>
- <comment xml:lang="hr">Macintosh BinHex-kodirana datoteka</comment>
+ <comment xml:lang="hr">Macintosh BinHex-kôdirana datoteka</comment>
<comment xml:lang="hu">Macintosh BinHex kódolású fájl</comment>
<comment xml:lang="ia">File codificate in BinHex de Macintosh</comment>
- <comment xml:lang="id">Berkas tersandi Macintosh BinHex</comment>
+ <comment xml:lang="id">berkas tersandi Macintosh BinHex</comment>
<comment xml:lang="it">File Macintosh codificato BinHex</comment>
<comment xml:lang="ja">Macintosh BinHex エンコードファイル</comment>
<comment xml:lang="kk">Macintosh BinHex кодталған файлы</comment>
@@ -316,7 +373,7 @@
<comment xml:lang="pt">ficheiro codificado em BinHex de Macintosh</comment>
<comment xml:lang="pt_BR">Arquivo do Macintosh codificado com BinHex</comment>
<comment xml:lang="ro">Fișier codat Macintosh BinHex</comment>
- <comment xml:lang="ru">файл (закодированный Macintosh BinHex)</comment>
+ <comment xml:lang="ru">Файл (закодированный Macintosh BinHex)</comment>
<comment xml:lang="sk">Súbor kódovaný pomocou Macintosh BinHex</comment>
<comment xml:lang="sl">Kodirana datoteka Macintosh (BinHex)</comment>
<comment xml:lang="sq">File Macintosh i kodifikuar BinHex</comment>
@@ -393,6 +450,7 @@
<mime-type type="application/mathml+xml">
<comment>MathML document</comment>
<comment xml:lang="ar">مستند MathML</comment>
+ <comment xml:lang="ast">Documentu MathML</comment>
<comment xml:lang="az">MathML sənədi</comment>
<comment xml:lang="be@latin">Dakument MathML</comment>
<comment xml:lang="bg">Документ — MathML</comment>
@@ -415,7 +473,7 @@
<comment xml:lang="hr">MathML dokument</comment>
<comment xml:lang="hu">MathML-dokumentum</comment>
<comment xml:lang="ia">Documento MathML</comment>
- <comment xml:lang="id">Dokumen MathML</comment>
+ <comment xml:lang="id">dokumen MathML</comment>
<comment xml:lang="it">Documento MathML</comment>
<comment xml:lang="ja">MathML ドキュメント</comment>
<comment xml:lang="ka">MathML-ის დოკუმენტი</comment>
@@ -432,7 +490,7 @@
<comment xml:lang="pt">documento MathML</comment>
<comment xml:lang="pt_BR">Documento do MathML</comment>
<comment xml:lang="ro">Document MathML</comment>
- <comment xml:lang="ru">документ MathML</comment>
+ <comment xml:lang="ru">Документ MathML</comment>
<comment xml:lang="sk">Dokument MathML</comment>
<comment xml:lang="sl">Dokument MathML</comment>
<comment xml:lang="sq">Dokument MathML</comment>
@@ -469,7 +527,7 @@
<comment xml:lang="ga">comhad bhosca poist</comment>
<comment xml:lang="gl">ficheiro de caixa de correo</comment>
<comment xml:lang="he">קובץ תיבת-דואר</comment>
- <comment xml:lang="hr">datoteka poštanskog sandučića</comment>
+ <comment xml:lang="hr">Datoteka poštanskog sandučića</comment>
<comment xml:lang="hu">mailbox fájl</comment>
<comment xml:lang="ia">File de cassa postal</comment>
<comment xml:lang="id">berkas kotak surat</comment>
@@ -487,7 +545,7 @@
<comment xml:lang="pt">ficheiro de caixa de correio</comment>
<comment xml:lang="pt_BR">Arquivo de caixa de correio</comment>
<comment xml:lang="ro">fișier căsuță poștală</comment>
- <comment xml:lang="ru">файл почтового ящика</comment>
+ <comment xml:lang="ru">Файл почтового ящика</comment>
<comment xml:lang="sk">Súbor mailbox</comment>
<comment xml:lang="sl">datoteka poštnega predala</comment>
<comment xml:lang="sq">File mailbox</comment>
@@ -496,7 +554,7 @@
<comment xml:lang="tr">posta kutusu dosyası</comment>
<comment xml:lang="uk">файл поштової скриньки</comment>
<comment xml:lang="vi">tập tin hộp thư</comment>
- <comment xml:lang="zh_CN">mailbox 文件</comment>
+ <comment xml:lang="zh_CN">邮箱文件</comment>
<comment xml:lang="zh_TW">郵箱檔</comment>
<generic-icon name="text-x-generic"/>
<sub-class-of type="text/plain"/>
@@ -508,6 +566,7 @@
<mime-type type="application/metalink+xml">
<comment>Metalink file</comment>
<comment xml:lang="ar">ملف ميتالنك</comment>
+ <comment xml:lang="ast">Ficheru d'enllaz meta</comment>
<comment xml:lang="bg">Изтегляне — Metalink</comment>
<comment xml:lang="ca">fitxer Metalink</comment>
<comment xml:lang="cs">soubor metalink</comment>
@@ -527,7 +586,7 @@
<comment xml:lang="hr">Datoteka meta poveznice</comment>
<comment xml:lang="hu">Metalink fájl</comment>
<comment xml:lang="ia">File Metalink</comment>
- <comment xml:lang="id">Berkas Metalink</comment>
+ <comment xml:lang="id">berkas Metalink</comment>
<comment xml:lang="it">File Metalink</comment>
<comment xml:lang="ja">Metalink ファイル</comment>
<comment xml:lang="kk">Metalink файлы</comment>
@@ -540,14 +599,14 @@
<comment xml:lang="pt">ficheiro Metalink</comment>
<comment xml:lang="pt_BR">Arquivo Metalink</comment>
<comment xml:lang="ro">Fișier Metalink</comment>
- <comment xml:lang="ru">файл Metalink</comment>
+ <comment xml:lang="ru">Файл Metalink</comment>
<comment xml:lang="sk">Súbor Metalink</comment>
<comment xml:lang="sl">Datoteka povezave Metalink</comment>
<comment xml:lang="sr">датотека метавезе</comment>
<comment xml:lang="sv">Metalink-fil</comment>
<comment xml:lang="tr">Metalink dosyası</comment>
<comment xml:lang="uk">файл метапосилання</comment>
- <comment xml:lang="zh_CN">元链接文件</comment>
+ <comment xml:lang="zh_CN">Metalink 文件</comment>
<comment xml:lang="zh_TW">Metalink 檔案</comment>
<sub-class-of type="application/xml"/>
<magic priority="50">
@@ -559,6 +618,7 @@
<mime-type type="application/metalink4+xml">
<comment>Metalink file</comment>
<comment xml:lang="ar">ملف ميتالنك</comment>
+ <comment xml:lang="ast">Ficheru d'enllaz meta</comment>
<comment xml:lang="bg">Изтегляне — Metalink</comment>
<comment xml:lang="ca">fitxer Metalink</comment>
<comment xml:lang="cs">soubor metalink</comment>
@@ -578,7 +638,7 @@
<comment xml:lang="hr">Datoteka meta poveznice</comment>
<comment xml:lang="hu">Metalink fájl</comment>
<comment xml:lang="ia">File Metalink</comment>
- <comment xml:lang="id">Berkas Metalink</comment>
+ <comment xml:lang="id">berkas Metalink</comment>
<comment xml:lang="it">File Metalink</comment>
<comment xml:lang="ja">Metalink ファイル</comment>
<comment xml:lang="kk">Metalink файлы</comment>
@@ -591,14 +651,14 @@
<comment xml:lang="pt">ficheiro Metalink</comment>
<comment xml:lang="pt_BR">Arquivo Metalink</comment>
<comment xml:lang="ro">Fișier Metalink</comment>
- <comment xml:lang="ru">файл Metalink</comment>
+ <comment xml:lang="ru">Файл Metalink</comment>
<comment xml:lang="sk">Súbor Metalink</comment>
<comment xml:lang="sl">Datoteka povezave Metalink</comment>
<comment xml:lang="sr">датотека метавезе</comment>
<comment xml:lang="sv">Metalink-fil</comment>
<comment xml:lang="tr">Metalink dosyası</comment>
<comment xml:lang="uk">файл метапосилання</comment>
- <comment xml:lang="zh_CN">元链接文件</comment>
+ <comment xml:lang="zh_CN">Metalink 文件</comment>
<comment xml:lang="zh_TW">Metalink 檔案</comment>
<sub-class-of type="application/xml"/>
<magic priority="50">
@@ -610,12 +670,13 @@
<mime-type type="application/octet-stream">
<comment>unknown</comment>
<comment xml:lang="ar">مجهول</comment>
+ <comment xml:lang="ast">desconozse</comment>
<comment xml:lang="be@latin">nieviadomy</comment>
<comment xml:lang="bg">Неизвестен тип</comment>
<comment xml:lang="ca">desconegut</comment>
<comment xml:lang="cs">neznámý</comment>
<comment xml:lang="da">ukendt</comment>
- <comment xml:lang="de">Unbekannt</comment>
+ <comment xml:lang="de">unbekannt</comment>
<comment xml:lang="el">Άγνωστο</comment>
<comment xml:lang="en_GB">unknown</comment>
<comment xml:lang="eo">nekonate</comment>
@@ -627,7 +688,7 @@
<comment xml:lang="ga">anaithnid</comment>
<comment xml:lang="gl">descoñecido</comment>
<comment xml:lang="he">לא ידוע</comment>
- <comment xml:lang="hr">nepoznato</comment>
+ <comment xml:lang="hr">Nepoznato</comment>
<comment xml:lang="hu">ismeretlen</comment>
<comment xml:lang="ia">incognite</comment>
<comment xml:lang="id">tak diketahui</comment>
@@ -647,7 +708,7 @@
<comment xml:lang="pt">desconhecido</comment>
<comment xml:lang="pt_BR">Desconhecido</comment>
<comment xml:lang="ro">necunoscut</comment>
- <comment xml:lang="ru">неизвестно</comment>
+ <comment xml:lang="ru">Неизвестно</comment>
<comment xml:lang="sk">Neznámy</comment>
<comment xml:lang="sl">neznano</comment>
<comment xml:lang="sq">Nuk njihet</comment>
@@ -658,10 +719,10 @@
<comment xml:lang="vi">không rõ</comment>
<comment xml:lang="zh_CN">未知</comment>
<comment xml:lang="zh_TW">不明</comment>
- <glob pattern="*.bin"/>
</mime-type>
<mime-type type="application/x-partial-download">
<comment>Partially downloaded file</comment>
+ <comment xml:lang="ast">Ficheru baxáu parcialmente</comment>
<comment xml:lang="ca">fitxer baixat parcialment</comment>
<comment xml:lang="cs">částečně stažený soubor</comment>
<comment xml:lang="da">Delvist hentet fil</comment>
@@ -672,6 +733,7 @@
<comment xml:lang="eu">Partzialki deskargatutako fitxategia</comment>
<comment xml:lang="fi">Osittain ladattu tiedosto</comment>
<comment xml:lang="fr">fichier partiellement téléchargé</comment>
+ <comment xml:lang="ga">Comhad leath-íoslódáilte</comment>
<comment xml:lang="gl">Ficheiro descargado parcialmente</comment>
<comment xml:lang="he">קובץ שהתקבל חלקית</comment>
<comment xml:lang="hr">Djelomično preuzeta datoteka</comment>
@@ -692,7 +754,7 @@
<comment xml:lang="sv">Delvis hämtad fil</comment>
<comment xml:lang="tr">Kısmen indirilmiş dosya</comment>
<comment xml:lang="uk">частково отриманий файл</comment>
- <comment xml:lang="zh_CN">下载的部分文件</comment>
+ <comment xml:lang="zh_CN">部分下载的文件</comment>
<comment xml:lang="zh_TW">已部份下載的檔案</comment>
<generic-icon name="package-x-generic"/>
<glob pattern="*.wkdownload"/>
@@ -702,6 +764,7 @@
<mime-type type="application/oda">
<comment>ODA document</comment>
<comment xml:lang="ar">مستند ODA</comment>
+ <comment xml:lang="ast">Documentu ODA</comment>
<comment xml:lang="az">ODA sənədi</comment>
<comment xml:lang="be@latin">Dakument ODA</comment>
<comment xml:lang="bg">Документ — ODA</comment>
@@ -741,7 +804,7 @@
<comment xml:lang="pt">documento ODA</comment>
<comment xml:lang="pt_BR">Documento ODA</comment>
<comment xml:lang="ro">Document ODA</comment>
- <comment xml:lang="ru">документ ODA</comment>
+ <comment xml:lang="ru">Документ ODA</comment>
<comment xml:lang="sk">Dokument ODA</comment>
<comment xml:lang="sl">Dokument ODA</comment>
<comment xml:lang="sq">Dokument ODA</comment>
@@ -759,6 +822,7 @@
</mime-type>
<mime-type type="application/x-wwf">
<comment>WWF document</comment>
+ <comment xml:lang="ast">Documentu WWF</comment>
<comment xml:lang="bg">Документ — WWF</comment>
<comment xml:lang="ca">document WWF</comment>
<comment xml:lang="cs">dokument WWF</comment>
@@ -771,6 +835,7 @@
<comment xml:lang="eu">WWF dokumentua</comment>
<comment xml:lang="fi">WWF-asiakirja</comment>
<comment xml:lang="fr">document WWF</comment>
+ <comment xml:lang="ga">cáipéis WWF</comment>
<comment xml:lang="gl">documento de WWF</comment>
<comment xml:lang="he">מסמך WWF</comment>
<comment xml:lang="hr">WWF dokument</comment>
@@ -788,7 +853,7 @@
<comment xml:lang="pl">Dokument WWF</comment>
<comment xml:lang="pt">documento WWF</comment>
<comment xml:lang="pt_BR">Documento WWF</comment>
- <comment xml:lang="ru">документ WWF</comment>
+ <comment xml:lang="ru">Документ WWF</comment>
<comment xml:lang="sk">Dokument WWF</comment>
<comment xml:lang="sl">Dokument WWF</comment>
<comment xml:lang="sr">ВВФ документ</comment>
@@ -805,6 +870,7 @@
<mime-type type="application/pdf">
<comment>PDF document</comment>
<comment xml:lang="ar">مستند PDF</comment>
+ <comment xml:lang="ast">Documentu PDF</comment>
<comment xml:lang="be@latin">Dakument PDF</comment>
<comment xml:lang="bg">Документ — PDF</comment>
<comment xml:lang="ca">document PDF</comment>
@@ -842,7 +908,7 @@
<comment xml:lang="pt">documento PDF</comment>
<comment xml:lang="pt_BR">Documento PDF</comment>
<comment xml:lang="ro">Document PDF</comment>
- <comment xml:lang="ru">документ PDF</comment>
+ <comment xml:lang="ru">Документ PDF</comment>
<comment xml:lang="sk">Dokument PDF</comment>
<comment xml:lang="sl">Dokument PDF</comment>
<comment xml:lang="sq">Dokument PDF</comment>
@@ -868,6 +934,7 @@
<mime-type type="application/xspf+xml">
<comment>XSPF playlist</comment>
<comment xml:lang="ar">قائمة تشغيل XSPF</comment>
+ <comment xml:lang="ast">Llista de reproducción XSPF</comment>
<comment xml:lang="be@latin">Śpis piesień XSPF</comment>
<comment xml:lang="bg">Списък за изпълнение — XSPF</comment>
<comment xml:lang="ca">llista de reproducció XSPF</comment>
@@ -885,7 +952,7 @@
<comment xml:lang="ga">seinmliosta XSPF</comment>
<comment xml:lang="gl">lista de reprodución XSPF</comment>
<comment xml:lang="he">רשימת נגינה XSPF</comment>
- <comment xml:lang="hr">XSPF popis za reprodukciju</comment>
+ <comment xml:lang="hr">XSPF popis izvođenja</comment>
<comment xml:lang="hu">XSPF-lejátszólista</comment>
<comment xml:lang="ia">Lista de selection XSPF</comment>
<comment xml:lang="id">Senarai pular XSPF</comment>
@@ -903,7 +970,7 @@
<comment xml:lang="pt">lista de reprodução XSPF</comment>
<comment xml:lang="pt_BR">Lista de reprodução XSPF</comment>
<comment xml:lang="ro">Listă XSPF</comment>
- <comment xml:lang="ru">список воспроизведения XSPF</comment>
+ <comment xml:lang="ru">Список воспроизведения XSPF</comment>
<comment xml:lang="sk">Zoznam skladieb XSPF</comment>
<comment xml:lang="sl">Seznam predvajanja XSPF</comment>
<comment xml:lang="sq">Listë titujsh XSPF</comment>
@@ -929,11 +996,12 @@
<mime-type type="application/x-windows-themepack">
<comment>Microsoft Windows theme pack</comment>
<comment xml:lang="ar">حزمة سمات Microsoft Works</comment>
+ <comment xml:lang="ast">Paquete de temes de Microsoft Windows</comment>
<comment xml:lang="bg">Пакет с тема — Microsoft Windows</comment>
<comment xml:lang="ca">paquet de temes de Microsoft Windows</comment>
<comment xml:lang="cs">balík motivů Microsoft Windows</comment>
<comment xml:lang="da">Microsoft Windows-temapakke</comment>
- <comment xml:lang="de">Themenpaket für Microsoft Windows</comment>
+ <comment xml:lang="de">Microsoft-Windows-Themenpaket</comment>
<comment xml:lang="el">Πακέτο θέματος Microsoft Windows</comment>
<comment xml:lang="en_GB">Microsoft Windows theme pack</comment>
<comment xml:lang="es">paquete de tema para Microsoft Windows</comment>
@@ -961,7 +1029,7 @@
<comment xml:lang="pt">pacote de tema Microsoft Windows</comment>
<comment xml:lang="pt_BR">Pacote de temas do Microsoft Windows</comment>
<comment xml:lang="ro">Pachet de teme Microsoft Windows</comment>
- <comment xml:lang="ru">пакет темы Microsoft Windows</comment>
+ <comment xml:lang="ru">Пакет темы Microsoft Windows</comment>
<comment xml:lang="sk">Balík tém Microsoft Windows</comment>
<comment xml:lang="sl">Datoteka teme Microsoft Windows</comment>
<comment xml:lang="sr">пакет теме Мајкрософт Виндоуза</comment>
@@ -976,6 +1044,7 @@
</mime-type>
<mime-type type="audio/x-amzxml">
<comment>AmazonMP3 download file</comment>
+ <comment xml:lang="ast">Ficheru de descarga AmazonMP3</comment>
<comment xml:lang="ca">fitxer baixat d'AmazonMP3</comment>
<comment xml:lang="cs">soubor stahování AmazonMP3</comment>
<comment xml:lang="da">AmazonMP3-downloadfil</comment>
@@ -985,6 +1054,7 @@
<comment xml:lang="es">archivo de descarga de AmazonMP3</comment>
<comment xml:lang="eu">AmazonMP3 deskarga fitxategia</comment>
<comment xml:lang="fr">fichier téléchargé AmazonMP3</comment>
+ <comment xml:lang="ga">comhad íoslódáilte AmazonMP3</comment>
<comment xml:lang="gl">Ficheiro de descarga de AmazonMP3</comment>
<comment xml:lang="he">קובץ הורדת AmazonMP3</comment>
<comment xml:lang="hr">AmazonMP3 preuzeta datoteka</comment>
@@ -1000,7 +1070,7 @@
<comment xml:lang="pl">Pobrany plik AmazonMP3</comment>
<comment xml:lang="pt">ficheiro transferido AmazonMP3</comment>
<comment xml:lang="pt_BR">Arquivo de download AmazonMP3</comment>
- <comment xml:lang="ru">файл загрузки AmazonMP3</comment>
+ <comment xml:lang="ru">Файл загрузки AmazonMP3</comment>
<comment xml:lang="sk">Stiahnutý súbor AmazonMP3 </comment>
<comment xml:lang="sl">Datoteka prenosa AmazonMP3</comment>
<comment xml:lang="sr">датотека преузимања АмазонаМП3</comment>
@@ -1014,6 +1084,7 @@
<mime-type type="audio/x-gsm">
<comment>GSM 06.10 audio</comment>
<comment xml:lang="ar">GSM 06.10 سمعي</comment>
+ <comment xml:lang="ast">Audiu GSM 6.10</comment>
<comment xml:lang="bg">Аудио — GSM 06.10</comment>
<comment xml:lang="ca">àudio de GSM 06.10</comment>
<comment xml:lang="cs">zvuk GSM 06.10</comment>
@@ -1029,7 +1100,7 @@
<comment xml:lang="ga">fuaim GSM 06.10</comment>
<comment xml:lang="gl">son de GSM 06.10</comment>
<comment xml:lang="he">שמע GSM 06.10</comment>
- <comment xml:lang="hr">GSM 06.10 audio</comment>
+ <comment xml:lang="hr">GSM 06.10 zvučni zapis</comment>
<comment xml:lang="hu">GSM 06.10 hang</comment>
<comment xml:lang="ia">Audio GSM 06.10</comment>
<comment xml:lang="id">Audio GSM 06.10</comment>
@@ -1046,7 +1117,7 @@
<comment xml:lang="pt">áudio GSM 06.10</comment>
<comment xml:lang="pt_BR">Áudio GSM 06.10</comment>
<comment xml:lang="ro">GSM 06.10 audio</comment>
- <comment xml:lang="ru">аудио GSM 06.10</comment>
+ <comment xml:lang="ru">Аудио GSM 06.10</comment>
<comment xml:lang="sk">Zvuk GSM 06.10</comment>
<comment xml:lang="sl">Zvočna datoteka GSM 06.10</comment>
<comment xml:lang="sr">ГСМ 06.10 звук</comment>
@@ -1063,6 +1134,7 @@
<mime-type type="audio/x-iriver-pla">
<comment>iRiver Playlist</comment>
<comment xml:lang="ar">قائمة تشغيل iRiver</comment>
+ <comment xml:lang="ast">Llista de reproducción iRiver</comment>
<comment xml:lang="be@latin">Śpis piesień iRiver</comment>
<comment xml:lang="bg">Списък за изпълнение — iRiver</comment>
<comment xml:lang="ca">llista de reproducció iRiver</comment>
@@ -1080,7 +1152,7 @@
<comment xml:lang="ga">seinmliosta iRiver</comment>
<comment xml:lang="gl">lista de reprodución de iRiver</comment>
<comment xml:lang="he">רשימת נגינה של iRiver</comment>
- <comment xml:lang="hr">iRiver popis za reprodukciju</comment>
+ <comment xml:lang="hr">iRiver popis izvođenja</comment>
<comment xml:lang="hu">iRiver lejátszólista</comment>
<comment xml:lang="ia">Lista de selection iRiver</comment>
<comment xml:lang="id">iRiver Playlist</comment>
@@ -1098,7 +1170,7 @@
<comment xml:lang="pt">lista de reprodução iRiver</comment>
<comment xml:lang="pt_BR">Lista de reprodução do iRiver</comment>
<comment xml:lang="ro">Listă iRiver</comment>
- <comment xml:lang="ru">список воспроизведения iRiver</comment>
+ <comment xml:lang="ru">Список воспроизведения iRiver</comment>
<comment xml:lang="sk">Zoznam skladieb iRiver</comment>
<comment xml:lang="sl">Seznam predvajanja iRiver</comment>
<comment xml:lang="sq">Listë titujsh iRiver</comment>
@@ -1117,6 +1189,7 @@
<mime-type type="application/pgp-encrypted">
<comment>PGP/MIME-encrypted message header</comment>
<comment xml:lang="ar">ترويسة رسالة PGP/MIME-مشفرة</comment>
+ <comment xml:lang="ast">Testera de mensaxe cifrada en PGP/MIME</comment>
<comment xml:lang="be@latin">Zahałovak paviedamleńnia, zašyfravany ŭ PGP/MIME</comment>
<comment xml:lang="bg">Заглавна част на шифрирано съобщение — PGP/MIME</comment>
<comment xml:lang="ca">capçalera de missatge amb xifrat PGP/MIME</comment>
@@ -1153,7 +1226,7 @@
<comment xml:lang="pt">cabeçalho de mensagem encriptada com PGP/MIME</comment>
<comment xml:lang="pt_BR">Cabeçalho de mensagem criptografada PGP/MIME</comment>
<comment xml:lang="ro">Antet de mesaj encriptat PGP/MIME</comment>
- <comment xml:lang="ru">заголовок сообщения, зашифрованный PGP/MIME</comment>
+ <comment xml:lang="ru">Заголовок сообщения, зашифрованный PGP/MIME</comment>
<comment xml:lang="sk">Hlavičke správy zašifrovaná pomocou PGP/MIME</comment>
<comment xml:lang="sl">Datoteka glave šifriranega sporočila PGP/MIME</comment>
<comment xml:lang="sq">Header mesazhi të kriptuar PGP/MIME</comment>
@@ -1177,6 +1250,7 @@
<mime-type type="application/pgp-keys">
<comment>PGP keys</comment>
<comment xml:lang="ar">مفاتيح PGP</comment>
+ <comment xml:lang="ast">Claves PGP</comment>
<comment xml:lang="az">PGP açarları</comment>
<comment xml:lang="be@latin">Klučy PGP</comment>
<comment xml:lang="bg">Ключове — PGP</comment>
@@ -1215,7 +1289,7 @@
<comment xml:lang="pt">chaves PGP</comment>
<comment xml:lang="pt_BR">Chaves PGP</comment>
<comment xml:lang="ro">Chei PGP</comment>
- <comment xml:lang="ru">ключи PGP</comment>
+ <comment xml:lang="ru">Ключи PGP</comment>
<comment xml:lang="sk">Kľúče PGP</comment>
<comment xml:lang="sl">Datoteka ključa PGP</comment>
<comment xml:lang="sq">Kyçe PGP</comment>
@@ -1252,7 +1326,7 @@
<comment xml:lang="ca">signatura OpenPGP abstreta</comment>
<comment xml:lang="cs">oddělený podpis OpenPGP</comment>
<comment xml:lang="da">frigjort OpenPGP-signatur</comment>
- <comment xml:lang="de">Isolierte OpenPGP-Signatur</comment>
+ <comment xml:lang="de">isolierte OpenPGP-Signatur</comment>
<comment xml:lang="el">Αποκομμένη υπογραφή OpenPGP</comment>
<comment xml:lang="en_GB">detached OpenPGP signature</comment>
<comment xml:lang="eo">dekroĉa OpenPGP-subskribo</comment>
@@ -1264,7 +1338,7 @@
<comment xml:lang="ga">síniú OpenPGP scartha</comment>
<comment xml:lang="gl">sinatura de OpenPGP independente</comment>
<comment xml:lang="he">חתימת OpenPGP מנותקת</comment>
- <comment xml:lang="hr">odvojen OpenPGP potpis</comment>
+ <comment xml:lang="hr">Odvojen OpenPGP potpis</comment>
<comment xml:lang="hu">leválasztott OpenPGP-aláírás</comment>
<comment xml:lang="ia">Signatura OpenPGP distachate</comment>
<comment xml:lang="id">tanda tangan OpenPGP yang terlepas</comment>
@@ -1283,7 +1357,7 @@
<comment xml:lang="pt">assinatura OpenPGP solta</comment>
<comment xml:lang="pt_BR">Assinatura OpenPGP destacada</comment>
<comment xml:lang="ro">semnătură OpenPGP detașată</comment>
- <comment xml:lang="ru">отсоединённая подпись OpenPGP</comment>
+ <comment xml:lang="ru">Отсоединённая подпись OpenPGP</comment>
<comment xml:lang="sk">Oddelený podpis OpenPGP</comment>
<comment xml:lang="sl">odpet podpis OpenPGP</comment>
<comment xml:lang="sq">Firmë e shkëputur OpenPGP</comment>
@@ -1307,6 +1381,7 @@
<mime-type type="application/pkcs7-mime">
<comment>PKCS#7 Message or Certificate</comment>
+ <comment xml:lang="ast">Mensaxe o certificáu PKCS#7</comment>
<comment xml:lang="ca">missatge o certificat PKCS#7</comment>
<comment xml:lang="cs">zpráva nebo certifikát PKCS#7</comment>
<comment xml:lang="da">PKCS#7-besked eller certifikat</comment>
@@ -1317,6 +1392,7 @@
<comment xml:lang="eu">PKCS#7 mezu edo zertifikazioa</comment>
<comment xml:lang="fi">PKCS#7-viesti tai -varmenne</comment>
<comment xml:lang="fr">Message ou certificat PKCS#7</comment>
+ <comment xml:lang="ga">Teachtaireacht nó Teastas PKCS#7</comment>
<comment xml:lang="gl">Mensaxe ou certificado PKCS#7</comment>
<comment xml:lang="he">הודעה או אישור מסוג PKCS#7</comment>
<comment xml:lang="hr">PKCS#7 poruka ili vjerodajnica</comment>
@@ -1332,7 +1408,7 @@
<comment xml:lang="pl">Wiadomość lub certyfikat PKCS#7</comment>
<comment xml:lang="pt">Mensagem ou certificado PKCS#7</comment>
<comment xml:lang="pt_BR">Certificado ou Mensagem PKCS#7</comment>
- <comment xml:lang="ru">сообщение или сертификат PKCS#7</comment>
+ <comment xml:lang="ru">Сообщение или сертификат PKCS#7</comment>
<comment xml:lang="sk">Správa alebo certifikát PKCS#7</comment>
<comment xml:lang="sl">Sporočilo ali dovoljenje PKCS#7</comment>
<comment xml:lang="sr">ПКЦС#7 порука или уверење</comment>
@@ -1355,7 +1431,7 @@
<comment xml:lang="ca">signatura S/MIME abstreta</comment>
<comment xml:lang="cs">oddělený podpis S/MIME</comment>
<comment xml:lang="da">frigjort S/MIME-signatur</comment>
- <comment xml:lang="de">Isolierte S/MIME-Signatur</comment>
+ <comment xml:lang="de">isolierte S/MIME-Signatur</comment>
<comment xml:lang="el">Αποκομμένη υπογραφή S/MIME</comment>
<comment xml:lang="en_GB">detached S/MIME signature</comment>
<comment xml:lang="eo">dekroĉa S/MIME-subskribo</comment>
@@ -1367,7 +1443,7 @@
<comment xml:lang="ga">síniú S/MIME scartha</comment>
<comment xml:lang="gl">sinatura S/MIME independente</comment>
<comment xml:lang="he">חתימת S/MIME מנותקת</comment>
- <comment xml:lang="hr">odvojen S/MIME potpis</comment>
+ <comment xml:lang="hr">Odvojen S/MIME potpis</comment>
<comment xml:lang="hu">leválasztott S/MIME-aláírás</comment>
<comment xml:lang="ia">Signatura S/MIME distachate</comment>
<comment xml:lang="id">tanda tangan S/MIME yang terlepas</comment>
@@ -1386,7 +1462,7 @@
<comment xml:lang="pt">assinatura S/MIME solta</comment>
<comment xml:lang="pt_BR">Assinatura S/MIME destacada</comment>
<comment xml:lang="ro">semnătură S/MIME detașată</comment>
- <comment xml:lang="ru">отсоединённая подпись S/MIME</comment>
+ <comment xml:lang="ru">Отсоединённая подпись S/MIME</comment>
<comment xml:lang="sk">Oddelený podpis S/MIME</comment>
<comment xml:lang="sl">odpet podpis S/MIME</comment>
<comment xml:lang="sq">Firmë e shkëputur S/MIME</comment>
@@ -1437,7 +1513,7 @@
<comment xml:lang="pt">chave privada PKCS#8</comment>
<comment xml:lang="pt_BR">Chave privada PKCS#8</comment>
<comment xml:lang="ro">Cheie privată PKCS#8</comment>
- <comment xml:lang="ru">личный ключ PKCS#8</comment>
+ <comment xml:lang="ru">Личный ключ PKCS#8</comment>
<comment xml:lang="sk">Súkromný kľúč PKCS#8</comment>
<comment xml:lang="sl">Datoteka osebnega ključa PKCS#8</comment>
<comment xml:lang="sr">ПКЦС#8 лични кључ</comment>
@@ -1450,6 +1526,12 @@
<expanded-acronym>Public-Key Cryptography Standards</expanded-acronym>
<glob pattern="*.p8"/>
</mime-type>
+ <mime-type type="application/pkcs8-encrypted">
+ <comment>PKCS#8 private key (encrypted)</comment>
+ <acronym>PKCS</acronym>
+ <expanded-acronym>Public-Key Cryptography Standards</expanded-acronym>
+ <glob pattern="*.p8e"/>
+ </mime-type>
<mime-type type="application/pkcs10">
<comment>PKCS#10 certification request</comment>
<comment xml:lang="ar">طلب شهادة PKCS#10</comment>
@@ -1487,7 +1569,7 @@
<comment xml:lang="pt">pedido de certificação PKCS#10</comment>
<comment xml:lang="pt_BR">Pedido de certificação PKCS#12</comment>
<comment xml:lang="ro">Cerere de certificat PKCS#10</comment>
- <comment xml:lang="ru">запрос сертификации PKCS#10</comment>
+ <comment xml:lang="ru">Запрос сертификации PKCS#10</comment>
<comment xml:lang="sk">Požiadavka na certifikát PKCS#10</comment>
<comment xml:lang="sl">Datoteka potrdila PKCS#10</comment>
<comment xml:lang="sq">Kërkesë çertifikimi PKCS#10</comment>
@@ -1506,6 +1588,7 @@
<mime-type type="application/pkix-cert">
<comment>X.509 certificate</comment>
<comment xml:lang="ar">شهادة X.509</comment>
+ <comment xml:lang="ast">Certificáu X.509</comment>
<comment xml:lang="bg">Сертификат — X.509</comment>
<comment xml:lang="ca">certificat X.509</comment>
<comment xml:lang="cs">certifikát X.509</comment>
@@ -1521,7 +1604,7 @@
<comment xml:lang="ga">teastas X.509</comment>
<comment xml:lang="gl">Certificado X.509</comment>
<comment xml:lang="he">אישור X.509</comment>
- <comment xml:lang="hr">X.509 certifikat</comment>
+ <comment xml:lang="hr">X.509 vjerodajnica</comment>
<comment xml:lang="hu">X.509 tanúsítvány</comment>
<comment xml:lang="ia">Certificato X.509</comment>
<comment xml:lang="id">Sertifikat X.509</comment>
@@ -1537,7 +1620,7 @@
<comment xml:lang="pt">certificado X.509</comment>
<comment xml:lang="pt_BR">Certificado X.509</comment>
<comment xml:lang="ro">Certificat X.509</comment>
- <comment xml:lang="ru">сертификат X.509</comment>
+ <comment xml:lang="ru">Сертификат X.509</comment>
<comment xml:lang="sk">Certifikát X.509</comment>
<comment xml:lang="sl">Datoteka potrdila X.509</comment>
<comment xml:lang="sr">Икс.509 уверење</comment>
@@ -1551,6 +1634,7 @@
<mime-type type="application/pkix-crl">
<comment>Certificate revocation list</comment>
<comment xml:lang="ar">قائمة إبطال الشهادات</comment>
+ <comment xml:lang="ast">Llistáu de revocación de certificaos</comment>
<comment xml:lang="bg">Списък с отхвърлени сертификати</comment>
<comment xml:lang="ca">llista de revocació de certificats</comment>
<comment xml:lang="cs">seznam odvolaných certifikátů</comment>
@@ -1563,10 +1647,10 @@
<comment xml:lang="fi">Varmenteiden sulkulista</comment>
<comment xml:lang="fo">Prógv afturtøkulisti</comment>
<comment xml:lang="fr">liste de révocation de certificat</comment>
- <comment xml:lang="ga">liosta teastas cúlghairmthe</comment>
+ <comment xml:lang="ga">Liosta teastas cúlghairmthe</comment>
<comment xml:lang="gl">lista de certificados de revogación</comment>
<comment xml:lang="he">רשימת אישורים מבוטלים</comment>
- <comment xml:lang="hr">popis povučenih certifikata</comment>
+ <comment xml:lang="hr">Popis opozvanih vjerodajnica</comment>
<comment xml:lang="hu">Tanúsítvány-visszavonási lista</comment>
<comment xml:lang="ia">Lista de revocation de certificatos</comment>
<comment xml:lang="id">Daftar pencabutan sertificat (CRL)</comment>
@@ -1596,6 +1680,7 @@
<mime-type type="application/pkix-pkipath">
<comment>PkiPath certification path</comment>
<comment xml:lang="ar">مسار شهادة PkiPath</comment>
+ <comment xml:lang="ast">Camín de certificación PkiPath</comment>
<comment xml:lang="bg">Сертификационна верига — PkiPath</comment>
<comment xml:lang="ca">camí cap a la certificació PkiPath</comment>
<comment xml:lang="cs">cesta k certifikátu PkiPath</comment>
@@ -1627,7 +1712,7 @@
<comment xml:lang="pt">caminho de certificação PkiPath</comment>
<comment xml:lang="pt_BR">Pedido de certificação PkiPath</comment>
<comment xml:lang="ro">Cale certificare PkiPath</comment>
- <comment xml:lang="ru">путь сертификации PkiPath</comment>
+ <comment xml:lang="ru">Путь сертификации PkiPath</comment>
<comment xml:lang="sk">Cesta k certifikátu PkiPath</comment>
<comment xml:lang="sl">Datoteka poti potrdila PkiPath</comment>
<comment xml:lang="sr">путања уверења ПкиПат-а</comment>
@@ -1642,6 +1727,7 @@
<mime-type type="application/postscript">
<comment>PS document</comment>
<comment xml:lang="ar">مستند PS</comment>
+ <comment xml:lang="ast">Documentu PS</comment>
<comment xml:lang="be@latin">Dakument PS</comment>
<comment xml:lang="bg">Документ — PS</comment>
<comment xml:lang="ca">document PS</comment>
@@ -1677,7 +1763,7 @@
<comment xml:lang="pt">documento PS</comment>
<comment xml:lang="pt_BR">Documento PS</comment>
<comment xml:lang="ro">Document PS</comment>
- <comment xml:lang="ru">документ PS</comment>
+ <comment xml:lang="ru">Документ PS</comment>
<comment xml:lang="sk">Dokument PS</comment>
<comment xml:lang="sl">Dokument PS</comment>
<comment xml:lang="sq">Dokument PS</comment>
@@ -1701,6 +1787,7 @@
<mime-type type="application/prs.plucker">
<comment>Plucker document</comment>
<comment xml:lang="ar">مستند Plucker</comment>
+ <comment xml:lang="ast">Documentu Plucker</comment>
<comment xml:lang="be@latin">Dakument Plucker</comment>
<comment xml:lang="bg">Документ — Plucker</comment>
<comment xml:lang="ca">document Plucker</comment>
@@ -1736,7 +1823,7 @@
<comment xml:lang="pt">documento Plucker</comment>
<comment xml:lang="pt_BR">Documento do Plucker</comment>
<comment xml:lang="ro">Document Plucker</comment>
- <comment xml:lang="ru">документ Plucker</comment>
+ <comment xml:lang="ru">Документ Plucker</comment>
<comment xml:lang="sk">Dokument Plucker</comment>
<comment xml:lang="sl">Dokument Plucker</comment>
<comment xml:lang="sq">Dokument Plucker</comment>
@@ -1754,20 +1841,32 @@
</mime-type>
<mime-type type="application/raml+yaml">
<comment>RAML document</comment>
+ <comment xml:lang="ast">Documentu RAML</comment>
<comment xml:lang="ca">document RAML</comment>
+ <comment xml:lang="cs">dokument RAML</comment>
<comment xml:lang="da">RAML-dokument</comment>
<comment xml:lang="de">RAML-Dokument</comment>
+ <comment xml:lang="en_GB">RAML document</comment>
<comment xml:lang="es">documento RAML</comment>
+ <comment xml:lang="eu">RAML dokumentua</comment>
<comment xml:lang="fi">RAML-asiakirja</comment>
<comment xml:lang="fr">document RAML</comment>
+ <comment xml:lang="ga">cáipéis RAML</comment>
<comment xml:lang="he">מסמך RAML</comment>
+ <comment xml:lang="hr">RAML dokument</comment>
<comment xml:lang="hu">RAML dokumentum</comment>
+ <comment xml:lang="id">dokumen RAML</comment>
+ <comment xml:lang="it">Documento RAML</comment>
<comment xml:lang="kk">RAML құжаты</comment>
<comment xml:lang="ko">RAML 문서</comment>
+ <comment xml:lang="oc">Document RAML</comment>
<comment xml:lang="pl">Dokument RAML</comment>
<comment xml:lang="pt_BR">Documento RAML</comment>
- <comment xml:lang="ru">документ RAML</comment>
+ <comment xml:lang="ru">Документ RAML</comment>
<comment xml:lang="sk">Dokument RAML</comment>
+ <comment xml:lang="sr">РАМЛ документ</comment>
+ <comment xml:lang="sv">RAML-dokument</comment>
+ <comment xml:lang="tr">RAML belgesi</comment>
<comment xml:lang="uk">документ RAML</comment>
<comment xml:lang="zh_CN">RAML 文档</comment>
<comment xml:lang="zh_TW">RAML 文件</comment>
@@ -1831,6 +1930,7 @@
<mime-type type="application/rtf">
<comment>RTF document</comment>
<comment xml:lang="ar">مستند RTF</comment>
+ <comment xml:lang="ast">Documentu RTF</comment>
<comment xml:lang="be@latin">Dakument RTF</comment>
<comment xml:lang="bg">Документ — RTF</comment>
<comment xml:lang="ca">document RTF</comment>
@@ -1866,7 +1966,7 @@
<comment xml:lang="pt">documento RTF</comment>
<comment xml:lang="pt_BR">Documento RTF</comment>
<comment xml:lang="ro">Document RTF</comment>
- <comment xml:lang="ru">документ RTF</comment>
+ <comment xml:lang="ru">Документ RTF</comment>
<comment xml:lang="sk">Dokument RTF</comment>
<comment xml:lang="sl">Dokument RTF</comment>
<comment xml:lang="sq">Dokument RTF</comment>
@@ -1902,7 +2002,7 @@
<comment xml:lang="eu">Sieve posta-iragazki script-a</comment>
<comment xml:lang="fi">Sieve-postinsuodatuskomentotiedosto</comment>
<comment xml:lang="fr">script de filtrage de courriel Sieve</comment>
- <comment xml:lang="ga">script scagaire phost Sieve</comment>
+ <comment xml:lang="ga">script scagaire r-phost Sieve</comment>
<comment xml:lang="gl">Script de filtro de correo Sieve</comment>
<comment xml:lang="he">תסריט סינון דואר של Sieve</comment>
<comment xml:lang="hr">Sieve skripta filtriranja pošte</comment>
@@ -1923,7 +2023,7 @@
<comment xml:lang="pt">Script de filtragem de correio Sieve</comment>
<comment xml:lang="pt_BR">Script de filtro de mensagens do Sieve</comment>
<comment xml:lang="ro">Script filtrare email Sieve</comment>
- <comment xml:lang="ru">сценарий почтового фильтра Sieve</comment>
+ <comment xml:lang="ru">Сценарий почтового фильтра Sieve</comment>
<comment xml:lang="sk">Skript poštového filtra Sieve</comment>
<comment xml:lang="sl">Skriptna datoteka Sieve poštnega filtra</comment>
<comment xml:lang="sq">Script filtrim poste Sieve</comment>
@@ -1941,6 +2041,7 @@
<mime-type type="application/smil+xml">
<comment>SMIL document</comment>
<comment xml:lang="ar">مستند SMIL</comment>
+ <comment xml:lang="ast">Documentu SMIL</comment>
<comment xml:lang="be@latin">Dakument SMIL</comment>
<comment xml:lang="bg">Документ — SMIL</comment>
<comment xml:lang="ca">document SMIL</comment>
@@ -1976,7 +2077,7 @@
<comment xml:lang="pt">documento SMIL</comment>
<comment xml:lang="pt_BR">Documento SMIL</comment>
<comment xml:lang="ro">Document SMIL</comment>
- <comment xml:lang="ru">документ SMIL</comment>
+ <comment xml:lang="ru">Документ SMIL</comment>
<comment xml:lang="sk">Dokument SMIL</comment>
<comment xml:lang="sl">Dokument SMIL</comment>
<comment xml:lang="sq">Dokument SMIL</comment>
@@ -2022,7 +2123,7 @@
<comment xml:lang="ga">seinmliosta WPL</comment>
<comment xml:lang="gl">lista de reprodución WPL</comment>
<comment xml:lang="he">רשימת נגינה WPL</comment>
- <comment xml:lang="hr">WPL popis za reprodukciju</comment>
+ <comment xml:lang="hr">WPL popis izvođenja</comment>
<comment xml:lang="hu">WPL-lejátszólista</comment>
<comment xml:lang="ia">Lista de selection WPL</comment>
<comment xml:lang="id">Senarai putar WPL</comment>
@@ -2038,7 +2139,7 @@
<comment xml:lang="pt">lista de reprodução WPL</comment>
<comment xml:lang="pt_BR">Lista de reprodução do WPL</comment>
<comment xml:lang="ro">Listă redare WPL</comment>
- <comment xml:lang="ru">список воспроизведения WPL</comment>
+ <comment xml:lang="ru">Список воспроизведения WPL</comment>
<comment xml:lang="sk">Zoznam skladieb WPL</comment>
<comment xml:lang="sl">Seznam predvajanja WPL</comment>
<comment xml:lang="sr">ВПЛ списак нумера</comment>
@@ -2094,7 +2195,7 @@
<comment xml:lang="pt">base de dados SQLite2</comment>
<comment xml:lang="pt_BR">Banco de dados SQLite2</comment>
<comment xml:lang="ro">Bază de date SQLite2</comment>
- <comment xml:lang="ru">база данных SQLite2</comment>
+ <comment xml:lang="ru">База данных SQLite2</comment>
<comment xml:lang="sk">Databáza SQLite2</comment>
<comment xml:lang="sl">Podatkovna zbirka SQLite2</comment>
<comment xml:lang="sq">Bazë me të dhëna SQLite2</comment>
@@ -2105,11 +2206,12 @@
<comment xml:lang="vi">Cơ sở dữ liệu SQLite2</comment>
<comment xml:lang="zh_CN">SQLite2 数据库</comment>
<comment xml:lang="zh_TW">SQLite2 資料庫</comment>
+ <glob pattern="*.sqlite2"/>
<magic>
<match value="** This file contains an SQLite" type="string" offset="0"/>
</magic>
</mime-type>
- <mime-type type="application/x-sqlite3">
+ <mime-type type="application/vnd.sqlite3">
<comment>SQLite3 database</comment>
<comment xml:lang="ar">قاعدة بيانات SQLite3</comment>
<comment xml:lang="be@latin">Baza źviestak SQLite3</comment>
@@ -2147,7 +2249,7 @@
<comment xml:lang="pt">base de dados SQLite3</comment>
<comment xml:lang="pt_BR">Banco de dados SQLite3</comment>
<comment xml:lang="ro">Bază de date SQLite3</comment>
- <comment xml:lang="ru">база данных SQLite3</comment>
+ <comment xml:lang="ru">База данных SQLite3</comment>
<comment xml:lang="sk">Databáza SQLite3</comment>
<comment xml:lang="sl">Podatkovna zbirka SQLite3</comment>
<comment xml:lang="sq">Bazë me të dhëna SQLite3</comment>
@@ -2158,9 +2260,11 @@
<comment xml:lang="vi">Cơ sở dữ liệu SQLite3</comment>
<comment xml:lang="zh_CN">SQLite3 数据库</comment>
<comment xml:lang="zh_TW">SQLite3 資料庫</comment>
+ <glob pattern="*.sqlite3"/>
<magic>
<match value="SQLite format 3" type="string" offset="0"/>
</magic>
+ <alias type="application/x-sqlite3"/>
</mime-type>
<mime-type type="application/x-gedcom">
<comment>GEDCOM family history</comment>
@@ -2189,7 +2293,7 @@
<comment xml:lang="ja">GEDCOM 家系図データ</comment>
<comment xml:lang="ka">GEDCOM ოჯახის ისტორია</comment>
<comment xml:lang="kk">GEDCOM отбасы тарихы</comment>
- <comment xml:lang="ko">GEDCOM 가족 내력</comment>
+ <comment xml:lang="ko">GEDCOM 패밀리 기록</comment>
<comment xml:lang="lt">GEDCOM šeimos istorija</comment>
<comment xml:lang="lv">GEDCOM ģimenes vēsture</comment>
<comment xml:lang="nb">GEDCOM-familiehistorikk</comment>
@@ -2200,7 +2304,7 @@
<comment xml:lang="pt">história familiar GEDCOM</comment>
<comment xml:lang="pt_BR">Histórico familiar do GEDCOM</comment>
<comment xml:lang="ro">Tablou genealogic GEDCOM</comment>
- <comment xml:lang="ru">история семьи GEDCOM</comment>
+ <comment xml:lang="ru">История семьи GEDCOM</comment>
<comment xml:lang="sk">Rodokmeň GEDCOM</comment>
<comment xml:lang="sl">Datoteka družinske zgodovine GEDCOM</comment>
<comment xml:lang="sq">Kronollogji familje GEDCOM</comment>
@@ -2224,6 +2328,7 @@
<mime-type type="video/x-flv">
<comment>Flash video</comment>
<comment xml:lang="ar">Flash مرئي</comment>
+ <comment xml:lang="ast">Videu en Flash</comment>
<comment xml:lang="be@latin">Videa Flash</comment>
<comment xml:lang="bg">Видео — Flash</comment>
<comment xml:lang="ca">vídeo de Flash</comment>
@@ -2241,7 +2346,7 @@
<comment xml:lang="ga">físeán Flash</comment>
<comment xml:lang="gl">vídeo Flash</comment>
<comment xml:lang="he">וידאו של פלאש</comment>
- <comment xml:lang="hr">Flash video</comment>
+ <comment xml:lang="hr">Flash video snimka</comment>
<comment xml:lang="hu">Flash videó</comment>
<comment xml:lang="ia">Video Flash</comment>
<comment xml:lang="id">Video Flash</comment>
@@ -2260,7 +2365,7 @@
<comment xml:lang="pt">vídeo Flash</comment>
<comment xml:lang="pt_BR">Vídeo Flash</comment>
<comment xml:lang="ro">Video Flash</comment>
- <comment xml:lang="ru">видео Flash</comment>
+ <comment xml:lang="ru">Видео Flash</comment>
<comment xml:lang="sk">Video Flash</comment>
<comment xml:lang="sl">Video datoteka Flash</comment>
<comment xml:lang="sq">Video Flash</comment>
@@ -2269,7 +2374,7 @@
<comment xml:lang="tr">Flash video</comment>
<comment xml:lang="uk">відеокліп Flash</comment>
<comment xml:lang="vi">Ảnh động Flash</comment>
- <comment xml:lang="zh_CN">Flash 影片</comment>
+ <comment xml:lang="zh_CN">Flash 视频</comment>
<comment xml:lang="zh_TW">Flash 視訊</comment>
<generic-icon name="video-x-generic"/>
<magic priority="50">
@@ -2282,6 +2387,7 @@
</mime-type>
<mime-type type="video/x-javafx">
<comment>JavaFX video</comment>
+ <comment xml:lang="ast">Videu en JavaFX</comment>
<comment xml:lang="bg">Видео — JavaFX</comment>
<comment xml:lang="ca">vídeo de JavaFX</comment>
<comment xml:lang="cs">video JavaFX</comment>
@@ -2298,7 +2404,7 @@
<comment xml:lang="ga">físeán JavaFX</comment>
<comment xml:lang="gl">vídeo JavaFX</comment>
<comment xml:lang="he">וידאו JavaFX</comment>
- <comment xml:lang="hr">JavaFX video</comment>
+ <comment xml:lang="hr">JavaFX video snimka</comment>
<comment xml:lang="hu">JavaFX videó</comment>
<comment xml:lang="ia">Video JavaFX</comment>
<comment xml:lang="id">Video JavaFX</comment>
@@ -2313,7 +2419,7 @@
<comment xml:lang="pt">vídeo JavaFX</comment>
<comment xml:lang="pt_BR">Vídeo JavaFX</comment>
<comment xml:lang="ro">Video JavaFX</comment>
- <comment xml:lang="ru">видео JavaFX</comment>
+ <comment xml:lang="ru">Видео JavaFX</comment>
<comment xml:lang="sk">Video JavaFX</comment>
<comment xml:lang="sl">Video JavaFX</comment>
<comment xml:lang="sr">ЈаваФИкс видео</comment>
@@ -2367,7 +2473,7 @@
<comment xml:lang="pt">gravação SGF</comment>
<comment xml:lang="pt_BR">Gravação SGF</comment>
<comment xml:lang="ro">Înregistrare SGF</comment>
- <comment xml:lang="ru">запись SGF</comment>
+ <comment xml:lang="ru">Запись SGF</comment>
<comment xml:lang="sk">Záznam SGF</comment>
<comment xml:lang="sl">Datoteka shranjene igre SGF</comment>
<comment xml:lang="sq">Regjistrim SGF</comment>
@@ -2388,9 +2494,10 @@
<match value="(;FF[4]" type="string" offset="0"/>
</magic>
</mime-type>
- <mime-type type="application/x-xliff">
+ <mime-type type="application/xliff+xml">
<comment>XLIFF translation file</comment>
<comment xml:lang="ar">ملف ترجمة XLIFF</comment>
+ <comment xml:lang="ast">Ficheru de traducciones XLIFF</comment>
<comment xml:lang="be@latin">Fajł pierakładu XLIFF</comment>
<comment xml:lang="bg">Превод — XLIFF</comment>
<comment xml:lang="ca">fitxer de traducció XLIFF</comment>
@@ -2404,7 +2511,7 @@
<comment xml:lang="fi">XLIFF-käännöstiedosto</comment>
<comment xml:lang="fo">XLIFF týðingarfíla</comment>
<comment xml:lang="fr">fichier de traduction XLIFF</comment>
- <comment xml:lang="ga">comhad aistrithe XLIFF</comment>
+ <comment xml:lang="ga">comhad aistriúcháin XLIFF</comment>
<comment xml:lang="gl">ficheiro de tradución XLIFF</comment>
<comment xml:lang="he">קובץ תרגום CLIFF</comment>
<comment xml:lang="hr">XLIFF datoteka prijevoda</comment>
@@ -2425,7 +2532,7 @@
<comment xml:lang="pt">ficheiro de tradução XLIFF</comment>
<comment xml:lang="pt_BR">Arquivo de tradução XLIFF</comment>
<comment xml:lang="ro">Fișier de traducere XLIFF</comment>
- <comment xml:lang="ru">файл перевода XLIFF</comment>
+ <comment xml:lang="ru">Файл перевода XLIFF</comment>
<comment xml:lang="sk">Súbor prekladu XLIFF</comment>
<comment xml:lang="sl">Datoteka prevoda XLIFF</comment>
<comment xml:lang="sq">File përkthimesh XLIFF</comment>
@@ -2434,7 +2541,7 @@
<comment xml:lang="tr">XLIFF çeviri dosyası</comment>
<comment xml:lang="uk">файл перекладу XLIFF</comment>
<comment xml:lang="vi">Tập tin dịch XLIFF</comment>
- <comment xml:lang="zh_CN">XLIFF 消息翻译文件</comment>
+ <comment xml:lang="zh_CN">XLIFF 翻译文件</comment>
<comment xml:lang="zh_TW">XLIFF 翻譯檔</comment>
<acronym>XLIFF</acronym>
<expanded-acronym>XML Localization Interchange File Format</expanded-acronym>
@@ -2446,10 +2553,12 @@
<match value="&lt;xliff" type="string" offset="0:256"/>
</magic>
<root-XML namespaceURI='urn:oasis:names:tc:xliff:document:1.1' localName='xliff'/>
+ <alias type="application/x-xliff"/>
</mime-type>
<mime-type type="application/x-yaml">
<comment>YAML document</comment>
<comment xml:lang="ar">مستند YAML</comment>
+ <comment xml:lang="ast">Documentu YAML</comment>
<comment xml:lang="bg">Документ — YAML</comment>
<comment xml:lang="ca">document YAML</comment>
<comment xml:lang="cs">dokument YAML</comment>
@@ -2482,7 +2591,7 @@
<comment xml:lang="pt">documento YAML</comment>
<comment xml:lang="pt_BR">Documento YAML</comment>
<comment xml:lang="ro">Document YAML</comment>
- <comment xml:lang="ru">документ YAML</comment>
+ <comment xml:lang="ru">Документ YAML</comment>
<comment xml:lang="sk">Dokument YAML</comment>
<comment xml:lang="sl">Dokument YAML</comment>
<comment xml:lang="sr">ЈАМЛ документ</comment>
@@ -2506,6 +2615,7 @@
<mime-type type="application/vnd.corel-draw">
<comment>Corel Draw drawing</comment>
<comment xml:lang="ar">تصميم Corel Draw</comment>
+ <comment xml:lang="ast">Dibuxu de Corel Draw</comment>
<comment xml:lang="az">Corel Draw çəkimi</comment>
<comment xml:lang="be@latin">Rysunak Corel Draw</comment>
<comment xml:lang="bg">Чертеж — Corel Draw</comment>
@@ -2533,7 +2643,7 @@
<comment xml:lang="ja">Corel Draw ドロー</comment>
<comment xml:lang="ka">Corel Draw-ის ნახაზი</comment>
<comment xml:lang="kk">Corel Draw суреті</comment>
- <comment xml:lang="ko">Corel Draw 드로잉</comment>
+ <comment xml:lang="ko">코렐 드로우 드로잉</comment>
<comment xml:lang="lt">Corel Draw piešinys</comment>
<comment xml:lang="lv">Corel Draw zīmējums</comment>
<comment xml:lang="ms">Lukisan Corel Draw</comment>
@@ -2545,16 +2655,16 @@
<comment xml:lang="pt">desenho Corel Drawdesenho Corel Draw</comment>
<comment xml:lang="pt_BR">Desenho do Corel Draw</comment>
<comment xml:lang="ro">Desen Corel Draw</comment>
- <comment xml:lang="ru">изображение Corel Draw</comment>
+ <comment xml:lang="ru">Рисунок Corel Draw</comment>
<comment xml:lang="sk">Kresba Corel Draw</comment>
<comment xml:lang="sl">Datoteka risbe Corel Draw</comment>
<comment xml:lang="sq">Vizatim Corel Draw</comment>
- <comment xml:lang="sr">Корел Дров цртеж</comment>
+ <comment xml:lang="sr">Корелов цртеж</comment>
<comment xml:lang="sv">Corel Draw-teckning</comment>
<comment xml:lang="tr">Corel Draw çizimi</comment>
<comment xml:lang="uk">малюнок Corel Draw</comment>
<comment xml:lang="vi">Bản vẽ Corel Draw</comment>
- <comment xml:lang="zh_CN">Corel Draw 图形</comment>
+ <comment xml:lang="zh_CN">Corel Draw 绘图</comment>
<comment xml:lang="zh_TW">Corel Draw 繪圖</comment>
<generic-icon name="image-x-generic"/>
<magic priority="80">
@@ -2572,6 +2682,7 @@
<mime-type type="application/vnd.hp-hpgl">
<comment>HPGL file</comment>
<comment xml:lang="ar">ملف HPGL</comment>
+ <comment xml:lang="ast">Ficheru HPGL</comment>
<comment xml:lang="be@latin">Fajł HPGL</comment>
<comment xml:lang="bg">Файл — HPGL</comment>
<comment xml:lang="ca">fitxer HPGL</comment>
@@ -2607,7 +2718,7 @@
<comment xml:lang="pt">ficheiro HPGL</comment>
<comment xml:lang="pt_BR">Arquivo HPGL</comment>
<comment xml:lang="ro">Fișier HPGL</comment>
- <comment xml:lang="ru">файл HPGL</comment>
+ <comment xml:lang="ru">Файл HPGL</comment>
<comment xml:lang="sk">Súbor HPGL</comment>
<comment xml:lang="sl">Datoteka HPGL</comment>
<comment xml:lang="sq">File HPGL</comment>
@@ -2626,6 +2737,7 @@
<mime-type type="application/vnd.hp-pcl">
<comment>PCL file</comment>
<comment xml:lang="ar">ملف PCL</comment>
+ <comment xml:lang="ast">FIcheru PCL</comment>
<comment xml:lang="be@latin">Fajł PCL</comment>
<comment xml:lang="bg">Файл — PCL</comment>
<comment xml:lang="ca">fitxer PCL</comment>
@@ -2661,7 +2773,7 @@
<comment xml:lang="pt">ficheiro PCL</comment>
<comment xml:lang="pt_BR">Arquivo PCL</comment>
<comment xml:lang="ro">Fișier PCL</comment>
- <comment xml:lang="ru">файл PCL</comment>
+ <comment xml:lang="ru">Файл PCL</comment>
<comment xml:lang="sk">Súbor PCL</comment>
<comment xml:lang="sl">Datoteka PCL</comment>
<comment xml:lang="sq">File PCL</comment>
@@ -2680,6 +2792,7 @@
<mime-type type="application/vnd.lotus-1-2-3">
<comment>Lotus 1-2-3 spreadsheet</comment>
<comment xml:lang="ar">جدول Lotus 1-2-3</comment>
+ <comment xml:lang="ast">Fueya de cálculu de Lotus 1-2-3</comment>
<comment xml:lang="az">Lotus 1-2-3 hesab cədvəli</comment>
<comment xml:lang="be@latin">Raźlikovy arkuš Lotus 1-2-3</comment>
<comment xml:lang="bg">Таблица — Lotus 1-2-3</comment>
@@ -2718,7 +2831,7 @@
<comment xml:lang="pt">folha de cálculo Lotus 1-2-3</comment>
<comment xml:lang="pt_BR">Planilha do Lotus 1-2-3</comment>
<comment xml:lang="ro">Foaie de calcul Lotus 1-2-3</comment>
- <comment xml:lang="ru">электронная таблица Lotus 1-2-3</comment>
+ <comment xml:lang="ru">Электронная таблица Lotus 1-2-3</comment>
<comment xml:lang="sk">Zošit Lotus 1-2-3</comment>
<comment xml:lang="sl">Preglednica Lotus 1-2-3</comment>
<comment xml:lang="sq">Fletë llogaritjesh Lotus 1-2-3</comment>
@@ -2727,7 +2840,7 @@
<comment xml:lang="tr">Lotus 1-2-3 hesap tablosu</comment>
<comment xml:lang="uk">ел. таблиця Lotus 1-2-3</comment>
<comment xml:lang="vi">Bảng tính Lotus 1-2-3</comment>
- <comment xml:lang="zh_CN">Lotus 1-2-3 工作簿</comment>
+ <comment xml:lang="zh_CN">Lotus 1-2-3 电子表格</comment>
<comment xml:lang="zh_TW">Lotus 1-2-3 試算表</comment>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="50">
@@ -2746,6 +2859,7 @@
</mime-type>
<mime-type type="application/vnd.lotus-wordpro">
<comment>Lotus Word Pro</comment>
+ <comment xml:lang="ast">Lotus Word Pro</comment>
<comment xml:lang="ca">Lotus Word Pro</comment>
<comment xml:lang="cs">Lotus Word Pro</comment>
<comment xml:lang="da">Lotus Word Pro</comment>
@@ -2756,6 +2870,7 @@
<comment xml:lang="eu">Lotus Word Pro</comment>
<comment xml:lang="fi">Lotus Word Pro</comment>
<comment xml:lang="fr">Lotus Word Pro</comment>
+ <comment xml:lang="ga">Lotus Word Pro</comment>
<comment xml:lang="gl">Lotus Word Pro</comment>
<comment xml:lang="he">Lotus Word Pro</comment>
<comment xml:lang="hr">Lotus Word Pro</comment>
@@ -2789,6 +2904,7 @@
<mime-type type="application/vnd.ms-access">
<comment>JET database</comment>
<comment xml:lang="ar">قاعدة بيانات JET</comment>
+ <comment xml:lang="ast">Base de datos JETº</comment>
<comment xml:lang="be@latin">Baza źviestak JET</comment>
<comment xml:lang="bg">База от данни — JET</comment>
<comment xml:lang="ca">base de dades JET</comment>
@@ -2824,7 +2940,7 @@
<comment xml:lang="pt">base de dados JET</comment>
<comment xml:lang="pt_BR">Banco de dados JET</comment>
<comment xml:lang="ro">Bază de date JET</comment>
- <comment xml:lang="ru">база данных JET</comment>
+ <comment xml:lang="ru">База данных JET</comment>
<comment xml:lang="sk">Databáza JET</comment>
<comment xml:lang="sl">Podatkovna zbirka JET</comment>
<comment xml:lang="sq">Bazë me të dhëna JET</comment>
@@ -2885,7 +3001,7 @@
<comment xml:lang="pt">arquivo Microsoft Cabinet</comment>
<comment xml:lang="pt_BR">Pacote Cabinet da Microsoft</comment>
<comment xml:lang="ro">Arhivă Microsoft Cabinet</comment>
- <comment xml:lang="ru">архив Microsoft Cabinet</comment>
+ <comment xml:lang="ru">Архив Microsoft Cabinet</comment>
<comment xml:lang="sk">Archív Microsoft Cabinet</comment>
<comment xml:lang="sl">Datoteka arhiva Microsoft Cabinet</comment>
<comment xml:lang="sr">Мајкрософтова кабинет архива</comment>
@@ -2893,7 +3009,7 @@
<comment xml:lang="tr">Microsoft Cabinet arşivi</comment>
<comment xml:lang="uk">архів Cabinet Microsoft</comment>
<comment xml:lang="vi">Kho lưu Cabinet Microsoft</comment>
- <comment xml:lang="zh_CN">Microsoft CAB 归档文件</comment>
+ <comment xml:lang="zh_CN">Microsoft Cabinet 归档文件</comment>
<comment xml:lang="zh_TW">微軟 Cabinet 封存檔</comment>
<generic-icon name="package-x-generic"/>
<magic priority="60">
@@ -2941,7 +3057,7 @@
<comment xml:lang="pt">folha de cálculo Excel</comment>
<comment xml:lang="pt_BR">Planilha do Excel</comment>
<comment xml:lang="ro">Foaie de calcul Excel</comment>
- <comment xml:lang="ru">электронная таблица Excel</comment>
+ <comment xml:lang="ru">Электронная таблица Excel</comment>
<comment xml:lang="sk">Zošit Excel</comment>
<comment xml:lang="sl">Razpredelnica Microsoft Excel</comment>
<comment xml:lang="sq">Fletë llogaritje Excel</comment>
@@ -2950,7 +3066,7 @@
<comment xml:lang="tr">Excel çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця Excel</comment>
<comment xml:lang="vi">Bảng tính Excel</comment>
- <comment xml:lang="zh_CN">Microsoft Excel 工作簿</comment>
+ <comment xml:lang="zh_CN">Excel 电子表格</comment>
<comment xml:lang="zh_TW">Excel 試算表</comment>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="50">
@@ -2981,9 +3097,10 @@
<comment xml:lang="eu">Excel gehigarria</comment>
<comment xml:lang="fi">Excel-lisäosa</comment>
<comment xml:lang="fr">complément Excel</comment>
+ <comment xml:lang="ga">breiseán Excel</comment>
<comment xml:lang="gl">complemento de Excel</comment>
<comment xml:lang="he">תוסף של Excel</comment>
- <comment xml:lang="hr">Excel priključak</comment>
+ <comment xml:lang="hr">Excel dodatak</comment>
<comment xml:lang="hu">Excel bővítmény</comment>
<comment xml:lang="ia">Add-in Excel</comment>
<comment xml:lang="id">Add-in Excel</comment>
@@ -2998,14 +3115,14 @@
<comment xml:lang="pl">Dodatek Excel</comment>
<comment xml:lang="pt">Extensão Excel</comment>
<comment xml:lang="pt_BR">Suplemento do Excel</comment>
- <comment xml:lang="ru">дополнение Excel</comment>
+ <comment xml:lang="ru">Дополнение Excel</comment>
<comment xml:lang="sk">Doplnok aplikácie Excel</comment>
<comment xml:lang="sl">Vstavek Excel</comment>
<comment xml:lang="sr">Екселов додатак</comment>
<comment xml:lang="sv">Excel-tillägg</comment>
<comment xml:lang="tr">Excel eklentisi</comment>
<comment xml:lang="uk">додаток Excel</comment>
- <comment xml:lang="zh_CN">Excel 附加组件</comment>
+ <comment xml:lang="zh_CN">Excel 外接程序</comment>
<comment xml:lang="zh_TW">Excel 增益集</comment>
<generic-icon name="x-office-spreadsheet"/>
<glob pattern="*.xlam"/>
@@ -3024,6 +3141,7 @@
<comment xml:lang="eu">Excel 2007 kalkulu-orri binarioa</comment>
<comment xml:lang="fi">Excel 2007:n binaarinen taulukko</comment>
<comment xml:lang="fr">feuille de calcul binaire Excel 2007</comment>
+ <comment xml:lang="ga">scarbhileog dhénártha Excel 2007</comment>
<comment xml:lang="gl">ficheiro binario de folla de cálculo Excel 2007</comment>
<comment xml:lang="he">גיליון נתונים בינרי של Excel 2007</comment>
<comment xml:lang="hr">Excel 2007 binarna proračunska tablica</comment>
@@ -3041,14 +3159,14 @@
<comment xml:lang="pl">Binarny arkusz Excel 2007</comment>
<comment xml:lang="pt">folha de cálculo binária Excel 2007</comment>
<comment xml:lang="pt_BR">Planilha binária do Excel 2007</comment>
- <comment xml:lang="ru">двоичная электронная таблица Excel 2007</comment>
+ <comment xml:lang="ru">Двоичная электронная таблица Excel 2007</comment>
<comment xml:lang="sk">Binárny zošit Excel 2007</comment>
<comment xml:lang="sl">Binarna preglednica Excel 2007</comment>
<comment xml:lang="sr">Ексел 2007 бинарна табела</comment>
<comment xml:lang="sv">Binärt Excel 2007-kalkylblad</comment>
<comment xml:lang="tr">Excel 2007 ikilik çalışma sayfası</comment>
<comment xml:lang="uk">бінарна електронна таблиця Excel 2007</comment>
- <comment xml:lang="zh_CN">Excel 2007 二进制工作表</comment>
+ <comment xml:lang="zh_CN">Excel 2007 二进制电子表格</comment>
<comment xml:lang="zh_TW">Excel 2007 二進位試算表</comment>
<generic-icon name="x-office-spreadsheet"/>
<glob pattern="*.xlsb"/>
@@ -3093,7 +3211,7 @@
<comment xml:lang="pt">folha de cálculo Excel</comment>
<comment xml:lang="pt_BR">Planilha do Excel</comment>
<comment xml:lang="ro">Foaie de calcul Excel</comment>
- <comment xml:lang="ru">электронная таблица Excel</comment>
+ <comment xml:lang="ru">Электронная таблица Excel</comment>
<comment xml:lang="sk">Zošit Excel</comment>
<comment xml:lang="sl">Razpredelnica Microsoft Excel</comment>
<comment xml:lang="sq">Fletë llogaritje Excel</comment>
@@ -3102,7 +3220,7 @@
<comment xml:lang="tr">Excel çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця Excel</comment>
<comment xml:lang="vi">Bảng tính Excel</comment>
- <comment xml:lang="zh_CN">Microsoft Excel 工作簿</comment>
+ <comment xml:lang="zh_CN">Excel 电子表格</comment>
<comment xml:lang="zh_TW">Excel 試算表</comment>
<generic-icon name="x-office-spreadsheet"/>
<glob pattern="*.xlsm"/>
@@ -3120,6 +3238,7 @@
<comment xml:lang="eu">Excel kalkulu-orri txantiloia</comment>
<comment xml:lang="fi">Excel-taulukkomalli</comment>
<comment xml:lang="fr">modèle de feuille de calcul Excel</comment>
+ <comment xml:lang="ga">teimpléad scarbhileoige Excel</comment>
<comment xml:lang="he">תבנית גיליון נתונים של Excel</comment>
<comment xml:lang="hr">Predložak Excel proračunske tablice</comment>
<comment xml:lang="hu">Excel munkafüzetsablon</comment>
@@ -3127,18 +3246,18 @@
<comment xml:lang="id">Templat lembar kerja Excel</comment>
<comment xml:lang="it">Modello foglio di calcolo Excel</comment>
<comment xml:lang="kk">Excel кестесінің үлгісі</comment>
- <comment xml:lang="ko">액셀 스프레드시트 양식</comment>
+ <comment xml:lang="ko">Excel 스프레드시트 서식</comment>
<comment xml:lang="oc">Modèl de fuèlh de calcul Excel</comment>
<comment xml:lang="pl">Szablon arkusza Excel</comment>
<comment xml:lang="pt">modelo de folha de cálculo Excel</comment>
<comment xml:lang="pt_BR">Modelo de planilha do Excel</comment>
- <comment xml:lang="ru">шаблон таблицы Excel</comment>
+ <comment xml:lang="ru">Шаблон таблицы Excel</comment>
<comment xml:lang="sk">Šablóna tabuľky aplikácie Excel</comment>
- <comment xml:lang="sr">Шаблон табеле Ексела</comment>
+ <comment xml:lang="sr">Екселов шаблон табеле</comment>
<comment xml:lang="sv">Excel-kalkylarksmall</comment>
<comment xml:lang="tr">Excel hesap tablosu şablonu</comment>
<comment xml:lang="uk">шаблон електронної таблиці Excel</comment>
- <comment xml:lang="zh_CN">Microsoft Excel 工作簿模板</comment>
+ <comment xml:lang="zh_CN">Excel 电子表格模板</comment>
<comment xml:lang="zh_TW">Excel 試算表範本</comment>
<generic-icon name="x-office-spreadsheet"/>
<glob pattern="*.xltm"/>
@@ -3182,16 +3301,16 @@
<comment xml:lang="pt">apresentação PowerPoint</comment>
<comment xml:lang="pt_BR">Apresentação do PowerPoint</comment>
<comment xml:lang="ro">Prezentare PowerPoint</comment>
- <comment xml:lang="ru">презентация PowerPoint</comment>
+ <comment xml:lang="ru">Презентация PowerPoint</comment>
<comment xml:lang="sk">Prezentácia PowerPoint</comment>
<comment xml:lang="sl">Predstavitev Microsoft PowerPoint</comment>
<comment xml:lang="sq">Prezantim PowerPoint</comment>
- <comment xml:lang="sr">Пауер Поинт презентација</comment>
+ <comment xml:lang="sr">Пауер поинт презентација</comment>
<comment xml:lang="sv">PowerPoint-presentation</comment>
<comment xml:lang="tr">PowerPoint sunumu</comment>
<comment xml:lang="uk">презентація PowerPoint</comment>
<comment xml:lang="vi">Trình diễn PowerPoint</comment>
- <comment xml:lang="zh_CN">Microsoft PowerPoint 演示文稿</comment>
+ <comment xml:lang="zh_CN">PowerPoint 演示文稿</comment>
<comment xml:lang="zh_TW">PowerPoint 簡報</comment>
<generic-icon name="x-office-presentation"/>
<glob pattern="*.ppz"/>
@@ -3215,9 +3334,10 @@
<comment xml:lang="eu">PowerPoint gehigarria</comment>
<comment xml:lang="fi">PowerPoint-lisäosa</comment>
<comment xml:lang="fr">complément PowerPoint</comment>
+ <comment xml:lang="ga">breiseán PowerPoint</comment>
<comment xml:lang="gl">complemento de PowerPoint</comment>
<comment xml:lang="he">תוסף של PowerPoint</comment>
- <comment xml:lang="hr">PowerPoint priključak</comment>
+ <comment xml:lang="hr">PowerPoint dodatak</comment>
<comment xml:lang="hu">PowerPoint bővítmény</comment>
<comment xml:lang="ia">Add-in PowerPoint</comment>
<comment xml:lang="id">Add-in PowerPoint</comment>
@@ -3232,14 +3352,14 @@
<comment xml:lang="pl">Dodatek PowerPoint</comment>
<comment xml:lang="pt">extensão PowerPoint</comment>
<comment xml:lang="pt_BR">Suplemento do PowerPoint</comment>
- <comment xml:lang="ru">дополнение PowerPoint</comment>
+ <comment xml:lang="ru">Дополнение PowerPoint</comment>
<comment xml:lang="sk">Doplnok aplikácie PowerPoint </comment>
<comment xml:lang="sl">Vstavek PowerPoint</comment>
- <comment xml:lang="sr">Пауер Поинт додатак</comment>
+ <comment xml:lang="sr">Пауер поинт додатак</comment>
<comment xml:lang="sv">PowerPoint-tillägg</comment>
<comment xml:lang="tr">PowerPoint eklentisi</comment>
<comment xml:lang="uk">додаток PowerPoint</comment>
- <comment xml:lang="zh_CN">PowerPoint 附加组件</comment>
+ <comment xml:lang="zh_CN">PowerPoint 外接程序</comment>
<comment xml:lang="zh_TW">PowerPoint 增益集</comment>
<generic-icon name="x-office-presentation"/>
<glob pattern="*.ppam"/>
@@ -3282,16 +3402,16 @@
<comment xml:lang="pt">apresentação PowerPoint</comment>
<comment xml:lang="pt_BR">Apresentação do PowerPoint</comment>
<comment xml:lang="ro">Prezentare PowerPoint</comment>
- <comment xml:lang="ru">презентация PowerPoint</comment>
+ <comment xml:lang="ru">Презентация PowerPoint</comment>
<comment xml:lang="sk">Prezentácia PowerPoint</comment>
<comment xml:lang="sl">Predstavitev Microsoft PowerPoint</comment>
<comment xml:lang="sq">Prezantim PowerPoint</comment>
- <comment xml:lang="sr">Пауер Поинт презентација</comment>
+ <comment xml:lang="sr">Пауер поинт презентација</comment>
<comment xml:lang="sv">PowerPoint-presentation</comment>
<comment xml:lang="tr">PowerPoint sunumu</comment>
<comment xml:lang="uk">презентація PowerPoint</comment>
<comment xml:lang="vi">Trình diễn PowerPoint</comment>
- <comment xml:lang="zh_CN">Microsoft PowerPoint 演示文稿</comment>
+ <comment xml:lang="zh_CN">PowerPoint 演示文稿</comment>
<comment xml:lang="zh_TW">PowerPoint 簡報</comment>
<generic-icon name="x-office-presentation"/>
<glob pattern="*.pptm"/>
@@ -3299,6 +3419,7 @@
</mime-type>
<mime-type type="application/vnd.ms-powerpoint.slide.macroEnabled.12">
<comment>PowerPoint slide</comment>
+ <comment xml:lang="ast">Diapositiva de PowerPoint</comment>
<comment xml:lang="ca">dispositiva de PowerPoint</comment>
<comment xml:lang="cs">promítání PowerPoint</comment>
<comment xml:lang="da">PowerPoint-dias</comment>
@@ -3309,6 +3430,7 @@
<comment xml:lang="eu">PowerPoint diapositiba</comment>
<comment xml:lang="fi">PowerPoint-dia</comment>
<comment xml:lang="fr">diapositive PowerPoint</comment>
+ <comment xml:lang="ga">sleamhnán PowerPoint</comment>
<comment xml:lang="he">שקופית של PowerPoint</comment>
<comment xml:lang="hr">PowerPoint prezentacija</comment>
<comment xml:lang="hu">PowerPoint dia</comment>
@@ -3321,13 +3443,13 @@
<comment xml:lang="pl">Slajd PowerPoint</comment>
<comment xml:lang="pt">diapositivo PowerPoint</comment>
<comment xml:lang="pt_BR">Slide do PowerPoint</comment>
- <comment xml:lang="ru">слайд PowerPoint</comment>
+ <comment xml:lang="ru">Слайд PowerPoint</comment>
<comment xml:lang="sk">Snímka aplikácie PowerPoint</comment>
- <comment xml:lang="sr">Слајд Пауер Поинта</comment>
+ <comment xml:lang="sr">Пауер поинт слајд</comment>
<comment xml:lang="sv">PowerPoint-bildspel</comment>
<comment xml:lang="tr">PowerPoint sunusu</comment>
<comment xml:lang="uk">слайд PowerPoint</comment>
- <comment xml:lang="zh_CN">PowerPoint 文稿</comment>
+ <comment xml:lang="zh_CN">PowerPoint 幻灯片</comment>
<comment xml:lang="zh_TW">PowerPoint 投影片</comment>
<generic-icon name="x-office-presentation"/>
<glob pattern="*.sldm"/>
@@ -3371,16 +3493,16 @@
<comment xml:lang="pt">apresentação PowerPoint</comment>
<comment xml:lang="pt_BR">Apresentação do PowerPoint</comment>
<comment xml:lang="ro">Prezentare PowerPoint</comment>
- <comment xml:lang="ru">презентация PowerPoint</comment>
+ <comment xml:lang="ru">Презентация PowerPoint</comment>
<comment xml:lang="sk">Prezentácia PowerPoint</comment>
<comment xml:lang="sl">Predstavitev Microsoft PowerPoint</comment>
<comment xml:lang="sq">Prezantim PowerPoint</comment>
- <comment xml:lang="sr">Пауер Поинт презентација</comment>
+ <comment xml:lang="sr">Пауер поинт презентација</comment>
<comment xml:lang="sv">PowerPoint-presentation</comment>
<comment xml:lang="tr">PowerPoint sunumu</comment>
<comment xml:lang="uk">презентація PowerPoint</comment>
<comment xml:lang="vi">Trình diễn PowerPoint</comment>
- <comment xml:lang="zh_CN">Microsoft PowerPoint 演示文稿</comment>
+ <comment xml:lang="zh_CN">PowerPoint 演示文稿</comment>
<comment xml:lang="zh_TW">PowerPoint 簡報</comment>
<generic-icon name="x-office-presentation"/>
<glob pattern="*.ppsm"/>
@@ -3388,6 +3510,7 @@
</mime-type>
<mime-type type="application/vnd.ms-powerpoint.template.macroEnabled.12">
<comment>PowerPoint presentation template</comment>
+ <comment xml:lang="ast">Plantía de presentaciones de PowerPoint</comment>
<comment xml:lang="ca">plantilla de presentació de PowerPoint</comment>
<comment xml:lang="cs">šablona prezentace PowerPoint</comment>
<comment xml:lang="da">PowerPoint-præsentationsskabelon</comment>
@@ -3398,6 +3521,7 @@
<comment xml:lang="eu">PowerPoint aurkezpen txantiloia</comment>
<comment xml:lang="fi">PowerPoint-esitysmalli</comment>
<comment xml:lang="fr">modèle de présentation PowerPoint</comment>
+ <comment xml:lang="ga">teimpléad láithreoireachta PowerPoint</comment>
<comment xml:lang="he">תבנית מצגת PowerPoint</comment>
<comment xml:lang="hr">Predložak PowerPoint prezentacije</comment>
<comment xml:lang="hu">PowerPoint bemutatósablon</comment>
@@ -3405,18 +3529,18 @@
<comment xml:lang="id">Templat presentasi PowerPoint</comment>
<comment xml:lang="it">Modello presentazione PowerPoint</comment>
<comment xml:lang="kk">PowerPoint презентация үлгісі</comment>
- <comment xml:lang="ko">파워포인드 프리젠테이션 양식</comment>
+ <comment xml:lang="ko">PowerPoint 프리젠테이션 서식</comment>
<comment xml:lang="oc">Modèl de presentacion PowerPoint</comment>
<comment xml:lang="pl">Szablon prezentacji PowerPoint</comment>
<comment xml:lang="pt">modelo de apresentação PowerPoint</comment>
<comment xml:lang="pt_BR">Modelo de apresentação do PowerPoint</comment>
- <comment xml:lang="ru">шаблон презентации PowerPoint</comment>
+ <comment xml:lang="ru">Шаблон презентации PowerPoint</comment>
<comment xml:lang="sk">Šablóna prezentácie aplikácie PowerPoint</comment>
- <comment xml:lang="sr">Шаблон презентације Пауер Поинта</comment>
+ <comment xml:lang="sr">Шаблон презентације Пауер поинта</comment>
<comment xml:lang="sv">PowerPoint-presentationsmall</comment>
<comment xml:lang="tr">PowerPoint sunum şablonu</comment>
<comment xml:lang="uk">шаблон презентації PowerPoint</comment>
- <comment xml:lang="zh_CN">Microsoft PowerPoint 演示文稿模板</comment>
+ <comment xml:lang="zh_CN">PowerPoint 演示文稿模板</comment>
<comment xml:lang="zh_TW">PowerPoint 簡報範本</comment>
<generic-icon name="x-office-presentation"/>
<glob pattern="*.potm"/>
@@ -3434,6 +3558,7 @@
<comment xml:lang="eu">Office Open XML Visio marrazkia</comment>
<comment xml:lang="fi">Office Open XML Visio -piirros</comment>
<comment xml:lang="fr">dessin Visio Office Open XML</comment>
+ <comment xml:lang="ga">Líníocht Office Open XML Visio</comment>
<comment xml:lang="he">ציור Visio ב־Open XML מבית Office</comment>
<comment xml:lang="hr">Office Open XML Visio crtež</comment>
<comment xml:lang="hu">Office Open XML Visio rajz</comment>
@@ -3445,13 +3570,13 @@
<comment xml:lang="pl">Rysunek Office Open XML Visio</comment>
<comment xml:lang="pt">desenho Office Open XML Visio</comment>
<comment xml:lang="pt_BR">Desenho do Visio em Office Open XML</comment>
- <comment xml:lang="ru">схема Visio формата Office Open XML</comment>
+ <comment xml:lang="ru">Рисунок Visio формата Office Open XML</comment>
<comment xml:lang="sk">Kresba aplikácie Visio Office Open XML</comment>
- <comment xml:lang="sr">Офис опен ИксМЛ Визио цртање</comment>
+ <comment xml:lang="sr">Офисов отворени ИксМЛ Визио цртеж</comment>
<comment xml:lang="sv">Office Open XML Visio-teckning</comment>
<comment xml:lang="tr">Office Open XML Visio Çizimi</comment>
<comment xml:lang="uk">схема VIisio у форматі Office Open XML</comment>
- <comment xml:lang="zh_CN">OOXML Visio 绘图</comment>
+ <comment xml:lang="zh_CN">Office Open XML Visio 绘图</comment>
<comment xml:lang="zh_TW">Office Open XML Visio 繪圖</comment>
<generic-icon name="image-x-generic"/>
<glob pattern="*.vsdx"/>
@@ -3469,6 +3594,7 @@
<comment xml:lang="eu">Office Open XML Visio txantiloia</comment>
<comment xml:lang="fi">Office Open XML Visio -malli</comment>
<comment xml:lang="fr">modèle Visio Office Open XML</comment>
+ <comment xml:lang="ga">Teimpléad Office Open XML Visio</comment>
<comment xml:lang="he">תבנית Visio ב־Open XML מבית Office</comment>
<comment xml:lang="hr">Predložak Office Open XML Visio</comment>
<comment xml:lang="hu">Office Open XML Visio sablon</comment>
@@ -3476,17 +3602,17 @@
<comment xml:lang="id">Templat Visio Office Open XML</comment>
<comment xml:lang="it">Modello Visio Office Open XML</comment>
<comment xml:lang="kk">Office Open XML Visio үлгісі</comment>
- <comment xml:lang="ko">오피스 오픈 XML 비지오 양식</comment>
+ <comment xml:lang="ko">오피스 오픈 XML 비지오 서식</comment>
<comment xml:lang="pl">Szablon Office Open XML Visio</comment>
<comment xml:lang="pt">modelo Office Open XML Visio</comment>
<comment xml:lang="pt_BR">Modelo do Visio em Office Open XML</comment>
- <comment xml:lang="ru">шаблон Visio формата Office Open XML</comment>
+ <comment xml:lang="ru">Шаблон Visio формата Office Open XML</comment>
<comment xml:lang="sk">Šablóna aplikácie Visio Office Open XML</comment>
- <comment xml:lang="sr">Офис опен ИксМЛ Визио шаблон</comment>
+ <comment xml:lang="sr">Офисов отворени ИксМЛ Визио шаблон</comment>
<comment xml:lang="sv">Office Open XML Visio-mall</comment>
<comment xml:lang="tr">Office Open XML Visio Şablonu</comment>
<comment xml:lang="uk">шаблон Visio у форматі Office Open XML</comment>
- <comment xml:lang="zh_CN">OOXML Visio 模板</comment>
+ <comment xml:lang="zh_CN">Office Open XML Visio 模板</comment>
<comment xml:lang="zh_TW">Office Open XML Visio 範本</comment>
<generic-icon name="image-x-generic"/>
<glob pattern="*.vstx"/>
@@ -3500,8 +3626,10 @@
<comment xml:lang="de">Office-Open-XML-Visio-Schablone</comment>
<comment xml:lang="en_GB">Office Open XML Visio Stencil</comment>
<comment xml:lang="es">esténcil en OOXML de Visio</comment>
+ <comment xml:lang="eu">Office Open XML Visio txantiloia</comment>
<comment xml:lang="fi">Office Open XML Visio -kaavio</comment>
<comment xml:lang="fr">stencil Visio Office Open XML</comment>
+ <comment xml:lang="ga">Stionsal Office Open XML Visio</comment>
<comment xml:lang="he">דגם ל־Visio ב־Open XML מבית Office</comment>
<comment xml:lang="hr">Office Open XML Visio šablona</comment>
<comment xml:lang="hu">Office Open XML Visio stencil</comment>
@@ -3513,13 +3641,13 @@
<comment xml:lang="pl">Wzór Office Open XML Visio</comment>
<comment xml:lang="pt">Stencil Office Open XML Visio</comment>
<comment xml:lang="pt_BR">Estêncil do Visio em Office Open XML</comment>
- <comment xml:lang="ru">трафарет Visio формата Office Open XML</comment>
+ <comment xml:lang="ru">Трафарет Visio формата Office Open XML</comment>
<comment xml:lang="sk">Objekt aplikácie Visio Office Open XML</comment>
- <comment xml:lang="sr">Офис опен ИксМЛ Визио шаблон</comment>
+ <comment xml:lang="sr">Офисов отворени ИксМЛ Визио шаблон</comment>
<comment xml:lang="sv">Office Open XML Visio-stencil</comment>
<comment xml:lang="tr">Office Open XML Visio Kalıbı</comment>
<comment xml:lang="uk">трафарет Visio у форматі Office Open XML</comment>
- <comment xml:lang="zh_CN">OOXML Visio 模具</comment>
+ <comment xml:lang="zh_CN">Office Open XML Visio 模具</comment>
<comment xml:lang="zh_TW">Office Open XML Visio 圖形樣本</comment>
<generic-icon name="image-x-generic"/>
<glob pattern="*.vssx"/>
@@ -3537,6 +3665,7 @@
<comment xml:lang="eu">Office Open XML Visio marrazkia</comment>
<comment xml:lang="fi">Office Open XML Visio -piirros</comment>
<comment xml:lang="fr">dessin Visio Office Open XML</comment>
+ <comment xml:lang="ga">Líníocht Office Open XML Visio</comment>
<comment xml:lang="he">ציור Visio ב־Open XML מבית Office</comment>
<comment xml:lang="hr">Office Open XML Visio crtež</comment>
<comment xml:lang="hu">Office Open XML Visio rajz</comment>
@@ -3548,13 +3677,13 @@
<comment xml:lang="pl">Rysunek Office Open XML Visio</comment>
<comment xml:lang="pt">desenho Office Open XML Visio</comment>
<comment xml:lang="pt_BR">Desenho do Visio em Office Open XML</comment>
- <comment xml:lang="ru">схема Visio формата Office Open XML</comment>
+ <comment xml:lang="ru">Рисунок Visio формата Office Open XML</comment>
<comment xml:lang="sk">Kresba aplikácie Visio Office Open XML</comment>
- <comment xml:lang="sr">Офис опен ИксМЛ Визио цртање</comment>
+ <comment xml:lang="sr">Офисов отворени ИксМЛ Визио цртеж</comment>
<comment xml:lang="sv">Office Open XML Visio-teckning</comment>
<comment xml:lang="tr">Office Open XML Visio Çizimi</comment>
<comment xml:lang="uk">схема VIisio у форматі Office Open XML</comment>
- <comment xml:lang="zh_CN">OOXML Visio 绘图</comment>
+ <comment xml:lang="zh_CN">Office Open XML Visio 绘图</comment>
<comment xml:lang="zh_TW">Office Open XML Visio 繪圖</comment>
<generic-icon name="image-x-generic"/>
<glob pattern="*.vsdm"/>
@@ -3572,6 +3701,7 @@
<comment xml:lang="eu">Office Open XML Visio txantiloia</comment>
<comment xml:lang="fi">Office Open XML Visio -malli</comment>
<comment xml:lang="fr">modèle Visio Office Open XML</comment>
+ <comment xml:lang="ga">Teimpléad Office Open XML Visio</comment>
<comment xml:lang="he">תבנית Visio ב־Open XML מבית Office</comment>
<comment xml:lang="hr">Predložak Office Open XML Visio</comment>
<comment xml:lang="hu">Office Open XML Visio sablon</comment>
@@ -3579,17 +3709,17 @@
<comment xml:lang="id">Templat Visio Office Open XML</comment>
<comment xml:lang="it">Modello Visio Office Open XML</comment>
<comment xml:lang="kk">Office Open XML Visio үлгісі</comment>
- <comment xml:lang="ko">오피스 오픈 XML 비지오 양식</comment>
+ <comment xml:lang="ko">오피스 오픈 XML 비지오 서식</comment>
<comment xml:lang="pl">Szablon Office Open XML Visio</comment>
<comment xml:lang="pt">modelo Office Open XML Visio</comment>
<comment xml:lang="pt_BR">Modelo do Visio em Office Open XML</comment>
- <comment xml:lang="ru">шаблон Visio формата Office Open XML</comment>
+ <comment xml:lang="ru">Шаблон Visio формата Office Open XML</comment>
<comment xml:lang="sk">Šablóna aplikácie Visio Office Open XML</comment>
- <comment xml:lang="sr">Офис опен ИксМЛ Визио шаблон</comment>
+ <comment xml:lang="sr">Офисов отворени ИксМЛ Визио шаблон</comment>
<comment xml:lang="sv">Office Open XML Visio-mall</comment>
<comment xml:lang="tr">Office Open XML Visio Şablonu</comment>
<comment xml:lang="uk">шаблон Visio у форматі Office Open XML</comment>
- <comment xml:lang="zh_CN">OOXML Visio 模板</comment>
+ <comment xml:lang="zh_CN">Office Open XML Visio 模板</comment>
<comment xml:lang="zh_TW">Office Open XML Visio 範本</comment>
<generic-icon name="image-x-generic"/>
<glob pattern="*.vstm"/>
@@ -3603,8 +3733,10 @@
<comment xml:lang="de">Office-Open-XML-Visio-Schablone</comment>
<comment xml:lang="en_GB">Office Open XML Visio Stencil</comment>
<comment xml:lang="es">esténcil en OOXML de Visio</comment>
+ <comment xml:lang="eu">Office Open XML Visio txantiloia</comment>
<comment xml:lang="fi">Office Open XML Visio -kaavio</comment>
<comment xml:lang="fr">stencil Visio Office Open XML</comment>
+ <comment xml:lang="ga">Stionsal Office Open XML Visio</comment>
<comment xml:lang="he">דגם ל־Visio ב־Open XML מבית Office</comment>
<comment xml:lang="hr">Office Open XML Visio šablona</comment>
<comment xml:lang="hu">Office Open XML Visio stencil</comment>
@@ -3616,13 +3748,13 @@
<comment xml:lang="pl">Wzór Office Open XML Visio</comment>
<comment xml:lang="pt">Stencil Office Open XML Visio</comment>
<comment xml:lang="pt_BR">Estêncil do Visio em Office Open XML</comment>
- <comment xml:lang="ru">трафарет Visio формата Office Open XML</comment>
+ <comment xml:lang="ru">Трафарет Visio формата Office Open XML</comment>
<comment xml:lang="sk">Objekt aplikácie Visio Office Open XML</comment>
- <comment xml:lang="sr">Офис опен ИксМЛ Визио шаблон</comment>
+ <comment xml:lang="sr">Офисов отворени ИксМЛ Визио шаблон</comment>
<comment xml:lang="sv">Office Open XML Visio-stencil</comment>
<comment xml:lang="tr">Office Open XML Visio Kalıbı</comment>
<comment xml:lang="uk">трафарет Visio у форматі Office Open XML</comment>
- <comment xml:lang="zh_CN">OOXML Visio 模具</comment>
+ <comment xml:lang="zh_CN">Office Open XML Visio 模具</comment>
<comment xml:lang="zh_TW">Office Open XML Visio 圖形樣本</comment>
<generic-icon name="image-x-generic"/>
<glob pattern="*.vssm"/>
@@ -3631,6 +3763,7 @@
<mime-type type="application/vnd.ms-word.document.macroEnabled.12">
<comment>Word document</comment>
<comment xml:lang="ar">مستند Word</comment>
+ <comment xml:lang="ast">Documentu de Word</comment>
<comment xml:lang="be@latin">Dakument Word</comment>
<comment xml:lang="bg">Документ — Word</comment>
<comment xml:lang="ca">document Word</comment>
@@ -3666,16 +3799,16 @@
<comment xml:lang="pt">documento Word</comment>
<comment xml:lang="pt_BR">Documento do Word</comment>
<comment xml:lang="ro">Document Word</comment>
- <comment xml:lang="ru">документ Word</comment>
+ <comment xml:lang="ru">Документ Word</comment>
<comment xml:lang="sk">Dokument Word</comment>
<comment xml:lang="sl">Dokument Word</comment>
<comment xml:lang="sq">Dokument Word</comment>
- <comment xml:lang="sr">Вордов документ</comment>
+ <comment xml:lang="sr">Ворд документ</comment>
<comment xml:lang="sv">Word-dokument</comment>
<comment xml:lang="tr">Word belgesi</comment>
<comment xml:lang="uk">документ Word</comment>
<comment xml:lang="vi">Tài liệu Word</comment>
- <comment xml:lang="zh_CN">Microsoft Word 文档</comment>
+ <comment xml:lang="zh_CN">Word 文档</comment>
<comment xml:lang="zh_TW">Word 文件</comment>
<generic-icon name="x-office-document"/>
<glob pattern="*.docm"/>
@@ -3683,6 +3816,7 @@
</mime-type>
<mime-type type="application/vnd.ms-word.template.macroEnabled.12">
<comment>Word document template</comment>
+ <comment xml:lang="ast">Plantía de documentu de Word</comment>
<comment xml:lang="ca">plantilla de document Word</comment>
<comment xml:lang="cs">šablona dokumentu Word</comment>
<comment xml:lang="da">Word-dokumentskabelon</comment>
@@ -3693,6 +3827,7 @@
<comment xml:lang="eu">Word dokumentuaren txantiloia</comment>
<comment xml:lang="fi">Word-asiakirjamalli</comment>
<comment xml:lang="fr">modèle de document Word</comment>
+ <comment xml:lang="ga">teimpléad Word</comment>
<comment xml:lang="he">תבנית מסמך Word</comment>
<comment xml:lang="hr">Predložak Word dokumenta</comment>
<comment xml:lang="hu">Word dokumentumsablon</comment>
@@ -3700,18 +3835,18 @@
<comment xml:lang="id">Templat dokumen Word</comment>
<comment xml:lang="it">Modello documento Word</comment>
<comment xml:lang="kk">Word құжатының үлгісі</comment>
- <comment xml:lang="ko">워드 문서 양식</comment>
+ <comment xml:lang="ko">Word 문서 서식</comment>
<comment xml:lang="oc">modèl de document Word</comment>
<comment xml:lang="pl">Szablon dokumentu Word</comment>
<comment xml:lang="pt">modelo de documento Word</comment>
<comment xml:lang="pt_BR">Modelo de documento do Word</comment>
- <comment xml:lang="ru">шаблон документа Word</comment>
+ <comment xml:lang="ru">Шаблон документа Word</comment>
<comment xml:lang="sk">Šablóna dokumentu aplikácie Word</comment>
- <comment xml:lang="sr">Шаблон документа Ворда</comment>
+ <comment xml:lang="sr">Шаблон Ворд документа</comment>
<comment xml:lang="sv">Word-dokumentmall</comment>
<comment xml:lang="tr">Word belgesi şablonu</comment>
<comment xml:lang="uk">шаблон документа Word</comment>
- <comment xml:lang="zh_CN">Microsoft Word 文档模板</comment>
+ <comment xml:lang="zh_CN">Word 文档模板</comment>
<comment xml:lang="zh_TW">Word 文件範本</comment>
<generic-icon name="x-office-document"/>
<glob pattern="*.dotm"/>
@@ -3720,6 +3855,7 @@
<mime-type type="application/oxps">
<comment>XPS document</comment>
<comment xml:lang="ar">مستند XPS</comment>
+ <comment xml:lang="ast">Documentu XPS</comment>
<comment xml:lang="be@latin">Dakument XPS</comment>
<comment xml:lang="bg">Документ — XPS</comment>
<comment xml:lang="ca">document XPS</comment>
@@ -3755,7 +3891,7 @@
<comment xml:lang="pt">documento XPS</comment>
<comment xml:lang="pt_BR">Documento XPS</comment>
<comment xml:lang="ro">Document XPS</comment>
- <comment xml:lang="ru">документ XPS</comment>
+ <comment xml:lang="ru">Документ XPS</comment>
<comment xml:lang="sk">Dokument XPS</comment>
<comment xml:lang="sl">Dokument XPS</comment>
<comment xml:lang="sq">Dokument XPS</comment>
@@ -3773,10 +3909,12 @@
<glob pattern="*.oxps"/>
<glob pattern="*.xps"/>
<alias type="application/vnd.ms-xpsdocument"/>
+ <alias type="application/xps"/>
</mime-type>
<mime-type type="application/vnd.ms-works">
<comment>Microsoft Works document</comment>
<comment xml:lang="ar">مستند Microsoft Works</comment>
+ <comment xml:lang="ast">Documentu de Microsoft Works</comment>
<comment xml:lang="be@latin">Dakument Microsoft Works</comment>
<comment xml:lang="bg">Документ — Microsoft Works</comment>
<comment xml:lang="ca">document de Microsoft Works</comment>
@@ -3812,11 +3950,11 @@
<comment xml:lang="pt">documento Microsoft Works</comment>
<comment xml:lang="pt_BR">Documento do Microsoft Works</comment>
<comment xml:lang="ro">Document Microsoft Works</comment>
- <comment xml:lang="ru">документ Microsoft Works</comment>
+ <comment xml:lang="ru">Документ Microsoft Works</comment>
<comment xml:lang="sk">Dokument Microsoft Works</comment>
<comment xml:lang="sl">Dokument Microsoft Works</comment>
<comment xml:lang="sq">Dokument Microsoft Works</comment>
- <comment xml:lang="sr">Микрософтов Воркс документ</comment>
+ <comment xml:lang="sr">документ Мајкрософт Воркса</comment>
<comment xml:lang="sv">Microsoft Works-dokument</comment>
<comment xml:lang="tr">Microsoft Works belgesi</comment>
<comment xml:lang="uk">документ Microsoft Works</comment>
@@ -3833,6 +3971,7 @@
</mime-type>
<mime-type type="application/vnd.visio">
<comment>Microsoft Visio document</comment>
+ <comment xml:lang="ast">Documentu de Microsoft Visio</comment>
<comment xml:lang="bg">Документ — Microsoft Visio</comment>
<comment xml:lang="ca">document de Microsoft Visio</comment>
<comment xml:lang="cs">dokument Microsoft Visio</comment>
@@ -3844,6 +3983,7 @@
<comment xml:lang="eu">Microsoft Visio dokumentua</comment>
<comment xml:lang="fi">Microsoft Visio -asiakirja</comment>
<comment xml:lang="fr">document Microsoft Visio</comment>
+ <comment xml:lang="ga">cáipéis Microsoft Visio</comment>
<comment xml:lang="gl">Documento de Microsoft Visio</comment>
<comment xml:lang="he">מסמך </comment>
<comment xml:lang="hr">Microsoft Visio dokument</comment>
@@ -3861,10 +4001,10 @@
<comment xml:lang="pl">Dokument Microsoft Visio</comment>
<comment xml:lang="pt">documento Microsoft Visio</comment>
<comment xml:lang="pt_BR">Documento do Microsoft Visio</comment>
- <comment xml:lang="ru">документ Microsoft Visio</comment>
+ <comment xml:lang="ru">Документ Microsoft Visio</comment>
<comment xml:lang="sk">Dokument Microsoft Visio</comment>
<comment xml:lang="sl">Dokument Microsoft Visio</comment>
- <comment xml:lang="sr">Микрософтов Визио документ</comment>
+ <comment xml:lang="sr">документ Мајкрософт Визиа</comment>
<comment xml:lang="sv">Microsoft Visio-dokument</comment>
<comment xml:lang="tr">Microsoft Visio belgesi</comment>
<comment xml:lang="uk">документ Microsoft Visio</comment>
@@ -3880,6 +4020,7 @@
<mime-type type="application/msword">
<comment>Word document</comment>
<comment xml:lang="ar">مستند Word</comment>
+ <comment xml:lang="ast">Documentu de Word</comment>
<comment xml:lang="be@latin">Dakument Word</comment>
<comment xml:lang="bg">Документ — Word</comment>
<comment xml:lang="ca">document Word</comment>
@@ -3915,16 +4056,16 @@
<comment xml:lang="pt">documento Word</comment>
<comment xml:lang="pt_BR">Documento do Word</comment>
<comment xml:lang="ro">Document Word</comment>
- <comment xml:lang="ru">документ Word</comment>
+ <comment xml:lang="ru">Документ Word</comment>
<comment xml:lang="sk">Dokument Word</comment>
<comment xml:lang="sl">Dokument Word</comment>
<comment xml:lang="sq">Dokument Word</comment>
- <comment xml:lang="sr">Вордов документ</comment>
+ <comment xml:lang="sr">Ворд документ</comment>
<comment xml:lang="sv">Word-dokument</comment>
<comment xml:lang="tr">Word belgesi</comment>
<comment xml:lang="uk">документ Word</comment>
<comment xml:lang="vi">Tài liệu Word</comment>
- <comment xml:lang="zh_CN">Microsoft Word 文档</comment>
+ <comment xml:lang="zh_CN">Word 文档</comment>
<comment xml:lang="zh_TW">Word 文件</comment>
<sub-class-of type="application/x-ole-storage"/>
<generic-icon name="x-office-document"/>
@@ -3947,6 +4088,7 @@
<mime-type type="application/msword-template">
<comment>Word template</comment>
<comment xml:lang="ar">قالب Word</comment>
+ <comment xml:lang="ast">Plantía de Word</comment>
<comment xml:lang="be@latin">Šablon Word</comment>
<comment xml:lang="bg">Шаблон за документи — Word</comment>
<comment xml:lang="ca">plantilla de Word</comment>
@@ -3982,11 +4124,11 @@
<comment xml:lang="pt">modelo Word</comment>
<comment xml:lang="pt_BR">Modelo do Word</comment>
<comment xml:lang="ro">Șablon Word</comment>
- <comment xml:lang="ru">шаблон Word</comment>
+ <comment xml:lang="ru">Шаблон Word</comment>
<comment xml:lang="sk">Šablóna Word</comment>
<comment xml:lang="sl">Predloga dokumenta Microsoft Word</comment>
<comment xml:lang="sq">Model Word</comment>
- <comment xml:lang="sr">Вордов шаблон</comment>
+ <comment xml:lang="sr">Ворд шаблон</comment>
<comment xml:lang="sv">Word-mall</comment>
<comment xml:lang="tr">Word şablonu</comment>
<comment xml:lang="uk">шаблон Word</comment>
@@ -3999,6 +4141,7 @@
</mime-type>
<mime-type type="application/gml+xml">
<comment>GML document</comment>
+ <comment xml:lang="ast">Documentu GML</comment>
<comment xml:lang="ca">document GML</comment>
<comment xml:lang="cs">dokument GML</comment>
<comment xml:lang="da">GML-dokument</comment>
@@ -4009,6 +4152,7 @@
<comment xml:lang="eu">GML dokumentua</comment>
<comment xml:lang="fi">GML-asiakirja</comment>
<comment xml:lang="fr">document GML</comment>
+ <comment xml:lang="ga">cáipéis GML</comment>
<comment xml:lang="gl">Documento GML</comment>
<comment xml:lang="he">מסמך GML</comment>
<comment xml:lang="hr">GML dokument</comment>
@@ -4024,7 +4168,7 @@
<comment xml:lang="pl">Dokument GML</comment>
<comment xml:lang="pt">documento GML</comment>
<comment xml:lang="pt_BR">Documento GML</comment>
- <comment xml:lang="ru">документ GML</comment>
+ <comment xml:lang="ru">Документ GML</comment>
<comment xml:lang="sk">Dokument GML</comment>
<comment xml:lang="sl">Dokument GML</comment>
<comment xml:lang="sr">ГМЛ документ</comment>
@@ -4077,7 +4221,7 @@
<comment xml:lang="pt">ficheiro de procura GNUnet</comment>
<comment xml:lang="pt_BR">Arquivo de pesquisa do GNUnet</comment>
<comment xml:lang="ro">Fișier căutare GNUnet</comment>
- <comment xml:lang="ru">файл поиска GNUnet</comment>
+ <comment xml:lang="ru">Файл поиска GNUnet</comment>
<comment xml:lang="sk">Vyhľadávací súbor GNUnet</comment>
<comment xml:lang="sl">Iskalna datoteka GNUnet</comment>
<comment xml:lang="sq">File kërkimi GNUnet</comment>
@@ -4096,6 +4240,7 @@
<mime-type type="application/vnd.ms-tnef">
<comment>TNEF message</comment>
<comment xml:lang="ar">رسالة TNEF</comment>
+ <comment xml:lang="ast">Mensaxe TNEF</comment>
<comment xml:lang="be@latin">List TNEF</comment>
<comment xml:lang="bg">Съобщение — TNEF</comment>
<comment xml:lang="ca">missatge TNEF</comment>
@@ -4130,7 +4275,7 @@
<comment xml:lang="pt">mensagem TNEF</comment>
<comment xml:lang="pt_BR">Mensagem TNEF</comment>
<comment xml:lang="ro">Mesaj TNEF</comment>
- <comment xml:lang="ru">сообщение TNEF</comment>
+ <comment xml:lang="ru">Сообщение TNEF</comment>
<comment xml:lang="sk">Správa TNEF</comment>
<comment xml:lang="sl">Datoteka sporočila TNEF</comment>
<comment xml:lang="sq">Mesazh TNEF</comment>
@@ -4192,16 +4337,16 @@
<comment xml:lang="pt">folha de cálculo do StarCalc</comment>
<comment xml:lang="pt_BR">Planilha do StarCalc</comment>
<comment xml:lang="ro">Foaie de calcul StarCalc</comment>
- <comment xml:lang="ru">электронная таблица StarCalc</comment>
+ <comment xml:lang="ru">Электронная таблица StarCalc</comment>
<comment xml:lang="sk">Zošit StarCalc</comment>
<comment xml:lang="sl">Preglednica StarCalc</comment>
<comment xml:lang="sq">Fletë llogaritjesh StarCalc</comment>
- <comment xml:lang="sr">Табела Стар Рачуна</comment>
+ <comment xml:lang="sr">Стар калк табела</comment>
<comment xml:lang="sv">StarCalc-kalkylblad</comment>
<comment xml:lang="tr">StarCalc çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця StarCalc</comment>
<comment xml:lang="vi">Bảng tính StarCalc</comment>
- <comment xml:lang="zh_CN">STarCalc 工作簿</comment>
+ <comment xml:lang="zh_CN">StarCalc 电子表格</comment>
<comment xml:lang="zh_TW">StarCalc 試算表</comment>
<generic-icon name="x-office-spreadsheet"/>
<glob pattern="*.sdc"/>
@@ -4247,7 +4392,7 @@
<comment xml:lang="pt">gráfico do StarChart</comment>
<comment xml:lang="pt_BR">Gráfico do StarChart</comment>
<comment xml:lang="ro">Diagramă StarChart</comment>
- <comment xml:lang="ru">диаграмма StarChart</comment>
+ <comment xml:lang="ru">Диаграмма StarChart</comment>
<comment xml:lang="sk">Graf StarChart</comment>
<comment xml:lang="sl">Datoteka grafikona StarChart</comment>
<comment xml:lang="sq">Grafik StarChart</comment>
@@ -4256,7 +4401,7 @@
<comment xml:lang="tr">StarChart çizgelgesi</comment>
<comment xml:lang="uk">діаграма StarChart</comment>
<comment xml:lang="vi">Đồ thị StarChart</comment>
- <comment xml:lang="zh_CN">STarChart 图表</comment>
+ <comment xml:lang="zh_CN">StarCalc 图表</comment>
<comment xml:lang="zh_TW">StarChart 圖表</comment>
<generic-icon name="x-office-spreadsheet"/>
<glob pattern="*.sds"/>
@@ -4302,7 +4447,7 @@
<comment xml:lang="pt">desenho do StarDraw</comment>
<comment xml:lang="pt_BR">Desenho do StarDraw</comment>
<comment xml:lang="ro">Desen StarDraw</comment>
- <comment xml:lang="ru">изображение StarDraw</comment>
+ <comment xml:lang="ru">Рисунок StarDraw</comment>
<comment xml:lang="sk">Kresba StarDraw</comment>
<comment xml:lang="sl">Datoteka risbe StarDraw</comment>
<comment xml:lang="sq">Vizatim StarDraw</comment>
@@ -4311,7 +4456,7 @@
<comment xml:lang="tr">StarDraw çizimi</comment>
<comment xml:lang="uk">малюнок StarDraw</comment>
<comment xml:lang="vi">Bản vẽ StarDraw</comment>
- <comment xml:lang="zh_CN">STarDraw 绘图</comment>
+ <comment xml:lang="zh_CN">StarDraw 绘图</comment>
<comment xml:lang="zh_TW">StarDraw 繪圖</comment>
<generic-icon name="image-x-generic"/>
<glob pattern="*.sda"/>
@@ -4357,7 +4502,7 @@
<comment xml:lang="pt">apresentação do StarImpress</comment>
<comment xml:lang="pt_BR">Apresentação do StarImpress</comment>
<comment xml:lang="ro">Prezentare StarImpress</comment>
- <comment xml:lang="ru">презентация StarImpress</comment>
+ <comment xml:lang="ru">Презентация StarImpress</comment>
<comment xml:lang="sk">Prezentácia StarImpress</comment>
<comment xml:lang="sl">Predstavitev StarImpress</comment>
<comment xml:lang="sq">Prezantim StarImpress</comment>
@@ -4366,7 +4511,7 @@
<comment xml:lang="tr">StarImpress sunumu</comment>
<comment xml:lang="uk">презентація StarImpress</comment>
<comment xml:lang="vi">Trình diễn StarImpress</comment>
- <comment xml:lang="zh_CN">STarImpress 演示文稿</comment>
+ <comment xml:lang="zh_CN">StarImpress 演示文稿</comment>
<comment xml:lang="zh_TW">StarImpress 簡報檔</comment>
<generic-icon name="x-office-presentation"/>
<glob pattern="*.sdd"/>
@@ -4411,7 +4556,7 @@
<comment xml:lang="pt">email do StarMail</comment>
<comment xml:lang="pt_BR">E-mail do StarMail</comment>
<comment xml:lang="ro">Email StarEmail</comment>
- <comment xml:lang="ru">электронное письмо StarMail</comment>
+ <comment xml:lang="ru">Электронное письмо StarMail</comment>
<comment xml:lang="sk">E-mail StarMail</comment>
<comment xml:lang="sl">Datoteka pošte StarMail</comment>
<comment xml:lang="sq">Mesazh StarMail</comment>
@@ -4420,7 +4565,7 @@
<comment xml:lang="tr">StarMail epostası</comment>
<comment xml:lang="uk">поштове повідомлення StarMail</comment>
<comment xml:lang="vi">Thư điện tử StarMail</comment>
- <comment xml:lang="zh_CN">STarMail 电子邮件</comment>
+ <comment xml:lang="zh_CN">StarMail 电子邮件</comment>
<comment xml:lang="zh_TW">StarMail 郵件</comment>
<glob pattern="*.smd"/>
</mime-type>
@@ -4463,7 +4608,7 @@
<comment xml:lang="pt">fórmula do StarMath</comment>
<comment xml:lang="pt_BR">Fórmula do StarMath</comment>
<comment xml:lang="ro">Formulă StarMath</comment>
- <comment xml:lang="ru">формула StarMath</comment>
+ <comment xml:lang="ru">Формула StarMath</comment>
<comment xml:lang="sk">Vzorec StarMath</comment>
<comment xml:lang="sl">Datoteka formule StarMath</comment>
<comment xml:lang="sq">Formulë StarMath</comment>
@@ -4472,7 +4617,7 @@
<comment xml:lang="tr">StarMath formülü</comment>
<comment xml:lang="uk">формула StarMath</comment>
<comment xml:lang="vi">Công thức StarMath</comment>
- <comment xml:lang="zh_CN">STarMath 公式</comment>
+ <comment xml:lang="zh_CN">StarMath 公式</comment>
<comment xml:lang="zh_TW">StarMath 公式</comment>
<generic-icon name="x-office-document"/>
<glob pattern="*.smf"/>
@@ -4480,6 +4625,7 @@
<mime-type type="application/vnd.stardivision.writer">
<comment>StarWriter document</comment>
<comment xml:lang="ar">مستند StarWriter</comment>
+ <comment xml:lang="ast">Documentu de StarWriter</comment>
<comment xml:lang="az">StarWriter sənədi</comment>
<comment xml:lang="be@latin">Dakument StarWriter</comment>
<comment xml:lang="bg">Документ — StarWriter</comment>
@@ -4518,7 +4664,7 @@
<comment xml:lang="pt">documento do StarWriter</comment>
<comment xml:lang="pt_BR">Documento do StarWriter</comment>
<comment xml:lang="ro">Document StarWriter</comment>
- <comment xml:lang="ru">документ StarWriter</comment>
+ <comment xml:lang="ru">Документ StarWriter</comment>
<comment xml:lang="sk">Dokument StarWriter</comment>
<comment xml:lang="sl">Dokument StarWriter</comment>
<comment xml:lang="sq">Dokument StarWriter</comment>
@@ -4527,7 +4673,7 @@
<comment xml:lang="tr">StarWriter belgesi</comment>
<comment xml:lang="uk">документ StarWriter</comment>
<comment xml:lang="vi">Tài liệu StarWriter</comment>
- <comment xml:lang="zh_CN">STarWriter 文档</comment>
+ <comment xml:lang="zh_CN">StarWriter 文档</comment>
<comment xml:lang="zh_TW">StarWriter 文件</comment>
<generic-icon name="x-office-document"/>
<glob pattern="*.sdw"/>
@@ -4576,7 +4722,7 @@
<comment xml:lang="pt">folha de cálculo OpenOffice Calc</comment>
<comment xml:lang="pt_BR">Planilha do OpenOffice Calc</comment>
<comment xml:lang="ro">Foaie de calcul OpenOffice Calc</comment>
- <comment xml:lang="ru">электронная таблица OpenOffice Calc</comment>
+ <comment xml:lang="ru">Электронная таблица OpenOffice Calc</comment>
<comment xml:lang="sk">Zošit OpenOffice Calc</comment>
<comment xml:lang="sl">Razpredelnica OpenOffice.org Calc</comment>
<comment xml:lang="sq">Fletë llogaritjesh OpenOffice Calc</comment>
@@ -4585,7 +4731,7 @@
<comment xml:lang="tr">OpenOffice Calc çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця OpenOffice Calc</comment>
<comment xml:lang="vi">Bảng tính Calc của OpenOffice.org</comment>
- <comment xml:lang="zh_CN">OpenOffice.org Calc 工作簿</comment>
+ <comment xml:lang="zh_CN">OpenOffice Calc 电子表格</comment>
<comment xml:lang="zh_TW">OpenOffice Calc 試算表</comment>
<sub-class-of type="application/zip"/>
<generic-icon name="x-office-spreadsheet"/>
@@ -4636,7 +4782,7 @@
<comment xml:lang="pt">modelo OpenOffice Calc</comment>
<comment xml:lang="pt_BR">Modelo do OpenOffice Calc</comment>
<comment xml:lang="ro">Șablon OpenOffice Calc</comment>
- <comment xml:lang="ru">шаблон OpenOffice Calc</comment>
+ <comment xml:lang="ru">Шаблон OpenOffice Calc</comment>
<comment xml:lang="sk">Šablóna OpenOffice Calc</comment>
<comment xml:lang="sl">Predloga OpenOffice.org Calc</comment>
<comment xml:lang="sq">Model OpenOffice Calc</comment>
@@ -4645,7 +4791,7 @@
<comment xml:lang="tr">OpenOffice Calc şablonu</comment>
<comment xml:lang="uk">шаблон ел.таблиці OpenOffice Calc</comment>
<comment xml:lang="vi">Mẫu bảng tính Calc của OpenOffice.org</comment>
- <comment xml:lang="zh_CN">OpenOffice.org Calc 工作簿模板</comment>
+ <comment xml:lang="zh_CN">OpenOffice Calc 模板</comment>
<comment xml:lang="zh_TW">OpenOffice Calc 範本</comment>
<sub-class-of type="application/zip"/>
<generic-icon name="x-office-spreadsheet"/>
@@ -4696,7 +4842,7 @@
<comment xml:lang="pt">desenho OpenOffice Draw</comment>
<comment xml:lang="pt_BR">Desenho do OpenOffice Draw</comment>
<comment xml:lang="ro">Desen OpenOffice Draw</comment>
- <comment xml:lang="ru">изображение OpenOffice Draw</comment>
+ <comment xml:lang="ru">Рисунок OpenOffice Draw</comment>
<comment xml:lang="sk">Kresba OpenOffice Draw</comment>
<comment xml:lang="sl">Datoteka risbe OpenOffice.org Draw</comment>
<comment xml:lang="sq">Vizatim OpenOffice Draw</comment>
@@ -4705,7 +4851,7 @@
<comment xml:lang="tr">OpenOffice Draw çizimi</comment>
<comment xml:lang="uk">малюнок OpenOffice Draw</comment>
<comment xml:lang="vi">Bản vẽ Draw của OpenOffice.org</comment>
- <comment xml:lang="zh_CN">OpenOffice.org Draw 绘图</comment>
+ <comment xml:lang="zh_CN">OpenOffice Draw 绘图</comment>
<comment xml:lang="zh_TW">OpenOffice Draw 繪圖</comment>
<sub-class-of type="application/zip"/>
<generic-icon name="image-x-generic"/>
@@ -4756,7 +4902,7 @@
<comment xml:lang="pt">modelo OpenOffice Draw</comment>
<comment xml:lang="pt_BR">Modelo do OpenOffice Draw</comment>
<comment xml:lang="ro">Șablon OpenOffice Draw</comment>
- <comment xml:lang="ru">шаблон OpenOffice Draw</comment>
+ <comment xml:lang="ru">Шаблон OpenOffice Draw</comment>
<comment xml:lang="sk">Šablóna OpenOffice Draw</comment>
<comment xml:lang="sl">Predloga OpenOffice.org Draw</comment>
<comment xml:lang="sq">Model OpenOffice Draw</comment>
@@ -4765,7 +4911,7 @@
<comment xml:lang="tr">OpenOffice Draw şablonu</comment>
<comment xml:lang="uk">шаблон малюнку OpenOffice Draw</comment>
<comment xml:lang="vi">Mẫu bản vẽ Draw của OpenOffice.org</comment>
- <comment xml:lang="zh_CN">OpenOffice.org Draw 绘图模板</comment>
+ <comment xml:lang="zh_CN">OpenOffice Draw 模板</comment>
<comment xml:lang="zh_TW">OpenOffice Draw 範本</comment>
<sub-class-of type="application/zip"/>
<generic-icon name="image-x-generic"/>
@@ -4818,7 +4964,7 @@
<comment xml:lang="pt">apresentação OpenOffice Impress</comment>
<comment xml:lang="pt_BR">Apresentação do OpenOffice Impress</comment>
<comment xml:lang="ro">Prezentare OpenOffice Impress</comment>
- <comment xml:lang="ru">презентация OpenOffice Impress</comment>
+ <comment xml:lang="ru">Презентация OpenOffice Impress</comment>
<comment xml:lang="sk">Prezentácia OpenOffice Impress</comment>
<comment xml:lang="sl">Predstavitev OpenOffice.org Impress</comment>
<comment xml:lang="sq">Prezantim OpenOffice Impress</comment>
@@ -4827,7 +4973,7 @@
<comment xml:lang="tr">OpenOffice Impress sunumu</comment>
<comment xml:lang="uk">презентація OpenOffice Impress</comment>
<comment xml:lang="vi">Trình diễn Impress của OpenOffice.org</comment>
- <comment xml:lang="zh_CN">OpenOffice.org Impress 演示文稿</comment>
+ <comment xml:lang="zh_CN">OpenOffice Impress 演示文稿</comment>
<comment xml:lang="zh_TW">OpenOffice Impress 簡報</comment>
<sub-class-of type="application/zip"/>
<generic-icon name="x-office-presentation"/>
@@ -4878,7 +5024,7 @@
<comment xml:lang="pt">modelo OpenOffice Impress</comment>
<comment xml:lang="pt_BR">Modelo do OpenOffice Impress</comment>
<comment xml:lang="ro">Șablon OpenOffice Impress</comment>
- <comment xml:lang="ru">шаблон OpenOffice Impress</comment>
+ <comment xml:lang="ru">Шаблон OpenOffice Impress</comment>
<comment xml:lang="sk">Šablóna OpenOffice Impress</comment>
<comment xml:lang="sl">Predloga OpenOffice.org Impress</comment>
<comment xml:lang="sq">Model OpenOffice Impress</comment>
@@ -4887,7 +5033,7 @@
<comment xml:lang="tr">OpenOffice Impress şablonu</comment>
<comment xml:lang="uk">шаблон презентації OpenOffice Impress</comment>
<comment xml:lang="vi">Mẫu trình diễn Impress của OpenOffice.org</comment>
- <comment xml:lang="zh_CN">OpenOffice.org Impress 演示文稿模板</comment>
+ <comment xml:lang="zh_CN">OpenOffice Impress 模板</comment>
<comment xml:lang="zh_TW">OpenOffice Impress 範本</comment>
<sub-class-of type="application/zip"/>
<generic-icon name="x-office-presentation"/>
@@ -4938,7 +5084,7 @@
<comment xml:lang="pt">fórmula OpenOffice Math</comment>
<comment xml:lang="pt_BR">Fórmula do OpenOffice Math</comment>
<comment xml:lang="ro">Formulă OpenOffice Math</comment>
- <comment xml:lang="ru">формула OpenOffice Math</comment>
+ <comment xml:lang="ru">Формула OpenOffice Math</comment>
<comment xml:lang="sk">Vzorec OpenOffice Math</comment>
<comment xml:lang="sl">Dokument formule OpenOffice.org Math</comment>
<comment xml:lang="sq">Formulë OpenOffice Math</comment>
@@ -4947,7 +5093,7 @@
<comment xml:lang="tr">OpenOffice Math formülü</comment>
<comment xml:lang="uk">формула OpenOffice Math</comment>
<comment xml:lang="vi">Công thức Math của OpenOffice.org</comment>
- <comment xml:lang="zh_CN">OpenOffice.org Math 公式</comment>
+ <comment xml:lang="zh_CN">OpenOffice Math 公式</comment>
<comment xml:lang="zh_TW">OpenOffice Math 公式</comment>
<sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
@@ -4963,6 +5109,7 @@
<mime-type type="application/vnd.sun.xml.writer">
<comment>OpenOffice Writer document</comment>
<comment xml:lang="ar">مستند Writer المكتب المفتوح</comment>
+ <comment xml:lang="ast">Documentu d'OpenOffice Writer</comment>
<comment xml:lang="az">OpenOffice Writer sənədi</comment>
<comment xml:lang="be@latin">Dakument OpenOffice Writer</comment>
<comment xml:lang="bg">Документ — OpenOffice Writer</comment>
@@ -5000,7 +5147,7 @@
<comment xml:lang="pt">documento OpenOffice Writer</comment>
<comment xml:lang="pt_BR">Documento do OpenOffice Writer</comment>
<comment xml:lang="ro">Document OpenOffice Writer</comment>
- <comment xml:lang="ru">документ OpenOffice Writer</comment>
+ <comment xml:lang="ru">Документ OpenOffice Writer</comment>
<comment xml:lang="sk">Dokument OpenOffice Writer</comment>
<comment xml:lang="sl">Dokument OpenOffice.org Writer</comment>
<comment xml:lang="sq">Dokument OpenOffice Writer</comment>
@@ -5009,7 +5156,7 @@
<comment xml:lang="tr">OpenOffice Writer belgesi</comment>
<comment xml:lang="uk">документ OpenOffice Writer</comment>
<comment xml:lang="vi">Tài liệu Writer của OpenOffice.org</comment>
- <comment xml:lang="zh_CN">OpenOffice.org Writer 文档</comment>
+ <comment xml:lang="zh_CN">OpenOffice Writer 文档</comment>
<comment xml:lang="zh_TW">OpenOffice Writer 文件</comment>
<sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
@@ -5025,6 +5172,7 @@
<mime-type type="application/vnd.sun.xml.writer.global">
<comment>OpenOffice Writer global document</comment>
<comment xml:lang="ar">مستند المكتب المفتوح Writer العالمي</comment>
+ <comment xml:lang="ast">Documentu global d'OpenOffice Writer</comment>
<comment xml:lang="az">OpenOffice Writer qlobal sənədi</comment>
<comment xml:lang="be@latin">Hlabalny dakument OpenOffice Writer</comment>
<comment xml:lang="bg">Документ - глобален — OpenOffice Writer</comment>
@@ -5062,7 +5210,7 @@
<comment xml:lang="pt">documento global OpenOffice Writer</comment>
<comment xml:lang="pt_BR">Documento global do OpenOffice Writer</comment>
<comment xml:lang="ro">Document global OpenOffice Writer</comment>
- <comment xml:lang="ru">основной документ OpenOffice Writer</comment>
+ <comment xml:lang="ru">Основной документ OpenOffice Writer</comment>
<comment xml:lang="sk">Globálny dokument OpenOffice Writer</comment>
<comment xml:lang="sl">Splošni dokument OpenOffice.org Writer</comment>
<comment xml:lang="sq">Dokument i përgjithshëm OpenOffice Writer</comment>
@@ -5071,7 +5219,7 @@
<comment xml:lang="tr">OpenOffice Writer global belgesi</comment>
<comment xml:lang="uk">загальний документ OpenOffice Writer</comment>
<comment xml:lang="vi">Tài liệu toàn cục Writer của OpenOffice.org</comment>
- <comment xml:lang="zh_CN">OpenOffice.org Writer 全局文档</comment>
+ <comment xml:lang="zh_CN">OpenOffice Writer 全局文档</comment>
<comment xml:lang="zh_TW">OpenOffice Writer 主控文件</comment>
<sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
@@ -5125,7 +5273,7 @@
<comment xml:lang="pt">modelo OpenOffice Writer</comment>
<comment xml:lang="pt_BR">Modelo do OpenOffice Writer</comment>
<comment xml:lang="ro">Șablon OpenOffice Writer</comment>
- <comment xml:lang="ru">шаблон OpenOffice Writer</comment>
+ <comment xml:lang="ru">Шаблон OpenOffice Writer</comment>
<comment xml:lang="sk">Šablóna OpenOffice Writer</comment>
<comment xml:lang="sl">Predloga OpenOffice.org Writer</comment>
<comment xml:lang="sq">Model OpenOffice Writer</comment>
@@ -5134,7 +5282,7 @@
<comment xml:lang="tr">OpenOffice Writer şablonu</comment>
<comment xml:lang="uk">шаблон документа OpenOffice Writer</comment>
<comment xml:lang="vi">Mẫu tài liệu Writer của OpenOffice.org</comment>
- <comment xml:lang="zh_CN">OpenOffice.org Writer 文档模板</comment>
+ <comment xml:lang="zh_CN">OpenOffice Writer 模板</comment>
<comment xml:lang="zh_TW">OpenOffice Writer 範本</comment>
<sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
@@ -5150,6 +5298,7 @@
<mime-type type="application/vnd.oasis.opendocument.text">
<comment>ODT document</comment>
<comment xml:lang="ar">مستند ODT</comment>
+ <comment xml:lang="ast">Documentu ODT</comment>
<comment xml:lang="be@latin">Dakument ODT</comment>
<comment xml:lang="bg">Документ — ODT</comment>
<comment xml:lang="ca">document ODT</comment>
@@ -5186,7 +5335,7 @@
<comment xml:lang="pt">documento ODT</comment>
<comment xml:lang="pt_BR">Documento ODT</comment>
<comment xml:lang="ro">Document ODT</comment>
- <comment xml:lang="ru">документ ODT</comment>
+ <comment xml:lang="ru">Документ ODT</comment>
<comment xml:lang="sk">Dokument ODT</comment>
<comment xml:lang="sl">Dokument ODT</comment>
<comment xml:lang="sq">Dokument ODT</comment>
@@ -5213,6 +5362,7 @@
<mime-type type="application/vnd.oasis.opendocument.text-flat-xml">
<comment>ODT document (Flat XML)</comment>
<comment xml:lang="ar">مستند ODT (Flat XML)</comment>
+ <comment xml:lang="ast">Documentu ODT (XML planu)</comment>
<comment xml:lang="bg">Документ — ODT (само XML)</comment>
<comment xml:lang="ca">document ODT (XML pla)</comment>
<comment xml:lang="cs">dokument ODT (Flat XML)</comment>
@@ -5245,14 +5395,14 @@
<comment xml:lang="pt">documento ODT (XML plano)</comment>
<comment xml:lang="pt_BR">Documento ODT (Flat XML)</comment>
<comment xml:lang="ro">Document ODT (XML simplu)</comment>
- <comment xml:lang="ru">документ ODT (простой XML)</comment>
+ <comment xml:lang="ru">Документ ODT (простой XML)</comment>
<comment xml:lang="sk">Dokument ODT (čisté XML)</comment>
<comment xml:lang="sl">Datoteka dokumenta ODT (nepovezan XML)</comment>
<comment xml:lang="sr">ОДТ документ (Обични ИксМЛ)</comment>
<comment xml:lang="sv">ODT-dokument (platt XML)</comment>
<comment xml:lang="tr">ODT belgesi (Düz XML)</comment>
<comment xml:lang="uk">документ ODT (Flat XML)</comment>
- <comment xml:lang="zh_CN">ODT 文档(Flat XML)</comment>
+ <comment xml:lang="zh_CN">ODT 文档(Flat XML)</comment>
<comment xml:lang="zh_TW">ODT 文件 (Flat XML)</comment>
<acronym>FODT</acronym>
<expanded-acronym>OpenDocument Text (Flat XML)</expanded-acronym>
@@ -5299,7 +5449,7 @@
<comment xml:lang="pt">modelo ODT</comment>
<comment xml:lang="pt_BR">Modelo ODT</comment>
<comment xml:lang="ro">Șablon ODT</comment>
- <comment xml:lang="ru">шаблон ODT</comment>
+ <comment xml:lang="ru">Шаблон ODT</comment>
<comment xml:lang="sk">Šablóna ODT</comment>
<comment xml:lang="sl">Predloga dokumenta ODT</comment>
<comment xml:lang="sq">Model ODT</comment>
@@ -5362,7 +5512,7 @@
<comment xml:lang="pt">modelo OTH</comment>
<comment xml:lang="pt_BR">Modelo OTH</comment>
<comment xml:lang="ro">Șablon OTH</comment>
- <comment xml:lang="ru">шаблон OTH</comment>
+ <comment xml:lang="ru">Шаблон OTH</comment>
<comment xml:lang="sk">Šablóna OTH</comment>
<comment xml:lang="sl">Predloga OTH</comment>
<comment xml:lang="sq">Model OTH</comment>
@@ -5389,6 +5539,7 @@
<mime-type type="application/vnd.oasis.opendocument.text-master">
<comment>ODM document</comment>
<comment xml:lang="ar">مستند ODM</comment>
+ <comment xml:lang="ast">Documentu ODM</comment>
<comment xml:lang="be@latin">Dakument ODM</comment>
<comment xml:lang="bg">Документ — ODM</comment>
<comment xml:lang="ca">document ODM</comment>
@@ -5425,7 +5576,7 @@
<comment xml:lang="pt">documento ODM</comment>
<comment xml:lang="pt_BR">Documento ODM</comment>
<comment xml:lang="ro">Document ODM</comment>
- <comment xml:lang="ru">документ ODM</comment>
+ <comment xml:lang="ru">Документ ODM</comment>
<comment xml:lang="sk">Dokument ODM</comment>
<comment xml:lang="sl">Dokument ODM</comment>
<comment xml:lang="sq">Dokument ODM</comment>
@@ -5488,7 +5639,7 @@
<comment xml:lang="pt">desenho ODG</comment>
<comment xml:lang="pt_BR">Desenho ODG</comment>
<comment xml:lang="ro">Desen ODG</comment>
- <comment xml:lang="ru">изображение ODG</comment>
+ <comment xml:lang="ru">Рисунок ODG</comment>
<comment xml:lang="sk">Kresba ODG</comment>
<comment xml:lang="sl">Datoteka risbe ODG</comment>
<comment xml:lang="sq">Vizatim ODG</comment>
@@ -5547,14 +5698,14 @@
<comment xml:lang="pt">desenho ODG (XML plano)</comment>
<comment xml:lang="pt_BR">Desenho ODG (Flat XML)</comment>
<comment xml:lang="ro">Desen ODG (XML simplu)</comment>
- <comment xml:lang="ru">изображение ODG (простой XML)</comment>
+ <comment xml:lang="ru">Рисунок ODG (простой XML)</comment>
<comment xml:lang="sk">Kresba ODG (čisté XML)</comment>
<comment xml:lang="sl">Datoteka risbe ODG (nepovezan XML)</comment>
<comment xml:lang="sr">ОДГ цртеж (Обичан ИксМЛ)</comment>
<comment xml:lang="sv">ODG-teckning (platt XML)</comment>
<comment xml:lang="tr">ODG çizimi (Düz XML)</comment>
<comment xml:lang="uk">малюнок ODG (Flat XML)</comment>
- <comment xml:lang="zh_CN">ODG 绘图(Flat XML)</comment>
+ <comment xml:lang="zh_CN">ODG 绘图(Flat XML)</comment>
<comment xml:lang="zh_TW">ODG 繪圖 (Flat XML)</comment>
<acronym>FODG</acronym>
<expanded-acronym>OpenDocument Drawing (Flat XML)</expanded-acronym>
@@ -5601,7 +5752,7 @@
<comment xml:lang="pt">modelo ODG</comment>
<comment xml:lang="pt_BR">Modelo ODG</comment>
<comment xml:lang="ro">Șablon ODG</comment>
- <comment xml:lang="ru">шаблон ODG</comment>
+ <comment xml:lang="ru">Шаблон ODG</comment>
<comment xml:lang="sk">Šablóna ODG</comment>
<comment xml:lang="sl">Predloga dokumenta ODG</comment>
<comment xml:lang="sq">Model ODG</comment>
@@ -5664,7 +5815,7 @@
<comment xml:lang="pt">apresentação ODP</comment>
<comment xml:lang="pt_BR">Apresentação ODP</comment>
<comment xml:lang="ro">Prezentare ODP</comment>
- <comment xml:lang="ru">презентация ODP</comment>
+ <comment xml:lang="ru">Презентация ODP</comment>
<comment xml:lang="sk">Prezentácia ODP</comment>
<comment xml:lang="sl">Predstavitev ODP</comment>
<comment xml:lang="sq">Prezantim ODP</comment>
@@ -5723,14 +5874,14 @@
<comment xml:lang="pt">apresentação ODP (XML plano)</comment>
<comment xml:lang="pt_BR">Apresentação ODP (Flat XML)</comment>
<comment xml:lang="ro">Prezentare ODP (XML simplu)</comment>
- <comment xml:lang="ru">презентация ODP (простой XML)</comment>
+ <comment xml:lang="ru">Презентация ODP (простой XML)</comment>
<comment xml:lang="sk">Prezentácia ODP (čisté XML)</comment>
<comment xml:lang="sl">Predstavitev ODP (nepovezan XML)</comment>
<comment xml:lang="sr">ОДП презентација (Обични ИксМЛ)</comment>
<comment xml:lang="sv">ODP-presentation (platt XML)</comment>
<comment xml:lang="tr">ODP sunumu (Düz XML)</comment>
<comment xml:lang="uk">презентація ODP (Flat XML)</comment>
- <comment xml:lang="zh_CN">ODP 演示文稿(Flat XML)</comment>
+ <comment xml:lang="zh_CN">ODP 演示文稿(Flat XML)</comment>
<comment xml:lang="zh_TW">ODP 範本 (Flat XML)</comment>
<acronym>FODP</acronym>
<expanded-acronym>OpenDocument Presentation (Flat XML)</expanded-acronym>
@@ -5777,7 +5928,7 @@
<comment xml:lang="pt">modelo ODP</comment>
<comment xml:lang="pt_BR">Modelo ODP</comment>
<comment xml:lang="ro">Șablon ODP</comment>
- <comment xml:lang="ru">шаблон ODP</comment>
+ <comment xml:lang="ru">Шаблон ODP</comment>
<comment xml:lang="sk">Šablóna ODP</comment>
<comment xml:lang="sl">Predloga dokumenta ODP</comment>
<comment xml:lang="sq">Model ODP</comment>
@@ -5840,16 +5991,16 @@
<comment xml:lang="pt">folha de cálculo ODS</comment>
<comment xml:lang="pt_BR">Planilha ODS</comment>
<comment xml:lang="ro">Foaie de calcul ODS</comment>
- <comment xml:lang="ru">электронная таблица ODS</comment>
+ <comment xml:lang="ru">Электронная таблица ODS</comment>
<comment xml:lang="sk">Zošit ODS</comment>
<comment xml:lang="sl">Preglednica ODS</comment>
<comment xml:lang="sq">Fletë llogaritjesh ODS</comment>
- <comment xml:lang="sr">ОДС spreadsheet</comment>
+ <comment xml:lang="sr">ОДС табела</comment>
<comment xml:lang="sv">ODS-kalkylblad</comment>
<comment xml:lang="tr">ODS çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця ODS</comment>
<comment xml:lang="vi">Bảng tính ODS</comment>
- <comment xml:lang="zh_CN">ODS 工作簿</comment>
+ <comment xml:lang="zh_CN">ODS 电子表格</comment>
<comment xml:lang="zh_TW">ODS 試算表</comment>
<acronym>ODS</acronym>
<expanded-acronym>OpenDocument Spreadsheet</expanded-acronym>
@@ -5899,14 +6050,14 @@
<comment xml:lang="pt">folha de cálculo ODS (XML plano)</comment>
<comment xml:lang="pt_BR">Planilha ODS (Flat XML)</comment>
<comment xml:lang="ro">Foaie de calcul ODS (XML simplu)</comment>
- <comment xml:lang="ru">электронная таблица ODS (простой XML)</comment>
+ <comment xml:lang="ru">Электронная таблица ODS (простой XML)</comment>
<comment xml:lang="sk">Zošit ODS (čisté XML)</comment>
<comment xml:lang="sl">Preglednica ODS (nepovezan XML)</comment>
- <comment xml:lang="sr">ОДС spreadsheet (Обични ИксМЛ)</comment>
+ <comment xml:lang="sr">ОДС табела (обични ИксМЛ)</comment>
<comment xml:lang="sv">ODS-kalkylblad (platt XML)</comment>
<comment xml:lang="tr">ODS sunumu (Düz XML)</comment>
<comment xml:lang="uk">ел. таблиця ODS (Flat XML)</comment>
- <comment xml:lang="zh_CN">ODS 工作簿(Flat XML)</comment>
+ <comment xml:lang="zh_CN">ODS 电子表格 (Flat XML)</comment>
<comment xml:lang="zh_TW">ODS 試算表 (Flat XML)</comment>
<acronym>FODS</acronym>
<expanded-acronym>OpenDocument Spreadsheet (Flat XML)</expanded-acronym>
@@ -5953,7 +6104,7 @@
<comment xml:lang="pt">modelo ODS</comment>
<comment xml:lang="pt_BR">Modelo ODS</comment>
<comment xml:lang="ro">Șablon ODS</comment>
- <comment xml:lang="ru">шаблон ODS</comment>
+ <comment xml:lang="ru">Шаблон ODS</comment>
<comment xml:lang="sk">Šablóna ODS</comment>
<comment xml:lang="sl">Predloga dokumenta ODS</comment>
<comment xml:lang="sq">Model ODS</comment>
@@ -6015,11 +6166,11 @@
<comment xml:lang="pt">gráfico ODC</comment>
<comment xml:lang="pt_BR">Gráfico ODC</comment>
<comment xml:lang="ro">Diagramă ODC</comment>
- <comment xml:lang="ru">диаграмма ODC</comment>
+ <comment xml:lang="ru">Диаграмма ODC</comment>
<comment xml:lang="sk">Graf ODC</comment>
<comment xml:lang="sl">Datoteka grafikona ODC</comment>
<comment xml:lang="sq">Grafik ODC</comment>
- <comment xml:lang="sr">ОДЦ chart</comment>
+ <comment xml:lang="sr">ОДЦ график</comment>
<comment xml:lang="sv">ODC-diagram</comment>
<comment xml:lang="tr">ODC çizelgesi</comment>
<comment xml:lang="uk">діаграма ODC</comment>
@@ -6075,7 +6226,7 @@
<comment xml:lang="pt">modelo ODC</comment>
<comment xml:lang="pt_BR">Modelo ODC</comment>
<comment xml:lang="ro">Șablon ODC</comment>
- <comment xml:lang="ru">шаблон ODC</comment>
+ <comment xml:lang="ru">Шаблон ODC</comment>
<comment xml:lang="sk">Šablóna ODC</comment>
<comment xml:lang="sl">Predloga ODC</comment>
<comment xml:lang="sr">ОДЦ шаблон</comment>
@@ -6137,11 +6288,11 @@
<comment xml:lang="pt">fórmula ODF</comment>
<comment xml:lang="pt_BR">Fórmula ODF</comment>
<comment xml:lang="ro">Formulă ODF</comment>
- <comment xml:lang="ru">формула ODF</comment>
+ <comment xml:lang="ru">Формула ODF</comment>
<comment xml:lang="sk">Vzorec ODF</comment>
<comment xml:lang="sl">Dokument formule ODF</comment>
<comment xml:lang="sq">Formulë ODF</comment>
- <comment xml:lang="sr">ОДФ formula</comment>
+ <comment xml:lang="sr">ОДФ формула</comment>
<comment xml:lang="sv">ODF-formel</comment>
<comment xml:lang="tr">ODF formülü</comment>
<comment xml:lang="uk">формула ODF</comment>
@@ -6197,7 +6348,7 @@
<comment xml:lang="pt">modelo ODF</comment>
<comment xml:lang="pt_BR">Modelo ODF</comment>
<comment xml:lang="ro">Șablon ODF</comment>
- <comment xml:lang="ru">шаблон ODF</comment>
+ <comment xml:lang="ru">Шаблон ODF</comment>
<comment xml:lang="sk">Šablóna ODF</comment>
<comment xml:lang="sl">Predloga dokumenta ODF</comment>
<comment xml:lang="sr">ОДФ шаблон</comment>
@@ -6259,7 +6410,7 @@
<comment xml:lang="pt">base de dados ODB</comment>
<comment xml:lang="pt_BR">Banco de dados ODB</comment>
<comment xml:lang="ro">Bază de date ODB</comment>
- <comment xml:lang="ru">база данных ODB</comment>
+ <comment xml:lang="ru">База данных ODB</comment>
<comment xml:lang="sk">Databáza ODB</comment>
<comment xml:lang="sl">Podatkovna zbirka ODB</comment>
<comment xml:lang="sq">Bazë me të dhëna ODB</comment>
@@ -6287,6 +6438,7 @@
<mime-type type="application/vnd.oasis.opendocument.image">
<comment>ODI image</comment>
<comment xml:lang="ar">صورة ODI</comment>
+ <comment xml:lang="ast">Imaxe ODI</comment>
<comment xml:lang="be@latin">Vyjava ODI</comment>
<comment xml:lang="bg">Изображение — ODI</comment>
<comment xml:lang="ca">imatge ODI</comment>
@@ -6323,7 +6475,7 @@
<comment xml:lang="pt">imagem ODI</comment>
<comment xml:lang="pt_BR">Imagem ODI</comment>
<comment xml:lang="ro">Imagine ODI</comment>
- <comment xml:lang="ru">изображение ODI</comment>
+ <comment xml:lang="ru">Изображение ODI</comment>
<comment xml:lang="sk">Obrázok ODI</comment>
<comment xml:lang="sl">Slikovna datoteka ODI</comment>
<comment xml:lang="sq">Figurë ODI</comment>
@@ -6350,6 +6502,7 @@
<mime-type type="application/vnd.openofficeorg.extension">
<comment>OpenOffice.org extension</comment>
<comment xml:lang="ar">امتداد OpenOffice.org</comment>
+ <comment xml:lang="ast">Estensión d'OpenOffice.org</comment>
<comment xml:lang="be@latin">Pašyreńnie OpenOffice.org</comment>
<comment xml:lang="bg">Разширение — OpenOffice</comment>
<comment xml:lang="ca">extensió d'OpenOffice.org</comment>
@@ -6384,7 +6537,7 @@
<comment xml:lang="pt">extensão OpenOffice.org</comment>
<comment xml:lang="pt_BR">Extensão do OpenOffice</comment>
<comment xml:lang="ro">Extensie OpenOffice.org</comment>
- <comment xml:lang="ru">расширение OpenOffice.org</comment>
+ <comment xml:lang="ru">Расширение OpenOffice.org</comment>
<comment xml:lang="sk">Rozšírenie OpenOffice.org</comment>
<comment xml:lang="sl">Razširitev OpenOffice.org</comment>
<comment xml:lang="sq">Shtojcë për OpenOffice.org</comment>
@@ -6401,6 +6554,7 @@
</mime-type>
<mime-type type="application/vnd.android.package-archive">
<comment>Android package</comment>
+ <comment xml:lang="ast">Paquete d'Android</comment>
<comment xml:lang="bg">Пакет — Android</comment>
<comment xml:lang="ca">paquet d'Android</comment>
<comment xml:lang="cs">balíčky systému Android</comment>
@@ -6413,6 +6567,7 @@
<comment xml:lang="eu">Android paketea</comment>
<comment xml:lang="fi">Android-paketti</comment>
<comment xml:lang="fr">paquet Android</comment>
+ <comment xml:lang="ga">pacáiste Android</comment>
<comment xml:lang="gl">paquete de Android</comment>
<comment xml:lang="he">חבילת אנדרויד</comment>
<comment xml:lang="hr">Android paket</comment>
@@ -6430,14 +6585,14 @@
<comment xml:lang="pl">Pakiet Androida</comment>
<comment xml:lang="pt">pacote Android</comment>
<comment xml:lang="pt_BR">Pacote do Android</comment>
- <comment xml:lang="ru">пакет Android</comment>
+ <comment xml:lang="ru">Пакет Android</comment>
<comment xml:lang="sk">Balík Android</comment>
<comment xml:lang="sl">Paket Android</comment>
<comment xml:lang="sr">Андроидов пакет</comment>
<comment xml:lang="sv">Android-paket</comment>
<comment xml:lang="tr">Android paketi</comment>
<comment xml:lang="uk">пакунок Android</comment>
- <comment xml:lang="zh_CN">Android</comment>
+ <comment xml:lang="zh_CN">Android 应用包</comment>
<comment xml:lang="zh_TW">Android 軟體包</comment>
<sub-class-of type="application/x-java-archive"/>
<glob pattern="*.apk"/>
@@ -6445,6 +6600,7 @@
<mime-type type="application/vnd.symbian.install">
<comment>SIS package</comment>
<comment xml:lang="ar">حزمة SIS</comment>
+ <comment xml:lang="ast">Paquete SIS</comment>
<comment xml:lang="be@latin">Pakunak SIS</comment>
<comment xml:lang="bg">Пакет — SIS</comment>
<comment xml:lang="ca">paquet SIS</comment>
@@ -6480,7 +6636,7 @@
<comment xml:lang="pt">pacote SIS</comment>
<comment xml:lang="pt_BR">Pacote SIS</comment>
<comment xml:lang="ro">Pachet SIS</comment>
- <comment xml:lang="ru">пакет SIS</comment>
+ <comment xml:lang="ru">Пакет SIS</comment>
<comment xml:lang="sk">Balíček SIS</comment>
<comment xml:lang="sl">Datoteka paketa SIS</comment>
<comment xml:lang="sq">Paketë SIS</comment>
@@ -6502,6 +6658,7 @@
<mime-type type="x-epoc/x-sisx-app">
<comment>SISX package</comment>
<comment xml:lang="ar">حزمة SISX</comment>
+ <comment xml:lang="ast">Paquete SISX</comment>
<comment xml:lang="be@latin">Pakunak SISX</comment>
<comment xml:lang="bg">Пакет — SISX</comment>
<comment xml:lang="ca">paquet SISX</comment>
@@ -6537,7 +6694,7 @@
<comment xml:lang="pt">pacote SISX</comment>
<comment xml:lang="pt_BR">Pacote SISX</comment>
<comment xml:lang="ro">Pachet SISX</comment>
- <comment xml:lang="ru">пакет SISX</comment>
+ <comment xml:lang="ru">Пакет SISX</comment>
<comment xml:lang="sk">Balíček SISX</comment>
<comment xml:lang="sl">Datoteka paketa SISX</comment>
<comment xml:lang="sq">Paketë SISX</comment>
@@ -6569,6 +6726,7 @@
<comment xml:lang="eu">Sareko pakete kaptura</comment>
<comment xml:lang="fi">Verkkopakettien kaappaus</comment>
<comment xml:lang="fr">capture de paquet réseau</comment>
+ <comment xml:lang="ga">Gabháltas Paicéid Líonra</comment>
<comment xml:lang="gl">Captura de Network Packet</comment>
<comment xml:lang="he">לכידה של מנות נתונים ברשת</comment>
<comment xml:lang="hr">Mrežno hvatanje paketa</comment>
@@ -6586,7 +6744,7 @@
<comment xml:lang="pl">Przechwycenie pakietu sieciowego</comment>
<comment xml:lang="pt">captura Network Packet</comment>
<comment xml:lang="pt_BR">Pacote de captura de rede</comment>
- <comment xml:lang="ru">захваченные сетевые пакеты</comment>
+ <comment xml:lang="ru">Захваченные сетевые пакеты</comment>
<comment xml:lang="sk">Zachytené sieťové pakety</comment>
<comment xml:lang="sl">Zajem omrežnih paketov</comment>
<comment xml:lang="sr">Снимање мрежног пакета</comment>
@@ -6608,6 +6766,7 @@
<mime-type type="application/vnd.wordperfect">
<comment>WordPerfect document</comment>
<comment xml:lang="ar">مستند WordPerfect</comment>
+ <comment xml:lang="ast">Documentu de WordPerfect</comment>
<comment xml:lang="az">WordPerfect sənədi</comment>
<comment xml:lang="be@latin">Dakument WordPerfect</comment>
<comment xml:lang="bg">Документ — WordPerfect</comment>
@@ -6646,11 +6805,11 @@
<comment xml:lang="pt">documento WordPerfect</comment>
<comment xml:lang="pt_BR">Documento do WordPerfect</comment>
<comment xml:lang="ro">Document WordPerfect</comment>
- <comment xml:lang="ru">документ WordPerfect</comment>
+ <comment xml:lang="ru">Документ WordPerfect</comment>
<comment xml:lang="sk">Dokument WordPerfect</comment>
<comment xml:lang="sl">Dokument WordPerfect</comment>
<comment xml:lang="sq">Dokument WordPerfect</comment>
- <comment xml:lang="sr">документ Ворд Перфекта</comment>
+ <comment xml:lang="sr">документ Ворд перфекта</comment>
<comment xml:lang="sv">WordPerfect-dokument</comment>
<comment xml:lang="tr">WordPerfect belgesi</comment>
<comment xml:lang="uk">документ WordPerfect</comment>
@@ -6671,6 +6830,12 @@
<glob pattern="*.wpd"/>
<glob pattern="*.wpp"/>
</mime-type>
+ <mime-type type="application/vnd.youtube.yt">
+ <comment>YouTube Media Archive</comment>
+ <generic-icon name="video-x-generic"/>
+ <glob pattern="*.yt"/>
+ <sub-class-of type="application/zip"/>
+ </mime-type>
<mime-type type="application/x-spss-por">
<comment>SPSS Portable Data File</comment>
<comment xml:lang="ar">ملف بيانات SPSS متنقلة</comment>
@@ -6704,7 +6869,7 @@
<comment xml:lang="pt">ficheiro de dados portátil SPSS</comment>
<comment xml:lang="pt_BR">Arquivo de Dados Portáteis SPSS</comment>
<comment xml:lang="ro">Fișier portabil de date SPSS</comment>
- <comment xml:lang="ru">файл переносимых данных SPSS</comment>
+ <comment xml:lang="ru">Файл переносимых данных SPSS</comment>
<comment xml:lang="sk">Súbor prenosných dát SPSS</comment>
<comment xml:lang="sl">Prenosna podatkovna datoteka SPSS</comment>
<comment xml:lang="sr">СПСС датотека преносних података</comment>
@@ -6730,6 +6895,7 @@
<comment xml:lang="en_GB">SPSS Data File</comment>
<comment xml:lang="es">archivo de datos SPSS</comment>
<comment xml:lang="eu">SPSS datuen fitxategia</comment>
+ <comment xml:lang="fi">SPSS-datatiedosto</comment>
<comment xml:lang="fo">SPSS dátufíla</comment>
<comment xml:lang="fr">fichier de données SPSS</comment>
<comment xml:lang="ga">comhad sonraí SPSS</comment>
@@ -6751,7 +6917,7 @@
<comment xml:lang="pt">ficheiro de dados SPSS</comment>
<comment xml:lang="pt_BR">Arquivo de dados SPSS</comment>
<comment xml:lang="ro">Fișier date SPSS</comment>
- <comment xml:lang="ru">файл данных SPSS</comment>
+ <comment xml:lang="ru">Файл данных SPSS</comment>
<comment xml:lang="sk">Dátový súbor SPSS</comment>
<comment xml:lang="sl">Podatkovna datoteka SPSS</comment>
<comment xml:lang="sr">СПСС датотека података</comment>
@@ -6788,7 +6954,7 @@
<comment xml:lang="ga">leabharmharcanna XBEL</comment>
<comment xml:lang="gl">Marcadores XBEL</comment>
<comment xml:lang="he">סימניית XBEL</comment>
- <comment xml:lang="hr">XBEL knjižne oznake</comment>
+ <comment xml:lang="hr">XBEL zabilješka</comment>
<comment xml:lang="hu">XBEL-könyvjelzők</comment>
<comment xml:lang="ia">Marcapaginas XBEL</comment>
<comment xml:lang="id">Bookmark XBEL</comment>
@@ -6807,7 +6973,7 @@
<comment xml:lang="pt">marcadores XBEL</comment>
<comment xml:lang="pt_BR">Marcadores do XBEL</comment>
<comment xml:lang="ro">Semne de carte XBEL</comment>
- <comment xml:lang="ru">закладки XBEL</comment>
+ <comment xml:lang="ru">Закладки XBEL</comment>
<comment xml:lang="sk">Záložky XBEL</comment>
<comment xml:lang="sl">Datoteka zaznamkov XBEL</comment>
<comment xml:lang="sq">Libërshënues XBEL</comment>
@@ -6830,6 +6996,7 @@
<mime-type type="application/x-7z-compressed">
<comment>7-zip archive</comment>
<comment xml:lang="ar">أرشيف 7-zip</comment>
+ <comment xml:lang="ast">Archivu 7-zip</comment>
<comment xml:lang="be@latin">Archiŭ 7-zip</comment>
<comment xml:lang="bg">Архив — 7-zip</comment>
<comment xml:lang="ca">arxiu 7-zip</comment>
@@ -6866,7 +7033,7 @@
<comment xml:lang="pt">arquivo 7-zip</comment>
<comment xml:lang="pt_BR">Pacote 7-Zip</comment>
<comment xml:lang="ro">Arhivă 7-zip</comment>
- <comment xml:lang="ru">архив 7-zip</comment>
+ <comment xml:lang="ru">Архив 7-zip</comment>
<comment xml:lang="sk">Archív 7-zip</comment>
<comment xml:lang="sl">Datoteka arhiva 7-zip</comment>
<comment xml:lang="sq">Arkiv 7-zip</comment>
@@ -6886,6 +7053,7 @@
<mime-type type="application/x-abiword">
<comment>AbiWord document</comment>
<comment xml:lang="ar">مستند آبي وورد</comment>
+ <comment xml:lang="ast">Documentu d'AbiWord</comment>
<comment xml:lang="be@latin">Dakument AbiWord</comment>
<comment xml:lang="bg">Документ — AbiWord</comment>
<comment xml:lang="ca">document AbiWord</comment>
@@ -6923,7 +7091,7 @@
<comment xml:lang="pt">documento AbiWord</comment>
<comment xml:lang="pt_BR">Documento do AbiWord</comment>
<comment xml:lang="ro">Document AbiWord</comment>
- <comment xml:lang="ru">документ AbiWord</comment>
+ <comment xml:lang="ru">Документ AbiWord</comment>
<comment xml:lang="sk">Dokument AbiWord</comment>
<comment xml:lang="sl">Dokument AbiWord</comment>
<comment xml:lang="sq">Dokument AbiWord</comment>
@@ -6961,7 +7129,7 @@
<comment xml:lang="eu">CD irudiaren CUE orria</comment>
<comment xml:lang="fi">CD-vedos cuesheet</comment>
<comment xml:lang="fr">index de pistes de CD</comment>
- <comment xml:lang="ga">bileog chiúáil íomhá CD</comment>
+ <comment xml:lang="ga">bileog chiúála íomhá CD</comment>
<comment xml:lang="gl">cue sheet dunha imaxe de CD</comment>
<comment xml:lang="he">גליון נתונים לתמונת דיסק</comment>
<comment xml:lang="hr">CD slika s meta podacima</comment>
@@ -6982,11 +7150,11 @@
<comment xml:lang="pt">índice de CD de imagem</comment>
<comment xml:lang="pt_BR">Índice de Imagem de CD</comment>
<comment xml:lang="ro">Imagine CD cuesheet</comment>
- <comment xml:lang="ru">таблица содержания образа CD</comment>
+ <comment xml:lang="ru">Таблица содержания образа CD</comment>
<comment xml:lang="sk">Rozvrhnutie stôp obrazu CD</comment>
<comment xml:lang="sl">Datoteka razpredelnice odtisa CD cue</comment>
<comment xml:lang="sq">Cuesheet imazhi CD</comment>
- <comment xml:lang="sr">редослед слика ЦД-а</comment>
+ <comment xml:lang="sr">Кју лист ЦД одраза</comment>
<comment xml:lang="sv">Indexblad för cd-avbild</comment>
<comment xml:lang="tr">CD görüntüsü belgesi</comment>
<comment xml:lang="uk">таблиця CUE образу CD</comment>
@@ -7000,6 +7168,7 @@
<mime-type type="application/x-amipro">
<comment>Lotus AmiPro document</comment>
<comment xml:lang="ar">مستند Lotus AmiPro</comment>
+ <comment xml:lang="ast">Documentu de Lotus AmiPro</comment>
<comment xml:lang="az">Lotus AmiPro sənədi</comment>
<comment xml:lang="be@latin">Dakument Lotus AmiPro</comment>
<comment xml:lang="bg">Документ — Lotus AmiPro</comment>
@@ -7038,7 +7207,7 @@
<comment xml:lang="pt">documento Lotus AmiPro</comment>
<comment xml:lang="pt_BR">Documento do Lotus AmiPro</comment>
<comment xml:lang="ro">Document Lotus AmiPro</comment>
- <comment xml:lang="ru">документ Lotus AmiPro</comment>
+ <comment xml:lang="ru">Документ Lotus AmiPro</comment>
<comment xml:lang="sk">Dokument Lotus AmiPro</comment>
<comment xml:lang="sl">Dokument Lotus AmiPro</comment>
<comment xml:lang="sq">Dokument Lotus AmiPro</comment>
@@ -7055,6 +7224,7 @@
<mime-type type="application/x-aportisdoc">
<comment>AportisDoc document</comment>
<comment xml:lang="ar">مستند AportisDoc</comment>
+ <comment xml:lang="ast">Documentu d'AportisDoc</comment>
<comment xml:lang="bg">Документ — AportisDoc</comment>
<comment xml:lang="ca">document AportisDoc</comment>
<comment xml:lang="cs">dokument AportisDoc</comment>
@@ -7088,7 +7258,7 @@
<comment xml:lang="pt">documento AportisDoc</comment>
<comment xml:lang="pt_BR">Documento do AportisDoc</comment>
<comment xml:lang="ro">Document AportisDoc</comment>
- <comment xml:lang="ru">документ AportisDoc</comment>
+ <comment xml:lang="ru">Документ AportisDoc</comment>
<comment xml:lang="sk">Dokument AportisDoc</comment>
<comment xml:lang="sl">Dokument AportisDoc</comment>
<comment xml:lang="sr">Апортис Док документ</comment>
@@ -7147,7 +7317,7 @@
<comment xml:lang="pt">folha de cálculo Applix Spreadsheets</comment>
<comment xml:lang="pt_BR">Planilha do Applix Spreadsheets</comment>
<comment xml:lang="ro">Foaie de calcul Applix</comment>
- <comment xml:lang="ru">электронная таблица Applix Spreadsheets</comment>
+ <comment xml:lang="ru">Электронная таблица Applix Spreadsheets</comment>
<comment xml:lang="sk">Zošit Applix Spreadsheets</comment>
<comment xml:lang="sl">Razpredelnica Applix Spreadsheets</comment>
<comment xml:lang="sq">Fletë llogaritjesh Applix Spreadsheets</comment>
@@ -7156,7 +7326,7 @@
<comment xml:lang="tr">Applix Spreadsheets çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця Applix Spreadsheets</comment>
<comment xml:lang="vi">Bảng tính Applix Spreadsheets</comment>
- <comment xml:lang="zh_CN">Applix Spreadsheets 工作簿</comment>
+ <comment xml:lang="zh_CN">Applix Spreadsheets 电子表格</comment>
<comment xml:lang="zh_TW">Applix Spreadsheets 試算表</comment>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="50">
@@ -7170,6 +7340,7 @@
<mime-type type="application/x-applix-word">
<comment>Applix Words document</comment>
<comment xml:lang="ar">مستند كلمات Applix</comment>
+ <comment xml:lang="ast">Documentu d'Applix Words</comment>
<comment xml:lang="az">Applix Words sənədi</comment>
<comment xml:lang="be@latin">Dakument Applix Words</comment>
<comment xml:lang="bg">Документ — Applix Words</comment>
@@ -7209,7 +7380,7 @@
<comment xml:lang="pt">documento Applix Words</comment>
<comment xml:lang="pt_BR">Documento do Applix Words</comment>
<comment xml:lang="ro">Document Applix Words</comment>
- <comment xml:lang="ru">документ Applix Words</comment>
+ <comment xml:lang="ru">Документ Applix Words</comment>
<comment xml:lang="sk">Dokument Applix Words</comment>
<comment xml:lang="sl">Dokument Applix Words</comment>
<comment xml:lang="sq">Dokument Applix Words</comment>
@@ -7267,7 +7438,7 @@
<comment xml:lang="pt">arquivo ARC</comment>
<comment xml:lang="pt_BR">Pacote ARC</comment>
<comment xml:lang="ro">Arhivă ARC</comment>
- <comment xml:lang="ru">архив ARC</comment>
+ <comment xml:lang="ru">Архив ARC</comment>
<comment xml:lang="sk">Archív ARC</comment>
<comment xml:lang="sl">Datoteka arhiva ARC</comment>
<comment xml:lang="sq">Arkiv ARC</comment>
@@ -7328,7 +7499,7 @@
<comment xml:lang="pt">arquivo AR</comment>
<comment xml:lang="pt_BR">Pacote AR</comment>
<comment xml:lang="ro">Arhivă AR</comment>
- <comment xml:lang="ru">архив AR</comment>
+ <comment xml:lang="ru">Архив AR</comment>
<comment xml:lang="sk">Archív AR</comment>
<comment xml:lang="sl">Datoteka arhiva AR</comment>
<comment xml:lang="sq">Arkiv AR</comment>
@@ -7389,7 +7560,7 @@
<comment xml:lang="pt">arquivo ARJ</comment>
<comment xml:lang="pt_BR">Pacote ARJ</comment>
<comment xml:lang="ro">Arhivă ARJ</comment>
- <comment xml:lang="ru">архив ARJ</comment>
+ <comment xml:lang="ru">Архив ARJ</comment>
<comment xml:lang="sk">Archív ARJ</comment>
<comment xml:lang="sl">Datoteka arhiva ARJ</comment>
<comment xml:lang="sq">Arkiv ARJ</comment>
@@ -7411,6 +7582,7 @@
<mime-type type="application/x-asp">
<comment>ASP page</comment>
<comment xml:lang="ar">صفحة ASP</comment>
+ <comment xml:lang="ast">Páxina ASP</comment>
<comment xml:lang="be@latin">Staronka ASP</comment>
<comment xml:lang="bg">Страница — ASP</comment>
<comment xml:lang="ca">pàgina ASP</comment>
@@ -7447,7 +7619,7 @@
<comment xml:lang="pt">página ASP</comment>
<comment xml:lang="pt_BR">Página ASP</comment>
<comment xml:lang="ro">Pagină ASP</comment>
- <comment xml:lang="ru">страница ASP</comment>
+ <comment xml:lang="ru">Страница ASP</comment>
<comment xml:lang="sk">Stránka ASP</comment>
<comment xml:lang="sl">Datoteka spletne strani ASP</comment>
<comment xml:lang="sq">Faqe ASP</comment>
@@ -7467,6 +7639,7 @@
<mime-type type="application/x-awk">
<comment>AWK script</comment>
<comment xml:lang="ar">سكربت AWK</comment>
+ <comment xml:lang="ast">Script AWK</comment>
<comment xml:lang="az">AWK skripti</comment>
<comment xml:lang="be@latin">Skrypt AWK</comment>
<comment xml:lang="bg">Скрипт — AWK</comment>
@@ -7506,7 +7679,7 @@
<comment xml:lang="pt">script AWK</comment>
<comment xml:lang="pt_BR">Script AWK</comment>
<comment xml:lang="ro">Script AWK</comment>
- <comment xml:lang="ru">сценарий AWK</comment>
+ <comment xml:lang="ru">Сценарий AWK</comment>
<comment xml:lang="sk">Skript AWK</comment>
<comment xml:lang="sl">Skriptna datoteka AWK</comment>
<comment xml:lang="sq">Script AWK</comment>
@@ -7537,6 +7710,7 @@
<mime-type type="application/x-bcpio">
<comment>BCPIO document</comment>
<comment xml:lang="ar">مستند BCPIO</comment>
+ <comment xml:lang="ast">Documentu BCPIO</comment>
<comment xml:lang="az">BCPIO sənədi</comment>
<comment xml:lang="be@latin">Dakument BCPIO</comment>
<comment xml:lang="bg">Документ — BCPIO</comment>
@@ -7576,7 +7750,7 @@
<comment xml:lang="pt">documento BCPIO</comment>
<comment xml:lang="pt_BR">Documento BCPIO</comment>
<comment xml:lang="ro">Document BCPIO</comment>
- <comment xml:lang="ru">документ BCPIO</comment>
+ <comment xml:lang="ru">Документ BCPIO</comment>
<comment xml:lang="sk">Dokument BCPIO</comment>
<comment xml:lang="sl">Dokument BCPIO</comment>
<comment xml:lang="sq">Dokument BCPIO</comment>
@@ -7633,7 +7807,7 @@
<comment xml:lang="pt">ficheiro de semente BitTorrent</comment>
<comment xml:lang="pt_BR">Arquivo semente BitTorrent</comment>
<comment xml:lang="ro">Fișier sursă-completă BitTorrent</comment>
- <comment xml:lang="ru">файл источника BitTorrent</comment>
+ <comment xml:lang="ru">Файл источника BitTorrent</comment>
<comment xml:lang="sk">Súbor BitTorrent</comment>
<comment xml:lang="sl">Datoteka sejanja BitTorrent</comment>
<comment xml:lang="sq">File bazë BitTorrent</comment>
@@ -7652,6 +7826,7 @@
<mime-type type="application/x-blender">
<comment>Blender scene</comment>
<comment xml:lang="ar">مشهد بلندر</comment>
+ <comment xml:lang="ast">Escena de Blender</comment>
<comment xml:lang="be@latin">Scena Blender</comment>
<comment xml:lang="bg">Сцена — Blender</comment>
<comment xml:lang="ca">escena de Blender</comment>
@@ -7689,7 +7864,7 @@
<comment xml:lang="pt">cenário Blender</comment>
<comment xml:lang="pt_BR">Cena do Blender</comment>
<comment xml:lang="ro">Scenă Blender</comment>
- <comment xml:lang="ru">сцена Blender</comment>
+ <comment xml:lang="ru">Сцена Blender</comment>
<comment xml:lang="sk">Scéna Blender</comment>
<comment xml:lang="sl">Datoteka scene Blender</comment>
<comment xml:lang="sq">Skenë Blender</comment>
@@ -7711,6 +7886,7 @@
<mime-type type="application/x-bzdvi">
<comment>TeX DVI document (bzip-compressed)</comment>
<comment xml:lang="ar">مستند TeX DVI (مضغوط-bzip)</comment>
+ <comment xml:lang="ast">Documentu Tex DVI (comprimíu en bzip)</comment>
<comment xml:lang="be@latin">Dakument TeX DVI (bzip-skampresavany)</comment>
<comment xml:lang="bg">Документ — TeX DVI, компресиран с bzip</comment>
<comment xml:lang="ca">document de TeX DVI (amb compressió bzip)</comment>
@@ -7727,7 +7903,7 @@
<comment xml:lang="ga">cáipéis DVI TeX (comhbhrúite le bzip)</comment>
<comment xml:lang="gl">documento DVI de TeX (comprimido con bzip)</comment>
<comment xml:lang="he">מסמך מסוג TeX DVI (מכווץ ע״י bzip)</comment>
- <comment xml:lang="hr">TeX DVI dokument (komprimiran bzip-om)</comment>
+ <comment xml:lang="hr">TeX DVI dokument (bzip sažeto)</comment>
<comment xml:lang="hu">TeX DVI dokumentum (bzip-pel tömörítve)</comment>
<comment xml:lang="ia">Documento TeX DVI (comprimite con bzip)</comment>
<comment xml:lang="id">Dokumen TeX DVI (terkompresi bzip)</comment>
@@ -7745,7 +7921,7 @@
<comment xml:lang="pt">documento TeX DVI (compressão bzip)</comment>
<comment xml:lang="pt_BR">Documento DVI TeX (compactado com bzip)</comment>
<comment xml:lang="ro">Document TeX DVI (comprimat bzip)</comment>
- <comment xml:lang="ru">документ TeX DVI (сжатый bzip)</comment>
+ <comment xml:lang="ru">Документ TeX DVI (сжатый bzip)</comment>
<comment xml:lang="sk">Dokument TeX DVI (komprimovaný pomocou bzip)</comment>
<comment xml:lang="sl">Dokument TeX DVI (stisnjen z bzip)</comment>
<comment xml:lang="sq">Dokument Tex DVI (i kompresuar me bzip)</comment>
@@ -7754,7 +7930,7 @@
<comment xml:lang="tr">TeX DVI belgesi (bzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">документ TeX DVI (стиснений bzip)</comment>
<comment xml:lang="vi">Tài liệu DVI TeX (đã nén bzip)</comment>
- <comment xml:lang="zh_CN">TeX DVI 文档(gzip 压缩)</comment>
+ <comment xml:lang="zh_CN">TeX DVI 文档(gzip 压缩)</comment>
<comment xml:lang="zh_TW">TeX DVI 文件 (bzip 格式壓縮)</comment>
<sub-class-of type="application/x-bzip"/>
<generic-icon name="x-office-document"/>
@@ -7763,6 +7939,7 @@
<mime-type type="application/x-bzip">
<comment>Bzip archive</comment>
<comment xml:lang="ar">أرشيف Bzip</comment>
+ <comment xml:lang="ast">Archivu Bzip</comment>
<comment xml:lang="be@latin">Archiŭ bzip</comment>
<comment xml:lang="bg">Архив — bzip</comment>
<comment xml:lang="ca">arxiu bzip</comment>
@@ -7799,7 +7976,7 @@
<comment xml:lang="pt">arquivo Bzip</comment>
<comment xml:lang="pt_BR">Pacote Bzip</comment>
<comment xml:lang="ro">Arhivă Bzip</comment>
- <comment xml:lang="ru">архив BZIP</comment>
+ <comment xml:lang="ru">Архив BZIP</comment>
<comment xml:lang="sk">Archív bzip</comment>
<comment xml:lang="sl">Datoteka arhiva Bzip</comment>
<comment xml:lang="sq">Arkiv bzip</comment>
@@ -7808,7 +7985,7 @@
<comment xml:lang="tr">Bzip arşivi</comment>
<comment xml:lang="uk">архів bzip</comment>
<comment xml:lang="vi">Kho nén bzip</comment>
- <comment xml:lang="zh_CN">bzip 归档文件</comment>
+ <comment xml:lang="zh_CN">Bzip 归档文件</comment>
<comment xml:lang="zh_TW">Bzip 封存檔</comment>
<generic-icon name="package-x-generic"/>
<magic priority="50">
@@ -7821,6 +7998,7 @@
<mime-type type="application/x-bzip-compressed-tar">
<comment>Tar archive (bzip-compressed)</comment>
<comment xml:lang="ar">أرشيف Tar (مضغوط-bzip)</comment>
+ <comment xml:lang="ast">Archivu Tar (comprimíu en bzip)</comment>
<comment xml:lang="be@latin">Archiŭ tar (bzip-skampresavany)</comment>
<comment xml:lang="bg">Архив — tar, компресиран с bzip</comment>
<comment xml:lang="ca">arxiu tar (amb compressió bzip)</comment>
@@ -7837,7 +8015,7 @@
<comment xml:lang="ga">cartlann Tar (comhbhrúite le bzip)</comment>
<comment xml:lang="gl">arquivo Tar (comprimido con bzip)</comment>
<comment xml:lang="he">ארכיון Tar (מכווץ ע״י bzip)</comment>
- <comment xml:lang="hr">Tar arhiva (komprimirana bzip-om)</comment>
+ <comment xml:lang="hr">Tar arhiva (bzip sažeto)</comment>
<comment xml:lang="hu">Tar archívum (bzip-pel tömörítve)</comment>
<comment xml:lang="ia">Archivo Tar (comprimite con bzip)</comment>
<comment xml:lang="id">Arsip Tar (terkompresi bzip)</comment>
@@ -7855,7 +8033,7 @@
<comment xml:lang="pt">arquivo Tar (compressão bzip)</comment>
<comment xml:lang="pt_BR">Pacote Tar (compactado com bzip)</comment>
<comment xml:lang="ro">Arhivă Tar (comprimată bzip)</comment>
- <comment xml:lang="ru">архив TAR (сжатый BZIP)</comment>
+ <comment xml:lang="ru">Архив TAR (сжатый bzip)</comment>
<comment xml:lang="sk">Archív tar (komprimovaný pomocou bzip)</comment>
<comment xml:lang="sl">Datoteka arhiva Tar (stisnjen z bzip)</comment>
<comment xml:lang="sq">Arkiv tar (i kompresuar me bzip)</comment>
@@ -7864,7 +8042,7 @@
<comment xml:lang="tr">Tar arşivi (bzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">архів tar (стиснений bzip)</comment>
<comment xml:lang="vi">Kho nén tar (đã nén bzip)</comment>
- <comment xml:lang="zh_CN">Tar 归档文件(bzip 压缩)</comment>
+ <comment xml:lang="zh_CN">Tar 归档文件(bzip 压缩)</comment>
<comment xml:lang="zh_TW">Tar 封存檔 (bzip 格式壓縮)</comment>
<generic-icon name="package-x-generic"/>
<sub-class-of type="application/x-bzip"/>
@@ -7877,6 +8055,7 @@
<mime-type type="application/x-bzpdf">
<comment>PDF document (bzip-compressed)</comment>
<comment xml:lang="ar">مستند PDF (مضغوط-bzip)</comment>
+ <comment xml:lang="ast">Documentu PDF (comprimíu en bzip)</comment>
<comment xml:lang="be@latin">Dakument PDF (bzip-skampresavany)</comment>
<comment xml:lang="bg">Документ — PDF, компресиран с bzip</comment>
<comment xml:lang="ca">document PDF (amb compressió bzip)</comment>
@@ -7911,7 +8090,7 @@
<comment xml:lang="pt">documento PDF (compressão bzip)</comment>
<comment xml:lang="pt_BR">Documento PDF (compactado com bzip)</comment>
<comment xml:lang="ro">Document PDF (comprimat bzip)</comment>
- <comment xml:lang="ru">документ PDF (сжатый bzip)</comment>
+ <comment xml:lang="ru">Документ PDF (сжатый bzip)</comment>
<comment xml:lang="sk">Dokument PDF (komprimovaný pomocou bzip)</comment>
<comment xml:lang="sl">Dokument PDF (stisnjen z bzip)</comment>
<comment xml:lang="sq">Dokument PDF (i kompresuar me bzip)</comment>
@@ -7920,7 +8099,7 @@
<comment xml:lang="tr">PDF belgesi (bzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">документ PDF (стиснений bzip)</comment>
<comment xml:lang="vi">Tài liệu PDF (đã nén bzip)</comment>
- <comment xml:lang="zh_CN">PDF 文档(bzip 压缩)</comment>
+ <comment xml:lang="zh_CN">PDF 文档(bzip 压缩)</comment>
<comment xml:lang="zh_TW">PDF 文件 (bzip 格式壓縮)</comment>
<sub-class-of type="application/x-bzip"/>
<generic-icon name="x-office-document"/>
@@ -7929,6 +8108,7 @@
<mime-type type="application/x-bzpostscript">
<comment>PostScript document (bzip-compressed)</comment>
<comment xml:lang="ar">مستند PostScript (مضغوط-bzip)</comment>
+ <comment xml:lang="ast">Documentu PostScript (comprimíu en bzip)</comment>
<comment xml:lang="be@latin">Dakument PostScript (bzip-skampresavany)</comment>
<comment xml:lang="bg">Документ — PostScript, компресиран с bzip</comment>
<comment xml:lang="ca">document PostScript (amb compressió bzip)</comment>
@@ -7963,7 +8143,7 @@
<comment xml:lang="pt">documento PostScript (compressão bzip)</comment>
<comment xml:lang="pt_BR">Documento PostScript (compactado com bzip)</comment>
<comment xml:lang="ro">Document PostScript (comprimat bzip)</comment>
- <comment xml:lang="ru">документ PostScript (сжатый bzip)</comment>
+ <comment xml:lang="ru">Документ PostScript (сжатый bzip)</comment>
<comment xml:lang="sk">Dokument PostScript (komprimovaný pomocou bzip)</comment>
<comment xml:lang="sl">Dokument PostScript (stisnjen z bzip)</comment>
<comment xml:lang="sq">Dokument PostScript (i kompresuar me bzip)</comment>
@@ -7972,13 +8152,13 @@
<comment xml:lang="tr">PostScript belgesi (bzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">документ PostScript (стиснене bzip)</comment>
<comment xml:lang="vi">Tài liệu PostScript (đã nén bzip)</comment>
- <comment xml:lang="zh_CN">PostScript 文档(bzip 压缩)</comment>
+ <comment xml:lang="zh_CN">PostScript 文档(bzip 压缩)</comment>
<comment xml:lang="zh_TW">PostScript 文件 (bzip 格式壓縮)</comment>
<sub-class-of type="application/x-bzip"/>
<generic-icon name="x-office-document"/>
<glob pattern="*.ps.bz2"/>
</mime-type>
- <mime-type type="application/x-cbr">
+ <mime-type type="application/vnd.comicbook-rar">
<comment>comic book archive</comment>
<comment xml:lang="ar">أرشيف comic book</comment>
<comment xml:lang="be@latin">archiŭ komiksaŭ</comment>
@@ -8015,7 +8195,7 @@
<comment xml:lang="pt">arquivo de banda desenhada</comment>
<comment xml:lang="pt_BR">Pacote de histórias em quadrinhos</comment>
<comment xml:lang="ro">arhivă benzi desenate</comment>
- <comment xml:lang="ru">архив комиксов</comment>
+ <comment xml:lang="ru">Архив комиксов</comment>
<comment xml:lang="sk">Archív knihy komiksov</comment>
<comment xml:lang="sl">Datoteka arhiva stripov</comment>
<comment xml:lang="sq">Arkiv comic book</comment>
@@ -8024,11 +8204,12 @@
<comment xml:lang="tr">çizgi roman arşivi</comment>
<comment xml:lang="uk">архів коміксів</comment>
<comment xml:lang="vi">Kho nén sách tranh chuyện vui</comment>
- <comment xml:lang="zh_CN">Comic Book 归档文件</comment>
+ <comment xml:lang="zh_CN">漫画书归档文件</comment>
<comment xml:lang="zh_TW">漫畫書封存檔</comment>
<sub-class-of type="application/vnd.rar"/>
<generic-icon name="x-office-document"/>
<glob pattern="*.cbr"/>
+ <alias type="application/x-cbr"/>
</mime-type>
<mime-type type="application/x-cb7">
<comment>comic book archive</comment>
@@ -8067,7 +8248,7 @@
<comment xml:lang="pt">arquivo de banda desenhada</comment>
<comment xml:lang="pt_BR">Pacote de histórias em quadrinhos</comment>
<comment xml:lang="ro">arhivă benzi desenate</comment>
- <comment xml:lang="ru">архив комиксов</comment>
+ <comment xml:lang="ru">Архив комиксов</comment>
<comment xml:lang="sk">Archív knihy komiksov</comment>
<comment xml:lang="sl">Datoteka arhiva stripov</comment>
<comment xml:lang="sq">Arkiv comic book</comment>
@@ -8076,7 +8257,7 @@
<comment xml:lang="tr">çizgi roman arşivi</comment>
<comment xml:lang="uk">архів коміксів</comment>
<comment xml:lang="vi">Kho nén sách tranh chuyện vui</comment>
- <comment xml:lang="zh_CN">Comic Book 归档文件</comment>
+ <comment xml:lang="zh_CN">漫画书归档文件</comment>
<comment xml:lang="zh_TW">漫畫書封存檔</comment>
<sub-class-of type="application/x-7z-compressed"/>
<generic-icon name="x-office-document"/>
@@ -8119,7 +8300,7 @@
<comment xml:lang="pt">arquivo de banda desenhada</comment>
<comment xml:lang="pt_BR">Pacote de histórias em quadrinhos</comment>
<comment xml:lang="ro">arhivă benzi desenate</comment>
- <comment xml:lang="ru">архив комиксов</comment>
+ <comment xml:lang="ru">Архив комиксов</comment>
<comment xml:lang="sk">Archív knihy komiksov</comment>
<comment xml:lang="sl">Datoteka arhiva stripov</comment>
<comment xml:lang="sq">Arkiv comic book</comment>
@@ -8128,7 +8309,7 @@
<comment xml:lang="tr">çizgi roman arşivi</comment>
<comment xml:lang="uk">архів коміксів</comment>
<comment xml:lang="vi">Kho nén sách tranh chuyện vui</comment>
- <comment xml:lang="zh_CN">Comic Book 归档文件</comment>
+ <comment xml:lang="zh_CN">漫画书归档文件</comment>
<comment xml:lang="zh_TW">漫畫書封存檔</comment>
<sub-class-of type="application/x-tar"/>
<generic-icon name="x-office-document"/>
@@ -8171,7 +8352,7 @@
<comment xml:lang="pt">arquivo de banda desenhada</comment>
<comment xml:lang="pt_BR">Pacote de histórias em quadrinhos</comment>
<comment xml:lang="ro">arhivă benzi desenate</comment>
- <comment xml:lang="ru">архив комиксов</comment>
+ <comment xml:lang="ru">Архив комиксов</comment>
<comment xml:lang="sk">Archív knihy komiksov</comment>
<comment xml:lang="sl">Datoteka arhiva stripov</comment>
<comment xml:lang="sq">Arkiv comic book</comment>
@@ -8180,7 +8361,7 @@
<comment xml:lang="tr">çizgi roman arşivi</comment>
<comment xml:lang="uk">архів коміксів</comment>
<comment xml:lang="vi">Kho nén sách tranh chuyện vui</comment>
- <comment xml:lang="zh_CN">Comic Book 归档文件</comment>
+ <comment xml:lang="zh_CN">漫画书归档文件</comment>
<comment xml:lang="zh_TW">漫畫書封存檔</comment>
<sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
@@ -8222,7 +8403,7 @@
<comment xml:lang="pt">arquivo Lrzip</comment>
<comment xml:lang="pt_BR">Pacote Lrzip</comment>
<comment xml:lang="ro">Arhivă Lrzip</comment>
- <comment xml:lang="ru">архив LRZIP</comment>
+ <comment xml:lang="ru">Архив LRZIP</comment>
<comment xml:lang="sk">Archív Lrzip</comment>
<comment xml:lang="sl">Datoteka arhiva Lrzip</comment>
<comment xml:lang="sr">Лрзип архива</comment>
@@ -8255,7 +8436,7 @@
<comment xml:lang="ga">cartlann Tar (comhbhrúite le lrzip)</comment>
<comment xml:lang="gl">arquivo Tar (comprimido con lrzip)</comment>
<comment xml:lang="he">ארכיון Tar (מכווץ ע״י lrzip)</comment>
- <comment xml:lang="hr">Tar arhiva (komprimirana lrzip-om)</comment>
+ <comment xml:lang="hr">Tar arhiva (lrzip sažeta)</comment>
<comment xml:lang="hu">Tar archívum (lrzip-pel tömörítve)</comment>
<comment xml:lang="ia">Archivo Tar (comprimite con lrzip)</comment>
<comment xml:lang="id">Arsip Tar (terkompresi lrzip)</comment>
@@ -8271,14 +8452,14 @@
<comment xml:lang="pt">arquivo Tar (compressão Lrzip)</comment>
<comment xml:lang="pt_BR">Pacote Tar (compactado com lrzip)</comment>
<comment xml:lang="ro">Arhivă Tar (comprimată lrzip)</comment>
- <comment xml:lang="ru">архив TAR (сжатый LRZIP)</comment>
+ <comment xml:lang="ru">Архив TAR (сжатый lrzip)</comment>
<comment xml:lang="sk">Archív tar (komprimovaný pomocou lrzip)</comment>
<comment xml:lang="sl">Datoteka arhiva Tar (stisnjen z lrzip)</comment>
<comment xml:lang="sr">Тар архива (запакована лрзипом)</comment>
<comment xml:lang="sv">Tar-arkiv (lrzip-komprimerat)</comment>
<comment xml:lang="tr">Tar arşivi (lrzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">архів tar (стиснений lrzip)</comment>
- <comment xml:lang="zh_CN">Tar 归档文件 (lrzip 压缩)</comment>
+ <comment xml:lang="zh_CN">Tar 归档文件(lrzip 压缩)</comment>
<comment xml:lang="zh_TW">Tar 封存檔 (lrzip 格式壓縮)</comment>
<generic-icon name="package-x-generic"/>
<sub-class-of type="application/x-lrzip"/>
@@ -8287,6 +8468,7 @@
</mime-type>
<mime-type type="application/x-apple-diskimage">
<comment>Apple disk image</comment>
+ <comment xml:lang="ast">Imaxe de discu d'Apple</comment>
<comment xml:lang="bg">Диск — Apple</comment>
<comment xml:lang="ca">imatge de disc d'Apple</comment>
<comment xml:lang="cs">obraz disku Apple</comment>
@@ -8298,9 +8480,10 @@
<comment xml:lang="eu">Apple disko irudia</comment>
<comment xml:lang="fi">Apple-levytiedosto</comment>
<comment xml:lang="fr">image disque Apple</comment>
+ <comment xml:lang="ga">íomhá diosca Apple</comment>
<comment xml:lang="gl">imaxe de disco de Appl</comment>
<comment xml:lang="he">תמונת כונן Apple</comment>
- <comment xml:lang="hr">Apple snimka diska</comment>
+ <comment xml:lang="hr">Apple slika diska</comment>
<comment xml:lang="hu">Apple lemezkép</comment>
<comment xml:lang="ia">Imagine de disco Apple</comment>
<comment xml:lang="id">Image disk Apple</comment>
@@ -8315,95 +8498,107 @@
<comment xml:lang="pl">Obraz dysku Apple</comment>
<comment xml:lang="pt">imagem de disco Apple</comment>
<comment xml:lang="pt_BR">Imagem de disco Apple</comment>
- <comment xml:lang="ru">образ диска Apple Mac OS X</comment>
+ <comment xml:lang="ru">Образ диска Apple Mac OS X</comment>
<comment xml:lang="sk">Obraz disku Apple</comment>
<comment xml:lang="sl">Odtis diska Apple</comment>
- <comment xml:lang="sr">Еплова слика диска</comment>
+ <comment xml:lang="sr">Еплов одраз диска</comment>
<comment xml:lang="sv">Apple-diskavbild</comment>
<comment xml:lang="tr">Apple disk görüntüsü</comment>
<comment xml:lang="uk">образ диска Apple</comment>
- <comment xml:lang="zh_CN">Apple 磁盘镜像</comment>
- <comment xml:lang="zh_TW">Apple 磁碟映像</comment>
+ <comment xml:lang="zh_CN">Apple 磁盘映像</comment>
+ <comment xml:lang="zh_TW">Apple 磁碟映像檔</comment>
<glob pattern="*.dmg"/>
</mime-type>
<mime-type type="application/x-raw-disk-image">
- <comment>Raw disk image</comment>
- <comment xml:lang="ca">imatge de disc RAW</comment>
- <comment xml:lang="cs">surový obraz disku</comment>
- <comment xml:lang="da">Rå diskaftryk</comment>
- <comment xml:lang="de">Rohes Datenträgerabbild</comment>
- <comment xml:lang="el">Ανεπεξέργαστη εικόνα δίσκου</comment>
- <comment xml:lang="en_GB">Raw disk image</comment>
- <comment xml:lang="es">imagen de disco en bruto</comment>
- <comment xml:lang="eu">Disko gordinaren irudia</comment>
- <comment xml:lang="fi">Raaka levytiedosto</comment>
- <comment xml:lang="fr">image disque Raw</comment>
- <comment xml:lang="gl">Imaxe de disco en bruto</comment>
- <comment xml:lang="he">דמות גולמית של כונן</comment>
- <comment xml:lang="hr">Osnovna slika diska</comment>
- <comment xml:lang="hu">Nyers lemezkép</comment>
- <comment xml:lang="ia">Imagine de disco crude</comment>
- <comment xml:lang="id">Image disk mentah</comment>
- <comment xml:lang="it">Immagine disco raw</comment>
- <comment xml:lang="kk">Шикі диск бейнесі</comment>
- <comment xml:lang="ko">RAW 디스크 이미지</comment>
- <comment xml:lang="oc">imatge disc Raw</comment>
- <comment xml:lang="pl">Surowy obraz dysku</comment>
- <comment xml:lang="pt">imagem de disco Raw</comment>
- <comment xml:lang="pt_BR">Imagem bruta de disco</comment>
- <comment xml:lang="ru">необработанный образ диска</comment>
- <comment xml:lang="sk">Obraz disku</comment>
- <comment xml:lang="sl">Surovi odtis diska</comment>
- <comment xml:lang="sr">сирова слика диска</comment>
- <comment xml:lang="sv">Rå diskavbild</comment>
- <comment xml:lang="tr">İşlem görmemiş disk imajı</comment>
- <comment xml:lang="uk">простий образ диска</comment>
- <comment xml:lang="zh_CN">原始磁盘镜像</comment>
- <comment xml:lang="zh_TW">原生磁碟映像</comment>
- <glob pattern="*.raw-disk-image"/>
- <glob pattern="*.img"/>
- </mime-type>
- <mime-type type="application/x-raw-disk-image-xz-compressed">
- <comment>Raw disk image (XZ-compressed)</comment>
- <comment xml:lang="ca">imatge de disc RAW (amb compressió XZ)</comment>
- <comment xml:lang="cs">surový obraz disku (komprimovaný pomocí XZ)</comment>
- <comment xml:lang="da">Rå diskaftryk (XZ-komprimeret)</comment>
- <comment xml:lang="de">Rohes Datenträgerabbild (XZ-komprimiert)</comment>
- <comment xml:lang="el">Ανεπεξέργαστη εικόνα δίσκου (συμπιεσμένη XZ)</comment>
- <comment xml:lang="en_GB">Raw disk image (XZ-compressed)</comment>
- <comment xml:lang="es">imagen de disco en bruto (comprimida con XZ)</comment>
- <comment xml:lang="eu">Disko gordinaren irudia (XZ-rekin konprimitua)</comment>
- <comment xml:lang="fi">Raaka levytiedosto (XZ-pakattu)</comment>
- <comment xml:lang="fr">image disque Raw (compression XZ)</comment>
- <comment xml:lang="gl">Imaxe de disco en bruto (comprimida en XZ)</comment>
- <comment xml:lang="he">דמות גולמית של כונן (בדחיסת XZ)</comment>
- <comment xml:lang="hr">Osnovna slika diska (XZ sažeta)</comment>
- <comment xml:lang="hu">Nyers lemezkép (XZ-vel tömörítve)</comment>
- <comment xml:lang="ia">Imagine de disco crude (comprimite con XZ)</comment>
- <comment xml:lang="id">Image disk mentah (terkompresi XZ)</comment>
- <comment xml:lang="it">Immagine disco raw (compressa XZ)</comment>
- <comment xml:lang="kk">Шикі диск бейнесі (XZ-мен сығылған)</comment>
- <comment xml:lang="ko">RAW 디스크 이미지(XZ 압축)</comment>
- <comment xml:lang="oc">imatge disc Raw (compression XZ)</comment>
- <comment xml:lang="pl">Surowy obraz dysku (kompresja XZ)</comment>
- <comment xml:lang="pt">imagem de disco Raw (compressão XZ)</comment>
- <comment xml:lang="pt_BR">Imagem bruta de disco (compactada com XZ)</comment>
- <comment xml:lang="ru">необработанный образ диска (XZ-сжатый)</comment>
- <comment xml:lang="sk">Obraz disku (komprimovaný pomocou XZ)</comment>
- <comment xml:lang="sl">Surovi odtis diska (stisnjeno z XZ)</comment>
- <comment xml:lang="sr">сирова слика диска (запакована ИксЗ-ом)</comment>
- <comment xml:lang="sv">Rå diskavbild (XZ-komprimerad)</comment>
- <comment xml:lang="tr">İşlem görmemiş disk imajı (XZ ile sıkıştırılmış)</comment>
- <comment xml:lang="uk">простий образ диска (стиснений XZ)</comment>
- <comment xml:lang="zh_CN">原始磁盘镜像(XZ 压缩)</comment>
- <comment xml:lang="zh_TW">原生磁碟映像 (XZ 格式壓縮)</comment>
- <sub-class-of type="application/x-xz"/>
- <glob pattern="*.raw-disk-image.xz"/>
- <glob pattern="*.img.xz"/>
- </mime-type>
+ <comment>Raw disk image</comment>
+ <comment xml:lang="ast">Imaxe de discu en bruto</comment>
+ <comment xml:lang="ca">imatge de disc RAW</comment>
+ <comment xml:lang="cs">surový obraz disku</comment>
+ <comment xml:lang="da">Rå diskaftryk</comment>
+ <comment xml:lang="de">Rohes Datenträgerabbild</comment>
+ <comment xml:lang="el">Ανεπεξέργαστη εικόνα δίσκου</comment>
+ <comment xml:lang="en_GB">Raw disk image</comment>
+ <comment xml:lang="es">imagen de disco en bruto</comment>
+ <comment xml:lang="eu">Disko gordinaren irudia</comment>
+ <comment xml:lang="fi">Raaka levytiedosto</comment>
+ <comment xml:lang="fr">image disque Raw</comment>
+ <comment xml:lang="ga">Amhíomha diosca</comment>
+ <comment xml:lang="gl">Imaxe de disco en bruto</comment>
+ <comment xml:lang="he">דמות גולמית של כונן</comment>
+ <comment xml:lang="hr">Osnovna slika diska</comment>
+ <comment xml:lang="hu">Nyers lemezkép</comment>
+ <comment xml:lang="ia">Imagine de disco crude</comment>
+ <comment xml:lang="id">Image disk mentah</comment>
+ <comment xml:lang="it">Immagine disco raw</comment>
+ <comment xml:lang="kk">Шикі диск бейнесі</comment>
+ <comment xml:lang="ko">RAW 디스크 이미지</comment>
+ <comment xml:lang="oc">imatge disc Raw</comment>
+ <comment xml:lang="pl">Surowy obraz dysku</comment>
+ <comment xml:lang="pt">imagem de disco Raw</comment>
+ <comment xml:lang="pt_BR">Imagem bruta de disco</comment>
+ <comment xml:lang="ru">Необработанный образ диска</comment>
+ <comment xml:lang="sk">Obraz disku</comment>
+ <comment xml:lang="sl">Surovi odtis diska</comment>
+ <comment xml:lang="sr">сиров одраз диска</comment>
+ <comment xml:lang="sv">Rå diskavbild</comment>
+ <comment xml:lang="tr">İşlem görmemiş disk imajı</comment>
+ <comment xml:lang="uk">простий образ диска</comment>
+ <comment xml:lang="zh_CN">原始磁盘映像</comment>
+ <comment xml:lang="zh_TW">原生磁碟映像檔</comment>
+ <glob pattern="*.raw-disk-image"/>
+ <glob pattern="*.img"/>
+ </mime-type>
+ <mime-type type="application/x-raw-floppy-disk-image">
+ <comment>Floppy disk image</comment>
+ <sub-class-of type="application/x-raw-disk-image"/>
+ <alias type="application/x-fd-file"/>
+ <glob pattern="*.fd"/>
+ <glob pattern="*.qd"/>
+ </mime-type>
+ <mime-type type="application/x-raw-disk-image-xz-compressed">
+ <comment>Raw disk image (XZ-compressed)</comment>
+ <comment xml:lang="ast">Imaxe de discu en bruto (comprimida en XZ)</comment>
+ <comment xml:lang="ca">imatge de disc RAW (amb compressió XZ)</comment>
+ <comment xml:lang="cs">surový obraz disku (komprimovaný pomocí XZ)</comment>
+ <comment xml:lang="da">Rå diskaftryk (XZ-komprimeret)</comment>
+ <comment xml:lang="de">Rohes Datenträgerabbild (XZ-komprimiert)</comment>
+ <comment xml:lang="el">Ανεπεξέργαστη εικόνα δίσκου (συμπιεσμένη XZ)</comment>
+ <comment xml:lang="en_GB">Raw disk image (XZ-compressed)</comment>
+ <comment xml:lang="es">imagen de disco en bruto (comprimida con XZ)</comment>
+ <comment xml:lang="eu">Disko gordinaren irudia (XZ-rekin konprimitua)</comment>
+ <comment xml:lang="fi">Raaka levytiedosto (XZ-pakattu)</comment>
+ <comment xml:lang="fr">image disque Raw (compression XZ)</comment>
+ <comment xml:lang="ga">Amhíomhá (comhbhrúite le XZ)</comment>
+ <comment xml:lang="gl">Imaxe de disco en bruto (comprimida en XZ)</comment>
+ <comment xml:lang="he">דמות גולמית של כונן (בדחיסת XZ)</comment>
+ <comment xml:lang="hr">Osnovna slika diska (XZ sažeta)</comment>
+ <comment xml:lang="hu">Nyers lemezkép (XZ-vel tömörítve)</comment>
+ <comment xml:lang="ia">Imagine de disco crude (comprimite con XZ)</comment>
+ <comment xml:lang="id">Image disk mentah (terkompresi XZ)</comment>
+ <comment xml:lang="it">Immagine disco raw (compressa XZ)</comment>
+ <comment xml:lang="kk">Шикі диск бейнесі (XZ-мен сығылған)</comment>
+ <comment xml:lang="ko">RAW 디스크 이미지(XZ 압축)</comment>
+ <comment xml:lang="oc">imatge disc Raw (compression XZ)</comment>
+ <comment xml:lang="pl">Surowy obraz dysku (kompresja XZ)</comment>
+ <comment xml:lang="pt">imagem de disco Raw (compressão XZ)</comment>
+ <comment xml:lang="pt_BR">Imagem bruta de disco (compactada com XZ)</comment>
+ <comment xml:lang="ru">Необработанный образ диска (сжатый xz)</comment>
+ <comment xml:lang="sk">Obraz disku (komprimovaný pomocou XZ)</comment>
+ <comment xml:lang="sl">Surovi odtis diska (stisnjeno z XZ)</comment>
+ <comment xml:lang="sr">сиров одраз диска (запакована ИксЗ-ом)</comment>
+ <comment xml:lang="sv">Rå diskavbild (XZ-komprimerad)</comment>
+ <comment xml:lang="tr">İşlem görmemiş disk imajı (XZ ile sıkıştırılmış)</comment>
+ <comment xml:lang="uk">простий образ диска (стиснений XZ)</comment>
+ <comment xml:lang="zh_CN">原始磁盘映像(XZ 压缩)</comment>
+ <comment xml:lang="zh_TW">原生磁碟映像 (XZ 格式壓縮)</comment>
+ <sub-class-of type="application/x-xz"/>
+ <glob pattern="*.raw-disk-image.xz"/>
+ <glob pattern="*.img.xz"/>
+ </mime-type>
<mime-type type="application/x-cd-image">
<comment>raw CD image</comment>
<comment xml:lang="ar">صورة CD خامة</comment>
+ <comment xml:lang="ast">imaxe de CD en bruto</comment>
<comment xml:lang="be@latin">suvoraja vyjava CD</comment>
<comment xml:lang="bg">Изображение — raw CD</comment>
<comment xml:lang="ca">imatge de CD en cru</comment>
@@ -8440,17 +8635,17 @@
<comment xml:lang="pt">imagem em bruto de CD</comment>
<comment xml:lang="pt_BR">Imagem bruta de CD</comment>
<comment xml:lang="ro">imagine de CD brută</comment>
- <comment xml:lang="ru">необработанный образ компакт-диска</comment>
+ <comment xml:lang="ru">Необработанный образ компакт-диска</comment>
<comment xml:lang="sk">Surový obraz CD</comment>
<comment xml:lang="sl">surovi CD odtis</comment>
<comment xml:lang="sq">Imazh raw CD</comment>
- <comment xml:lang="sr">сирова слика ЦД-а</comment>
+ <comment xml:lang="sr">сиров одраз ЦД-а</comment>
<comment xml:lang="sv">rå cd-avbild</comment>
<comment xml:lang="tr">Ham CD görüntüsü</comment>
<comment xml:lang="uk">образ raw CD</comment>
<comment xml:lang="vi">ảnh đĩa CD thô</comment>
<comment xml:lang="zh_CN">原始 CD 映像</comment>
- <comment xml:lang="zh_TW">原生 CD 映像</comment>
+ <comment xml:lang="zh_TW">原生 CD 映像檔</comment>
<sub-class-of type="application/x-raw-disk-image"/>
<alias type="application/x-iso9660-image"/>
@@ -8460,20 +8655,31 @@
<mime-type type="application/x-iso9660-appimage">
<comment>AppImage application bundle</comment>
<comment xml:lang="ca">paquet d'aplicació AppImage</comment>
+ <comment xml:lang="cs">balíček AppImage s aplikací</comment>
<comment xml:lang="da">Applmage-programsamling</comment>
<comment xml:lang="de">AppImage-Anwendungspaket</comment>
+ <comment xml:lang="en_GB">AppImage application bundle</comment>
<comment xml:lang="es">paquete de aplicación AppImage</comment>
+ <comment xml:lang="eu">AppImage aplikazio bilduma</comment>
+ <comment xml:lang="fi">AppImage-sovelluspaketti</comment>
<comment xml:lang="fr">lot applicatif AppImage</comment>
+ <comment xml:lang="ga">burla feidhmchláir AppImage</comment>
<comment xml:lang="he">חבילת יישומי AppImage</comment>
+ <comment xml:lang="hr">AppImage paket aplikacije</comment>
<comment xml:lang="hu">AppImage alkalmazáscsomag</comment>
+ <comment xml:lang="id">bundel aplikasi AppImage</comment>
+ <comment xml:lang="it">Bundle applicazione AppImage</comment>
<comment xml:lang="kk">AppImage қолданбалар дестесі</comment>
<comment xml:lang="ko">AppImage 프로그램 번들</comment>
<comment xml:lang="pl">Pakiet programu AppImage</comment>
<comment xml:lang="pt_BR">Pacote de aplicativo AppImage</comment>
- <comment xml:lang="ru">пакет приложений AppImage</comment>
+ <comment xml:lang="ru">Пакет приложения AppImage</comment>
<comment xml:lang="sk">Balík aplikácií AppImage</comment>
+ <comment xml:lang="sr">скуп програма Ап-слике</comment>
+ <comment xml:lang="sv">AppImage-programbunt</comment>
+ <comment xml:lang="tr">AppImage uygulama paketi</comment>
<comment xml:lang="uk">пакунок із програмами AppImage</comment>
- <comment xml:lang="zh_CN">AppImage 应用包</comment>
+ <comment xml:lang="zh_CN">AppImage 应用组合包</comment>
<comment xml:lang="zh_TW">AppImage 應用程式套組</comment>
<sub-class-of type="application/x-executable"/>
<sub-class-of type="application/x-iso9660-image"/>
@@ -8488,7 +8694,6 @@
</match>
</magic>
<glob pattern="*.appimage"/>
- <glob pattern="*.AppImage"/>
</mime-type>
<mime-type type="application/x-cdrdao-toc">
<comment>CD Table Of Contents</comment>
@@ -8527,7 +8732,7 @@
<comment xml:lang="pt">Tabela de conteúdos de CD</comment>
<comment xml:lang="pt_BR">Sumário de CD</comment>
<comment xml:lang="ro">Tabel conținut CD</comment>
- <comment xml:lang="ru">таблица содержания CD</comment>
+ <comment xml:lang="ru">Таблица содержания CD</comment>
<comment xml:lang="sk">Obsah CD</comment>
<comment xml:lang="sl">Kazalo vsebine CD nosilca</comment>
<comment xml:lang="sq">Tregues CD</comment>
@@ -8588,7 +8793,7 @@
<comment xml:lang="pt">notação de jogo de xadrez PGN</comment>
<comment xml:lang="pt_BR">Notação de jogo de xadrez PGN</comment>
<comment xml:lang="ro">Notație joc șah PGN</comment>
- <comment xml:lang="ru">шахматная партия PGN</comment>
+ <comment xml:lang="ru">Шахматная партия PGN</comment>
<comment xml:lang="sk">Šachová notácia PGN</comment>
<comment xml:lang="sl">Datoteka opomb šahovske igre PGN</comment>
<comment xml:lang="sq">Njoftim loje shahu PGN</comment>
@@ -8612,6 +8817,7 @@
<mime-type type="application/vnd.ms-htmlhelp">
<comment>CHM document</comment>
<comment xml:lang="ar">مستند CHM</comment>
+ <comment xml:lang="ast">Documentu CHM</comment>
<comment xml:lang="be@latin">Dakument CHM</comment>
<comment xml:lang="bg">Документ — CHM</comment>
<comment xml:lang="ca">document CHM</comment>
@@ -8648,7 +8854,7 @@
<comment xml:lang="pt">documento CHM</comment>
<comment xml:lang="pt_BR">Documento CHM</comment>
<comment xml:lang="ro">Document CHM</comment>
- <comment xml:lang="ru">документ CHM</comment>
+ <comment xml:lang="ru">Документ CHM</comment>
<comment xml:lang="sk">Dokument CHM</comment>
<comment xml:lang="sl">Dokument CHM</comment>
<comment xml:lang="sq">Dokument CHM</comment>
@@ -8706,7 +8912,7 @@
<comment xml:lang="pt">byte-code Java</comment>
<comment xml:lang="pt_BR">Código compilado Java</comment>
<comment xml:lang="ro">Bytecode Java</comment>
- <comment xml:lang="ru">байт-код Java</comment>
+ <comment xml:lang="ru">Байт-код Java</comment>
<comment xml:lang="sk">Bajtový kód Java</comment>
<comment xml:lang="sl">Datoteka bitne kode Java</comment>
<comment xml:lang="sq">Byte code Java</comment>
@@ -8738,7 +8944,7 @@
<comment xml:lang="ga">comhad UNIX-comhbhrúite</comment>
<comment xml:lang="gl">ficheiro comprimido de UNIX</comment>
<comment xml:lang="he">קובץ בכיווץ UNIX</comment>
- <comment xml:lang="hr">UNIX-komprimirana datoteka</comment>
+ <comment xml:lang="hr">UNIX sažeta datoteka</comment>
<comment xml:lang="hu">Tömörített UNIX-fájl</comment>
<comment xml:lang="ia">File comprimite de UNIX</comment>
<comment xml:lang="id">Berkas terkompresi UNIX</comment>
@@ -8757,7 +8963,7 @@
<comment xml:lang="pt">ficheiro comprimido UNIX</comment>
<comment xml:lang="pt_BR">Arquivo compactado do UNIX</comment>
<comment xml:lang="ro">Fișier comprimat UNIX</comment>
- <comment xml:lang="ru">файл (UNIX-сжатый)</comment>
+ <comment xml:lang="ru">Файл (UNIX-сжатый)</comment>
<comment xml:lang="sk">Súbor komprimovaný v Unixe</comment>
<comment xml:lang="sl">Skrčena Unix datoteka</comment>
<comment xml:lang="sq">File i kompresuar UNIX</comment>
@@ -8793,7 +8999,7 @@
<comment xml:lang="ga">cartlann Tar (comhbhrúite le gzip)</comment>
<comment xml:lang="gl">arquivo Tar (comprimido con gzip)</comment>
<comment xml:lang="he">ארכיון Tar (מכווץ ע״י gzip)</comment>
- <comment xml:lang="hr">Tar arhiva (komprimirana gzip-om)</comment>
+ <comment xml:lang="hr">Tar arhiva (gzip sažeta)</comment>
<comment xml:lang="hu">Tar archívum (gzip-pel tömörítve)</comment>
<comment xml:lang="ia">Archivo Tar (comprimite con gzip)</comment>
<comment xml:lang="id">Arsip Tar (terkompresi gzip)</comment>
@@ -8811,7 +9017,7 @@
<comment xml:lang="pt">arquivo Tar (compressão gzip)</comment>
<comment xml:lang="pt_BR">Pacote Tar (compactado com gzip)</comment>
<comment xml:lang="ro">Arhivă Tar (comprimată gzip)</comment>
- <comment xml:lang="ru">архив TAR (сжатый GZIP)</comment>
+ <comment xml:lang="ru">Архив TAR (сжатый gzip)</comment>
<comment xml:lang="sk">Archív tar (komprimovaný pomocou gzip)</comment>
<comment xml:lang="sl">Datoteka arhiva Tar (stisnjen z gzip)</comment>
<comment xml:lang="sq">Arkiv tar (i kompresuar me gzip)</comment>
@@ -8820,7 +9026,7 @@
<comment xml:lang="tr">Tar arşivi (gzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">архів tar (стиснений gzip)</comment>
<comment xml:lang="vi">Kho nén tar (đã nén gzip)</comment>
- <comment xml:lang="zh_CN">Tar 归档文件(gzip 压缩)</comment>
+ <comment xml:lang="zh_CN">Tar 归档文件(gzip 压缩)</comment>
<comment xml:lang="zh_TW">Tar 封存檔 (gzip 格式壓縮)</comment>
<sub-class-of type="application/gzip"/>
<generic-icon name="package-x-generic"/>
@@ -8844,7 +9050,7 @@
<comment xml:lang="fi">ohjelman kaatumistiedot</comment>
<comment xml:lang="fo">forrits sordáta</comment>
<comment xml:lang="fr">données de plantage de programme</comment>
- <comment xml:lang="ga">sonraí thuairt ríomhchláir</comment>
+ <comment xml:lang="ga">sonraí tuairte ríomhchláir</comment>
<comment xml:lang="gl">datos de colgue do programa</comment>
<comment xml:lang="he">מידע מקריסת תכנית</comment>
<comment xml:lang="hr">podaci o rušenju programa</comment>
@@ -8866,7 +9072,7 @@
<comment xml:lang="pt">dados de rebentamento de aplicação</comment>
<comment xml:lang="pt_BR">Dados de travamento de programa</comment>
<comment xml:lang="ro">date eroare program</comment>
- <comment xml:lang="ru">данные аварийного завершения</comment>
+ <comment xml:lang="ru">Данные аварийного завершения программы</comment>
<comment xml:lang="sk">Údaje o páde programu</comment>
<comment xml:lang="sl">podatki sesutja programa</comment>
<comment xml:lang="sq">Të dhëna nga programi i bllokuar</comment>
@@ -8897,6 +9103,7 @@
<mime-type type="application/x-cpio">
<comment>CPIO archive</comment>
<comment xml:lang="ar">أرشيف CPIO</comment>
+ <comment xml:lang="ast">Archivu CPIO</comment>
<comment xml:lang="az">CPIO arxivi</comment>
<comment xml:lang="be@latin">Archiŭ CPIO</comment>
<comment xml:lang="bg">Архив — CPIO</comment>
@@ -8936,7 +9143,7 @@
<comment xml:lang="pt">arquivo CPIO</comment>
<comment xml:lang="pt_BR">Pacote CPIO</comment>
<comment xml:lang="ro">Arhivă CPIO</comment>
- <comment xml:lang="ru">архив CPIO</comment>
+ <comment xml:lang="ru">Архив CPIO</comment>
<comment xml:lang="sk">Archív CPIO</comment>
<comment xml:lang="sl">Datoteka arhiva CPIO</comment>
<comment xml:lang="sq">Arkiv CPIO</comment>
@@ -8978,7 +9185,7 @@
<comment xml:lang="ga">cartlann CPIO (comhbhrúite le gzip)</comment>
<comment xml:lang="gl">arquivo CPIO (comprimido con gzip)</comment>
<comment xml:lang="he">ארכיון CPIO (מכווץ ע״י gzip)</comment>
- <comment xml:lang="hr">CPIO arhiva (komprimirana gzip-om)</comment>
+ <comment xml:lang="hr">CPIO arhiva (gzip sažeta)</comment>
<comment xml:lang="hu">CPIO-archívum (gzip-pel tömörítve)</comment>
<comment xml:lang="ia">Archivo CPIO (comprimite con gzip)</comment>
<comment xml:lang="id">Arsip CPIO (terkompresi gzip)</comment>
@@ -8998,7 +9205,7 @@
<comment xml:lang="pt">arquivo CPIO (compressão gzip)</comment>
<comment xml:lang="pt_BR">Pacote CPIO (compactado com gzip)</comment>
<comment xml:lang="ro">Arhivă CPIO (compresie gzip)</comment>
- <comment xml:lang="ru">архив CPIO (сжатый GZIP)</comment>
+ <comment xml:lang="ru">Архив CPIO (сжатый gzip)</comment>
<comment xml:lang="sk">Archív CPIO (komprimovaný pomocou gzip)</comment>
<comment xml:lang="sl">Datoteka arhiva CPIO (skrčena z gzip)</comment>
<comment xml:lang="sq">Arkiv CPIO (kompresuar me gzip)</comment>
@@ -9007,7 +9214,7 @@
<comment xml:lang="tr">CPIO arşivi (gzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">архів CPIO (стиснений gzip)</comment>
<comment xml:lang="vi">Kho nén CPIO (đã nén gzip)</comment>
- <comment xml:lang="zh_CN">CPIO 归档文件(gzip 压缩)</comment>
+ <comment xml:lang="zh_CN">CPIO 归档文件(gzip 压缩)</comment>
<comment xml:lang="zh_TW">CPIO 封存檔 (gzip 格式壓縮)</comment>
<sub-class-of type="application/gzip"/>
<generic-icon name="package-x-generic"/>
@@ -9019,7 +9226,7 @@
<comment xml:lang="az">C qabıq skripti</comment>
<comment xml:lang="be@latin">Skrypt abałonki C</comment>
<comment xml:lang="bg">Скрипт — обвивка C</comment>
- <comment xml:lang="ca">script de C shell</comment>
+ <comment xml:lang="ca">script C shell</comment>
<comment xml:lang="cs">skript shellu C</comment>
<comment xml:lang="cy">Sgript plisgyn C</comment>
<comment xml:lang="da">C-skalprogram</comment>
@@ -9032,10 +9239,10 @@
<comment xml:lang="fi">Csh-komentotiedosto</comment>
<comment xml:lang="fo">C skel boðrøð</comment>
<comment xml:lang="fr">script C shell</comment>
- <comment xml:lang="ga">script bhlaosc C</comment>
+ <comment xml:lang="ga">script bhlaoisce C</comment>
<comment xml:lang="gl">script de C shell</comment>
<comment xml:lang="he">תסריט מעטפת C</comment>
- <comment xml:lang="hr">C skripta</comment>
+ <comment xml:lang="hr">C skripta ljuske</comment>
<comment xml:lang="hu">C héj-parancsfájl</comment>
<comment xml:lang="ia">Script C-shell</comment>
<comment xml:lang="id">Skrip shell C</comment>
@@ -9054,11 +9261,11 @@
<comment xml:lang="pt">script de terminal C</comment>
<comment xml:lang="pt_BR">Script de shell C</comment>
<comment xml:lang="ro">Script C shell</comment>
- <comment xml:lang="ru">сценарий C shell</comment>
+ <comment xml:lang="ru">Сценарий C shell</comment>
<comment xml:lang="sk">Skript shellu C</comment>
<comment xml:lang="sl">Skriptna datoteka lupine C</comment>
<comment xml:lang="sq">Script shell C</comment>
- <comment xml:lang="sr">скрипта Ц љуске</comment>
+ <comment xml:lang="sr">скрипта Ц шкољке</comment>
<comment xml:lang="sv">Skalskript (csh)</comment>
<comment xml:lang="tr">C kabuk betiği</comment>
<comment xml:lang="uk">скрипт оболонки C</comment>
@@ -9079,6 +9286,7 @@
<mime-type type="application/x-dbf">
<comment>Xbase document</comment>
<comment xml:lang="ar">مستند Xbase</comment>
+ <comment xml:lang="ast">Documentu Xbase</comment>
<comment xml:lang="be@latin">Dakument Xbase</comment>
<comment xml:lang="bg">Документ — Xbase</comment>
<comment xml:lang="ca">document Xbase</comment>
@@ -9114,7 +9322,7 @@
<comment xml:lang="pt">documento Xbase</comment>
<comment xml:lang="pt_BR">Documento do Xbase</comment>
<comment xml:lang="ro">Document Xbase</comment>
- <comment xml:lang="ru">документ Xbase</comment>
+ <comment xml:lang="ru">Документ Xbase</comment>
<comment xml:lang="sk">Dokument Xbase</comment>
<comment xml:lang="sl">Dokument Xbase</comment>
<comment xml:lang="sq">Dokument Xbase</comment>
@@ -9169,7 +9377,7 @@
<comment xml:lang="pt">programa ECMAScript</comment>
<comment xml:lang="pt_BR">Programa ECMAScript</comment>
<comment xml:lang="ro">Program ECMAScript</comment>
- <comment xml:lang="ru">программа ECMAScript</comment>
+ <comment xml:lang="ru">Программа ECMAScript</comment>
<comment xml:lang="sk">Program ECMAScript</comment>
<comment xml:lang="sl">Programska datoteka ECMAScript</comment>
<comment xml:lang="sq">Program ECMAScript</comment>
@@ -9181,6 +9389,7 @@
<comment xml:lang="zh_CN">ECMAScript 程序</comment>
<comment xml:lang="zh_TW">ECMAScript 程式</comment>
<alias type="text/ecmascript"/>
+ <sub-class-of type='application/x-executable'/>
<sub-class-of type="text/plain"/>
<generic-icon name="text-x-script"/>
<glob pattern="*.es"/>
@@ -9188,22 +9397,33 @@
<mime-type type="application/x-sega-cd-rom">
<comment>Sega CD disc image</comment>
+ <comment xml:lang="ast">Imaxe de discu de Sega CD</comment>
<comment xml:lang="ca">imatge de disc de Sega CD</comment>
+ <comment xml:lang="cs">obraz disku CD pro Sega</comment>
<comment xml:lang="da">Sega CD-diskaftryk</comment>
<comment xml:lang="de">Sega-CD-Datenträgerabbild</comment>
+ <comment xml:lang="en_GB">Sega CD disc image</comment>
<comment xml:lang="es">imagen de disco CD de Sega</comment>
+ <comment xml:lang="eu">Sega CD disko irudia</comment>
<comment xml:lang="fi">Sega CD -levykuva</comment>
<comment xml:lang="fr">image disque Sega CD</comment>
+ <comment xml:lang="ga">íomhá dlúthdhiosca Sega</comment>
<comment xml:lang="he">דמות כונן Sega CD</comment>
+ <comment xml:lang="hr">Sega CD slika diska</comment>
<comment xml:lang="hu">Sega CD-lemezkép</comment>
+ <comment xml:lang="id">image cakram CD Sega</comment>
+ <comment xml:lang="it">Immagine disco Sega Mega CD</comment>
<comment xml:lang="kk">Sega CD диск бейнесі</comment>
<comment xml:lang="ko">세가 CD 디스크 이미지</comment>
<comment xml:lang="pl">Obraz płyty konsoli Mega-CD</comment>
<comment xml:lang="pt_BR">Imagem de disco Sega CD</comment>
- <comment xml:lang="ru">образ диска CD Sega</comment>
+ <comment xml:lang="ru">Образ диска CD Sega</comment>
<comment xml:lang="sk">Obraz disku CD Sega</comment>
+ <comment xml:lang="sr">одраз диска Сега ЦД-а</comment>
+ <comment xml:lang="sv">Mega-CD-skivavbild</comment>
+ <comment xml:lang="tr">Sega CD disk kalıbı</comment>
<comment xml:lang="uk">образ диска Sega CD</comment>
- <comment xml:lang="zh_CN">Sega CD 光盘镜像</comment>
+ <comment xml:lang="zh_CN">Sega CD 光盘映像</comment>
<comment xml:lang="zh_TW">Sega CD 光碟映像檔</comment>
<generic-icon name="application-x-executable"/>
@@ -9221,6 +9441,32 @@
<mime-type type="application/x-sega-pico-rom">
<comment>Sega Pico ROM</comment>
+ <comment xml:lang="ast">ROM de Sega Pico</comment>
+ <comment xml:lang="ca">ROM de Sega Pico</comment>
+ <comment xml:lang="cs">ROM pro Sega Pico</comment>
+ <comment xml:lang="de">Sega Pico ROM</comment>
+ <comment xml:lang="en_GB">Sega Pico ROM</comment>
+ <comment xml:lang="es">ROM de Sega Pico</comment>
+ <comment xml:lang="eu">Sega Pico ROM</comment>
+ <comment xml:lang="fi">Sega Pico ROM</comment>
+ <comment xml:lang="fr">ROM Sega Pico</comment>
+ <comment xml:lang="ga">ROM Sega Pico</comment>
+ <comment xml:lang="hr">Sega Pico ROM</comment>
+ <comment xml:lang="hu">Sega Pico ROM</comment>
+ <comment xml:lang="id">ROM Sega Pico</comment>
+ <comment xml:lang="it">ROM Sega Pico</comment>
+ <comment xml:lang="kk">Sega Pico ROM</comment>
+ <comment xml:lang="ko">세카 피코 롬</comment>
+ <comment xml:lang="pl">Plik ROM konsoli Sega Pico</comment>
+ <comment xml:lang="pt_BR">ROM de Sega Pico</comment>
+ <comment xml:lang="ru">Sega Pico ROM</comment>
+ <comment xml:lang="sk">ROM pre Sega Pico</comment>
+ <comment xml:lang="sr">Сега Пико РОМ</comment>
+ <comment xml:lang="sv">Sega Pico-rom</comment>
+ <comment xml:lang="tr">Sega Pico ROM</comment>
+ <comment xml:lang="uk">ППП Sega Pico</comment>
+ <comment xml:lang="zh_CN">Sega Pico ROM</comment>
+ <comment xml:lang="zh_TW">Sega Pico ROM</comment>
<generic-icon name="application-x-executable"/>
<magic priority="50">
<match value="SEGA PICO" type="string" offset="256"/>
@@ -9228,6 +9474,7 @@
</mime-type>
<mime-type type="application/x-saturn-rom">
<comment>Sega Saturn disc image</comment>
+ <comment xml:lang="ast">Imaxe de discu de Sega Saturn</comment>
<comment xml:lang="ca">imatge de disc de Sega Saturn</comment>
<comment xml:lang="cs">obraz disku pro Sega Saturn</comment>
<comment xml:lang="da">Sega Saturn-diskaftryk</comment>
@@ -9238,6 +9485,7 @@
<comment xml:lang="eu">Sega Saturn disko irudia</comment>
<comment xml:lang="fi">Sega Saturn -levykuva</comment>
<comment xml:lang="fr">image disque Sega Saturn</comment>
+ <comment xml:lang="ga">íomhá diosca Sega Saturn</comment>
<comment xml:lang="he">דמות כונן Sega Saturn</comment>
<comment xml:lang="hr">Sega Saturn slika diska</comment>
<comment xml:lang="hu">Sega Saturn lemezkép</comment>
@@ -9250,13 +9498,13 @@
<comment xml:lang="pl">Obraz płyty konsoli Sega Saturn</comment>
<comment xml:lang="pt">imagem de disco Sega Saturn</comment>
<comment xml:lang="pt_BR">Imagem de disco do Sega Saturn</comment>
- <comment xml:lang="ru">образ диска Sega Saturn</comment>
+ <comment xml:lang="ru">Образ диска Sega Saturn</comment>
<comment xml:lang="sk">Obraz disku Sega Saturn</comment>
- <comment xml:lang="sr">слика диска Сега Сатурна</comment>
+ <comment xml:lang="sr">одраз диска Сега Сатурна</comment>
<comment xml:lang="sv">Sega Saturn-skivavbild</comment>
<comment xml:lang="tr">Sega Saturn disk kalıbı</comment>
<comment xml:lang="uk">образ диска Sega Saturn</comment>
- <comment xml:lang="zh_CN">Sega Saturn 光盘镜像</comment>
+ <comment xml:lang="zh_CN">Sega Saturn 光盘映像</comment>
<comment xml:lang="zh_TW">Sega Saturn 光碟映像檔</comment>
<generic-icon name="application-x-executable"/>
<magic priority="50">
@@ -9268,6 +9516,7 @@
</mime-type>
<mime-type type="application/x-dc-rom">
<comment>Dreamcast GD-ROM</comment>
+ <comment xml:lang="ast">GD-ROM de Dreamcast</comment>
<comment xml:lang="ca">GD-ROM de Dreamcast</comment>
<comment xml:lang="cs">GD-ROM pro Dreamcast</comment>
<comment xml:lang="da">Dreamcast GD-ROM</comment>
@@ -9277,6 +9526,7 @@
<comment xml:lang="es">GD-ROM de Dreamcast</comment>
<comment xml:lang="eu">Dreamcast GD-ROM</comment>
<comment xml:lang="fr">GD-ROM Dreamcast</comment>
+ <comment xml:lang="ga">GD-ROM Dreamcast</comment>
<comment xml:lang="he">Dreamcast GD-ROM</comment>
<comment xml:lang="hr">Dreamcast GD-ROM</comment>
<comment xml:lang="hu">Dreamcast GD-ROM</comment>
@@ -9288,8 +9538,8 @@
<comment xml:lang="oc">GD-ROM Dreamcast</comment>
<comment xml:lang="pl">Plik GD-ROM konsoli Dreamcast</comment>
<comment xml:lang="pt">GD-ROM Dreamcast</comment>
- <comment xml:lang="pt_BR">GD-ROM do Dreamcast</comment>
- <comment xml:lang="ru">GD-ROM Dreamcast</comment>
+ <comment xml:lang="pt_BR">GD-ROM de Dreamcast</comment>
+ <comment xml:lang="ru">Dreamcast GD-ROM</comment>
<comment xml:lang="sk">Dreamcast GD-ROM</comment>
<comment xml:lang="sr">Дримкаст ГД-РОМ</comment>
<comment xml:lang="sv">Dreamcast-gd-rom</comment>
@@ -9303,6 +9553,7 @@
<mime-type type="application/x-nintendo-ds-rom">
<comment>Nintendo DS ROM</comment>
<comment xml:lang="ar">Nintendo DS ROM</comment>
+ <comment xml:lang="ast">ROM de Nintendo DS</comment>
<comment xml:lang="be@latin">Nintendo DS ROM</comment>
<comment xml:lang="bg">ROM — Nintendo DS</comment>
<comment xml:lang="ca">ROM de Nintendo DS</comment>
@@ -9335,7 +9586,7 @@
<comment xml:lang="oc">ROM Nintendo DS</comment>
<comment xml:lang="pl">Plik ROM konsoli Nintendo DS</comment>
<comment xml:lang="pt">ROM Nintendo DS</comment>
- <comment xml:lang="pt_BR">ROM do Nintendo DS</comment>
+ <comment xml:lang="pt_BR">ROM de Nintendo DS</comment>
<comment xml:lang="ro">ROM Nintendo DS</comment>
<comment xml:lang="ru">Nintendo DS ROM</comment>
<comment xml:lang="sk">ROM pre Nintendo DS</comment>
@@ -9346,13 +9597,14 @@
<comment xml:lang="tr">Nintendo DS ROM</comment>
<comment xml:lang="uk">ППП Nintendo</comment>
<comment xml:lang="vi">ROM DS Nintendo</comment>
- <comment xml:lang="zh_CN">Nintendo DS ROM</comment>
+ <comment xml:lang="zh_CN">任天堂 DS ROM</comment>
<comment xml:lang="zh_TW">任天堂 DS ROM</comment>
<generic-icon name="application-x-executable"/>
<glob pattern="*.nds"/>
</mime-type>
<mime-type type="application/x-pc-engine-rom">
<comment>PC Engine ROM</comment>
+ <comment xml:lang="ast">ROM de PC Engine</comment>
<comment xml:lang="ca">ROM de PC Engine</comment>
<comment xml:lang="cs">ROM pro PC Engine</comment>
<comment xml:lang="da">PC Engine ROM</comment>
@@ -9363,6 +9615,7 @@
<comment xml:lang="eu">PC Engine ROM</comment>
<comment xml:lang="fi">PC Engine ROM</comment>
<comment xml:lang="fr">ROM PC Engine</comment>
+ <comment xml:lang="ga">ROM PC Engine</comment>
<comment xml:lang="gl">ROM de máquina de PC</comment>
<comment xml:lang="he">ROM של PC Engine</comment>
<comment xml:lang="hr">PC Engine ROM</comment>
@@ -9390,6 +9643,7 @@
</mime-type>
<mime-type type="application/x-wii-rom">
<comment>Wii disc image</comment>
+ <comment xml:lang="ast">Imaxe de discu de Wii</comment>
<comment xml:lang="ca">imatge de disc de Wii</comment>
<comment xml:lang="cs">obraz disku pro Wii</comment>
<comment xml:lang="da">Wii-diskaftryk</comment>
@@ -9400,6 +9654,7 @@
<comment xml:lang="eu">Wii disko irudia</comment>
<comment xml:lang="fi">Wii-levykuva</comment>
<comment xml:lang="fr">image disque Wii</comment>
+ <comment xml:lang="ga">íomhá diosca Wii</comment>
<comment xml:lang="gl">Imaxe de disco de Wii</comment>
<comment xml:lang="he">דמות כונן Wii</comment>
<comment xml:lang="hr">Wii slika diska</comment>
@@ -9413,14 +9668,14 @@
<comment xml:lang="pl">Obraz płyty konsoli Wii</comment>
<comment xml:lang="pt">imagem de disco Wii</comment>
<comment xml:lang="pt_BR">Imagem de disco Wii</comment>
- <comment xml:lang="ru">образ диска Wii</comment>
+ <comment xml:lang="ru">Образ диска Wii</comment>
<comment xml:lang="sk">Obraz disku Wii</comment>
<comment xml:lang="sl">Odtis diska Wii</comment>
- <comment xml:lang="sr">слика диска Вии-ја</comment>
+ <comment xml:lang="sr">одраз диска Вии-ја</comment>
<comment xml:lang="sv">Wii-skivavbild</comment>
<comment xml:lang="tr">Wii disk görüntüsü</comment>
<comment xml:lang="uk">образ диска Wii</comment>
- <comment xml:lang="zh_CN">Wii光盘镜像</comment>
+ <comment xml:lang="zh_CN">Wii 光盘映像</comment>
<comment xml:lang="zh_TW">Wii 光碟映像檔</comment>
<alias type="application/x-wii-iso-image"/>
<alias type="application/x-wbfs"/>
@@ -9441,7 +9696,9 @@
<comment xml:lang="de">WiiWare-Paket</comment>
<comment xml:lang="en_GB">WiiWare bundle</comment>
<comment xml:lang="es">conjunto de WiiWare</comment>
+ <comment xml:lang="eu">WiiWare bilduma</comment>
<comment xml:lang="fr">lot WiiWare</comment>
+ <comment xml:lang="ga">burla WiiWare</comment>
<comment xml:lang="he">מאגד WiiWare</comment>
<comment xml:lang="hr">WiiWare paket</comment>
<comment xml:lang="hu">WiiWare csomag</comment>
@@ -9454,13 +9711,13 @@
<comment xml:lang="pl">Pakiet WiiWare</comment>
<comment xml:lang="pt">pacote WiiWare</comment>
<comment xml:lang="pt_BR">Pacote WiiWare</comment>
- <comment xml:lang="ru">пакет WiiWare</comment>
+ <comment xml:lang="ru">Пакет WiiWare</comment>
<comment xml:lang="sk">Balík WiiWare</comment>
<comment xml:lang="sr">ВииВер комплет</comment>
<comment xml:lang="sv">WiiWare-paket</comment>
<comment xml:lang="tr">WiiWare paketi</comment>
<comment xml:lang="uk">пакет WiiWare</comment>
- <comment xml:lang="zh_CN">WiiWare bundle</comment>
+ <comment xml:lang="zh_CN">WiiWare 捆绑包</comment>
<comment xml:lang="zh_TW">WiiWare 綁包</comment>
<generic-icon name="application-x-executable"/>
<magic priority="50">
@@ -9482,6 +9739,7 @@
<comment xml:lang="eu">GameCube disko irudia</comment>
<comment xml:lang="fi">GameCube-levykuva</comment>
<comment xml:lang="fr">image disque GameCube</comment>
+ <comment xml:lang="ga">íomhá diosca GameCube</comment>
<comment xml:lang="gl">Imae de disco de GameCube</comment>
<comment xml:lang="he">דמות כונן GameCube</comment>
<comment xml:lang="hr">GameCube slika diska</comment>
@@ -9495,14 +9753,14 @@
<comment xml:lang="pl">Obraz płyty konsoli GameCube</comment>
<comment xml:lang="pt">imagem de disco GameCube</comment>
<comment xml:lang="pt_BR">Imagem de disco GameCube</comment>
- <comment xml:lang="ru">образ диска GameCube</comment>
+ <comment xml:lang="ru">Образ диска GameCube</comment>
<comment xml:lang="sk">Obraz disku GameCube</comment>
<comment xml:lang="sl">Odtis diska GameCube</comment>
- <comment xml:lang="sr">слика диска Гејм Коцке</comment>
+ <comment xml:lang="sr">одраз диска Гејм Коцке</comment>
<comment xml:lang="sv">GameCube-skivavbild</comment>
<comment xml:lang="tr">GameCube disk görüntüsü</comment>
<comment xml:lang="uk">образ диска GameCube</comment>
- <comment xml:lang="zh_CN">GameCube光盘镜像</comment>
+ <comment xml:lang="zh_CN">GameCube 光盘映像</comment>
<comment xml:lang="zh_TW">GameCube 光碟映像檔</comment>
<generic-icon name="application-x-executable"/>
<alias type="application/x-gamecube-iso-image"/>
@@ -9513,16 +9771,85 @@
</mime-type>
<mime-type type="application/x-thomson-cartridge-memo7">
<comment>Thomson Mémo7 cartridge</comment>
+ <comment xml:lang="ca">cartutx Thomson Mémo7</comment>
+ <comment xml:lang="cs">Kazeta Thomson Mémo7</comment>
+ <comment xml:lang="de">Thomson-Mémo7-Steckmodul</comment>
+ <comment xml:lang="en_GB">Thomson Mémo7 cartridge</comment>
+ <comment xml:lang="es">cartucho Mémo7 de Thomson</comment>
+ <comment xml:lang="fr">cartouche Thomson Mémo7</comment>
+ <comment xml:lang="ga">cartús Thomson Mémo7</comment>
+ <comment xml:lang="hr">Thomson Mémo7 uložak</comment>
+ <comment xml:lang="hu">Thomson Mémo7 kazetta</comment>
+ <comment xml:lang="id">cartridge Thomson Mémo7</comment>
+ <comment xml:lang="it">Cartuccia Thomson Mémo7</comment>
+ <comment xml:lang="kk">Thomson Mémo7 картриджі</comment>
+ <comment xml:lang="ko">톰슨 메모7 카트릿지</comment>
+ <comment xml:lang="pl">Kartridż Thomson Mémo7</comment>
+ <comment xml:lang="pt_BR">Cartucho Thomson Mémo7</comment>
+ <comment xml:lang="ru">Картридж Thomson Mémo7</comment>
+ <comment xml:lang="sk">Kazeta Thomson Mémo7</comment>
+ <comment xml:lang="sr">Томсон Мемо7 кертриџ</comment>
+ <comment xml:lang="sv">Thomson Mémo7-spelkassett</comment>
+ <comment xml:lang="tr">Thomson Mémo7 kartuşu</comment>
+ <comment xml:lang="uk">картридж Thomson Mémo7</comment>
+ <comment xml:lang="zh_CN">Thomson Mémo7 卡带</comment>
+ <comment xml:lang="zh_TW">Thomson Mémo7 卡匣</comment>
<generic-icon name="application-x-executable"/>
<glob pattern="*.m7"/>
</mime-type>
<mime-type type="application/x-thomson-cassette">
<comment>Thomson cassette</comment>
+ <comment xml:lang="ca">cinta de casset Thomson</comment>
+ <comment xml:lang="cs">Kazeta Thomson</comment>
+ <comment xml:lang="de">Thomson-Kassette</comment>
+ <comment xml:lang="en_GB">Thomson cassette</comment>
+ <comment xml:lang="es">casete de Thomson</comment>
+ <comment xml:lang="fr">cassette Thomson</comment>
+ <comment xml:lang="ga">caiséad Thomson</comment>
+ <comment xml:lang="hr">Thomson kaseta</comment>
+ <comment xml:lang="hu">Thomson kazetta</comment>
+ <comment xml:lang="id">kaset Thomson</comment>
+ <comment xml:lang="it">Cassetta Thomson</comment>
+ <comment xml:lang="kk">Thomson кассетасы</comment>
+ <comment xml:lang="ko">톰슨 카셋트</comment>
+ <comment xml:lang="pl">Kaseta Thomson</comment>
+ <comment xml:lang="pt_BR">Cassete Thomson</comment>
+ <comment xml:lang="ru">Кассета Thomson</comment>
+ <comment xml:lang="sk">Kazeta Thomson</comment>
+ <comment xml:lang="sr">Томсон касете</comment>
+ <comment xml:lang="sv">Thomson-kassett</comment>
+ <comment xml:lang="tr">Thomson kaset</comment>
+ <comment xml:lang="uk">касета Thomson</comment>
+ <comment xml:lang="zh_CN">Thomson 磁带</comment>
+ <comment xml:lang="zh_TW">Thomson 卡匣</comment>
<generic-icon name="application-x-executable"/>
<glob pattern="*.k7"/>
</mime-type>
<mime-type type="application/x-hfe-floppy-image">
<comment>HFE floppy disk image</comment>
+ <comment xml:lang="ca">imatge de disquet HFE</comment>
+ <comment xml:lang="cs">Obraz diskety HFE</comment>
+ <comment xml:lang="de">HFE-Diskettenabbild</comment>
+ <comment xml:lang="en_GB">HFE floppy disk image</comment>
+ <comment xml:lang="es">imagen de disquete HFE</comment>
+ <comment xml:lang="fr">image disquette HFE</comment>
+ <comment xml:lang="ga">íomhá diosca fhlapaigh HFE</comment>
+ <comment xml:lang="hr">HFE slika diskete</comment>
+ <comment xml:lang="hu">HFE flopi lemezkép</comment>
+ <comment xml:lang="id">image disk floppy HFE</comment>
+ <comment xml:lang="it">Immagine disco floppy HFE</comment>
+ <comment xml:lang="kk">HFE иілгіш диск бейнесі</comment>
+ <comment xml:lang="ko">HFE 플로피 디스크 이미지</comment>
+ <comment xml:lang="pl">Obraz dyskietki HFE</comment>
+ <comment xml:lang="pt_BR">Imagem de disco flexível HFE</comment>
+ <comment xml:lang="ru">Образ гибкого диска HFE</comment>
+ <comment xml:lang="sk">Obraz pružného disku HFE</comment>
+ <comment xml:lang="sr">ХФЕ слика флопи диска</comment>
+ <comment xml:lang="sv">HFE-diskavbild</comment>
+ <comment xml:lang="tr">HFE disket kalıbı</comment>
+ <comment xml:lang="uk">образ дискети HFE</comment>
+ <comment xml:lang="zh_CN">HFE 软盘映像</comment>
+ <comment xml:lang="zh_TW">HFE 軟碟映像檔</comment>
<acronym>HFE</acronym>
<expanded-acronym>HxC Floppy Emulator</expanded-acronym>
<generic-icon name="application-x-executable"/>
@@ -9530,9 +9857,33 @@
<magic>
<match value="HXCPICFE" type="string" offset="0"/>
</magic>
+ <alias type="application/x-hfe-file"/>
</mime-type>
<mime-type type="application/x-thomson-sap-image">
<comment>SAP Thomson floppy disk image</comment>
+ <comment xml:lang="ca">imatge de disquet SAP Thomson</comment>
+ <comment xml:lang="cs">Obraz diskety SAP Thomson</comment>
+ <comment xml:lang="de">SAP-Thomson-Diskettenabbild</comment>
+ <comment xml:lang="en_GB">SAP Thomson floppy disk image</comment>
+ <comment xml:lang="es">imagen de disquete SAP de Thomson</comment>
+ <comment xml:lang="fr">image disquette SAP Thomson</comment>
+ <comment xml:lang="ga">íomhá diosca fhlapaigh SAP Thomson</comment>
+ <comment xml:lang="hr">SAP Thomson slika diskete</comment>
+ <comment xml:lang="hu">SAP Thomson flopi lemezkép</comment>
+ <comment xml:lang="id">image disk floppy SAP Thomson</comment>
+ <comment xml:lang="it">Immagine disco floppy Thomson SAP</comment>
+ <comment xml:lang="kk">SAP Thomson иілгіш диск бейнесі</comment>
+ <comment xml:lang="ko">SAP 톰슨 플로피 디스크 이미지</comment>
+ <comment xml:lang="pl">Obraz dyskietki SAP Thomson</comment>
+ <comment xml:lang="pt_BR">Imagem de disco flexível SAP Thomson</comment>
+ <comment xml:lang="ru">Образ гибкого диска SAP Thomson</comment>
+ <comment xml:lang="sk">Obraz pružného disku SAP Thomson</comment>
+ <comment xml:lang="sr">САП Томсон слика флопи диска</comment>
+ <comment xml:lang="sv">SAP Thomson-diskavbild</comment>
+ <comment xml:lang="tr">SAP Thomson disket kalıbı</comment>
+ <comment xml:lang="uk">образ дискети Thomson SAP</comment>
+ <comment xml:lang="zh_CN">SAP Thomson 软盘映像</comment>
+ <comment xml:lang="zh_TW">SAP Thomson 軟碟映像檔</comment>
<acronym>SAP</acronym>
<expanded-acronym>Système d'Archivage Pukall</expanded-acronym>
<generic-icon name="application-x-executable"/>
@@ -9540,6 +9891,7 @@
<magic>
<match value="SYSTEME D'ARCHIVAGE PUKALL S.A.P. (c) Alexandre PUKALL Avril 1998" type="string" offset="1"/>
</magic>
+ <alias type="application/x-sap-file"/>
</mime-type>
<mime-type type="application/vnd.debian.binary-package">
<comment>Debian package</comment>
@@ -9583,7 +9935,7 @@
<comment xml:lang="pt">pacote Debian</comment>
<comment xml:lang="pt_BR">Pacote Debian</comment>
<comment xml:lang="ro">Pachet Debian</comment>
- <comment xml:lang="ru">пакет Debian</comment>
+ <comment xml:lang="ru">Пакет Debian</comment>
<comment xml:lang="sk">Balíček Debianu</comment>
<comment xml:lang="sl">Datoteka paketa Debian</comment>
<comment xml:lang="sq">Paketë Debian</comment>
@@ -9644,11 +9996,11 @@
<comment xml:lang="pt">ficheiro do Qt Designer</comment>
<comment xml:lang="pt_BR">Arquivo do Qt Designer</comment>
<comment xml:lang="ro">Fișier Qt Designer</comment>
- <comment xml:lang="ru">файл Qt Designer</comment>
+ <comment xml:lang="ru">Файл Qt Designer</comment>
<comment xml:lang="sk">Súbor Qt Designer</comment>
<comment xml:lang="sl">Datoteka Qt Designer</comment>
<comment xml:lang="sq">File Qt Designer</comment>
- <comment xml:lang="sr">датотека Кут Дизајнера</comment>
+ <comment xml:lang="sr">датотека Кут дизајнера</comment>
<comment xml:lang="sv">Qt Designer-fil</comment>
<comment xml:lang="tr">Qt Tasarımcı dosyası</comment>
<comment xml:lang="uk">файл програми Qt-дизайнер</comment>
@@ -9676,6 +10028,7 @@
<comment xml:lang="eu">Qt Markup lengoai fitxategia</comment>
<comment xml:lang="fi">QML-tiedosto</comment>
<comment xml:lang="fr">fichier Qt Markup Language</comment>
+ <comment xml:lang="ga">comhad teanga mharcála Qt</comment>
<comment xml:lang="gl">ficheiro de linguaxe de marcado Qt</comment>
<comment xml:lang="he">קובץ שפת סימון של Qt</comment>
<comment xml:lang="hr">Qt Markup Language datoteka</comment>
@@ -9692,17 +10045,23 @@
<comment xml:lang="pl">Plik języka znaczników Qt</comment>
<comment xml:lang="pt">ficheiro de linguagem Qt Markup</comment>
<comment xml:lang="pt_BR">Arquivo de Qt Markup Language</comment>
- <comment xml:lang="ru">файл Qt Markup Language</comment>
+ <comment xml:lang="ru">Файл Qt Markup Language</comment>
<comment xml:lang="sk">Súbor značkovacieho jazyka Qt</comment>
<comment xml:lang="sl">Datoteka označevalnega jezika Qt</comment>
- <comment xml:lang="sr">датотека Кутовог језика означавања</comment>
+ <comment xml:lang="sr">датотека КуТ-овог језика означавања</comment>
<comment xml:lang="sv">Qt-märkspråksfil</comment>
<comment xml:lang="tr">Qt İşaretleme Dili dosyası</comment>
<comment xml:lang="uk">файл мови розмітки Qt</comment>
- <comment xml:lang="zh_CN">Qt </comment>
+ <comment xml:lang="zh_CN">Qt Markup Language 文件</comment>
<comment xml:lang="zh_TW">Qt 標記語言檔</comment>
<magic priority="80">
- <match value="import Qt " type="string" offset="0:256"/>
+ <match value="/bin/env qml" type="string" offset="2:16"/>
+ <match value="import Qt" type="string" offset="0:3000">
+ <match value="{" type="string" offset="9:3009"/>
+ </match>
+ <match value="import Qml" type="string" offset="0:3000">
+ <match value="{" type="string" offset="9:3009"/>
+ </match>
</magic>
<glob pattern="*.qml"/>
<glob pattern="*.qmltypes"/>
@@ -9725,10 +10084,10 @@
<comment xml:lang="fi">työpöydän asetustiedosto</comment>
<comment xml:lang="fo">skriviborðssamansetingarfíla</comment>
<comment xml:lang="fr">fichier de configuration desktop</comment>
- <comment xml:lang="ga">comhad chumraíocht deisce</comment>
+ <comment xml:lang="ga">comhad cumraíochta deisce</comment>
<comment xml:lang="gl">ficheiro de configuración de escritorio</comment>
<comment xml:lang="he">קובץ הגדרות שולחן עבודה</comment>
- <comment xml:lang="hr">datoteka postavki radne površine</comment>
+ <comment xml:lang="hr">Datoteka prečaca radne površine</comment>
<comment xml:lang="hu">asztalbeállító fájl</comment>
<comment xml:lang="ia">File de configuration de scriptorio</comment>
<comment xml:lang="id">berkas konfigurasi destop</comment>
@@ -9747,7 +10106,7 @@
<comment xml:lang="pt">ficheiro de configuração de área de trabalho</comment>
<comment xml:lang="pt_BR">Arquivo de configuração desktop</comment>
<comment xml:lang="ro">fișier de configurare al desktopului</comment>
- <comment xml:lang="ru">файл настроек рабочего стола</comment>
+ <comment xml:lang="ru">Файл настроек рабочего стола</comment>
<comment xml:lang="sk">Súbor nastavení pracovnej plochy</comment>
<comment xml:lang="sl">nastavitvena datoteka namizja</comment>
<comment xml:lang="sq">File konfigurimi desktop</comment>
@@ -9774,6 +10133,7 @@
<mime-type type="application/x-fictionbook+xml">
<comment>FictionBook document</comment>
<comment xml:lang="ar">مستند FictionBook</comment>
+ <comment xml:lang="ast">Documentu de FictionBook</comment>
<comment xml:lang="bg">Документ — FictionBook</comment>
<comment xml:lang="ca">document FictionBook</comment>
<comment xml:lang="cs">dokument FictionBook</comment>
@@ -9807,7 +10167,7 @@
<comment xml:lang="pt">documento FictionBook</comment>
<comment xml:lang="pt_BR">Documento FictionBook</comment>
<comment xml:lang="ro">Document FictionBook</comment>
- <comment xml:lang="ru">документ FictionBook</comment>
+ <comment xml:lang="ru">Документ FictionBook</comment>
<comment xml:lang="sk">Dokument FictionBook</comment>
<comment xml:lang="sl">Dokument FictionBook</comment>
<comment xml:lang="sr">документ Фикшон Књиге</comment>
@@ -9827,6 +10187,7 @@
</mime-type>
<mime-type type="application/x-zip-compressed-fb2">
<comment>Compressed FictionBook document</comment>
+ <comment xml:lang="ast">Documentu comprimíu de FictionBook</comment>
<comment xml:lang="ca">document FictionBook amb compressió</comment>
<comment xml:lang="cs">komprimovaný dokument FictionBook</comment>
<comment xml:lang="da">Komprimeret FictionBook-dokument</comment>
@@ -9837,6 +10198,7 @@
<comment xml:lang="eu">Konprimitutako FictionBook dokumentua</comment>
<comment xml:lang="fi">Pakattu FictionBook-asiakirja</comment>
<comment xml:lang="fr">document FictionBook compressé</comment>
+ <comment xml:lang="ga">cáipéis chomhbhrúite FictionBook</comment>
<comment xml:lang="gl">Documento de FictionBook comprimida</comment>
<comment xml:lang="he">מסמך FictionBook מכווץ</comment>
<comment xml:lang="hr">Sažet FictionBook dokument</comment>
@@ -9858,7 +10220,7 @@
<comment xml:lang="tr">Sıkıştırılmış KurguKitap belgesi</comment>
<comment xml:lang="uk">стиснений документ FictionBook</comment>
<comment xml:lang="zh_CN">压缩的 FictionBook 文档</comment>
- <comment xml:lang="zh_TW">壓縮的 FictionBook 文件</comment>
+ <comment xml:lang="zh_TW">壓縮版 FictionBook 文件</comment>
<sub-class-of type="application/zip"/>
<glob pattern="*.fb2.zip"/>
<magic priority="70">
@@ -9910,7 +10272,7 @@
<comment xml:lang="pt">diagrama Dia</comment>
<comment xml:lang="pt_BR">Diagrama do Dia</comment>
<comment xml:lang="ro">Diagramă Dia</comment>
- <comment xml:lang="ru">диаграмма Dia</comment>
+ <comment xml:lang="ru">Диаграмма Dia</comment>
<comment xml:lang="sk">Diagram Dia</comment>
<comment xml:lang="sl">Datoteka diagrama Dia</comment>
<comment xml:lang="sq">Diagramë Dia</comment>
@@ -9963,7 +10325,7 @@
<comment xml:lang="pt">forma Dia</comment>
<comment xml:lang="pt_BR">Formato Dia</comment>
<comment xml:lang="ro">Figură Dia</comment>
- <comment xml:lang="ru">фигура Dia</comment>
+ <comment xml:lang="ru">Фигура Dia</comment>
<comment xml:lang="sk">Tvar Dia</comment>
<comment xml:lang="sl">Datoteka oblik Dia</comment>
<comment xml:lang="sr">облик Дие</comment>
@@ -9983,6 +10345,7 @@
<mime-type type="application/x-dvi">
<comment>TeX DVI document</comment>
<comment xml:lang="ar">مستند TeX DVI</comment>
+ <comment xml:lang="ast">Documentu Tex DVI</comment>
<comment xml:lang="be@latin">Dakument TeX DVI</comment>
<comment xml:lang="bg">Документ — TeX DVI</comment>
<comment xml:lang="ca">document DVI de TeX</comment>
@@ -10019,7 +10382,7 @@
<comment xml:lang="pt">documento TeX DVI</comment>
<comment xml:lang="pt_BR">Documento DVI TeX</comment>
<comment xml:lang="ro">Document Tex DVI</comment>
- <comment xml:lang="ru">документ TeX DVI</comment>
+ <comment xml:lang="ru">Документ TeX DVI</comment>
<comment xml:lang="sk">Dokument TeX DVI</comment>
<comment xml:lang="sl">Dokument TeX DVI</comment>
<comment xml:lang="sq">Dokument TeX DVI</comment>
@@ -10080,11 +10443,11 @@
<comment xml:lang="pt">tema Enlightenment</comment>
<comment xml:lang="pt_BR">Tema do Enlightenment</comment>
<comment xml:lang="ro">Temă Enlightenment</comment>
- <comment xml:lang="ru">тема Enlightenment</comment>
+ <comment xml:lang="ru">Тема Enlightenment</comment>
<comment xml:lang="sk">Motív Enlightenment</comment>
<comment xml:lang="sl">Datoteka teme Enlightenment</comment>
<comment xml:lang="sq">Tema Enlightenment</comment>
- <comment xml:lang="sr">тема Просвећености</comment>
+ <comment xml:lang="sr">тема за Енлајтмент</comment>
<comment xml:lang="sv">Enlightenment-tema</comment>
<comment xml:lang="tr">Enlightenment teması</comment>
<comment xml:lang="uk">тема Enlightenment</comment>
@@ -10133,7 +10496,7 @@
<comment xml:lang="pt">animação Egon Animator</comment>
<comment xml:lang="pt_BR">Animação do Egon Animator</comment>
<comment xml:lang="ro">Animație Egon Animator</comment>
- <comment xml:lang="ru">анимация Egon Animator</comment>
+ <comment xml:lang="ru">Анимация Egon Animator</comment>
<comment xml:lang="sk">Animácia Egon Animator</comment>
<comment xml:lang="sl">Datoteka animacije Egon Animator</comment>
<comment xml:lang="sq">Animim Egon Animator</comment>
@@ -10167,7 +10530,7 @@
<comment xml:lang="ga">comhad inrite</comment>
<comment xml:lang="gl">executábel</comment>
<comment xml:lang="he">קובץ הרצה</comment>
- <comment xml:lang="hr">izvršna datoteka</comment>
+ <comment xml:lang="hr">Izvršna datoteka</comment>
<comment xml:lang="hu">futtatható</comment>
<comment xml:lang="ia">Executabile</comment>
<comment xml:lang="id">dapat dieksekusi</comment>
@@ -10186,7 +10549,7 @@
<comment xml:lang="pt">executável</comment>
<comment xml:lang="pt_BR">Executável</comment>
<comment xml:lang="ro">executabil</comment>
- <comment xml:lang="ru">исполняемый</comment>
+ <comment xml:lang="ru">Исполняемый</comment>
<comment xml:lang="sk">Spustiteľný súbor</comment>
<comment xml:lang="sl">izvedljiva datoteka</comment>
<comment xml:lang="sq">I ekzekutueshëm</comment>
@@ -10254,7 +10617,7 @@
<comment xml:lang="pt">ficheiro FLTK Fluid</comment>
<comment xml:lang="pt_BR">Arquivo Fluid do FLTK</comment>
<comment xml:lang="ro">Fișier FLTK Fluid</comment>
- <comment xml:lang="ru">файл FLTK Fluid</comment>
+ <comment xml:lang="ru">Файл FLTK Fluid</comment>
<comment xml:lang="sk">Súbor FLTK Fluid</comment>
<comment xml:lang="sl">Datoteka FLTK Fluid</comment>
<comment xml:lang="sq">File FLTK Fluid</comment>
@@ -10274,10 +10637,11 @@
</magic>
<glob pattern="*.fl"/>
</mime-type>
- <mime-type type="application/font-woff">
+ <mime-type type="font/woff">
<comment>WOFF font</comment>
- <comment xml:lang="ca">tipus de lletra WOFF</comment>
- <comment xml:lang="cs">písmo WOFF</comment>
+ <comment xml:lang="ast">Fonte WOFF</comment>
+ <comment xml:lang="ca">lletra WOFF</comment>
+ <comment xml:lang="cs">font WOFF</comment>
<comment xml:lang="da">WOFF-skrifttype</comment>
<comment xml:lang="de">WOFF-Schrift</comment>
<comment xml:lang="el">Γραμματοσειρά WOFF</comment>
@@ -10286,13 +10650,14 @@
<comment xml:lang="eu">WOFF letra-tipoa</comment>
<comment xml:lang="fi">WOFF-fontti</comment>
<comment xml:lang="fr">police WOFF</comment>
+ <comment xml:lang="ga">cló WOFF</comment>
<comment xml:lang="gl">Tipo de letra WOFF</comment>
<comment xml:lang="he">גופן WOFF</comment>
<comment xml:lang="hr">WOFF slovo</comment>
<comment xml:lang="hu">WOFF-betűkészlet</comment>
<comment xml:lang="ia">Typo de litteras WOFF</comment>
<comment xml:lang="id">Fonta WOFF</comment>
- <comment xml:lang="it">Font WOFF</comment>
+ <comment xml:lang="it">Carattere WOFF</comment>
<comment xml:lang="ja">WOFF フォント</comment>
<comment xml:lang="kk">WOFF қарібі</comment>
<comment xml:lang="ko">WOFF 글꼴</comment>
@@ -10301,7 +10666,7 @@
<comment xml:lang="pl">Czcionka WOFF</comment>
<comment xml:lang="pt">letra WOFF</comment>
<comment xml:lang="pt_BR">Fonte WOFF</comment>
- <comment xml:lang="ru">шрифт WOFF</comment>
+ <comment xml:lang="ru">Шрифт WOFF</comment>
<comment xml:lang="sk">Písmo WOFF</comment>
<comment xml:lang="sl">Pisava WOFF</comment>
<comment xml:lang="sr">ВОФФ слова</comment>
@@ -10317,55 +10682,65 @@
<match value="0x774f4646" type="big32" offset="0"/>
</magic>
<glob pattern="*.woff"/>
+ <alias type="application/font-woff"/>
+ </mime-type>
+ <mime-type type="font/woff">
+ <comment>WOFF2 font</comment>
+ <comment xml:lang="ast">Fonte WOFF2</comment>
+ <comment xml:lang="ca">lletra WOFF2</comment>
+ <comment xml:lang="cs">font WOFF2</comment>
+ <comment xml:lang="de">WOFF2-Schrift</comment>
+ <comment xml:lang="en_GB">WOFF2 font</comment>
+ <comment xml:lang="es">tipo de letra WOFF2</comment>
+ <comment xml:lang="fi">WOFF2-fontti</comment>
+ <comment xml:lang="hr">WOFF2 slovo</comment>
+ <comment xml:lang="hu">WOFF2 betűkészlet</comment>
+ <comment xml:lang="id">Fonta WOFF2</comment>
+ <comment xml:lang="it">Carattere WOFF2</comment>
+ <comment xml:lang="kk">WOFF2 қарібі</comment>
+ <comment xml:lang="ko">WOFF2 글꼴</comment>
+ <comment xml:lang="pl">Czcionka WOFF2</comment>
+ <comment xml:lang="pt_BR">Fonte WOFF2</comment>
+ <comment xml:lang="ru">Шрифт WOFF2</comment>
+ <comment xml:lang="sk">Písmo WOFF2</comment>
+ <comment xml:lang="sv">WOFF2-typsnitt</comment>
+ <comment xml:lang="uk">шрифт WOFF2</comment>
+ <comment xml:lang="zh_CN">WOFF2 字体</comment>
+ <comment xml:lang="zh_TW">WOFF2 字型</comment>
+ <acronym>WOFF2</acronym>
+ <expanded-acronym>Web Open Font Format 2.0</expanded-acronym>
+ <generic-icon name="font-x-generic"/>
+ <magic priority="50">
+ <match value="0x774f4632" type="big32" offset="0"/>
+ </magic>
+ <glob pattern="*.woff2"/>
</mime-type>
<mime-type type="application/x-font-type1">
- <comment>Postscript type-1 font</comment>
- <comment xml:lang="ar">خط Postscript type-1</comment>
- <comment xml:lang="be@latin">Šryft Postscript type-1</comment>
- <comment xml:lang="bg">Шрифт — Postscript Type 1</comment>
- <comment xml:lang="ca">tipus de lletra Postscript type-1</comment>
- <comment xml:lang="cs">písmo Postscript type-1</comment>
- <comment xml:lang="da">PostScript type-1-skrifttype</comment>
- <comment xml:lang="de">Postscript-Typ-1-Schrift</comment>
- <comment xml:lang="el">Γραμματοσειρά Postscript type-1</comment>
- <comment xml:lang="en_GB">Postscript type-1 font</comment>
+ <comment>PostScript type-1 font</comment>
+ <comment xml:lang="ca">lletra type-1 de PostScript</comment>
+ <comment xml:lang="cs">font PostScript type-1</comment>
+ <comment xml:lang="de">PostScript-Typ-1-Schrift</comment>
+ <comment xml:lang="en_GB">PostScript type-1 font</comment>
<comment xml:lang="es">tipo de letra PostScript Type-1</comment>
<comment xml:lang="eu">PostScript type-1 letra-tipoa</comment>
- <comment xml:lang="fi">PostScript tyyppi-1 -fontti</comment>
- <comment xml:lang="fo">Postscript type-1 stavasnið</comment>
- <comment xml:lang="fr">police Postscript Type 1</comment>
- <comment xml:lang="ga">cló Postscript type-1</comment>
- <comment xml:lang="gl">tipo de letra PostScript tipo-1</comment>
- <comment xml:lang="he">גופן של Postscript type-1</comment>
- <comment xml:lang="hr">Postscript crsta-1 slovo</comment>
- <comment xml:lang="hu">Postscript type-1 betűkészlet</comment>
- <comment xml:lang="ia">Typo de litteras PostScript typo 1</comment>
- <comment xml:lang="id">Fonta tipe-1 Postscript</comment>
- <comment xml:lang="it">Carattere Postscript type-1</comment>
- <comment xml:lang="ja">PostScript type-1 フォント</comment>
- <comment xml:lang="kk">Postscript type-1 қарібі</comment>
+ <comment xml:lang="fr">police PostScript Type 1</comment>
+ <comment xml:lang="ga">cló PostScript type-1</comment>
+ <comment xml:lang="hr">PostScript type-1 slovo</comment>
+ <comment xml:lang="hu">PostScript type-1 betűkészlet</comment>
+ <comment xml:lang="id">fonta PostScript type-1</comment>
+ <comment xml:lang="it">Carattere PostScript type-1</comment>
+ <comment xml:lang="kk">PostScript type-1 қарібі</comment>
<comment xml:lang="ko">PostScript Type-1 글꼴</comment>
- <comment xml:lang="lt">Postscript type-1 šriftas</comment>
- <comment xml:lang="lv">Postscript 1-tipa fonts</comment>
- <comment xml:lang="nb">Postscript type-1 skrift</comment>
- <comment xml:lang="nl">PostScript type-1-lettertype</comment>
- <comment xml:lang="nn">PostScript type 1-skrifttype</comment>
- <comment xml:lang="oc">poliça Postescript Type 1</comment>
<comment xml:lang="pl">Czcionka PostScript Type-1</comment>
- <comment xml:lang="pt">letra PostScript tipo 1</comment>
<comment xml:lang="pt_BR">Fonte PostScript tipo-1</comment>
- <comment xml:lang="ro">Font Postscript type-1</comment>
- <comment xml:lang="ru">шрифт PostScript Type-1</comment>
- <comment xml:lang="sk">Písmo Postscript type-1</comment>
- <comment xml:lang="sl">Datoteka pisave Postscript vrste-1</comment>
- <comment xml:lang="sq">Lloj gërmash Postscript type-1</comment>
+ <comment xml:lang="ru">Шрифт PostScript Type-1</comment>
+ <comment xml:lang="sk">Písmo PostScript typu 1</comment>
<comment xml:lang="sr">слова Постскрипта врсте-1</comment>
- <comment xml:lang="sv">Postscript type-1-typsnitt</comment>
- <comment xml:lang="tr">Postscript type-1 yazı tipi</comment>
- <comment xml:lang="uk">шрифт Postscript type-1</comment>
- <comment xml:lang="vi">Phông kiểu 1 PostScript</comment>
- <comment xml:lang="zh_CN">Postscript type-1 字体</comment>
- <comment xml:lang="zh_TW">Postscript type-1 字型</comment>
+ <comment xml:lang="sv">PostScript type-1-typsnitt</comment>
+ <comment xml:lang="tr">PostScript tip-1 yazı tipi</comment>
+ <comment xml:lang="uk">шрифт type-1 PostScript</comment>
+ <comment xml:lang="zh_CN">PostScript type-1 字体</comment>
+ <comment xml:lang="zh_TW">PostScript type-1 字型</comment>
<sub-class-of type="application/postscript"/>
<generic-icon name="font-x-generic"/>
<magic priority="60">
@@ -10386,8 +10761,8 @@
<comment xml:lang="az">Adobe yazı növü metrikləri</comment>
<comment xml:lang="be@latin">Metryka šryftu Adobe</comment>
<comment xml:lang="bg">Шрифтова метрика — Adobe</comment>
- <comment xml:lang="ca">mètrica de tipus de lletra Adobe</comment>
- <comment xml:lang="cs">metrika písma Adobe</comment>
+ <comment xml:lang="ca">mètrica de lletra d'Adobe</comment>
+ <comment xml:lang="cs">metrika fontu Adobe</comment>
<comment xml:lang="cy">Metrigau Ffont Adobe</comment>
<comment xml:lang="da">Adobe skrifttypefil</comment>
<comment xml:lang="de">Adobe-Schriftmetriken</comment>
@@ -10401,7 +10776,7 @@
<comment xml:lang="ga">meadarachtaí cló Adobe</comment>
<comment xml:lang="gl">métricas de fonte de Adobe</comment>
<comment xml:lang="he">מדדי גופן של Adobe</comment>
- <comment xml:lang="hr">Adobe mjere fonta</comment>
+ <comment xml:lang="hr">Adobe mjere slova</comment>
<comment xml:lang="hu">Adobe-betűmetrika</comment>
<comment xml:lang="ia">Metricas de typo de litteras Adobe</comment>
<comment xml:lang="id">Metrik fonta Adobe</comment>
@@ -10420,7 +10795,7 @@
<comment xml:lang="pt">métrica de letras Adobe</comment>
<comment xml:lang="pt_BR">Métricas de fonte Adobe</comment>
<comment xml:lang="ro">Dimensiuni font Adobe</comment>
- <comment xml:lang="ru">метрика шрифта Adobe</comment>
+ <comment xml:lang="ru">Метрика шрифта Adobe</comment>
<comment xml:lang="sk">Metrika písma Adobe</comment>
<comment xml:lang="sl">Matrika pisave Adobe</comment>
<comment xml:lang="sq">Metrik lloj gërmash Adobe</comment>
@@ -10429,7 +10804,7 @@
<comment xml:lang="tr">Adobe yazıtipi ölçüleri</comment>
<comment xml:lang="uk">метрики шрифту Adobe</comment>
<comment xml:lang="vi">Cách đo phông chữ Adobe</comment>
- <comment xml:lang="zh_CN">Adobe 字体参数</comment>
+ <comment xml:lang="zh_CN">Adobe 字体规格</comment>
<comment xml:lang="zh_TW">Adobe 字型描述檔</comment>
<generic-icon name="font-x-generic"/>
<glob pattern="*.afm"/>
@@ -10440,8 +10815,8 @@
<comment xml:lang="az">BDF yazı növü</comment>
<comment xml:lang="be@latin">Šryft BDF</comment>
<comment xml:lang="bg">Шрифт — BDF</comment>
- <comment xml:lang="ca">tipus de lletra BDF</comment>
- <comment xml:lang="cs">písmo BDF</comment>
+ <comment xml:lang="ca">lletra BDF</comment>
+ <comment xml:lang="cs">font BDF</comment>
<comment xml:lang="cy">Ffont BDF</comment>
<comment xml:lang="da">BDF-skrifttype</comment>
<comment xml:lang="de">BDF-Schrift</comment>
@@ -10456,7 +10831,7 @@
<comment xml:lang="ga">cló BDF</comment>
<comment xml:lang="gl">tipo de fonte BDF</comment>
<comment xml:lang="he">גופן BDF</comment>
- <comment xml:lang="hr">BDF font</comment>
+ <comment xml:lang="hr">BDF slovo</comment>
<comment xml:lang="hu">BDF-betűkészlet</comment>
<comment xml:lang="ia">Typo de litteras BDF</comment>
<comment xml:lang="id">Fonta BDF</comment>
@@ -10475,7 +10850,7 @@
<comment xml:lang="pt">letra BDF</comment>
<comment xml:lang="pt_BR">Fonte BDF</comment>
<comment xml:lang="ro">Font BDF</comment>
- <comment xml:lang="ru">шрифт BDF</comment>
+ <comment xml:lang="ru">Шрифт BDF</comment>
<comment xml:lang="sk">Písmo BDF</comment>
<comment xml:lang="sl">Datoteka pisave BDF</comment>
<comment xml:lang="sq">Lloj gërme BDF</comment>
@@ -10498,8 +10873,8 @@
<comment xml:lang="az">DOS yazı növü</comment>
<comment xml:lang="be@latin">Šryft DOS</comment>
<comment xml:lang="bg">Шрифт — DOS</comment>
- <comment xml:lang="ca">tipus de lletra DOS</comment>
- <comment xml:lang="cs">písmo pro DOS</comment>
+ <comment xml:lang="ca">lletra DOS</comment>
+ <comment xml:lang="cs">font pro DOS</comment>
<comment xml:lang="cy">Ffont DOS</comment>
<comment xml:lang="da">DOS-skrifttype</comment>
<comment xml:lang="de">DOS-Schrift</comment>
@@ -10514,7 +10889,7 @@
<comment xml:lang="ga">cló DOS</comment>
<comment xml:lang="gl">tipo de fonte de DOS</comment>
<comment xml:lang="he">גופן DOS</comment>
- <comment xml:lang="hr">DOS font</comment>
+ <comment xml:lang="hr">DOS slovo</comment>
<comment xml:lang="hu">DOS-betűkészlet</comment>
<comment xml:lang="ia">Typo de litteras DOS</comment>
<comment xml:lang="id">Fonta DOS</comment>
@@ -10533,7 +10908,7 @@
<comment xml:lang="pt">letra DOS</comment>
<comment xml:lang="pt_BR">Fonte do DOS</comment>
<comment xml:lang="ro">Font DOS</comment>
- <comment xml:lang="ru">шрифт DOS</comment>
+ <comment xml:lang="ru">Шрифт DOS</comment>
<comment xml:lang="sk">Písmo pre DOS</comment>
<comment xml:lang="sl">Datoteka pisave DOS</comment>
<comment xml:lang="sq">Gërmë DOS</comment>
@@ -10557,8 +10932,8 @@
<comment xml:lang="az">Adobe FrameMaker yazı növü</comment>
<comment xml:lang="be@latin">Šryft Adobe FrameMaker</comment>
<comment xml:lang="bg">Шрифт — Adobe FrameMaker</comment>
- <comment xml:lang="ca">tipus de lletra d'Adobe FrameMaker</comment>
- <comment xml:lang="cs">písmo Adobe FrameMaker</comment>
+ <comment xml:lang="ca">lletra d'Adobe FrameMaker</comment>
+ <comment xml:lang="cs">font Adobe FrameMaker</comment>
<comment xml:lang="cy">Ffont Adobe FrameMaker</comment>
<comment xml:lang="da">Adobe FrameMaker-skrifttype</comment>
<comment xml:lang="de">Adobe-FrameMaker-Schrift</comment>
@@ -10573,7 +10948,7 @@
<comment xml:lang="ga">cló Adobe FrameMaker</comment>
<comment xml:lang="gl">tipo de fonte de Adobe FrameMaker</comment>
<comment xml:lang="he">גופן של Adobe FrameMaker</comment>
- <comment xml:lang="hr">Adobe FrameMaker font</comment>
+ <comment xml:lang="hr">Adobe FrameMaker slovo</comment>
<comment xml:lang="hu">Adobe FrameMaker-betűkészlet</comment>
<comment xml:lang="ia">Typo de litteras pro Adobe FrameMaker</comment>
<comment xml:lang="id">Fonta Adobe FrameMaker</comment>
@@ -10592,7 +10967,7 @@
<comment xml:lang="pt">letra Adobe FrameMaker</comment>
<comment xml:lang="pt_BR">Fonte do Adobe FrameMaker</comment>
<comment xml:lang="ro">Font Adobe FrameMaker</comment>
- <comment xml:lang="ru">шрифт Adobe FrameMaker</comment>
+ <comment xml:lang="ru">Шрифт Adobe FrameMaker</comment>
<comment xml:lang="sk">Písmo Adobe FrameMaker</comment>
<comment xml:lang="sl">Datoteka pisave Adobe FrameMaker</comment>
<comment xml:lang="sq">Gërma Adobe FrameMaker</comment>
@@ -10614,8 +10989,8 @@
<comment xml:lang="az">LIBGRX yazı növü</comment>
<comment xml:lang="be@latin">Šryft LIBGRX</comment>
<comment xml:lang="bg">Шрифт — LIBGRX</comment>
- <comment xml:lang="ca">tipus de lletra LIBGRX</comment>
- <comment xml:lang="cs">písmo LIBGRX</comment>
+ <comment xml:lang="ca">lletra LIBGRX</comment>
+ <comment xml:lang="cs">font LIBGRX</comment>
<comment xml:lang="cy">Ffont LIBGRX</comment>
<comment xml:lang="da">LIBGRX-skrifttype</comment>
<comment xml:lang="de">LIBGRX-Schrift</comment>
@@ -10630,7 +11005,7 @@
<comment xml:lang="ga">cló LIBGRX</comment>
<comment xml:lang="gl">tipo de fonte en LIBGRX</comment>
<comment xml:lang="he">גופן LIBGRX</comment>
- <comment xml:lang="hr">LIBGRX font</comment>
+ <comment xml:lang="hr">LIBGRX slovo</comment>
<comment xml:lang="hu">LIBGRX-betűkészlet</comment>
<comment xml:lang="ia">Typo de litteras LIBGRX</comment>
<comment xml:lang="id">Fonta LIBGRX</comment>
@@ -10649,7 +11024,7 @@
<comment xml:lang="pt">letra LIBGRX</comment>
<comment xml:lang="pt_BR">Fonte LIBGRX</comment>
<comment xml:lang="ro">Font LIBGRX</comment>
- <comment xml:lang="ru">шрифт LIBGRX</comment>
+ <comment xml:lang="ru">Шрифт LIBGRX</comment>
<comment xml:lang="sk">Písmo LIBGRX</comment>
<comment xml:lang="sl">Datoteka pisave LIBGRX</comment>
<comment xml:lang="sq">Lloj gërme LIBGRX</comment>
@@ -10671,8 +11046,8 @@
<comment xml:lang="az">Linux PSF konsol yazı növü</comment>
<comment xml:lang="be@latin">Kansolny šryft PSF dla Linuksa</comment>
<comment xml:lang="bg">Шрифт — PSF, за конзолата на Линукс</comment>
- <comment xml:lang="ca">tipus de lletra de consola Linux PSF</comment>
- <comment xml:lang="cs">písmo PSF pro konzolu Linuxu</comment>
+ <comment xml:lang="ca">lletra de consola PSF de Linux</comment>
+ <comment xml:lang="cs">font PSF pro konzolu Linuxu</comment>
<comment xml:lang="cy">Ffont Linux PSF</comment>
<comment xml:lang="da">Linux PSF-konsolskrifttype</comment>
<comment xml:lang="de">Linux-PSF-Konsolenschrift</comment>
@@ -10684,10 +11059,10 @@
<comment xml:lang="fi">Linux PSF -konsolifontti</comment>
<comment xml:lang="fo">Linux PSF stýristøðs stavasnið</comment>
<comment xml:lang="fr">police console Linux PSF</comment>
- <comment xml:lang="ga">cló chonsól Linux PSF</comment>
+ <comment xml:lang="ga">cló consóil Linux PSF</comment>
<comment xml:lang="gl">tipo de fonte de consola Linux PSF</comment>
<comment xml:lang="he">גופן לקונסול מסוג Linux PSF</comment>
- <comment xml:lang="hr">Linux PSF konzolni font</comment>
+ <comment xml:lang="hr">Linux PSF konzolno slovo</comment>
<comment xml:lang="hu">Linux PSF konzolos betűkészlet</comment>
<comment xml:lang="ia">Typo de litteras console Linux PSF</comment>
<comment xml:lang="id">Fonta konsol Linux PSF</comment>
@@ -10706,7 +11081,7 @@
<comment xml:lang="pt">letra de consola Linux PSF</comment>
<comment xml:lang="pt_BR">Fonte de console Linux PSF</comment>
<comment xml:lang="ro">Font consolă Linux PSF</comment>
- <comment xml:lang="ru">консольный шрифт Linux PSF</comment>
+ <comment xml:lang="ru">Консольный шрифт Linux PSF</comment>
<comment xml:lang="sk">Písmo PSF pre konzolu Linuxu</comment>
<comment xml:lang="sl">Datoteka pisave konzole Linux PSF</comment>
<comment xml:lang="sq">Lloj gërme për konsolë Linux PSF</comment>
@@ -10728,8 +11103,8 @@
<comment xml:lang="ar">خط كونسول PSF لينكس (مضغوط-gzip)</comment>
<comment xml:lang="be@latin">Kansolny šryft PSF dla Linuksa (gzip-skampresavany)</comment>
<comment xml:lang="bg">Шрифт — Linux PSF, компресиран с gzip</comment>
- <comment xml:lang="ca">tipus de lletra de consola Linux PSF (amb compressió gzip)</comment>
- <comment xml:lang="cs">písmo PSF pro konzolu Linuxu (komprimované pomocí gzip)</comment>
+ <comment xml:lang="ca">lletra de consola PSF de Linux (amb compressió gzip)</comment>
+ <comment xml:lang="cs">font PSF pro konzolu Linuxu (komprimace gzip)</comment>
<comment xml:lang="da">Linux PSF-konsolskrifttype (gzip-komprimeret)</comment>
<comment xml:lang="de">Linux-PSF-Konsolenschrift (gzip-komprimiert)</comment>
<comment xml:lang="el">Γραμματοσειρά κονσόλας PSF Linux (συμπιεσμένη με gzip)</comment>
@@ -10739,10 +11114,10 @@
<comment xml:lang="fi">Linux PSF -konsolifontti (gzip-pakattu)</comment>
<comment xml:lang="fo">Linux PSF stýristøðs stavasnið (gzip-stappað)</comment>
<comment xml:lang="fr">police console Linux PSF (compressée gzip)</comment>
- <comment xml:lang="ga">cló chonsól Linux PSF (comhbhrúite le gzip)</comment>
+ <comment xml:lang="ga">cló consóil Linux PSF (comhbhrúite le gzip)</comment>
<comment xml:lang="gl">tipo de fonte de consola Linux PSF (comprimida con gzip)</comment>
<comment xml:lang="he">גופן למסוף מסוג Linux PSF (מכווץ ע״י gzip)</comment>
- <comment xml:lang="hr">Linux PSF konzolni font (komprimiran gzip-om)</comment>
+ <comment xml:lang="hr">Linux PSF konzolno slovo (gzip sažeto)</comment>
<comment xml:lang="hu">Linux PSF konzolos betűkészlet (gzip-tömörítésű)</comment>
<comment xml:lang="ia">Typo de litteras console Linux PSF (comprimite con gzip)</comment>
<comment xml:lang="id">Fonta konsol Linux PSF (terkompresi gzip)</comment>
@@ -10760,7 +11135,7 @@
<comment xml:lang="pt">letra de consola Linux PSF (compressão gzip)</comment>
<comment xml:lang="pt_BR">Fonte de console Linux PSF (compactada com gzip)</comment>
<comment xml:lang="ro">Font consolă Linux PSF (compresie gzip)</comment>
- <comment xml:lang="ru">консольный шрифт Linux PSF (сжатый gzip)</comment>
+ <comment xml:lang="ru">Консольный шрифт Linux PSF (сжатый gzip)</comment>
<comment xml:lang="sk">Písmo PSF pre konzolu Linuxu (komprimované pomocou gzip)</comment>
<comment xml:lang="sl">Datoteka pisave konzole Linux PSF (skrčena z gzip)</comment>
<comment xml:lang="sq">Lloj gërme për konsolë Linux PSF (komresuar me gzip)</comment>
@@ -10769,7 +11144,7 @@
<comment xml:lang="tr">Linux PSF konsol fontu (gzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">консольний шрифт Linux PSF (стиснений gzip)</comment>
<comment xml:lang="vi">Phông chữ bàn giao tiếp PSF Linux (đã nén gzip)</comment>
- <comment xml:lang="zh_CN">Linux PSF 控制台字体(gzip 压缩)</comment>
+ <comment xml:lang="zh_CN">Linux PSF 控制台字体(gzip 压缩)</comment>
<comment xml:lang="zh_TW">Linux PSF console 字型 (gzip 格式壓縮)</comment>
<sub-class-of type="application/gzip"/>
<generic-icon name="font-x-generic"/>
@@ -10781,8 +11156,8 @@
<comment xml:lang="az">PCF yazı növü</comment>
<comment xml:lang="be@latin">Šryft PCF</comment>
<comment xml:lang="bg">Шрифт — PCF</comment>
- <comment xml:lang="ca">tipus de lletra PCF</comment>
- <comment xml:lang="cs">písmo PCF</comment>
+ <comment xml:lang="ca">lletra PCF</comment>
+ <comment xml:lang="cs">font PCF</comment>
<comment xml:lang="cy">Ffont PCF</comment>
<comment xml:lang="da">PCF-skrifttype</comment>
<comment xml:lang="de">PCF-Schrift</comment>
@@ -10816,7 +11191,7 @@
<comment xml:lang="pt">letra PCF</comment>
<comment xml:lang="pt_BR">Fonte PCF</comment>
<comment xml:lang="ro">Font PCF</comment>
- <comment xml:lang="ru">шрифт PCF</comment>
+ <comment xml:lang="ru">Шрифт PCF</comment>
<comment xml:lang="sk">Písmo PCF</comment>
<comment xml:lang="sl">Datoteka pisave PCF</comment>
<comment xml:lang="sq">Gërma PCF</comment>
@@ -10835,14 +11210,14 @@
<glob pattern="*.pcf.Z"/>
<glob pattern="*.pcf.gz"/>
</mime-type>
- <mime-type type="application/x-font-otf">
+ <mime-type type="font/otf">
<comment>OpenType font</comment>
<comment xml:lang="ar">خط OpenType</comment>
<comment xml:lang="az">OpenType yazı növü</comment>
<comment xml:lang="be@latin">Šryft OpenType</comment>
<comment xml:lang="bg">Шрифт — OpenType</comment>
- <comment xml:lang="ca">tipus de lletra OpenType</comment>
- <comment xml:lang="cs">písmo OpenType</comment>
+ <comment xml:lang="ca">lletra OpenType</comment>
+ <comment xml:lang="cs">font OpenType</comment>
<comment xml:lang="cy">Ffont OpenType</comment>
<comment xml:lang="da">OpenType-skrifttype</comment>
<comment xml:lang="de">OpenType-Schrift</comment>
@@ -10876,7 +11251,7 @@
<comment xml:lang="pt">letra OpenType</comment>
<comment xml:lang="pt_BR">Fonte OpenType</comment>
<comment xml:lang="ro">Font OpenType</comment>
- <comment xml:lang="ru">шрифт OpenType</comment>
+ <comment xml:lang="ru">Шрифт OpenType</comment>
<comment xml:lang="sk">Písmo OpenType</comment>
<comment xml:lang="sl">Datoteka pisave OpenType</comment>
<comment xml:lang="sq">Gërma OpenType</comment>
@@ -10887,12 +11262,13 @@
<comment xml:lang="vi">Phông chữ OpenType</comment>
<comment xml:lang="zh_CN">OpenType 字体</comment>
<comment xml:lang="zh_TW">OpenType 字型</comment>
- <sub-class-of type="application/x-font-ttf"/>
+ <sub-class-of type="font/ttf"/>
<generic-icon name="font-x-generic"/>
<magic priority="50">
<match value="OTTO" type="string" offset="0"/>
</magic>
<glob pattern="*.otf"/>
+ <alias type="application/x-font-otf"/>
</mime-type>
<mime-type type="application/x-font-speedo">
<comment>Speedo font</comment>
@@ -10900,8 +11276,8 @@
<comment xml:lang="az">Speedo yazı növü</comment>
<comment xml:lang="be@latin">Šryft Speedo</comment>
<comment xml:lang="bg">Шрифт — Speedo</comment>
- <comment xml:lang="ca">tipus de lletra Speedo</comment>
- <comment xml:lang="cs">písmo Speedo</comment>
+ <comment xml:lang="ca">lletra Speedo</comment>
+ <comment xml:lang="cs">font Speedo</comment>
<comment xml:lang="cy">Ffont Speedo</comment>
<comment xml:lang="da">Speedoskrifttype</comment>
<comment xml:lang="de">Speedo-Schrift</comment>
@@ -10916,7 +11292,7 @@
<comment xml:lang="ga">cló Speedo</comment>
<comment xml:lang="gl">tipo de letra Speedo</comment>
<comment xml:lang="he">גופן של Speedo</comment>
- <comment xml:lang="hr">Speedo font</comment>
+ <comment xml:lang="hr">Speedo slovo</comment>
<comment xml:lang="hu">Speedo-betűkészlet</comment>
<comment xml:lang="ia">Typo de litteras Speedo</comment>
<comment xml:lang="id">Fonta Speedo</comment>
@@ -10935,7 +11311,7 @@
<comment xml:lang="pt">letra Speedo</comment>
<comment xml:lang="pt_BR">Fonte Speedo</comment>
<comment xml:lang="ro">Font Speedo</comment>
- <comment xml:lang="ru">шрифт Speedo</comment>
+ <comment xml:lang="ru">Шрифт Speedo</comment>
<comment xml:lang="sk">Písmo Speedo</comment>
<comment xml:lang="sl">Datoteka pisave Speedo</comment>
<comment xml:lang="sq">Gërma Speedo</comment>
@@ -10958,8 +11334,8 @@
<comment xml:lang="az">SunOS News yazı növü</comment>
<comment xml:lang="be@latin">Šryft SunOS News</comment>
<comment xml:lang="bg">Шрифт — SunOS News</comment>
- <comment xml:lang="ca">tipus de lletra SunOS News</comment>
- <comment xml:lang="cs">písmo SunOS News</comment>
+ <comment xml:lang="ca">lletra News de SunOS</comment>
+ <comment xml:lang="cs">font SunOS News</comment>
<comment xml:lang="cy">Ffont SunOS News</comment>
<comment xml:lang="da">SunOS News-skrifttype</comment>
<comment xml:lang="de">SunOS-News-Schrift</comment>
@@ -10974,7 +11350,7 @@
<comment xml:lang="ga">cló SunOS News</comment>
<comment xml:lang="gl">tipo de letra SunOS News</comment>
<comment xml:lang="he">גופן של SunOS News</comment>
- <comment xml:lang="hr">SunOS News font</comment>
+ <comment xml:lang="hr">SunOS News slovo</comment>
<comment xml:lang="hu">SunOS News-betűkészlet</comment>
<comment xml:lang="ia">Typo de litteras SunOS News</comment>
<comment xml:lang="id">Fonta SunOS News</comment>
@@ -10993,7 +11369,7 @@
<comment xml:lang="pt">letra SunOS News</comment>
<comment xml:lang="pt_BR">Fonte SunOS News</comment>
<comment xml:lang="ro">Font SunOS News</comment>
- <comment xml:lang="ru">шрифт SunOS News</comment>
+ <comment xml:lang="ru">Шрифт SunOS News</comment>
<comment xml:lang="sk">Písmo SunOS News</comment>
<comment xml:lang="sl">Datoteka pisave SunOS News</comment>
<comment xml:lang="sq">Gërma SunOS News</comment>
@@ -11017,8 +11393,8 @@
<comment xml:lang="az">TeX yazı növü</comment>
<comment xml:lang="be@latin">Šryft TeX</comment>
<comment xml:lang="bg">Шрифт — TeX</comment>
- <comment xml:lang="ca">tipus de lletra TeX</comment>
- <comment xml:lang="cs">písmo TeX</comment>
+ <comment xml:lang="ca">lletra TeX</comment>
+ <comment xml:lang="cs">font TeX</comment>
<comment xml:lang="cy">Ffont TeX</comment>
<comment xml:lang="da">TeX-skrifttype</comment>
<comment xml:lang="de">TeX-Schrift</comment>
@@ -11033,7 +11409,7 @@
<comment xml:lang="ga">cló TeX</comment>
<comment xml:lang="gl">tipo de letra de TeX</comment>
<comment xml:lang="he">גופן TeX</comment>
- <comment xml:lang="hr">TeX font</comment>
+ <comment xml:lang="hr">TeX slovo</comment>
<comment xml:lang="hu">TeX-betűkészlet</comment>
<comment xml:lang="ia">Typo de litteras TeX</comment>
<comment xml:lang="id">Fonta TeX</comment>
@@ -11052,7 +11428,7 @@
<comment xml:lang="pt">letra TeX</comment>
<comment xml:lang="pt_BR">Fonte TeX</comment>
<comment xml:lang="ro">Font TeX</comment>
- <comment xml:lang="ru">шрифт TeX</comment>
+ <comment xml:lang="ru">Шрифт TeX</comment>
<comment xml:lang="sk">Písmo TeX</comment>
<comment xml:lang="sl">Datoteka pisave TeX</comment>
<comment xml:lang="sq">Gërma TeX</comment>
@@ -11076,8 +11452,8 @@
<comment xml:lang="az">TeX yazı növü metrikləri</comment>
<comment xml:lang="be@latin">Metryka šryftu TeX</comment>
<comment xml:lang="bg">Шрифтова метрика — TeX</comment>
- <comment xml:lang="ca">mètrica de tipus de lletra TeX</comment>
- <comment xml:lang="cs">metrika písma TeX</comment>
+ <comment xml:lang="ca">mètrica de lletra de TeX</comment>
+ <comment xml:lang="cs">metrika fontu TeX</comment>
<comment xml:lang="cy">Metrigau Ffont TeX</comment>
<comment xml:lang="da">TeX-skrifttypeinformation</comment>
<comment xml:lang="de">TeX-Schriftmetriken</comment>
@@ -11091,7 +11467,7 @@
<comment xml:lang="ga">meadarachtaí cló TeX</comment>
<comment xml:lang="gl">Métricas de tipo de letra de TeX</comment>
<comment xml:lang="he">ממדי גופן של TeX</comment>
- <comment xml:lang="hr">TeX mjere fonta</comment>
+ <comment xml:lang="hr">TeX mjere slova</comment>
<comment xml:lang="hu">TeX-betűmetrika</comment>
<comment xml:lang="ia">Metricas de typo de litteras TeX</comment>
<comment xml:lang="id">Fonta metrik TeX</comment>
@@ -11110,7 +11486,7 @@
<comment xml:lang="pt">métricas de letra TeX</comment>
<comment xml:lang="pt_BR">Métrica de fonte TeX</comment>
<comment xml:lang="ro">Dimensiuni font TeX</comment>
- <comment xml:lang="ru">метрика шрифта TeX</comment>
+ <comment xml:lang="ru">Метрика шрифта TeX</comment>
<comment xml:lang="sk">Metrika písma TeX</comment>
<comment xml:lang="sl">Matrika pisave Tex</comment>
<comment xml:lang="sq">Gërma TeX metrics</comment>
@@ -11119,7 +11495,7 @@
<comment xml:lang="tr">TeX yazı tipi ölçüleri</comment>
<comment xml:lang="uk">метрики шрифту TeX</comment>
<comment xml:lang="vi">Cách đo phông chữ TeX</comment>
- <comment xml:lang="zh_CN">TeX 字体参数</comment>
+ <comment xml:lang="zh_CN">TeX 字体规格</comment>
<comment xml:lang="zh_TW">TeX 字型描述檔</comment>
<generic-icon name="font-x-generic"/>
<magic priority="50">
@@ -11127,13 +11503,13 @@
<match value="\000\022" type="string" offset="2"/>
</magic>
</mime-type>
- <mime-type type="application/x-font-ttf">
+ <mime-type type="font/ttf">
<comment>TrueType font</comment>
<comment xml:lang="ar">خط TrueType</comment>
<comment xml:lang="be@latin">Šryft TrueType</comment>
<comment xml:lang="bg">Шрифт — TrueType</comment>
- <comment xml:lang="ca">tipus de lletra TrueType</comment>
- <comment xml:lang="cs">písmo TrueType</comment>
+ <comment xml:lang="ca">lletra TrueType</comment>
+ <comment xml:lang="cs">font TrueType</comment>
<comment xml:lang="da">TrueType-skrifttype</comment>
<comment xml:lang="de">TrueType-Schrift</comment>
<comment xml:lang="el">Γραμματοσειρά TrueType</comment>
@@ -11147,7 +11523,7 @@
<comment xml:lang="ga">cló TrueType</comment>
<comment xml:lang="gl">tipo de letra TrueType</comment>
<comment xml:lang="he">גופן מסוג TrueType</comment>
- <comment xml:lang="hr">TrueType font</comment>
+ <comment xml:lang="hr">TrueType slovo</comment>
<comment xml:lang="hu">TrueType-betűkészlet</comment>
<comment xml:lang="ia">Typo de litteras TrueType</comment>
<comment xml:lang="id">Fonta TrueType</comment>
@@ -11166,7 +11542,7 @@
<comment xml:lang="pt">letra TrueType</comment>
<comment xml:lang="pt_BR">Fonte TrueType</comment>
<comment xml:lang="ro">Font TrueType</comment>
- <comment xml:lang="ru">шрифт TrueType</comment>
+ <comment xml:lang="ru">Шрифт TrueType</comment>
<comment xml:lang="sk">Písmo TrueType</comment>
<comment xml:lang="sl">Datoteka pisave TrueType</comment>
<comment xml:lang="sq">Lloj gërme TrueType</comment>
@@ -11184,6 +11560,31 @@
<match value="\000\001\000\000\000" type="string" offset="0"/>
</magic>
<glob pattern="*.ttf"/>
+ <alias type="application/x-font-ttf"/>
+ </mime-type>
+ <mime-type type="font/collection">
+ <comment>Font collection</comment>
+ <comment xml:lang="ca">ccol·lecció de lletres</comment>
+ <comment xml:lang="cs">kolekce fontů</comment>
+ <comment xml:lang="de">Schriftsammlung</comment>
+ <comment xml:lang="en_GB">Font collection</comment>
+ <comment xml:lang="es">colección tipográfica</comment>
+ <comment xml:lang="fi">Fonttikokoelma</comment>
+ <comment xml:lang="hr">Kolekcija slova</comment>
+ <comment xml:lang="hu">Betűkészlet-gyűjtemény</comment>
+ <comment xml:lang="id">Koleksi fonta</comment>
+ <comment xml:lang="it">Raccolta di caratteri</comment>
+ <comment xml:lang="kk">Қаріптер жинағы</comment>
+ <comment xml:lang="ko">글꼴 모음</comment>
+ <comment xml:lang="pl">Kolekcja czcionek</comment>
+ <comment xml:lang="pt_BR">coleção de fontes</comment>
+ <comment xml:lang="ru">Коллекция шрифтов</comment>
+ <comment xml:lang="sk">Zbierka písiem</comment>
+ <comment xml:lang="sv">Typsnittssamling</comment>
+ <comment xml:lang="uk">збірка шрифтів</comment>
+ <comment xml:lang="zh_CN">字体集</comment>
+ <comment xml:lang="zh_TW">字型集</comment>
+ <generic-icon name="font-x-generic"/>
<glob pattern="*.ttc"/>
</mime-type>
<mime-type type="application/x-font-ttx">
@@ -11191,8 +11592,8 @@
<comment xml:lang="ar">خط TrueType XML</comment>
<comment xml:lang="be@latin">Šryft TrueType XML</comment>
<comment xml:lang="bg">Шрифт — TrueType XML</comment>
- <comment xml:lang="ca">tipus de lletra TrueType XML</comment>
- <comment xml:lang="cs">písmo TrueType XML</comment>
+ <comment xml:lang="ca">lletra XML de TrueType</comment>
+ <comment xml:lang="cs">font TrueType XML</comment>
<comment xml:lang="da">TrueType XML-skrifttype</comment>
<comment xml:lang="de">TrueType-XML-Schrift</comment>
<comment xml:lang="el">Γραμματοσειρά XML TrueType</comment>
@@ -11205,7 +11606,7 @@
<comment xml:lang="ga">cló XML TrueType</comment>
<comment xml:lang="gl">tipo de letra TrueType XML</comment>
<comment xml:lang="he">גופן XML מסוג TrueType</comment>
- <comment xml:lang="hr">TrueType XML font</comment>
+ <comment xml:lang="hr">TrueType XML slovo</comment>
<comment xml:lang="hu">TrueType XML betűkészlet</comment>
<comment xml:lang="ia">Typo de litteras TrueType XML</comment>
<comment xml:lang="id">Fonta TrueType XML</comment>
@@ -11223,7 +11624,7 @@
<comment xml:lang="pt">letra TrueType XML</comment>
<comment xml:lang="pt_BR">Fonte TrueType XML</comment>
<comment xml:lang="ro">Font XML TrueType</comment>
- <comment xml:lang="ru">шрифт TrueType XML</comment>
+ <comment xml:lang="ru">Шрифт TrueType XML</comment>
<comment xml:lang="sk">Písmo TrueType XML</comment>
<comment xml:lang="sl">Datoteka pisave TrueType XML</comment>
<comment xml:lang="sq">Lloj gërme TrueType XML</comment>
@@ -11247,8 +11648,8 @@
<comment xml:lang="az">V yazı növü</comment>
<comment xml:lang="be@latin">Šryft V</comment>
<comment xml:lang="bg">Шрифт — V</comment>
- <comment xml:lang="ca">tipus de lletra V</comment>
- <comment xml:lang="cs">písmo V</comment>
+ <comment xml:lang="ca">lletra V</comment>
+ <comment xml:lang="cs">font V</comment>
<comment xml:lang="cy">Ffont V</comment>
<comment xml:lang="da">V-skrifttype</comment>
<comment xml:lang="de">V-Schrift</comment>
@@ -11263,7 +11664,7 @@
<comment xml:lang="ga">cló V</comment>
<comment xml:lang="gl">tipo de letra V</comment>
<comment xml:lang="he">גופן של V</comment>
- <comment xml:lang="hr">V font</comment>
+ <comment xml:lang="hr">V slovo</comment>
<comment xml:lang="hu">V-betűkészlet</comment>
<comment xml:lang="ia">Typo de litteras V</comment>
<comment xml:lang="id">Fonta V</comment>
@@ -11282,7 +11683,7 @@
<comment xml:lang="pt">letra V</comment>
<comment xml:lang="pt_BR">Fonte V</comment>
<comment xml:lang="ro">Font V</comment>
- <comment xml:lang="ru">шрифт V font</comment>
+ <comment xml:lang="ru">Шрифт V font</comment>
<comment xml:lang="sk">Písmo V</comment>
<comment xml:lang="sl">Datoteka pisave V</comment>
<comment xml:lang="sq">Gërmë V</comment>
@@ -11301,6 +11702,7 @@
<mime-type type="application/vnd.framemaker">
<comment>Adobe FrameMaker document</comment>
<comment xml:lang="ar">مستند أدوبي الصانع للإطارات</comment>
+ <comment xml:lang="ast">Documentu d'Adobe FrameMaker</comment>
<comment xml:lang="be@latin">Dakument Adobe FrameMaker</comment>
<comment xml:lang="bg">Документ — Adobe FrameMaker</comment>
<comment xml:lang="ca">document d'Adobe FrameMaker</comment>
@@ -11337,7 +11739,7 @@
<comment xml:lang="pt">documento Adobe FrameMaker</comment>
<comment xml:lang="pt_BR">Documento do Adobe FrameMaker</comment>
<comment xml:lang="ro">Document Adobe FrameMaker</comment>
- <comment xml:lang="ru">документ Adobe FrameMaker</comment>
+ <comment xml:lang="ru">Документ Adobe FrameMaker</comment>
<comment xml:lang="sk">Dokument Adobe FrameMaker</comment>
<comment xml:lang="sl">Dokument Adobe FrameMaker</comment>
<comment xml:lang="sq">Dokument Adobe FrameMaker</comment>
@@ -11399,7 +11801,7 @@
<comment xml:lang="oc">ROM Game Boy</comment>
<comment xml:lang="pl">Plik ROM konsoli Game Boy</comment>
<comment xml:lang="pt">ROM Game Boy</comment>
- <comment xml:lang="pt_BR">ROM do Game Boy</comment>
+ <comment xml:lang="pt_BR">ROM de Game Boy</comment>
<comment xml:lang="ro">ROM Game Boy</comment>
<comment xml:lang="ru">Game Boy ROM</comment>
<comment xml:lang="sk">ROM pre Game Boy</comment>
@@ -11424,18 +11826,29 @@
<mime-type type="application/x-gameboy-color-rom">
<comment>Game Boy Color ROM</comment>
<comment xml:lang="ca">ROM de Game Boy Color</comment>
+ <comment xml:lang="cs">ROM pro Game Boy Color</comment>
<comment xml:lang="da">Game Boy Color ROM</comment>
<comment xml:lang="de">Game Boy Color ROM</comment>
+ <comment xml:lang="en_GB">Game Boy Colour ROM</comment>
<comment xml:lang="es">ROM de Game Boy Color</comment>
+ <comment xml:lang="eu">Game Boy Color ROM</comment>
<comment xml:lang="fi">Game Boy Color -ROM</comment>
<comment xml:lang="fr">ROM Game Boy Color</comment>
+ <comment xml:lang="ga">ROM Game Boy Color</comment>
+ <comment xml:lang="he">ROM של Game Boy Color</comment>
+ <comment xml:lang="hr">Game Boy Color ROM</comment>
<comment xml:lang="hu">Game Boy Color ROM</comment>
+ <comment xml:lang="id">ROM Game Boy Color</comment>
+ <comment xml:lang="it">ROM Game Boy Color</comment>
<comment xml:lang="kk">Game Boy Color ROM</comment>
<comment xml:lang="ko">게임보이 컬러 롬</comment>
<comment xml:lang="pl">Plik ROM konsoli Game Boy Color</comment>
<comment xml:lang="pt_BR">ROM de Game Boy Color</comment>
<comment xml:lang="ru">Game Boy Color ROM</comment>
<comment xml:lang="sk">ROM pre Game Boy Color</comment>
+ <comment xml:lang="sr">Гејм Бој РОМ боје</comment>
+ <comment xml:lang="sv">Game Boy Color-rom</comment>
+ <comment xml:lang="tr">Game Boy Color ROM</comment>
<comment xml:lang="uk">ППП Game Boy Color</comment>
<comment xml:lang="zh_CN">Game Boy Color ROM</comment>
<comment xml:lang="zh_TW">Game Boy Color ROM</comment>
@@ -11484,7 +11897,7 @@
<comment xml:lang="oc">ROM Game Boy Advance</comment>
<comment xml:lang="pl">Plik ROM konsoli Game Boy Advance</comment>
<comment xml:lang="pt">ROM Game Boy Advance</comment>
- <comment xml:lang="pt_BR">ROM do Game Boy Advance</comment>
+ <comment xml:lang="pt_BR">ROM de Game Boy Advance</comment>
<comment xml:lang="ro">ROM Game Boy Advance</comment>
<comment xml:lang="ru">Game Boy Advance ROM</comment>
<comment xml:lang="sk">ROM pre Game Boy Advance</comment>
@@ -11501,6 +11914,30 @@
<glob pattern="*.gba"/>
<glob pattern="*.agb"/>
</mime-type>
+ <mime-type type="application/x-virtual-boy-rom">
+ <comment>Virtual Boy ROM</comment>
+ <comment xml:lang="ca">ROM de Virtual Boy</comment>
+ <comment xml:lang="cs">ROM pro Virtual Boy</comment>
+ <comment xml:lang="de">Virtual Boy ROM</comment>
+ <comment xml:lang="en_GB">Virtual Boy ROM</comment>
+ <comment xml:lang="es">ROM de Virtual Boy</comment>
+ <comment xml:lang="hr">Virtual Boy ROM</comment>
+ <comment xml:lang="hu">Virtual Boy ROM</comment>
+ <comment xml:lang="id">ROM Virtual Boy</comment>
+ <comment xml:lang="it">ROM Virtual Boy</comment>
+ <comment xml:lang="kk">Virtual Boy ROM</comment>
+ <comment xml:lang="ko">버추얼보이 롬</comment>
+ <comment xml:lang="pl">Plik ROM konsoli Virtual Boy</comment>
+ <comment xml:lang="pt_BR">ROM de Virtual Boy</comment>
+ <comment xml:lang="ru">Virtual Boy ROM</comment>
+ <comment xml:lang="sk">ROM pre Virtual Boy</comment>
+ <comment xml:lang="sv">Virtual Boy-rom</comment>
+ <comment xml:lang="uk">ROM Virtual Boy</comment>
+ <comment xml:lang="zh_CN">Virtual Boy ROM</comment>
+ <comment xml:lang="zh_TW">Virtual Boy ROM</comment>
+ <generic-icon name="application-x-executable"/>
+ <glob pattern="*.vb"/>
+ </mime-type>
<mime-type type="application/x-gdbm">
<comment>GDBM database</comment>
<comment xml:lang="ar">قاعدة بيانات GDBM</comment>
@@ -11540,7 +11977,7 @@
<comment xml:lang="pt">base de dados GDMB</comment>
<comment xml:lang="pt_BR">Banco de dados GDBM</comment>
<comment xml:lang="ro">Bază de date GDBM</comment>
- <comment xml:lang="ru">база данных GDBM</comment>
+ <comment xml:lang="ru">База данных GDBM</comment>
<comment xml:lang="sk">Databáza GDBM</comment>
<comment xml:lang="sl">Podatkovna zbirka GDBM</comment>
<comment xml:lang="sq">Bazë me të dhëna GDBM</comment>
@@ -11597,7 +12034,7 @@
<comment xml:lang="oc">ROM Mega Drive/Genesis</comment>
<comment xml:lang="pl">Plik ROM konsoli Mega Drive</comment>
<comment xml:lang="pt">ROM Mega Drive</comment>
- <comment xml:lang="pt_BR">ROM do Gênesis (Mega Drive)</comment>
+ <comment xml:lang="pt_BR">ROM de Genesis (Mega Drive)</comment>
<comment xml:lang="ro">ROM Genesis</comment>
<comment xml:lang="ru">Genesis ROM</comment>
<comment xml:lang="sk">ROM pre Megadrive</comment>
@@ -11624,19 +12061,29 @@
<comment>Genesis 32X ROM</comment>
<comment xml:lang="ca">ROM de Genesis 32X</comment>
+ <comment xml:lang="cs">ROM pro Genesis 32X</comment>
<comment xml:lang="da">Genesis 32X ROM</comment>
<comment xml:lang="de">Genesis 32X ROM</comment>
+ <comment xml:lang="en_GB">Genesis 32X ROM</comment>
<comment xml:lang="es">ROM de Genesis 32X</comment>
+ <comment xml:lang="eu">Genesis 32X ROM</comment>
<comment xml:lang="fi">Genesis 32X -ROM</comment>
<comment xml:lang="fr">ROM Genesis 32X</comment>
+ <comment xml:lang="ga">ROM Genesis 32X</comment>
<comment xml:lang="he">ROM מסוג Genesis 32X</comment>
+ <comment xml:lang="hr">Genesis 32X ROM</comment>
<comment xml:lang="hu">Genesis 32X ROM</comment>
+ <comment xml:lang="id">ROM Genesis 32X</comment>
+ <comment xml:lang="it">ROM Sega Mega Drive 32X</comment>
<comment xml:lang="kk">Genesis 32X ROM</comment>
<comment xml:lang="ko">제네시스 32X 롬</comment>
<comment xml:lang="pl">Plik ROM konsoli Mega Drive 32X</comment>
<comment xml:lang="pt_BR">ROM de Genesis 32X</comment>
<comment xml:lang="ru">Genesis 32X ROM</comment>
<comment xml:lang="sk">ROM pre Genesis 32X</comment>
+ <comment xml:lang="sr">Џенезис 32X РОМ</comment>
+ <comment xml:lang="sv">Mega Drive 32X-rom</comment>
+ <comment xml:lang="tr">Genesis 32X ROM</comment>
<comment xml:lang="uk">ППП Genesis 32X</comment>
<comment xml:lang="zh_CN">Genesis 32X ROM</comment>
<comment xml:lang="zh_TW">Genesis 32X ROM</comment>
@@ -11667,7 +12114,7 @@
<comment xml:lang="ga">teachtaireachtaí aistrithe (inléite ag meaisín)</comment>
<comment xml:lang="gl">mensaxes traducidos (lexíbeis por máquinas)</comment>
<comment xml:lang="he">הודעות מתורגמות (מובן ע״י מכונה)</comment>
- <comment xml:lang="hr">prevedene poruke (strojno čitljive)</comment>
+ <comment xml:lang="hr">Prevedene poruke (strojno čitljive)</comment>
<comment xml:lang="hu">lefordított üzenetek (gépi kód)</comment>
<comment xml:lang="ia">messages traducite (legibile pro machinas)</comment>
<comment xml:lang="id">pesan diterjemahkan (dapat dibaca mesin)</comment>
@@ -11687,7 +12134,7 @@
<comment xml:lang="pt">mensagens traduzidas (leitura pelo computador)</comment>
<comment xml:lang="pt_BR">Mensagens traduzidas (legível pelo computador)</comment>
<comment xml:lang="ro">mesaje traduse (citite de calculator)</comment>
- <comment xml:lang="ru">переводы сообщений (откомпилированые)</comment>
+ <comment xml:lang="ru">Переводы сообщений (откомпилированые)</comment>
<comment xml:lang="sk">Preložené správy (strojovo čitateľné)</comment>
<comment xml:lang="sl">prevedena sporočila (strojni zapis)</comment>
<comment xml:lang="sq">Mesazhe të përkthyer (të lexueshëm nga makina)</comment>
@@ -11696,7 +12143,7 @@
<comment xml:lang="tr">çevrilmiş iletiler (makine tarafından okunabilir)</comment>
<comment xml:lang="uk">перекладені повідомлення (у машинній формі)</comment>
<comment xml:lang="vi">thông điệp đã dịch (máy đọc được)</comment>
- <comment xml:lang="zh_CN">消息翻译(机读)</comment>
+ <comment xml:lang="zh_CN">已翻译消息(机读)</comment>
<comment xml:lang="zh_TW">翻譯訊息 (程式讀取格式)</comment>
<magic priority="50">
<match value="\336\22\4\225" type="string" offset="0"/>
@@ -11717,6 +12164,7 @@
<comment xml:lang="eu">GTK+ Builder</comment>
<comment xml:lang="fi">GTK+ Builder</comment>
<comment xml:lang="fr">GTK+ Builder</comment>
+ <comment xml:lang="ga">Tógálaí GTK+</comment>
<comment xml:lang="gl">Construtor de GTK+</comment>
<comment xml:lang="he">בנייה של GTK+‎</comment>
<comment xml:lang="hr">GTK+ Builder</comment>
@@ -11739,7 +12187,7 @@
<comment xml:lang="sv">GTK+ Builder</comment>
<comment xml:lang="tr">GTK+ İnşa Edici</comment>
<comment xml:lang="uk">GTK+ Builder</comment>
- <comment xml:lang="zh_CN">GTK+ 构建程序</comment>
+ <comment xml:lang="zh_CN">GTK+ Builder</comment>
<comment xml:lang="zh_TW">GTK+ Builder</comment>
<sub-class-of type="application/xml"/>
<generic-icon name="x-office-document"/>
@@ -11789,7 +12237,7 @@
<comment xml:lang="pt">projecto Glade</comment>
<comment xml:lang="pt_BR">Projeto do Glade</comment>
<comment xml:lang="ro">Proiect Glade</comment>
- <comment xml:lang="ru">проект Glade</comment>
+ <comment xml:lang="ru">Проект Glade</comment>
<comment xml:lang="sk">Projekt Glade</comment>
<comment xml:lang="sl">Datoteka projekta Glade</comment>
<comment xml:lang="sq">Projekt Glade</comment>
@@ -11841,7 +12289,7 @@
<comment xml:lang="pt">dados financeiros GnuCash</comment>
<comment xml:lang="pt_BR">Dados financeiros do GnuCash</comment>
<comment xml:lang="ro">Date financiare GnuCash</comment>
- <comment xml:lang="ru">финансовые данные GnuCash</comment>
+ <comment xml:lang="ru">Финансовые данные GnuCash</comment>
<comment xml:lang="sk">Finančné údaje GnuCash</comment>
<comment xml:lang="sl">Datoteka finančnih podatkov GnuCash</comment>
<comment xml:lang="sr">финансијски подаци Гнуовог новца</comment>
@@ -11895,7 +12343,7 @@
<comment xml:lang="pt">folha de cálculo Gnumeric</comment>
<comment xml:lang="pt_BR">Planilha do Gnumeric</comment>
<comment xml:lang="ro">Foaie de calcul Gnumeric</comment>
- <comment xml:lang="ru">электронная таблица Gnumeric</comment>
+ <comment xml:lang="ru">Электронная таблица Gnumeric</comment>
<comment xml:lang="sk">Zošit Gnumeric</comment>
<comment xml:lang="sl">Razpredelnica Gnumeric</comment>
<comment xml:lang="sq">Fletë llogaritjesh Gnumeric</comment>
@@ -11904,7 +12352,7 @@
<comment xml:lang="tr">Gnumeric çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця Gnumeric</comment>
<comment xml:lang="vi">Bảng tính Gnumeric.</comment>
- <comment xml:lang="zh_CN">Gnumeric 工作簿</comment>
+ <comment xml:lang="zh_CN">Gnumeric 电子表格</comment>
<comment xml:lang="zh_TW">Gnumeric 試算表</comment>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="50">
@@ -11916,6 +12364,7 @@
<mime-type type="application/x-gnuplot">
<comment>Gnuplot document</comment>
<comment xml:lang="ar">مستند Gnuplot</comment>
+ <comment xml:lang="ast">Documentu de Gnuplot</comment>
<comment xml:lang="be@latin">Dakument Gnuplot</comment>
<comment xml:lang="bg">Документ — Gnuplot</comment>
<comment xml:lang="ca">document gnuplot</comment>
@@ -11951,7 +12400,7 @@
<comment xml:lang="pt">documento Gnuplot</comment>
<comment xml:lang="pt_BR">Documento do Gnuplot</comment>
<comment xml:lang="ro">Document Gnuplot</comment>
- <comment xml:lang="ru">документ Gnuplot</comment>
+ <comment xml:lang="ru">Документ Gnuplot</comment>
<comment xml:lang="sk">Dokument Gnuplot</comment>
<comment xml:lang="sl">Dokument Gnuplot</comment>
<comment xml:lang="sq">Dokument Gnuplot</comment>
@@ -11985,7 +12434,7 @@
<comment xml:lang="fi">Graphite- tieteellinen graafi</comment>
<comment xml:lang="fo">Grapite vísindarlig ritmynd</comment>
<comment xml:lang="fr">graphe Graphite scientific</comment>
- <comment xml:lang="ga">graf eolaíoch Graphite</comment>
+ <comment xml:lang="ga">graf eolaíochta Graphite</comment>
<comment xml:lang="gl">gráfica científica de Graphite</comment>
<comment xml:lang="he">תרשים מדעי של Graphite</comment>
<comment xml:lang="hr">Graphite znanstveni grafikon</comment>
@@ -12007,7 +12456,7 @@
<comment xml:lang="pt">gráfico científico Graphite</comment>
<comment xml:lang="pt_BR">Gráfico científico do Graphite</comment>
<comment xml:lang="ro">Grafic științific Graphite</comment>
- <comment xml:lang="ru">научная диаграмма Graphite</comment>
+ <comment xml:lang="ru">Научная диаграмма Graphite</comment>
<comment xml:lang="sk">Vedecký graf Graphite</comment>
<comment xml:lang="sl">Datoteka znanstvenega grafa Graphite</comment>
<comment xml:lang="sq">Grafik shkencor Graphite </comment>
@@ -12061,7 +12510,7 @@
<comment xml:lang="pt">catálogo GTKtalog</comment>
<comment xml:lang="pt_BR">Catálogo GTKtalog</comment>
<comment xml:lang="ro">Catalog GTKalog</comment>
- <comment xml:lang="ru">каталог GTKtalog</comment>
+ <comment xml:lang="ru">Каталог GTKtalog</comment>
<comment xml:lang="sk">Katalóg GTKtalog</comment>
<comment xml:lang="sl">Datoteka kataloga GTKtalog</comment>
<comment xml:lang="sq">Katallog GTKtalog</comment>
@@ -12080,6 +12529,7 @@
<mime-type type="application/x-gzdvi">
<comment>TeX DVI document (gzip-compressed)</comment>
<comment xml:lang="ar">مستند TeX DVI (مضغوط-gzip)</comment>
+ <comment xml:lang="ast">Documentu Tex DVI (comprimíu en gzip)</comment>
<comment xml:lang="be@latin">Dakument TeX DVI (gzip-skampresavany)</comment>
<comment xml:lang="bg">Документ — TeX DVI, компресиран с gzip</comment>
<comment xml:lang="ca">document DVI de TeX (amb compressió gzip)</comment>
@@ -12096,7 +12546,7 @@
<comment xml:lang="ga">cáipéis DVI TeX (comhbhrúite le gzip)</comment>
<comment xml:lang="gl">documento DVI de TeX (comprimido con gzip)</comment>
<comment xml:lang="he">מסמך מסוג TeX DVI (מכווץ ע״י gzip)</comment>
- <comment xml:lang="hr">TeX DVI dokument (komprimiran gzip-om)</comment>
+ <comment xml:lang="hr">TeX DVI dokument (gzip sažet)</comment>
<comment xml:lang="hu">TeX DVI dokumentum (gzip-pel tömörítve)</comment>
<comment xml:lang="ia">Documento TeX DVI (comprimite con gzip)</comment>
<comment xml:lang="id">Dokumen TeX DVI (terkompresi gzip)</comment>
@@ -12114,7 +12564,7 @@
<comment xml:lang="pt">documento TeX DVI (compressão gzip)</comment>
<comment xml:lang="pt_BR">Documento DVI TeX (compactado com gzip)</comment>
<comment xml:lang="ro">Document TeX DVI (comprimat gzip)</comment>
- <comment xml:lang="ru">документ TeX DVI (сжатый gzip)</comment>
+ <comment xml:lang="ru">Документ TeX DVI (сжатый gzip)</comment>
<comment xml:lang="sk">Dokument TeX DVI (komprimovaný pomocou gzip)</comment>
<comment xml:lang="sl">Dokument TeX DVI (stisnjen z gzip)</comment>
<comment xml:lang="sq">Dokument TeX DVI (i kompresuar me gzip)</comment>
@@ -12123,7 +12573,7 @@
<comment xml:lang="tr">TeX DVI belgesi (gzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">документ TeX DVI (стиснений gzip)</comment>
<comment xml:lang="vi">Tài liệu DVI TeX (đã nén gzip)</comment>
- <comment xml:lang="zh_CN">TeX DVI 文档(gzip 压缩)</comment>
+ <comment xml:lang="zh_CN">TeX DVI 文档(gzip 压缩)</comment>
<comment xml:lang="zh_TW">TeX DVI 文件 (gzip 格式壓縮)</comment>
<sub-class-of type="application/gzip"/>
<generic-icon name="x-office-document"/>
@@ -12167,7 +12617,7 @@
<comment xml:lang="pt">arquivo Gzip</comment>
<comment xml:lang="pt_BR">Pacote Gzip</comment>
<comment xml:lang="ro">Arhivă Gzip</comment>
- <comment xml:lang="ru">архив GZIP</comment>
+ <comment xml:lang="ru">Архив GZIP</comment>
<comment xml:lang="sk">Archív gzip</comment>
<comment xml:lang="sl">Datoteka arhiva Gzip</comment>
<comment xml:lang="sq">Arkiv gzip</comment>
@@ -12188,6 +12638,7 @@
<mime-type type="application/x-gzpdf">
<comment>PDF document (gzip-compressed)</comment>
<comment xml:lang="ar">مستند PDF (مضغوط-gzip)</comment>
+ <comment xml:lang="ast">Documentu PDF (comprimíu en gzip)</comment>
<comment xml:lang="be@latin">Dakument PDF (gzip-skampresavany)</comment>
<comment xml:lang="bg">Документ — PDF, компресиран с gzip</comment>
<comment xml:lang="ca">document PDF (amb compressió gzip)</comment>
@@ -12222,7 +12673,7 @@
<comment xml:lang="pt">documento PDF (compressão gzip)</comment>
<comment xml:lang="pt_BR">Documento PDF (compactado com gzip)</comment>
<comment xml:lang="ro">Document PDF (comprimat gzip)</comment>
- <comment xml:lang="ru">документ PDF (сжатый gzip)</comment>
+ <comment xml:lang="ru">Документ PDF (сжатый gzip)</comment>
<comment xml:lang="sk">Dokument PDF (komprimovaný pomocou gzip)</comment>
<comment xml:lang="sl">Dokument PDF (stisnjen z gzip)</comment>
<comment xml:lang="sq">Dokument PDF (i kompresuar me gzip)</comment>
@@ -12231,7 +12682,7 @@
<comment xml:lang="tr">PDF belgesi (gzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">документ PDF (стиснений gzip)</comment>
<comment xml:lang="vi">Tài liệu PDF (đã nén gzip)</comment>
- <comment xml:lang="zh_CN">PDF 文档(gzip 压缩)</comment>
+ <comment xml:lang="zh_CN">PDF 文档(gzip 压缩)</comment>
<comment xml:lang="zh_TW">PDF 文件 (gzip 格式壓縮)</comment>
<sub-class-of type="application/gzip"/>
<generic-icon name="x-office-document"/>
@@ -12240,6 +12691,7 @@
<mime-type type="application/x-gzpostscript">
<comment>PostScript document (gzip-compressed)</comment>
<comment xml:lang="ar">مستند PostScript (مضغوط-gzip)</comment>
+ <comment xml:lang="ast">Documentu PostScript (comprimíu en gzip)</comment>
<comment xml:lang="be@latin">Dakument PostScript (gzip-skampresavany)</comment>
<comment xml:lang="bg">Документ — PostScript, компресиран с gzip</comment>
<comment xml:lang="ca">document PostScript (amb compressió gzip)</comment>
@@ -12276,7 +12728,7 @@
<comment xml:lang="pt">documento PostScript (compressão gzip)</comment>
<comment xml:lang="pt_BR">Documento PostScript (compactado com gzip)</comment>
<comment xml:lang="ro">Document PostScript (comprimat gzip)</comment>
- <comment xml:lang="ru">документ PostScript (сжатый gzip)</comment>
+ <comment xml:lang="ru">Документ PostScript (сжатый gzip)</comment>
<comment xml:lang="sk">Dokument PostScript (komprimovaný pomocou gzip)</comment>
<comment xml:lang="sl">Dokument PostScript (stisnjen z gzip)</comment>
<comment xml:lang="sq">Dokument PostScript (i kompresuar me gzip)</comment>
@@ -12285,7 +12737,7 @@
<comment xml:lang="tr">PostScript belgesi (gzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">документ PostScript (стиснене gzip)</comment>
<comment xml:lang="vi">Tài liệu PostScript (đã nén gzip)</comment>
- <comment xml:lang="zh_CN">PostScript 文档(gzip 压缩)</comment>
+ <comment xml:lang="zh_CN">PostScript 文档(gzip 压缩)</comment>
<comment xml:lang="zh_TW">PostScript 文件 (gzip 格式壓縮)</comment>
<sub-class-of type="application/gzip"/>
<generic-icon name="x-office-document"/>
@@ -12294,6 +12746,7 @@
<mime-type type="application/x-hdf">
<comment>HDF document</comment>
<comment xml:lang="ar">مستند HDF</comment>
+ <comment xml:lang="ast">Documentu HDF</comment>
<comment xml:lang="az">HDF sənədi</comment>
<comment xml:lang="be@latin">Dakument HDF</comment>
<comment xml:lang="bg">Документ — HDF</comment>
@@ -12332,7 +12785,7 @@
<comment xml:lang="pt">documento HDF</comment>
<comment xml:lang="pt_BR">Documento HDF</comment>
<comment xml:lang="ro">Document HDF</comment>
- <comment xml:lang="ru">документ HDF</comment>
+ <comment xml:lang="ru">Документ HDF</comment>
<comment xml:lang="sk">Dokument HDF</comment>
<comment xml:lang="sl">Dokument HDF</comment>
<comment xml:lang="sq">Dokument HDF</comment>
@@ -12368,6 +12821,7 @@
<comment xml:lang="eu">IFF fitxtegia</comment>
<comment xml:lang="fi">IFF-tiedosto</comment>
<comment xml:lang="fr">fichier IFF</comment>
+ <comment xml:lang="ga">comhad IFF</comment>
<comment xml:lang="gl">Ficheiro IFF</comment>
<comment xml:lang="he">קובץ IFF</comment>
<comment xml:lang="hr">IFF datoteka</comment>
@@ -12383,7 +12837,7 @@
<comment xml:lang="pl">Plik IFF</comment>
<comment xml:lang="pt">ficheiro IFF</comment>
<comment xml:lang="pt_BR">Arquivo IFF</comment>
- <comment xml:lang="ru">файл IFF</comment>
+ <comment xml:lang="ru">Файл IFF</comment>
<comment xml:lang="sk">Súbor IFF</comment>
<comment xml:lang="sl">Datoteka IFF</comment>
<comment xml:lang="sr">ИФФ датотека</comment>
@@ -12437,7 +12891,7 @@
<comment xml:lang="pt">firmware iPod</comment>
<comment xml:lang="pt_BR">Firmware do iPod</comment>
<comment xml:lang="ro">Firmware iPod</comment>
- <comment xml:lang="ru">микропрограмма iPod</comment>
+ <comment xml:lang="ru">Микропрограмма iPod</comment>
<comment xml:lang="sk">Firmware iPod</comment>
<comment xml:lang="sl">Programska strojna oprema iPod</comment>
<comment xml:lang="sq">Firmware iPod</comment>
@@ -12491,7 +12945,7 @@
<comment xml:lang="pt">arquivo Java</comment>
<comment xml:lang="pt_BR">Pacote Java</comment>
<comment xml:lang="ro">Arhivă Java</comment>
- <comment xml:lang="ru">архив Java</comment>
+ <comment xml:lang="ru">Архив Java</comment>
<comment xml:lang="sk">Archív Java</comment>
<comment xml:lang="sl">Datoteka arhiva Java</comment>
<comment xml:lang="sq">Arkiv Java</comment>
@@ -12547,7 +13001,7 @@
<comment xml:lang="pt">classe Java</comment>
<comment xml:lang="pt_BR">Classe Java</comment>
<comment xml:lang="ro">Clasă Java</comment>
- <comment xml:lang="ru">класс Java</comment>
+ <comment xml:lang="ru">Класс Java</comment>
<comment xml:lang="sk">Trieda Java</comment>
<comment xml:lang="sl">Datoteka razreda Java</comment>
<comment xml:lang="sq">Klasë Java</comment>
@@ -12606,7 +13060,7 @@
<comment xml:lang="pt">ficheiro JNLP</comment>
<comment xml:lang="pt_BR">Arquivo JNLP</comment>
<comment xml:lang="ro">Fișier JNLP</comment>
- <comment xml:lang="ru">файл JNLP</comment>
+ <comment xml:lang="ru">Файл JNLP</comment>
<comment xml:lang="sk">Súbor JNLP</comment>
<comment xml:lang="sl">Datoteka JNLP</comment>
<comment xml:lang="sq">File JNLP</comment>
@@ -12660,7 +13114,7 @@
<comment xml:lang="pt">armazém de chaves Java</comment>
<comment xml:lang="pt_BR">Keystore de Java</comment>
<comment xml:lang="ro">Stocare chei Java</comment>
- <comment xml:lang="ru">хранилище ключей Java</comment>
+ <comment xml:lang="ru">Хранилище ключей Java</comment>
<comment xml:lang="sk">Úložisko kľúčov Java</comment>
<comment xml:lang="sl">Datoteka tipkovne razporeditve Java</comment>
<comment xml:lang="sr">смештај кључа Јаве</comment>
@@ -12710,7 +13164,7 @@
<comment xml:lang="pt">armazém de chaves JavaJCE</comment>
<comment xml:lang="pt_BR">Keystore JCE do Java</comment>
<comment xml:lang="ro">Stocare chei Java JCE</comment>
- <comment xml:lang="ru">хранилище ключей Java JCE</comment>
+ <comment xml:lang="ru">Хранилище ключей Java JCE</comment>
<comment xml:lang="sk">Úložisko kľúčov Java JCE</comment>
<comment xml:lang="sl">Datoteka tipkovne razporeditve Java JCE</comment>
<comment xml:lang="sr">смештај ЈЦЕ кључа Јаве</comment>
@@ -12763,7 +13217,7 @@
<comment xml:lang="pt">arquivo Java Pack200</comment>
<comment xml:lang="pt_BR">Pacote Java Pack200</comment>
<comment xml:lang="ro">Arhivă Java Pack2000</comment>
- <comment xml:lang="ru">архив Java Pack200</comment>
+ <comment xml:lang="ru">Архив Java Pack200</comment>
<comment xml:lang="sk">Archív Java Pack200</comment>
<comment xml:lang="sl">Datoteka arhiva Pack200 Java</comment>
<comment xml:lang="sq">Arkiv Java Pack200</comment>
@@ -12819,7 +13273,7 @@
<comment xml:lang="pt">programa JavaScript</comment>
<comment xml:lang="pt_BR">Programa JavaScript</comment>
<comment xml:lang="ro">Program JavaScript</comment>
- <comment xml:lang="ru">сценарий JavaScript</comment>
+ <comment xml:lang="ru">Программа JavaScript</comment>
<comment xml:lang="sk">Program jazyka JavaScript</comment>
<comment xml:lang="sl">Programska datoteka JavaScript</comment>
<comment xml:lang="sq">Program JavaScript</comment>
@@ -12828,17 +13282,31 @@
<comment xml:lang="tr">JavaScript programı</comment>
<comment xml:lang="uk">програма мовою JavaScript</comment>
<comment xml:lang="vi">Chương trình JavaScript</comment>
- <comment xml:lang="zh_CN">Javascript 程序</comment>
+ <comment xml:lang="zh_CN">JavaScript 程序</comment>
<comment xml:lang="zh_TW">JavaScript 程式</comment>
<alias type="application/x-javascript"/>
<alias type="text/javascript"/>
<sub-class-of type="application/ecmascript"/>
<generic-icon name="text-x-script"/>
+ <magic priority="50">
+ <match value="#!/bin/gjs" type="string" offset="0"/>
+ <match value="#! /bin/gjs" type="string" offset="0"/>
+ <match value='eval \"exec /bin/gjs' type="string" offset="0"/>
+ <match value="#!/usr/bin/gjs" type="string" offset="0"/>
+ <match value="#! /usr/bin/gjs" type="string" offset="0"/>
+ <match value='eval \"exec /usr/bin/gjs' type="string" offset="0"/>
+ <match value="#!/usr/local/bin/gjs" type="string" offset="0"/>
+ <match value="#! /usr/local/bin/gjs" type="string" offset="0"/>
+ <match value='eval \"exec /usr/local/bin/gjs' type="string" offset="0"/>
+ <match value='/bin/env gjs' type="string" offset="2:16"/>
+ </magic>
<glob pattern="*.js"/>
<glob pattern="*.jsm"/>
+ <glob pattern="*.mjs"/>
</mime-type>
<mime-type type="application/json">
<comment>JSON document</comment>
+ <comment xml:lang="ast">Documentu JSON</comment>
<comment xml:lang="ca">document JSON</comment>
<comment xml:lang="cs">dokument JSON</comment>
<comment xml:lang="da">JSON-dokument</comment>
@@ -12849,6 +13317,7 @@
<comment xml:lang="eu">JSON dokumentua</comment>
<comment xml:lang="fi">JSON-asiakirja</comment>
<comment xml:lang="fr">document JSON</comment>
+ <comment xml:lang="ga">cáipéis JSON</comment>
<comment xml:lang="gl">Documento JSON</comment>
<comment xml:lang="he">מסמך JSON</comment>
<comment xml:lang="hr">JSON dokument</comment>
@@ -12879,6 +13348,7 @@
</mime-type>
<mime-type type="application/jrd+json">
<comment>JRD document</comment>
+ <comment xml:lang="ast">Documentu JRD</comment>
<comment xml:lang="ca">document JRD</comment>
<comment xml:lang="cs">dokument JRD</comment>
<comment xml:lang="da">JRD-dokument</comment>
@@ -12889,6 +13359,7 @@
<comment xml:lang="eu">JRD dokumentua</comment>
<comment xml:lang="fi">JRD-asiakirja</comment>
<comment xml:lang="fr">document JRD</comment>
+ <comment xml:lang="ga">cáipéis JRD</comment>
<comment xml:lang="he">מסמך JRD</comment>
<comment xml:lang="hr">JRD dokument</comment>
<comment xml:lang="hu">JRD dokumentum</comment>
@@ -12901,7 +13372,7 @@
<comment xml:lang="pl">Dokument JRD</comment>
<comment xml:lang="pt">doxumento JRD</comment>
<comment xml:lang="pt_BR">Documento JRD</comment>
- <comment xml:lang="ru">документ JRD</comment>
+ <comment xml:lang="ru">Документ JRD</comment>
<comment xml:lang="sk">Dokument JRD</comment>
<comment xml:lang="sr">ЈРД документ</comment>
<comment xml:lang="sv">JRD-dokument</comment>
@@ -12923,7 +13394,9 @@
<comment xml:lang="de">JSON-Patch</comment>
<comment xml:lang="en_GB">JSON patch</comment>
<comment xml:lang="es">parche en JSON</comment>
+ <comment xml:lang="eu">JSON adabakia</comment>
<comment xml:lang="fr">correctif JSON</comment>
+ <comment xml:lang="ga">paiste JSON</comment>
<comment xml:lang="he">טלאי JSON</comment>
<comment xml:lang="hr">JSON zakrpa</comment>
<comment xml:lang="hu">JSON javítócsomag</comment>
@@ -12936,13 +13409,13 @@
<comment xml:lang="pl">Łata JSON</comment>
<comment xml:lang="pt">patch JSON</comment>
<comment xml:lang="pt_BR">Patch JSON</comment>
- <comment xml:lang="ru">изменение JSON</comment>
+ <comment xml:lang="ru">Патч JSON</comment>
<comment xml:lang="sk">Záplata JSON</comment>
<comment xml:lang="sr">ЈСОН закрпа</comment>
<comment xml:lang="sv">JSON patch</comment>
<comment xml:lang="tr">JSON yaması</comment>
<comment xml:lang="uk">латка JSON</comment>
- <comment xml:lang="zh_CN">JSON 补丁文件</comment>
+ <comment xml:lang="zh_CN">JSON 补丁</comment>
<comment xml:lang="zh_TW">JSON 修補檔</comment>
<acronym>JSON</acronym>
<expanded-acronym>JavaScript Object Notation</expanded-acronym>
@@ -12952,6 +13425,7 @@
</mime-type>
<mime-type type="application/ld+json">
<comment>JSON-LD document</comment>
+ <comment xml:lang="ast">Documentu JSON-LD</comment>
<comment xml:lang="ca">document JSON-LD</comment>
<comment xml:lang="cs">dokument JSON-LD</comment>
<comment xml:lang="da">JSON-LD-dokument</comment>
@@ -12962,6 +13436,7 @@
<comment xml:lang="eu">JSON-LD dokumentua</comment>
<comment xml:lang="fi">JSON-LD-asiakirja</comment>
<comment xml:lang="fr">document JSON-LD</comment>
+ <comment xml:lang="ga">cáipéis JSON-LD</comment>
<comment xml:lang="he">מסמך JSON-LD</comment>
<comment xml:lang="hr">JSON-LD dokument</comment>
<comment xml:lang="hu">JSON-LD dokumentum</comment>
@@ -12974,7 +13449,7 @@
<comment xml:lang="pl">Dokument JSON-LD</comment>
<comment xml:lang="pt">documento JSON-LD</comment>
<comment xml:lang="pt_BR">Documento JSON-LD</comment>
- <comment xml:lang="ru">документ JSON-LD</comment>
+ <comment xml:lang="ru">Документ JSON-LD</comment>
<comment xml:lang="sk">Dokument JSON-LD</comment>
<comment xml:lang="sr">ЈСОН-ЛД документ</comment>
<comment xml:lang="sv">JSON-LD-dokument</comment>
@@ -12991,18 +13466,28 @@
<mime-type type="application/x-ipynb+json">
<comment>Jupyter Notebook</comment>
<comment xml:lang="ca">llibreta de notes de Jupyter</comment>
+ <comment xml:lang="cs">sešit Jupyter</comment>
<comment xml:lang="da">Jupyter Notebook</comment>
<comment xml:lang="de">Jupyter-Dokument</comment>
+ <comment xml:lang="en_GB">Jupyter Notebook</comment>
<comment xml:lang="es">libreta de Jupyter</comment>
+ <comment xml:lang="eu">Jupyter Notebook</comment>
<comment xml:lang="fr">carnet de notes Jupyter</comment>
+ <comment xml:lang="ga">Leabhar nótaí Jupyter</comment>
<comment xml:lang="he">מחברת Jupyter</comment>
+ <comment xml:lang="hr">Jupyter bilježnica</comment>
<comment xml:lang="hu">Jupyter notesz</comment>
+ <comment xml:lang="id">Notebook Jupyter</comment>
+ <comment xml:lang="it">Notebook Jupyter</comment>
<comment xml:lang="kk">Jupyter Notebook</comment>
<comment xml:lang="ko">Jupyter 노트북</comment>
<comment xml:lang="pl">Notatnik Jupyter</comment>
<comment xml:lang="pt_BR">Bloco de Notas Jupyter</comment>
<comment xml:lang="ru">Jupyter Notebook</comment>
<comment xml:lang="sk">Zošit programu Jupyter</comment>
+ <comment xml:lang="sr">Џупитер бележница</comment>
+ <comment xml:lang="sv">Jupyter Notebook-dokument</comment>
+ <comment xml:lang="tr">Jupyter Notebook</comment>
<comment xml:lang="uk">записник Jupyter</comment>
<comment xml:lang="zh_CN">Jupyter 笔记本</comment>
<comment xml:lang="zh_TW">Jupyter 記事本</comment>
@@ -13017,6 +13502,7 @@
</mime-type>
<mime-type type="application/vnd.coffeescript">
<comment>CoffeeScript document</comment>
+ <comment xml:lang="ast">Documentu de CoffeScript</comment>
<comment xml:lang="ca">document CoffeeScript</comment>
<comment xml:lang="cs">dokument CoffeeScript</comment>
<comment xml:lang="da">CoffeeScript-dokument</comment>
@@ -13027,6 +13513,7 @@
<comment xml:lang="eu">CoffeeScript dokumentua</comment>
<comment xml:lang="fi">CoffeeScript-asiakirja</comment>
<comment xml:lang="fr">document CoffeeScript</comment>
+ <comment xml:lang="ga">cáipéis CoffeeScript</comment>
<comment xml:lang="he">מסמך CoffeeScript</comment>
<comment xml:lang="hr">CoffeeScript dokument</comment>
<comment xml:lang="hu">CoffeeScript dokumentum</comment>
@@ -13039,7 +13526,7 @@
<comment xml:lang="pl">Dokument CoffeeScript</comment>
<comment xml:lang="pt">documento CoffeeScript</comment>
<comment xml:lang="pt_BR">Documento CoffeeScript</comment>
- <comment xml:lang="ru">документ CoffeeScript</comment>
+ <comment xml:lang="ru">Документ CoffeeScript</comment>
<comment xml:lang="sk">Dokument CoffeeScript</comment>
<comment xml:lang="sr">Кофи скрипт документ</comment>
<comment xml:lang="sv">CoffeeScript-dokument</comment>
@@ -13090,7 +13577,7 @@
<comment xml:lang="pt">projecto JBuilder</comment>
<comment xml:lang="pt_BR">Projeto do JBuilder</comment>
<comment xml:lang="ro">Proiect JBuilder</comment>
- <comment xml:lang="ru">проект JBuilder</comment>
+ <comment xml:lang="ru">Проект JBuilder</comment>
<comment xml:lang="sk">Projekt JBuilder</comment>
<comment xml:lang="sl">Datoteka projekta JBuilder</comment>
<comment xml:lang="sq">Projekt JBuilder</comment>
@@ -13144,7 +13631,7 @@
<comment xml:lang="pt">desenho Karbon14</comment>
<comment xml:lang="pt_BR">Desenho do Karbon14</comment>
<comment xml:lang="ro">Desen Karbon14</comment>
- <comment xml:lang="ru">изображение Karbon14</comment>
+ <comment xml:lang="ru">Рисунок Karbon14</comment>
<comment xml:lang="sk">Kresba Karbon14</comment>
<comment xml:lang="sl">Datoteka risbe Karbon14</comment>
<comment xml:lang="sq">Vizatim Karbon14</comment>
@@ -13209,7 +13696,7 @@
<comment xml:lang="pt">gráfico KChart</comment>
<comment xml:lang="pt_BR">Gráfico do KChart</comment>
<comment xml:lang="ro">Diagramă KChart</comment>
- <comment xml:lang="ru">диаграмма KChart</comment>
+ <comment xml:lang="ru">Диаграмма KChart</comment>
<comment xml:lang="sk">Graf KChart</comment>
<comment xml:lang="sl">Datoteka grafikona KChart</comment>
<comment xml:lang="sq">Grafik KChart</comment>
@@ -13269,7 +13756,7 @@
<comment xml:lang="pt">definições Kexi para ligação de servidor de base de dados</comment>
<comment xml:lang="pt_BR">Configurações do Kexi para conexão a servidor de banco de dados</comment>
<comment xml:lang="ro">Configurări Kexi pentru conexiunea la serverul de baze de date</comment>
- <comment xml:lang="ru">параметры Kexi для подключения к серверу БД</comment>
+ <comment xml:lang="ru">Параметры Kexi для подключения к серверу БД</comment>
<comment xml:lang="sk">Nastavenia Kexi pre pripojenie k databázovému serveru</comment>
<comment xml:lang="sl">Strežniška povezava do nastavitvene datoteke Kexi.</comment>
<comment xml:lang="sr">подешавања Кексија за везу са сервером базе података</comment>
@@ -13298,7 +13785,7 @@
<comment xml:lang="ga">aicearra go tionscadal Kexi ar fhreastalaí bunachair sonraí</comment>
<comment xml:lang="gl">acceso directo a proxecto Kexi no servidor de bases de datos</comment>
<comment xml:lang="he">קיצור דרך לפרוירט Kexi בשרת נתונים</comment>
- <comment xml:lang="hr">prečac za Kexi projekt na poslužitelju baze podataka</comment>
+ <comment xml:lang="hr">Prečac do Kexi projekta na poslužitelju baze podataka</comment>
<comment xml:lang="hu">indítóikon adatbázis-kiszolgálón lévő Kexi projektre</comment>
<comment xml:lang="ia">Ligamine a projecto Kexi in servitor de base de datos</comment>
<comment xml:lang="id">pintasan ke projek Kexi pada server basis data</comment>
@@ -13314,7 +13801,7 @@
<comment xml:lang="pt">atalho para projeto Kexi em servidor de base de dados</comment>
<comment xml:lang="pt_BR">Atalho para projeto Kexi no servidor de banco de dados</comment>
<comment xml:lang="ro">scurtătură către un proiect Kexi pe un server de baze de date</comment>
- <comment xml:lang="ru">ссылка на проект Kexi на сервере БД</comment>
+ <comment xml:lang="ru">Ссылка на проект Kexi на сервере БД</comment>
<comment xml:lang="sk">Zástupca projektu Kexi na databázovom serveri</comment>
<comment xml:lang="sl">bližnjica do Kexi projekta na podatkovnem strežniku</comment>
<comment xml:lang="sr">пречица до пројекта Кексија на серверу базе података</comment>
@@ -13355,11 +13842,11 @@
<comment xml:lang="lv">Kexi datubāzes datnes balstīts projekts</comment>
<comment xml:lang="nl">Kexi database bestandgebaseerd project</comment>
<comment xml:lang="oc">projècte de banca de donadas Kexi en mòde fichièr</comment>
- <comment xml:lang="pl">Projekt bazy danych Kexi oparty na pliku</comment>
+ <comment xml:lang="pl">Projekt bazy danych Kexi na podstawie plików</comment>
<comment xml:lang="pt">projeto Kexi em base de dados baseada em ficheiros</comment>
<comment xml:lang="pt_BR">Projeto de banco de dados baseado em arquivo do Kexi</comment>
<comment xml:lang="ro">Proiect bazat pe fișiere al bazei de date Kexi</comment>
- <comment xml:lang="ru">файловый проект базы данных Kexi</comment>
+ <comment xml:lang="ru">Файловый проект базы данных Kexi</comment>
<comment xml:lang="sk">Projekt databázy Kexi s úložiskom typu súbor</comment>
<comment xml:lang="sl">Datoteka projekta podatkovne zbirke Kexi</comment>
<comment xml:lang="sr">пројекат Кексијеве базе података на основу датотеке</comment>
@@ -13401,11 +13888,11 @@
<comment xml:lang="lv">Kexi datubāzes datnes balstīts projekts</comment>
<comment xml:lang="nl">Kexi database bestandgebaseerd project</comment>
<comment xml:lang="oc">projècte de banca de donadas Kexi en mòde fichièr</comment>
- <comment xml:lang="pl">Projekt bazy danych Kexi oparty na pliku</comment>
+ <comment xml:lang="pl">Projekt bazy danych Kexi na podstawie plików</comment>
<comment xml:lang="pt">projeto Kexi em base de dados baseada em ficheiros</comment>
<comment xml:lang="pt_BR">Projeto de banco de dados baseado em arquivo do Kexi</comment>
<comment xml:lang="ro">Proiect bazat pe fișiere al bazei de date Kexi</comment>
- <comment xml:lang="ru">файловый проект базы данных Kexi</comment>
+ <comment xml:lang="ru">Файловый проект базы данных Kexi</comment>
<comment xml:lang="sk">Projekt databázy Kexi s úložiskom typu súbor</comment>
<comment xml:lang="sl">Datoteka projekta podatkovne zbirke Kexi</comment>
<comment xml:lang="sr">пројекат Кексијеве базе података на основу датотеке</comment>
@@ -13458,7 +13945,7 @@
<comment xml:lang="pt">fórmula KFormula</comment>
<comment xml:lang="pt_BR">Fórmula do KFormula</comment>
<comment xml:lang="ro">Formulă KFormula</comment>
- <comment xml:lang="ru">формула KFormula</comment>
+ <comment xml:lang="ru">Формула KFormula</comment>
<comment xml:lang="sk">Vzorec KFormula</comment>
<comment xml:lang="sl">Datoteka formule KFormula</comment>
<comment xml:lang="sq">Formulë KFormula</comment>
@@ -13523,7 +14010,7 @@
<comment xml:lang="pt">desenho KIllustrator</comment>
<comment xml:lang="pt_BR">Desenho do KIllustrator</comment>
<comment xml:lang="ro">Desen KIllustrator</comment>
- <comment xml:lang="ru">изображение KIllustrator</comment>
+ <comment xml:lang="ru">Рисунок KIllustrator</comment>
<comment xml:lang="sk">Kresba KIllustrator</comment>
<comment xml:lang="sl">Datoteka risbe KIllustrator</comment>
<comment xml:lang="sq">Vizatim KIllustrator</comment>
@@ -13583,11 +14070,11 @@
<comment xml:lang="pt">gráfico de fluxo Kivio</comment>
<comment xml:lang="pt_BR">Fluxograma do Kivio</comment>
<comment xml:lang="ro">Diagramă Kivio</comment>
- <comment xml:lang="ru">диаграмма Kivio</comment>
+ <comment xml:lang="ru">Диаграмма Kivio</comment>
<comment xml:lang="sk">Vývojový diagram Kivio</comment>
<comment xml:lang="sl">Datoteka grafikona Kivio</comment>
<comment xml:lang="sq">Diagramë fluksi Kivio</comment>
- <comment xml:lang="sr">Кливиов дијаграм протока</comment>
+ <comment xml:lang="sr">Кивиов дијаграм тока</comment>
<comment xml:lang="sv">Kivio-flödesschema</comment>
<comment xml:lang="tr">Kivio akış şeması</comment>
<comment xml:lang="uk">блок-схема Kivio</comment>
@@ -13648,7 +14135,7 @@
<comment xml:lang="pt">desenho Kontour</comment>
<comment xml:lang="pt_BR">Desenho do Kontour</comment>
<comment xml:lang="ro">Desen Kontour</comment>
- <comment xml:lang="ru">изображение Kontour</comment>
+ <comment xml:lang="ru">Рисунок Kontour</comment>
<comment xml:lang="sk">Kresba Kontour</comment>
<comment xml:lang="sl">Datoteka risbe Kontour</comment>
<comment xml:lang="sq">Vizatim Kontour</comment>
@@ -13713,7 +14200,7 @@
<comment xml:lang="pt">cenário KPovModeler</comment>
<comment xml:lang="pt_BR">Cena do KPovModeler</comment>
<comment xml:lang="ro">Scenă KPovModeler</comment>
- <comment xml:lang="ru">сцена KPovModeler</comment>
+ <comment xml:lang="ru">Сцена KPovModeler</comment>
<comment xml:lang="sk">Scéna KPovModeler</comment>
<comment xml:lang="sl">Datoteka scene KPovModeler</comment>
<comment xml:lang="sq">Skenë KPovModeler</comment>
@@ -13766,7 +14253,7 @@
<comment xml:lang="pt">apresentação KPresenter</comment>
<comment xml:lang="pt_BR">Apresentação do KPresenter</comment>
<comment xml:lang="ro">Prezentare KPresenter</comment>
- <comment xml:lang="ru">презентация KPresenter</comment>
+ <comment xml:lang="ru">Презентация KPresenter</comment>
<comment xml:lang="sk">Prezentácia KPresenter</comment>
<comment xml:lang="sl">Predstavitev KPresenter</comment>
<comment xml:lang="sq">Prezantim i KPresenter</comment>
@@ -13796,6 +14283,7 @@
<mime-type type="application/x-krita">
<comment>Krita document</comment>
<comment xml:lang="ar">مستند Krita</comment>
+ <comment xml:lang="ast">Documentu de Krita</comment>
<comment xml:lang="be@latin">Dakument Krita</comment>
<comment xml:lang="bg">Документ — Krita</comment>
<comment xml:lang="ca">document Krita</comment>
@@ -13832,7 +14320,7 @@
<comment xml:lang="pt">documento Krita</comment>
<comment xml:lang="pt_BR">Documento do Krita</comment>
<comment xml:lang="ro">Document Krita</comment>
- <comment xml:lang="ru">документ Krita</comment>
+ <comment xml:lang="ru">Документ Krita</comment>
<comment xml:lang="sk">Dokument Krita</comment>
<comment xml:lang="sl">Dokument Krita</comment>
<comment xml:lang="sq">Dokument Krita</comment>
@@ -13897,7 +14385,7 @@
<comment xml:lang="pt">folha de cálculo KSpread</comment>
<comment xml:lang="pt_BR">Planilha do KSpread</comment>
<comment xml:lang="ro">Foaie de calcul KSpread</comment>
- <comment xml:lang="ru">электронная таблица KSpread</comment>
+ <comment xml:lang="ru">Электронная таблица KSpread</comment>
<comment xml:lang="sk">Zošit KSpread</comment>
<comment xml:lang="sl">Preglednica KSpread</comment>
<comment xml:lang="sq">Fletë llogaritjesh KSpread</comment>
@@ -13906,7 +14394,7 @@
<comment xml:lang="tr">KSpread çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця KSpread</comment>
<comment xml:lang="vi">Bảng tính KSpread</comment>
- <comment xml:lang="zh_CN">KSpread 工作簿</comment>
+ <comment xml:lang="zh_CN">KSpread 电子表格</comment>
<comment xml:lang="zh_TW">KSpread 試算表</comment>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="60">
@@ -13962,7 +14450,7 @@
<comment xml:lang="pt">folha de cálculo KSpread (encriptada)</comment>
<comment xml:lang="pt_BR">Planilha do KSpread (criptografada)</comment>
<comment xml:lang="ro">Foaie de calcul KSpread (criptat)</comment>
- <comment xml:lang="ru">электронная таблица KSpread (зашифрованная)</comment>
+ <comment xml:lang="ru">Электронная таблица KSpread (зашифрованная)</comment>
<comment xml:lang="sk">Zošit KSpread (šifrovaný)</comment>
<comment xml:lang="sl">Preglednica KSpread (šifrirana)</comment>
<comment xml:lang="sq">Fletë llogaritjesh KSpread (e kriptuar)</comment>
@@ -13971,7 +14459,7 @@
<comment xml:lang="tr">KSpread çalışma sayfası (şifreli)</comment>
<comment xml:lang="uk">ел. таблиця KSpread (зашифрована)</comment>
<comment xml:lang="vi">Bảng tính KSpread (đã mật mã)</comment>
- <comment xml:lang="zh_CN">KSpread 加密工作簿</comment>
+ <comment xml:lang="zh_CN">KSpread 电子表格(加密)</comment>
<comment xml:lang="zh_TW">KSpread 試算表 (已加密)</comment>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="50">
@@ -13994,7 +14482,7 @@
<comment xml:lang="fi">KSysV init -paketti</comment>
<comment xml:lang="fo">KSysV init pakki</comment>
<comment xml:lang="fr">paquet d'initialisation KSysV</comment>
- <comment xml:lang="ga">pacáiste thosú KSysV</comment>
+ <comment xml:lang="ga">pacáiste túsaithe KSysV</comment>
<comment xml:lang="gl">paquete de KsysV init</comment>
<comment xml:lang="he">חבילת KSysV init</comment>
<comment xml:lang="hr">KSysV init paket</comment>
@@ -14015,7 +14503,7 @@
<comment xml:lang="pt">pacote inicial KSysV</comment>
<comment xml:lang="pt_BR">Pacote init do KSysV</comment>
<comment xml:lang="ro">Pachet KSysV init</comment>
- <comment xml:lang="ru">пакет инициализации KSysV</comment>
+ <comment xml:lang="ru">Пакет инициализации KSysV</comment>
<comment xml:lang="sk">Balíček KSysV init</comment>
<comment xml:lang="sl">Datoteka paketa KSysV init</comment>
<comment xml:lang="sq">Paketë init KSysV</comment>
@@ -14036,6 +14524,7 @@
<mime-type type="application/x-kugar">
<comment>Kugar document</comment>
<comment xml:lang="ar">مستند Kugar</comment>
+ <comment xml:lang="ast">Documentu de Kugar</comment>
<comment xml:lang="be@latin">Dakument Kugar</comment>
<comment xml:lang="bg">Документ — Kugar</comment>
<comment xml:lang="ca">document Kugar</comment>
@@ -14072,7 +14561,7 @@
<comment xml:lang="pt">documento Kugar</comment>
<comment xml:lang="pt_BR">Documento do Kugar</comment>
<comment xml:lang="ro">Document Kugar</comment>
- <comment xml:lang="ru">документ Kugar</comment>
+ <comment xml:lang="ru">Документ Kugar</comment>
<comment xml:lang="sk">Dokument Kugar</comment>
<comment xml:lang="sl">Dokument Kugar</comment>
<comment xml:lang="sq">Dokument Kugar</comment>
@@ -14089,6 +14578,7 @@
<mime-type type="application/x-kword">
<comment>KWord document</comment>
<comment xml:lang="ar">مستند KWord</comment>
+ <comment xml:lang="ast">Documentu de Kword</comment>
<comment xml:lang="be@latin">Dakument KWord</comment>
<comment xml:lang="bg">Документ — KWord</comment>
<comment xml:lang="ca">document KWord</comment>
@@ -14126,7 +14616,7 @@
<comment xml:lang="pt">documento KWord</comment>
<comment xml:lang="pt_BR">Documento do KWord</comment>
<comment xml:lang="ro">Document KWord</comment>
- <comment xml:lang="ru">документ KWord</comment>
+ <comment xml:lang="ru">Документ KWord</comment>
<comment xml:lang="sk">Dokument KWord</comment>
<comment xml:lang="sl">Dokument KWord</comment>
<comment xml:lang="sq">Dokument KWord</comment>
@@ -14156,6 +14646,7 @@
<mime-type type="application/x-kword-crypt">
<comment>KWord document (encrypted)</comment>
<comment xml:lang="ar">مستند KWord (مشفر)</comment>
+ <comment xml:lang="ast">Documentu de Kword (cifráu)</comment>
<comment xml:lang="be@latin">Dakument KWord (zašyfravany)</comment>
<comment xml:lang="bg">Документ — KWord, шифриран</comment>
<comment xml:lang="ca">document KWord (xifrat)</comment>
@@ -14192,7 +14683,7 @@
<comment xml:lang="pt">documento KWord (encriptado)</comment>
<comment xml:lang="pt_BR">Documento do KWord (criptografado)</comment>
<comment xml:lang="ro">Document KWord (criptat)</comment>
- <comment xml:lang="ru">документ KWord (зашифрованный)</comment>
+ <comment xml:lang="ru">Документ KWord (зашифрованный)</comment>
<comment xml:lang="sk">Dokument KWord (šifrovaný)</comment>
<comment xml:lang="sl">Dokument KWord (šifriran)</comment>
<comment xml:lang="sq">Dokument KWord (i kriptuar)</comment>
@@ -14201,7 +14692,7 @@
<comment xml:lang="tr">KWord belgesi (şifreli)</comment>
<comment xml:lang="uk">документ KWord (зашифрований)</comment>
<comment xml:lang="vi">Tài liệu KWord (đã mật mã)</comment>
- <comment xml:lang="zh_CN">KWord 加密文档</comment>
+ <comment xml:lang="zh_CN">KWord 文档(加密)</comment>
<comment xml:lang="zh_TW">KWord 文件 (已加密)</comment>
<generic-icon name="x-office-document"/>
<magic priority="50">
@@ -14249,7 +14740,7 @@
<comment xml:lang="pt">arquivo LHA</comment>
<comment xml:lang="pt_BR">Pacote LHA</comment>
<comment xml:lang="ro">Arhivă LHA</comment>
- <comment xml:lang="ru">архив LHA</comment>
+ <comment xml:lang="ru">Архив LHA</comment>
<comment xml:lang="sk">Archív LHA</comment>
<comment xml:lang="sl">Datoteka arhiva LHA</comment>
<comment xml:lang="sq">Arkiv LHA</comment>
@@ -14318,7 +14809,7 @@
<comment xml:lang="pt">arquivo LHZ</comment>
<comment xml:lang="pt_BR">Pacote LHZ</comment>
<comment xml:lang="ro">Arhivă LHZ</comment>
- <comment xml:lang="ru">архив LHZ</comment>
+ <comment xml:lang="ru">Архив LHZ</comment>
<comment xml:lang="sk">Archív LHZ</comment>
<comment xml:lang="sl">Datoteka arhiva LHZ</comment>
<comment xml:lang="sq">Arkiv LHZ</comment>
@@ -14332,7 +14823,7 @@
<generic-icon name="package-x-generic"/>
<glob pattern="*.lhz"/>
</mime-type>
- <mime-type type="text/vnd.trolltech.linguist">
+ <mime-type type="text/vnd.qt.linguist">
<comment>message catalog</comment>
<comment xml:lang="ar">كتالوج الرسالة</comment>
<comment xml:lang="be@latin">kataloh paviedamleńniaŭ</comment>
@@ -14352,7 +14843,7 @@
<comment xml:lang="ga">catalóg theachtaireachtaí</comment>
<comment xml:lang="gl">catálogo de mensaxes</comment>
<comment xml:lang="he">קטלוג הודעות</comment>
- <comment xml:lang="hr">katalog poruka</comment>
+ <comment xml:lang="hr">Katalog poruka</comment>
<comment xml:lang="hu">üzenetkatalógus</comment>
<comment xml:lang="ia">Catalogo de messages</comment>
<comment xml:lang="id">katalog pesan</comment>
@@ -14371,7 +14862,7 @@
<comment xml:lang="pt">catálogo de mensagens</comment>
<comment xml:lang="pt_BR">Catálogo de mensagens</comment>
<comment xml:lang="ro">catalog de mesaje</comment>
- <comment xml:lang="ru">каталог сообщений</comment>
+ <comment xml:lang="ru">Каталог сообщений</comment>
<comment xml:lang="sk">Katalóg správ</comment>
<comment xml:lang="sl">katalogov sporočil</comment>
<comment xml:lang="sq">Katallog mesazhesh</comment>
@@ -14388,10 +14879,12 @@
</magic>
<glob pattern="*.ts"/>
<alias type="application/x-linguist"/>
+ <alias type="text/vnd.trolltech.linguist"/>
</mime-type>
<mime-type type="application/x-lyx">
<comment>LyX document</comment>
<comment xml:lang="ar">مستند LyX</comment>
+ <comment xml:lang="ast">Documentu de Lyx</comment>
<comment xml:lang="be@latin">Dakument LyX</comment>
<comment xml:lang="bg">Документ — LyX</comment>
<comment xml:lang="ca">document LyX</comment>
@@ -14428,7 +14921,7 @@
<comment xml:lang="pt">documento LyX</comment>
<comment xml:lang="pt_BR">Documento LyX</comment>
<comment xml:lang="ro">Document LyX</comment>
- <comment xml:lang="ru">документ LyX</comment>
+ <comment xml:lang="ru">Документ LyX</comment>
<comment xml:lang="sk">Dokument LyX</comment>
<comment xml:lang="sl">Dokument LyX</comment>
<comment xml:lang="sq">Dokument LyX</comment>
@@ -14459,6 +14952,7 @@
<comment xml:lang="eu">LZ4 artxiboa</comment>
<comment xml:lang="fi">LZ4-arkisto</comment>
<comment xml:lang="fr">archive LZ4</comment>
+ <comment xml:lang="ga">Cartlann LZ4</comment>
<comment xml:lang="gl">Arquivo LZ4</comment>
<comment xml:lang="he">ארכיון LZ4</comment>
<comment xml:lang="hr">LZ4 arhiva</comment>
@@ -14472,7 +14966,7 @@
<comment xml:lang="pl">Archiwum LZ4</comment>
<comment xml:lang="pt">arquivo LZ4</comment>
<comment xml:lang="pt_BR">Pacote LZ4</comment>
- <comment xml:lang="ru">архив LZ4</comment>
+ <comment xml:lang="ru">Архив LZ4</comment>
<comment xml:lang="sk">Archív LZ4</comment>
<comment xml:lang="sl">Datoteka arhiva LZ4</comment>
<comment xml:lang="sr">ЛЗ4 архива</comment>
@@ -14491,21 +14985,31 @@
<mime-type type="application/x-lz4-compressed-tar">
<comment>Tar archive (LZ4-compressed)</comment>
<comment xml:lang="ca">arxiu tar (amb compressió LZ4)</comment>
+ <comment xml:lang="cs">archiv Tar (komprimace LZ4)</comment>
<comment xml:lang="da">Tar-arkiv (LZ4-komprimeret)</comment>
<comment xml:lang="de">Tar-Archiv (LZ4-komprimiert)</comment>
+ <comment xml:lang="en_GB">Tar archive (LZ4-compressed)</comment>
<comment xml:lang="es">archivador Tar (comprimido con LZ4)</comment>
+ <comment xml:lang="eu">Tar artxiboa (LZ4-rekin konprimatua)</comment>
<comment xml:lang="fi">Tar-arkisto (LZ4-pakattu)</comment>
<comment xml:lang="fr">archive tar (compression LZ4)</comment>
+ <comment xml:lang="ga">cartlann Tar (comhbhrúite le LZ4)</comment>
<comment xml:lang="he">ארכיון Tar (מכווץ ע״י LZ4)</comment>
+ <comment xml:lang="hr">Tar arhiva (LZ4 sažeto)</comment>
<comment xml:lang="hu">Tar archívum (LZ4-el tömörítve)</comment>
+ <comment xml:lang="id">arsip tar (terkompresi LZ4)</comment>
+ <comment xml:lang="it">Archivio tar (compresso con LZ4)</comment>
<comment xml:lang="kk">Tar архиві (LZ4-пен сығылған)</comment>
<comment xml:lang="ko">Tar 묶음 파일(LZ4 압축)</comment>
<comment xml:lang="pl">Archiwum tar (kompresja LZ4)</comment>
<comment xml:lang="pt_BR">Arquvio Tar (compactado com LZ4)</comment>
- <comment xml:lang="ru">архив TAR (сжатый LZ4)</comment>
+ <comment xml:lang="ru">Архив TAR (сжатый lz4)</comment>
<comment xml:lang="sk">Archív tar (komprimovaný pomocou LZ4)</comment>
+ <comment xml:lang="sr">Тар архива (запакована ЛЗ4-ом)</comment>
+ <comment xml:lang="sv">Tar-arkiv (LZ4-komprimerat)</comment>
+ <comment xml:lang="tr">Tar arşivi (LZ4 ile sıkıştırılmış)</comment>
<comment xml:lang="uk">архів tar (стиснений LZ4)</comment>
- <comment xml:lang="zh_CN">Tar 归档文件 (LZ4 压缩)</comment>
+ <comment xml:lang="zh_CN">Tar 归档文件(LZ4 压缩)</comment>
<comment xml:lang="zh_TW">Tar 封存檔 (LZ4 格式壓縮)</comment>
<generic-icon name="package-x-generic"/>
<sub-class-of type="application/x-lz4"/>
@@ -14546,7 +15050,7 @@
<comment xml:lang="pt">arquivo LZip</comment>
<comment xml:lang="pt_BR">Pacote Lzip</comment>
<comment xml:lang="ro">Arhivă Lzip</comment>
- <comment xml:lang="ru">архив LZIP</comment>
+ <comment xml:lang="ru">Архив LZIP</comment>
<comment xml:lang="sk">Archív Lzip</comment>
<comment xml:lang="sl">Datoteka arhiva Lzip</comment>
<comment xml:lang="sr">Лзип архива</comment>
@@ -14564,21 +15068,31 @@
<mime-type type="application/x-lzip-compressed-tar">
<comment>Tar archive (lzip-compressed)</comment>
<comment xml:lang="ca">arxiu tar (amb compressió lzip)</comment>
+ <comment xml:lang="cs">archiv Tar (komprimace lzip)</comment>
<comment xml:lang="da">Tar-arkiv (lzip-komprimeret)</comment>
<comment xml:lang="de">Tar-Archiv (lzip-komprimiert)</comment>
+ <comment xml:lang="en_GB">Tar archive (lzip-compressed)</comment>
<comment xml:lang="es">archivador Tar (comprimido con lzip)</comment>
+ <comment xml:lang="eu">Tar artxiboa (lzip-rekin konprimatua)</comment>
<comment xml:lang="fi">Tar-arkisto (lzip-pakattu)</comment>
<comment xml:lang="fr">archive tar (compressée lzip)</comment>
+ <comment xml:lang="ga">cartlann Tar (comhbhrúite le lzip)</comment>
<comment xml:lang="he">ארכיון Tar (מכווץ ע״י lzip)</comment>
+ <comment xml:lang="hr">Tar arhiva (lzip sažeto)</comment>
<comment xml:lang="hu">Tar archívum (lzippel tömörítve)</comment>
+ <comment xml:lang="id">arsip tar (terkompresi lzip)</comment>
+ <comment xml:lang="it">Archivio tar (compresso con lzip)</comment>
<comment xml:lang="kk">Tar архиві (lzip-пен сығылған)</comment>
<comment xml:lang="ko">TAR 묶음 파일(LZIP 압축)</comment>
<comment xml:lang="pl">Archiwum tar (kompresja lzip)</comment>
<comment xml:lang="pt_BR">Arquivo Tar (compactado com lzip)</comment>
- <comment xml:lang="ru">архив TAR (сжатый lzip)</comment>
+ <comment xml:lang="ru">Архив TAR (сжатый lzip)</comment>
<comment xml:lang="sk">Archív tar (komprimovaný pomocou lzip)</comment>
+ <comment xml:lang="sr">Тар архива (запакована лзипом)</comment>
+ <comment xml:lang="sv">Tar-arkiv (lzip-komprimerat)</comment>
+ <comment xml:lang="tr">Tar arşivi (lzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">архів tar (стиснений lzip)</comment>
- <comment xml:lang="zh_CN">Tar 归档文件 (lzip 压缩)</comment>
+ <comment xml:lang="zh_CN">Tar 归档文件(lzip 压缩)</comment>
<comment xml:lang="zh_TW">Tar 封存檔 (lzip 格式壓縮)</comment>
<generic-icon name="package-x-generic"/>
<sub-class-of type="application/x-lzip"/>
@@ -14586,6 +15100,32 @@
</mime-type>
<mime-type type="application/x-lzpdf">
<comment>PDF document (lzip-compressed)</comment>
+ <comment xml:lang="ast">Documentu PDF (comprimíu en lzip)</comment>
+ <comment xml:lang="ca">document PDF (amb compressió lzip)</comment>
+ <comment xml:lang="cs">dokument PDF (komprimace lzip)</comment>
+ <comment xml:lang="de">PDF-Dokument (lzip-komprimiert)</comment>
+ <comment xml:lang="en_GB">PDF document (lzip-compressed)</comment>
+ <comment xml:lang="es">documento PDF (comprimido con lzip)</comment>
+ <comment xml:lang="eu">PDF dokumentua (lzip-rekin konprimitua)</comment>
+ <comment xml:lang="fi">PDF-asiakirja (lzip-pakattu)</comment>
+ <comment xml:lang="fr">document PDF (compressé lzip)</comment>
+ <comment xml:lang="ga">cáipéis PDF (comhbhrúite le lzip)</comment>
+ <comment xml:lang="hr">PDF dokument (lzip sažeto)</comment>
+ <comment xml:lang="hu">PDF dokumentum (lzip-tömörítésű)</comment>
+ <comment xml:lang="id">dokumen PDF (termkompresi lzip)</comment>
+ <comment xml:lang="it">Documento PDF (compresso con lzip)</comment>
+ <comment xml:lang="kk">PDF құжаты (lzip-пен сығылған)</comment>
+ <comment xml:lang="ko">PDF 문서(LZIP 압축)</comment>
+ <comment xml:lang="pl">Dokument PDF (kompresja lzip)</comment>
+ <comment xml:lang="pt_BR">Documento PDF (compactado com lzip)</comment>
+ <comment xml:lang="ru">Документ PDF (сжатый lzip)</comment>
+ <comment xml:lang="sk">Dokument PDF (komprimovaný pomocou lzip)</comment>
+ <comment xml:lang="sr">ПДФ документ (запакован лзип-ом)</comment>
+ <comment xml:lang="sv">PDF-dokument (lzip-komprimerat)</comment>
+ <comment xml:lang="tr">PDF belgesi (lzip ile sıkıştırılmış)</comment>
+ <comment xml:lang="uk">документ PDF (стиснений lzip)</comment>
+ <comment xml:lang="zh_CN">PDF 文档(lzip 压缩)</comment>
+ <comment xml:lang="zh_TW">PDF 文件 (lzip 格式壓縮)</comment>
<sub-class-of type="application/x-lzip"/>
<generic-icon name="x-office-document"/>
<glob pattern="*.pdf.lz"/>
@@ -14628,7 +15168,7 @@
<comment xml:lang="pt">arquivo LZMA</comment>
<comment xml:lang="pt_BR">Pacote LZMA</comment>
<comment xml:lang="ro">Arhivă LZMA</comment>
- <comment xml:lang="ru">архив LZMA</comment>
+ <comment xml:lang="ru">Архив LZMA</comment>
<comment xml:lang="sk">Archív LZMA</comment>
<comment xml:lang="sl">Datoteka arhiva LZMA</comment>
<comment xml:lang="sq">Arkiv LZMA</comment>
@@ -14650,7 +15190,7 @@
<comment xml:lang="be@latin">Archiŭ tar (LZMA-skampresavany)</comment>
<comment xml:lang="bg">Архив — tar, компресиран с LZMA</comment>
<comment xml:lang="ca">arxiu tar (amb compressió LZMA)</comment>
- <comment xml:lang="cs">archiv tar (komprimovaný pomocí LZMA)</comment>
+ <comment xml:lang="cs">archiv Tar (komprimace LZMA)</comment>
<comment xml:lang="da">Tar-arkiv (LZMA-komprimeret)</comment>
<comment xml:lang="de">Tar-Archiv (LZMA-komprimiert)</comment>
<comment xml:lang="el">Αρχείο Tar (συμπιεσμένο με LZMA)</comment>
@@ -14663,7 +15203,7 @@
<comment xml:lang="ga">cartlann Tar (comhbhrúite le LZMA)</comment>
<comment xml:lang="gl">arquivo Tar (comprimido con LZMA)</comment>
<comment xml:lang="he">ארכיון Tar (מכווץ ע״י LZMA)</comment>
- <comment xml:lang="hr">Tar arhiva (komprimirana LZMA-om)</comment>
+ <comment xml:lang="hr">Tar arhiva (LZMA sažeta)</comment>
<comment xml:lang="hu">Tar archívum (LZMA-val tömörítve)</comment>
<comment xml:lang="ia">Archivo Tar (comprimite con LZMA)</comment>
<comment xml:lang="id">Arsip Tar (terkompresi LZMA)</comment>
@@ -14681,7 +15221,7 @@
<comment xml:lang="pt">arquivo Tar (compressão LZMA)</comment>
<comment xml:lang="pt_BR">Pacote Tar (compactado com LZMA)</comment>
<comment xml:lang="ro">Arhivă Tar (comprimată LZMA)</comment>
- <comment xml:lang="ru">архив TAR (сжатый LZMA)</comment>
+ <comment xml:lang="ru">Архив TAR (сжатый lzma)</comment>
<comment xml:lang="sk">Archív tar (komprimovaný pomocou LZMA)</comment>
<comment xml:lang="sl">Datoteka arhiva Tar (stisnjen z LZMA)</comment>
<comment xml:lang="sq">Arkiv tar (i kompresuar me LZMA)</comment>
@@ -14690,7 +15230,7 @@
<comment xml:lang="tr">Tar arşivi (LZMA ile sıkıştırılmış)</comment>
<comment xml:lang="uk">архів tar (стиснений LZMA)</comment>
<comment xml:lang="vi">Kho nén tar (đã nén LZMA)</comment>
- <comment xml:lang="zh_CN">Tar 归档文件 (LZMA 压缩)</comment>
+ <comment xml:lang="zh_CN">Tar 归档文件(LZMA 压缩)</comment>
<comment xml:lang="zh_TW">Tar 封存檔 (LZMA 格式壓縮)</comment>
<sub-class-of type="application/x-lzma"/>
<generic-icon name="package-x-generic"/>
@@ -14736,7 +15276,7 @@
<comment xml:lang="pt">arquivo LZO</comment>
<comment xml:lang="pt_BR">Pacote LZO</comment>
<comment xml:lang="ro">Arhivă LZO</comment>
- <comment xml:lang="ru">архив LZO</comment>
+ <comment xml:lang="ru">Архив LZO</comment>
<comment xml:lang="sk">Archív LZO</comment>
<comment xml:lang="sl">Datoteka arhiva LZO</comment>
<comment xml:lang="sq">Arkiv LZO</comment>
@@ -14764,9 +15304,9 @@
<comment xml:lang="el">Συμπιεσμένο αρχείο Qpress</comment>
<comment xml:lang="en_GB">Qpress archive</comment>
<comment xml:lang="es">archivador de Qpress</comment>
- <comment xml:lang="eu">Qpress artxiboa</comment>
<comment xml:lang="fi">Qpress-arkisto</comment>
<comment xml:lang="fr">Archive Qpress</comment>
+ <comment xml:lang="ga">cartlann Qpress</comment>
<comment xml:lang="gl">Arquivo Qpress</comment>
<comment xml:lang="he">ארכיון Qpress</comment>
<comment xml:lang="hr">Qpress arhiva</comment>
@@ -14780,7 +15320,7 @@
<comment xml:lang="pl">Archiwum Qpress</comment>
<comment xml:lang="pt">arquivo Qpress</comment>
<comment xml:lang="pt_BR">Pacote Qpress</comment>
- <comment xml:lang="ru">архив Qpress</comment>
+ <comment xml:lang="ru">Архив Qpress</comment>
<comment xml:lang="sk">Archív Qpress</comment>
<comment xml:lang="sl">Datoteka arhiva Qpress</comment>
<comment xml:lang="sr">Купрес архива</comment>
@@ -14806,6 +15346,7 @@
<comment xml:lang="eu">XAR artxiboa</comment>
<comment xml:lang="fi">XAR-arkisto</comment>
<comment xml:lang="fr">archive XAR</comment>
+ <comment xml:lang="ga">cartlann XAR</comment>
<comment xml:lang="he">ארכיון XAR</comment>
<comment xml:lang="hr">XAR arhiva</comment>
<comment xml:lang="hu">XAR archívum</comment>
@@ -14816,7 +15357,7 @@
<comment xml:lang="oc">Archiu XAR</comment>
<comment xml:lang="pl">Archiwum XAR</comment>
<comment xml:lang="pt_BR">Arquivo XAR</comment>
- <comment xml:lang="ru">архив XAR</comment>
+ <comment xml:lang="ru">Архив XAR</comment>
<comment xml:lang="sk">Archív XAR</comment>
<comment xml:lang="sr">ИксАР архива</comment>
<comment xml:lang="sv">XAR-arkiv</comment>
@@ -14843,9 +15384,9 @@
<comment xml:lang="el">Συμπιεσμένο αρχείο Zlib</comment>
<comment xml:lang="en_GB">Zlib archive</comment>
<comment xml:lang="es">archivador Zlib</comment>
- <comment xml:lang="eu">Zlib artxiboa</comment>
<comment xml:lang="fi">Zlib-arkisto</comment>
<comment xml:lang="fr">Archive Zlib</comment>
+ <comment xml:lang="ga">cartlann Zlib</comment>
<comment xml:lang="gl">Arquivo Zlib</comment>
<comment xml:lang="he">ארכיון Zlib</comment>
<comment xml:lang="hr">Zlib arhiva</comment>
@@ -14859,7 +15400,7 @@
<comment xml:lang="pl">Archiwum Zlib</comment>
<comment xml:lang="pt">arquivo Zlib</comment>
<comment xml:lang="pt_BR">Pacote Zlib</comment>
- <comment xml:lang="ru">архив Zlib</comment>
+ <comment xml:lang="ru">Архив Zlib</comment>
<comment xml:lang="sk">Archív Zlib</comment>
<comment xml:lang="sl">Datoteka arhiva Zlib</comment>
<comment xml:lang="sr">Злиб архива</comment>
@@ -14912,7 +15453,7 @@
<comment xml:lang="pt">apresentação MagicPoint</comment>
<comment xml:lang="pt_BR">Apresentação do MagicPoint</comment>
<comment xml:lang="ro">Prezentare MagicPoint</comment>
- <comment xml:lang="ru">презентация MagicPoint</comment>
+ <comment xml:lang="ru">Презентация MagicPoint</comment>
<comment xml:lang="sk">Prezentácia MagicPoint</comment>
<comment xml:lang="sl">Predstavitev MagicPoint</comment>
<comment xml:lang="sq">Prezantim MagicPoint</comment>
@@ -14966,7 +15507,7 @@
<comment xml:lang="pt">ficheiro MacBinary de Macintosh</comment>
<comment xml:lang="pt_BR">Arquivo do Macintosh MacBinary</comment>
<comment xml:lang="ro">Fișier Macintosh MacBinary</comment>
- <comment xml:lang="ru">файл Macintosh MacBinary</comment>
+ <comment xml:lang="ru">Файл Macintosh MacBinary</comment>
<comment xml:lang="sk">Súbor pre Macintosh MacBinary</comment>
<comment xml:lang="sl">Izvedljiva dvojiška datoteka Macintosh MacBinary</comment>
<comment xml:lang="sq">File MacBinary Macintosh</comment>
@@ -15019,7 +15560,7 @@
<comment xml:lang="pt">fluxo Matroska</comment>
<comment xml:lang="pt_BR">Transmissão do Matroska</comment>
<comment xml:lang="ro">Flux Matroska</comment>
- <comment xml:lang="ru">поток Matroska</comment>
+ <comment xml:lang="ru">Поток Matroska</comment>
<comment xml:lang="sk">Stream Matroska</comment>
<comment xml:lang="sl">Pretočni vir Matroska</comment>
<comment xml:lang="sq">Stream Matroska</comment>
@@ -15045,6 +15586,7 @@
<mime-type type="video/x-matroska">
<comment>Matroska video</comment>
<comment xml:lang="ar">Matroska مرئي</comment>
+ <comment xml:lang="ast">Videu en Matroska</comment>
<comment xml:lang="be@latin">Videa Matroska</comment>
<comment xml:lang="bg">Видео — Matroska</comment>
<comment xml:lang="ca">vídeo Matroska</comment>
@@ -15062,7 +15604,7 @@
<comment xml:lang="ga">físeán Matroska</comment>
<comment xml:lang="gl">vídeo de Matroska</comment>
<comment xml:lang="he">וידאו Matroska</comment>
- <comment xml:lang="hr">Matroska video</comment>
+ <comment xml:lang="hr">Matroška video snimka</comment>
<comment xml:lang="hu">Matroska-videó</comment>
<comment xml:lang="ia">Video Matroska</comment>
<comment xml:lang="id">Video Matroska</comment>
@@ -15082,7 +15624,7 @@
<comment xml:lang="pt">vídeo Matroska</comment>
<comment xml:lang="pt_BR">Vídeo Matroska</comment>
<comment xml:lang="ro">Video Matroska</comment>
- <comment xml:lang="ru">видео Matroska</comment>
+ <comment xml:lang="ru">Видео Matroska</comment>
<comment xml:lang="sk">Video Matroska</comment>
<comment xml:lang="sl">Video datoteka Matroska</comment>
<comment xml:lang="sq">Video Matroska</comment>
@@ -15098,6 +15640,7 @@
</mime-type>
<mime-type type="video/x-matroska-3d">
<comment>Matroska 3D video</comment>
+ <comment xml:lang="ast">Videu en Matroska 3D</comment>
<comment xml:lang="ca">vídeo Matroska 3D</comment>
<comment xml:lang="cs">3D video Matroska</comment>
<comment xml:lang="da">Matroska 3D-video</comment>
@@ -15108,6 +15651,7 @@
<comment xml:lang="eu">Matroska 3D bideoa</comment>
<comment xml:lang="fi">Matroska 3D-video</comment>
<comment xml:lang="fr">vidéo Matroska 3D</comment>
+ <comment xml:lang="ga">físeán Matroska 3D</comment>
<comment xml:lang="gl">Video Matroska 3D</comment>
<comment xml:lang="he">סרטון תלת ממדי מסוג Matroska</comment>
<comment xml:lang="hr">Matroška 3D video snimka</comment>
@@ -15153,7 +15697,7 @@
<comment xml:lang="ga">fuaim Matroska</comment>
<comment xml:lang="gl">son de Matroska</comment>
<comment xml:lang="he">שמע Matroska</comment>
- <comment xml:lang="hr">Matroska audio</comment>
+ <comment xml:lang="hr">Matroška zvučni zapis</comment>
<comment xml:lang="hu">Matroska hang</comment>
<comment xml:lang="ia">Audio Matroska</comment>
<comment xml:lang="id">Audio Matroska</comment>
@@ -15172,7 +15716,7 @@
<comment xml:lang="pt">áudio Matroska</comment>
<comment xml:lang="pt_BR">Áudio Matroska</comment>
<comment xml:lang="ro">Audio Matroska</comment>
- <comment xml:lang="ru">аудио Matroska</comment>
+ <comment xml:lang="ru">Аудио Matroska</comment>
<comment xml:lang="sk">Zvuk Matroska</comment>
<comment xml:lang="sl">Zvočna datoteka Matroska</comment>
<comment xml:lang="sq">Audio Matroska</comment>
@@ -15189,6 +15733,7 @@
<mime-type type="video/webm">
<comment>WebM video</comment>
<comment xml:lang="ar">WebM مرئي</comment>
+ <comment xml:lang="ast">Videu en WebM</comment>
<comment xml:lang="bg">Видео — WebM</comment>
<comment xml:lang="ca">vídeo WebM</comment>
<comment xml:lang="cs">video WebM</comment>
@@ -15205,7 +15750,7 @@
<comment xml:lang="ga">físeán WebM</comment>
<comment xml:lang="gl">vídeo WebM</comment>
<comment xml:lang="he">וידאו WebM</comment>
- <comment xml:lang="hr">WebM video</comment>
+ <comment xml:lang="hr">WebM video snimka</comment>
<comment xml:lang="hu">WebM videó</comment>
<comment xml:lang="ia">Video WebM</comment>
<comment xml:lang="id">Video WebM</comment>
@@ -15221,7 +15766,7 @@
<comment xml:lang="pt">vídeo WebM</comment>
<comment xml:lang="pt_BR">Vídeo WebM</comment>
<comment xml:lang="ro">Video WebM</comment>
- <comment xml:lang="ru">видео WebM</comment>
+ <comment xml:lang="ru">Видео WebM</comment>
<comment xml:lang="sk">Video WebM</comment>
<comment xml:lang="sl">Video datoteka WebM</comment>
<comment xml:lang="sr">ВебМ видео</comment>
@@ -15261,7 +15806,7 @@
<comment xml:lang="ga">fuaim WebM</comment>
<comment xml:lang="gl">son WebM</comment>
<comment xml:lang="he">שמע WebM</comment>
- <comment xml:lang="hr">WebM audio</comment>
+ <comment xml:lang="hr">WebM zvučni zapis</comment>
<comment xml:lang="hu">WebM hang</comment>
<comment xml:lang="ia">Audio WebM</comment>
<comment xml:lang="id">Audio WebM</comment>
@@ -15277,7 +15822,7 @@
<comment xml:lang="pt">áudio WebM</comment>
<comment xml:lang="pt_BR">Áudio WebM</comment>
<comment xml:lang="ro">Audio WebM</comment>
- <comment xml:lang="ru">аудио WebM</comment>
+ <comment xml:lang="ru">Аудио WebM</comment>
<comment xml:lang="sk">Zvuk WebM</comment>
<comment xml:lang="sl">Zvočna datoteka WebM</comment>
<comment xml:lang="sr">ВебМ звук</comment>
@@ -15300,6 +15845,7 @@
<comment xml:lang="eu">MHTML web artxiboa</comment>
<comment xml:lang="fi">MHTML-kooste</comment>
<comment xml:lang="fr">archive web MHTML</comment>
+ <comment xml:lang="ga">cartlann ghréasáin MHTML</comment>
<comment xml:lang="gl">Arquivo web MHTML</comment>
<comment xml:lang="he">ארכיון רשת MHTML</comment>
<comment xml:lang="hr">MHTML web arhiva</comment>
@@ -15315,7 +15861,7 @@
<comment xml:lang="pl">Archiwum witryny MHTML</comment>
<comment xml:lang="pt">arquivo web MHTML</comment>
<comment xml:lang="pt_BR">Pacote web MHTML</comment>
- <comment xml:lang="ru">веб-архив MHTML</comment>
+ <comment xml:lang="ru">Веб-архив MHTML</comment>
<comment xml:lang="sk">Webový archív MHTML</comment>
<comment xml:lang="sl">Spletni arhiv MHTML</comment>
<comment xml:lang="sr">МХТМЛ веб архива</comment>
@@ -15333,6 +15879,7 @@
<mime-type type="application/mxf">
<comment>MXF video</comment>
<comment xml:lang="ar">MXF مرئي</comment>
+ <comment xml:lang="ast">Videu en MXF</comment>
<comment xml:lang="bg">Видео — MXF</comment>
<comment xml:lang="ca">vídeo MXF</comment>
<comment xml:lang="cs">video MXF</comment>
@@ -15349,7 +15896,7 @@
<comment xml:lang="ga">físeán MXF</comment>
<comment xml:lang="gl">vídeo MXF</comment>
<comment xml:lang="he">וידאו MXF</comment>
- <comment xml:lang="hr">MXF video</comment>
+ <comment xml:lang="hr">MXF video snimka</comment>
<comment xml:lang="hu">MXF videó</comment>
<comment xml:lang="ia">Video MXF</comment>
<comment xml:lang="id">Video MXF</comment>
@@ -15366,7 +15913,7 @@
<comment xml:lang="pt">vídeo MXF</comment>
<comment xml:lang="pt_BR">Vídeo MXF</comment>
<comment xml:lang="ro">Video MXF</comment>
- <comment xml:lang="ru">видео MXF</comment>
+ <comment xml:lang="ru">Видео MXF</comment>
<comment xml:lang="sk">Video MXF</comment>
<comment xml:lang="sl">Video datoteka MXF</comment>
<comment xml:lang="sr">МИксФ видео</comment>
@@ -15421,7 +15968,7 @@
<comment xml:lang="pt">ficheiro OCL</comment>
<comment xml:lang="pt_BR">Arquivo OCL</comment>
<comment xml:lang="ro">Fișier OCL</comment>
- <comment xml:lang="ru">файл OCL</comment>
+ <comment xml:lang="ru">Файл OCL</comment>
<comment xml:lang="sk">Súbor OCL</comment>
<comment xml:lang="sl">Datoteka OCL</comment>
<comment xml:lang="sq">File OCL</comment>
@@ -15451,6 +15998,7 @@
<comment xml:lang="eu">COBOL iturburu-kodea</comment>
<comment xml:lang="fi">COBOL-lähdekoodi</comment>
<comment xml:lang="fr">fichier source COBOL</comment>
+ <comment xml:lang="ga">cód foinseach COBOL</comment>
<comment xml:lang="gl">ficheiro fonte de COBOL</comment>
<comment xml:lang="he">קובץ מקור של COBOL</comment>
<comment xml:lang="hr">COBOL izvorna datoteka</comment>
@@ -15468,14 +16016,14 @@
<comment xml:lang="pl">Plik źródłowy COBOL</comment>
<comment xml:lang="pt">ficheiro origem COBOL</comment>
<comment xml:lang="pt_BR">Arquivo de código-fonte em COBOL</comment>
- <comment xml:lang="ru">файл исходного кода на COBOL</comment>
+ <comment xml:lang="ru">Файл исходного кода на COBOL</comment>
<comment xml:lang="sk">Zdrojový súbor COBOLu</comment>
<comment xml:lang="sl">Izvorna koda COBOL</comment>
<comment xml:lang="sr">изворна датотека КОБОЛ-а</comment>
<comment xml:lang="sv">COBOL-källkodsfil</comment>
<comment xml:lang="tr">COBOL kaynak dosyası</comment>
<comment xml:lang="uk">вихідний код мовою COBOL</comment>
- <comment xml:lang="zh_CN">COBOL 源</comment>
+ <comment xml:lang="zh_CN">COBOL 源文件</comment>
<comment xml:lang="zh_TW">COBOL 源檔</comment>
<acronym>COBOL</acronym>
<expanded-acronym>COmmon Business Oriented Language</expanded-acronym>
@@ -15496,6 +16044,7 @@
<comment xml:lang="eu">Mobipocket liburua</comment>
<comment xml:lang="fi">Mobipocket e-kirja</comment>
<comment xml:lang="fr">livre numérique Mobipocket</comment>
+ <comment xml:lang="ga">r-leabhar Mobipocket</comment>
<comment xml:lang="gl">E-book Mobipocket</comment>
<comment xml:lang="he">ספר אלקטרוני של Mobipocket</comment>
<comment xml:lang="hr">Mobipocket e-knjiga</comment>
@@ -15513,7 +16062,7 @@
<comment xml:lang="pl">E-book Mobipocket</comment>
<comment xml:lang="pt">ebook Mobipocket</comment>
<comment xml:lang="pt_BR">E-book Mobipocket</comment>
- <comment xml:lang="ru">электронная книга Mobipocket</comment>
+ <comment xml:lang="ru">Электронная книга Mobipocket</comment>
<comment xml:lang="sk">E-kniha Mobipocket</comment>
<comment xml:lang="sl">e-knjiga Mobipocket</comment>
<comment xml:lang="sr">Мобипокет ел. књига</comment>
@@ -15537,6 +16086,7 @@
<mime-type type="application/x-mif">
<comment>Adobe FrameMaker MIF document</comment>
<comment xml:lang="ar">مستند أدوبي الصانع للإطارات MIF</comment>
+ <comment xml:lang="ast">Documentu MIF d'Adobe FrameMaker</comment>
<comment xml:lang="be@latin">Dakument Adobe FrameMaker MIF</comment>
<comment xml:lang="bg">Документ — Adobe FrameMaker MIF</comment>
<comment xml:lang="ca">document MIF d'Adobe FrameMaker</comment>
@@ -15573,7 +16123,7 @@
<comment xml:lang="pt">documento Adobe FrameMaker MIF</comment>
<comment xml:lang="pt_BR">Documento MIF do Adobe FrameMaker</comment>
<comment xml:lang="ro">Document Adobe FrameMaker MIF</comment>
- <comment xml:lang="ru">документ Adobe FrameMaker MIF</comment>
+ <comment xml:lang="ru">Документ Adobe FrameMaker MIF</comment>
<comment xml:lang="sk">Dokument Adobe FrameMaker MIF</comment>
<comment xml:lang="sl">Dokument Adobe FrameMaker MIF</comment>
<comment xml:lang="sq">Dokument MIF Adobe FrameMaker</comment>
@@ -15606,7 +16156,7 @@
<comment xml:lang="ga">leabharmharcanna Mozilla</comment>
<comment xml:lang="gl">Marcadores de Mozilla</comment>
<comment xml:lang="he">סימניה של Mozilla</comment>
- <comment xml:lang="hr">Mozilla knjižne oznake</comment>
+ <comment xml:lang="hr">Mozilla zabilješke</comment>
<comment xml:lang="hu">Mozilla-könyvjelzők</comment>
<comment xml:lang="ia">Marcapaginas Mozilla</comment>
<comment xml:lang="id">Bookmark Mozilla</comment>
@@ -15625,7 +16175,7 @@
<comment xml:lang="pt">marcadores do Mozilla</comment>
<comment xml:lang="pt_BR">Favoritos do Mozilla</comment>
<comment xml:lang="ro">Semne de carte Mozilla</comment>
- <comment xml:lang="ru">закладки Mozilla</comment>
+ <comment xml:lang="ru">Закладки Mozilla</comment>
<comment xml:lang="sk">Záložky Mozilla</comment>
<comment xml:lang="sl">Datoteka zaznamkov Mozilla</comment>
<comment xml:lang="sq">Libërshënues Mozilla</comment>
@@ -15683,7 +16233,7 @@
<comment xml:lang="pt">executável DOS/Windows</comment>
<comment xml:lang="pt_BR">Executável do DOS/Windows</comment>
<comment xml:lang="ro">Executabil DOS/Windows</comment>
- <comment xml:lang="ru">исполняемый файл DOS/Windows</comment>
+ <comment xml:lang="ru">Исполняемый файл DOS/Windows</comment>
<comment xml:lang="sk">Spustiteľný súbor pre DOS/Windows</comment>
<comment xml:lang="sl">Izvedljiva datoteka DOS/Windows</comment>
<comment xml:lang="sq">I ekzekutueshëm DOS/Windows</comment>
@@ -15741,7 +16291,7 @@
<comment xml:lang="sk">Internetový odkaz</comment>
<comment xml:lang="sl">Internetna bližnjica</comment>
<comment xml:lang="sq">Shkurtim internet</comment>
- <comment xml:lang="sr">Интернет пречица</comment>
+ <comment xml:lang="sr">интернет пречица</comment>
<comment xml:lang="sv">Internetgenväg</comment>
<comment xml:lang="tr">İnternet kısayolu</comment>
<comment xml:lang="uk">інтернет-посилання</comment>
@@ -15759,6 +16309,7 @@
<mime-type type="application/x-mswrite">
<comment>WRI document</comment>
<comment xml:lang="ar">مستند WRI</comment>
+ <comment xml:lang="ast">Documentu WRI</comment>
<comment xml:lang="be@latin">Dakument WRI</comment>
<comment xml:lang="bg">Документ — WRI</comment>
<comment xml:lang="ca">document WRI</comment>
@@ -15794,7 +16345,7 @@
<comment xml:lang="pt">documento WRI</comment>
<comment xml:lang="pt_BR">Documento WRI</comment>
<comment xml:lang="ro">Document WRI</comment>
- <comment xml:lang="ru">документ WRI</comment>
+ <comment xml:lang="ru">Документ WRI</comment>
<comment xml:lang="sk">Dokument WRI</comment>
<comment xml:lang="sl">Dokument WRI</comment>
<comment xml:lang="sq">Dokument WRI</comment>
@@ -15847,7 +16398,7 @@
<comment xml:lang="oc">ROM MSX</comment>
<comment xml:lang="pl">Plik ROM konsoli MSX</comment>
<comment xml:lang="pt">ROM MSX</comment>
- <comment xml:lang="pt_BR">ROM do MSX</comment>
+ <comment xml:lang="pt_BR">ROM de MSX</comment>
<comment xml:lang="ro">ROM MSX</comment>
<comment xml:lang="ru">MSX ROM</comment>
<comment xml:lang="sk">ROM pre MSX</comment>
@@ -15900,7 +16451,7 @@
<comment xml:lang="pt">macro M4</comment>
<comment xml:lang="pt_BR">Macro M4</comment>
<comment xml:lang="ro">Macro M4</comment>
- <comment xml:lang="ru">макрос M4</comment>
+ <comment xml:lang="ru">Макрос M4</comment>
<comment xml:lang="sk">Makro M4</comment>
<comment xml:lang="sl">Makro datoteka M4</comment>
<comment xml:lang="sq">Macro M4</comment>
@@ -15952,7 +16503,7 @@
<comment xml:lang="oc">ROM Nintendo64</comment>
<comment xml:lang="pl">Plik ROM konsoli Nintendo64</comment>
<comment xml:lang="pt">ROM Nintendo64</comment>
- <comment xml:lang="pt_BR">ROM do Nintendo64</comment>
+ <comment xml:lang="pt_BR">ROM de Nintendo64</comment>
<comment xml:lang="ro">ROM Nintendo64</comment>
<comment xml:lang="ru">Nintendo64 ROM</comment>
<comment xml:lang="sk">ROM pre Nintendo64</comment>
@@ -15963,7 +16514,7 @@
<comment xml:lang="tr">Nintendo64 ROM</comment>
<comment xml:lang="uk">ППП Nintendo64</comment>
<comment xml:lang="vi">ROM Nintendo64</comment>
- <comment xml:lang="zh_CN">Nintendo64 ROM</comment>
+ <comment xml:lang="zh_CN">任天堂 64 ROM</comment>
<comment xml:lang="zh_TW">Nintendo64 ROM</comment>
<generic-icon name="application-x-executable"/>
<glob pattern="*.n64"/>
@@ -16000,7 +16551,7 @@
<comment xml:lang="ga">nasc Nautilus</comment>
<comment xml:lang="gl">ligazón de nautilus</comment>
<comment xml:lang="he">קישור של Nautilus</comment>
- <comment xml:lang="hr">Nautilus veza</comment>
+ <comment xml:lang="hr">Nautilusova poveznica</comment>
<comment xml:lang="hu">Nautilus-link</comment>
<comment xml:lang="ia">Ligamine Nautilus</comment>
<comment xml:lang="id">Taut Nautilus</comment>
@@ -16019,7 +16570,7 @@
<comment xml:lang="pt">atalho Nautilus</comment>
<comment xml:lang="pt_BR">Link do Nautilus</comment>
<comment xml:lang="ro">Legătură Nautilus</comment>
- <comment xml:lang="ru">ссылка Nautilus</comment>
+ <comment xml:lang="ru">Ссылка Nautilus</comment>
<comment xml:lang="sk">Odkaz Nautilus</comment>
<comment xml:lang="sl">Datoteka povezave Nautilus</comment>
<comment xml:lang="sq">Lidhje Nautilus</comment>
@@ -16039,25 +16590,49 @@
<mime-type type="application/x-neo-geo-pocket-rom">
<comment>Neo-Geo Pocket ROM</comment>
<comment xml:lang="ca">ROM de Neo-Geo Pocket</comment>
+ <comment xml:lang="cs">ROM pro Neo-Geo Pocket</comment>
<comment xml:lang="da">Neo-Geo Pocket ROM</comment>
<comment xml:lang="de">Neo-Geo Pocket ROM</comment>
+ <comment xml:lang="en_GB">Neo-Geo Pocket ROM</comment>
<comment xml:lang="es">ROM de Neo-Geo Pocket</comment>
+ <comment xml:lang="eu">Neo-Geo Pocket ROM</comment>
<comment xml:lang="fi">Neo-Geo Pocket -ROM</comment>
<comment xml:lang="fr">ROM Neo-Geo Pocket</comment>
+ <comment xml:lang="ga">ROM Neo-Geo Pocket</comment>
+ <comment xml:lang="hr">Neo-Geo Pocket ROM</comment>
<comment xml:lang="hu">Neo-Geo Pocket ROM</comment>
+ <comment xml:lang="id">ROM Neo-Geo Pocket</comment>
+ <comment xml:lang="it">ROM Neo-Geo Pocket</comment>
<comment xml:lang="kk">Neo-Geo Pocket ROM</comment>
<comment xml:lang="ko">네오지오 포켓 롬</comment>
<comment xml:lang="pl">Plik ROM konsoli Neo-Geo Pocket</comment>
<comment xml:lang="pt_BR">ROM de Neo-Geo Pocket</comment>
<comment xml:lang="ru">Neo-Geo Pocket ROM</comment>
<comment xml:lang="sk">ROM pre Neo-Geo Pocket</comment>
+ <comment xml:lang="sr">Нео-Гео Покет РОМ</comment>
+ <comment xml:lang="sv">Neo-Geo Pocket-rom</comment>
+ <comment xml:lang="tr">Neo-Geo Pocket ROM</comment>
<comment xml:lang="uk">ППП Neo-Geo Pocket</comment>
<comment xml:lang="zh_CN">Neo-Geo Pocket ROM</comment>
<comment xml:lang="zh_TW">Neo-Geo Pocket ROM</comment>
<generic-icon name="application-x-executable"/>
<glob pattern="*.ngp"/>
<magic>
- <match value="COPYRIGHT BY SNK CORPORATION" type="string" offset="0"/>
+ <match value="0x0" type="byte" offset="35">
+ <match value="COPYRIGHT BY SNK CORPORATION" type="string" offset="0"/>
+ <match value=" LICENSED BY SNK CORPORATION" type="string" offset="0"/>
+ </match>
+ </magic>
+ </mime-type>
+ <mime-type type="application/x-neo-geo-pocket-color-rom">
+ <comment>Neo-Geo Pocket Color ROM</comment>
+ <generic-icon name="application-x-executable"/>
+ <glob pattern="*.ngc"/>
+ <magic>
+ <match value="0x10" type="byte" offset="35">
+ <match value="COPYRIGHT BY SNK CORPORATION" type="string" offset="0"/>
+ <match value=" LICENSED BY SNK CORPORATION" type="string" offset="0"/>
+ </match>
</magic>
</mime-type>
<mime-type type="application/x-nes-rom">
@@ -16099,7 +16674,7 @@
<comment xml:lang="oc">ROM NES</comment>
<comment xml:lang="pl">Plik ROM konsoli NES</comment>
<comment xml:lang="pt">ROM NES</comment>
- <comment xml:lang="pt_BR">ROM do NES</comment>
+ <comment xml:lang="pt_BR">ROM de NES</comment>
<comment xml:lang="ro">ROM NES</comment>
<comment xml:lang="ru">NES ROM</comment>
<comment xml:lang="sk">ROM pre NES</comment>
@@ -16121,6 +16696,7 @@
<mime-type type="application/x-netcdf">
<comment>Unidata NetCDF document</comment>
<comment xml:lang="ar">مستند Unidata NetCDF</comment>
+ <comment xml:lang="ast">Documentu NetCDF d'Unidata</comment>
<comment xml:lang="be@latin">Dakument Unidata NetCDF</comment>
<comment xml:lang="bg">Документ — Unidata NetCDF</comment>
<comment xml:lang="ca">document d'Unidata NetCDF</comment>
@@ -16157,7 +16733,7 @@
<comment xml:lang="pt">documento Unidata NetCDF</comment>
<comment xml:lang="pt_BR">Documento do Unidata NetCDF</comment>
<comment xml:lang="ro">Document Unidata NetCDF</comment>
- <comment xml:lang="ru">документ Unidata NetCDF</comment>
+ <comment xml:lang="ru">Документ Unidata NetCDF</comment>
<comment xml:lang="sk">Dokument Unidata NetCDF</comment>
<comment xml:lang="sl">Dokument Unidata NetCDF</comment>
<comment xml:lang="sq">Dokument Unidata NetCDF</comment>
@@ -16186,6 +16762,7 @@
<comment xml:lang="es">índice NewzBin de usenet</comment>
<comment xml:lang="eu">NewzBin usenet indizea</comment>
<comment xml:lang="fr">index usenet </comment>
+ <comment xml:lang="ga">innéacs usenet NewzBin</comment>
<comment xml:lang="gl">Índice de usenet NEwzBin</comment>
<comment xml:lang="he">אינדקס שרתי חדשות NewzBin</comment>
<comment xml:lang="hr">NewzBin usenet indeks</comment>
@@ -16202,14 +16779,14 @@
<comment xml:lang="pl">Indeks grup dyskusyjnych NewzBin</comment>
<comment xml:lang="pt">índice usenet NewzBin</comment>
<comment xml:lang="pt_BR">Índice de usenet NewzBin</comment>
- <comment xml:lang="ru">индекс usenet NewzBin</comment>
+ <comment xml:lang="ru">Индекс usenet NewzBin</comment>
<comment xml:lang="sk">Index Usenetu NewzBin</comment>
<comment xml:lang="sl">Kazalo usenet NewzBin</comment>
<comment xml:lang="sr">Њузбин попис јузнета</comment>
<comment xml:lang="sv">NewzBin-usenetindex</comment>
<comment xml:lang="tr">NewzBin usenet dizini</comment>
<comment xml:lang="uk">покажчик usenet NewzBin</comment>
- <comment xml:lang="zh_CN">NewzBin usenet 索引</comment>
+ <comment xml:lang="zh_CN">NewzBin Usenet 索引</comment>
<comment xml:lang="zh_TW">NewzBin usenet 索引</comment>
<sub-class-of type="application/xml"/>
<magic priority="80">
@@ -16236,10 +16813,10 @@
<comment xml:lang="ga">cód réada</comment>
<comment xml:lang="gl">código obxecto</comment>
<comment xml:lang="he">קוד אובייקט</comment>
- <comment xml:lang="hr">kod objekta</comment>
+ <comment xml:lang="hr">Object kôd</comment>
<comment xml:lang="hu">tárgykód</comment>
<comment xml:lang="ia">Codice objecto</comment>
- <comment xml:lang="id">kode object</comment>
+ <comment xml:lang="id">kode objek</comment>
<comment xml:lang="it">Codice oggetto</comment>
<comment xml:lang="ja">オブジェクトコード</comment>
<comment xml:lang="kk">объектті коды</comment>
@@ -16255,7 +16832,7 @@
<comment xml:lang="pt">código de objeto</comment>
<comment xml:lang="pt_BR">Código-objeto</comment>
<comment xml:lang="ro">cod sursă obiect</comment>
- <comment xml:lang="ru">объектный код</comment>
+ <comment xml:lang="ru">Объектный код</comment>
<comment xml:lang="sk">Objektový kód</comment>
<comment xml:lang="sl">predmetna koda</comment>
<comment xml:lang="sq">Kod objekti</comment>
@@ -16299,7 +16876,7 @@
<comment xml:lang="ga">formáid mhalairte Annodex</comment>
<comment xml:lang="gl">formato intercambiábel de Annodex</comment>
<comment xml:lang="he">תבנית החלפת Annodex</comment>
- <comment xml:lang="hr">Annodex oblik za razmjenu</comment>
+ <comment xml:lang="hr">Annodex format razmjene</comment>
<comment xml:lang="hu">Annodex csereformátum</comment>
<comment xml:lang="ia">Formato de excambio Annodex</comment>
<comment xml:lang="id">Format pertukaran Annodex</comment>
@@ -16316,7 +16893,7 @@
<comment xml:lang="pt">formato de troca Annodex</comment>
<comment xml:lang="pt_BR">Formato de troca Annodex</comment>
<comment xml:lang="ro">Format schimb Annodex</comment>
- <comment xml:lang="ru">формат обмена Annodex</comment>
+ <comment xml:lang="ru">Формат обмена Annodex</comment>
<comment xml:lang="sk">Formát pre výmenu Annodex</comment>
<comment xml:lang="sl">Izmenjalna datoteka Annodex</comment>
<comment xml:lang="sr">Анодексов запис размене</comment>
@@ -16340,6 +16917,7 @@
<mime-type type="video/annodex">
<comment>Annodex Video</comment>
<comment xml:lang="ar">Annodex مرئي</comment>
+ <comment xml:lang="ast">Videu n'Annodex</comment>
<comment xml:lang="bg">Видео — Annodex</comment>
<comment xml:lang="ca">Annodex Video</comment>
<comment xml:lang="cs">video Annodex</comment>
@@ -16353,10 +16931,10 @@
<comment xml:lang="fi">Annodex-video</comment>
<comment xml:lang="fo">Annodex video</comment>
<comment xml:lang="fr">vidéo Annodex</comment>
- <comment xml:lang="ga">físeán Annodex</comment>
+ <comment xml:lang="ga">Físeán Annodex</comment>
<comment xml:lang="gl">vídeo de Annodex</comment>
<comment xml:lang="he">וידאו Annodex</comment>
- <comment xml:lang="hr">Annodex Video</comment>
+ <comment xml:lang="hr">Annodex video snimka</comment>
<comment xml:lang="hu">Annodex videó</comment>
<comment xml:lang="ia">Video Annodex</comment>
<comment xml:lang="id">Video Annodex</comment>
@@ -16373,7 +16951,7 @@
<comment xml:lang="pt">vídeo Annodex</comment>
<comment xml:lang="pt_BR">Vídeo Annodex</comment>
<comment xml:lang="ro">Video Annodex</comment>
- <comment xml:lang="ru">видео Annodex</comment>
+ <comment xml:lang="ru">Видео Annodex</comment>
<comment xml:lang="sk">Video Annodex</comment>
<comment xml:lang="sl">Video datoteka Annodex</comment>
<comment xml:lang="sr">Анодекс видео</comment>
@@ -16410,10 +16988,10 @@
<comment xml:lang="fi">Annodex-ääni</comment>
<comment xml:lang="fo">Annodex ljóður</comment>
<comment xml:lang="fr">audio Annodex</comment>
- <comment xml:lang="ga">fuaim Annodex</comment>
+ <comment xml:lang="ga">Fuaim Annodex</comment>
<comment xml:lang="gl">son de Annodex</comment>
<comment xml:lang="he">שמע Annodex</comment>
- <comment xml:lang="hr">Annodex Audio</comment>
+ <comment xml:lang="hr">Annodex zvučni zapis</comment>
<comment xml:lang="hu">Annodex hang</comment>
<comment xml:lang="ia">Audio Annodex</comment>
<comment xml:lang="id">Audio Annodex</comment>
@@ -16430,7 +17008,7 @@
<comment xml:lang="pt">áudio Annodex</comment>
<comment xml:lang="pt_BR">Áudio Annodex</comment>
<comment xml:lang="ro">Audio Annodex</comment>
- <comment xml:lang="ru">аудио Annodex</comment>
+ <comment xml:lang="ru">Аудио Annodex</comment>
<comment xml:lang="sk">Zvuk Annodex</comment>
<comment xml:lang="sl">Zvočna datoteka Annodex</comment>
<comment xml:lang="sr">Анодекс аудио</comment>
@@ -16489,7 +17067,7 @@
<comment xml:lang="pt">ficheiro multimédia Ogg</comment>
<comment xml:lang="pt_BR">Arquivo multimídia Ogg</comment>
<comment xml:lang="ro">Fișier multimedia Ogg</comment>
- <comment xml:lang="ru">мультимедийный файл Ogg</comment>
+ <comment xml:lang="ru">Мультимедийный файл Ogg</comment>
<comment xml:lang="sk">Súbor multimédií Ogg</comment>
<comment xml:lang="sl">Večpredstavnostna datoteka Ogg</comment>
<comment xml:lang="sq">File multimedial Ogg</comment>
@@ -16523,7 +17101,7 @@
<comment xml:lang="fi">Ogg-ääni</comment>
<comment xml:lang="fo">Ogg ljóður</comment>
<comment xml:lang="fr">audio Ogg</comment>
- <comment xml:lang="ga">fuaim Ogg</comment>
+ <comment xml:lang="ga">Fuaim Ogg</comment>
<comment xml:lang="gl">son Ogg</comment>
<comment xml:lang="he">שמע Ogg</comment>
<comment xml:lang="hr">Ogg zvučni zapis</comment>
@@ -16545,7 +17123,7 @@
<comment xml:lang="pt">áudio Ogg</comment>
<comment xml:lang="pt_BR">Áudio Ogg</comment>
<comment xml:lang="ro">Audio Ogg</comment>
- <comment xml:lang="ru">аудио Ogg</comment>
+ <comment xml:lang="ru">Аудио Ogg</comment>
<comment xml:lang="sk">Zvuk Ogg</comment>
<comment xml:lang="sl">Zvočna datoteka Ogg</comment>
<comment xml:lang="sq">Audio Ogg</comment>
@@ -16568,6 +17146,7 @@
<mime-type type="video/ogg">
<comment>Ogg Video</comment>
<comment xml:lang="ar">Ogg مرئي</comment>
+ <comment xml:lang="ast">Videu n'Ogg</comment>
<comment xml:lang="be@latin">Videa Ogg</comment>
<comment xml:lang="bg">Видео — Ogg</comment>
<comment xml:lang="ca">vídeo Ogg</comment>
@@ -16581,7 +17160,7 @@
<comment xml:lang="fi">Ogg-video</comment>
<comment xml:lang="fo">Ogg Video</comment>
<comment xml:lang="fr">vidéo Ogg</comment>
- <comment xml:lang="ga">físeán Ogg</comment>
+ <comment xml:lang="ga">Físeán Ogg</comment>
<comment xml:lang="gl">vídeo Ogg</comment>
<comment xml:lang="he">וידאו Ogg</comment>
<comment xml:lang="hr">Ogg video snimka</comment>
@@ -16603,7 +17182,7 @@
<comment xml:lang="pt">vídeo Ogg</comment>
<comment xml:lang="pt_BR">Vídeo Ogg</comment>
<comment xml:lang="ro">Video Ogg</comment>
- <comment xml:lang="ru">видео Ogg</comment>
+ <comment xml:lang="ru">Видео Ogg</comment>
<comment xml:lang="sk">Video Ogg</comment>
<comment xml:lang="sl">Video datoteka Ogg</comment>
<comment xml:lang="sq">Video Ogg</comment>
@@ -16664,7 +17243,7 @@
<comment xml:lang="pt">áudio Ogg Vorbis</comment>
<comment xml:lang="pt_BR">Áudio Ogg Vorbis</comment>
<comment xml:lang="ro">Audio Ogg Vorbis</comment>
- <comment xml:lang="ru">аудио Ogg Vorbis</comment>
+ <comment xml:lang="ru">Аудио Ogg Vorbis</comment>
<comment xml:lang="sk">Zvuk Ogg Vorbis</comment>
<comment xml:lang="sl">Zvočna datoteka Ogg Vorbis</comment>
<comment xml:lang="sq">Audio Ogg Vorbis</comment>
@@ -16724,7 +17303,7 @@
<comment xml:lang="pt">áudio Ogg FLAC</comment>
<comment xml:lang="pt_BR">Áudio Ogg FLAC</comment>
<comment xml:lang="ro">Audio Ogg FLAC</comment>
- <comment xml:lang="ru">аудио Ogg FLAC</comment>
+ <comment xml:lang="ru">Аудио Ogg FLAC</comment>
<comment xml:lang="sk">Zvuk Ogg FLAC</comment>
<comment xml:lang="sl">Zvočna datoteka Ogg FLAC</comment>
<comment xml:lang="sq">Audio Ogg FLAC</comment>
@@ -16760,6 +17339,7 @@
<comment xml:lang="eu">Opus audioa</comment>
<comment xml:lang="fi">Opus-ääni</comment>
<comment xml:lang="fr">audio Opus</comment>
+ <comment xml:lang="ga">fuaim Opus</comment>
<comment xml:lang="gl">Son Opus</comment>
<comment xml:lang="he">שמע Opus</comment>
<comment xml:lang="hr">Opus zvučni zapis</comment>
@@ -16828,7 +17408,7 @@
<comment xml:lang="pt">áudio Ogg Speex</comment>
<comment xml:lang="pt_BR">Áudio Ogg Speex</comment>
<comment xml:lang="ro">Audio Ogg Speex</comment>
- <comment xml:lang="ru">аудио Ogg Speex</comment>
+ <comment xml:lang="ru">Аудио Ogg Speex</comment>
<comment xml:lang="sk">Zvuk Ogg Speex</comment>
<comment xml:lang="sl">Zvočna datoteka Ogg Speex</comment>
<comment xml:lang="sq">Audio Ogg Speex</comment>
@@ -16867,7 +17447,7 @@
<comment xml:lang="ga">fuaim Speex</comment>
<comment xml:lang="gl">son Speex</comment>
<comment xml:lang="he">שמע של Speex</comment>
- <comment xml:lang="hr">Speex audio</comment>
+ <comment xml:lang="hr">Speex zvučni zapis</comment>
<comment xml:lang="hu">Speex hang</comment>
<comment xml:lang="ia">Audio Speex</comment>
<comment xml:lang="id">Audio Speex</comment>
@@ -16885,7 +17465,7 @@
<comment xml:lang="pt">áudio Speex</comment>
<comment xml:lang="pt_BR">Áudio Speex</comment>
<comment xml:lang="ro">Audio Speex</comment>
- <comment xml:lang="ru">аудио Speex</comment>
+ <comment xml:lang="ru">Аудио Speex</comment>
<comment xml:lang="sk">Zvuk Speex</comment>
<comment xml:lang="sl">Zvočna datoteka Speex</comment>
<comment xml:lang="sq">Audio Speex</comment>
@@ -16904,6 +17484,7 @@
<mime-type type="video/x-theora+ogg">
<comment>Ogg Theora video</comment>
<comment xml:lang="ar">Ogg Theora مرئي</comment>
+ <comment xml:lang="ast">Videu n'Ogg Theora</comment>
<comment xml:lang="be@latin">Videa Ogg Theora</comment>
<comment xml:lang="bg">Видео — Ogg Theora</comment>
<comment xml:lang="ca">vídeo Ogg Theora</comment>
@@ -16939,7 +17520,7 @@
<comment xml:lang="pt">vídeo Ogg Theora</comment>
<comment xml:lang="pt_BR">Vídeo Ogg Theora</comment>
<comment xml:lang="ro">Video Ogg Theora</comment>
- <comment xml:lang="ru">видео Ogg Theora</comment>
+ <comment xml:lang="ru">Видео Ogg Theora</comment>
<comment xml:lang="sk">Video Ogg Theora</comment>
<comment xml:lang="sl">Video datoteka Ogg Theora</comment>
<comment xml:lang="sq">Video Ogg Theora</comment>
@@ -16962,6 +17543,7 @@
<mime-type type="video/x-ogm+ogg">
<comment>OGM video</comment>
<comment xml:lang="ar">OGM مرئي</comment>
+ <comment xml:lang="ast">Videu n'OGM</comment>
<comment xml:lang="be@latin">Videa OGM</comment>
<comment xml:lang="bg">Видео — OGM</comment>
<comment xml:lang="ca">vídeo OGM</comment>
@@ -16979,7 +17561,7 @@
<comment xml:lang="ga">físeán OGM</comment>
<comment xml:lang="gl">vídeo OGM</comment>
<comment xml:lang="he">וידאו OGM</comment>
- <comment xml:lang="hr">OGM video</comment>
+ <comment xml:lang="hr">OGM video snimka</comment>
<comment xml:lang="hu">OGM-videó</comment>
<comment xml:lang="ia">Video OGM</comment>
<comment xml:lang="id">Video OGM</comment>
@@ -16998,7 +17580,7 @@
<comment xml:lang="pt">vídeo OGM</comment>
<comment xml:lang="pt_BR">Vídeo OGM</comment>
<comment xml:lang="ro">Video OGM</comment>
- <comment xml:lang="ru">видео OGM</comment>
+ <comment xml:lang="ru">Видео OGM</comment>
<comment xml:lang="sk">Video OGM</comment>
<comment xml:lang="sl">Video datoteka OGM</comment>
<comment xml:lang="sq">Video OGM</comment>
@@ -17022,6 +17604,7 @@
<mime-type type="application/x-ole-storage">
<comment>OLE2 compound document storage</comment>
<comment xml:lang="ar">تخزين مجمع مستند OLE2</comment>
+ <comment xml:lang="ast">Almacenamientu de documentos compuestu por OLE2</comment>
<comment xml:lang="be@latin">Schovišča dla kampanentaŭ dakumentu OLE2</comment>
<comment xml:lang="bg">Съставен документ-хранилище — OLE2</comment>
<comment xml:lang="ca">emmagatzematge de documents compostos OLE2</comment>
@@ -17036,7 +17619,7 @@
<comment xml:lang="fi">OLE2-yhdisteasiakirjatallenne</comment>
<comment xml:lang="fo">OLE2 samansett skjalagoymsla</comment>
<comment xml:lang="fr">document de stockage composé OLE2</comment>
- <comment xml:lang="ga">stóras cháipéisí comhshuite OLE2</comment>
+ <comment xml:lang="ga">stóras cáipéisí comhshuite OLE2</comment>
<comment xml:lang="gl">almacenamento de documento composto OLE2</comment>
<comment xml:lang="he">אחסון מסמך משותף OLE2</comment>
<comment xml:lang="hr">OLE2 pohrana složenog dokumenta</comment>
@@ -17058,7 +17641,7 @@
<comment xml:lang="pt">armazenamento de documento composto OLE2</comment>
<comment xml:lang="pt_BR">Armazenamento de documento composto OLE2</comment>
<comment xml:lang="ro">Document de stocare compus OLE2</comment>
- <comment xml:lang="ru">хранилище составных документов OLE2</comment>
+ <comment xml:lang="ru">Хранилище составных документов OLE2</comment>
<comment xml:lang="sk">Úložisko zloženého dokumentu OLE2</comment>
<comment xml:lang="sl">Združeni dokument OLE2</comment>
<comment xml:lang="sq">Arkiv dokumenti i përbërë OLE2</comment>
@@ -17077,6 +17660,7 @@
</mime-type>
<mime-type type="application/vnd.ms-publisher">
<comment>Microsoft Publisher document</comment>
+ <comment xml:lang="ast">Documentu de Microsoft Publisher</comment>
<comment xml:lang="ca">document de Microsoft Publisher</comment>
<comment xml:lang="cs">dokument Microsoft Publisher</comment>
<comment xml:lang="da">Microsoft Publisher-dokument</comment>
@@ -17087,6 +17671,7 @@
<comment xml:lang="eu">Microsoft Publisher dokumentua</comment>
<comment xml:lang="fi">Microsoft Publisher -asiakirja</comment>
<comment xml:lang="fr">document Microsoft Publisher</comment>
+ <comment xml:lang="ga">cáipéis Microsoft Publisher</comment>
<comment xml:lang="gl">Documento de Microsoft Publisher</comment>
<comment xml:lang="he">מסמך Microsoft Publisher</comment>
<comment xml:lang="hr">Microsoft Publisher dokument</comment>
@@ -17131,7 +17716,7 @@
<comment xml:lang="ga">pacáiste Windows Installer</comment>
<comment xml:lang="gl">paquete de instalación de Windows</comment>
<comment xml:lang="he">חבילה של Windows Installer</comment>
- <comment xml:lang="hr">Windows Installer paket</comment>
+ <comment xml:lang="hr">Windows Instalacijski paket</comment>
<comment xml:lang="hu">Windows Installer csomag</comment>
<comment xml:lang="ia">Pacchetto Windows Installer</comment>
<comment xml:lang="id">Paket Windows Installer</comment>
@@ -17148,7 +17733,7 @@
<comment xml:lang="pt">pacote de instalação Windows</comment>
<comment xml:lang="pt_BR">Pacote do Windows Installer</comment>
<comment xml:lang="ro">Pachet instalator Windows</comment>
- <comment xml:lang="ru">пакет Windows Installer</comment>
+ <comment xml:lang="ru">Пакет Windows Installer</comment>
<comment xml:lang="sk">Balík Windows Installer</comment>
<comment xml:lang="sl">Datoteka paketa Windows namestilnika</comment>
<comment xml:lang="sq">Paketë Windows Installer</comment>
@@ -17202,7 +17787,7 @@
<comment xml:lang="pt">folha de cálculo GNU Oleo</comment>
<comment xml:lang="pt_BR">Planilha do GNU Oleo</comment>
<comment xml:lang="ro">Foaie de calcul GNU Oleo</comment>
- <comment xml:lang="ru">электронная таблица GNU Oleo</comment>
+ <comment xml:lang="ru">Электронная таблица GNU Oleo</comment>
<comment xml:lang="sk">Zošit GNU Oleo</comment>
<comment xml:lang="sl">Preglednica GNU Oleo</comment>
<comment xml:lang="sq">Fletë llogaritje GNU Oleo</comment>
@@ -17211,7 +17796,7 @@
<comment xml:lang="tr">GNU Oleo çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця GNU Oleo</comment>
<comment xml:lang="vi">Bảng tính Oleo của GNU</comment>
- <comment xml:lang="zh_CN">GNU Oleo 工作簿</comment>
+ <comment xml:lang="zh_CN">GNU Oleo 电子表格</comment>
<comment xml:lang="zh_TW">GNU Oleo 試算表</comment>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="50">
@@ -17258,7 +17843,7 @@
<comment xml:lang="pt">arquivo PAK</comment>
<comment xml:lang="pt_BR">Pacote PAK</comment>
<comment xml:lang="ro">Arhivă PAK</comment>
- <comment xml:lang="ru">архив PAK</comment>
+ <comment xml:lang="ru">Архив PAK</comment>
<comment xml:lang="sk">Archív PAK</comment>
<comment xml:lang="sl">Datoteka arhiva PAK</comment>
<comment xml:lang="sq">Arkiv PAK</comment>
@@ -17267,7 +17852,7 @@
<comment xml:lang="tr">PAK arşivi</comment>
<comment xml:lang="uk">архів PAK</comment>
<comment xml:lang="vi">Kho nén PAK</comment>
- <comment xml:lang="zh_CN">AR 归档文件</comment>
+ <comment xml:lang="zh_CN">PAK 归档文件</comment>
<comment xml:lang="zh_TW">PAK 封存檔</comment>
<generic-icon name="package-x-generic"/>
<magic priority="80">
@@ -17316,7 +17901,7 @@
<comment xml:lang="pt">base de dados Palm OS</comment>
<comment xml:lang="pt_BR">Banco de dados do Palm OS</comment>
<comment xml:lang="ro">Bază de date Palm OS</comment>
- <comment xml:lang="ru">база данных Palm OS</comment>
+ <comment xml:lang="ru">База данных Palm OS</comment>
<comment xml:lang="sk">Databáza Palm OS</comment>
<comment xml:lang="sl">Podatkovna zbirka Palm OS</comment>
<comment xml:lang="sq">Bankë me të dhëna Palm OS</comment>
@@ -17370,7 +17955,7 @@
<comment xml:lang="pt">arquivo Parchive</comment>
<comment xml:lang="pt_BR">Pacote Parchive</comment>
<comment xml:lang="ro">Arhivă Parchive</comment>
- <comment xml:lang="ru">архив Parchive</comment>
+ <comment xml:lang="ru">Архив Parchive</comment>
<comment xml:lang="sk">Archív Parchive</comment>
<comment xml:lang="sl">Datoteka arhiva Parchive</comment>
<comment xml:lang="sq">Arkiv Parchive</comment>
@@ -17429,7 +18014,7 @@
<comment xml:lang="pt">executável PEF</comment>
<comment xml:lang="pt_BR">Executável PEF</comment>
<comment xml:lang="ro">Executabil PEF</comment>
- <comment xml:lang="ru">исполняемый файл PEF</comment>
+ <comment xml:lang="ru">Исполняемый файл PEF</comment>
<comment xml:lang="sk">Spustiteľný súbor PEF</comment>
<comment xml:lang="sl">Izvedljiva datoteka PEF</comment>
<comment xml:lang="sq">E ekzekutueshme PEF</comment>
@@ -17485,7 +18070,7 @@
<comment xml:lang="pt">script Perl</comment>
<comment xml:lang="pt_BR">Script Perl</comment>
<comment xml:lang="ro">Script Perl</comment>
- <comment xml:lang="ru">сценарий Perl</comment>
+ <comment xml:lang="ru">Сценарий Perl</comment>
<comment xml:lang="sk">Skript jazyka Perl</comment>
<comment xml:lang="sl">Skriptna datoteka Perl</comment>
<comment xml:lang="sq">Script Perl</comment>
@@ -17499,6 +18084,7 @@
<sub-class-of type="application/x-executable"/>
<sub-class-of type="text/plain"/>
<generic-icon name="text-x-script"/>
+ <alias type="text/x-perl"/>
<magic priority="50">
<match value='eval \"exec /usr/local/bin/perl' type="string" offset="0"/>
<match value="/bin/perl" type="string" offset="2:16"/>
@@ -17563,7 +18149,7 @@
<comment xml:lang="pt">script PHP</comment>
<comment xml:lang="pt_BR">Script PHP</comment>
<comment xml:lang="ro">Script PHP</comment>
- <comment xml:lang="ru">сценарий PHP</comment>
+ <comment xml:lang="ru">Сценарий PHP</comment>
<comment xml:lang="sk">Skript PHP</comment>
<comment xml:lang="sl">Skriptna datoteka PHP</comment>
<comment xml:lang="sq">Script PHP</comment>
@@ -17600,7 +18186,7 @@
<comment xml:lang="fi">PKCS#7-varmennenippu</comment>
<comment xml:lang="fo">PKCS#7 váttanar bundi</comment>
<comment xml:lang="fr">lot de certificats PKCS#7</comment>
- <comment xml:lang="ga">cuach theastas PKCS#7</comment>
+ <comment xml:lang="ga">burla teastas PKCS#7</comment>
<comment xml:lang="gl">paquete de certificado PKCS#7</comment>
<comment xml:lang="he">בקשה מוסמכת PKCS#7</comment>
<comment xml:lang="hr">PKCS#7 paket vjerodajnica</comment>
@@ -17619,7 +18205,7 @@
<comment xml:lang="pt">pacote de certificação PKCS#7</comment>
<comment xml:lang="pt_BR">Pacote de certificados PKCS#7</comment>
<comment xml:lang="ro">Pachet certificat PKCS#7</comment>
- <comment xml:lang="ru">пакет сертификатов PKCS#7</comment>
+ <comment xml:lang="ru">Пакет сертификата PKCS#7</comment>
<comment xml:lang="sk">Zväzok certifikátov PKCS#7</comment>
<comment xml:lang="sl">Datoteka potrdila PKCS#7</comment>
<comment xml:lang="sr">ПКЦС#7 пакет уверења</comment>
@@ -17651,7 +18237,7 @@
<comment xml:lang="fi">PKCS#12-varmennenippu</comment>
<comment xml:lang="fo">PKCS#12 váttanar bundi</comment>
<comment xml:lang="fr">lot de certificats PKCS#12</comment>
- <comment xml:lang="ga">cuach theastas PKCS#12</comment>
+ <comment xml:lang="ga">burla teastas PKCS#12</comment>
<comment xml:lang="gl">paquete de certificado PKCS#12</comment>
<comment xml:lang="he">בקשה מוסמכת PKCS#12</comment>
<comment xml:lang="hr">PKCS#12 paket vjerodajnica</comment>
@@ -17673,7 +18259,7 @@
<comment xml:lang="pt">pacote de certificação PKCS#12</comment>
<comment xml:lang="pt_BR">Pacote de certificados PKCS#12</comment>
<comment xml:lang="ro">Certificat împachetat PKCS#12</comment>
- <comment xml:lang="ru">пакет сертификатов PKCS#12</comment>
+ <comment xml:lang="ru">Пакет сертификата PKCS#12</comment>
<comment xml:lang="sk">Zväzok certifikátov PKCS#12</comment>
<comment xml:lang="sl">Datoteka potrdila PKCS#12</comment>
<comment xml:lang="sq">Bundle çertifikate PKCS#12</comment>
@@ -17727,7 +18313,7 @@
<comment xml:lang="pt">folha de cálculo PlanPerfect</comment>
<comment xml:lang="pt_BR">Planilha do PlanPerfect</comment>
<comment xml:lang="ro">Foaie de calcul PlanPerfect</comment>
- <comment xml:lang="ru">электронная таблица PlanPerfect</comment>
+ <comment xml:lang="ru">Электронная таблица PlanPerfect</comment>
<comment xml:lang="sk">Zošit PlanPerfect</comment>
<comment xml:lang="sl">Preglednica PlanPerfect</comment>
<comment xml:lang="sq">Fletë llogaritjesh PlanPerfect</comment>
@@ -17736,7 +18322,7 @@
<comment xml:lang="tr">PlanPerfect çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця PlanPerfect</comment>
<comment xml:lang="vi">Bảng tính PlanPerfect</comment>
- <comment xml:lang="zh_CN">PlanPerfect 工作簿</comment>
+ <comment xml:lang="zh_CN">PlanPerfect 电子表格</comment>
<comment xml:lang="zh_TW">PlanPerfect 試算表</comment>
<generic-icon name="x-office-spreadsheet"/>
<glob pattern="*.pln"/>
@@ -17744,6 +18330,7 @@
<mime-type type="application/x-pocket-word">
<comment>Pocket Word document</comment>
<comment xml:lang="ar">مستند Pocket Word</comment>
+ <comment xml:lang="ast">Documentu de PocketWord</comment>
<comment xml:lang="bg">Документ — Pocket Word</comment>
<comment xml:lang="ca">document de Pocket Word</comment>
<comment xml:lang="cs">dokument Pocket Word</comment>
@@ -17775,7 +18362,7 @@
<comment xml:lang="pt">documento Pocket Word</comment>
<comment xml:lang="pt_BR">Documento do Pocket Word</comment>
<comment xml:lang="ro">Document Pocket Word</comment>
- <comment xml:lang="ru">документ Pocket Word</comment>
+ <comment xml:lang="ru">Документ Pocket Word</comment>
<comment xml:lang="sk">Dokument Pocket Word</comment>
<comment xml:lang="sl">Dokument Pocket Word</comment>
<comment xml:lang="sr">документ Покет Ворда</comment>
@@ -17831,7 +18418,7 @@
<comment xml:lang="pt">resultados de análise de perfil</comment>
<comment xml:lang="pt_BR">Resultados do profiler</comment>
<comment xml:lang="ro">rezultate profiler</comment>
- <comment xml:lang="ru">результаты профилирования</comment>
+ <comment xml:lang="ru">Результаты профилирования</comment>
<comment xml:lang="sk">Výsledky profilera</comment>
<comment xml:lang="sl">rezultati profilirnika</comment>
<comment xml:lang="sq">Rezultate të profiluesit</comment>
@@ -17840,7 +18427,7 @@
<comment xml:lang="tr">profil sonuçları</comment>
<comment xml:lang="uk">результати профілювання</comment>
<comment xml:lang="vi">kết quả nét hiện trạng</comment>
- <comment xml:lang="zh_CN">profiler 结果</comment>
+ <comment xml:lang="zh_CN">探查器结果</comment>
<comment xml:lang="zh_TW">硬體資訊產生器成果</comment>
<sub-class-of type="text/plain"/>
<generic-icon name="text-x-generic"/>
@@ -17849,6 +18436,7 @@
<mime-type type="application/x-pw">
<comment>Pathetic Writer document</comment>
<comment xml:lang="ar">مستند Pathetic Writer</comment>
+ <comment xml:lang="ast">Documentu de Pathetic Writer</comment>
<comment xml:lang="be@latin">Dakument Pathetic Writer</comment>
<comment xml:lang="bg">Документ — Pathetic Writer</comment>
<comment xml:lang="ca">document de Pathetic Writer</comment>
@@ -17885,7 +18473,7 @@
<comment xml:lang="pt">documento do Pathetic Writer</comment>
<comment xml:lang="pt_BR">Documento do Pathetic Writer</comment>
<comment xml:lang="ro">Document Pathetic Writer</comment>
- <comment xml:lang="ru">документ Pathetic Writer</comment>
+ <comment xml:lang="ru">Документ Pathetic Writer</comment>
<comment xml:lang="sk">Dokument Pathetic Writer</comment>
<comment xml:lang="sl">Dokument Pathetic Writer</comment>
<comment xml:lang="sq">Dokument Pathetic Writer</comment>
@@ -17940,7 +18528,7 @@
<comment xml:lang="pt">código binário Python</comment>
<comment xml:lang="pt_BR">Código compilado Python</comment>
<comment xml:lang="ro">Bytecode Python</comment>
- <comment xml:lang="ru">байт-код Python</comment>
+ <comment xml:lang="ru">Байт-код Python</comment>
<comment xml:lang="sk">Bajtový kód Python</comment>
<comment xml:lang="sl">Datoteka bitne kode Python</comment>
<comment xml:lang="sq">Bytecode Python</comment>
@@ -17959,6 +18547,7 @@
</mime-type>
<mime-type type="application/x-qtiplot">
<comment>QtiPlot document</comment>
+ <comment xml:lang="ast">Documentu de QtiPlot</comment>
<comment xml:lang="ca">document QtiPlot</comment>
<comment xml:lang="cs">dokument GtiPlot</comment>
<comment xml:lang="da">QtiPlot-dokument</comment>
@@ -17969,6 +18558,7 @@
<comment xml:lang="eu">QtiPlot dokumentua</comment>
<comment xml:lang="fi">QtiPlot-asiakirja</comment>
<comment xml:lang="fr">document QtiPlot</comment>
+ <comment xml:lang="ga">cáipéis QtiPlot</comment>
<comment xml:lang="gl">Documento de QtiPilot</comment>
<comment xml:lang="he">מסמך QtiPlot</comment>
<comment xml:lang="hr">QtiPlot dokument</comment>
@@ -17984,7 +18574,7 @@
<comment xml:lang="pl">Dokument QtiPlot</comment>
<comment xml:lang="pt">documento QtiPlot</comment>
<comment xml:lang="pt_BR">Documento do QtiPlot</comment>
- <comment xml:lang="ru">документ QtiPlot</comment>
+ <comment xml:lang="ru">Документ QtiPlot</comment>
<comment xml:lang="sk">Dokument QtiPlot</comment>
<comment xml:lang="sl">Dokument QtiPlot</comment>
<comment xml:lang="sr">КутиПлот документ</comment>
@@ -18040,7 +18630,7 @@
<comment xml:lang="pt">folha de cálculo Quattro Pro</comment>
<comment xml:lang="pt_BR">Planilha do Quattro Pro</comment>
<comment xml:lang="ro">Foaie de calcul Quattro Pro</comment>
- <comment xml:lang="ru">электронная таблица Quattro Pro</comment>
+ <comment xml:lang="ru">Электронная таблица Quattro Pro</comment>
<comment xml:lang="sk">Zošit Quattro Pro</comment>
<comment xml:lang="sl">Preglednica Quattro Pro</comment>
<comment xml:lang="sq">Fletë llogaritjesh Quattro Pro</comment>
@@ -18049,7 +18639,7 @@
<comment xml:lang="tr">Quattro Pro çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця Quattro Pro</comment>
<comment xml:lang="vi">Bảng tính Quattro Pro</comment>
- <comment xml:lang="zh_CN">Quattro Pro 工作簿</comment>
+ <comment xml:lang="zh_CN">Quattro Pro 电子表格</comment>
<comment xml:lang="zh_TW">Quattro Pro 試算表</comment>
<generic-icon name="x-office-spreadsheet"/>
<glob pattern="*.wb1"/>
@@ -18093,7 +18683,7 @@
<comment xml:lang="pt">lista de reprodução QuickTime metalink</comment>
<comment xml:lang="pt_BR">Lista de reprodução metalink do QuickTime</comment>
<comment xml:lang="ro">Listă cu metalegături QuickTime</comment>
- <comment xml:lang="ru">список воспроизведения мета-ссылок QuickTime</comment>
+ <comment xml:lang="ru">Список воспроизведения мета-ссылок QuickTime</comment>
<comment xml:lang="sk">Zoznam skladieb metalink QuickTime</comment>
<comment xml:lang="sl">Seznam predvajanja QuickTime</comment>
<comment xml:lang="sq">Listë titujsh metalink QuickTime</comment>
@@ -18102,7 +18692,7 @@
<comment xml:lang="tr">QuickTime metalink çalma listesi</comment>
<comment xml:lang="uk">список відтворення QuickTime metalink</comment>
<comment xml:lang="vi">Danh mục nhạc siêu liên kết Quicktime</comment>
- <comment xml:lang="zh_CN">QuickTime 元链接播放列表</comment>
+ <comment xml:lang="zh_CN">QuickTime Metalink 播放列表</comment>
<comment xml:lang="zh_TW">QuickTime metalink 播放清單</comment>
<generic-icon name="video-x-generic"/>
<sub-class-of type="video/quicktime"/>
@@ -18120,6 +18710,7 @@
<mime-type type="application/x-qw">
<comment>Quicken document</comment>
<comment xml:lang="ar">مستند Quicken</comment>
+ <comment xml:lang="ast">Documentu de Quicken</comment>
<comment xml:lang="az">Quicken sənədi</comment>
<comment xml:lang="be@latin">Dakument Quicken</comment>
<comment xml:lang="bg">Документ — Quicken</comment>
@@ -18158,7 +18749,7 @@
<comment xml:lang="pt">documento Quicken</comment>
<comment xml:lang="pt_BR">Documento do Quicken</comment>
<comment xml:lang="ro">Document Quicken</comment>
- <comment xml:lang="ru">документ Quicken</comment>
+ <comment xml:lang="ru">Документ Quicken</comment>
<comment xml:lang="sk">Dokument Quicken</comment>
<comment xml:lang="sl">Dokument Quicken</comment>
<comment xml:lang="sq">Dokument Quicken</comment>
@@ -18212,7 +18803,7 @@
<comment xml:lang="pt">arquivo RAR</comment>
<comment xml:lang="pt_BR">Pacote RAR</comment>
<comment xml:lang="ro">Arhivă RAR</comment>
- <comment xml:lang="ru">архив RAR</comment>
+ <comment xml:lang="ru">Архив RAR</comment>
<comment xml:lang="sk">Archív RAR</comment>
<comment xml:lang="sl">Datoteka arhiva RAR</comment>
<comment xml:lang="sq">Arkiv RAR</comment>
@@ -18272,7 +18863,7 @@
<comment xml:lang="pt">arquivo DAR</comment>
<comment xml:lang="pt_BR">Pacote DAR</comment>
<comment xml:lang="ro">Arhivă DAR</comment>
- <comment xml:lang="ru">архив DAR</comment>
+ <comment xml:lang="ru">Архив DAR</comment>
<comment xml:lang="sk">Archív DAR</comment>
<comment xml:lang="sl">Datoteka arhiva DAR</comment>
<comment xml:lang="sq">Arkiv DAR</comment>
@@ -18328,7 +18919,7 @@
<comment xml:lang="pt">arquivo Alzip</comment>
<comment xml:lang="pt_BR">Pacote Alzip</comment>
<comment xml:lang="ro">Arhivă Alzip</comment>
- <comment xml:lang="ru">архив ALZIP</comment>
+ <comment xml:lang="ru">Архив ALZIP</comment>
<comment xml:lang="sk">Archív Alzip</comment>
<comment xml:lang="sl">Datoteka arhiva Alzip</comment>
<comment xml:lang="sq">Arkiv Alzip</comment>
@@ -18358,14 +18949,14 @@
<comment xml:lang="en_GB">rejected patch</comment>
<comment xml:lang="eo">reĵeta flikaĵo</comment>
<comment xml:lang="es">parche rechazado</comment>
- <comment xml:lang="eu">baztertutako bide-izena</comment>
+ <comment xml:lang="eu">baztertutako adabakia</comment>
<comment xml:lang="fi">hylättyjen muutosten tiedosto</comment>
<comment xml:lang="fo">vrakað rætting</comment>
<comment xml:lang="fr">correctif rejeté</comment>
<comment xml:lang="ga">paiste diúltaithe</comment>
<comment xml:lang="gl">parche rexeitado</comment>
<comment xml:lang="he">טלאי שנדחה</comment>
- <comment xml:lang="hr">odbijena zakrpa</comment>
+ <comment xml:lang="hr">Odbijena zakrpa</comment>
<comment xml:lang="hu">visszautasított folt</comment>
<comment xml:lang="ia">Patch rejectate</comment>
<comment xml:lang="id">patch ditolak</comment>
@@ -18384,7 +18975,7 @@
<comment xml:lang="pt">patch rejeitado</comment>
<comment xml:lang="pt_BR">Arquivo de patch rejeitado</comment>
<comment xml:lang="ro">petec respsins</comment>
- <comment xml:lang="ru">отвергнутый патч</comment>
+ <comment xml:lang="ru">Отклонённый патч</comment>
<comment xml:lang="sk">Odmietnutá záplata</comment>
<comment xml:lang="sl">zavrnjen popravek</comment>
<comment xml:lang="sq">Patch i kthyer mbrapsht</comment>
@@ -18439,7 +19030,7 @@
<comment xml:lang="pt">pacote RPM</comment>
<comment xml:lang="pt_BR">Pacote RPM</comment>
<comment xml:lang="ro">Pachet RPM</comment>
- <comment xml:lang="ru">пакет RPM</comment>
+ <comment xml:lang="ru">Пакет RPM</comment>
<comment xml:lang="sk">Balík RPM</comment>
<comment xml:lang="sl">Datoteka paketa RPM</comment>
<comment xml:lang="sq">Paketë RPM</comment>
@@ -18469,6 +19060,7 @@
<comment xml:lang="eu">Iturburu RPM paketea</comment>
<comment xml:lang="fi">RPM-lähdepaketti</comment>
<comment xml:lang="fr">paquet source RPM</comment>
+ <comment xml:lang="ga">pacáiste foinse RPM</comment>
<comment xml:lang="gl">Paquete RPM de fontes</comment>
<comment xml:lang="he">חבילת מקור RPM</comment>
<comment xml:lang="hr">RPM paket izvora</comment>
@@ -18484,7 +19076,7 @@
<comment xml:lang="pl">Źródłowy pakiet RPM</comment>
<comment xml:lang="pt">pacote origem RPM</comment>
<comment xml:lang="pt_BR">Pacote fonte RPM</comment>
- <comment xml:lang="ru">пакет RPM с исходным кодом</comment>
+ <comment xml:lang="ru">Пакет RPM с исходным кодом</comment>
<comment xml:lang="sk">Zdrojový balík RPM</comment>
<comment xml:lang="sl">Paket izvorne kode RPM</comment>
<comment xml:lang="sr">изворни РПМ пакет</comment>
@@ -18537,7 +19129,7 @@
<comment xml:lang="pt">script Ruby</comment>
<comment xml:lang="pt_BR">Script Ruby</comment>
<comment xml:lang="ro">Script Ruby</comment>
- <comment xml:lang="ru">сценарий Ruby</comment>
+ <comment xml:lang="ru">Сценарий Ruby</comment>
<comment xml:lang="sk">Skript Ruby</comment>
<comment xml:lang="sl">Skriptna datoteka Ruby</comment>
<comment xml:lang="sq">Script Ruby</comment>
@@ -18596,7 +19188,7 @@
<comment xml:lang="pt">script Markaby</comment>
<comment xml:lang="pt_BR">Script Markaby</comment>
<comment xml:lang="ro">Script Markaby</comment>
- <comment xml:lang="ru">сценарий Markaby</comment>
+ <comment xml:lang="ru">Сценарий Markaby</comment>
<comment xml:lang="sk">Skript Markaby</comment>
<comment xml:lang="sl">Skriptna datoteka Markaby</comment>
<comment xml:lang="sq">Script Markaby</comment>
@@ -18623,6 +19215,7 @@
<comment xml:lang="eu">Rust iturburu-kodea</comment>
<comment xml:lang="fi">Rust-lähdekoodi</comment>
<comment xml:lang="fr">code source Rust</comment>
+ <comment xml:lang="ga">cód foinseach Rust</comment>
<comment xml:lang="he">קוד מקור של Rust</comment>
<comment xml:lang="hr">Rust izvorni kôd</comment>
<comment xml:lang="hu">Rust forrásfájl</comment>
@@ -18635,7 +19228,7 @@
<comment xml:lang="pl">Kod źródłowy Rust</comment>
<comment xml:lang="pt">código origem Rust</comment>
<comment xml:lang="pt_BR">Código-fonte Rust</comment>
- <comment xml:lang="ru">исходный код Rust</comment>
+ <comment xml:lang="ru">Исходный код Rust</comment>
<comment xml:lang="sk">Zdrojový kód Rust</comment>
<comment xml:lang="sr">Раст изворни ко̂д</comment>
<comment xml:lang="sv">Rust-källkod</comment>
@@ -18684,7 +19277,7 @@
<comment xml:lang="pt">folha de cálculo SC/Xspread</comment>
<comment xml:lang="pt_BR">Planilha do SC/Xspread</comment>
<comment xml:lang="ro">Foaie de calcul SC/Xspread</comment>
- <comment xml:lang="ru">электронная таблица SC/Xspread</comment>
+ <comment xml:lang="ru">Электронная таблица SC/Xspread</comment>
<comment xml:lang="sk">Zošit SC/Xspread</comment>
<comment xml:lang="sl">Preglednica SC/Xspread</comment>
<comment xml:lang="sq">Fletë llogaritjesh SC/Xspread</comment>
@@ -18693,7 +19286,7 @@
<comment xml:lang="tr">SC/Xspread çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця SC/Xspread</comment>
<comment xml:lang="vi">Bảng tính SC/Xspread</comment>
- <comment xml:lang="zh_CN">SC/Xspread 工作簿</comment>
+ <comment xml:lang="zh_CN">SC/Xspread 电子表格</comment>
<comment xml:lang="zh_TW">SC/Xspread 試算表</comment>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="50">
@@ -18722,7 +19315,7 @@
<comment xml:lang="ga">cartlann bhlaoisce</comment>
<comment xml:lang="gl">ficheiro shell</comment>
<comment xml:lang="he">ארכיון מעטפת</comment>
- <comment xml:lang="hr">arhiva ljuske</comment>
+ <comment xml:lang="hr">Arhiva ljuske</comment>
<comment xml:lang="hu">héjarchívum</comment>
<comment xml:lang="ia">Archivo de shell</comment>
<comment xml:lang="id">arsip shell</comment>
@@ -18741,7 +19334,7 @@
<comment xml:lang="pt">arquivo de terminal</comment>
<comment xml:lang="pt_BR">Pacote shell</comment>
<comment xml:lang="ro">arhivă shell</comment>
- <comment xml:lang="ru">архив оболочки UNIX</comment>
+ <comment xml:lang="ru">Архив shell</comment>
<comment xml:lang="sk">Archív shellu</comment>
<comment xml:lang="sl">lupinski arhiv</comment>
<comment xml:lang="sq">Arkiv shell</comment>
@@ -18792,7 +19385,7 @@
<comment xml:lang="pt">biblioteca partilhada libtool</comment>
<comment xml:lang="pt_BR">Biblioteca compartilhada libtool</comment>
<comment xml:lang="ro">bibliotecă partajată libtool</comment>
- <comment xml:lang="ru">разделяемая библиотека libtool</comment>
+ <comment xml:lang="ru">Разделяемая библиотека libtool</comment>
<comment xml:lang="sk">Zdieľaná knižnica libtool</comment>
<comment xml:lang="sl">Souporabna knjižnica libtool</comment>
<comment xml:lang="sq">Librari e përbashkët libtool</comment>
@@ -18848,7 +19441,7 @@
<comment xml:lang="pt">biblioteca partilhada</comment>
<comment xml:lang="pt_BR">Biblioteca compartilhada</comment>
<comment xml:lang="ro">bibliotecă partajată</comment>
- <comment xml:lang="ru">разделяемая библиотека</comment>
+ <comment xml:lang="ru">Разделяемая библиотека</comment>
<comment xml:lang="sk">Zdieľaná knižnica</comment>
<comment xml:lang="sl">souporabljena knjižnica</comment>
<comment xml:lang="sq">Librari e përbashkët</comment>
@@ -18883,7 +19476,7 @@
<comment xml:lang="az">qabıq skripti</comment>
<comment xml:lang="be@latin">skrypt abałonki</comment>
<comment xml:lang="bg">Скрипт на обвивката</comment>
- <comment xml:lang="ca">script de shell</comment>
+ <comment xml:lang="ca">script shell</comment>
<comment xml:lang="cs">skript shellu</comment>
<comment xml:lang="cy">sgript plisgyn</comment>
<comment xml:lang="da">skalprogram</comment>
@@ -18899,7 +19492,7 @@
<comment xml:lang="ga">script bhlaoisce</comment>
<comment xml:lang="gl">script de shell</comment>
<comment xml:lang="he">תסריט מעטפת</comment>
- <comment xml:lang="hr">skripta ljuske</comment>
+ <comment xml:lang="hr">Skripta ljuske</comment>
<comment xml:lang="hu">héj-parancsfájl</comment>
<comment xml:lang="ia">Script de shell</comment>
<comment xml:lang="id">skrip shell</comment>
@@ -18918,7 +19511,7 @@
<comment xml:lang="pt">script de terminal</comment>
<comment xml:lang="pt_BR">Script shell</comment>
<comment xml:lang="ro">script shell</comment>
- <comment xml:lang="ru">сценарий оболочки UNIX</comment>
+ <comment xml:lang="ru">Сценарий shell</comment>
<comment xml:lang="sk">Skript shellu</comment>
<comment xml:lang="sl">lupinski skript</comment>
<comment xml:lang="sq">Script shell</comment>
@@ -18987,7 +19580,7 @@
<comment xml:lang="pt">ficheiro Shockwave Flash</comment>
<comment xml:lang="pt_BR">Arquivo Shockwave Flash</comment>
<comment xml:lang="ro">Fișier Shockwave Flash</comment>
- <comment xml:lang="ru">файл Shockwave Flash</comment>
+ <comment xml:lang="ru">Файл Shockwave Flash</comment>
<comment xml:lang="sk">Súbor Shockwave Flash</comment>
<comment xml:lang="sl">Datoteka Shockwave Flash</comment>
<comment xml:lang="sq">File Flash Shockwave</comment>
@@ -19029,7 +19622,7 @@
<comment xml:lang="ga">fuaim Shorten</comment>
<comment xml:lang="gl">son Shorten</comment>
<comment xml:lang="he">שמע של Shorten</comment>
- <comment xml:lang="hr">Shorten audio</comment>
+ <comment xml:lang="hr">Shorten zvučni zapis</comment>
<comment xml:lang="hu">Shorten hang</comment>
<comment xml:lang="ia">Audio Shorten</comment>
<comment xml:lang="id">Audio Shorten</comment>
@@ -19047,7 +19640,7 @@
<comment xml:lang="pt">áudio Shorten</comment>
<comment xml:lang="pt_BR">Áudio Shorten</comment>
<comment xml:lang="ro">Audio Shorten</comment>
- <comment xml:lang="ru">аудио Shorten</comment>
+ <comment xml:lang="ru">Аудио Shorten</comment>
<comment xml:lang="sk">Zvuk Shorten</comment>
<comment xml:lang="sl">Zvočna datoteka Shorten</comment>
<comment xml:lang="sq">Audio Shorten</comment>
@@ -19104,7 +19697,7 @@
<comment xml:lang="pt">folha de cálculo Siag</comment>
<comment xml:lang="pt_BR">Planilha do Siag</comment>
<comment xml:lang="ro">Foaie de calcul Siag</comment>
- <comment xml:lang="ru">электронная таблица Siag</comment>
+ <comment xml:lang="ru">Электронная таблица Siag</comment>
<comment xml:lang="sk">Zošit Siag</comment>
<comment xml:lang="sl">Preglednica Siag</comment>
<comment xml:lang="sq">Fletë llogaritjesh Siag</comment>
@@ -19113,7 +19706,7 @@
<comment xml:lang="tr">Siag çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця Siag</comment>
<comment xml:lang="vi">Bảng tính Slag</comment>
- <comment xml:lang="zh_CN">Siag 工作簿</comment>
+ <comment xml:lang="zh_CN">Siag 电子表格</comment>
<comment xml:lang="zh_TW">Siag 試算表</comment>
<generic-icon name="x-office-spreadsheet"/>
<glob pattern="*.siag"/>
@@ -19121,6 +19714,7 @@
<mime-type type="image/x-skencil">
<comment>Skencil document</comment>
<comment xml:lang="ar">مستند Skencil</comment>
+ <comment xml:lang="ast">Documentu de Skencil</comment>
<comment xml:lang="be@latin">Dakument Skencil</comment>
<comment xml:lang="bg">Документ — Skencil</comment>
<comment xml:lang="ca">document Skencil</comment>
@@ -19155,7 +19749,7 @@
<comment xml:lang="pt">documento Skencil</comment>
<comment xml:lang="pt_BR">Documento do Skencil</comment>
<comment xml:lang="ro">Document Skencil</comment>
- <comment xml:lang="ru">документ Skencil</comment>
+ <comment xml:lang="ru">Документ Skencil</comment>
<comment xml:lang="sk">Dokument Skencil</comment>
<comment xml:lang="sl">Dokument Skencil</comment>
<comment xml:lang="sq">Dokument Skencil</comment>
@@ -19213,7 +19807,7 @@
<comment xml:lang="pt">pacote Stampede</comment>
<comment xml:lang="pt_BR">Pacote Stampede</comment>
<comment xml:lang="ro">Pachet Stampede</comment>
- <comment xml:lang="ru">пакет Stampede</comment>
+ <comment xml:lang="ru">Пакет Stampede</comment>
<comment xml:lang="sk">Balíček Stampede</comment>
<comment xml:lang="sl">Datoteka paketa Stampede</comment>
<comment xml:lang="sq">Paketë Stampede</comment>
@@ -19229,18 +19823,28 @@
<mime-type type="application/x-sg1000-rom">
<comment>SG-1000 ROM</comment>
<comment xml:lang="ca">ROM de SG-1000</comment>
+ <comment xml:lang="cs">ROM pro SG-1000</comment>
<comment xml:lang="da">SG-1000 ROM</comment>
<comment xml:lang="de">SG-1000 ROM</comment>
+ <comment xml:lang="en_GB">SG-1000 ROM</comment>
<comment xml:lang="es">ROM de SG-1000</comment>
+ <comment xml:lang="eu">SG-1000 ROM</comment>
<comment xml:lang="fi">SG-1000 -ROM</comment>
<comment xml:lang="fr">ROM SG-1000</comment>
+ <comment xml:lang="ga">ROM SG-1000</comment>
+ <comment xml:lang="hr">SG-1000 ROM</comment>
<comment xml:lang="hu">SG-1000 ROM</comment>
+ <comment xml:lang="id">ROM SG-1000</comment>
+ <comment xml:lang="it">ROM SG-1000</comment>
<comment xml:lang="kk">SG-1000 ROM</comment>
<comment xml:lang="ko">SG-1000 롬</comment>
<comment xml:lang="pl">Plik ROM konsoli SG-1000</comment>
<comment xml:lang="pt_BR">ROM de SG-1000</comment>
<comment xml:lang="ru">SG-1000 ROM</comment>
<comment xml:lang="sk">ROM pre SG-1000</comment>
+ <comment xml:lang="sr">СГ-1000 РОМ</comment>
+ <comment xml:lang="sv">SG-1000-rom</comment>
+ <comment xml:lang="tr">SG-1000 ROM</comment>
<comment xml:lang="uk">ППП SG-1000</comment>
<comment xml:lang="zh_CN">SG-1000 ROM</comment>
<comment xml:lang="zh_TW">SG-1000 ROM</comment>
@@ -19251,18 +19855,28 @@
<comment>Master System ROM</comment>
<comment xml:lang="ca">ROM de Master System</comment>
+ <comment xml:lang="cs">ROM pro Master System</comment>
<comment xml:lang="da">Master System ROM</comment>
<comment xml:lang="de">Master System ROM</comment>
+ <comment xml:lang="en_GB">Master System ROM</comment>
<comment xml:lang="es">ROM de Master System</comment>
+ <comment xml:lang="eu">Master System ROM</comment>
<comment xml:lang="fi">Master System -ROM</comment>
<comment xml:lang="fr">ROM Master System</comment>
+ <comment xml:lang="ga">ROM Master System</comment>
+ <comment xml:lang="hr">Master System ROM</comment>
<comment xml:lang="hu">Master System ROM</comment>
+ <comment xml:lang="id">ROM Master System</comment>
+ <comment xml:lang="it">ROM Master System</comment>
<comment xml:lang="kk">Master System ROM</comment>
<comment xml:lang="ko">마스터 시스템 롬</comment>
<comment xml:lang="pl">Plik ROM konsoli SMS</comment>
<comment xml:lang="pt_BR">ROM de Master System</comment>
<comment xml:lang="ru">Master System ROM</comment>
<comment xml:lang="sk">ROM pre Master System</comment>
+ <comment xml:lang="sr">Мастер Систем РОМ</comment>
+ <comment xml:lang="sv">Master System-rom</comment>
+ <comment xml:lang="tr">Master System ROM</comment>
<comment xml:lang="uk">ППП Master System</comment>
<comment xml:lang="zh_CN">Master System ROM</comment>
<comment xml:lang="zh_TW">Master System ROM</comment>
@@ -19273,18 +19887,28 @@
<mime-type type="application/x-gamegear-rom">
<comment>Game Gear ROM</comment>
<comment xml:lang="ca">ROM de Game Gear</comment>
+ <comment xml:lang="cs">ROM pro Game Gear</comment>
<comment xml:lang="da">Game Gear ROM</comment>
<comment xml:lang="de">Game Gear ROM</comment>
+ <comment xml:lang="en_GB">Game Gear ROM</comment>
<comment xml:lang="es">ROM de Game Gear</comment>
+ <comment xml:lang="eu">Game Gear ROM</comment>
<comment xml:lang="fi">Game Gear -ROM</comment>
<comment xml:lang="fr">ROM Game Gear</comment>
+ <comment xml:lang="ga">ROM Game Gear</comment>
+ <comment xml:lang="hr">Game Gear ROM</comment>
<comment xml:lang="hu">Game Gear ROM</comment>
+ <comment xml:lang="id">ROM Game Gear</comment>
+ <comment xml:lang="it">ROM Game Gear</comment>
<comment xml:lang="kk">Game Gear ROM</comment>
<comment xml:lang="ko">게임 기어 롬</comment>
<comment xml:lang="pl">Plik ROM konsoli Game Gear</comment>
<comment xml:lang="pt_BR">ROM de Game Gear</comment>
<comment xml:lang="ru">Game Gear ROM</comment>
<comment xml:lang="sk">ROM pre Game Gear</comment>
+ <comment xml:lang="sr">Гејм Гир РОМ</comment>
+ <comment xml:lang="sv">Game Gear-rom</comment>
+ <comment xml:lang="tr">Game Gear ROM</comment>
<comment xml:lang="uk">ППП Game Gear</comment>
<comment xml:lang="zh_CN">Game Gear ROM</comment>
<comment xml:lang="zh_TW">Game Gear ROM</comment>
@@ -19328,7 +19952,7 @@
<comment xml:lang="oc">ROM Super Nintendo</comment>
<comment xml:lang="pl">Plik ROM konsoli SNES</comment>
<comment xml:lang="pt">ROM Super Nintendo</comment>
- <comment xml:lang="pt_BR">ROM do Super Nintendo</comment>
+ <comment xml:lang="pt_BR">ROM de Super Nintendo</comment>
<comment xml:lang="ro">ROM Super Nintendo</comment>
<comment xml:lang="ru">Super NES ROM</comment>
<comment xml:lang="sk">ROM pre Super Nintendo</comment>
@@ -19384,7 +20008,7 @@
<comment xml:lang="pt">arquivo StuffIt</comment>
<comment xml:lang="pt_BR">Pacote StuffIt</comment>
<comment xml:lang="ro">Arhivă StuffIt</comment>
- <comment xml:lang="ru">архив StuffIt</comment>
+ <comment xml:lang="ru">Архив StuffIt</comment>
<comment xml:lang="sk">Archív StuffIt</comment>
<comment xml:lang="sl">Datoteka arhiva StuffIt</comment>
<comment xml:lang="sq">Arkiv StuffIt</comment>
@@ -19424,7 +20048,7 @@
<comment xml:lang="ga">fotheidil SubRip</comment>
<comment xml:lang="gl">subtítulos SubRip</comment>
<comment xml:lang="he">כתוביות של SubRip</comment>
- <comment xml:lang="hr">SubRip titlovi</comment>
+ <comment xml:lang="hr">SubRip podnaslovi</comment>
<comment xml:lang="hu">SubRip feliratok</comment>
<comment xml:lang="ia">Subtitulos SubRip</comment>
<comment xml:lang="id">Subjudul SubRip</comment>
@@ -19442,7 +20066,7 @@
<comment xml:lang="pt">legendas SubRip</comment>
<comment xml:lang="pt_BR">Legendas SubRip</comment>
<comment xml:lang="ro">Subtitrare SubRip</comment>
- <comment xml:lang="ru">субтитры SubRip</comment>
+ <comment xml:lang="ru">Субтитры SubRip</comment>
<comment xml:lang="sk">Titulky SubRip</comment>
<comment xml:lang="sl">Datoteka podnapisov SubRip</comment>
<comment xml:lang="sq">Nëntituj SubRip</comment>
@@ -19476,12 +20100,13 @@
<comment xml:lang="eu">WebVTT azpitituluak</comment>
<comment xml:lang="fi">WebVTT-tekstitykset</comment>
<comment xml:lang="fr">sous-titres WebVTT</comment>
+ <comment xml:lang="ga">fotheidil WebVTT</comment>
<comment xml:lang="gl">subtítulos WebVTT</comment>
<comment xml:lang="he">כתוביות WebVTT</comment>
- <comment xml:lang="hr">WebVTT titlovi</comment>
+ <comment xml:lang="hr">WebVTT podnaslovi</comment>
<comment xml:lang="hu">WebVTT feliratok</comment>
<comment xml:lang="ia">Subtitulos WebVTT</comment>
- <comment xml:lang="id">Subtitel WebVTT</comment>
+ <comment xml:lang="id">Subjudul WebVTT</comment>
<comment xml:lang="it">Sottotitoli WebVTT</comment>
<comment xml:lang="ja">WebVTT サブタイトル</comment>
<comment xml:lang="ka">WebVTT ქვეტიტრები</comment>
@@ -19493,7 +20118,7 @@
<comment xml:lang="pl">Napisy WebVTT</comment>
<comment xml:lang="pt">legendas WebVTT</comment>
<comment xml:lang="pt_BR">Legendas WebVTT</comment>
- <comment xml:lang="ru">субтитры WebVTT</comment>
+ <comment xml:lang="ru">Субтитры WebVTT</comment>
<comment xml:lang="sk">Titulky WebVTT</comment>
<comment xml:lang="sl">Podnapisi WebVTT</comment>
<comment xml:lang="sr">Веб ВТТ преводи</comment>
@@ -19531,7 +20156,7 @@
<comment xml:lang="ga">fotheidil SAMI</comment>
<comment xml:lang="gl">subtítulos SAMI</comment>
<comment xml:lang="he">כתוביות SAMI</comment>
- <comment xml:lang="hr">SAMI titlovi</comment>
+ <comment xml:lang="hr">SAMI podnaslovi</comment>
<comment xml:lang="hu">SAMI feliratok</comment>
<comment xml:lang="ia">Subtitulos SAMI</comment>
<comment xml:lang="id">Subjudul SAMI</comment>
@@ -19549,7 +20174,7 @@
<comment xml:lang="pt">legendas SAMI</comment>
<comment xml:lang="pt_BR">Legendas SAMI</comment>
<comment xml:lang="ro">Subtitrări SAMI</comment>
- <comment xml:lang="ru">субтитры SAMI</comment>
+ <comment xml:lang="ru">Субтитры SAMI</comment>
<comment xml:lang="sk">Titulky SAMI</comment>
<comment xml:lang="sl">Datoteka podnapisov SAMI</comment>
<comment xml:lang="sq">Nëntituj SAMI</comment>
@@ -19590,7 +20215,7 @@
<comment xml:lang="ga">fotheidil MicroDVD</comment>
<comment xml:lang="gl">subtítulos de MicroDVD</comment>
<comment xml:lang="he">כתוביות של MicroDVD</comment>
- <comment xml:lang="hr">MicroDVD titlovi</comment>
+ <comment xml:lang="hr">MicroDVD podnaslovi</comment>
<comment xml:lang="hu">MicroDVD feliratok</comment>
<comment xml:lang="ia">Subtitulos MicroDVD</comment>
<comment xml:lang="id">Subjudul MicroDVD</comment>
@@ -19609,7 +20234,7 @@
<comment xml:lang="pt">legendas MicroDVD</comment>
<comment xml:lang="pt_BR">Legendas MicroDVD</comment>
<comment xml:lang="ro">Subtitrări MicroDVD</comment>
- <comment xml:lang="ru">субтитры MicroDVD</comment>
+ <comment xml:lang="ru">Субтитры MicroDVD</comment>
<comment xml:lang="sk">Titulky MicroDVD</comment>
<comment xml:lang="sl">Datoteka podnapisov MicroDVD</comment>
<comment xml:lang="sq">Nëntituj MicroDVD</comment>
@@ -19648,7 +20273,7 @@
<comment xml:lang="ga">fotheidil MPSub</comment>
<comment xml:lang="gl">subtítulos MPSub</comment>
<comment xml:lang="he">כתוביות MPSub</comment>
- <comment xml:lang="hr">MPSub titlovi</comment>
+ <comment xml:lang="hr">MPSub podnaslovi</comment>
<comment xml:lang="hu">MPSub feliratok</comment>
<comment xml:lang="ia">Subtitulos MPSub</comment>
<comment xml:lang="id">Subjudul MPSub</comment>
@@ -19667,7 +20292,7 @@
<comment xml:lang="pt">legendas MPSub</comment>
<comment xml:lang="pt_BR">Legendas MPSub</comment>
<comment xml:lang="ro">Subtitrări MPSub</comment>
- <comment xml:lang="ru">субтитры MPSub</comment>
+ <comment xml:lang="ru">Субтитры MPSub</comment>
<comment xml:lang="sk">Titulky MPSub</comment>
<comment xml:lang="sl">Datoteka podnapisov MPSub</comment>
<comment xml:lang="sq">Nëntituj MPSub</comment>
@@ -19706,7 +20331,7 @@
<comment xml:lang="ga">fotheidil SSA</comment>
<comment xml:lang="gl">Subtitulos SSA</comment>
<comment xml:lang="he">כתובית SSA</comment>
- <comment xml:lang="hr">SSA titlovi</comment>
+ <comment xml:lang="hr">SSA podnaslovi</comment>
<comment xml:lang="hu">SSA feliratok</comment>
<comment xml:lang="ia">Subtitulos SSA</comment>
<comment xml:lang="id">Subjudul SSA</comment>
@@ -19724,7 +20349,7 @@
<comment xml:lang="pt">legendas SSA</comment>
<comment xml:lang="pt_BR">Legendas SSA</comment>
<comment xml:lang="ro">Subtitrări SSA</comment>
- <comment xml:lang="ru">субтитры SSA</comment>
+ <comment xml:lang="ru">Субтитры SSA</comment>
<comment xml:lang="sk">Titulky SSA</comment>
<comment xml:lang="sl">Datoteka podnapisov SSA</comment>
<comment xml:lang="sq">Nëntituj SSA</comment>
@@ -19765,7 +20390,7 @@
<comment xml:lang="ga">fotheidil SubViewer</comment>
<comment xml:lang="gl">subtítulos SubViewer</comment>
<comment xml:lang="he">כתוביות של SubViewer</comment>
- <comment xml:lang="hr">SubViewer titlovi</comment>
+ <comment xml:lang="hr">SubViewer podnaslovi</comment>
<comment xml:lang="hu">SubViewer feliratok</comment>
<comment xml:lang="ia">Subtitulos SubViewer</comment>
<comment xml:lang="id">Subjudul SubViewer</comment>
@@ -19783,7 +20408,7 @@
<comment xml:lang="pt">legendas SubViewer</comment>
<comment xml:lang="pt_BR">Legendas SubViewer</comment>
<comment xml:lang="ro">Subtitrare SubViewer</comment>
- <comment xml:lang="ru">субтитры SubViewer</comment>
+ <comment xml:lang="ru">Субтитры SubViewer</comment>
<comment xml:lang="sk">Titulky SubViewer</comment>
<comment xml:lang="sl">Datoteka podnapisov SubViewer</comment>
<comment xml:lang="sq">Nëntituj SubViewer</comment>
@@ -19819,7 +20444,7 @@
<comment xml:lang="ga">ton buailte iMelody</comment>
<comment xml:lang="gl">Melodía de iMelody</comment>
<comment xml:lang="he">צלצול של iMelody</comment>
- <comment xml:lang="hr">iMelody ton zvonjenja</comment>
+ <comment xml:lang="hr">iMelody melodija zvona</comment>
<comment xml:lang="hu">iMelody csengőhang</comment>
<comment xml:lang="ia">Tono de appello iMelody</comment>
<comment xml:lang="id">nada dering iMelody</comment>
@@ -19837,7 +20462,7 @@
<comment xml:lang="pt">toque iMelody</comment>
<comment xml:lang="pt_BR">Toque de celular do iMelody</comment>
<comment xml:lang="ro">Sonerie iMelody</comment>
- <comment xml:lang="ru">мелодия iMelody</comment>
+ <comment xml:lang="ru">Мелодия iMelody</comment>
<comment xml:lang="sk">Vyzváňacie melódie iMelody</comment>
<comment xml:lang="sl">Zvonjenje iMelody</comment>
<comment xml:lang="sq">Zile iMelody</comment>
@@ -19876,7 +20501,7 @@
<comment xml:lang="ga">fuaim SMAF</comment>
<comment xml:lang="gl">son SMAF</comment>
<comment xml:lang="he">שמע SMAF</comment>
- <comment xml:lang="hr">SMAF audio</comment>
+ <comment xml:lang="hr">SMAF zvučni zapis</comment>
<comment xml:lang="hu">SMAF hang</comment>
<comment xml:lang="ia">Audio SMAF</comment>
<comment xml:lang="id">Audio SMAF</comment>
@@ -19894,7 +20519,7 @@
<comment xml:lang="pt">áudio SMAF</comment>
<comment xml:lang="pt_BR">Áudio SMAF</comment>
<comment xml:lang="ro">Audio SMAF</comment>
- <comment xml:lang="ru">аудио SMAF</comment>
+ <comment xml:lang="ru">Аудио SMAF</comment>
<comment xml:lang="sk">Zvuk SMAF</comment>
<comment xml:lang="sl">Zvočna datoteka SMAF</comment>
<comment xml:lang="sq">Audio SMAF</comment>
@@ -19935,7 +20560,7 @@
<comment xml:lang="ga">seinmliosta MRML</comment>
<comment xml:lang="gl">lista de reprodución MRML</comment>
<comment xml:lang="he">רשימת השמעה MRML</comment>
- <comment xml:lang="hr">MRML popis za reprodukciju</comment>
+ <comment xml:lang="hr">MRML popis izvođenja</comment>
<comment xml:lang="hu">MRML-lejátszólista</comment>
<comment xml:lang="ia">Lista de selection MRML</comment>
<comment xml:lang="id">Senarai putar MRML</comment>
@@ -19954,7 +20579,7 @@
<comment xml:lang="pt">lista de reprodução MRML</comment>
<comment xml:lang="pt_BR">Lista de reprodução do MRML</comment>
<comment xml:lang="ro">Listă redare MRML</comment>
- <comment xml:lang="ru">список воспроизведения MRML</comment>
+ <comment xml:lang="ru">Список воспроизведения MRML</comment>
<comment xml:lang="sk">Zoznam skladieb MRML</comment>
<comment xml:lang="sl">Seznam predvajanja MRML</comment>
<comment xml:lang="sq">Listë titujsh MRML</comment>
@@ -19993,7 +20618,7 @@
<comment xml:lang="ga">fuaim XMF</comment>
<comment xml:lang="gl">son XMF</comment>
<comment xml:lang="he">שמע XMF</comment>
- <comment xml:lang="hr">XMF audio</comment>
+ <comment xml:lang="hr">XMF zvučni zapis</comment>
<comment xml:lang="hu">XMF hang</comment>
<comment xml:lang="ia">Audio XMF</comment>
<comment xml:lang="id">Audio XMF</comment>
@@ -20011,7 +20636,7 @@
<comment xml:lang="pt">aúdio XMF</comment>
<comment xml:lang="pt_BR">Áudio XMF</comment>
<comment xml:lang="ro">Audio XMF</comment>
- <comment xml:lang="ru">аудио XMF</comment>
+ <comment xml:lang="ru">Аудио XMF</comment>
<comment xml:lang="sk">Zvuk XMF</comment>
<comment xml:lang="sl">Zvočna datoteka XMF</comment>
<comment xml:lang="sq">Audio XMF</comment>
@@ -20073,7 +20698,7 @@
<comment xml:lang="pt">arquivo SV4 CPIO</comment>
<comment xml:lang="pt_BR">Pacote SV4 CPIO</comment>
<comment xml:lang="ro">Arhivă SV4 CPIO</comment>
- <comment xml:lang="ru">архив SV4 CPIO</comment>
+ <comment xml:lang="ru">Архив SV4 CPIO</comment>
<comment xml:lang="sk">Archív SV4 CPIO</comment>
<comment xml:lang="sl">Datoteka arhiva SV4 CPIO</comment>
<comment xml:lang="sq">Arkiv SV4 CPIO</comment>
@@ -20126,7 +20751,7 @@
<comment xml:lang="pt">arquivo SV4 CPIO (com CRC)</comment>
<comment xml:lang="pt_BR">Pacote SV4 CPIO (com CRC)</comment>
<comment xml:lang="ro">Arhivă SV4 CPIO (cu CRC)</comment>
- <comment xml:lang="ru">архив SV4 CPIP (с CRC)</comment>
+ <comment xml:lang="ru">Архив SV4 CPIO (с CRC)</comment>
<comment xml:lang="sk">Archív SV4 CPIO (s CRC)</comment>
<comment xml:lang="sl">Datoteka arhiva SV4 CPIO (z razpršilom CRC)</comment>
<comment xml:lang="sq">Arkiv SV4 CPIO (me CRC)</comment>
@@ -20135,7 +20760,7 @@
<comment xml:lang="tr">SV4 CPIO arşivi (CRC ile)</comment>
<comment xml:lang="uk">архів SV4 CPIO (з CRC)</comment>
<comment xml:lang="vi">Kho nén CPIO SV4 (với CRC)</comment>
- <comment xml:lang="zh_CN">SV4 CPIP 归档文件(带有 CRC)</comment>
+ <comment xml:lang="zh_CN">SV4 CPIP 归档文件(带 CRC)</comment>
<comment xml:lang="zh_TW">SV4 CPIO 封存檔 (具有 CRC)</comment>
<generic-icon name="package-x-generic"/>
<glob pattern="*.sv4crc"/>
@@ -20180,7 +20805,7 @@
<comment xml:lang="pt">arquivo Tar</comment>
<comment xml:lang="pt_BR">Pacote Tar</comment>
<comment xml:lang="ro">Arhivă Tar</comment>
- <comment xml:lang="ru">архив TAR</comment>
+ <comment xml:lang="ru">Архив TAR</comment>
<comment xml:lang="sk">Archív tar</comment>
<comment xml:lang="sl">Datoteka arhiva Tar</comment>
<comment xml:lang="sq">Arkiv tar</comment>
@@ -20220,7 +20845,7 @@
<comment xml:lang="ga">cartlann Tar (comhbhrúite)</comment>
<comment xml:lang="gl">arquivo Tar (comprimido)</comment>
<comment xml:lang="he">ארכיון Tar (מכווץ)</comment>
- <comment xml:lang="hr">Tar arhiva (komprimirana)</comment>
+ <comment xml:lang="hr">Tar arhiva (sažeta)</comment>
<comment xml:lang="hu">Tar archívum (tömörített)</comment>
<comment xml:lang="ia">Archivo Tar (comprimite)</comment>
<comment xml:lang="id">Arsip Tar (terkompresi)</comment>
@@ -20238,7 +20863,7 @@
<comment xml:lang="pt">arquivo Tar (comprimido)</comment>
<comment xml:lang="pt_BR">Pacote Tar (compactado)</comment>
<comment xml:lang="ro">Arhivă Tar (comprimată)</comment>
- <comment xml:lang="ru">архив TAR (сжатый)</comment>
+ <comment xml:lang="ru">Архив TAR (сжатый)</comment>
<comment xml:lang="sk">Archív tar (komprimovaný)</comment>
<comment xml:lang="sl">Datoteka arhiva Tar (stisnjen)</comment>
<comment xml:lang="sq">Arkiv tar (i kompresuar)</comment>
@@ -20247,7 +20872,7 @@
<comment xml:lang="tr">Tar arşivi (sıkıştırılmış)</comment>
<comment xml:lang="uk">архів tar (стиснений)</comment>
<comment xml:lang="vi">Kho nén tar (đã nén)</comment>
- <comment xml:lang="zh_CN">Tar 归档文件(压缩)</comment>
+ <comment xml:lang="zh_CN">Tar 归档文件(压缩)</comment>
<comment xml:lang="zh_TW">Tar 封存檔 (UNIX 格式壓縮)</comment>
<sub-class-of type="application/x-compress"/>
<generic-icon name="package-x-generic"/>
@@ -20259,8 +20884,8 @@
<comment xml:lang="ar">ملف الخط العام</comment>
<comment xml:lang="be@latin">zvyčajny fajł šryftu</comment>
<comment xml:lang="bg">Шрифт</comment>
- <comment xml:lang="ca">fitxer genèric de tipus de lletra</comment>
- <comment xml:lang="cs">obecný soubor písma</comment>
+ <comment xml:lang="ca">fitxer de lletra genèrica</comment>
+ <comment xml:lang="cs">obecný soubor s fontem</comment>
<comment xml:lang="da">general skrifttypefil</comment>
<comment xml:lang="de">Allgemeine Schriftdatei</comment>
<comment xml:lang="el">Γενικό αρχείο γραμματοσειράς</comment>
@@ -20274,7 +20899,7 @@
<comment xml:lang="ga">comhad cló ginearálta</comment>
<comment xml:lang="gl">ficheiro de tipo de fonte xenérica</comment>
<comment xml:lang="he">קובץ גופן גנרי</comment>
- <comment xml:lang="hr">općenita datoteka fonta</comment>
+ <comment xml:lang="hr">Izvorna datoteka slova</comment>
<comment xml:lang="hu">általános betűkészletfájl</comment>
<comment xml:lang="ia">File de typo de litteras generic</comment>
<comment xml:lang="id">berkas fonta generik</comment>
@@ -20293,7 +20918,7 @@
<comment xml:lang="pt">ficheiro genérico de letra</comment>
<comment xml:lang="pt_BR">Arquivo de fonte genérico</comment>
<comment xml:lang="ro">fișier de font generic</comment>
- <comment xml:lang="ru">обычный файл шрифта</comment>
+ <comment xml:lang="ru">Обычный файл шрифта</comment>
<comment xml:lang="sk">Obyčajný súbor písma</comment>
<comment xml:lang="sl">izvorna datoteka pisave</comment>
<comment xml:lang="sq">File lloj gërme i përgjithshëm</comment>
@@ -20312,8 +20937,8 @@
<comment xml:lang="ar">ملف الخط المرزم</comment>
<comment xml:lang="be@latin">zapakavany fajł šryftu</comment>
<comment xml:lang="bg">Шрифт — компресиран</comment>
- <comment xml:lang="ca">fitxer empaquetat de tipus de lletra</comment>
- <comment xml:lang="cs">komprimovaný soubor písma</comment>
+ <comment xml:lang="ca">fitxer de lletra empaquetada</comment>
+ <comment xml:lang="cs">komprimovaný soubor s fontem</comment>
<comment xml:lang="da">pakket skrifttypefil</comment>
<comment xml:lang="de">Gepackte Schriftdatei</comment>
<comment xml:lang="el">Αρχείο συμπιεσμένης γραμματοσειράς</comment>
@@ -20327,7 +20952,7 @@
<comment xml:lang="ga">comhad cló pacáilte</comment>
<comment xml:lang="gl">ficheiro de fonte empaquetada</comment>
<comment xml:lang="he">קובץ גופן ארוז</comment>
- <comment xml:lang="hr">pakirana datoteka fonta</comment>
+ <comment xml:lang="hr">Zapakirana datoteka slova</comment>
<comment xml:lang="hu">packed font-fájl</comment>
<comment xml:lang="ia">File de typos de litteras impacchettate</comment>
<comment xml:lang="id">berkas fonta terkemas</comment>
@@ -20346,7 +20971,7 @@
<comment xml:lang="pt">ficheiro de letras empacotadas</comment>
<comment xml:lang="pt_BR">Arquivo de fonte empacotado</comment>
<comment xml:lang="ro">fișier font împachetat</comment>
- <comment xml:lang="ru">сжатый файл шрифта</comment>
+ <comment xml:lang="ru">Сжатый файл шрифта</comment>
<comment xml:lang="sk">Komprimovaný súbor písma</comment>
<comment xml:lang="sl">pakirana datoteka pisave</comment>
<comment xml:lang="sq">File lloj gërmash i kondensuar</comment>
@@ -20363,6 +20988,7 @@
<mime-type type="application/x-tgif">
<comment>TGIF document</comment>
<comment xml:lang="ar">مستند TGIF</comment>
+ <comment xml:lang="ast">Documentu de TGIF</comment>
<comment xml:lang="be@latin">Dakument TGIF</comment>
<comment xml:lang="bg">Документ — TGIF</comment>
<comment xml:lang="ca">document TGIF</comment>
@@ -20399,7 +21025,7 @@
<comment xml:lang="pt">documento TGIF</comment>
<comment xml:lang="pt_BR">Documento TGIF</comment>
<comment xml:lang="ro">Document TGIF</comment>
- <comment xml:lang="ru">документ TGIF</comment>
+ <comment xml:lang="ru">Документ TGIF</comment>
<comment xml:lang="sk">Dokument TGIF</comment>
<comment xml:lang="sl">Dokument TGIF</comment>
<comment xml:lang="sq">Dokument TGIF</comment>
@@ -20438,7 +21064,7 @@
<comment xml:lang="ga">téama</comment>
<comment xml:lang="gl">tema</comment>
<comment xml:lang="he">ערכת נושא</comment>
- <comment xml:lang="hr">tema</comment>
+ <comment xml:lang="hr">Tema</comment>
<comment xml:lang="hu">téma</comment>
<comment xml:lang="ia">Thema</comment>
<comment xml:lang="id">tema</comment>
@@ -20458,7 +21084,7 @@
<comment xml:lang="pt">tema</comment>
<comment xml:lang="pt_BR">Tema</comment>
<comment xml:lang="ro">temă</comment>
- <comment xml:lang="ru">тема</comment>
+ <comment xml:lang="ru">Тема</comment>
<comment xml:lang="sk">Motív</comment>
<comment xml:lang="sl">tema</comment>
<comment xml:lang="sq">Temë</comment>
@@ -20476,6 +21102,7 @@
<mime-type type="application/x-toutdoux">
<comment>ToutDoux document</comment>
<comment xml:lang="ar">مستند ToutDoux</comment>
+ <comment xml:lang="ast">Documentu de ToutDoux</comment>
<comment xml:lang="az">ToutDoux sənədi</comment>
<comment xml:lang="be@latin">Dakument ToutDoux</comment>
<comment xml:lang="bg">Документ — ToutDoux</comment>
@@ -20514,7 +21141,7 @@
<comment xml:lang="pt">documento ToutDoux</comment>
<comment xml:lang="pt_BR">Documento do ToutDoux</comment>
<comment xml:lang="ro">Document ToutDoux</comment>
- <comment xml:lang="ru">документ ToutDoux</comment>
+ <comment xml:lang="ru">Документ ToutDoux</comment>
<comment xml:lang="sk">Dokument ToutDoux</comment>
<comment xml:lang="sl">Dokument ToutDoux</comment>
<comment xml:lang="sq">Dokument ToutDoux</comment>
@@ -20566,7 +21193,7 @@
<comment xml:lang="pt">cópia de segurança</comment>
<comment xml:lang="pt_BR">Arquivo de backup</comment>
<comment xml:lang="ro">fișier de backup</comment>
- <comment xml:lang="ru">резервная копия</comment>
+ <comment xml:lang="ru">Резервная копия</comment>
<comment xml:lang="sk">Záložný súbor</comment>
<comment xml:lang="sl">varnostna kopija datoteke</comment>
<comment xml:lang="sq">File backup</comment>
@@ -20586,6 +21213,7 @@
<mime-type type="text/troff">
<comment>Troff document</comment>
<comment xml:lang="ar">مستند Troff</comment>
+ <comment xml:lang="ast">Documentu de Troff</comment>
<comment xml:lang="az">Troff sənədi</comment>
<comment xml:lang="be@latin">Dakument Troff</comment>
<comment xml:lang="bg">Документ — Troff</comment>
@@ -20624,7 +21252,7 @@
<comment xml:lang="pt">documento Troff</comment>
<comment xml:lang="pt_BR">Documento Troff</comment>
<comment xml:lang="ro">Document Troff</comment>
- <comment xml:lang="ru">документ Troff</comment>
+ <comment xml:lang="ru">Документ Troff</comment>
<comment xml:lang="sk">Dokument troff</comment>
<comment xml:lang="sl">Dokument Troff</comment>
<comment xml:lang="sq">Dokument Troff</comment>
@@ -20657,7 +21285,9 @@
<comment xml:lang="el">Έγγραφο βοήθειας manpage</comment>
<comment xml:lang="en_GB">Manpage manual document</comment>
<comment xml:lang="es">documento de manual de Manpage</comment>
+ <comment xml:lang="eu">Manpage eskuliburu dokumentua</comment>
<comment xml:lang="fr">document manuel Manpage</comment>
+ <comment xml:lang="ga">cáipéis lámhleabhair Man</comment>
<comment xml:lang="he">מסמך תיעוד man</comment>
<comment xml:lang="hr">Manpage dokument priručnika</comment>
<comment xml:lang="hu">Manpage kézikönyv-dokumentum</comment>
@@ -20670,7 +21300,7 @@
<comment xml:lang="pl">Dokument podręcznika stron pomocy</comment>
<comment xml:lang="pt">documento de ajuda Manpage</comment>
<comment xml:lang="pt_BR">Documento Manpage</comment>
- <comment xml:lang="ru">документ справочной системы Manpage</comment>
+ <comment xml:lang="ru">Документ справочной системы Manpage</comment>
<comment xml:lang="sk">Dokument manuálu Manpage</comment>
<comment xml:lang="sr">документ упутства странице упутства</comment>
<comment xml:lang="sv">Manpage-manualdokument</comment>
@@ -20704,7 +21334,7 @@
<comment xml:lang="ga">leathanach lámhleabhair (comhbhrúite)</comment>
<comment xml:lang="gl">páxina de manual (comprimida)</comment>
<comment xml:lang="he">דף עזר (מכווץ)</comment>
- <comment xml:lang="hr">stranica priručnika (komprimirana)</comment>
+ <comment xml:lang="hr">Stranica priručnika (sažeta)</comment>
<comment xml:lang="hu">kézikönyvoldal (tömörített)</comment>
<comment xml:lang="ia">Pagina de manual (comprimite)</comment>
<comment xml:lang="id">halaman manual (terkompresi)</comment>
@@ -20723,7 +21353,7 @@
<comment xml:lang="pt">página de manual (comprimida)</comment>
<comment xml:lang="pt_BR">Página de manual (compactada)</comment>
<comment xml:lang="ro">pagină de manual (comprimată)</comment>
- <comment xml:lang="ru">страница руководства (сжатая)</comment>
+ <comment xml:lang="ru">Страница руководства (сжатая)</comment>
<comment xml:lang="sk">Manuálová stránka (komprimovaná)</comment>
<comment xml:lang="sl">stran priročnika (stisnjena)</comment>
<comment xml:lang="sq">Faqe manuali (e kompresuar)</comment>
@@ -20732,7 +21362,7 @@
<comment xml:lang="tr">kılavuz dosyası (sıkıştırılmış)</comment>
<comment xml:lang="uk">сторінка посібника (стиснена)</comment>
<comment xml:lang="vi">trang hướng dẫn (đã nén)</comment>
- <comment xml:lang="zh_CN">手册页 (压缩)</comment>
+ <comment xml:lang="zh_CN">手册页(压缩)</comment>
<comment xml:lang="zh_TW">手冊頁面 (壓縮版)</comment>
<generic-icon name="text-x-generic"/>
</mime-type>
@@ -20755,7 +21385,7 @@
<comment xml:lang="ga">cartlann Tar (comhbhrúite le LZO)</comment>
<comment xml:lang="gl">arquivo Tar (comprimido con LZO)</comment>
<comment xml:lang="he">ארכיון Tar (מכווץ ע״י LZO)</comment>
- <comment xml:lang="hr">Tar arhiva (komprimirana LZO-om)</comment>
+ <comment xml:lang="hr">Tar arhiva (LZO sažeta)</comment>
<comment xml:lang="hu">Tar archívum (LZO-val tömörítve)</comment>
<comment xml:lang="ia">Archivo Tar (comprimite con LZO)</comment>
<comment xml:lang="id">Arsip Tar (terkompresi LZO)</comment>
@@ -20773,7 +21403,7 @@
<comment xml:lang="pt">arquivo Tar (compressão LZO)</comment>
<comment xml:lang="pt_BR">Pacote Tar (compactado com LZO)</comment>
<comment xml:lang="ro">Arhivă Tar (comprimată LZO)</comment>
- <comment xml:lang="ru">архив TAR (сжатый LZO)</comment>
+ <comment xml:lang="ru">Архив TAR (сжатый lzo)</comment>
<comment xml:lang="sk">Archív tar (komprimovaný pomocou LZO)</comment>
<comment xml:lang="sl">Datoteka arhiva Tar (stisnjen z LZO)</comment>
<comment xml:lang="sq">Arkiv tar (i kompresuar me LZO)</comment>
@@ -20782,7 +21412,7 @@
<comment xml:lang="tr">Tar arşivi (LZO ile sıkıştırılmış)</comment>
<comment xml:lang="uk">архів tar (стиснений LZO)</comment>
<comment xml:lang="vi">Kho nén tar (đã nén LZO)</comment>
- <comment xml:lang="zh_CN">Tar 归档文件(LZO 压缩)</comment>
+ <comment xml:lang="zh_CN">Tar 归档文件(LZO 压缩)</comment>
<comment xml:lang="zh_TW">Tar 封存檔 (LZO 格式壓縮)</comment>
<sub-class-of type="application/x-lzop"/>
<generic-icon name="package-x-generic"/>
@@ -20824,7 +21454,7 @@
<comment xml:lang="pt">arquivo XZ</comment>
<comment xml:lang="pt_BR">Pacote XZ</comment>
<comment xml:lang="ro">Arhivă XZ</comment>
- <comment xml:lang="ru">архив XZ</comment>
+ <comment xml:lang="ru">Архив XZ</comment>
<comment xml:lang="sk">Archív XZ</comment>
<comment xml:lang="sl">Datoteka arhiva XZ</comment>
<comment xml:lang="sr">ИксЗ архива</comment>
@@ -20857,7 +21487,7 @@
<comment xml:lang="ga">cartlann Tar (comhbhrúite le XZ)</comment>
<comment xml:lang="gl">arquivo Tar (comprimido con XZ)</comment>
<comment xml:lang="he">ארכיון Tar (מכווץ ע״י XZ)</comment>
- <comment xml:lang="hr">Tar arhiva (komprimirana XZ-om)</comment>
+ <comment xml:lang="hr">Tar arhiva ( XZ sažeta)</comment>
<comment xml:lang="hu">Tar archívum (XZ-vel tömörítve)</comment>
<comment xml:lang="ia">Archivo Tar (comprimite con XZ)</comment>
<comment xml:lang="id">Arsip Tar (terkompresi XZ)</comment>
@@ -20873,14 +21503,14 @@
<comment xml:lang="pt">arquivo Tar (compressão XZ)</comment>
<comment xml:lang="pt_BR">Pacote Tar (compactado com XZ)</comment>
<comment xml:lang="ro">Arhivă Tar (comprimată XZ)</comment>
- <comment xml:lang="ru">архив TAR (сжатый XZ)</comment>
+ <comment xml:lang="ru">Архив TAR (сжатый xz)</comment>
<comment xml:lang="sk">Archív tar (komprimovaný pomocou XZ)</comment>
<comment xml:lang="sl">Datoteka arhiva Tar (stisnjen z XZ)</comment>
<comment xml:lang="sr">Тар архива (запакована ИксЗ-ом)</comment>
<comment xml:lang="sv">Tar-arkiv (XZ-komprimerat)</comment>
<comment xml:lang="tr">Tar arşivi (XZ ile sıkıştırılmış)</comment>
<comment xml:lang="uk">архів tar (стиснений XZ)</comment>
- <comment xml:lang="zh_CN">Tar 归档文件(XZ 压缩)</comment>
+ <comment xml:lang="zh_CN">Tar 归档文件(XZ 压缩)</comment>
<comment xml:lang="zh_TW">Tar 封存檔 (XZ 格式壓縮)</comment>
<sub-class-of type="application/x-xz"/>
<generic-icon name="package-x-generic"/>
@@ -20889,6 +21519,7 @@
</mime-type>
<mime-type type="application/x-xzpdf">
<comment>PDF document (XZ-compressed)</comment>
+ <comment xml:lang="ast">Documentu PDF (comprimíu en XZ)</comment>
<comment xml:lang="bg">Документ — PDF, компресиран с XZ</comment>
<comment xml:lang="ca">document PDF (amb compressió XZ)</comment>
<comment xml:lang="cs">dokument PDF (komprimovaný pomocí XZ)</comment>
@@ -20900,9 +21531,10 @@
<comment xml:lang="eu">PDF dokumentua (XZ-rekin konprimitua)</comment>
<comment xml:lang="fi">PDF-asiakirja (XZ-pakattu)</comment>
<comment xml:lang="fr">document PDF (compressé XZ)</comment>
+ <comment xml:lang="ga">cáipéis PDF (comhbhrúite le XZ)</comment>
<comment xml:lang="gl">documento PDF (comprimido en XZ)</comment>
<comment xml:lang="he">מסמך PDF (מכווץ ע״י XZ)</comment>
- <comment xml:lang="hr">PDF dokument (komprimiran XZ-om)</comment>
+ <comment xml:lang="hr">PDF dokument ( XZ sažet)</comment>
<comment xml:lang="hu">PDF dokumentum (XZ-vel tömörített)</comment>
<comment xml:lang="ia">Documento PDF (comprimite con XZ)</comment>
<comment xml:lang="id">Dokumen PDF (terkompresi XZ)</comment>
@@ -20917,14 +21549,14 @@
<comment xml:lang="pl">Dokument PDF (kompresja XZ)</comment>
<comment xml:lang="pt">documento PDF (compressão XZ)</comment>
<comment xml:lang="pt_BR">Documento PDF (compactado com XZ)</comment>
- <comment xml:lang="ru">документ PDF (сжатый XZ)</comment>
+ <comment xml:lang="ru">Документ PDF (сжатый xz)</comment>
<comment xml:lang="sk">Dokument PDF (komprimovaný pomocou XZ)</comment>
<comment xml:lang="sl">Dokument PDF (XZ-stisnjen)</comment>
<comment xml:lang="sr">ПДФ документ (запакован ИксЗ-ом)</comment>
<comment xml:lang="sv">PDF-dokument (XZ-komprimerat)</comment>
<comment xml:lang="tr">PDF belgesi (XZ ile sıkıştırılmış)</comment>
<comment xml:lang="uk">документ PDF (стиснений xz)</comment>
- <comment xml:lang="zh_CN">PDF 文档(XZ)</comment>
+ <comment xml:lang="zh_CN">PDF 文档(XZ)</comment>
<comment xml:lang="zh_TW">PDF 文件 (XZ 格式壓縮)</comment>
<sub-class-of type="application/x-xz"/>
<generic-icon name="x-office-document"/>
@@ -20968,7 +21600,7 @@
<comment xml:lang="pt">arquivo Ustar</comment>
<comment xml:lang="pt_BR">Pacote Ustar</comment>
<comment xml:lang="ro">Arhivă Ustar</comment>
- <comment xml:lang="ru">архив Ustar</comment>
+ <comment xml:lang="ru">Архив Ustar</comment>
<comment xml:lang="sk">Archív ustar</comment>
<comment xml:lang="sl">Datoteka arhiva Ustar</comment>
<comment xml:lang="sq">Arkiv Ustar</comment>
@@ -21004,7 +21636,7 @@
<comment xml:lang="ga">cód foinseach WAIS</comment>
<comment xml:lang="gl">código fonte WAIS</comment>
<comment xml:lang="he">קוד מקור של WAIS</comment>
- <comment xml:lang="hr">WAIS izvorni kod</comment>
+ <comment xml:lang="hr">WAIS izvorni kôd</comment>
<comment xml:lang="hu">WAIS-forráskód</comment>
<comment xml:lang="ia">Codice-fonte WAIS</comment>
<comment xml:lang="id">Kode program WAIS</comment>
@@ -21023,7 +21655,7 @@
<comment xml:lang="pt">código origem WAIS</comment>
<comment xml:lang="pt_BR">Código-fonte WAIS</comment>
<comment xml:lang="ro">Cod sursă WAIS</comment>
- <comment xml:lang="ru">исходный код WAIS</comment>
+ <comment xml:lang="ru">Исходный код WAIS</comment>
<comment xml:lang="sk">Zdrojový kód WAIS</comment>
<comment xml:lang="sl">Datoteka izvorne kode WAIS</comment>
<comment xml:lang="sq">Kod burues WAIS</comment>
@@ -21077,7 +21709,7 @@
<comment xml:lang="pt">imagem do WordPerfect/Drawperfect</comment>
<comment xml:lang="pt_BR">Imagem do WordPerfect/Drawperfect</comment>
<comment xml:lang="ro">Imagine WordPerfect/Drawperfect</comment>
- <comment xml:lang="ru">изображение WordPerfect/Drawperfect</comment>
+ <comment xml:lang="ru">Изображение WordPerfect/Drawperfect</comment>
<comment xml:lang="sk">Obrázok WordPerfect/Drawperfect</comment>
<comment xml:lang="sl">Slikovna datoteka Drawperfect</comment>
<comment xml:lang="sq">Figurë WordPerfect/Drawperfect</comment>
@@ -21091,6 +21723,54 @@
<generic-icon name="image-x-generic"/>
<glob pattern="*.wpg"/>
</mime-type>
+ <mime-type type="application/x-wonderswan-rom">
+ <comment>Bandai WonderSwan ROM</comment>
+ <comment xml:lang="ca">ROM de Bandai WonderSwan</comment>
+ <comment xml:lang="cs">ROM pro Bandai WonderSwan</comment>
+ <comment xml:lang="de">Bandai WonderSwan ROM</comment>
+ <comment xml:lang="en_GB">Bandai WonderSwan ROM</comment>
+ <comment xml:lang="es">ROM de Bandai WonderSwan</comment>
+ <comment xml:lang="hr">Bandai WonderSwan ROM</comment>
+ <comment xml:lang="hu">Bandai WonderSwan ROM</comment>
+ <comment xml:lang="id">ROM Bandai WonderSwan</comment>
+ <comment xml:lang="it">ROM Bandai WonderSwan</comment>
+ <comment xml:lang="kk">Bandai WonderSwan ROM</comment>
+ <comment xml:lang="ko">반다이 원더스완 롬</comment>
+ <comment xml:lang="pl">Plik ROM konsoli Bandai WonderSwan</comment>
+ <comment xml:lang="pt_BR">ROM de WonderSwan da Bandai</comment>
+ <comment xml:lang="ru">Bandai WonderSwan ROM</comment>
+ <comment xml:lang="sk">ROM pre Bandai WonderSwan</comment>
+ <comment xml:lang="sv">Bandai WonderSwan-rom</comment>
+ <comment xml:lang="uk">ROM Bandai WonderSwan</comment>
+ <comment xml:lang="zh_CN">万代 WonderSwan ROM</comment>
+ <comment xml:lang="zh_TW">Bandai WonderSwan ROM</comment>
+ <generic-icon name="application-x-executable"/>
+ <glob pattern="*.ws"/>
+ </mime-type>
+ <mime-type type="application/x-wonderswan-color-rom">
+ <comment>Bandai WonderSwan Color ROM</comment>
+ <comment xml:lang="ca">ROM de Bandai WonderSwan Color</comment>
+ <comment xml:lang="cs">ROM pro Bandai WonderSwan Color</comment>
+ <comment xml:lang="de">Bandai WonderSwan Color ROM</comment>
+ <comment xml:lang="en_GB">Bandai WonderSwan Color ROM</comment>
+ <comment xml:lang="es">ROM de Bandai WonderSwan Color</comment>
+ <comment xml:lang="hr">Bandai WonderSwan Color ROM</comment>
+ <comment xml:lang="hu">Bandai WonderSwan Color ROM</comment>
+ <comment xml:lang="id">ROM Bandai WonderSwan Color</comment>
+ <comment xml:lang="it">ROM Bandai WonderSwan Color</comment>
+ <comment xml:lang="kk">Bandai WonderSwan Color ROM</comment>
+ <comment xml:lang="ko">반다이 원더스완 컬러 롬</comment>
+ <comment xml:lang="pl">Plik ROM konsoli Bandai WonderSwan Color</comment>
+ <comment xml:lang="pt_BR">ROM de WonderSwan Color da Bandai</comment>
+ <comment xml:lang="ru">Bandai WonderSwan Color ROM</comment>
+ <comment xml:lang="sk">ROM pre Bandai WonderSwan Color</comment>
+ <comment xml:lang="sv">Bandai WonderSwan Color-rom</comment>
+ <comment xml:lang="uk">ROM Bandai WonderSwan Color</comment>
+ <comment xml:lang="zh_CN">万代 WonderSwan Color ROM</comment>
+ <comment xml:lang="zh_TW">Bandai WonderSwan Color ROM</comment>
+ <generic-icon name="application-x-executable"/>
+ <glob pattern="*.wsc"/>
+ </mime-type>
<mime-type type="application/x-x509-ca-cert">
<comment>DER/PEM/Netscape-encoded X.509 certificate</comment>
<comment xml:lang="ar">شهادة DER/PEM/Netscape-encoded X.509</comment>
@@ -21111,7 +21791,7 @@
<comment xml:lang="ga">teastas X.509 ionchódaithe le DER/PEM/Netscape</comment>
<comment xml:lang="gl">certificado X.509 codificado con DER/PEM/Netscape</comment>
<comment xml:lang="he">אישור מסוג X.509 של DER/PEM/Netscape-encoded</comment>
- <comment xml:lang="hr">DER/PEM/Netscape-kodiran X.509 certifikat</comment>
+ <comment xml:lang="hr">DER/PEM/Netscape-kodiran X.509 vjerodajnica</comment>
<comment xml:lang="hu">DER/PEM/Netscape formátumú X.509-tanúsítvány</comment>
<comment xml:lang="ia">Certificato X.509 codificate in DER/PEM/Netscape</comment>
<comment xml:lang="id">Sertifikat DER/PEM/Netscape-tersandi X.509</comment>
@@ -21131,7 +21811,7 @@
<comment xml:lang="pt">certificado X.509 codificado com DER/PEM/Netscape</comment>
<comment xml:lang="pt_BR">Certificado X.509 codificado com DER/PEM/Netscape</comment>
<comment xml:lang="ro">Certificat DER/PEM/Netscape-codat X.509</comment>
- <comment xml:lang="ru">сертификат X.509 (DER/PEM/Netscape-закодированный)</comment>
+ <comment xml:lang="ru">Сертификат X.509 (DER/PEM/Netscape-закодированный)</comment>
<comment xml:lang="sk">Certifikát X.509 kódovaný ako DER/PEM/Netscape</comment>
<comment xml:lang="sl">Datoteka potrdila DER/PEM/Netscape X.509</comment>
<comment xml:lang="sq">Çertifikatë DER/PEM/Netscape-encoded X.509</comment>
@@ -21151,6 +21831,7 @@
<mime-type type="application/x-zerosize">
<comment>empty document</comment>
<comment xml:lang="ar">مستند فارغ</comment>
+ <comment xml:lang="ast">documentu baleru</comment>
<comment xml:lang="be@latin">pusty dakument</comment>
<comment xml:lang="bg">Празен документ</comment>
<comment xml:lang="ca">document buit</comment>
@@ -21168,7 +21849,7 @@
<comment xml:lang="ga">cáipéis fholamh</comment>
<comment xml:lang="gl">documeto baleiro</comment>
<comment xml:lang="he">מסמך ריק</comment>
- <comment xml:lang="hr">prazan dokument</comment>
+ <comment xml:lang="hr">Prazan dokument</comment>
<comment xml:lang="hu">üres dokumentum</comment>
<comment xml:lang="ia">Documento vacue</comment>
<comment xml:lang="id">dokumen kosong</comment>
@@ -21187,7 +21868,7 @@
<comment xml:lang="pt">documento vazio</comment>
<comment xml:lang="pt_BR">Documento vazio</comment>
<comment xml:lang="ro">document gol</comment>
- <comment xml:lang="ru">пустой документ</comment>
+ <comment xml:lang="ru">Пустой документ</comment>
<comment xml:lang="sk">Prázdny dokument</comment>
<comment xml:lang="sl">prazen dokument</comment>
<comment xml:lang="sq">Dokument bosh</comment>
@@ -21239,7 +21920,7 @@
<comment xml:lang="pt">arquivo Zoo</comment>
<comment xml:lang="pt_BR">Pacote Zoo</comment>
<comment xml:lang="ro">Arhivă Zoo</comment>
- <comment xml:lang="ru">архив ZOO</comment>
+ <comment xml:lang="ru">Архив ZOO</comment>
<comment xml:lang="sk">Archív zoo</comment>
<comment xml:lang="sl">Datoteka arhiva ZOO</comment>
<comment xml:lang="sq">Arkiv zoo</comment>
@@ -21295,7 +21976,7 @@
<comment xml:lang="pt">página XHTML</comment>
<comment xml:lang="pt_BR">Página XHTML</comment>
<comment xml:lang="ro">Pagină XHTML</comment>
- <comment xml:lang="ru">страница XHTML</comment>
+ <comment xml:lang="ru">Страница XHTML</comment>
<comment xml:lang="sk">Stránka XHTML</comment>
<comment xml:lang="sl">Datoteka spletne strani XHTML</comment>
<comment xml:lang="sq">Faqe XHTML</comment>
@@ -21360,7 +22041,7 @@
<comment xml:lang="pt">arquivo Zip</comment>
<comment xml:lang="pt_BR">Pacote Zip</comment>
<comment xml:lang="ro">Arhivă zip</comment>
- <comment xml:lang="ru">архив ZIP</comment>
+ <comment xml:lang="ru">Архив ZIP</comment>
<comment xml:lang="sk">Archív ZIP</comment>
<comment xml:lang="sl">Datoteka arhiva ZIP</comment>
<comment xml:lang="sq">Arkiv zip</comment>
@@ -21391,6 +22072,7 @@
<comment xml:lang="eu">WIM disko irudia</comment>
<comment xml:lang="fi">WIM-levytiedosto</comment>
<comment xml:lang="fr">image disque WIM</comment>
+ <comment xml:lang="ga">íomhá diosca WIM</comment>
<comment xml:lang="he">דמות דיסק WIM</comment>
<comment xml:lang="hr">WIM slika diska</comment>
<comment xml:lang="hu">WIM lemezkép</comment>
@@ -21403,13 +22085,13 @@
<comment xml:lang="pl">Obraz dysku WIM</comment>
<comment xml:lang="pt">imagem de disco WIM</comment>
<comment xml:lang="pt_BR">Imagem de disco WIM</comment>
- <comment xml:lang="ru">образ диска WIM</comment>
+ <comment xml:lang="ru">Образ диска WIM</comment>
<comment xml:lang="sk">Obraz disku WIM</comment>
<comment xml:lang="sr">слика диска ВИМ-а</comment>
<comment xml:lang="sv">WIM-diskavbild</comment>
<comment xml:lang="tr">WIM disk kalıbı</comment>
<comment xml:lang="uk">образ диска WIM</comment>
- <comment xml:lang="zh_CN">WIM 磁盘镜像</comment>
+ <comment xml:lang="zh_CN">WIM 磁盘映像</comment>
<comment xml:lang="zh_TW">WIM 磁碟映像檔</comment>
<acronym>WIM</acronym>
<expanded-acronym>Windows Imaging Format</expanded-acronym>
@@ -21441,7 +22123,7 @@
<comment xml:lang="ga">fuaim Dolby Digital</comment>
<comment xml:lang="gl">son Dolby Digital</comment>
<comment xml:lang="he">שמע Dolby Digital</comment>
- <comment xml:lang="hr">Dolby Digital audio</comment>
+ <comment xml:lang="hr">Dolby Digital zvučni zapis</comment>
<comment xml:lang="hu">Dolby Digital hang</comment>
<comment xml:lang="ia">Audio Dolby Digital</comment>
<comment xml:lang="id">Audio Dolby Digital</comment>
@@ -21461,7 +22143,7 @@
<comment xml:lang="pt">áudio Dolby Digital</comment>
<comment xml:lang="pt_BR">Áudio Dolby Digital</comment>
<comment xml:lang="ro">Audio Dolby Digital</comment>
- <comment xml:lang="ru">аудио Dolby Digital</comment>
+ <comment xml:lang="ru">Аудио Dolby Digital</comment>
<comment xml:lang="sk">Zvuk Dolby Digital</comment>
<comment xml:lang="sl">Zvočna datoteka Dolby Digital</comment>
<comment xml:lang="sq">Audio Dolby Digital</comment>
@@ -21489,6 +22171,7 @@
<comment xml:lang="eu">DTS audioa</comment>
<comment xml:lang="fi">DTS-ääni</comment>
<comment xml:lang="fr">audio DTS</comment>
+ <comment xml:lang="ga">fuaim DTS</comment>
<comment xml:lang="gl">Son DTS</comment>
<comment xml:lang="he">שמע DTS</comment>
<comment xml:lang="hr">DTS zvučni zapis</comment>
@@ -21501,10 +22184,10 @@
<comment xml:lang="ko">DTS 오디오</comment>
<comment xml:lang="lv">DTS audio</comment>
<comment xml:lang="oc">àudio DTS</comment>
- <comment xml:lang="pl">Dźwięk DTS</comment>
+ <comment xml:lang="pl">Plik dźwiękowy DTS</comment>
<comment xml:lang="pt">aúdio DTS</comment>
<comment xml:lang="pt_BR">Áudio DTS</comment>
- <comment xml:lang="ru">аудио DTS</comment>
+ <comment xml:lang="ru">Аудио DTS</comment>
<comment xml:lang="sk">Zvuk DTS</comment>
<comment xml:lang="sl">Zvok DTS</comment>
<comment xml:lang="sr">ДТС звук</comment>
@@ -21534,6 +22217,7 @@
<comment xml:lang="eu">DTSHD audioa</comment>
<comment xml:lang="fi">DTS-HD-ääni</comment>
<comment xml:lang="fr">audio DTSHD</comment>
+ <comment xml:lang="ga">fuaim DTSHD</comment>
<comment xml:lang="gl">Son DTSHD</comment>
<comment xml:lang="he">שמע DTSHD</comment>
<comment xml:lang="hr">DTSHD zvučni zapis</comment>
@@ -21546,10 +22230,10 @@
<comment xml:lang="ko">DTSHD 오디오</comment>
<comment xml:lang="lv">DTSHD audio</comment>
<comment xml:lang="oc">àudio DTSHD</comment>
- <comment xml:lang="pl">Dźwięk DTSHD</comment>
+ <comment xml:lang="pl">Plik dźwiękowy DTSHD</comment>
<comment xml:lang="pt">áudio DTSHD</comment>
<comment xml:lang="pt_BR">Áudio DTSHD</comment>
- <comment xml:lang="ru">аудио DTSHD</comment>
+ <comment xml:lang="ru">Аудио DTSHD</comment>
<comment xml:lang="sk">Zvuk DTSHD</comment>
<comment xml:lang="sl">Zvok DTSHD</comment>
<comment xml:lang="sr">ДТСХД звук</comment>
@@ -21585,7 +22269,7 @@
<comment xml:lang="ga">fuaim AMR</comment>
<comment xml:lang="gl">son AMR</comment>
<comment xml:lang="he">שמע AMR</comment>
- <comment xml:lang="hr">AMR audio</comment>
+ <comment xml:lang="hr">AMR zvučni zapis</comment>
<comment xml:lang="hu">AMR hang</comment>
<comment xml:lang="ia">Audio AMR</comment>
<comment xml:lang="id">Audio AMR</comment>
@@ -21604,7 +22288,7 @@
<comment xml:lang="pt">áudio AMR</comment>
<comment xml:lang="pt_BR">Áudio AMR</comment>
<comment xml:lang="ro">Audio AMR</comment>
- <comment xml:lang="ru">аудио AMR</comment>
+ <comment xml:lang="ru">Аудио AMR</comment>
<comment xml:lang="sk">Zvuk AMR</comment>
<comment xml:lang="sl">Zvočna datoteka AMR</comment>
<comment xml:lang="sq">Audio AMR</comment>
@@ -21644,7 +22328,7 @@
<comment xml:lang="ga">fuaim AMR-WB</comment>
<comment xml:lang="gl">son AMR-WB</comment>
<comment xml:lang="he">שמע AMR-WN</comment>
- <comment xml:lang="hr">AMR-WB audio</comment>
+ <comment xml:lang="hr">AMR-WB zvučni zapis</comment>
<comment xml:lang="hu">AMR-WB hang</comment>
<comment xml:lang="ia">Audio AMR-WB</comment>
<comment xml:lang="id">Audio AMR-WB</comment>
@@ -21663,7 +22347,7 @@
<comment xml:lang="pt">áudio AMR-WB</comment>
<comment xml:lang="pt_BR">Áudio AMR-WB</comment>
<comment xml:lang="ro">Audio AMR-WB</comment>
- <comment xml:lang="ru">аудио AMR-WB</comment>
+ <comment xml:lang="ru">Аудио AMR-WB</comment>
<comment xml:lang="sk">Zvuk AMR-WB</comment>
<comment xml:lang="sl">Zvočna datoteka AMR-WB</comment>
<comment xml:lang="sq">Audio AMR-WB</comment>
@@ -21724,7 +22408,7 @@
<comment xml:lang="pt">áudio ULAW (Sun)</comment>
<comment xml:lang="pt_BR">Áudio ULAW (Sun)</comment>
<comment xml:lang="ro">Fișier audio ULAW (Sun)</comment>
- <comment xml:lang="ru">аудио ULAW (Sun)</comment>
+ <comment xml:lang="ru">Аудио ULAW (Sun)</comment>
<comment xml:lang="sk">Zvuk ULAW (Sun)</comment>
<comment xml:lang="sl">Zvočna datoteka ULAW (Sun)</comment>
<comment xml:lang="sq">Audio ULAW (Sun)</comment>
@@ -21761,7 +22445,7 @@
<comment xml:lang="ga">fuaim Commodore 64</comment>
<comment xml:lang="gl">son de Commodore 64</comment>
<comment xml:lang="he">שמע של Commodore 64</comment>
- <comment xml:lang="hr">Commodore 64 audio</comment>
+ <comment xml:lang="hr">Commodore 64 zvučni zapis</comment>
<comment xml:lang="hu">Commodore 64 hang</comment>
<comment xml:lang="ia">Audio Commodore 64</comment>
<comment xml:lang="id">Audio Commodore 64</comment>
@@ -21781,7 +22465,7 @@
<comment xml:lang="pt">áudio Commodore 64</comment>
<comment xml:lang="pt_BR">Áudio Commodore 64</comment>
<comment xml:lang="ro">Audio Commodore 64</comment>
- <comment xml:lang="ru">аудио Commodore 64</comment>
+ <comment xml:lang="ru">Аудио Commodore 64</comment>
<comment xml:lang="sk">Zvuk Commodore 64</comment>
<comment xml:lang="sl">Zvočna datoteka Commodore 64</comment>
<comment xml:lang="sq">Audio Commodore 64</comment>
@@ -21839,7 +22523,7 @@
<comment xml:lang="pt">áudio PCM</comment>
<comment xml:lang="pt_BR">Áudio PCM</comment>
<comment xml:lang="ro">Audio PCM</comment>
- <comment xml:lang="ru">аудио PCM</comment>
+ <comment xml:lang="ru">Аудио PCM</comment>
<comment xml:lang="sk">Zvuk PCM</comment>
<comment xml:lang="sl">Zvočna datoteka PCM</comment>
<comment xml:lang="sq">Audio PCM</comment>
@@ -21888,7 +22572,7 @@
<comment xml:lang="ga">fuaim AIFC</comment>
<comment xml:lang="gl">son AIFC</comment>
<comment xml:lang="he">שמע AIFC</comment>
- <comment xml:lang="hr">AIFC audio</comment>
+ <comment xml:lang="hr">AIFC zvučni zapis</comment>
<comment xml:lang="hu">AIFC hang</comment>
<comment xml:lang="ia">Audio AIFC</comment>
<comment xml:lang="id">Audio AIFC</comment>
@@ -21908,7 +22592,7 @@
<comment xml:lang="pt">áudio AIFC</comment>
<comment xml:lang="pt_BR">Áudio AIFC</comment>
<comment xml:lang="ro">Fișier audio AIFC</comment>
- <comment xml:lang="ru">аудио AIFC</comment>
+ <comment xml:lang="ru">Аудио AIFC</comment>
<comment xml:lang="sk">Zvuk AIFC</comment>
<comment xml:lang="sl">Zvočna datoteka AIFC</comment>
<comment xml:lang="sq">Audio AIFC</comment>
@@ -21951,7 +22635,7 @@
<comment xml:lang="ga">fuaim AIFF/Amiga/Mac</comment>
<comment xml:lang="gl">son AIFF/Amiga/Mac</comment>
<comment xml:lang="he">שמע AIFF/Amiga/Mac</comment>
- <comment xml:lang="hr">AIFF/Amiga/Mac audio</comment>
+ <comment xml:lang="hr">AIFF/Amiga/Mac zvučni zapis</comment>
<comment xml:lang="hu">AIFF/Amiga/Mac hang</comment>
<comment xml:lang="ia">Audio AIFF/Amiga/Mac</comment>
<comment xml:lang="id">Audio AIFF/Amiga/Mac</comment>
@@ -21971,7 +22655,7 @@
<comment xml:lang="pt">áudio AIFF/Amiga/Mac</comment>
<comment xml:lang="pt_BR">Áudio AIFF/Amiga/Mac</comment>
<comment xml:lang="ro">Audio AIFF/Amiga/Mac</comment>
- <comment xml:lang="ru">аудио AIFF/Amiga/Mac</comment>
+ <comment xml:lang="ru">Аудио AIFF/Amiga/Mac</comment>
<comment xml:lang="sk">Zvuk AIFF/Amiga/Mac</comment>
<comment xml:lang="sl">Zvočna datoteka AIFF/Amiga/Mac</comment>
<comment xml:lang="sq">Audio AIFF/Amiga/Mac</comment>
@@ -22029,7 +22713,7 @@
<comment xml:lang="pt">áudio Monkey</comment>
<comment xml:lang="pt_BR">Áudio Monkey's</comment>
<comment xml:lang="ro">Audio Monkey's</comment>
- <comment xml:lang="ru">аудио Monkey's</comment>
+ <comment xml:lang="ru">Аудио Monkey's</comment>
<comment xml:lang="sk">Zvuk Monkey's</comment>
<comment xml:lang="sl">Zvočna datoteka Monkey</comment>
<comment xml:lang="sq">Audio Monkey's</comment>
@@ -22038,13 +22722,44 @@
<comment xml:lang="tr">Monkey's sesi</comment>
<comment xml:lang="uk">звук Monkey's</comment>
<comment xml:lang="vi">Âm thanh cua Monkey</comment>
- <comment xml:lang="zh_CN">Monkey's audio 音频</comment>
+ <comment xml:lang="zh_CN">Monkey's Audio 音频</comment>
<comment xml:lang="zh_TW">Monkey's 音訊</comment>
<magic priority="50">
<match value="MAC " type="string" offset="0"/>
</magic>
<glob pattern="*.ape"/>
</mime-type>
+ <mime-type type="audio/x-pn-audibleaudio">
+ <comment>Audible.Com audio</comment>
+ <comment xml:lang="ca">àudio Audible.Com</comment>
+ <comment xml:lang="cs">zvuk Audible.Com</comment>
+ <comment xml:lang="de">Audible.Com-Audio</comment>
+ <comment xml:lang="en_GB">Audible.Com audio</comment>
+ <comment xml:lang="es">sonido de Audible.com</comment>
+ <comment xml:lang="hr">Audible.Com zvučni zapis</comment>
+ <comment xml:lang="hu">Audible.Com hang</comment>
+ <comment xml:lang="id">Audio Audible.Com</comment>
+ <comment xml:lang="it">Audio Audible.Com</comment>
+ <comment xml:lang="kk">Audible.Com аудиосы</comment>
+ <comment xml:lang="ko">Audible.Com 오디오</comment>
+ <comment xml:lang="pl">Plik dźwiękowy Audible.com</comment>
+ <comment xml:lang="pt_BR">Áudio de audible.com</comment>
+ <comment xml:lang="ru">Аудио Audible.Com</comment>
+ <comment xml:lang="sk">Audio Audible.Com</comment>
+ <comment xml:lang="sv">Audible.Com-ljud</comment>
+ <comment xml:lang="uk">звук Audible.Com</comment>
+ <comment xml:lang="zh_CN">Audible.Com 音频</comment>
+ <comment xml:lang="zh_TW">Audible.Com 音訊</comment>
+ <magic priority="50">
+
+ <match value="1469084982" type="big32" offset="4"/>
+ <match value="aax " type="string" offset="8"/>
+ </magic>
+ <glob pattern="*.aa"/>
+ <glob pattern="*.aax"/>
+ <alias type="audio/vnd.audible"/>
+ <alias type="audio/vnd.audible.aax"/>
+ </mime-type>
<mime-type type="audio/x-it">
<comment>Impulse Tracker audio</comment>
<comment xml:lang="ar">Impulse Tracker سمعي</comment>
@@ -22067,7 +22782,7 @@
<comment xml:lang="ga">fuaim Impulse Tracker</comment>
<comment xml:lang="gl">son de Impulse Tracker</comment>
<comment xml:lang="he">שמע של Impulse Tracker</comment>
- <comment xml:lang="hr">Impulse Tracker audio</comment>
+ <comment xml:lang="hr">Impulse Tracker zvučni zapis</comment>
<comment xml:lang="hu">Impulse Tracker hang</comment>
<comment xml:lang="ia">Audio Impulse Tracker</comment>
<comment xml:lang="id">Audio Impulse Tracker</comment>
@@ -22086,7 +22801,7 @@
<comment xml:lang="pt">áudio Impulse Tracker</comment>
<comment xml:lang="pt_BR">Áudio Impulse Tracker</comment>
<comment xml:lang="ro">Audio Impulse Tracker</comment>
- <comment xml:lang="ru">аудио Impulse Tracker</comment>
+ <comment xml:lang="ru">Аудио Impulse Tracker</comment>
<comment xml:lang="sk">Zvuk Impulse Tracker</comment>
<comment xml:lang="sl">Zvočna datoteka Impulse Tracker</comment>
<comment xml:lang="sq">Audio Impulse Tracker</comment>
@@ -22122,7 +22837,7 @@
<comment xml:lang="ga">fuaim FLAC</comment>
<comment xml:lang="gl">son FLAC</comment>
<comment xml:lang="he">קובץ שמע מסוג FLAC</comment>
- <comment xml:lang="hr">FLAC audio</comment>
+ <comment xml:lang="hr">FLAC zvučni zapis</comment>
<comment xml:lang="hu">FLAC hang</comment>
<comment xml:lang="ia">Audio FLAC</comment>
<comment xml:lang="id">Audio FLAC</comment>
@@ -22142,7 +22857,7 @@
<comment xml:lang="pt">áudio FLAC</comment>
<comment xml:lang="pt_BR">Áudio FLAC</comment>
<comment xml:lang="ro">Audio FLAC</comment>
- <comment xml:lang="ru">аудио FLAC</comment>
+ <comment xml:lang="ru">Аудио FLAC</comment>
<comment xml:lang="sk">Zvuk FLAC</comment>
<comment xml:lang="sl">Zvočna datoteka Flac</comment>
<comment xml:lang="sq">Audio FLAC</comment>
@@ -22179,7 +22894,7 @@
<comment xml:lang="ga">fuaim WavPack</comment>
<comment xml:lang="gl">son WavPack</comment>
<comment xml:lang="he">שמע WavPack</comment>
- <comment xml:lang="hr">WavPack audio</comment>
+ <comment xml:lang="hr">WavPack zvučni zapis</comment>
<comment xml:lang="hu">WavPack hang</comment>
<comment xml:lang="ia">Audio WavPack</comment>
<comment xml:lang="id">Audio WavPack</comment>
@@ -22197,7 +22912,7 @@
<comment xml:lang="pt">áudio WavPack</comment>
<comment xml:lang="pt_BR">Áudio WavPack</comment>
<comment xml:lang="ro">Audio WavPack</comment>
- <comment xml:lang="ru">аудио WavPack</comment>
+ <comment xml:lang="ru">Аудио WavPack</comment>
<comment xml:lang="sk">Zvuk WavPack</comment>
<comment xml:lang="sl">Zvočna datoteka WavPack</comment>
<comment xml:lang="sq">Audio WavPack</comment>
@@ -22230,7 +22945,7 @@
<comment xml:lang="fi">WavPack-äänikorjaustiedosto</comment>
<comment xml:lang="fo">WavPack ljóðrættingarfíla</comment>
<comment xml:lang="fr">fichier de correction audio WavPack</comment>
- <comment xml:lang="ga">comhad cheartú fhuaim WavPack</comment>
+ <comment xml:lang="ga">comhad ceartúchán fuaime WavPack</comment>
<comment xml:lang="gl">ficheiro de corrección de son WavPack</comment>
<comment xml:lang="he">קובץ תיקון שמע של WavPack</comment>
<comment xml:lang="hr">WavPack datoteka ispravke zvuka</comment>
@@ -22251,7 +22966,7 @@
<comment xml:lang="pt">ficheiro de correção áudio WavPack</comment>
<comment xml:lang="pt_BR">Arquivo de correção de áudio WavPack</comment>
<comment xml:lang="ro">Fișier audio de corecție WavPack</comment>
- <comment xml:lang="ru">файл коррекции аудио WavPack</comment>
+ <comment xml:lang="ru">Файл коррекции аудио WavPack</comment>
<comment xml:lang="sk">Opravný zvukový súbor WavPack</comment>
<comment xml:lang="sl">popravljalna zvočna datoteka WavPack</comment>
<comment xml:lang="sq">File korrigjgimi audio WavPack</comment>
@@ -22260,7 +22975,7 @@
<comment xml:lang="tr">WavPack ses düzeltme dosyası</comment>
<comment xml:lang="uk">файл корекції звуку WavPack</comment>
<comment xml:lang="vi">Tập tin sửa chữa âm thanh WavPack</comment>
- <comment xml:lang="zh_CN">WavPack 音频校正文档</comment>
+ <comment xml:lang="zh_CN">WavPack 音频校正文件</comment>
<comment xml:lang="zh_TW">WavPack 音訊校正檔</comment>
<magic priority="50">
<match value="wvpk" type="string" offset="0"/>
@@ -22289,7 +23004,7 @@
<comment xml:lang="ga">fuaim MIDI</comment>
<comment xml:lang="gl">son MIDI</comment>
<comment xml:lang="he">שמע MIDI</comment>
- <comment xml:lang="hr">MIDI audio</comment>
+ <comment xml:lang="hr">MIDI zvučni zapis</comment>
<comment xml:lang="hu">MIDI hang</comment>
<comment xml:lang="ia">Audio MIDI</comment>
<comment xml:lang="id">Audio MIDI</comment>
@@ -22308,7 +23023,7 @@
<comment xml:lang="pt">áudio MIDI</comment>
<comment xml:lang="pt_BR">Áudio MIDI</comment>
<comment xml:lang="ro">Audio MIDI</comment>
- <comment xml:lang="ru">аудио MIDI</comment>
+ <comment xml:lang="ru">Аудио MIDI</comment>
<comment xml:lang="sk">Zvuk MIDI</comment>
<comment xml:lang="sl">Zvočna datoteka MIDI</comment>
<comment xml:lang="sq">Audio MIDI</comment>
@@ -22346,7 +23061,7 @@
<comment xml:lang="ga">fuaim chomhbhrúite Tracker</comment>
<comment xml:lang="gl">son comprimido de Tracker</comment>
<comment xml:lang="he">שמע גשש מכווץ</comment>
- <comment xml:lang="hr">komprimirani Tracker audio</comment>
+ <comment xml:lang="hr">Sažeti Tracker zvučni zapis</comment>
<comment xml:lang="hu">tömörített Tracker hang</comment>
<comment xml:lang="ia">Audio Tracker comprimite</comment>
<comment xml:lang="id">audio Tracker terkompresi</comment>
@@ -22363,7 +23078,7 @@
<comment xml:lang="pt">áudio comprimido Tracker</comment>
<comment xml:lang="pt_BR">Áudio Tracker compactado</comment>
<comment xml:lang="ro">Tracker audio comprimat</comment>
- <comment xml:lang="ru">аудио Tracker (сжатое)</comment>
+ <comment xml:lang="ru">Сжатое аудио Tracker</comment>
<comment xml:lang="sk">Komprimovaný zvuk Tracker</comment>
<comment xml:lang="sl">Skrčena zvočna datoteka Tracker</comment>
<comment xml:lang="sq">Audio Tracker e kompresuar</comment>
@@ -22391,6 +23106,7 @@
<comment xml:lang="eu">AAC audioa</comment>
<comment xml:lang="fi">AAC-ääni</comment>
<comment xml:lang="fr">audio AAC</comment>
+ <comment xml:lang="ga">fuaim AAC</comment>
<comment xml:lang="gl">Son AAC</comment>
<comment xml:lang="he">שמע AAC</comment>
<comment xml:lang="hr">AAC zvučni zapis</comment>
@@ -22403,10 +23119,10 @@
<comment xml:lang="ko">AAC 오디오</comment>
<comment xml:lang="lv">AAC audio</comment>
<comment xml:lang="oc">àudio AAC</comment>
- <comment xml:lang="pl">Dźwięk AAC</comment>
+ <comment xml:lang="pl">Plik dźwiękowy AAC</comment>
<comment xml:lang="pt">áudio AAC</comment>
<comment xml:lang="pt_BR">Áudio AAC</comment>
- <comment xml:lang="ru">аудио AAC</comment>
+ <comment xml:lang="ru">Аудио AAC</comment>
<comment xml:lang="sk">Zvuk AAC</comment>
<comment xml:lang="sl">Zvok AAC</comment>
<comment xml:lang="sr">ААЦ звук</comment>
@@ -22422,8 +23138,17 @@
<match value="0xFFF0" type="big16" offset="0" mask="0xFFF6"/>
</magic>
<glob pattern="*.aac"/>
+ <glob pattern="*.adts"/>
+ <glob weight="10" pattern="*.ass"/>
<alias type="audio/x-aac"/>
</mime-type>
+ <mime-type type="audio/usac">
+ <comment>USAC audio</comment>
+ <acronym>USAC</acronym>
+ <expanded-acronym>Unified Speech and Audio Coding</expanded-acronym>
+ <glob pattern="*.loas"/>
+ <glob pattern="*.xhe"/>
+ </mime-type>
<mime-type type="audio/mp4">
<comment>MPEG-4 audio</comment>
<comment xml:lang="ar">MPEG-4 سمعي</comment>
@@ -22444,7 +23169,7 @@
<comment xml:lang="ga">fuaim MPEG-4</comment>
<comment xml:lang="gl">son MPEG-4</comment>
<comment xml:lang="he">שמע MPEG-4</comment>
- <comment xml:lang="hr">MPEG-4 audio</comment>
+ <comment xml:lang="hr">MPEG-4 zvučni zapis</comment>
<comment xml:lang="hu">MPEG-4 hang</comment>
<comment xml:lang="ia">Audio MPEG-4</comment>
<comment xml:lang="id">Audio MPEG-4</comment>
@@ -22463,7 +23188,7 @@
<comment xml:lang="pt">áudio MPEG-4</comment>
<comment xml:lang="pt_BR">Áudio MPEG-4</comment>
<comment xml:lang="ro">Audio MPEG-4</comment>
- <comment xml:lang="ru">аудио MPEG-4</comment>
+ <comment xml:lang="ru">Аудио MPEG-4</comment>
<comment xml:lang="sk">Zvuk MPEG-4</comment>
<comment xml:lang="sl">Zvočna datoteka MPEG-4</comment>
<comment xml:lang="sq">Audio MPEG-4</comment>
@@ -22482,9 +23207,15 @@
<glob pattern="*.m4a"/>
<glob pattern="*.f4a"/>
</mime-type>
+ <mime-type type="audio/x-m4r">
+ <comment>MPEG-4 Ringtone</comment>
+ <glob pattern="*.m4r"/>
+ <sub-class-of type="video/mp4"/>
+ </mime-type>
<mime-type type="video/mp4">
<comment>MPEG-4 video</comment>
<comment xml:lang="ar">MPEG-4 مرئي</comment>
+ <comment xml:lang="ast">Videu en MPEG-4</comment>
<comment xml:lang="be@latin">Videa MPEG-4</comment>
<comment xml:lang="bg">Видео — MPEG-4</comment>
<comment xml:lang="ca">vídeo MPEG-4</comment>
@@ -22502,7 +23233,7 @@
<comment xml:lang="ga">físeán MPEG-4</comment>
<comment xml:lang="gl">vídeo MPEG-4</comment>
<comment xml:lang="he">וידאו MPEG-4</comment>
- <comment xml:lang="hr">MPEG-4 video</comment>
+ <comment xml:lang="hr">MPEG-4 video snimka</comment>
<comment xml:lang="hu">MPEG-4 videó</comment>
<comment xml:lang="ia">Video MPEG-4</comment>
<comment xml:lang="id">Video MPEG-4</comment>
@@ -22521,7 +23252,7 @@
<comment xml:lang="pt">vídeo MPEG-4</comment>
<comment xml:lang="pt_BR">Vídeo MPEG-4</comment>
<comment xml:lang="ro">Video MPEG-4</comment>
- <comment xml:lang="ru">видео MPEG-4</comment>
+ <comment xml:lang="ru">Видео MPEG-4</comment>
<comment xml:lang="sk">Video MPEG-4</comment>
<comment xml:lang="sl">Video datoteka MPEG-4</comment>
<comment xml:lang="sq">Video MPEG-4</comment>
@@ -22563,10 +23294,10 @@
<comment xml:lang="fi">MPEG-4-äänikirja</comment>
<comment xml:lang="fo">MPEG-4 ljóðbók</comment>
<comment xml:lang="fr">livre audio MPEG-4</comment>
- <comment xml:lang="ga">leabhar fhuaim MPEG-4</comment>
+ <comment xml:lang="ga">closleabhar MPEG-4</comment>
<comment xml:lang="gl">sonlibro de MPEG-4</comment>
<comment xml:lang="he">ספר דיגיטלי MPEG-4</comment>
- <comment xml:lang="hr">MPEG-4 audio knjiga</comment>
+ <comment xml:lang="hr">MPEG-4 zvučna knjiga</comment>
<comment xml:lang="hu">MPEG-4 hangoskönyv</comment>
<comment xml:lang="ia">Libro audio MPEG-4</comment>
<comment xml:lang="id">Buku audio MPEG-4</comment>
@@ -22585,7 +23316,7 @@
<comment xml:lang="pt">livro áudio MPEG-4</comment>
<comment xml:lang="pt_BR">Áudio livro MPEG-4</comment>
<comment xml:lang="ro">Carte audio MPEG-4</comment>
- <comment xml:lang="ru">аудиокнига MPEG-4</comment>
+ <comment xml:lang="ru">Аудиокнига MPEG-4</comment>
<comment xml:lang="sk">Zvuková kniha MPEG-4</comment>
<comment xml:lang="sl">Zvočna knjiga MPEG-4</comment>
<comment xml:lang="sq">Audiolibër MPEG-4</comment>
@@ -22641,7 +23372,7 @@
<comment xml:lang="pt">ficheiro multimédia 3GPP</comment>
<comment xml:lang="pt_BR">Arquivo multimídia 3GPP</comment>
<comment xml:lang="ro">Fișier multimedia 3GPP</comment>
- <comment xml:lang="ru">мультимедийный файл 3GPP</comment>
+ <comment xml:lang="ru">Мультимедийный файл 3GPP</comment>
<comment xml:lang="sk">Súbor multimédií 3GPP</comment>
<comment xml:lang="sl">Večpredstavnostna datoteka 3GPP</comment>
<comment xml:lang="sq">File multimedial 3GPP</comment>
@@ -22707,7 +23438,7 @@
<comment xml:lang="pt">ficheiro multimédia 3GPP2</comment>
<comment xml:lang="pt_BR">Arquivo multimídia 3GPP2</comment>
<comment xml:lang="ro">Fișier multimedia 3GPP2</comment>
- <comment xml:lang="ru">мультимедийный файл 3GPP2</comment>
+ <comment xml:lang="ru">Мультимедийный файл 3GPP2</comment>
<comment xml:lang="sk">Súbor multimédií 3GPP2</comment>
<comment xml:lang="sl">Večpredstavnostna datoteka 3GPP2</comment>
<comment xml:lang="sr">3ГПП2 мултимедијална датотека</comment>
@@ -22747,7 +23478,7 @@
<comment xml:lang="ga">fuaim Amiga SoundTracker</comment>
<comment xml:lang="gl">son de Amiga SoundTracker</comment>
<comment xml:lang="he">קובץ שמע של Amiga SoundTracker</comment>
- <comment xml:lang="hr">Amiga SoundTracker audio</comment>
+ <comment xml:lang="hr">Amiga SoundTracker zvučni zapis</comment>
<comment xml:lang="hu">Amiga SoundTracker hang</comment>
<comment xml:lang="ia">Audio Amiga SoundTracker</comment>
<comment xml:lang="id">Audio Amida SoundTracker</comment>
@@ -22767,7 +23498,7 @@
<comment xml:lang="pt">áudio SoundTracker do Amiga</comment>
<comment xml:lang="pt_BR">Áudio Amiga SoundTracker</comment>
<comment xml:lang="ro">Audio Amiga SoundTracker</comment>
- <comment xml:lang="ru">аудио Amiga SoundTracker</comment>
+ <comment xml:lang="ru">Аудио Amiga SoundTracker</comment>
<comment xml:lang="sk">Zvuk Amiga SoundTracker</comment>
<comment xml:lang="sl">Zvočna datoteka Amiga SoundTracker</comment>
<comment xml:lang="sq">Audio Amiga SoundTracker</comment>
@@ -22840,7 +23571,7 @@
<comment xml:lang="ga">fuaim MP2</comment>
<comment xml:lang="gl">son MP2</comment>
<comment xml:lang="he">שמע MP2</comment>
- <comment xml:lang="hr">MP2 audio</comment>
+ <comment xml:lang="hr">MP2 zvučni zapis</comment>
<comment xml:lang="hu">MP2 hang</comment>
<comment xml:lang="ia">Audio MP2</comment>
<comment xml:lang="id">Audio MP2</comment>
@@ -22858,7 +23589,7 @@
<comment xml:lang="pt">áudio MP2</comment>
<comment xml:lang="pt_BR">Áudio MP2</comment>
<comment xml:lang="ro">Audio MP2</comment>
- <comment xml:lang="ru">аудио MP2</comment>
+ <comment xml:lang="ru">Аудио MP2</comment>
<comment xml:lang="sk">Zvuk MP2</comment>
<comment xml:lang="sl">Zvočna datoteka MP2</comment>
<comment xml:lang="sq">Audio MP2</comment>
@@ -22894,7 +23625,7 @@
<comment xml:lang="ga">fuaim MP3</comment>
<comment xml:lang="gl">son MP3</comment>
<comment xml:lang="he">שמע MP3</comment>
- <comment xml:lang="hr">MP3 audio</comment>
+ <comment xml:lang="hr">MP3 zvučni zapis</comment>
<comment xml:lang="hu">MP3 hang</comment>
<comment xml:lang="ia">Audio MP3</comment>
<comment xml:lang="id">Audio MP3</comment>
@@ -22914,7 +23645,7 @@
<comment xml:lang="pt">áudio MP3</comment>
<comment xml:lang="pt_BR">Áudio MP3</comment>
<comment xml:lang="ro">Audio MP3</comment>
- <comment xml:lang="ru">аудио MP3</comment>
+ <comment xml:lang="ru">Аудио MP3</comment>
<comment xml:lang="sk">Zvuk MP3</comment>
<comment xml:lang="sl">Zvočna datoteka MP3</comment>
<comment xml:lang="sq">Audio MP3</comment>
@@ -22972,11 +23703,11 @@
<comment xml:lang="nl">MP3-audio (gestreamd)</comment>
<comment xml:lang="nn">Strauma MP3-lyd</comment>
<comment xml:lang="oc">àudio MP3 (flux)</comment>
- <comment xml:lang="pl">Dźwięk MP3 (strumień)</comment>
+ <comment xml:lang="pl">Plik dźwiękowy MP3 (strumień)</comment>
<comment xml:lang="pt">áudio MP3 (em fluxo)</comment>
<comment xml:lang="pt_BR">Áudio MP3 (em fluxo)</comment>
<comment xml:lang="ro">Audio MP3 (flux)</comment>
- <comment xml:lang="ru">аудио MP3 (потоковое)</comment>
+ <comment xml:lang="ru">Аудио MP3 (потоковое)</comment>
<comment xml:lang="sk">Zvuk MP3 (streamovaný)</comment>
<comment xml:lang="sl">Zvočna datoteka MP3 (pretočna)</comment>
<comment xml:lang="sq">Audio MP3 (streamed)</comment>
@@ -22985,7 +23716,7 @@
<comment xml:lang="tr">MP3 sesi (akış)</comment>
<comment xml:lang="uk">звук MP3 (потоковий)</comment>
<comment xml:lang="vi">Âm thanh MP3 (chạy luồng)</comment>
- <comment xml:lang="zh_CN">MP3 流音频</comment>
+ <comment xml:lang="zh_CN">MP3 音频流媒体</comment>
<comment xml:lang="zh_TW">MP3 音訊 (串流)</comment>
<sub-class-of type="text/plain"/>
<alias type="audio/mpegurl"/>
@@ -23033,14 +23764,14 @@
<comment xml:lang="pt">lista de reprodução HTTP Live Streaming</comment>
<comment xml:lang="pt_BR">Lista de Reprodução Streaming ao Vivo de HTTP</comment>
<comment xml:lang="ro">Listă de redare difuzată ca flux HTTP</comment>
- <comment xml:lang="ru">список воспроизведения HTTP-потока</comment>
+ <comment xml:lang="ru">Список воспроизведения HTTP-потока</comment>
<comment xml:lang="sk">Zoznam stôp HTTP Live Streaming</comment>
<comment xml:lang="sl">Seznam predvajanja živega pretoka HTTP</comment>
<comment xml:lang="sr">ХТТП списак нумера Живог Протока</comment>
<comment xml:lang="sv">HTTP Live Streaming-spellista</comment>
<comment xml:lang="tr">HTTP Canlı Akış çalma listesi</comment>
<comment xml:lang="uk">список відтворення HTTP Live Streaming</comment>
- <comment xml:lang="zh_CN">HTTP 直播流播放列表</comment>
+ <comment xml:lang="zh_CN">HTTP 实时流播放列表</comment>
<comment xml:lang="zh_TW">HTTP 即時串流播放清單</comment>
<sub-class-of type="text/plain"/>
<glob pattern="*.m3u"/>
@@ -23071,7 +23802,7 @@
<comment xml:lang="ga">seinmliosta Microsoft ASX</comment>
<comment xml:lang="gl">lista de reprodución Microsoft ASX</comment>
<comment xml:lang="he">רשימת השמעה ASX (מיקרוסופט)</comment>
- <comment xml:lang="hr">Microsoft ASX popis za reprodukciju</comment>
+ <comment xml:lang="hr">Microsoft ASX popis izvođenja</comment>
<comment xml:lang="hu">Microsoft ASX lejátszólista</comment>
<comment xml:lang="ia">Lista de selection Microsoft ASX</comment>
<comment xml:lang="id">Senarai putar Microsoft ASX</comment>
@@ -23090,7 +23821,7 @@
<comment xml:lang="pt">lista de reprodução Microsoft ASX</comment>
<comment xml:lang="pt_BR">Lista de reprodução do Microsoft ASX</comment>
<comment xml:lang="ro">Listă redare Microsoft ASX</comment>
- <comment xml:lang="ru">список воспроизведения Microsoft ASX</comment>
+ <comment xml:lang="ru">Список воспроизведения Microsoft ASX</comment>
<comment xml:lang="sk">Zoznam skladieb Microsoft ASX</comment>
<comment xml:lang="sl">Seznam predvajanja Microsoft ASX</comment>
<comment xml:lang="sq">Listë titujsh Microsoft ASF</comment>
@@ -23154,7 +23885,7 @@
<comment xml:lang="pt">áudio PSF</comment>
<comment xml:lang="pt_BR">Áudio PSF</comment>
<comment xml:lang="ro">Audio PSF</comment>
- <comment xml:lang="ru">аудио PSF</comment>
+ <comment xml:lang="ru">Аудио PSF</comment>
<comment xml:lang="sk">Zvuk PSF</comment>
<comment xml:lang="sl">Zvočna datoteka PSF</comment>
<comment xml:lang="sq">Audio PSF</comment>
@@ -23192,7 +23923,7 @@
<comment xml:lang="ga">fuaim MiniPSF</comment>
<comment xml:lang="gl">son MiniPSF</comment>
<comment xml:lang="he">שמע של MiniPSP</comment>
- <comment xml:lang="hr">MiniPSF audio</comment>
+ <comment xml:lang="hr">MiniPSF zvučni zapis</comment>
<comment xml:lang="hu">MiniPSF hang</comment>
<comment xml:lang="ia">Audio MiniPSF</comment>
<comment xml:lang="id">Audio MiniPSF</comment>
@@ -23211,7 +23942,7 @@
<comment xml:lang="pt">áudio MiniPSF</comment>
<comment xml:lang="pt_BR">Áudio MiniPSF</comment>
<comment xml:lang="ro">Audio MiniPSF</comment>
- <comment xml:lang="ru">аудио MiniPSF</comment>
+ <comment xml:lang="ru">Аудио MiniPSF</comment>
<comment xml:lang="sk">Zvuk MiniPSF</comment>
<comment xml:lang="sl">Zvočna datoteka MiniPSF</comment>
<comment xml:lang="sq">Audio MiniPSF</comment>
@@ -23243,7 +23974,7 @@
<comment xml:lang="fi">PSFlib-äänikirjasto</comment>
<comment xml:lang="fo">PSFlib ljóðsavn</comment>
<comment xml:lang="fr">bibliothèque audio PSFlib</comment>
- <comment xml:lang="ga">leabharlann fhuaim PSFlib</comment>
+ <comment xml:lang="ga">leabharlann fhuaime PSFlib</comment>
<comment xml:lang="gl">Biblioteca de son PSFlib</comment>
<comment xml:lang="he">ספריית שמע PSFlib</comment>
<comment xml:lang="hr">PSFlib zvučna biblioteka</comment>
@@ -23264,7 +23995,7 @@
<comment xml:lang="pt">biblioteca áudio PSFlib</comment>
<comment xml:lang="pt_BR">Biblioteca de áudio PSFlib</comment>
<comment xml:lang="ro">Bibliotecă audio PSFlib</comment>
- <comment xml:lang="ru">фонотека PSFlib</comment>
+ <comment xml:lang="ru">Фонотека PSFlib</comment>
<comment xml:lang="sk">Zvuková knižnica PSFlib</comment>
<comment xml:lang="sl">Zvočna knjižnica PSFlib</comment>
<comment xml:lang="sq">Librari audio PSFlib</comment>
@@ -23273,7 +24004,7 @@
<comment xml:lang="tr">PSFlib ses kitaplığı</comment>
<comment xml:lang="uk">аудіобібліотека PSFlib</comment>
<comment xml:lang="vi">Thư viện âm thanh PSFlib</comment>
- <comment xml:lang="zh_CN">PSFlib 音频库文件</comment>
+ <comment xml:lang="zh_CN">PSFlib 音频库</comment>
<comment xml:lang="zh_TW">PSFlib 音訊庫</comment>
<acronym>PSFlib</acronym>
<expanded-acronym>Portable Sound Format Library</expanded-acronym>
@@ -23299,7 +24030,7 @@
<comment xml:lang="ga">fuaim Windows Media</comment>
<comment xml:lang="gl">son de Windows Media</comment>
<comment xml:lang="he">שמע של Windows Media</comment>
- <comment xml:lang="hr">Windows Media audio</comment>
+ <comment xml:lang="hr">Windows Media zvučni zapis</comment>
<comment xml:lang="hu">Windows Media hang</comment>
<comment xml:lang="ia">Audio Windows Media</comment>
<comment xml:lang="id">Audio Windows Media</comment>
@@ -23317,7 +24048,7 @@
<comment xml:lang="pt">áudio Windows Media</comment>
<comment xml:lang="pt_BR">Áudio do Windows Media</comment>
<comment xml:lang="ro">Audio Windows Media</comment>
- <comment xml:lang="ru">аудио Windows Media</comment>
+ <comment xml:lang="ru">Аудио Windows Media</comment>
<comment xml:lang="sk">Zvuk Windows Media</comment>
<comment xml:lang="sl">Zvočna datoteka Windows Media</comment>
<comment xml:lang="sq">Audio Windows Media</comment>
@@ -23351,7 +24082,7 @@
<comment xml:lang="ga">fuaim Musepack</comment>
<comment xml:lang="gl">son de Musepack</comment>
<comment xml:lang="he">שמע של Musepack</comment>
- <comment xml:lang="hr">Musepack audio</comment>
+ <comment xml:lang="hr">Musepack zvučni zapis</comment>
<comment xml:lang="hu">Musepack hang</comment>
<comment xml:lang="ia">Audio Musepack</comment>
<comment xml:lang="id">Audio Musepack</comment>
@@ -23369,7 +24100,7 @@
<comment xml:lang="pt">áudio Musepack</comment>
<comment xml:lang="pt_BR">Áudio Musepack</comment>
<comment xml:lang="ro">Audio Musepack</comment>
- <comment xml:lang="ru">аудио Musepack</comment>
+ <comment xml:lang="ru">Аудио Musepack</comment>
<comment xml:lang="sk">Zvuk Musepack</comment>
<comment xml:lang="sl">Zvočna datoteka Musepack</comment>
<comment xml:lang="sq">Audio Musepack</comment>
@@ -23390,6 +24121,7 @@
<mime-type type="audio/vnd.rn-realaudio">
<comment>RealAudio document</comment>
<comment xml:lang="ar">مستند RealAudio</comment>
+ <comment xml:lang="ast">Documentu RealAudio</comment>
<comment xml:lang="be@latin">Dakument RealAudio</comment>
<comment xml:lang="bg">Документ — RealAudio</comment>
<comment xml:lang="ca">document RealAudio</comment>
@@ -23425,7 +24157,7 @@
<comment xml:lang="pt">documento RealAudio</comment>
<comment xml:lang="pt_BR">Documento RealAudio</comment>
<comment xml:lang="ro">Document RealAudio</comment>
- <comment xml:lang="ru">документ RealAudio</comment>
+ <comment xml:lang="ru">Документ RealAudio</comment>
<comment xml:lang="sk">Dokument RealAudio</comment>
<comment xml:lang="sl">Dokument RealAudio</comment>
<comment xml:lang="sq">Dokument RealAudio</comment>
@@ -23457,7 +24189,7 @@
<comment xml:lang="fi">RealMedia-metatiedosto</comment>
<comment xml:lang="fo">RealMedia metafíla</comment>
<comment xml:lang="fr">métafichier RealMedia</comment>
- <comment xml:lang="ga">meiteachomhad RealMedia</comment>
+ <comment xml:lang="ga">Meiteachomhad RealMedia</comment>
<comment xml:lang="gl">Metaficheiro RealMedia</comment>
<comment xml:lang="he">קובץ מטא של RealMedia</comment>
<comment xml:lang="hr">RealMedia meta datoteka</comment>
@@ -23478,7 +24210,7 @@
<comment xml:lang="pt">metaficheiro RealMedia</comment>
<comment xml:lang="pt_BR">Meta arquivo do RealMedia</comment>
<comment xml:lang="ro">Metafișier RealMedia</comment>
- <comment xml:lang="ru">мета-файл RealMedia</comment>
+ <comment xml:lang="ru">Мета-файл RealMedia</comment>
<comment xml:lang="sk">RealMedia Metafile</comment>
<comment xml:lang="sl">Metadatoteka RealMedia</comment>
<comment xml:lang="sq">Metafile RealMedia</comment>
@@ -23494,6 +24226,7 @@
<mime-type type="video/vnd.rn-realvideo">
<comment>RealVideo document</comment>
<comment xml:lang="ar">مستند RealVideo</comment>
+ <comment xml:lang="ast">Documentu RealVideo</comment>
<comment xml:lang="be@latin">Dakument RealVideo</comment>
<comment xml:lang="bg">Документ — RealVideo</comment>
<comment xml:lang="ca">document RealVideo</comment>
@@ -23529,7 +24262,7 @@
<comment xml:lang="pt">documento RealVideo</comment>
<comment xml:lang="pt_BR">Documento RealVideo</comment>
<comment xml:lang="ro">Document RealVideo</comment>
- <comment xml:lang="ru">документ RealVideo</comment>
+ <comment xml:lang="ru">Документ RealVideo</comment>
<comment xml:lang="sk">Dokument RealVideo</comment>
<comment xml:lang="sl">Video datoteka RealVideo</comment>
<comment xml:lang="sq">Dokument RealVideo</comment>
@@ -23547,6 +24280,7 @@
<mime-type type="application/vnd.rn-realmedia">
<comment>RealMedia document</comment>
<comment xml:lang="ar">مستند RealMedia</comment>
+ <comment xml:lang="ast">Documentu RealMedia</comment>
<comment xml:lang="be@latin">Dakument RealMedia</comment>
<comment xml:lang="bg">Документ — RealMedia</comment>
<comment xml:lang="ca">document RealMedia</comment>
@@ -23582,7 +24316,7 @@
<comment xml:lang="pt">documento RealMedia</comment>
<comment xml:lang="pt_BR">Documento RealMedia</comment>
<comment xml:lang="ro">Document RealMedia</comment>
- <comment xml:lang="ru">документ RealMedia</comment>
+ <comment xml:lang="ru">Документ RealMedia</comment>
<comment xml:lang="sk">Dokument RealMedia</comment>
<comment xml:lang="sl">Dokument RealMedia</comment>
<comment xml:lang="sq">Dokument RealMedia</comment>
@@ -23608,6 +24342,7 @@
<mime-type type="image/vnd.rn-realpix">
<comment>RealPix document</comment>
<comment xml:lang="ar">مستند RealPix</comment>
+ <comment xml:lang="ast">Documentu RealPix</comment>
<comment xml:lang="be@latin">Dakument RealPix</comment>
<comment xml:lang="bg">Документ — RealPix</comment>
<comment xml:lang="ca">document RealPix</comment>
@@ -23643,7 +24378,7 @@
<comment xml:lang="pt">documento RealPix</comment>
<comment xml:lang="pt_BR">Documento RealPix</comment>
<comment xml:lang="ro">Document RealPix</comment>
- <comment xml:lang="ru">документ RealPix</comment>
+ <comment xml:lang="ru">Документ RealPix</comment>
<comment xml:lang="sk">Dokument RealPix</comment>
<comment xml:lang="sl">Dokument RealPix</comment>
<comment xml:lang="sq">Dokument RealPix</comment>
@@ -23659,6 +24394,7 @@
<mime-type type="text/vnd.rn-realtext">
<comment>RealText document</comment>
<comment xml:lang="ar">مستند RealText</comment>
+ <comment xml:lang="ast">Documentu RealText</comment>
<comment xml:lang="be@latin">Dakument RealText</comment>
<comment xml:lang="bg">Документ — RealText</comment>
<comment xml:lang="ca">document RealText</comment>
@@ -23694,7 +24430,7 @@
<comment xml:lang="pt">documento RealText</comment>
<comment xml:lang="pt_BR">Documento RealText</comment>
<comment xml:lang="ro">Document RealText</comment>
- <comment xml:lang="ru">документ RealText</comment>
+ <comment xml:lang="ru">Документ RealText</comment>
<comment xml:lang="sk">Dokument RealText</comment>
<comment xml:lang="sl">Dokument RealText</comment>
<comment xml:lang="sq">Dokument RealText</comment>
@@ -23729,7 +24465,7 @@
<comment xml:lang="ga">fuaim RIFF</comment>
<comment xml:lang="gl">son RIFF</comment>
<comment xml:lang="he">שמע RIFF</comment>
- <comment xml:lang="hr">RIFF audio</comment>
+ <comment xml:lang="hr">RIFF zvučni zapis</comment>
<comment xml:lang="hu">RIFF-kép</comment>
<comment xml:lang="ia">Audio RIFF</comment>
<comment xml:lang="id">Audio RIFF</comment>
@@ -23748,7 +24484,7 @@
<comment xml:lang="pt">áudio RIFF</comment>
<comment xml:lang="pt_BR">Áudio RIFF</comment>
<comment xml:lang="ro">Audio RIFF</comment>
- <comment xml:lang="ru">аудио RIFF</comment>
+ <comment xml:lang="ru">Аудио RIFF</comment>
<comment xml:lang="sk">Zvuk RIFF</comment>
<comment xml:lang="sl">Zvočna datoteka RIFF</comment>
<comment xml:lang="sq">Audio RIFF</comment>
@@ -23771,6 +24507,7 @@
<comment xml:lang="es">contenedor RIFF</comment>
<comment xml:lang="eu">RIFF edukitzailea</comment>
<comment xml:lang="fr">conteneur RIFF</comment>
+ <comment xml:lang="ga">coimeádán RIFF</comment>
<comment xml:lang="gl">Contenedor RIFF</comment>
<comment xml:lang="he">מכולת RIFF</comment>
<comment xml:lang="hr">RIFF spremnik</comment>
@@ -23820,7 +24557,7 @@
<comment xml:lang="ga">fuaim Scream Tracker 3</comment>
<comment xml:lang="gl">son Scream Tracker 3</comment>
<comment xml:lang="he">שמע של Scream Tracker 3</comment>
- <comment xml:lang="hr">Scream Tracker 3 audio</comment>
+ <comment xml:lang="hr">Scream Tracker 3 zvučni zapis</comment>
<comment xml:lang="hu">Scream Tracker 3 hang</comment>
<comment xml:lang="ia">Audio Scream Tracker 3</comment>
<comment xml:lang="id">Audio Scream Tracker 3</comment>
@@ -23839,7 +24576,7 @@
<comment xml:lang="pt">áudio Scream Tracker 3</comment>
<comment xml:lang="pt_BR">Áudio Scream Tracker 3</comment>
<comment xml:lang="ro">Audio Scream Tracker 3</comment>
- <comment xml:lang="ru">аудио Scream Tracker 3</comment>
+ <comment xml:lang="ru">Аудио Scream Tracker 3</comment>
<comment xml:lang="sk">Skladba Scream Tracker 3</comment>
<comment xml:lang="sl">Zvočna datoteka Scream Tracker 3</comment>
<comment xml:lang="sq">Audio Scream Tracker 3</comment>
@@ -23875,7 +24612,7 @@
<comment xml:lang="ga">seinmliosta MP3 ShoutCast</comment>
<comment xml:lang="gl">lista de reprodución MP3 de ShoutCast</comment>
<comment xml:lang="he">רשימת השמעה MP3 של ShoutCast</comment>
- <comment xml:lang="hr">MP3 ShoutCast popis za reprodukciju</comment>
+ <comment xml:lang="hr">MP3 ShoutCast popis izvođenja</comment>
<comment xml:lang="hu">MP3 ShoutCast-lejátszólista</comment>
<comment xml:lang="ia">Lista de selection MP3 ShoutCast</comment>
<comment xml:lang="id">Senarai putar MP3 ShoutCast</comment>
@@ -23894,7 +24631,7 @@
<comment xml:lang="pt">lista de reprodução MP3 ShoutCast</comment>
<comment xml:lang="pt_BR">Lista de reprodução MP3 ShoutCast</comment>
<comment xml:lang="ro">Listă MP3 ShoutCast</comment>
- <comment xml:lang="ru">список воспроизведения MP3 ShoutCast</comment>
+ <comment xml:lang="ru">Список воспроизведения MP3 ShoutCast</comment>
<comment xml:lang="sk">Zoznam skladieb MP3 ShoutCast</comment>
<comment xml:lang="sl">Seznam predvajanja MP3 ShoutCast</comment>
<comment xml:lang="sq">Listë titujsh MP3 ShoutCast</comment>
@@ -23936,7 +24673,7 @@
<comment xml:lang="ga">fuaim Scream Tracker</comment>
<comment xml:lang="gl">son Scream Tracker</comment>
<comment xml:lang="he">שמע של Scream Tracker</comment>
- <comment xml:lang="hr">Scream Tracker audio</comment>
+ <comment xml:lang="hr">Scream Tracker zvučni zapis</comment>
<comment xml:lang="hu">Scream Tracker hang</comment>
<comment xml:lang="ia">Audio Scream Tracker</comment>
<comment xml:lang="id">Audio Scream Tracker</comment>
@@ -23955,7 +24692,7 @@
<comment xml:lang="pt">áudio Scream Tracker</comment>
<comment xml:lang="pt_BR">Áudio Scream Tracker</comment>
<comment xml:lang="ro">Audio Scream Tracker</comment>
- <comment xml:lang="ru">аудио Scream Tracker</comment>
+ <comment xml:lang="ru">Аудио Scream Tracker</comment>
<comment xml:lang="sk">Skladba Scream Tracker</comment>
<comment xml:lang="sl">Zvočna datoteka Scream Tracker</comment>
<comment xml:lang="sq">Audio Scream Tracker</comment>
@@ -23995,7 +24732,7 @@
<comment xml:lang="ga">fuaim VOC</comment>
<comment xml:lang="gl">son VOC</comment>
<comment xml:lang="he">שמע VOC</comment>
- <comment xml:lang="hr">VOC audio</comment>
+ <comment xml:lang="hr">VOC zvučni zapis</comment>
<comment xml:lang="hu">VOC hang</comment>
<comment xml:lang="ia">Audio VOC</comment>
<comment xml:lang="id">Audio VOC</comment>
@@ -24014,7 +24751,7 @@
<comment xml:lang="pt">áudio VOC</comment>
<comment xml:lang="pt_BR">Áudio VOC</comment>
<comment xml:lang="ro">Audio VOC</comment>
- <comment xml:lang="ru">аудио VOC</comment>
+ <comment xml:lang="ru">Аудио VOC</comment>
<comment xml:lang="sk">Zvuk VOC</comment>
<comment xml:lang="sl">Zvočna datoteka VOC</comment>
<comment xml:lang="sq">Audio VOC</comment>
@@ -24049,7 +24786,7 @@
<comment xml:lang="ga">fuaim WAV</comment>
<comment xml:lang="gl">son WAV</comment>
<comment xml:lang="he">שמע WAV</comment>
- <comment xml:lang="hr">WAV audio</comment>
+ <comment xml:lang="hr">WAV zvučni zapis</comment>
<comment xml:lang="hu">WAV hang</comment>
<comment xml:lang="ia">Audio WAV</comment>
<comment xml:lang="id">Audio WAV</comment>
@@ -24068,7 +24805,7 @@
<comment xml:lang="pt">áudio WAV</comment>
<comment xml:lang="pt_BR">Áudio WAV</comment>
<comment xml:lang="ro">Audio WAV</comment>
- <comment xml:lang="ru">аудио WAV</comment>
+ <comment xml:lang="ru">Аудио WAV</comment>
<comment xml:lang="sk">Zvuk WAV</comment>
<comment xml:lang="sl">Zvočna datoteka WAV</comment>
<comment xml:lang="sq">Audio WAV</comment>
@@ -24128,7 +24865,7 @@
<comment xml:lang="pt">instrumento Scream Tracker</comment>
<comment xml:lang="pt_BR">Instrumento Scream Tracker</comment>
<comment xml:lang="ro">Instrument Scream Tracker</comment>
- <comment xml:lang="ru">инструмент Scream Tracker</comment>
+ <comment xml:lang="ru">Инструмент Scream Tracker</comment>
<comment xml:lang="sk">Nástroj pre Scream Tracker</comment>
<comment xml:lang="sl">Datoteka zvoka glasbila Scream Tracker</comment>
<comment xml:lang="sq">Instrument Scream Tracker</comment>
@@ -24166,7 +24903,7 @@
<comment xml:lang="ga">fuaim FastTracker II</comment>
<comment xml:lang="gl">son de FastTracker II</comment>
<comment xml:lang="he">שמע FastTracker II</comment>
- <comment xml:lang="hr">FastTracker II audio</comment>
+ <comment xml:lang="hr">FastTracker II zvučni zapis</comment>
<comment xml:lang="hu">FastTracker II hang</comment>
<comment xml:lang="ia">Audio FastTracker II</comment>
<comment xml:lang="id">Audio FastTracker II</comment>
@@ -24186,7 +24923,7 @@
<comment xml:lang="pt">áudio FastTracker II</comment>
<comment xml:lang="pt_BR">Áudio FastTracker II</comment>
<comment xml:lang="ro">Audio FastTracker II</comment>
- <comment xml:lang="ru">аудио FastTracker II</comment>
+ <comment xml:lang="ru">Аудио FastTracker II</comment>
<comment xml:lang="sk">Zvuk FastTracker II</comment>
<comment xml:lang="sl">Zvočna datoteka FastTracker II</comment>
<comment xml:lang="sq">Audio FastTracker II</comment>
@@ -24222,7 +24959,7 @@
<comment xml:lang="ga">fuaim TrueAudio</comment>
<comment xml:lang="gl">son Trueson</comment>
<comment xml:lang="he">שמע TrueAudio</comment>
- <comment xml:lang="hr">TrueAudio audio</comment>
+ <comment xml:lang="hr">TrueAudio zvučni zapis</comment>
<comment xml:lang="hu">TrueAudio hang</comment>
<comment xml:lang="ia">Audio TrueAudio</comment>
<comment xml:lang="id">Audio TrueAudio</comment>
@@ -24240,7 +24977,7 @@
<comment xml:lang="pt">áudio TrueAudio</comment>
<comment xml:lang="pt_BR">Áudio TrueAudio</comment>
<comment xml:lang="ro">Audio TrueAudio</comment>
- <comment xml:lang="ru">аудио TrueAudio</comment>
+ <comment xml:lang="ru">Аудио TrueAudio</comment>
<comment xml:lang="sk">Zvuk TrueAudio</comment>
<comment xml:lang="sl">Zvočna datoteka TrueAudio</comment>
<comment xml:lang="sq">Audio TrueAudio</comment>
@@ -24298,7 +25035,7 @@
<comment xml:lang="pt">imagem BMP Windows</comment>
<comment xml:lang="pt_BR">Imagem BMP do Windows</comment>
<comment xml:lang="ro">Imagine Windows BMP</comment>
- <comment xml:lang="ru">изображение Windows BMP</comment>
+ <comment xml:lang="ru">Изображение Windows BMP</comment>
<comment xml:lang="sk">Obrázok Windows BMP</comment>
<comment xml:lang="sl">Slikovna datoteka Windows BMP</comment>
<comment xml:lang="sq">Figurë Windows BMP</comment>
@@ -24360,7 +25097,7 @@
<comment xml:lang="pt">imagem WBMP</comment>
<comment xml:lang="pt_BR">Imagem WBMP</comment>
<comment xml:lang="ro">Imagine WBMP</comment>
- <comment xml:lang="ru">изображение WBMP</comment>
+ <comment xml:lang="ru">Изображение WBMP</comment>
<comment xml:lang="sk">Obrázok WBMP</comment>
<comment xml:lang="sl">Slikovna datoteka WBMP</comment>
<comment xml:lang="sq">Figurë WBMP</comment>
@@ -24393,7 +25130,7 @@
<comment xml:lang="fi">Computer Graphics -metatiedosto</comment>
<comment xml:lang="fo">Teldugrafikk metafíla</comment>
<comment xml:lang="fr">métafichier Computer Graphics</comment>
- <comment xml:lang="ga">meiteachomhad Grafaicí Ríomhaire</comment>
+ <comment xml:lang="ga">Meiteachomhad Grafaicí Ríomhaire</comment>
<comment xml:lang="gl">metaficheiro de Computer Graphics</comment>
<comment xml:lang="he">קובץ-מטה מסוג Computer Graphics</comment>
<comment xml:lang="hr">Computer Graphics meta datoteka</comment>
@@ -24415,7 +25152,7 @@
<comment xml:lang="pt">metaficheiro Computer Graphics</comment>
<comment xml:lang="pt_BR">Meta-arquivo do Computer Graphics</comment>
<comment xml:lang="ro">Metafișier Computer Graphics</comment>
- <comment xml:lang="ru">метафайл компьютерной графики</comment>
+ <comment xml:lang="ru">Метафайл компьютерной графики</comment>
<comment xml:lang="sk">Computer Graphics Metafile</comment>
<comment xml:lang="sl">Metadatoteka računalniške grafike (CGM)</comment>
<comment xml:lang="sq">Metafile Computer Graphics</comment>
@@ -24424,7 +25161,7 @@
<comment xml:lang="tr">Computer Graphics Meta dosyası</comment>
<comment xml:lang="uk">метафайл комп'ютерної графіки</comment>
<comment xml:lang="vi">Siêu tập tin đồ họa máy tính (CMF)</comment>
- <comment xml:lang="zh_CN">CGM 计算机图像元文件</comment>
+ <comment xml:lang="zh_CN">计算机图形图元文件 (CGM)</comment>
<comment xml:lang="zh_TW">CGM 影像</comment>
<glob pattern="*.cgm"/>
</mime-type>
@@ -24468,7 +25205,7 @@
<comment xml:lang="pt">fax CCITT G3</comment>
<comment xml:lang="pt_BR">Fax do CCITT G3</comment>
<comment xml:lang="ro">Fax CCITT G3</comment>
- <comment xml:lang="ru">факс CCITT G3</comment>
+ <comment xml:lang="ru">Факс CCITT G3</comment>
<comment xml:lang="sk">Fax CCITT G3</comment>
<comment xml:lang="sl">Datoteka faksimila CCITT G3</comment>
<comment xml:lang="sq">Fax CCITT G3</comment>
@@ -24523,7 +25260,7 @@
<comment xml:lang="pt">imagem de fax G3</comment>
<comment xml:lang="pt_BR">Imagem de fax G3</comment>
<comment xml:lang="ro">Imagine fax G3</comment>
- <comment xml:lang="ru">факсовое изображение G3</comment>
+ <comment xml:lang="ru">Факсовое изображение G3</comment>
<comment xml:lang="sk">Obrázok fax G3</comment>
<comment xml:lang="sl">Slikovna datoteka G3 fax</comment>
<comment xml:lang="sq">Figurë Fax G3</comment>
@@ -24532,7 +25269,7 @@
<comment xml:lang="tr">G3 fax görüntüsü</comment>
<comment xml:lang="uk">факс G3</comment>
<comment xml:lang="vi">Ảnh điện thư G3</comment>
- <comment xml:lang="zh_CN">G3 传真文档</comment>
+ <comment xml:lang="zh_CN">G3 传真图像</comment>
<comment xml:lang="zh_TW">G3 傳真圖</comment>
</mime-type>
<mime-type type="image/gif">
@@ -24577,7 +25314,7 @@
<comment xml:lang="pt">imagem GIF</comment>
<comment xml:lang="pt_BR">Imagem GIF</comment>
<comment xml:lang="ro">Imagine GIF</comment>
- <comment xml:lang="ru">изображение GIF</comment>
+ <comment xml:lang="ru">Изображение GIF</comment>
<comment xml:lang="sk">Obrázok GIF</comment>
<comment xml:lang="sl">Slikovna datoteka GIF</comment>
<comment xml:lang="sq">Figurë GIF</comment>
@@ -24593,6 +25330,16 @@
</magic>
<glob pattern="*.gif"/>
</mime-type>
+ <mime-type type="image/heif">
+ <comment>HEIF image</comment>
+ <acronym>HEIF</acronym>
+ <expanded-acronym>High Efficiency Image File</expanded-acronym>
+ <glob pattern="*.heic"/>
+ <glob pattern="*.heif"/>
+ <alias type="image/heic"/>
+ <alias type="image/heic-sequence"/>
+ <alias type="image/heif-sequence"/>
+ </mime-type>
<mime-type type="image/ief">
<comment>IEF image</comment>
<comment xml:lang="ar">صورة IEF</comment>
@@ -24634,7 +25381,7 @@
<comment xml:lang="pt">imagem IEF</comment>
<comment xml:lang="pt_BR">Imagem IEF</comment>
<comment xml:lang="ro">Imagine IEF</comment>
- <comment xml:lang="ru">изображение IEF</comment>
+ <comment xml:lang="ru">Изображение IEF</comment>
<comment xml:lang="sk">Obrázok IEF</comment>
<comment xml:lang="sl">Slikovna datoteka IEF</comment>
<comment xml:lang="sq">Figurë IEF</comment>
@@ -24688,7 +25435,7 @@
<comment xml:lang="pt">imagem JPEG</comment>
<comment xml:lang="pt_BR">Imagem JPEG</comment>
<comment xml:lang="ro">Imagine JPEG</comment>
- <comment xml:lang="ru">изображение JPEG</comment>
+ <comment xml:lang="ru">Изображение JPEG</comment>
<comment xml:lang="sk">Obrázok JPEG</comment>
<comment xml:lang="sl">Slikovna datoteka JPEG</comment>
<comment xml:lang="sq">Figurë JPEG</comment>
@@ -24708,69 +25455,164 @@
<glob pattern="*.jpe"/>
<alias type="image/pjpeg"/>
</mime-type>
- <mime-type type="image/jp2">
- <comment>JPEG-2000 image</comment>
- <comment xml:lang="ar">صورة JPEG-2000</comment>
- <comment xml:lang="be@latin">Vyjava JPEG-2000</comment>
- <comment xml:lang="bg">Изображение — JPEG-2000</comment>
- <comment xml:lang="ca">imatge JPEG-2000</comment>
- <comment xml:lang="cs">obrázek JPEG-2000</comment>
- <comment xml:lang="da">JPEG2000-billede</comment>
- <comment xml:lang="de">JPEG-2000-Bild</comment>
- <comment xml:lang="el">Εικόνα JPEG-2000</comment>
- <comment xml:lang="en_GB">JPEG-2000 image</comment>
- <comment xml:lang="eo">JPEG-2000-bildo</comment>
- <comment xml:lang="es">imagen JPEG-2000</comment>
- <comment xml:lang="eu">JPEG-2000 irudia</comment>
- <comment xml:lang="fi">JPEG-2000-kuva</comment>
- <comment xml:lang="fo">JPEG-2000 mynd</comment>
- <comment xml:lang="fr">image JPEG-2000</comment>
- <comment xml:lang="ga">íomhá JPEG-2000</comment>
- <comment xml:lang="gl">imaxe JPEG-2000</comment>
- <comment xml:lang="he">תמונת JPEG-2000</comment>
- <comment xml:lang="hr">JPEG-2000 slika</comment>
- <comment xml:lang="hu">JPEG-2000 kép</comment>
- <comment xml:lang="ia">Imagine JPEG-2000</comment>
- <comment xml:lang="id">Citra JPEG-2000</comment>
- <comment xml:lang="it">Immagine JPEG-2000</comment>
- <comment xml:lang="ja">JPEG-2000 画像</comment>
- <comment xml:lang="kk">JPEG-2000 суреті</comment>
- <comment xml:lang="ko">JPEG-2000 그림</comment>
- <comment xml:lang="lt">JPEG-2000 paveikslėlis</comment>
- <comment xml:lang="lv">JPEG-2000 attēls</comment>
- <comment xml:lang="ms">Imej JPEG-2000</comment>
- <comment xml:lang="nb">JPEG-2000-bilde</comment>
- <comment xml:lang="nl">JPEG-2000-afbeelding</comment>
- <comment xml:lang="nn">JPEG-2000-bilete</comment>
- <comment xml:lang="oc">imatge JPEG-2000</comment>
- <comment xml:lang="pl">Obraz JPEG-2000</comment>
- <comment xml:lang="pt">imagem JPEG-2000</comment>
+ <mime-type type="video/x-mjpeg">
+ <comment>MJPEG video stream</comment>
+ <acronym>MJPEG</acronym>
+ <expanded-acronym>Motion JPEG</expanded-acronym>
+ <sub-class-of type="image/jpeg"/>
+ <glob pattern="*.mjpeg"/>
+ <glob pattern="*.mjpg"/>
+ </mime-type>
+ <mime-type type="image/x-jp2-codestream">
+ <comment>JPEG-2000 codestream</comment>
+ <comment xml:lang="ca">flux de codis JPEG-2000</comment>
+ <comment xml:lang="cs">datový tok JPEG-2000</comment>
+ <comment xml:lang="de">JPEG-2000 Codestream</comment>
+ <comment xml:lang="en_GB">JPEG-2000 codestream</comment>
+ <comment xml:lang="es">secuencia de código JPEG-2000</comment>
+ <comment xml:lang="hr">JPEG-2000 kôd strujanja</comment>
+ <comment xml:lang="hu">JPEG-2000 kódfolyam</comment>
+ <comment xml:lang="id">codestream JPEG-2000</comment>
+ <comment xml:lang="it">Codestream JPEG-2000</comment>
+ <comment xml:lang="kk">JPEG-2000 код ағыны</comment>
+ <comment xml:lang="ko">JPEG-2000 코드스트림</comment>
+ <comment xml:lang="pl">Strumień kodu JPEG-2000</comment>
<comment xml:lang="pt_BR">Imagem JPEG-2000</comment>
- <comment xml:lang="ro">Imagine JPEG-2000</comment>
- <comment xml:lang="ru">изображение JPEG-2000</comment>
- <comment xml:lang="sk">Obrázok JPEG-2000</comment>
- <comment xml:lang="sl">Slikovna datoteka JPEG-2000</comment>
- <comment xml:lang="sq">Figurë JPEG-2000</comment>
- <comment xml:lang="sr">ЈПЕГ-2000 слика</comment>
- <comment xml:lang="sv">JPEG-2000-bild</comment>
- <comment xml:lang="tr">JPEG-2000 görüntüsü</comment>
- <comment xml:lang="uk">зображення JPEG-2000</comment>
- <comment xml:lang="vi">Ảnh JPEG-2000</comment>
- <comment xml:lang="zh_CN">JPEG-2000 图像</comment>
- <comment xml:lang="zh_TW">JPEG-2000 影像</comment>
+ <comment xml:lang="ru">Кодовый поток JPEG-2000</comment>
+ <comment xml:lang="sk">JPEG-2000 codestream</comment>
+ <comment xml:lang="sv">JPEG-2000-kodström</comment>
+ <comment xml:lang="uk">потік коду JPEG-2000</comment>
+ <comment xml:lang="zh_CN">JPEG-2000 码流</comment>
+ <comment xml:lang="zh_TW">JPEG-2000 代碼串流</comment>
+ <magic priority="50">
+ <match value="0xff4fff51" type="big32" offset="0"/>
+ </magic>
+ <glob pattern="*.j2c"/>
+ <glob pattern="*.j2k"/>
+ <glob pattern="*.jpc"/>
+ </mime-type>
+ <mime-type type="image/jp2">
+ <comment>JPEG-2000 JP2 image</comment>
+ <comment xml:lang="ca">imatge JPEG-2000 JP2</comment>
+ <comment xml:lang="cs">obrázek JPEG-2000 JP2</comment>
+ <comment xml:lang="de">JPEG-2000 JP2-Bild</comment>
+ <comment xml:lang="en_GB">JPEG-2000 JP2 image</comment>
+ <comment xml:lang="es">imagen JPEG-2000 JP2</comment>
+ <comment xml:lang="fi">JPEG-2000 JP2 -kuva</comment>
+ <comment xml:lang="hr">JPEG-2000 JP2 slika</comment>
+ <comment xml:lang="hu">JPEG-2000 JP2 kép</comment>
+ <comment xml:lang="id">Citra JPEG-2000 JP2</comment>
+ <comment xml:lang="it">Immagine JPEG-2000 JP2</comment>
+ <comment xml:lang="kk">JPEG-2000 JP2 суреті</comment>
+ <comment xml:lang="ko">JPEG-2000 JP2 그림</comment>
+ <comment xml:lang="pl">Obraz JP2 JPEG-2000</comment>
+ <comment xml:lang="pt_BR">Imagem JP2 de JPEG-2000</comment>
+ <comment xml:lang="ru">Изоражение JPEG-2000 JP2</comment>
+ <comment xml:lang="sk">Obrázok JPEG-2000 JP2</comment>
+ <comment xml:lang="sv">JPEG-2000 JP2-bild</comment>
+ <comment xml:lang="uk">зображення JP2 JPEG-2000</comment>
+ <comment xml:lang="zh_CN">JPEG-2000 JP2 图像</comment>
+ <comment xml:lang="zh_TW">JPEG-2000 JP2 影像</comment>
+ <acronym>JP2</acronym>
+ <expanded-acronym>JPEG-2000</expanded-acronym>
<alias type="image/jpeg2000"/>
- <alias type="image/jpx"/>
<alias type="image/jpeg2000-image"/>
<alias type="image/x-jpeg2000-image"/>
<magic priority="50">
- <match value="\xFF\x4F\xFF\x51\x00" type="string" offset="0"/>
- <match value="0x0c6a5020" type="big32" offset="3"/>
- <match value="jp2" type="string" offset="20"/>
+ <match value="\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a jp2\x20" type="string" offset="0" mask="0xffffffffffffffffffffffff0000000000000000ffffffff"/>
</magic>
<glob pattern="*.jp2"/>
- <glob pattern="*.jpx"/>
+ <glob pattern="*.jpg2"/>
+ </mime-type>
+ <mime-type type="image/jpx">
+ <comment>JPEG-2000 JPX image</comment>
+ <comment xml:lang="ca">imatge JPEG-2000 JPX</comment>
+ <comment xml:lang="cs">obrázek JPEG-2000 JPX</comment>
+ <comment xml:lang="de">JPEG-2000 JPX-Bild</comment>
+ <comment xml:lang="en_GB">JPEG-2000 JPX image</comment>
+ <comment xml:lang="es">imagen JPEG-2000 JPX</comment>
+ <comment xml:lang="fi">JPEG-2000 JPX -kuva</comment>
+ <comment xml:lang="hr">JPEG-2000 JPX slika</comment>
+ <comment xml:lang="hu">JPEG-2000 JPX kép</comment>
+ <comment xml:lang="id">Citra JPEG-2000 JPX</comment>
+ <comment xml:lang="it">Immagine JPEG-2000 JPX</comment>
+ <comment xml:lang="kk">JPEG-2000 JPX суреті</comment>
+ <comment xml:lang="ko">JPEG-2000 JPX 그림</comment>
+ <comment xml:lang="pl">Obraz JPX JPEG-2000</comment>
+ <comment xml:lang="pt_BR">Imagem JPX de JPEG-2000</comment>
+ <comment xml:lang="ru">Изображение JPEG-2000 JPX</comment>
+ <comment xml:lang="sk">Obrázok JPEG-2000 JPX</comment>
+ <comment xml:lang="sv">JPEG-2000 JPX-bild</comment>
+ <comment xml:lang="uk">зображення JPX JPEG-2000</comment>
+ <comment xml:lang="zh_CN">JPEG-2000 JPX 图像</comment>
+ <comment xml:lang="zh_TW">JPEG-2000 JPX 影像</comment>
+ <acronym>JPX</acronym>
+ <expanded-acronym>JPEG-2000 eXtended</expanded-acronym>
+ <magic priority="50">
+ <match value="\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a jpx\x20" type="string" offset="0" mask="0xffffffffffffffffffffffff0000000000000000ffffffff"/>
+ </magic>
<glob pattern="*.jpf"/>
-
+ <glob pattern="*.jpx"/>
+ </mime-type>
+ <mime-type type="image/jpm">
+ <comment>JPEG-2000 JPM image</comment>
+ <comment xml:lang="ca">imatge JPEG-2000 JPM</comment>
+ <comment xml:lang="cs">obrázek JPEG-2000 JPM</comment>
+ <comment xml:lang="de">JPEG-2000 JPM-Bild</comment>
+ <comment xml:lang="en_GB">JPEG-2000 JPM image</comment>
+ <comment xml:lang="es">imagen JPEG-2000 JPM</comment>
+ <comment xml:lang="fi">JPEG-2000 JPM -kuva</comment>
+ <comment xml:lang="hr">JPEG-2000 JPM slika</comment>
+ <comment xml:lang="hu">JPEG-2000 JPM kép</comment>
+ <comment xml:lang="id">Citra JPEG-2000 JPM</comment>
+ <comment xml:lang="it">Immagine JPEG-2000 JPM</comment>
+ <comment xml:lang="kk">JPEG-2000 JPM суреті</comment>
+ <comment xml:lang="ko">JPEG-2000 JPM 그림</comment>
+ <comment xml:lang="pl">Obraz JPM JPEG-2000</comment>
+ <comment xml:lang="pt_BR">Imagem JPM de JPEG-2000</comment>
+ <comment xml:lang="ru">Изображение JPEG-2000 JPM</comment>
+ <comment xml:lang="sk">Obrázok JPEG-2000 JPM</comment>
+ <comment xml:lang="sv">JPEG-2000 JPM-bild</comment>
+ <comment xml:lang="uk">зображення JPM JPEG-2000</comment>
+ <comment xml:lang="zh_CN">JPEG-2000 JPM 图像</comment>
+ <comment xml:lang="zh_TW">JPEG-2000 JPM 影像</comment>
+ <acronym>JPM</acronym>
+ <expanded-acronym>JPEG-2000 Mixed</expanded-acronym>
+ <magic priority="50">
+ <match value="\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a jpm\x20" type="string" offset="0" mask="0xffffffffffffffffffffffff0000000000000000ffffffff"/>
+ </magic>
+ <glob pattern="*.jpm"/>
+ <glob pattern="*.jpgm"/>
+ </mime-type>
+ <mime-type type="video/mj2">
+ <comment>JPEG-2000 MJ2 video</comment>
+ <comment xml:lang="ca">vídeo JPEG-2000 MJ2</comment>
+ <comment xml:lang="cs">video JPEG-2000 MJ2</comment>
+ <comment xml:lang="de">JPEG-2000 MJ2-Video</comment>
+ <comment xml:lang="en_GB">JPEG-2000 MJ2 video</comment>
+ <comment xml:lang="es">vídeo JPEG-2000 MJ2</comment>
+ <comment xml:lang="fi">JPEG-2000 MJ2 -video</comment>
+ <comment xml:lang="hr">JPEG-2000 MJ2 video snimka</comment>
+ <comment xml:lang="hu">JPEG-2000 MJ2 videó</comment>
+ <comment xml:lang="id">Video JPEG-2000 MJ2</comment>
+ <comment xml:lang="it">Video JPEG-2000 MJ2</comment>
+ <comment xml:lang="kk">JPEG-2000 MJ2 видеосы</comment>
+ <comment xml:lang="ko">JPEG-2000 MJ2 동영상</comment>
+ <comment xml:lang="pl">Plik wideo MJ2 JPEG-2000</comment>
+ <comment xml:lang="pt_BR">Imagem MJ2 de JPEG-2000</comment>
+ <comment xml:lang="ru">Видео JPEG-2000 MJ2</comment>
+ <comment xml:lang="sk">Video JPEG-2000 MJ2</comment>
+ <comment xml:lang="sv">JPEG-2000 MJ2-bild</comment>
+ <comment xml:lang="uk">зображення MJ2 JPEG-2000</comment>
+ <comment xml:lang="zh_CN">JPEG-2000 MJ2 视频</comment>
+ <comment xml:lang="zh_TW">JPEG-2000 MJ2 視訊</comment>
+ <acronym>MJ2</acronym>
+ <expanded-acronym>Motion JPEG-2000</expanded-acronym>
+ <magic priority="50">
+ <match value="\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a mjp2" type="string" offset="0" mask="0xffffffffffffffffffffffff0000000000000000ffffffff"/>
+ </magic>
+ <glob pattern="*.mj2"/>
+ <glob pattern="*.mjp2"/>
</mime-type>
<mime-type type="image/openraster">
<comment>OpenRaster archiving image</comment>
@@ -24807,14 +25649,14 @@
<comment xml:lang="pt">imagem arquivo OpenRaster</comment>
<comment xml:lang="pt_BR">Imagem de arquivamento OpenRaster</comment>
<comment xml:lang="ro">Arhivă imagine OpenRaster</comment>
- <comment xml:lang="ru">архивное изображение OpenRaster</comment>
+ <comment xml:lang="ru">Архивное изображение OpenRaster</comment>
<comment xml:lang="sk">Archivačný obrázok OpenRaster</comment>
<comment xml:lang="sl">Odtis arhiva OpenRaster</comment>
<comment xml:lang="sr">слика Опен Растер архивирања</comment>
<comment xml:lang="sv">OpenRaster-arkivbild</comment>
<comment xml:lang="tr">OpenRaster arşivleme görüntüsü</comment>
<comment xml:lang="uk">архівоване зображення OpenRaster</comment>
- <comment xml:lang="zh_CN">OpenRaster 归档映像</comment>
+ <comment xml:lang="zh_CN">OpenRaster 归档图像</comment>
<comment xml:lang="zh_TW">OpenRaster 封存影像</comment>
<sub-class-of type="application/zip"/>
<magic priority="70">
@@ -24864,7 +25706,7 @@
<comment xml:lang="pt">superfície DirectDraw</comment>
<comment xml:lang="pt_BR">Superfície do DirectDraw</comment>
<comment xml:lang="ro">Suprafață DirectDraw</comment>
- <comment xml:lang="ru">плоскость DirectDraw</comment>
+ <comment xml:lang="ru">Плоскость DirectDraw</comment>
<comment xml:lang="sk">Plocha DirectDraw</comment>
<comment xml:lang="sl">Datoteka predmeta DirectDraw</comment>
<comment xml:lang="sq">Superfaqe DirectDraw</comment>
@@ -24899,7 +25741,7 @@
<comment xml:lang="ga">cúrsóir X11</comment>
<comment xml:lang="gl">Cursor X11</comment>
<comment xml:lang="he">סמן של X11</comment>
- <comment xml:lang="hr">X11 kursor</comment>
+ <comment xml:lang="hr">X11 pokazivač</comment>
<comment xml:lang="hu">X11 kurzor</comment>
<comment xml:lang="ia">Cursor X11</comment>
<comment xml:lang="id">Kursor X11</comment>
@@ -24917,7 +25759,7 @@
<comment xml:lang="pt">cursor X11</comment>
<comment xml:lang="pt_BR">Cursor do X11</comment>
<comment xml:lang="ro">Cursor X11</comment>
- <comment xml:lang="ru">курсор X11</comment>
+ <comment xml:lang="ru">Курсор X11</comment>
<comment xml:lang="sk">Kurzor X11</comment>
<comment xml:lang="sl">Datoteka kazalke X11</comment>
<comment xml:lang="sq">Kursor X11</comment>
@@ -24971,7 +25813,7 @@
<comment xml:lang="pt">imagem EXR</comment>
<comment xml:lang="pt_BR">Imagem EXR</comment>
<comment xml:lang="ro">Imagine EXR</comment>
- <comment xml:lang="ru">изображение EXR</comment>
+ <comment xml:lang="ru">Изображение EXR</comment>
<comment xml:lang="sk">Obrázok EXR</comment>
<comment xml:lang="sl">Slikovna datoteka EXR</comment>
<comment xml:lang="sq">Figurë EXR</comment>
@@ -25026,7 +25868,7 @@
<comment xml:lang="pt">desenho Quickdraw/PICT de Macintosh</comment>
<comment xml:lang="pt_BR">Desenho do Macintosh Quickdraw/PICT</comment>
<comment xml:lang="ro">Desen Macintosh Quickdraw/PICT</comment>
- <comment xml:lang="ru">рисунок Macintosh Quickdraw/PICT</comment>
+ <comment xml:lang="ru">Рисунок Macintosh Quickdraw/PICT</comment>
<comment xml:lang="sk">Kresba Macintosh QuickDraw/PICT</comment>
<comment xml:lang="sl">Datoteka risbe Macintosh Quickdraw/PICT</comment>
<comment xml:lang="sq">Vizatim Macintosh Quickdraw/PICT</comment>
@@ -25097,7 +25939,7 @@
<comment xml:lang="pt">imagem UFRaw ID</comment>
<comment xml:lang="pt_BR">Imagem ID do UFRaw</comment>
<comment xml:lang="ro">ID imagine UFRaw</comment>
- <comment xml:lang="ru">изображение UFRaw ID</comment>
+ <comment xml:lang="ru">Изображение UFRaw ID</comment>
<comment xml:lang="sk">Obrázok ID UFRaw</comment>
<comment xml:lang="sl">Slikovna datoteka UFRaw ID</comment>
<comment xml:lang="sq">Figurë UFRaw ID</comment>
@@ -25130,7 +25972,7 @@
<comment xml:lang="fi">digitaalinen raakakuva</comment>
<comment xml:lang="fo">talgild rámynd</comment>
<comment xml:lang="fr">image brute numérique</comment>
- <comment xml:lang="ga">amhíomhá digiteach</comment>
+ <comment xml:lang="ga">amhíomhá dhigiteach</comment>
<comment xml:lang="gl">imaxe en bruto dixital</comment>
<comment xml:lang="he">תמונה דיגטלית גולמית</comment>
<comment xml:lang="hr">Digitalna osnovna slika</comment>
@@ -25151,7 +25993,7 @@
<comment xml:lang="pt">imagem digital em bruto</comment>
<comment xml:lang="pt_BR">Imagem digital bruta</comment>
<comment xml:lang="ro">imagine digitală brută</comment>
- <comment xml:lang="ru">необработанные цифровые изображения</comment>
+ <comment xml:lang="ru">Необработанное цифровое изображение</comment>
<comment xml:lang="sk">Digitálny surový obrázok</comment>
<comment xml:lang="sl">surova digitalna slika</comment>
<comment xml:lang="sq">Figurë raw dixhitale</comment>
@@ -25201,7 +26043,7 @@
<comment xml:lang="pt">negativo Adobe DNG</comment>
<comment xml:lang="pt_BR">Negativo DNG da Adobe</comment>
<comment xml:lang="ro">Negativ Adobe DNG</comment>
- <comment xml:lang="ru">негатив Adobe DNG</comment>
+ <comment xml:lang="ru">Негатив Adobe DNG</comment>
<comment xml:lang="sk">Adobe Digital Negative (DNG)</comment>
<comment xml:lang="sl">Datoteka negativa Adobe DNG</comment>
<comment xml:lang="sq">Negativ Adobe DNG</comment>
@@ -25258,7 +26100,7 @@
<comment xml:lang="pt">imagem em bruto Canon CRW</comment>
<comment xml:lang="pt_BR">Imagem bruta CRW da Canon</comment>
<comment xml:lang="ro">Imagine brută Canon CRW</comment>
- <comment xml:lang="ru">необработанное изображение Canon CRW</comment>
+ <comment xml:lang="ru">Необработанное изображение Canon CRW</comment>
<comment xml:lang="sk">Surový obrázok Canon CRW</comment>
<comment xml:lang="sl">Surova slikovna datoteka Canon CRW</comment>
<comment xml:lang="sq">Figurë raw Canon CRW</comment>
@@ -25267,7 +26109,7 @@
<comment xml:lang="tr">Canon CRW ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив CRW Canon</comment>
<comment xml:lang="vi">Ảnh thô Canon CRW</comment>
- <comment xml:lang="zh_CN">Canon CRW 原始图像</comment>
+ <comment xml:lang="zh_CN">佳能 CRW 原始图像</comment>
<comment xml:lang="zh_TW">Canon CRW 原生影像</comment>
<acronym>CRW</acronym>
<expanded-acronym>Canon RaW</expanded-acronym>
@@ -25316,7 +26158,7 @@
<comment xml:lang="pt">imagem em bruto Canon CR2</comment>
<comment xml:lang="pt_BR">Imagem bruta CR2 da Canon</comment>
<comment xml:lang="ro">Imagine brută Canon CR2</comment>
- <comment xml:lang="ru">необработанное изображение Canon CR2</comment>
+ <comment xml:lang="ru">Необработанное изображение Canon CR2</comment>
<comment xml:lang="sk">Surový obrázok Canon CR2</comment>
<comment xml:lang="sl">Surova slikovna datoteka Canon CR2</comment>
<comment xml:lang="sq">Figurë raw Canon CR2</comment>
@@ -25325,7 +26167,7 @@
<comment xml:lang="tr">Canon CR2 ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив CR2 Canon</comment>
<comment xml:lang="vi">Ảnh thô Canon CR2</comment>
- <comment xml:lang="zh_CN">Canon CR2 原始图像</comment>
+ <comment xml:lang="zh_CN">佳能 CR2 原始图像</comment>
<comment xml:lang="zh_TW">Canon CR2 原生影像</comment>
<acronym>CR2</acronym>
<expanded-acronym>Canon Raw 2</expanded-acronym>
@@ -25371,7 +26213,7 @@
<comment xml:lang="pt">imagem em bruto Fuji RAF</comment>
<comment xml:lang="pt_BR">Imagem bruta RAF da Fuji</comment>
<comment xml:lang="ro">Imagine brută Fuji RAF</comment>
- <comment xml:lang="ru">необработанное изображение Fuji RAF</comment>
+ <comment xml:lang="ru">Необработанное изображение Fuji RAF</comment>
<comment xml:lang="sk">Surový obrázok Fuji RAF</comment>
<comment xml:lang="sl">Surova slikovna datoteka Fuji RAF</comment>
<comment xml:lang="sq">Figurë raw Fuji RAF</comment>
@@ -25380,7 +26222,7 @@
<comment xml:lang="tr">Fuji RAF ham görüntüsü</comment>
<comment xml:lang="uk">Цифровий негатив RAF Fuji</comment>
<comment xml:lang="vi">Ảnh thô Fuji RAF</comment>
- <comment xml:lang="zh_CN">富士RAF 原始图像</comment>
+ <comment xml:lang="zh_CN">富士 RAF 原始图像</comment>
<comment xml:lang="zh_TW">Fuji RAF 原生影像</comment>
<acronym>RAF</acronym>
<expanded-acronym>RAw Format</expanded-acronym>
@@ -25427,7 +26269,7 @@
<comment xml:lang="pt">imagem em bruto Kodak DCR</comment>
<comment xml:lang="pt_BR">Imagem bruta DCR da Kodak</comment>
<comment xml:lang="ro">Imagine brută Kodak DCR</comment>
- <comment xml:lang="ru">необработанное изображение Kodak DCR</comment>
+ <comment xml:lang="ru">Необработанное изображение Kodak DCR</comment>
<comment xml:lang="sk">Surový obrázok Kodak DCR</comment>
<comment xml:lang="sl">Surova slikovna datoteka Kodak DCR</comment>
<comment xml:lang="sq">Figurë raw Kodak DCR</comment>
@@ -25436,7 +26278,7 @@
<comment xml:lang="tr">Kodak DCR ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив DCR Kodak</comment>
<comment xml:lang="vi">Ảnh thô Kodak DCR</comment>
- <comment xml:lang="zh_CN">Kodak DCR 原始图像</comment>
+ <comment xml:lang="zh_CN">柯达 DCR 原始图像</comment>
<comment xml:lang="zh_TW">Kodak DCR 原生影像</comment>
<acronym>DCR</acronym>
<expanded-acronym>Digital Camera Raw</expanded-acronym>
@@ -25481,7 +26323,7 @@
<comment xml:lang="pt">imagem em bruto Kodak K25</comment>
<comment xml:lang="pt_BR">Imagem bruta K25 da Kodak</comment>
<comment xml:lang="ro">Imagine brută Kodak K25</comment>
- <comment xml:lang="ru">необработанное изображение Kodak K25</comment>
+ <comment xml:lang="ru">Необработанное изображение Kodak K25</comment>
<comment xml:lang="sk">Surový obrázok Kodak K25</comment>
<comment xml:lang="sl">Surova slikovna datoteka Kodak K25</comment>
<comment xml:lang="sq">Figurë raw Kodak K25</comment>
@@ -25490,7 +26332,7 @@
<comment xml:lang="tr">Kodak K25 ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив K25 Kodak</comment>
<comment xml:lang="vi">Ảnh thô Kodak K25</comment>
- <comment xml:lang="zh_CN">Kodak K25 原始图像</comment>
+ <comment xml:lang="zh_CN">柯达 K25 原始图像</comment>
<comment xml:lang="zh_TW">Kodak K25 原生影像</comment>
<acronym>K25</acronym>
<expanded-acronym>Kodak DC25</expanded-acronym>
@@ -25535,7 +26377,7 @@
<comment xml:lang="pt">imagem em bruto Kodak KDC</comment>
<comment xml:lang="pt_BR">Imagem bruta KDC da Kodak</comment>
<comment xml:lang="ro">Imagine brută Kodak KDC</comment>
- <comment xml:lang="ru">необработанное изображение Kodak KDC</comment>
+ <comment xml:lang="ru">Необработанное изображение Kodak KDC</comment>
<comment xml:lang="sk">Surový obrázok Kodak KDC</comment>
<comment xml:lang="sl">Surova slikovna datoteka Kodak KDC</comment>
<comment xml:lang="sq">Figurë raw Kodak KDC</comment>
@@ -25544,7 +26386,7 @@
<comment xml:lang="tr">Kodak KDC ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив KDC Kodak</comment>
<comment xml:lang="vi">Ảnh thô Kodak KDC</comment>
- <comment xml:lang="zh_CN">Kodak KDC 原始图像</comment>
+ <comment xml:lang="zh_CN">柯达 KDC 原始图像</comment>
<comment xml:lang="zh_TW">Kodak KDC 原生影像</comment>
<acronym>KDC</acronym>
<expanded-acronym>Kodak Digital Camera</expanded-acronym>
@@ -25592,7 +26434,7 @@
<comment xml:lang="pt">imagem em bruto Minolta MRW</comment>
<comment xml:lang="pt_BR">Imagem bruta MRW do Minolta</comment>
<comment xml:lang="ro">Imagine brută Minolta MRW</comment>
- <comment xml:lang="ru">необработанное изображение Minolta MRW</comment>
+ <comment xml:lang="ru">Необработанное изображение Minolta MRW</comment>
<comment xml:lang="sk">Surový obrázok Minolta MRW</comment>
<comment xml:lang="sl">Surova slikovna datoteka Minolta MRW</comment>
<comment xml:lang="sq">Figurë raw Minolta MRW</comment>
@@ -25601,7 +26443,7 @@
<comment xml:lang="tr">Minolta MRW ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив MRW Minolta</comment>
<comment xml:lang="vi">Ảnh thô Minolta MRW</comment>
- <comment xml:lang="zh_CN">Minolta MRW 原始图像</comment>
+ <comment xml:lang="zh_CN">美能达 MRW 原始图像</comment>
<comment xml:lang="zh_TW">Minolta MRW 原生影像</comment>
<acronym>MRW</acronym>
<expanded-acronym>Minolta RaW</expanded-acronym>
@@ -25648,7 +26490,7 @@
<comment xml:lang="pt">imagem em bruto Nikon NEF</comment>
<comment xml:lang="pt_BR">Imagem bruta NEF da Nikon</comment>
<comment xml:lang="ro">Imagine brută Nikon NEF</comment>
- <comment xml:lang="ru">необработанное изображение Nikon NEF</comment>
+ <comment xml:lang="ru">Необработанное изображение Nikon NEF</comment>
<comment xml:lang="sk">Surový obrázok Nikon NEF</comment>
<comment xml:lang="sl">Surova slikovna datoteka Nikon NEF</comment>
<comment xml:lang="sq">Figurë raw Nikon NEF</comment>
@@ -25657,7 +26499,7 @@
<comment xml:lang="tr">Nikon NEF ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив NEF Nikon</comment>
<comment xml:lang="vi">Ảnh thô Nikon NEF</comment>
- <comment xml:lang="zh_CN">Nikon NEF 原始图像</comment>
+ <comment xml:lang="zh_CN">尼康 NEF 原始图像</comment>
<comment xml:lang="zh_TW">Nikon NEF 原生影像</comment>
<acronym>NEF</acronym>
<expanded-acronym>Nikon Electronic Format</expanded-acronym>
@@ -25703,7 +26545,7 @@
<comment xml:lang="pt">imagem em bruto Olympus ORF</comment>
<comment xml:lang="pt_BR">Imagem bruta ORF da Olympus</comment>
<comment xml:lang="ro">Imagine brută Olympus ORF</comment>
- <comment xml:lang="ru">необработанное изображение Olympus ORF</comment>
+ <comment xml:lang="ru">Необработанное изображение Olympus ORF</comment>
<comment xml:lang="sk">Surový obrázok Olympus ORF</comment>
<comment xml:lang="sl">Surova slikovna datoteka Olympus ORF</comment>
<comment xml:lang="sq">Figurë raw Olympus ORF</comment>
@@ -25712,7 +26554,7 @@
<comment xml:lang="tr">Olympus ORF ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив ORF Olympus</comment>
<comment xml:lang="vi">Ảnh thô Olympus ORF</comment>
- <comment xml:lang="zh_CN">Olympus ORF 原始图像</comment>
+ <comment xml:lang="zh_CN">奥林巴斯 ORF 原始图像</comment>
<comment xml:lang="zh_TW">Olympus ORF 原生影像</comment>
<acronym>ORF</acronym>
<expanded-acronym>Olympus Raw Format</expanded-acronym>
@@ -25727,7 +26569,7 @@
</magic>
<glob pattern="*.orf"/>
</mime-type>
- <mime-type type="image/x-panasonic-raw">
+ <mime-type type="image/x-panasonic-rw">
<comment>Panasonic raw image</comment>
<comment xml:lang="ar">صورة Panasonic خامة</comment>
<comment xml:lang="be@latin">Suvoraja vyjava Panasonic</comment>
@@ -25764,7 +26606,7 @@
<comment xml:lang="pt">imagem em bruto Panasonic</comment>
<comment xml:lang="pt_BR">Imagem bruta da Panasonic</comment>
<comment xml:lang="ro">Imagine brută Panasonic</comment>
- <comment xml:lang="ru">необработанное изображение Panasonic</comment>
+ <comment xml:lang="ru">Необработанное изображение Panasonic</comment>
<comment xml:lang="sk">Surový obrázok Panasonic</comment>
<comment xml:lang="sl">Surova slikovna datoteka Panasonic</comment>
<comment xml:lang="sq">Figurë raw Panasonic</comment>
@@ -25773,7 +26615,7 @@
<comment xml:lang="tr">Panasonic ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив Panasonic</comment>
<comment xml:lang="vi">Ảnh thô Panasonic</comment>
- <comment xml:lang="zh_CN">Panasonic 原始图像</comment>
+ <comment xml:lang="zh_CN">松下原始图像</comment>
<comment xml:lang="zh_TW">Panasonic 原生影像</comment>
<sub-class-of type="image/x-dcraw"/>
<magic priority="50">
@@ -25781,8 +26623,9 @@
<match value="IIU\x00\x08\x00\x00\x00" type="string" offset="0"/>
</magic>
<glob pattern="*.raw"/>
+ <alias type="image/x-panasonic-raw"/>
</mime-type>
- <mime-type type="image/x-panasonic-raw2">
+ <mime-type type="image/x-panasonic-rw2">
<comment>Panasonic raw2 image</comment>
<comment xml:lang="bg">Изображение — Panasonic raw2</comment>
<comment xml:lang="ca">imatge «RAW2» de Panasonic</comment>
@@ -25795,6 +26638,7 @@
<comment xml:lang="eu">Panasonic raw2 irudia</comment>
<comment xml:lang="fi">Panasonic raw2 -kuva</comment>
<comment xml:lang="fr">image raw2 Panasonic</comment>
+ <comment xml:lang="ga">íomhá raw2 Panasonic</comment>
<comment xml:lang="gl">imaxe en bruto raw2 de Panasonic</comment>
<comment xml:lang="he">תמונת raw2 של Panasonic</comment>
<comment xml:lang="hr">Panasonic raw2 image</comment>
@@ -25811,14 +26655,14 @@
<comment xml:lang="pl">Obraz raw2 Panasonic</comment>
<comment xml:lang="pt">imagem em bruto Panasonic</comment>
<comment xml:lang="pt_BR">Imagem raw2 da Panasonic</comment>
- <comment xml:lang="ru">необработанное изображение Panasonic RAW 2</comment>
+ <comment xml:lang="ru">Необработанное изображение Panasonic raw2</comment>
<comment xml:lang="sk">Surový obrázok Panasonic raw2</comment>
<comment xml:lang="sl">Slikovna datoteka Panasonic raw2</comment>
<comment xml:lang="sr">Панасоник сирова2 слика</comment>
<comment xml:lang="sv">Panasonic raw2-bild</comment>
<comment xml:lang="tr">Panasonic raw2 görüntüsü</comment>
<comment xml:lang="uk">зображення формату raw2 Panasonic</comment>
- <comment xml:lang="zh_CN">Panasonic raw2 图像</comment>
+ <comment xml:lang="zh_CN">松下 raw2 图像</comment>
<comment xml:lang="zh_TW">Panasonic raw2 影像</comment>
<sub-class-of type="image/x-dcraw"/>
<magic priority="50">
@@ -25826,6 +26670,7 @@
<match value="IIU\x00\x18\x00\x00\x00" type="string" offset="0"/>
</magic>
<glob pattern="*.rw2"/>
+ <alias type="image/x-panasonic-raw2"/>
</mime-type>
<mime-type type="image/x-pentax-pef">
<comment>Pentax PEF raw image</comment>
@@ -25864,7 +26709,7 @@
<comment xml:lang="pt">imagem em bruto Pentax PEF</comment>
<comment xml:lang="pt_BR">Imagem bruta PEF da Pentax</comment>
<comment xml:lang="ro">Imagine brută Pentax PEF</comment>
- <comment xml:lang="ru">необработанное изображение Pentax PEF</comment>
+ <comment xml:lang="ru">Необработанное изображение Pentax PEF</comment>
<comment xml:lang="sk">Surový obrázok Pentax PEF</comment>
<comment xml:lang="sl">Surova slikovna datoteka Pentax PEF</comment>
<comment xml:lang="sq">Figurë raw Pentax PEF</comment>
@@ -25873,7 +26718,7 @@
<comment xml:lang="tr">Pentax PEF ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив PEF Pentax</comment>
<comment xml:lang="vi">Ảnh thô Pentax PEF</comment>
- <comment xml:lang="zh_CN">Pentax PEF 原始图像</comment>
+ <comment xml:lang="zh_CN">宾得 PEF 原始图像</comment>
<comment xml:lang="zh_TW">Pentax PEF 原生影像</comment>
<acronym>PEF</acronym>
<expanded-acronym>Pentax Electronic Format</expanded-acronym>
@@ -25918,7 +26763,7 @@
<comment xml:lang="pt">imagem em bruto Sigma X3F</comment>
<comment xml:lang="pt_BR">Imagem bruta X3F da Sigma</comment>
<comment xml:lang="ro">Imagine brută Sigma X3F</comment>
- <comment xml:lang="ru">необработанное изображение Sigma X3F</comment>
+ <comment xml:lang="ru">Необработанное изображение Sigma X3F</comment>
<comment xml:lang="sk">Surový obrázok Sigma X3F</comment>
<comment xml:lang="sl">Surova slikovna datoteka Sigma X3F</comment>
<comment xml:lang="sq">Fifurë raw Sigma X3F</comment>
@@ -25927,7 +26772,7 @@
<comment xml:lang="tr">Sigma X3F ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив X3F Sigma</comment>
<comment xml:lang="vi">Ảnh thô Sigma X3F</comment>
- <comment xml:lang="zh_CN">Sigma X3F 原始图像</comment>
+ <comment xml:lang="zh_CN">适马 X3F 原始图像</comment>
<comment xml:lang="zh_TW">Sigma X3F 原生影像</comment>
<acronym>X3F</acronym>
<expanded-acronym>X3 Foveon</expanded-acronym>
@@ -25978,7 +26823,7 @@
<comment xml:lang="pt">imagem em bruto Sony SRF</comment>
<comment xml:lang="pt_BR">Imagem bruta SRF da Sony</comment>
<comment xml:lang="ro">Imagine brută Sony SRF</comment>
- <comment xml:lang="ru">необработанное изображение Sony SRF</comment>
+ <comment xml:lang="ru">Необработанное изображение Sony SRF</comment>
<comment xml:lang="sk">Surový obrázok Sony SRF</comment>
<comment xml:lang="sl">Surova slikovna datoteka Sony SRF</comment>
<comment xml:lang="sq">Figurë raw Sony SRF</comment>
@@ -25987,7 +26832,7 @@
<comment xml:lang="tr">Sony SRF ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив SRF Sony</comment>
<comment xml:lang="vi">Ảnh thô Sony SRF</comment>
- <comment xml:lang="zh_CN">Sony SRF 原始映像</comment>
+ <comment xml:lang="zh_CN">索尼 SRF 原始映像</comment>
<comment xml:lang="zh_TW">Sony SRF 原生影像</comment>
<acronym>SRF</acronym>
<expanded-acronym>Sony Raw Format</expanded-acronym>
@@ -26032,7 +26877,7 @@
<comment xml:lang="pt">imagem em bruto Sony SR2</comment>
<comment xml:lang="pt_BR">Imagem bruta SR2 da Sony</comment>
<comment xml:lang="ro">Imagine brută Sony SR2</comment>
- <comment xml:lang="ru">необработанное изображение Sony SR2</comment>
+ <comment xml:lang="ru">Необработанное изображение Sony SR2</comment>
<comment xml:lang="sk">Surový obrázok Sony SR2</comment>
<comment xml:lang="sl">Surova slikovna datoteka Sony SR2</comment>
<comment xml:lang="sq">Figurë raw Sony SR2</comment>
@@ -26041,7 +26886,7 @@
<comment xml:lang="tr">Sony SR2 ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив SR2 Sony</comment>
<comment xml:lang="vi">Ảnh thô Sony SR2</comment>
- <comment xml:lang="zh_CN">Sony SR2 原始映像</comment>
+ <comment xml:lang="zh_CN">索尼 SR2 原始映像</comment>
<comment xml:lang="zh_TW">Sony SR2 原生影像</comment>
<acronym>SR2</acronym>
<expanded-acronym>Sony Raw format 2</expanded-acronym>
@@ -26086,7 +26931,7 @@
<comment xml:lang="pt">imagem em bruto Sony ARW</comment>
<comment xml:lang="pt_BR">Imagem bruta ARW da Sony</comment>
<comment xml:lang="ro">Imagine brută Sony ARW</comment>
- <comment xml:lang="ru">необработанное изображение Sony ARW</comment>
+ <comment xml:lang="ru">Необработанное изображение Sony ARW</comment>
<comment xml:lang="sk">Surový obrázok Sony ARW</comment>
<comment xml:lang="sl">Surova slikovna datoteka Sony ARW</comment>
<comment xml:lang="sq">Figurë raw Sony ARW</comment>
@@ -26095,7 +26940,7 @@
<comment xml:lang="tr">Sony ARW ham görüntüsü</comment>
<comment xml:lang="uk">цифровий негатив ARW Sony</comment>
<comment xml:lang="vi">Ảnh thô Sony ARW</comment>
- <comment xml:lang="zh_CN">Sony ARW 原始映像</comment>
+ <comment xml:lang="zh_CN">索尼 ARW 原始映像</comment>
<comment xml:lang="zh_TW">Sony ARW 原生影像</comment>
<acronym>ARW</acronym>
<expanded-acronym>Alpha Raw format</expanded-acronym>
@@ -26144,7 +26989,7 @@
<comment xml:lang="pt">imagem PNG</comment>
<comment xml:lang="pt_BR">Imagem PNG</comment>
<comment xml:lang="ro">Imagine PNG</comment>
- <comment xml:lang="ru">изображение PNG</comment>
+ <comment xml:lang="ru">Изображение PNG</comment>
<comment xml:lang="sk">Obrázok PNG</comment>
<comment xml:lang="sl">Slikovna datoteka PNG</comment>
<comment xml:lang="sq">Figurë PNG</comment>
@@ -26175,7 +27020,7 @@
<comment xml:lang="eu">'Run Lenght Encoded' bitmap irudia</comment>
<comment xml:lang="fi">RLE-koodattu bittikartta</comment>
<comment xml:lang="fr">image matricielle Run Length Encoded</comment>
- <comment xml:lang="ga">íomhá mhapa giotáin Run Length Encoded</comment>
+ <comment xml:lang="ga">íomhá ghiotánmhapach ionchódaithe fad reatha</comment>
<comment xml:lang="gl">mapa de bits con codificación do tamaño durante a execución</comment>
<comment xml:lang="he">מקודד מפת סיביות של Run Length</comment>
<comment xml:lang="hr">Run Length Encoded bitmap slika</comment>
@@ -26196,7 +27041,7 @@
<comment xml:lang="pt">mapa de bitas Run Length Encoded</comment>
<comment xml:lang="pt_BR">Classe de comprimento imagem bitmap codificada</comment>
<comment xml:lang="ro">Imagine bitmap codată RLE</comment>
- <comment xml:lang="ru">растровое изображение (сжатое RLE)</comment>
+ <comment xml:lang="ru">Растровое изображение, сжатое RLE</comment>
<comment xml:lang="sk">Bitmapový obrázok Run Length Encoded</comment>
<comment xml:lang="sl">Zaporedno kodirana bitna slika (RLE)</comment>
<comment xml:lang="sq">Figurë bitmap RLE (Run Length Encoded)</comment>
@@ -26247,7 +27092,7 @@
<comment xml:lang="pt">imagem SVG</comment>
<comment xml:lang="pt_BR">Imagem SVG</comment>
<comment xml:lang="ro">Imagine SVG</comment>
- <comment xml:lang="ru">изображение SVG</comment>
+ <comment xml:lang="ru">Изображение SVG</comment>
<comment xml:lang="sk">Obrázok SVG</comment>
<comment xml:lang="sl">Slikovna vektorska datoteka SVG</comment>
<comment xml:lang="sq">Figurë SVG</comment>
@@ -26287,7 +27132,7 @@
<comment xml:lang="ga">íomhá SVG comhbhrúite</comment>
<comment xml:lang="gl">imaxe SVG comprimida</comment>
<comment xml:lang="he">תמונת SVG מכווצת</comment>
- <comment xml:lang="hr">komprimirana SVG slika</comment>
+ <comment xml:lang="hr">Sažeta SVG slika</comment>
<comment xml:lang="hu">tömörített SVG kép</comment>
<comment xml:lang="ia">Imagine SVG comprimite</comment>
<comment xml:lang="id">Citra SVG terkompresi</comment>
@@ -26305,7 +27150,7 @@
<comment xml:lang="pt">imagem SVG comprimida</comment>
<comment xml:lang="pt_BR">Imagem SVG compactada</comment>
<comment xml:lang="ro">imagine comprimată SVG</comment>
- <comment xml:lang="ru">сжатое изображение SVG</comment>
+ <comment xml:lang="ru">Сжатое изображение SVG</comment>
<comment xml:lang="sk">Komprimovaný obrázok SVG</comment>
<comment xml:lang="sl">Slikovna datoteka SVG (stisnjena)</comment>
<comment xml:lang="sq">Figurë SVG e kompresuar</comment>
@@ -26360,7 +27205,7 @@
<comment xml:lang="pt">imagem TIFF</comment>
<comment xml:lang="pt_BR">Imagem TIFF</comment>
<comment xml:lang="ro">Imagine TIFF</comment>
- <comment xml:lang="ru">изображение TIFF</comment>
+ <comment xml:lang="ru">Изображение TIFF</comment>
<comment xml:lang="sk">Obrázok TIFF</comment>
<comment xml:lang="sl">Slikovna datoteka TIFF</comment>
<comment xml:lang="sq">Figurë TIFF</comment>
@@ -26389,9 +27234,9 @@
<comment xml:lang="el">Πολυσέλιδη εικόνα TIFF</comment>
<comment xml:lang="en_GB">Multi-page TIFF image</comment>
<comment xml:lang="es">imagen TIFF de varias páginas</comment>
- <comment xml:lang="eu">Orri anitzeko TIFF irudia</comment>
<comment xml:lang="fi">Monisivuinen TIFF-kuva</comment>
<comment xml:lang="fr">Image TIFF multi-page</comment>
+ <comment xml:lang="ga">íomhá il-leathanach TIFF</comment>
<comment xml:lang="gl">Imaxe TIFF multipáxina</comment>
<comment xml:lang="he">תמונת TIFF עם ריבוי עמודים</comment>
<comment xml:lang="hr">Višestrana TIFF slika</comment>
@@ -26425,7 +27270,7 @@
<comment xml:lang="be@latin">Vyjava AutoCAD</comment>
<comment xml:lang="bg">Изображение — AutoCAD</comment>
<comment xml:lang="ca">imatge d'AutoCAD</comment>
- <comment xml:lang="cs">obrázek AutoCAD</comment>
+ <comment xml:lang="cs">výkres AutoCAD</comment>
<comment xml:lang="cy">Delwedd AutoCAD</comment>
<comment xml:lang="da">AutoCAD-billede</comment>
<comment xml:lang="de">AutoCAD-Bild</comment>
@@ -26460,7 +27305,7 @@
<comment xml:lang="pt">imagem AutoCAD</comment>
<comment xml:lang="pt_BR">Imagem do AutoCAD</comment>
<comment xml:lang="ro">Imagine AutoCAD</comment>
- <comment xml:lang="ru">изображение AutoCAD</comment>
+ <comment xml:lang="ru">Изображение AutoCAD</comment>
<comment xml:lang="sk">Obrázok AutoCAD</comment>
<comment xml:lang="sl">Slikovna datoteka AutoCAD</comment>
<comment xml:lang="sq">Figurë AutoCAD</comment>
@@ -26490,7 +27335,7 @@
<comment xml:lang="fi">DXF-vektorikuva</comment>
<comment xml:lang="fo">DXF vektormynd</comment>
<comment xml:lang="fr">image vectorielle DXF</comment>
- <comment xml:lang="ga">íomhá veicteoir DXF</comment>
+ <comment xml:lang="ga">íomhá veicteoireach DXF</comment>
<comment xml:lang="gl">imaxe de vector DXF</comment>
<comment xml:lang="he">תמונת DXF וקטורית</comment>
<comment xml:lang="hr">DXF vektorska slika</comment>
@@ -26513,7 +27358,7 @@
<comment xml:lang="pt">imagem de vectores DXF</comment>
<comment xml:lang="pt_BR">Imagem vetorial DXF</comment>
<comment xml:lang="ro">Imagine vectorială DXF</comment>
- <comment xml:lang="ru">векторное изображение DXF</comment>
+ <comment xml:lang="ru">Векторное изображение DXF</comment>
<comment xml:lang="sk">Vektorový obrázok DXF</comment>
<comment xml:lang="sl">Slikovna vektorska datoteka DXF</comment>
<comment xml:lang="sq">Figurë vektoriale DFX</comment>
@@ -26533,6 +27378,7 @@
<mime-type type="image/vnd.ms-modi">
<comment>Microsoft Document Imaging format</comment>
<comment xml:lang="ar">صيغة مستند تصوير مايكروسوفت</comment>
+ <comment xml:lang="ast">Formatu d'imáxenes de Microsoft Document</comment>
<comment xml:lang="bg">Изображение — Microsoft Document Imaging</comment>
<comment xml:lang="ca">format Microsoft Document Imaging</comment>
<comment xml:lang="cs">formát Microsoft Document Imaging</comment>
@@ -26564,7 +27410,7 @@
<comment xml:lang="pt">formato Microsoft Document Imaging</comment>
<comment xml:lang="pt_BR">Formato do Microsoft Document Imaging</comment>
<comment xml:lang="ro">Format Microsoft Document Imaging</comment>
- <comment xml:lang="ru">формат Microsoft Document Imaging</comment>
+ <comment xml:lang="ru">Формат Microsoft Document Imaging</comment>
<comment xml:lang="sk">Formát Microsoft Document Imaging</comment>
<comment xml:lang="sl">Zapis Microsoft Document Imaging</comment>
<comment xml:lang="sr">запис слика Мајкрософтовог документа</comment>
@@ -26572,7 +27418,7 @@
<comment xml:lang="tr">Microsoft Belge Görüntüleme biçimi</comment>
<comment xml:lang="uk">формат Microsoft Document Imaging</comment>
<comment xml:lang="vi">Định dạng tạo ảnh tài liệu Microsoft</comment>
- <comment xml:lang="zh_CN">Microsoft Document Imaging 扫描图像</comment>
+ <comment xml:lang="zh_CN">Microsoft Document Imaging 格式</comment>
<comment xml:lang="zh_TW">微軟文件影像格式</comment>
<acronym>MDI</acronym>
<expanded-acronym>Microsoft Document Imaging</expanded-acronym>
@@ -26593,6 +27439,7 @@
<comment xml:lang="eu">WebP irudia</comment>
<comment xml:lang="fi">WebP-kuva</comment>
<comment xml:lang="fr">image WebP</comment>
+ <comment xml:lang="ga">íomhá WebP</comment>
<comment xml:lang="gl">Imaxe WebP</comment>
<comment xml:lang="he">תמונת WebP</comment>
<comment xml:lang="hr">WebP slika</comment>
@@ -26664,7 +27511,7 @@
<comment xml:lang="pt">imagem 3D Studio</comment>
<comment xml:lang="pt_BR">Imagem do 3D Studio</comment>
<comment xml:lang="ro">Imagine 3D Studio</comment>
- <comment xml:lang="ru">сцена 3D Studio</comment>
+ <comment xml:lang="ru">Сцена 3D Studio</comment>
<comment xml:lang="sk">Obrázok 3D Studio</comment>
<comment xml:lang="sl">Slikovna datoteka 3D Studio</comment>
<comment xml:lang="sq">Figurë 3D Studio</comment>
@@ -26717,7 +27564,7 @@
<comment xml:lang="pt">imagem Applix Graphics</comment>
<comment xml:lang="pt_BR">Imagem do Applix Graphics</comment>
<comment xml:lang="ro">Imagine Applix Graphics</comment>
- <comment xml:lang="ru">изображение Applix Graphics</comment>
+ <comment xml:lang="ru">Изображение Applix Graphics</comment>
<comment xml:lang="sk">Obrázok Applix Graphics</comment>
<comment xml:lang="sl">Slikovna datoteka Applix Graphics</comment>
<comment xml:lang="sq">Figurë Applix Graphics</comment>
@@ -26754,7 +27601,7 @@
<comment xml:lang="ga">íomhá EPS (comhbhrúite le bzip)</comment>
<comment xml:lang="gl">imaxe EPS (comprimida con bzip)</comment>
<comment xml:lang="he">תמונת EPS (מכווץ בbzip)</comment>
- <comment xml:lang="hr">EPS slika (komprimirana bzip-om)</comment>
+ <comment xml:lang="hr">EPS slika (bzip sažeta)</comment>
<comment xml:lang="hu">EPS kép (bzip-tömörítésű)</comment>
<comment xml:lang="ia">Imagine EPS (comprimite con bzip)</comment>
<comment xml:lang="id">Citra EPS (terkompresi bzip)</comment>
@@ -26773,7 +27620,7 @@
<comment xml:lang="pt">imagem EPS (compressão bzip)</comment>
<comment xml:lang="pt_BR">Imagem EPS (compactada com bzip)</comment>
<comment xml:lang="ro">Imagine EPS (compresie bzip)</comment>
- <comment xml:lang="ru">изображение EPS (сжатое bzip)</comment>
+ <comment xml:lang="ru">Изображение EPS (сжатое bzip)</comment>
<comment xml:lang="sk">Obrázok EPS (komprimovaný pomocou bzip)</comment>
<comment xml:lang="sl">Slikovna datoteka EPS (stisnjena z bzip)</comment>
<comment xml:lang="sq">Figurë EPS (e kompresuar me bzip)</comment>
@@ -26782,7 +27629,7 @@
<comment xml:lang="tr">EPS görüntüsü (bzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">зображення EPS (стиснене bzip)</comment>
<comment xml:lang="vi">Ảnh EPS (đã nén bzip)</comment>
- <comment xml:lang="zh_CN">EPS 图像(bzip 压缩)</comment>
+ <comment xml:lang="zh_CN">EPS 图像(bzip 压缩)</comment>
<comment xml:lang="zh_TW">EPS 影像 (bzip 格式壓縮)</comment>
<sub-class-of type="application/x-bzip"/>
<glob pattern="*.eps.bz2"/>
@@ -26831,7 +27678,7 @@
<comment xml:lang="pt">imagem raster CMU</comment>
<comment xml:lang="pt_BR">Imagem raster CMU</comment>
<comment xml:lang="ro">Imagine raster CMU</comment>
- <comment xml:lang="ru">растровое изображение CMU</comment>
+ <comment xml:lang="ru">Растровое изображение CMU</comment>
<comment xml:lang="sk">Rastrový obrázok CMU</comment>
<comment xml:lang="sl">Slikovna rastrska datoteka CMU</comment>
<comment xml:lang="sq">Figurë raster CMU</comment>
@@ -26840,7 +27687,7 @@
<comment xml:lang="tr">CMU tarama görüntüsü</comment>
<comment xml:lang="uk">растрове зображення CMU</comment>
<comment xml:lang="vi">Ảnh mành CMU</comment>
- <comment xml:lang="zh_CN">CMU 矢量图像</comment>
+ <comment xml:lang="zh_CN">CMU 光栅图像</comment>
<comment xml:lang="zh_TW">CMU raster 影像</comment>
<glob pattern="*.ras"/>
</mime-type>
@@ -26881,7 +27728,7 @@
<comment xml:lang="pt">imagem GIMP comprimida</comment>
<comment xml:lang="pt_BR">Imagem do GIMP compactada</comment>
<comment xml:lang="ro">imagine comprimată GIMP</comment>
- <comment xml:lang="ru">сжатое изображение GIMP</comment>
+ <comment xml:lang="ru">Сжатое изображение GIMP</comment>
<comment xml:lang="sk">Komprimovaný obrázok GIMP</comment>
<comment xml:lang="sl">Slikovna datoteka GIMP (stisnjena)</comment>
<comment xml:lang="sq">Figurë GIMP e kompresuar</comment>
@@ -26934,7 +27781,7 @@
<comment xml:lang="pt">imagem DICOM</comment>
<comment xml:lang="pt_BR">Imagem DICOM</comment>
<comment xml:lang="ro">Imagine DICOM</comment>
- <comment xml:lang="ru">изображение DICOM</comment>
+ <comment xml:lang="ru">Изображение DICOM</comment>
<comment xml:lang="sk">Obrázok DICOM</comment>
<comment xml:lang="sl">Slikovna datoteka DICOM</comment>
<comment xml:lang="sq">Figurë DICOM</comment>
@@ -26957,6 +27804,7 @@
<mime-type type="application/x-docbook+xml">
<comment>DocBook document</comment>
<comment xml:lang="ar">مستند DocBook</comment>
+ <comment xml:lang="ast">Documentu DocBook</comment>
<comment xml:lang="be@latin">Dakument DocBook</comment>
<comment xml:lang="bg">Документ — DocBook</comment>
<comment xml:lang="ca">document DocBook</comment>
@@ -26993,7 +27841,7 @@
<comment xml:lang="pt">documento DocBook</comment>
<comment xml:lang="pt_BR">Documento DocBook</comment>
<comment xml:lang="ro">Document DocBook</comment>
- <comment xml:lang="ru">документ DocBook</comment>
+ <comment xml:lang="ru">Документ DocBook</comment>
<comment xml:lang="sk">Dokument DocBook</comment>
<comment xml:lang="sl">Dokument DocBook</comment>
<comment xml:lang="sq">Dokument DocBook</comment>
@@ -27056,7 +27904,7 @@
<comment xml:lang="pt">imagem DIB</comment>
<comment xml:lang="pt_BR">Imagem DIB</comment>
<comment xml:lang="ro">Imagine DIB</comment>
- <comment xml:lang="ru">изображение DIB</comment>
+ <comment xml:lang="ru">Изображение DIB</comment>
<comment xml:lang="sk">Obrázok DIB</comment>
<comment xml:lang="sl">Slikovna datoteka DIB</comment>
<comment xml:lang="sq">Figurë DIB</comment>
@@ -27113,7 +27961,7 @@
<comment xml:lang="pt">imagem DjVu</comment>
<comment xml:lang="pt_BR">Imagem DjVu</comment>
<comment xml:lang="ro">Imagine DjVu</comment>
- <comment xml:lang="ru">изображение DjVu</comment>
+ <comment xml:lang="ru">Изображение DjVu</comment>
<comment xml:lang="sk">Obrázok DjVu</comment>
<comment xml:lang="sl">Slikovna datoteka DjVu</comment>
<comment xml:lang="sq">Figurë DjVu</comment>
@@ -27126,7 +27974,7 @@
<comment xml:lang="zh_TW">DjVu 影像</comment>
<alias type="image/x-djvu"/>
<alias type="image/x.djvu"/>
- <magic priority="50">
+ <magic priority="80">
<match value="AT&amp;TFORM" type="string" offset="0">
<match value="DJVU" type="string" offset="12"/>
</match>
@@ -27139,6 +27987,7 @@
</mime-type>
<mime-type type="image/vnd.djvu+multipage">
<comment>DjVu document</comment>
+ <comment xml:lang="ast">Documentu DjVu</comment>
<comment xml:lang="ca">document DjVu</comment>
<comment xml:lang="cs">dokument DjVu</comment>
<comment xml:lang="da">DjVu-dokument</comment>
@@ -27149,6 +27998,7 @@
<comment xml:lang="eu">DjVu dokumentua</comment>
<comment xml:lang="fi">DjVu-asiakirja</comment>
<comment xml:lang="fr">document DjVu</comment>
+ <comment xml:lang="ga">cáipéis DjVu</comment>
<comment xml:lang="he">מסמך DjVu</comment>
<comment xml:lang="hr">DjVu dokument</comment>
<comment xml:lang="hu">DjVu dokumentum</comment>
@@ -27161,7 +28011,7 @@
<comment xml:lang="pl">Dokument DjVu</comment>
<comment xml:lang="pt">documento DjVu</comment>
<comment xml:lang="pt_BR">Documento DjVu</comment>
- <comment xml:lang="ru">документ DjVu</comment>
+ <comment xml:lang="ru">Документ DjVu</comment>
<comment xml:lang="sk">Dokument DjVu</comment>
<comment xml:lang="sr">ДјВу документ</comment>
<comment xml:lang="sv">DjVu-dokument</comment>
@@ -27170,7 +28020,7 @@
<comment xml:lang="zh_CN">DjVu 文档</comment>
<comment xml:lang="zh_TW">DjVu 文件</comment>
<generic-icon name="x-office-document"/>
- <magic priority="50">
+ <magic priority="80">
<match value="AT&amp;TFORM" type="string" offset="0">
<match value="DJVM" type="string" offset="12"/>
</match>
@@ -27221,7 +28071,7 @@
<comment xml:lang="pt">imagem DPX</comment>
<comment xml:lang="pt_BR">Imagem DPX</comment>
<comment xml:lang="ro">Imagine DPX</comment>
- <comment xml:lang="ru">изображение DPX</comment>
+ <comment xml:lang="ru">Изображение DPX</comment>
<comment xml:lang="sk">Obrázok DPX</comment>
<comment xml:lang="sl">Slikovna datoteka DPX</comment>
<comment xml:lang="sq">Figurë DPX</comment>
@@ -27277,7 +28127,7 @@
<comment xml:lang="pt">imagem EPS</comment>
<comment xml:lang="pt_BR">Imagem EPS</comment>
<comment xml:lang="ro">Imagine EPS</comment>
- <comment xml:lang="ru">изображение EPS</comment>
+ <comment xml:lang="ru">Изображение EPS</comment>
<comment xml:lang="sk">Obrázok EPS</comment>
<comment xml:lang="sl">Slikovna datoteka EPS</comment>
<comment xml:lang="sq">Figurë EPS</comment>
@@ -27307,6 +28157,7 @@
<mime-type type="image/fits">
<comment>FITS document</comment>
<comment xml:lang="ar">مستند FITS</comment>
+ <comment xml:lang="ast">Documentu FITS</comment>
<comment xml:lang="be@latin">Dakument FITS</comment>
<comment xml:lang="bg">Документ — FITS</comment>
<comment xml:lang="ca">document FITS</comment>
@@ -27343,7 +28194,7 @@
<comment xml:lang="pt">documento FITS</comment>
<comment xml:lang="pt_BR">Documento FITS</comment>
<comment xml:lang="ro">Document FITS</comment>
- <comment xml:lang="ru">документ FITS</comment>
+ <comment xml:lang="ru">Документ FITS</comment>
<comment xml:lang="sk">Dokument FITS</comment>
<comment xml:lang="sl">Dokument FITS</comment>
<comment xml:lang="sq">Dokument FITS</comment>
@@ -27401,7 +28252,7 @@
<comment xml:lang="pt">imagem FPX</comment>
<comment xml:lang="pt_BR">Imagem FPX</comment>
<comment xml:lang="ro">Imagine FPX</comment>
- <comment xml:lang="ru">изображение FPX</comment>
+ <comment xml:lang="ru">Изображение FPX</comment>
<comment xml:lang="sk">Obrázok FPX</comment>
<comment xml:lang="sl">Slikovna datoteka FPX</comment>
<comment xml:lang="sq">Figurë FPX</comment>
@@ -27437,7 +28288,7 @@
<comment xml:lang="ga">íomhá EPS (comhbhrúite le gzip)</comment>
<comment xml:lang="gl">imaxe EPS (comprimida con gzip)</comment>
<comment xml:lang="he">תמונת EPS (מכווץ ע״י gzip)</comment>
- <comment xml:lang="hr">EPS slika (komprimirana gzip-om)</comment>
+ <comment xml:lang="hr">EPS slika (gzip sažeta)</comment>
<comment xml:lang="hu">EPS kép (gzip-tömörítésű)</comment>
<comment xml:lang="ia">Imagine EPS (comprimite con gzip)</comment>
<comment xml:lang="id">Citra EPS (terkompresi gzip)</comment>
@@ -27456,7 +28307,7 @@
<comment xml:lang="pt">imagem EPS (compressão gzip)</comment>
<comment xml:lang="pt_BR">Imagem EPS (compactada com gzip)</comment>
<comment xml:lang="ro">Imagine EPS (compresie gzip)</comment>
- <comment xml:lang="ru">изображение EPS (сжатое gzip)</comment>
+ <comment xml:lang="ru">Изображение EPS (сжатое gzip)</comment>
<comment xml:lang="sk">Obrázok EPS (komprimovaný pomocou gzip)</comment>
<comment xml:lang="sl">Slikovna datoteka EPS (stisnjena z gzip)</comment>
<comment xml:lang="sq">Figurë EPS (e kompresuar me gzip)</comment>
@@ -27465,7 +28316,7 @@
<comment xml:lang="tr">EPS görüntüsü (gzip ile sıkıştırılmış)</comment>
<comment xml:lang="uk">зображення EPS (стиснене gzip)</comment>
<comment xml:lang="vi">Ảnh EPS (đã nén gzip)</comment>
- <comment xml:lang="zh_CN">EPS 图像(gzip 压缩)</comment>
+ <comment xml:lang="zh_CN">EPS 图像(gzip 压缩)</comment>
<comment xml:lang="zh_TW">EPS 影像 (gzip 格式壓縮)</comment>
<sub-class-of type="application/gzip"/>
<glob pattern="*.eps.gz"/>
@@ -27484,6 +28335,7 @@
<comment xml:lang="eu">Windows ikonoa</comment>
<comment xml:lang="fi">Windows-kuvake</comment>
<comment xml:lang="fr">icône Windows</comment>
+ <comment xml:lang="ga">deilbhín Windows</comment>
<comment xml:lang="he">סמל של Windows</comment>
<comment xml:lang="hr">Windows ikona</comment>
<comment xml:lang="hu">Windows ikon</comment>
@@ -27496,7 +28348,7 @@
<comment xml:lang="pl">Ikona Windows</comment>
<comment xml:lang="pt">ícone Windows</comment>
<comment xml:lang="pt_BR">Ícone do Windows</comment>
- <comment xml:lang="ru">значок Windows</comment>
+ <comment xml:lang="ru">Значок Windows</comment>
<comment xml:lang="sk">Ikona Windows</comment>
<comment xml:lang="sl">Ikona Windows</comment>
<comment xml:lang="sr">Иконица Виндоуза</comment>
@@ -27557,7 +28409,7 @@
<comment xml:lang="pt">ćone MacOS X</comment>
<comment xml:lang="pt_BR">Ícone do MacOS X</comment>
<comment xml:lang="ro">Iconiță MacOS X</comment>
- <comment xml:lang="ru">значок MacOS X</comment>
+ <comment xml:lang="ru">Значок MacOS X</comment>
<comment xml:lang="sk">Ikona MacOS X</comment>
<comment xml:lang="sl">Datoteka ikone MacOS X</comment>
<comment xml:lang="sq">Ikonë MacOS X</comment>
@@ -27614,7 +28466,7 @@
<comment xml:lang="pt">imagem ILBM</comment>
<comment xml:lang="pt_BR">Imagem ILBM</comment>
<comment xml:lang="ro">Imagine ILBM</comment>
- <comment xml:lang="ru">изображение ILBM</comment>
+ <comment xml:lang="ru">Изображение ILBM</comment>
<comment xml:lang="sk">Obrázok ILMB</comment>
<comment xml:lang="sl">Slikovna datoteka ILBM</comment>
<comment xml:lang="sq">Figurë ILBM</comment>
@@ -27678,7 +28530,7 @@
<comment xml:lang="pt">imagem JNG</comment>
<comment xml:lang="pt_BR">Imagem JNG</comment>
<comment xml:lang="ro">Imagine JNG</comment>
- <comment xml:lang="ru">изображение JNG</comment>
+ <comment xml:lang="ru">Изображение JNG</comment>
<comment xml:lang="sk">Obrázok JNG</comment>
<comment xml:lang="sl">Slikovna datoteka JNG</comment>
<comment xml:lang="sq">Figurë JNG</comment>
@@ -27734,7 +28586,7 @@
<comment xml:lang="pt">Objecto LightWave</comment>
<comment xml:lang="pt_BR">Objeto LightWave</comment>
<comment xml:lang="ro">Obiect LightWave</comment>
- <comment xml:lang="ru">объект LightWave</comment>
+ <comment xml:lang="ru">Объект LightWave</comment>
<comment xml:lang="sk">Objekt LightWave</comment>
<comment xml:lang="sl">Datoteka predmeta LightWave</comment>
<comment xml:lang="sq">Objekt LightWave</comment>
@@ -27789,7 +28641,7 @@
<comment xml:lang="pt">cenário LightWave</comment>
<comment xml:lang="pt_BR">Cena LightWave</comment>
<comment xml:lang="ro">Scenă LightWave</comment>
- <comment xml:lang="ru">сцена LightWave</comment>
+ <comment xml:lang="ru">Сцена LightWave</comment>
<comment xml:lang="sk">Scéna LightWave</comment>
<comment xml:lang="sl">Datoteka scene LightWave</comment>
<comment xml:lang="sq">Skenë LightWave</comment>
@@ -27818,7 +28670,7 @@
<comment xml:lang="fi">MacPaint-bittikartta</comment>
<comment xml:lang="fo">MacPaint Bitmap mynd</comment>
<comment xml:lang="fr">image matricielle MacPaint</comment>
- <comment xml:lang="ga">íomhá MacPaint Bitmap</comment>
+ <comment xml:lang="ga">íomhá ghiotánmhapach MacPaint</comment>
<comment xml:lang="gl">imaxe de mapa de bits MacPaint</comment>
<comment xml:lang="he">תמונת מפת-סיביות של MacPaint</comment>
<comment xml:lang="hr">MacPaint Bitmap slika</comment>
@@ -27839,7 +28691,7 @@
<comment xml:lang="pt">imagem MacPaint Bitmap</comment>
<comment xml:lang="pt_BR">Imagem de bitmap do MacPaint</comment>
<comment xml:lang="ro">Imagine MacPaint Bitmap</comment>
- <comment xml:lang="ru">растровое изображение MacPaint</comment>
+ <comment xml:lang="ru">Растровое изображение MacPaint</comment>
<comment xml:lang="sk">Obrázok MacPaint Bitmap</comment>
<comment xml:lang="sl">Slikovna bitna datoteka MacPaint</comment>
<comment xml:lang="sq">Figurë BitMap MacPaint</comment>
@@ -27889,7 +28741,7 @@
<comment xml:lang="pt">desenho Office</comment>
<comment xml:lang="pt_BR">Desenho do Office</comment>
<comment xml:lang="ro">Desen Office</comment>
- <comment xml:lang="ru">изображение Office</comment>
+ <comment xml:lang="ru">Рисунок Office</comment>
<comment xml:lang="sk">Kresba Office</comment>
<comment xml:lang="sl">Datoteka risbe Office</comment>
<comment xml:lang="sq">Vizatim Office</comment>
@@ -27898,7 +28750,7 @@
<comment xml:lang="tr">Ofis çizimi</comment>
<comment xml:lang="uk">малюнок Office</comment>
<comment xml:lang="vi">Bản vẽ Office</comment>
- <comment xml:lang="zh_CN">Microsoft Office 绘图</comment>
+ <comment xml:lang="zh_CN">Office 绘图</comment>
<comment xml:lang="zh_TW">Office 繪圖</comment>
<glob pattern="*.msod"/>
</mime-type>
@@ -27940,7 +28792,7 @@
<comment xml:lang="pt">imagem NIFF</comment>
<comment xml:lang="pt_BR">Imagem NIFF</comment>
<comment xml:lang="ro">Imagine NIF</comment>
- <comment xml:lang="ru">изображение NIFF</comment>
+ <comment xml:lang="ru">Изображение NIFF</comment>
<comment xml:lang="sk">Obrázok NIFF</comment>
<comment xml:lang="sl">Slikovna datoteka NIFF</comment>
<comment xml:lang="sq">Figurë NIFF</comment>
@@ -27993,7 +28845,7 @@
<comment xml:lang="pt">imagem PCX</comment>
<comment xml:lang="pt_BR">Imagem PCX</comment>
<comment xml:lang="ro">Imagine PCX</comment>
- <comment xml:lang="ru">изображение PCX</comment>
+ <comment xml:lang="ru">Изображение PCX</comment>
<comment xml:lang="sk">Obrázok PCX</comment>
<comment xml:lang="sl">Slikovna datoteka PCX</comment>
<comment xml:lang="sq">Figurë PCX</comment>
@@ -28056,7 +28908,7 @@
<comment xml:lang="pt">imagem PCD</comment>
<comment xml:lang="pt_BR">Imagem PCD</comment>
<comment xml:lang="ro">Imagine PCD</comment>
- <comment xml:lang="ru">изображение PCD</comment>
+ <comment xml:lang="ru">Изображение PCD</comment>
<comment xml:lang="sk">Obrázok PCD</comment>
<comment xml:lang="sl">Slikovna datoteka PCD</comment>
<comment xml:lang="sq">Figurë PCD</comment>
@@ -28112,7 +28964,7 @@
<comment xml:lang="pt">imagem PNM</comment>
<comment xml:lang="pt_BR">Imagem PNM</comment>
<comment xml:lang="ro">Imagine PNM</comment>
- <comment xml:lang="ru">изображение PNM</comment>
+ <comment xml:lang="ru">Изображение PNM</comment>
<comment xml:lang="sk">Obrázok PNM</comment>
<comment xml:lang="sl">Slikovna datoteka PNM</comment>
<comment xml:lang="sq">Figurë PNM</comment>
@@ -28165,7 +29017,7 @@
<comment xml:lang="pt">imagem PBM</comment>
<comment xml:lang="pt_BR">Imagem PBM</comment>
<comment xml:lang="ro">Imagine PBM</comment>
- <comment xml:lang="ru">изображение PBM</comment>
+ <comment xml:lang="ru">Изображение PBM</comment>
<comment xml:lang="sk">Obrázok PBM</comment>
<comment xml:lang="sl">Slikovna datoteka PBM</comment>
<comment xml:lang="sq">Figurë PBM</comment>
@@ -28234,7 +29086,7 @@
<comment xml:lang="pt">imagem PGM</comment>
<comment xml:lang="pt_BR">Imagem PGM</comment>
<comment xml:lang="ro">Imagine PGM</comment>
- <comment xml:lang="ru">изображение PGM</comment>
+ <comment xml:lang="ru">Изображение PGM</comment>
<comment xml:lang="sk">Obrázok PGM</comment>
<comment xml:lang="sl">Slikovna datoteka PGM</comment>
<comment xml:lang="sq">Figurë PGM</comment>
@@ -28303,7 +29155,7 @@
<comment xml:lang="pt">imagem PPM</comment>
<comment xml:lang="pt_BR">Imagem PPM</comment>
<comment xml:lang="ro">Imagine PPM</comment>
- <comment xml:lang="ru">изображение PPM</comment>
+ <comment xml:lang="ru">Изображение PPM</comment>
<comment xml:lang="sk">Obrázok PPM</comment>
<comment xml:lang="sl">Slikovna datoteka PPM</comment>
<comment xml:lang="sq">Figurë PPM</comment>
@@ -28369,7 +29221,7 @@
<comment xml:lang="pt">imagem Photoshop</comment>
<comment xml:lang="pt_BR">Imagem do Photoshop</comment>
<comment xml:lang="ro">Imagine Photoshop</comment>
- <comment xml:lang="ru">изображение Photoshop</comment>
+ <comment xml:lang="ru">Изображение Photoshop</comment>
<comment xml:lang="sk">Obrázok Photoshop</comment>
<comment xml:lang="sl">Slikovna datoteka Photoshop</comment>
<comment xml:lang="sr">Фотошоп слика</comment>
@@ -28431,7 +29283,7 @@
<comment xml:lang="pt">imagem RGB</comment>
<comment xml:lang="pt_BR">Imagem RGB</comment>
<comment xml:lang="ro">Imagine RGB</comment>
- <comment xml:lang="ru">изображение RGB</comment>
+ <comment xml:lang="ru">Изображение RGB</comment>
<comment xml:lang="sk">Obrázok RGB</comment>
<comment xml:lang="sl">Slikovna datoteka RGB</comment>
<comment xml:lang="sq">Figurë RGB</comment>
@@ -28482,7 +29334,7 @@
<comment xml:lang="pt">imagem SGI</comment>
<comment xml:lang="pt_BR">Imagem SGI</comment>
<comment xml:lang="ro">Imagine SGI</comment>
- <comment xml:lang="ru">изображение SGI</comment>
+ <comment xml:lang="ru">Изображение SGI</comment>
<comment xml:lang="sk">Obrázok SGI</comment>
<comment xml:lang="sl">Slikovna datoteka SGI</comment>
<comment xml:lang="sq">Figurë SGI</comment>
@@ -28532,7 +29384,7 @@
<comment xml:lang="pt">imagem raster Sun</comment>
<comment xml:lang="pt_BR">Imagem raster da Sun</comment>
<comment xml:lang="ro">Imagine rasterizată Sun</comment>
- <comment xml:lang="ru">растровое изображение Sun</comment>
+ <comment xml:lang="ru">Растровое изображение Sun</comment>
<comment xml:lang="sk">Rastrový obrázok Sun</comment>
<comment xml:lang="sl">Slikovna rastrska datoteka Sun</comment>
<comment xml:lang="sq">Figurë raster Sun</comment>
@@ -28586,7 +29438,7 @@
<comment xml:lang="pt">imagem TGA</comment>
<comment xml:lang="pt_BR">Imagem TGA</comment>
<comment xml:lang="ro">Imagine TGA</comment>
- <comment xml:lang="ru">изображение TGA</comment>
+ <comment xml:lang="ru">Изображение TGA</comment>
<comment xml:lang="sk">Obrázok TGA</comment>
<comment xml:lang="sl">Slikovna datoteka TGA</comment>
<comment xml:lang="sq">Figurë TGA</comment>
@@ -28614,8 +29466,8 @@
<match value="0x20" type="byte" offset="16"/>
</match>
</magic>
- <glob pattern="*.icb"/>
<glob pattern="*.tga"/>
+ <glob pattern="*.icb"/>
<glob pattern="*.tpic"/>
<glob pattern="*.vda"/>
<glob pattern="*.vst"/>
@@ -28641,7 +29493,7 @@
<comment xml:lang="ga">cúrsóir Windows</comment>
<comment xml:lang="gl">Cursor de Windows</comment>
<comment xml:lang="he">סמן של Windows</comment>
- <comment xml:lang="hr">Windows kursor</comment>
+ <comment xml:lang="hr">Windows pokazivač</comment>
<comment xml:lang="hu">Windows-kurzor</comment>
<comment xml:lang="ia">Cursor pro Windows</comment>
<comment xml:lang="id">Kursor Windows</comment>
@@ -28660,7 +29512,7 @@
<comment xml:lang="pt">cursor Windows</comment>
<comment xml:lang="pt_BR">Cursor do Windows</comment>
<comment xml:lang="ro">Cursor Windows</comment>
- <comment xml:lang="ru">курсор Windows</comment>
+ <comment xml:lang="ru">Курсор Windows</comment>
<comment xml:lang="sk">Kurzor Windows</comment>
<comment xml:lang="sl">Datoteka kazalke Windows</comment>
<comment xml:lang="sq">Kursor Windows</comment>
@@ -28694,10 +29546,10 @@
<comment xml:lang="fi">animoitu Windows-osoitin</comment>
<comment xml:lang="fo">Windows livindaigjørdur vísi</comment>
<comment xml:lang="fr">curseur animé Windows</comment>
- <comment xml:lang="ga">cúrsóir beo Windows</comment>
+ <comment xml:lang="ga">cúrsóir beoite Windows</comment>
<comment xml:lang="gl">Cursor animado de Windows</comment>
<comment xml:lang="he">סמן מונפש של Windows</comment>
- <comment xml:lang="hr">Windows animirani kursor</comment>
+ <comment xml:lang="hr">Windows animirani pokazivač</comment>
<comment xml:lang="hu">Windows animált kurzor</comment>
<comment xml:lang="ia">Cursor animate pro Windows</comment>
<comment xml:lang="id">Kursor animasi Windows</comment>
@@ -28714,7 +29566,7 @@
<comment xml:lang="pt">cursor animado Windows</comment>
<comment xml:lang="pt_BR">Cursor animado do Windows</comment>
<comment xml:lang="ro">Cursor animat Windows</comment>
- <comment xml:lang="ru">анимированный курсор Windows</comment>
+ <comment xml:lang="ru">Анимированный курсор Windows</comment>
<comment xml:lang="sk">Animovaný kurzor Windows</comment>
<comment xml:lang="sl">Datoteka animirane kazalke Windows</comment>
<comment xml:lang="sq">Kursor i animuar Windows</comment>
@@ -28723,7 +29575,7 @@
<comment xml:lang="tr">Windows canlandırmalı imleci</comment>
<comment xml:lang="uk">анімований курсор Windows</comment>
<comment xml:lang="vi">Con chạy hoạt họa Windows</comment>
- <comment xml:lang="zh_CN">Windows 动画光标</comment>
+ <comment xml:lang="zh_CN">Windows 动态光标</comment>
<comment xml:lang="zh_TW">Windows 滑鼠動畫游標</comment>
<magic priority="50">
<match value="RIFF" type="string" offset="0">
@@ -28771,7 +29623,7 @@
<comment xml:lang="pt">imagem EMF</comment>
<comment xml:lang="pt_BR">Imagem EMF</comment>
<comment xml:lang="ro">Imagine EMF</comment>
- <comment xml:lang="ru">изображение EMF</comment>
+ <comment xml:lang="ru">Изображение EMF</comment>
<comment xml:lang="sk">Obrázok EMF</comment>
<comment xml:lang="sl">Slikovna datoteka EMF</comment>
<comment xml:lang="sq">Figurë EMF</comment>
@@ -28836,7 +29688,7 @@
<comment xml:lang="pt">imagem WMF</comment>
<comment xml:lang="pt_BR">Imagem WMF</comment>
<comment xml:lang="ro">Imagine WMF</comment>
- <comment xml:lang="ru">изображение WMF</comment>
+ <comment xml:lang="ru">Изображение WMF</comment>
<comment xml:lang="sk">Obrázok WMF</comment>
<comment xml:lang="sl">Slikovna datoteka WMF</comment>
<comment xml:lang="sq">Figurë WMF</comment>
@@ -28907,7 +29759,7 @@
<comment xml:lang="pt">imagem XBM</comment>
<comment xml:lang="pt_BR">Imagem XBM</comment>
<comment xml:lang="ro">Imagine XBM</comment>
- <comment xml:lang="ru">изображение XBM</comment>
+ <comment xml:lang="ru">Изображение XBM</comment>
<comment xml:lang="sk">Obrázok XBM</comment>
<comment xml:lang="sl">Slikovna datoteka XBM</comment>
<comment xml:lang="sq">Figurë XBM</comment>
@@ -28962,7 +29814,7 @@
<comment xml:lang="pt">imagem GIMP</comment>
<comment xml:lang="pt_BR">Imagem do GIMP</comment>
<comment xml:lang="ro">Imagine GIMP</comment>
- <comment xml:lang="ru">изображение GIMP</comment>
+ <comment xml:lang="ru">Изображение GIMP</comment>
<comment xml:lang="sk">Obrázok GIMP</comment>
<comment xml:lang="sl">Slikovna datoteka GIMP</comment>
<comment xml:lang="sq">Figurë GIMP</comment>
@@ -28979,6 +29831,80 @@
<match value="gimp xcf v" type="string" offset="0"/>
</magic>
</mime-type>
+ <mime-type type="image/x-gimp-gbr">
+ <comment>GIMP brush</comment>
+ <comment xml:lang="ca">pinzell de GIMP</comment>
+ <comment xml:lang="cs">štětec GIMP</comment>
+ <comment xml:lang="de">GIMP-Pinsel</comment>
+ <comment xml:lang="en_GB">GIMP brush</comment>
+ <comment xml:lang="es">pincel del GIMP</comment>
+ <comment xml:lang="hr">GIMP kist</comment>
+ <comment xml:lang="hu">GIMP ecset</comment>
+ <comment xml:lang="id">Kuas GIMP</comment>
+ <comment xml:lang="it">Pennello GIMP</comment>
+ <comment xml:lang="kk">GIMP бояу жаққышы</comment>
+ <comment xml:lang="ko">GIMP 붓</comment>
+ <comment xml:lang="pl">Pędzel programu GIMP</comment>
+ <comment xml:lang="pt_BR">Pincel do GIMP</comment>
+ <comment xml:lang="ru">Кисть GIMP</comment>
+ <comment xml:lang="sk">Štetec aplikácie GIMP</comment>
+ <comment xml:lang="sv">GIMP-pensel</comment>
+ <comment xml:lang="uk">пензель GIMP</comment>
+ <comment xml:lang="zh_CN">GIMP 笔刷</comment>
+ <comment xml:lang="zh_TW">GIMP 筆刷</comment>
+ <glob pattern="*.gbr"/>
+ <magic priority="50">
+ <match value="GIMP" type="string" offset="20"/>
+ </magic>
+ </mime-type>
+ <mime-type type="image/x-gimp-gih">
+ <comment>GIMP brush pipe</comment>
+ <comment xml:lang="ca">conducte del pinzell de GIMP</comment>
+ <comment xml:lang="cs">zřetězení štětců GIMP</comment>
+ <comment xml:lang="de">GIMP-Pinselanimation</comment>
+ <comment xml:lang="en_GB">GIMP brush pipe</comment>
+ <comment xml:lang="es">pincel animado del GIMP</comment>
+ <comment xml:lang="hr">GIMP valjkasti kist</comment>
+ <comment xml:lang="hu">GIMP ecsetcsatorna</comment>
+ <comment xml:lang="id">Pipa kuas GIMP</comment>
+ <comment xml:lang="it">Pipe pennello GIMP</comment>
+ <comment xml:lang="kk">GIMP бояу жаққыш түтігі</comment>
+ <comment xml:lang="ko">GIMP 붓 파이프</comment>
+ <comment xml:lang="pl">Potok pędzla programu GIMP</comment>
+ <comment xml:lang="pt_BR">Tubo de pincel do GIMP</comment>
+ <comment xml:lang="ru">Анимированная кисть GIMP</comment>
+ <comment xml:lang="sv">GIMP-penselrör</comment>
+ <comment xml:lang="uk">канал пензлів GIMP</comment>
+ <comment xml:lang="zh_CN">GIMP 管刷</comment>
+ <comment xml:lang="zh_TW">GIMP 筆刷導管</comment>
+ <glob pattern="*.gih"/>
+ </mime-type>
+ <mime-type type="image/x-gimp-pat">
+ <comment>GIMP pattern</comment>
+ <comment xml:lang="ca">patró de GIMP</comment>
+ <comment xml:lang="cs">vzorek GIMP</comment>
+ <comment xml:lang="de">GIMP-Muster</comment>
+ <comment xml:lang="en_GB">GIMP pattern</comment>
+ <comment xml:lang="es">patrón del GIMP</comment>
+ <comment xml:lang="hr">GIMP uzorak</comment>
+ <comment xml:lang="hu">GIMP minta</comment>
+ <comment xml:lang="id">Pola GIMP</comment>
+ <comment xml:lang="it">Motivo GIMP</comment>
+ <comment xml:lang="kk">GIMP оюы</comment>
+ <comment xml:lang="ko">GIMP 패턴</comment>
+ <comment xml:lang="pl">Deseń programu GIMP</comment>
+ <comment xml:lang="pt_BR">Textura do GIMP</comment>
+ <comment xml:lang="ru">Шаблон GIMP</comment>
+ <comment xml:lang="sk">Vzor aplikácie GIMP</comment>
+ <comment xml:lang="sv">GIMP-mönster</comment>
+ <comment xml:lang="uk">візерунок GIMP</comment>
+ <comment xml:lang="zh_CN">GIMP 图案</comment>
+ <comment xml:lang="zh_TW">GIMP 樣式</comment>
+ <glob pattern="*.pat"/>
+ <magic priority="50">
+ <match value="GPAT" type="string" offset="20"/>
+ </magic>
+ </mime-type>
<mime-type type="image/x-xfig">
<comment>XFig image</comment>
<comment xml:lang="ar">صورة XFig</comment>
@@ -29018,7 +29944,7 @@
<comment xml:lang="pt">imagem XFig</comment>
<comment xml:lang="pt_BR">Imagem do XFig</comment>
<comment xml:lang="ro">Imagine XFig</comment>
- <comment xml:lang="ru">изображение XFig</comment>
+ <comment xml:lang="ru">Изображение XFig</comment>
<comment xml:lang="sk">Obrázok XFig</comment>
<comment xml:lang="sl">Slikovna datoteka XFig</comment>
<comment xml:lang="sq">Figurë XFig</comment>
@@ -29073,7 +29999,7 @@
<comment xml:lang="pt">imagem XPM</comment>
<comment xml:lang="pt_BR">Imagem XPM</comment>
<comment xml:lang="ro">Imagine XPM</comment>
- <comment xml:lang="ru">изображение XPM</comment>
+ <comment xml:lang="ru">Изображение XPM</comment>
<comment xml:lang="sk">Obrázok XPM</comment>
<comment xml:lang="sl">Slikovna datoteka XPM</comment>
<comment xml:lang="sq">Figurë XPM</comment>
@@ -29111,7 +30037,7 @@
<comment xml:lang="fi">X-ikkunakuva</comment>
<comment xml:lang="fo">X vindeyga mynd</comment>
<comment xml:lang="fr">image X window</comment>
- <comment xml:lang="ga">íomhá fhuinneog X</comment>
+ <comment xml:lang="ga">íomhá X-windows</comment>
<comment xml:lang="gl">imaxe de X Window</comment>
<comment xml:lang="he">תמונת חלון של X</comment>
<comment xml:lang="hr">X window slika</comment>
@@ -29133,7 +30059,7 @@
<comment xml:lang="pt">imagem de janela X</comment>
<comment xml:lang="pt_BR">Imagem de janela do X</comment>
<comment xml:lang="ro">Imagine X window</comment>
- <comment xml:lang="ru">изображение X window</comment>
+ <comment xml:lang="ru">Изображение X window</comment>
<comment xml:lang="sk">Obrázok X window</comment>
<comment xml:lang="sl">slika X oken</comment>
<comment xml:lang="sq">Figurë X window</comment>
@@ -29142,13 +30068,14 @@
<comment xml:lang="tr">X pencere görüntüsü</comment>
<comment xml:lang="uk">зображення X window</comment>
<comment xml:lang="vi">Ảnh cửa sổ X</comment>
- <comment xml:lang="zh_CN">X window 图像</comment>
+ <comment xml:lang="zh_CN">X Window 图像</comment>
<comment xml:lang="zh_TW">X window 影像</comment>
<glob pattern="*.xwd"/>
</mime-type>
<mime-type type="inode/blockdevice">
<comment>block device</comment>
<comment xml:lang="ar">جهاز كتلي</comment>
+ <comment xml:lang="ast">preséu de bloques</comment>
<comment xml:lang="be@latin">blokavaja pryłada</comment>
<comment xml:lang="bg">Блоково устройство</comment>
<comment xml:lang="ca">dispositiu de blocs</comment>
@@ -29169,7 +30096,7 @@
<comment xml:lang="hr">Blokovski uređaj</comment>
<comment xml:lang="hu">blokkos eszköz</comment>
<comment xml:lang="ia">Dispositivo de blocos</comment>
- <comment xml:lang="id">blok divais</comment>
+ <comment xml:lang="id">peranti blok</comment>
<comment xml:lang="it">Device a blocchi</comment>
<comment xml:lang="ja">ブロックデバイス</comment>
<comment xml:lang="kk">блоктық құрылғысы</comment>
@@ -29185,7 +30112,7 @@
<comment xml:lang="pt">dispositivo de bloco</comment>
<comment xml:lang="pt_BR">Dispositivo de bloco</comment>
<comment xml:lang="ro">dispozitiv bloc</comment>
- <comment xml:lang="ru">блочное устройство</comment>
+ <comment xml:lang="ru">Блочное устройство</comment>
<comment xml:lang="sk">Blokové zariadenie</comment>
<comment xml:lang="sl">bločna naprava</comment>
<comment xml:lang="sq">device me blloqe</comment>
@@ -29200,6 +30127,7 @@
<mime-type type="inode/chardevice">
<comment>character device</comment>
<comment xml:lang="ar">جهاز حرفي</comment>
+ <comment xml:lang="ast">preséu de caráuteres</comment>
<comment xml:lang="be@latin">znakavaja pryłada</comment>
<comment xml:lang="bg">Символно устройство</comment>
<comment xml:lang="ca">dispositiu de caràcters</comment>
@@ -29220,7 +30148,7 @@
<comment xml:lang="hr">Znakovni uređaj</comment>
<comment xml:lang="hu">karakteres eszköz</comment>
<comment xml:lang="ia">Dispositivo de characteres</comment>
- <comment xml:lang="id">karakter divais</comment>
+ <comment xml:lang="id">peranti karakter</comment>
<comment xml:lang="it">Device a caratteri</comment>
<comment xml:lang="ja">キャラクタデバイス</comment>
<comment xml:lang="kk">символдық құрылғысы</comment>
@@ -29236,7 +30164,7 @@
<comment xml:lang="pt">dispositivo de caracteres</comment>
<comment xml:lang="pt_BR">Dispositivo de caractere</comment>
<comment xml:lang="ro">dispozitiv caracter</comment>
- <comment xml:lang="ru">символьное устройство</comment>
+ <comment xml:lang="ru">Символьное устройство</comment>
<comment xml:lang="sk">Znakové zariadenie</comment>
<comment xml:lang="sl">znakovna naprava</comment>
<comment xml:lang="sq">device me karaktere</comment>
@@ -29251,6 +30179,7 @@
<mime-type type="inode/directory">
<comment>folder</comment>
<comment xml:lang="ar">مجلّد</comment>
+ <comment xml:lang="ast">carpeta</comment>
<comment xml:lang="be@latin">kataloh</comment>
<comment xml:lang="bg">Папка</comment>
<comment xml:lang="ca">carpeta</comment>
@@ -29268,7 +30197,7 @@
<comment xml:lang="ga">fillteán</comment>
<comment xml:lang="gl">cartafol</comment>
<comment xml:lang="he">תיקייה</comment>
- <comment xml:lang="hr">direktorij</comment>
+ <comment xml:lang="hr">Mapa</comment>
<comment xml:lang="hu">mappa</comment>
<comment xml:lang="ia">Dossier</comment>
<comment xml:lang="id">folder</comment>
@@ -29287,7 +30216,7 @@
<comment xml:lang="pt">pasta</comment>
<comment xml:lang="pt_BR">Pasta</comment>
<comment xml:lang="ro">dosar</comment>
- <comment xml:lang="ru">папка</comment>
+ <comment xml:lang="ru">Папка</comment>
<comment xml:lang="sk">Priečinok</comment>
<comment xml:lang="sl">mapa</comment>
<comment xml:lang="sq">Kartelë</comment>
@@ -29340,7 +30269,7 @@
<comment xml:lang="pt">canal</comment>
<comment xml:lang="pt_BR">Pipe</comment>
<comment xml:lang="ro">canal pipe</comment>
- <comment xml:lang="ru">канал</comment>
+ <comment xml:lang="ru">Канал</comment>
<comment xml:lang="sk">Rúra</comment>
<comment xml:lang="sl">cev</comment>
<comment xml:lang="sq">Pipe</comment>
@@ -29355,6 +30284,7 @@
<mime-type type="inode/mount-point">
<comment>mount point</comment>
<comment xml:lang="ar">نقطة الوصْل</comment>
+ <comment xml:lang="ast">puntu de montaxe</comment>
<comment xml:lang="be@latin">punkt mantavańnia</comment>
<comment xml:lang="bg">Точка на монтиране</comment>
<comment xml:lang="ca">punt de muntatge</comment>
@@ -29372,7 +30302,7 @@
<comment xml:lang="ga">pointe feistithe</comment>
<comment xml:lang="gl">punto de montaxe</comment>
<comment xml:lang="he">נקודת עיגון</comment>
- <comment xml:lang="hr">točka montiranja</comment>
+ <comment xml:lang="hr">Točka montiranja</comment>
<comment xml:lang="hu">csatolási pont</comment>
<comment xml:lang="ia">Puncto de montage</comment>
<comment xml:lang="id">titik mount</comment>
@@ -29391,7 +30321,7 @@
<comment xml:lang="pt">ponto de montagem</comment>
<comment xml:lang="pt_BR">Ponto de montagem</comment>
<comment xml:lang="ro">loc montare</comment>
- <comment xml:lang="ru">точка монтирования</comment>
+ <comment xml:lang="ru">Точка монтирования</comment>
<comment xml:lang="sk">Miesto pripojenia</comment>
<comment xml:lang="sl">priklopna točka</comment>
<comment xml:lang="sq">Pikë montimi</comment>
@@ -29424,7 +30354,7 @@
<comment xml:lang="ga">soicéad</comment>
<comment xml:lang="gl">socket</comment>
<comment xml:lang="he">נקודת חיבור</comment>
- <comment xml:lang="hr">utičnica</comment>
+ <comment xml:lang="hr">Priključnica</comment>
<comment xml:lang="hu">illesztőpont</comment>
<comment xml:lang="ia">Socket</comment>
<comment xml:lang="id">soket</comment>
@@ -29443,7 +30373,7 @@
<comment xml:lang="pt">tomada</comment>
<comment xml:lang="pt_BR">Socket</comment>
<comment xml:lang="ro">socket</comment>
- <comment xml:lang="ru">сокет</comment>
+ <comment xml:lang="ru">Сокет</comment>
<comment xml:lang="sk">Soket</comment>
<comment xml:lang="sl">vtič</comment>
<comment xml:lang="sq">Socket</comment>
@@ -29458,6 +30388,7 @@
<mime-type type="inode/symlink">
<comment>symbolic link</comment>
<comment xml:lang="ar">وصلة رمزية</comment>
+ <comment xml:lang="ast">enllaz simbólicu</comment>
<comment xml:lang="az">simvolik körpü</comment>
<comment xml:lang="be@latin">symbalnaja spasyłka</comment>
<comment xml:lang="bg">Символна връзка</comment>
@@ -29477,7 +30408,7 @@
<comment xml:lang="ga">nasc siombalach</comment>
<comment xml:lang="gl">ligazón simbólica</comment>
<comment xml:lang="he">קישור סימבולי</comment>
- <comment xml:lang="hr">simbolička veza</comment>
+ <comment xml:lang="hr">Simbolička poveznica</comment>
<comment xml:lang="hu">szimbolikus link</comment>
<comment xml:lang="ia">Ligamine symbolic</comment>
<comment xml:lang="id">taut simbolik</comment>
@@ -29497,7 +30428,7 @@
<comment xml:lang="pt">ligação simbólica</comment>
<comment xml:lang="pt_BR">Ligação simbólica</comment>
<comment xml:lang="ro">legătură simbolică</comment>
- <comment xml:lang="ru">символьная ссылка</comment>
+ <comment xml:lang="ru">Символьная ссылка</comment>
<comment xml:lang="sk">Symbolický odkaz</comment>
<comment xml:lang="sl">simbolna povezava</comment>
<comment xml:lang="sq">Lidhje simbolike</comment>
@@ -29528,10 +30459,10 @@
<comment xml:lang="fi">viestin jakeluilmoitus</comment>
<comment xml:lang="fo">post útberingarfrásøgn</comment>
<comment xml:lang="fr">rapport de livraison de courriels</comment>
- <comment xml:lang="ga">tuairisc sheachadadh poist</comment>
+ <comment xml:lang="ga">tuairisc sheachadta r-phoist</comment>
<comment xml:lang="gl">informe de entrega de correo</comment>
<comment xml:lang="he">דוח העברת דואר</comment>
- <comment xml:lang="hr">izvještaj dostave pošte</comment>
+ <comment xml:lang="hr">Izvještaj dostave pošte</comment>
<comment xml:lang="hu">jelentés levélkézbesítésről</comment>
<comment xml:lang="ia">Reporto de livration de e-mail</comment>
<comment xml:lang="id">laporan pengantaran surat</comment>
@@ -29550,7 +30481,7 @@
<comment xml:lang="pt">relatório de entrega de email</comment>
<comment xml:lang="pt_BR">Relatório de entrega de correspondência</comment>
<comment xml:lang="ro">raport de trimitere email</comment>
- <comment xml:lang="ru">отчёт о доставке сообщения</comment>
+ <comment xml:lang="ru">Отчёт о доставке сообщения</comment>
<comment xml:lang="sk">Správa o doručení pošty</comment>
<comment xml:lang="sl">poročilo dostave pošte</comment>
<comment xml:lang="sq">Raport mbi dorëzimin e mesazhit</comment>
@@ -29583,7 +30514,7 @@
<comment xml:lang="fi">viestin kuittausilmoitus</comment>
<comment xml:lang="fo">post avhendingarfrásøgn</comment>
<comment xml:lang="fr">rapport de disposition de courriels</comment>
- <comment xml:lang="ga">tuairisc chóiriú poist</comment>
+ <comment xml:lang="ga">tuairisc chóirithe r-phoist</comment>
<comment xml:lang="gl">informe de disposición de correo</comment>
<comment xml:lang="he">דוח אספקת דואר</comment>
<comment xml:lang="hr">Izvještaj smještaja e-pošte</comment>
@@ -29605,7 +30536,7 @@
<comment xml:lang="pt">relatório de disposição de email</comment>
<comment xml:lang="pt_BR">Relatório de disposição de correspondência</comment>
<comment xml:lang="ro">confirmare primire email</comment>
- <comment xml:lang="ru">отчёт о перемещении почты</comment>
+ <comment xml:lang="ru">Отчёт о перемещении почты</comment>
<comment xml:lang="sk">Správa o odovzdaní pošty</comment>
<comment xml:lang="sl">poročilo razporeditve pošte</comment>
<comment xml:lang="sq">Raport mbi njoftimin e mesazhit</comment>
@@ -29641,7 +30572,7 @@
<comment xml:lang="ga">tagairt do chomhad cianda</comment>
<comment xml:lang="gl">referencia a un ficheiro remoto</comment>
<comment xml:lang="he">התיחסות לקובץ מרוחק</comment>
- <comment xml:lang="hr">referenca na udaljenu datoteku</comment>
+ <comment xml:lang="hr">Preporuka na udaljenu datoteku</comment>
<comment xml:lang="hu">hivatkozás távoli fájlra</comment>
<comment xml:lang="ia">Referentia a un file remote</comment>
<comment xml:lang="id">referensi ke berkas jarak jauh</comment>
@@ -29660,7 +30591,7 @@
<comment xml:lang="pt">referência a um ficheiro remoto</comment>
<comment xml:lang="pt_BR">Referência para arquivo remoto</comment>
<comment xml:lang="ro">referință fișier la distanță</comment>
- <comment xml:lang="ru">ссылка на удалённый файл</comment>
+ <comment xml:lang="ru">Ссылка на удалённый файл</comment>
<comment xml:lang="sk">Odkaz na vzdialený súbor</comment>
<comment xml:lang="sl">sklic do oddaljene datoteke</comment>
<comment xml:lang="sq">Referim për tek file në distancë</comment>
@@ -29692,7 +30623,7 @@
<comment xml:lang="fi">nyyssiviesti</comment>
<comment xml:lang="fo">Usenet news boð</comment>
<comment xml:lang="fr">message de groupe d'échange Usenet</comment>
- <comment xml:lang="ga">teachtaireacht nuacht Usenet</comment>
+ <comment xml:lang="ga">teachtaireacht nuachta Usenet</comment>
<comment xml:lang="gl">mensaxes de noticias de Usenet</comment>
<comment xml:lang="he">הודעת חדשות של Usenet</comment>
<comment xml:lang="hr">Usenet poruka novosti</comment>
@@ -29714,7 +30645,7 @@
<comment xml:lang="pt">mensagem de notícias Usenet</comment>
<comment xml:lang="pt_BR">Mensagem de notícias da Usenet</comment>
<comment xml:lang="ro">Mesaj Usenet de știri </comment>
- <comment xml:lang="ru">новостное сообщение Usenet</comment>
+ <comment xml:lang="ru">Новостное сообщение Usenet</comment>
<comment xml:lang="sk">Príspevok do diskusných skupín Usenet</comment>
<comment xml:lang="sl">novičarsko sporočilo Usenet</comment>
<comment xml:lang="sq">Mesazh lajmesh Usenet</comment>
@@ -29754,14 +30685,14 @@
<comment xml:lang="ga">teachtaireacht ríomhphoist neamhiomlán</comment>
<comment xml:lang="gl">mensaxe de correo electrónico parcial</comment>
<comment xml:lang="he">מסר דוא״ל חלקי</comment>
- <comment xml:lang="hr">djelomična poruka e-pošte</comment>
+ <comment xml:lang="hr">Nepotpuna poruka e-pošte</comment>
<comment xml:lang="hu">részleges elektronikus levél</comment>
<comment xml:lang="ia">Message de e-mail partial</comment>
<comment xml:lang="id">pesan email sebagian</comment>
<comment xml:lang="it">Messaggio email parziale</comment>
<comment xml:lang="ja">部分メールメッセージ</comment>
<comment xml:lang="kk">электронды поштаның үзінді мәлімдемесі</comment>
- <comment xml:lang="ko">부분적 전자 우편 메시지</comment>
+ <comment xml:lang="ko">전자 우편 메시지 일부</comment>
<comment xml:lang="lt">nepilnas el. laiškas</comment>
<comment xml:lang="lv">daļēja e-pasta vēstule</comment>
<comment xml:lang="ms">Bahagian mesej emel</comment>
@@ -29773,7 +30704,7 @@
<comment xml:lang="pt">mensagem parcial de email</comment>
<comment xml:lang="pt_BR">Mensagem de e-mail parcial</comment>
<comment xml:lang="ro">mesaj de email parțial</comment>
- <comment xml:lang="ru">фрагмент сообщения электронной почты</comment>
+ <comment xml:lang="ru">Фрагмент сообщения электронной почты</comment>
<comment xml:lang="sk">Čiastočná e-mailová správa</comment>
<comment xml:lang="sl">delno elektronsko sporočilo</comment>
<comment xml:lang="sq">Mesazh poste i pjesëshëm</comment>
@@ -29807,7 +30738,7 @@
<comment xml:lang="ga">teachtaireacht ríomhphoist</comment>
<comment xml:lang="gl">mensaxe de correo electrónico</comment>
<comment xml:lang="he">הודעת דואר אלקטרוני</comment>
- <comment xml:lang="hr">poruka e-pošte</comment>
+ <comment xml:lang="hr">Poruka e-pošte</comment>
<comment xml:lang="hu">elektronikus levél</comment>
<comment xml:lang="ia">Message de e-mail</comment>
<comment xml:lang="id">pesan email</comment>
@@ -29826,7 +30757,7 @@
<comment xml:lang="pt">mensagem de email</comment>
<comment xml:lang="pt_BR">Mensagem de e-mail</comment>
<comment xml:lang="ro">mesaj email</comment>
- <comment xml:lang="ru">почтовое сообщение</comment>
+ <comment xml:lang="ru">Почтовое сообщение</comment>
<comment xml:lang="sk">E-mailová správa</comment>
<comment xml:lang="sl">sporočilo elektronske pošte</comment>
<comment xml:lang="sq">Mesazh poste</comment>
@@ -29872,7 +30803,7 @@
<comment xml:lang="fi">GNU-postiviesti</comment>
<comment xml:lang="fo">GNU mail boð</comment>
<comment xml:lang="fr">message de courriel GNU</comment>
- <comment xml:lang="ga">teachtaireacht phost GNU</comment>
+ <comment xml:lang="ga">teachtaireacht r-phoist GNU</comment>
<comment xml:lang="gl">mensaxe de correo electrónico de GNU</comment>
<comment xml:lang="he">הודעת דואר של GNU</comment>
<comment xml:lang="hr">GNU poruka pošte</comment>
@@ -29895,7 +30826,7 @@
<comment xml:lang="pt">mensagem de email GNU</comment>
<comment xml:lang="pt_BR">Mensagem de e-mail GNU</comment>
<comment xml:lang="ro">Mesaj GNU mail</comment>
- <comment xml:lang="ru">почтовое сообщение GNU</comment>
+ <comment xml:lang="ru">Почтовое сообщение GNU</comment>
<comment xml:lang="sk">Správa GNU mail</comment>
<comment xml:lang="sl">Sporočilo pošte GNU</comment>
<comment xml:lang="sq">Mesazh GNU mail</comment>
@@ -29911,20 +30842,31 @@
</mime-type>
<mime-type type="model/iges">
<comment>IGES document</comment>
+ <comment xml:lang="ast">Documentu IGES</comment>
<comment xml:lang="ca">document IGES</comment>
+ <comment xml:lang="cs">dokument IGES</comment>
<comment xml:lang="da">IGES-dokument</comment>
<comment xml:lang="de">IGES-Dokument</comment>
+ <comment xml:lang="en_GB">IGES document</comment>
<comment xml:lang="es">documento IGES</comment>
+ <comment xml:lang="eu">IGES dokumentua</comment>
<comment xml:lang="fi">IGES-asiakirja</comment>
<comment xml:lang="fr">document IGES</comment>
+ <comment xml:lang="ga">cáipéis IGES</comment>
<comment xml:lang="he">מסמך IGES</comment>
+ <comment xml:lang="hr">IGES dokument</comment>
<comment xml:lang="hu">IGES dokumentum</comment>
+ <comment xml:lang="id">dokumen IGES</comment>
+ <comment xml:lang="it">Documento IGES</comment>
<comment xml:lang="kk">IGES құжаты</comment>
<comment xml:lang="ko">IGES 문서</comment>
<comment xml:lang="pl">Dokument IGES</comment>
<comment xml:lang="pt_BR">Documento IGES</comment>
- <comment xml:lang="ru">документ IGES</comment>
+ <comment xml:lang="ru">Документ IGES</comment>
<comment xml:lang="sk">Dokument IGES</comment>
+ <comment xml:lang="sr">ИГЕС документ</comment>
+ <comment xml:lang="sv">IGES-dokument</comment>
+ <comment xml:lang="tr">IGES belgesi</comment>
<comment xml:lang="uk">документ IGES</comment>
<comment xml:lang="zh_CN">IGES 文档</comment>
<comment xml:lang="zh_TW">IGES 文件</comment>
@@ -29942,6 +30884,7 @@
<mime-type type="model/vrml">
<comment>VRML document</comment>
<comment xml:lang="ar">مستند VRML</comment>
+ <comment xml:lang="ast">Documentu VRML</comment>
<comment xml:lang="az">VRML sənədi</comment>
<comment xml:lang="be@latin">Dakument VRML</comment>
<comment xml:lang="bg">Документ — VRML</comment>
@@ -29980,7 +30923,7 @@
<comment xml:lang="pt">documento VRML</comment>
<comment xml:lang="pt_BR">Documento VRML</comment>
<comment xml:lang="ro">Document VRML</comment>
- <comment xml:lang="ru">документ VRML</comment>
+ <comment xml:lang="ru">Документ VRML</comment>
<comment xml:lang="sk">Dokument VRML</comment>
<comment xml:lang="sl">Dokument VRML</comment>
<comment xml:lang="sq">Dokument VRML</comment>
@@ -30021,10 +30964,10 @@
<comment xml:lang="fi">viesti useissa muodoissa</comment>
<comment xml:lang="fo">boð í fleiri sniðum</comment>
<comment xml:lang="fr">message en formats divers</comment>
- <comment xml:lang="ga">teachtaireacht i roinnt fhormáidí</comment>
+ <comment xml:lang="ga">teachtaireacht i bhformáidí éagsúla</comment>
<comment xml:lang="gl">mensaxe en varios formatos</comment>
<comment xml:lang="he">הודעה במספר תבניות</comment>
- <comment xml:lang="hr">poruka u nekoliko oblika</comment>
+ <comment xml:lang="hr">Poruka u nekoliko oblika</comment>
<comment xml:lang="hu">többféle formátumú üzenet</comment>
<comment xml:lang="ia">Message in plure formatos</comment>
<comment xml:lang="id">pesan dalam beberapa format</comment>
@@ -30043,7 +30986,7 @@
<comment xml:lang="pt">mensagem em vários formatos</comment>
<comment xml:lang="pt_BR">Mensagem em vários formatos</comment>
<comment xml:lang="ro">mesaj în diferite formate</comment>
- <comment xml:lang="ru">сообщение в нескольких форматах</comment>
+ <comment xml:lang="ru">Сообщение в нескольких форматах</comment>
<comment xml:lang="sk">Správa v niekoľkých formátoch</comment>
<comment xml:lang="sl">sporočilo v več zapisih</comment>
<comment xml:lang="sq">Mesazh në formate të ndryshëm</comment>
@@ -30052,7 +30995,7 @@
<comment xml:lang="tr">farklı biçimlerde ileti</comment>
<comment xml:lang="uk">повідомлення у кількох форматах</comment>
<comment xml:lang="vi">thông điệp có vài định dạng</comment>
- <comment xml:lang="zh_CN">各种格式的消息</comment>
+ <comment xml:lang="zh_CN">各种格式的信件</comment>
<comment xml:lang="zh_TW">多種格式的訊息</comment>
</mime-type>
<mime-type type="multipart/appledouble">
@@ -30096,7 +31039,7 @@
<comment xml:lang="pt">ficheiro codificado em AppleDouble de Macintosh</comment>
<comment xml:lang="pt_BR">Arquivo do Macintosh codificado com AppleDouble</comment>
<comment xml:lang="ro">Fișier codat Macintosh AppleDouble</comment>
- <comment xml:lang="ru">файл (закодированный Macintosh AppleDouble)</comment>
+ <comment xml:lang="ru">Файл, закодированный Macintosh AppleDouble</comment>
<comment xml:lang="sk">Súbor kódovaný pomocou Macintosh AppleDouble</comment>
<comment xml:lang="sl">Kodirana datoteka Macintosh (AppleDouble)</comment>
<comment xml:lang="sq">File Macintosh i kodifikuar AppleDouble</comment>
@@ -30133,7 +31076,7 @@
<comment xml:lang="hr">Poruka kratkg sadržaja</comment>
<comment xml:lang="hu">ömlesztett üzenet</comment>
<comment xml:lang="ia">Digesto de messages</comment>
- <comment xml:lang="id">pesan digest</comment>
+ <comment xml:lang="id">digest pesan</comment>
<comment xml:lang="it">Digest di messaggi</comment>
<comment xml:lang="ja">メッセージダイジェスト</comment>
<comment xml:lang="kk">мәлімдеме профилі</comment>
@@ -30149,7 +31092,7 @@
<comment xml:lang="pt">grupo de mensagens</comment>
<comment xml:lang="pt_BR">Resumo de mensagem</comment>
<comment xml:lang="ro">colecție mesaje email</comment>
- <comment xml:lang="ru">профиль сообщения</comment>
+ <comment xml:lang="ru">Дайджест сообщения</comment>
<comment xml:lang="sk">Prehľad správ</comment>
<comment xml:lang="sl">povzetek sporočila</comment>
<comment xml:lang="sq">Shpërndarje mesazhesh</comment>
@@ -30158,7 +31101,7 @@
<comment xml:lang="tr">mesaj özeti</comment>
<comment xml:lang="uk">збірка повідомлень</comment>
<comment xml:lang="vi">bản tóm tắt thông điệp</comment>
- <comment xml:lang="zh_CN">消息摘要</comment>
+ <comment xml:lang="zh_CN">信件摘要</comment>
<comment xml:lang="zh_TW">訊息摘要</comment>
</mime-type>
<mime-type type="multipart/encrypted">
@@ -30183,7 +31126,7 @@
<comment xml:lang="ga">teachtaireacht chriptithe</comment>
<comment xml:lang="gl">mensaxe cifrado</comment>
<comment xml:lang="he">הודעה מוצפנת</comment>
- <comment xml:lang="hr">šifrirana poruka</comment>
+ <comment xml:lang="hr">Šifrirana poruka</comment>
<comment xml:lang="hu">titkosított üzenet</comment>
<comment xml:lang="ia">Message cryptate</comment>
<comment xml:lang="id">pesan terenkripsi</comment>
@@ -30202,7 +31145,7 @@
<comment xml:lang="pt">mensagem encriptada</comment>
<comment xml:lang="pt_BR">Mensagem criptografada</comment>
<comment xml:lang="ro">mesaj criptat</comment>
- <comment xml:lang="ru">зашифрованное сообщение</comment>
+ <comment xml:lang="ru">Зашифрованное сообщение</comment>
<comment xml:lang="sk">Zašifrovaná správa</comment>
<comment xml:lang="sl">šifrirano sporočilo</comment>
<comment xml:lang="sq">Mesazh i kriptuar</comment>
@@ -30217,6 +31160,7 @@
<mime-type type="multipart/mixed">
<comment>compound documents</comment>
<comment xml:lang="ar">مستندات مركبة</comment>
+ <comment xml:lang="ast">documentos compuestos</comment>
<comment xml:lang="be@latin">składanyja dakumenty</comment>
<comment xml:lang="bg">Съставни документи</comment>
<comment xml:lang="ca">documents compostos</comment>
@@ -30253,7 +31197,7 @@
<comment xml:lang="pt">documentos compostos</comment>
<comment xml:lang="pt_BR">Documentos compostos</comment>
<comment xml:lang="ro">documente compuse</comment>
- <comment xml:lang="ru">составные документы</comment>
+ <comment xml:lang="ru">Составные документы</comment>
<comment xml:lang="sk">Zložené dokumenty</comment>
<comment xml:lang="sl">združeni dokumenti</comment>
<comment xml:lang="sq">dokumente të përbërë</comment>
@@ -30268,6 +31212,7 @@
<mime-type type="multipart/related">
<comment>compound document</comment>
<comment xml:lang="ar">مستند مركب</comment>
+ <comment xml:lang="ast">documentu compuestu</comment>
<comment xml:lang="az">birləşik sənəd</comment>
<comment xml:lang="be@latin">składany dakument</comment>
<comment xml:lang="bg">Съставен документ</comment>
@@ -30306,7 +31251,7 @@
<comment xml:lang="pt">documento composto</comment>
<comment xml:lang="pt_BR">Documento composto</comment>
<comment xml:lang="ro">document compus</comment>
- <comment xml:lang="ru">составной документ</comment>
+ <comment xml:lang="ru">Составной документ</comment>
<comment xml:lang="sk">Zložený dokument</comment>
<comment xml:lang="sl">združeni dokument</comment>
<comment xml:lang="sq">dokumet i përbërë</comment>
@@ -30337,7 +31282,7 @@
<comment xml:lang="fi">viestijärjestelmän ilmoitus</comment>
<comment xml:lang="fo">postkervisfrásøgn</comment>
<comment xml:lang="fr">rapport système de courriels</comment>
- <comment xml:lang="ga">tuairisc chóras poist</comment>
+ <comment xml:lang="ga">tuairisc chórais r-phoist</comment>
<comment xml:lang="gl">informe do sistema de correo</comment>
<comment xml:lang="he">דו״ח של מערכת הדואר</comment>
<comment xml:lang="hr">Izvještaj sustava pošte</comment>
@@ -30359,7 +31304,7 @@
<comment xml:lang="pt">relatório de sistema de email</comment>
<comment xml:lang="pt_BR">Relatório do sistema de correspondência</comment>
<comment xml:lang="ro">raport sistem email</comment>
- <comment xml:lang="ru">отчёт почтовой системы</comment>
+ <comment xml:lang="ru">Отчёт почтовой системы</comment>
<comment xml:lang="sk">Správa poštového systému</comment>
<comment xml:lang="sl">poročilo poštnega sistema</comment>
<comment xml:lang="sq">Raport i sistemit të postës</comment>
@@ -30393,7 +31338,7 @@
<comment xml:lang="ga">teachtaireacht sínithe</comment>
<comment xml:lang="gl">mensaxe firmado</comment>
<comment xml:lang="he">הודעה חתומה</comment>
- <comment xml:lang="hr">potpisana poruka</comment>
+ <comment xml:lang="hr">Potpisana poruka</comment>
<comment xml:lang="hu">aláírt üzenet</comment>
<comment xml:lang="ia">Message signate</comment>
<comment xml:lang="id">pesan ditandatangani</comment>
@@ -30412,7 +31357,7 @@
<comment xml:lang="pt">mensagem assinada</comment>
<comment xml:lang="pt_BR">Mensagem assinada</comment>
<comment xml:lang="ro">mesaj semnat</comment>
- <comment xml:lang="ru">подписанное сообщение</comment>
+ <comment xml:lang="ru">Подписанное сообщение</comment>
<comment xml:lang="sk">Podpísaná správa</comment>
<comment xml:lang="sl">podpisano sporočilo</comment>
<comment xml:lang="sq">Mesazh i firmosur</comment>
@@ -30444,7 +31389,7 @@
<comment xml:lang="ga">sruth sonraí (brú freastalaí)</comment>
<comment xml:lang="gl">fluxo de datos (por iniciativa do servidor)</comment>
<comment xml:lang="he">מידע בזרימה (דחיפה ע״י השרת)</comment>
- <comment xml:lang="hr">Tok podataka (poslužiteljem pogurano)</comment>
+ <comment xml:lang="hr">Strujanje podataka (poslužiteljem pogurano)</comment>
<comment xml:lang="hu">sugárzott adatfolyam (kiszolgálóról)</comment>
<comment xml:lang="ia">Fluxo de datos (pulsate per servitor)</comment>
<comment xml:lang="id">arus data (dorongan server)</comment>
@@ -30463,7 +31408,7 @@
<comment xml:lang="pt">fluxo de dados (empurrados pelo servidor)</comment>
<comment xml:lang="pt_BR">Fluxo de dados (por iniciativa do servidor)</comment>
<comment xml:lang="ro">flux de date (de la server)</comment>
- <comment xml:lang="ru">поток данных (server push)</comment>
+ <comment xml:lang="ru">Поток данных (server push)</comment>
<comment xml:lang="sk">Prúd dát (posielaný serverom)</comment>
<comment xml:lang="sl">pretok podatkov (strežniški)</comment>
<comment xml:lang="sq">Fluks me të dhëna (server push)</comment>
@@ -30472,7 +31417,7 @@
<comment xml:lang="tr">veri akışı (sunucudan gönderilen)</comment>
<comment xml:lang="uk">потік даних (від сервера)</comment>
<comment xml:lang="vi">luồng dữ liệu (trình phục vụ đẩy)</comment>
- <comment xml:lang="zh_CN">数据流(服务器推送)</comment>
+ <comment xml:lang="zh_CN">数据流(服务器推送)</comment>
<comment xml:lang="zh_TW">資料串流 (server push)</comment>
</mime-type>
<mime-type type="text/calendar">
@@ -30513,7 +31458,7 @@
<comment xml:lang="pt">calendário VCS/ICS</comment>
<comment xml:lang="pt_BR">Calendário VCS/ICS</comment>
<comment xml:lang="ro">Calendar VCS/ICS</comment>
- <comment xml:lang="ru">календарь VCS/ICS</comment>
+ <comment xml:lang="ru">Календарь VCS/ICS</comment>
<comment xml:lang="sk">Kalendár VCS/ICS</comment>
<comment xml:lang="sl">Datoteka koledarja VCS/ICS</comment>
<comment xml:lang="sq">Kalendar VCS/ICS</comment>
@@ -30575,7 +31520,7 @@
<comment xml:lang="pt">folha de estilos CSS</comment>
<comment xml:lang="pt_BR">Folha de estilo CSS</comment>
<comment xml:lang="ro">Pagină de stil CSS</comment>
- <comment xml:lang="ru">таблица стилей CSS</comment>
+ <comment xml:lang="ru">Таблица стилей CSS</comment>
<comment xml:lang="sk">Štýly CSS</comment>
<comment xml:lang="sl">Slogovna predloga CSS</comment>
<comment xml:lang="sq">Fletë stili CSS</comment>
@@ -30611,7 +31556,7 @@
<comment xml:lang="ga">cárta gnó leictreonach</comment>
<comment xml:lang="gl">tarxeta de negocio electrónica</comment>
<comment xml:lang="he">כרטיס ביקור אלקטרוני</comment>
- <comment xml:lang="hr">elektronička posjetnica</comment>
+ <comment xml:lang="hr">Elektronička posjetnica</comment>
<comment xml:lang="hu">elektronikus névjegykártya</comment>
<comment xml:lang="ia">Carta de visita electronic</comment>
<comment xml:lang="id">kartu bisnis elektronik</comment>
@@ -30628,7 +31573,7 @@
<comment xml:lang="pt">cartão de visita eletrónico</comment>
<comment xml:lang="pt_BR">Cartão de visitas eletrônico</comment>
<comment xml:lang="ro">carte de vizită electronică</comment>
- <comment xml:lang="ru">электронная визитная карточка</comment>
+ <comment xml:lang="ru">Электронная визитная карточка</comment>
<comment xml:lang="sk">Elektronická vizitka</comment>
<comment xml:lang="sl">elektronska poslovna vizitka</comment>
<comment xml:lang="sq">Skedë elektronike biznesi</comment>
@@ -30653,6 +31598,7 @@
</mime-type>
<mime-type type="text/turtle">
<comment>Turtle document</comment>
+ <comment xml:lang="ast">Documentu Turtle</comment>
<comment xml:lang="ca">document Turtle</comment>
<comment xml:lang="cs">dokument Turtle</comment>
<comment xml:lang="da">Turtle-dokument</comment>
@@ -30663,6 +31609,7 @@
<comment xml:lang="eu">Turtle dokumentua</comment>
<comment xml:lang="fi">Turtle-asiakirja</comment>
<comment xml:lang="fr">document Turtle</comment>
+ <comment xml:lang="ga">cáipéis Turtle</comment>
<comment xml:lang="he">מסמך Turtle</comment>
<comment xml:lang="hr">Turtle dokument</comment>
<comment xml:lang="hu">Turtle dokumentum</comment>
@@ -30675,7 +31622,7 @@
<comment xml:lang="pl">Dokument Turtle</comment>
<comment xml:lang="pt">documento Turtle</comment>
<comment xml:lang="pt_BR">Documento Turtle</comment>
- <comment xml:lang="ru">документ Turtle</comment>
+ <comment xml:lang="ru">Документ Turtle</comment>
<comment xml:lang="sk">Dokument Turtle</comment>
<comment xml:lang="sr">Тартл документ</comment>
<comment xml:lang="sv">Turtle-dokument</comment>
@@ -30689,6 +31636,7 @@
<mime-type type="text/x-txt2tags">
<comment>txt2tags document</comment>
<comment xml:lang="ar">مستند txt2tags</comment>
+ <comment xml:lang="ast">Documentu txt2tags</comment>
<comment xml:lang="be@latin">dakument txt2tags</comment>
<comment xml:lang="bg">Документ — txt2tags</comment>
<comment xml:lang="ca">document txt2tags</comment>
@@ -30709,7 +31657,7 @@
<comment xml:lang="hr">txt2tags dokument</comment>
<comment xml:lang="hu">txt2tags dokumentum</comment>
<comment xml:lang="ia">Documento txt2tags</comment>
- <comment xml:lang="id">dokumen txt2tags</comment>
+ <comment xml:lang="id">Dokumen txt2tags</comment>
<comment xml:lang="it">Documento txt2tags</comment>
<comment xml:lang="ja">txt2tags ドキュメント</comment>
<comment xml:lang="ka">txt2tags დოკუმენტი</comment>
@@ -30725,7 +31673,7 @@
<comment xml:lang="pt">documento txt2tags</comment>
<comment xml:lang="pt_BR">Documento do txt2tags</comment>
<comment xml:lang="ro">document txt2tags</comment>
- <comment xml:lang="ru">документ txt2tags</comment>
+ <comment xml:lang="ru">Документ txt2tags</comment>
<comment xml:lang="sk">Dokument txt2tags</comment>
<comment xml:lang="sl">Dokument txt2tags</comment>
<comment xml:lang="sq">Dokument txt2tags</comment>
@@ -30747,7 +31695,7 @@
<comment>Verilog source code</comment>
<comment xml:lang="bg">Изходен код — Verilog</comment>
<comment xml:lang="ca">codi font en Verilog</comment>
- <comment xml:lang="cs">zdrojový kód Verilog</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce Verilog</comment>
<comment xml:lang="da">Verilog-kildekode</comment>
<comment xml:lang="de">Verilog-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας Verilog</comment>
@@ -30757,9 +31705,10 @@
<comment xml:lang="eu">Verilog iturburu-kodea</comment>
<comment xml:lang="fi">Verilog-lähdekoodi</comment>
<comment xml:lang="fr">code source Verilog</comment>
+ <comment xml:lang="ga">cód foinseach Verilog</comment>
<comment xml:lang="gl">código fonte en Verilog</comment>
<comment xml:lang="he">קוד מקור של </comment>
- <comment xml:lang="hr">Verilog izvorni kod</comment>
+ <comment xml:lang="hr">Verilog izvorni kôd</comment>
<comment xml:lang="hu">Verilog-forráskód</comment>
<comment xml:lang="ia">Codice-fonte Verilog</comment>
<comment xml:lang="id">Kode sumber Verilog</comment>
@@ -30773,7 +31722,7 @@
<comment xml:lang="pl">Kod źródłowy Verilog</comment>
<comment xml:lang="pt">código origem Verilog</comment>
<comment xml:lang="pt_BR">Código-fonte Verilog</comment>
- <comment xml:lang="ru">исходный код Verilog</comment>
+ <comment xml:lang="ru">Исходный код Verilog</comment>
<comment xml:lang="sk">Zdrojový kód Verilog</comment>
<comment xml:lang="sl">Datoteka izvorne kode Verilog</comment>
<comment xml:lang="sr">изворни код Верилога</comment>
@@ -30798,6 +31747,7 @@
<comment xml:lang="eu">SystemVerilog goiburua</comment>
<comment xml:lang="fi">SystemVerilog-otsake</comment>
<comment xml:lang="fr">en-tête </comment>
+ <comment xml:lang="ga">ceanntásc SystemVerilog</comment>
<comment xml:lang="gl">Cabeceiras de SystemVerilog</comment>
<comment xml:lang="he">כותרת SystemVerilog</comment>
<comment xml:lang="hr">SystemVerilog zaglavlje</comment>
@@ -30814,14 +31764,14 @@
<comment xml:lang="pl">Nagłówek SystemVerilog</comment>
<comment xml:lang="pt">cabeçalho SystemVerilog</comment>
<comment xml:lang="pt_BR">Cabeçalho de SystemVerilog</comment>
- <comment xml:lang="ru">заголовочный файл SystemVerilog</comment>
+ <comment xml:lang="ru">Заголовочный файл SystemVerilog</comment>
<comment xml:lang="sk">Hlavičky SystemVerilog</comment>
<comment xml:lang="sl">Datoteka glave SystemVerilog</comment>
<comment xml:lang="sr">заглавље Система Верилога</comment>
<comment xml:lang="sv">SystemVerilog-headerfil</comment>
<comment xml:lang="tr">SystemVerilog başlığı</comment>
<comment xml:lang="uk">заголовки SystemVerilog</comment>
- <comment xml:lang="zh_CN">SystemVerilog 头</comment>
+ <comment xml:lang="zh_CN">SystemVerilog 头文件</comment>
<comment xml:lang="zh_TW">SystemVerilog 標頭</comment>
<sub-class-of type="text/x-verilog"/>
<glob pattern="*.svh"/>
@@ -30839,9 +31789,10 @@
<comment xml:lang="eu">SystemVerilog iturburu-kodea</comment>
<comment xml:lang="fi">SystemVerilog-lähdekoodi</comment>
<comment xml:lang="fr">code source </comment>
+ <comment xml:lang="ga">cód foinseach SystemVerilog</comment>
<comment xml:lang="gl">código fonte en SystemVerilog</comment>
<comment xml:lang="he">קוד מקור של SystemVerilog</comment>
- <comment xml:lang="hr">SystemVerilog izvorni kod</comment>
+ <comment xml:lang="hr">SystemVerilog izvorni kôd</comment>
<comment xml:lang="hu">SystemVerilog-forráskód</comment>
<comment xml:lang="ia">Codice-fonte SystemVerilog</comment>
<comment xml:lang="id">Kode sumber SystemVerilog</comment>
@@ -30855,7 +31806,7 @@
<comment xml:lang="pl">Kod źródłowy SystemVerilog</comment>
<comment xml:lang="pt">código origem SystemVerilog</comment>
<comment xml:lang="pt_BR">Código-fonte de SystemVerilog</comment>
- <comment xml:lang="ru">исходный код SystemVerilog</comment>
+ <comment xml:lang="ru">Исходный код SystemVerilog</comment>
<comment xml:lang="sk">Zdrojový kód SystemVerilog</comment>
<comment xml:lang="sl">Datoteka izvorne kode SystemVerilog</comment>
<comment xml:lang="sr">изворни код Система Верилога</comment>
@@ -30871,7 +31822,7 @@
<comment>VHDL source code</comment>
<comment xml:lang="bg">Изходен код — VHDL</comment>
<comment xml:lang="ca">codi font en VHDL</comment>
- <comment xml:lang="cs">zdrojový kód VHDL</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce VHDL</comment>
<comment xml:lang="da">VHDL-kildekode</comment>
<comment xml:lang="de">VHDL-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας VHDL</comment>
@@ -30881,9 +31832,10 @@
<comment xml:lang="eu">VHDL iturburu-kodea</comment>
<comment xml:lang="fi">VHDL-lähdekoodi</comment>
<comment xml:lang="fr">code source VHDL</comment>
+ <comment xml:lang="ga">cód foinseach VHDL</comment>
<comment xml:lang="gl">código fonte en VHDL</comment>
<comment xml:lang="he">קוד מקור של VHDL</comment>
- <comment xml:lang="hr">VHDL izvorni kod</comment>
+ <comment xml:lang="hr">VHDL izvorni kôd</comment>
<comment xml:lang="hu">VHDL-forráskód</comment>
<comment xml:lang="ia">Codice-fonte VHDL</comment>
<comment xml:lang="id">Kode sumber VHDL</comment>
@@ -30897,7 +31849,7 @@
<comment xml:lang="pl">Kod źródłowy VHDL</comment>
<comment xml:lang="pt">código origem VHDL</comment>
<comment xml:lang="pt_BR">Código-fonte VHDL</comment>
- <comment xml:lang="ru">исходный код VHDL</comment>
+ <comment xml:lang="ru">Исходный код VHDL</comment>
<comment xml:lang="sk">Zdrojový kód VHDL</comment>
<comment xml:lang="sl">Datoteka izvorne kode VHDL</comment>
<comment xml:lang="sr">ВХДЛ изворни код</comment>
@@ -30915,6 +31867,7 @@
<mime-type type="text/enriched">
<comment>enriched text document</comment>
<comment xml:lang="ar">مستند نصي مغنى</comment>
+ <comment xml:lang="ast">documentu de testu arriquecíu</comment>
<comment xml:lang="az">zəngin mətn sənədi</comment>
<comment xml:lang="be@latin">azdobleny tekstavy dakument</comment>
<comment xml:lang="bg">Документ с обогатен текст</comment>
@@ -30934,7 +31887,7 @@
<comment xml:lang="ga">cáipéis téacs saibhrithe</comment>
<comment xml:lang="gl">documento de texto enriquecido</comment>
<comment xml:lang="he">מסמך טקסט מועשר</comment>
- <comment xml:lang="hr">obogaćeni tekstualni dokument</comment>
+ <comment xml:lang="hr">Obogaćeni tekstovni dokument</comment>
<comment xml:lang="hu">enriched text dokumentum</comment>
<comment xml:lang="ia">Documento de texto inricchite</comment>
<comment xml:lang="id">dokumen teks diperkaya</comment>
@@ -30953,7 +31906,7 @@
<comment xml:lang="pt">documento de texto rico</comment>
<comment xml:lang="pt_BR">Documento de texto enriquecido</comment>
<comment xml:lang="ro">document text îmbogățit</comment>
- <comment xml:lang="ru">форматированный текстовый документ</comment>
+ <comment xml:lang="ru">Форматированный текстовый документ</comment>
<comment xml:lang="sk">Rozšírený textový dokument</comment>
<comment xml:lang="sl">dokument z obogatenim besedilom</comment>
<comment xml:lang="sq">Dokument teksti i pasuruar</comment>
@@ -30962,7 +31915,7 @@
<comment xml:lang="tr">zenginleştirilmiş metin belgesi</comment>
<comment xml:lang="uk">форматований текстовий документ</comment>
<comment xml:lang="vi">tài liệu văn bản có kiểu dáng</comment>
- <comment xml:lang="zh_CN">富文本文档</comment>
+ <comment xml:lang="zh_CN">浓缩文本文档 (ETF)</comment>
<comment xml:lang="zh_TW">豐富化文字文件</comment>
<sub-class-of type="text/plain"/>
</mime-type>
@@ -30988,7 +31941,7 @@
<comment xml:lang="ga">leathanach cabhrach</comment>
<comment xml:lang="gl">páxina de axuda</comment>
<comment xml:lang="he">דף עזרה</comment>
- <comment xml:lang="hr">stranica pomoći</comment>
+ <comment xml:lang="hr">Stranica pomoći</comment>
<comment xml:lang="hu">súgóoldal</comment>
<comment xml:lang="ia">Pagina de adjuta</comment>
<comment xml:lang="id">halaman bantuan</comment>
@@ -31007,7 +31960,7 @@
<comment xml:lang="pt">página de ajuda</comment>
<comment xml:lang="pt_BR">Página de ajuda</comment>
<comment xml:lang="ro">pagină de ajutor</comment>
- <comment xml:lang="ru">страница справки</comment>
+ <comment xml:lang="ru">Страница справки</comment>
<comment xml:lang="sk">Stránka Pomocníka</comment>
<comment xml:lang="sl">stran pomoči</comment>
<comment xml:lang="sq">Faqe ndihme</comment>
@@ -31023,6 +31976,7 @@
<mime-type type="text/plain">
<comment>plain text document</comment>
<comment xml:lang="ar">مستند نصي مجرد</comment>
+ <comment xml:lang="ast">documentu de testu planu</comment>
<comment xml:lang="be@latin">prosty tekstavy dakument</comment>
<comment xml:lang="bg">Документ с неформатиран текст</comment>
<comment xml:lang="ca">document de text pla</comment>
@@ -31039,10 +31993,10 @@
<comment xml:lang="ga">cáipéis ghnáth-théacs</comment>
<comment xml:lang="gl">documento de texto sinxelo</comment>
<comment xml:lang="he">מסמך טקסט פשוט</comment>
- <comment xml:lang="hr">običan tekstualni dokument</comment>
+ <comment xml:lang="hr">Običan tekstovni dokument</comment>
<comment xml:lang="hu">egyszerű szöveg</comment>
<comment xml:lang="ia">Documento de texto simple</comment>
- <comment xml:lang="id">dokumen teks biasa</comment>
+ <comment xml:lang="id">dokumen teks polos</comment>
<comment xml:lang="it">Documento in testo semplice</comment>
<comment xml:lang="ja">平文テキストドキュメント</comment>
<comment xml:lang="kk">мәтіндік құжаты</comment>
@@ -31058,7 +32012,7 @@
<comment xml:lang="pt">documento em texto simples</comment>
<comment xml:lang="pt_BR">Documento de Texto</comment>
<comment xml:lang="ro">document text simplu</comment>
- <comment xml:lang="ru">текстовый документ</comment>
+ <comment xml:lang="ru">Текстовый документ</comment>
<comment xml:lang="sk">Obyčajný textový dokument</comment>
<comment xml:lang="sl">običajna besedilna datoteka</comment>
<comment xml:lang="sq">Dokument në tekst të thjeshtë</comment>
@@ -31115,7 +32069,7 @@
<comment xml:lang="pt">ficheiro RDF</comment>
<comment xml:lang="pt_BR">Arquivo RDF</comment>
<comment xml:lang="ro">Fișier RDF</comment>
- <comment xml:lang="ru">файл RDF</comment>
+ <comment xml:lang="ru">Файл RDF</comment>
<comment xml:lang="sk">Súbor RDF</comment>
<comment xml:lang="sl">Datoteka RDF</comment>
<comment xml:lang="sq">File RDF</comment>
@@ -31146,6 +32100,7 @@
<comment xml:lang="es">archivo en XML OWL</comment>
<comment xml:lang="eu">OWL XML fitxategia</comment>
<comment xml:lang="fr">fichier XML OWL</comment>
+ <comment xml:lang="ga">comhad XML OWL</comment>
<comment xml:lang="hr">OWL XML datoteka</comment>
<comment xml:lang="hu">OWL XML-fájl</comment>
<comment xml:lang="ia">File XML OWL</comment>
@@ -31157,7 +32112,7 @@
<comment xml:lang="pl">Plik XML OWL</comment>
<comment xml:lang="pt">ficheiro OWL XML</comment>
<comment xml:lang="pt_BR">Arquivo OWL XML</comment>
- <comment xml:lang="ru">файл XML OWL</comment>
+ <comment xml:lang="ru">Файл XML OWL</comment>
<comment xml:lang="sk">Súbor XML OWL</comment>
<comment xml:lang="sr">ОВЛ ИксМЛ датотека</comment>
<comment xml:lang="sv">OWL XML-fil</comment>
@@ -31196,14 +32151,14 @@
<comment xml:lang="ga">ceanntásca ríomhphoist</comment>
<comment xml:lang="gl">cabeceiras de correo electrónico</comment>
<comment xml:lang="he">כותרת דוא״ל</comment>
- <comment xml:lang="hr">zaglavlja e-pošte</comment>
+ <comment xml:lang="hr">Zaglavlja e-pošte</comment>
<comment xml:lang="hu">levélfejléc</comment>
<comment xml:lang="ia">Capites de e-mail</comment>
- <comment xml:lang="id">tajuk email</comment>
+ <comment xml:lang="id">header email</comment>
<comment xml:lang="it">Intestazioni email</comment>
<comment xml:lang="ja">メールヘッダー</comment>
<comment xml:lang="kk">пошталық тақырыптамалары</comment>
- <comment xml:lang="ko">전자 우편 헤더</comment>
+ <comment xml:lang="ko">전자메일 헤더</comment>
<comment xml:lang="lt">el. laiško antraštės</comment>
<comment xml:lang="lv">e-pasta galvene</comment>
<comment xml:lang="ms">Pengepala emel</comment>
@@ -31215,7 +32170,7 @@
<comment xml:lang="pt">cabeçalhos de email</comment>
<comment xml:lang="pt_BR">Cabeçalhos de e-mail</comment>
<comment xml:lang="ro">antete email</comment>
- <comment xml:lang="ru">почтовые заголовки</comment>
+ <comment xml:lang="ru">Почтовые заголовки</comment>
<comment xml:lang="sk">Hlavičky e-mailu</comment>
<comment xml:lang="sl">glava elektronske pošte</comment>
<comment xml:lang="sq">Header email</comment>
@@ -31231,6 +32186,7 @@
<mime-type type="text/richtext">
<comment>rich text document</comment>
<comment xml:lang="ar">مستند نصي غني</comment>
+ <comment xml:lang="ast">documentu de testu ricu</comment>
<comment xml:lang="az">zəngin mətn sənədi</comment>
<comment xml:lang="be@latin">azdobleny tekstavy dakument</comment>
<comment xml:lang="bg">Документ — rich text</comment>
@@ -31249,7 +32205,7 @@
<comment xml:lang="ga">cáipéis mhéith-théacs</comment>
<comment xml:lang="gl">documento do texto enriquecido</comment>
<comment xml:lang="he">מסמך טקסט עשיר</comment>
- <comment xml:lang="hr">obogaćeni tekstualni dokument</comment>
+ <comment xml:lang="hr">Obogaćeni tekstovni dokument</comment>
<comment xml:lang="hu">rich text-dokumentum</comment>
<comment xml:lang="ia">Documento de texto inricchite</comment>
<comment xml:lang="id">dokumen teks kaya</comment>
@@ -31268,7 +32224,7 @@
<comment xml:lang="pt">documento em texto rico</comment>
<comment xml:lang="pt_BR">Documento rich text</comment>
<comment xml:lang="ro">document text îmbogățit</comment>
- <comment xml:lang="ru">документ с форматированным текстом</comment>
+ <comment xml:lang="ru">Документ с форматированным текстом</comment>
<comment xml:lang="sk">Textový dokument RTF</comment>
<comment xml:lang="sl">dokument z oblikovanim besedilom</comment>
<comment xml:lang="sq">Dokument rich text</comment>
@@ -31277,7 +32233,7 @@
<comment xml:lang="tr">zengin metin belgesi</comment>
<comment xml:lang="uk">форматований текстовий документ</comment>
<comment xml:lang="vi">tài liệu văn bản có kiểu dáng (RTF)</comment>
- <comment xml:lang="zh_CN">RTF 丰富文本文档</comment>
+ <comment xml:lang="zh_CN">富文本文档 (RTF)</comment>
<comment xml:lang="zh_TW">豐富文字文件</comment>
<sub-class-of type="text/plain"/>
<glob pattern="*.rtx"/>
@@ -31319,7 +32275,7 @@
<comment xml:lang="pt">resumo RSS</comment>
<comment xml:lang="pt_BR">Resumo RSS</comment>
<comment xml:lang="ro">Rezumat RSS</comment>
- <comment xml:lang="ru">сводка RSS</comment>
+ <comment xml:lang="ru">Сводка RSS</comment>
<comment xml:lang="sk">Súhrn RSS</comment>
<comment xml:lang="sl">Datoteka povzetek RSS</comment>
<comment xml:lang="sq">Përmbledhje RSS</comment>
@@ -31366,7 +32322,7 @@
<comment xml:lang="it">Feed di distribuzione Atom</comment>
<comment xml:lang="ja">Atom 配信フィード</comment>
<comment xml:lang="kk">Atom жаңалықтар таспасы</comment>
- <comment xml:lang="ko">Atom 동기화 피드</comment>
+ <comment xml:lang="ko">Atom 묶음 피드</comment>
<comment xml:lang="lt">Atom sindikacijos kanalas</comment>
<comment xml:lang="lv">Atom sindikāta barotne</comment>
<comment xml:lang="nb">Atom syndikeringsstrøm</comment>
@@ -31377,7 +32333,7 @@
<comment xml:lang="pt">feed Atom</comment>
<comment xml:lang="pt_BR">Fonte de notícias Atom</comment>
<comment xml:lang="ro">Flux agregare Atom</comment>
- <comment xml:lang="ru">лента новостей Atom</comment>
+ <comment xml:lang="ru">Лента новостей Atom</comment>
<comment xml:lang="sk">Kanál Atom</comment>
<comment xml:lang="sl">Sindikalni vir Atom</comment>
<comment xml:lang="sq">Feed për përhapje Atom</comment>
@@ -31386,7 +32342,7 @@
<comment xml:lang="tr">Atom besleme kaynağı</comment>
<comment xml:lang="uk">трансляція подач Atom</comment>
<comment xml:lang="vi">Nguồn tin tức Atom</comment>
- <comment xml:lang="zh_CN">Atom 更新种子</comment>
+ <comment xml:lang="zh_CN">Atom 聚合种子</comment>
<comment xml:lang="zh_TW">Atom 聯合供稿饋流</comment>
<sub-class-of type="application/xml"/>
<generic-icon name="text-html"/>
@@ -31432,7 +32388,7 @@
<comment xml:lang="pt">feed OPML</comment>
<comment xml:lang="pt_BR">Fonte de notícias OPML</comment>
<comment xml:lang="ro">Flux OPML syndication</comment>
- <comment xml:lang="ru">лента новостей OPML</comment>
+ <comment xml:lang="ru">Лента новостей OPML</comment>
<comment xml:lang="sk">Kanál OPML</comment>
<comment xml:lang="sl">Sindikalni vir OPML</comment>
<comment xml:lang="sq">Feed për përhapje OPML</comment>
@@ -31454,6 +32410,7 @@
<mime-type type="text/sgml">
<comment>SGML document</comment>
<comment xml:lang="ar">مستند SGML</comment>
+ <comment xml:lang="ast">Documentu SGML</comment>
<comment xml:lang="be@latin">Dakument SGML</comment>
<comment xml:lang="bg">Документ — SGML</comment>
<comment xml:lang="ca">document SGML</comment>
@@ -31491,7 +32448,7 @@
<comment xml:lang="pt">documento SGML</comment>
<comment xml:lang="pt_BR">Documento SGML</comment>
<comment xml:lang="ro">Document SGML</comment>
- <comment xml:lang="ru">документ SGML</comment>
+ <comment xml:lang="ru">Документ SGML</comment>
<comment xml:lang="sk">Dokument SGML</comment>
<comment xml:lang="sl">Dokument SGML</comment>
<comment xml:lang="sq">Dokument SGML</comment>
@@ -31511,6 +32468,7 @@
<mime-type type="text/spreadsheet">
<comment>spreadsheet interchange document</comment>
<comment xml:lang="ar">مستند تبادل الجدول</comment>
+ <comment xml:lang="ast">documentu d'intercambéu de fueyes de cálculu</comment>
<comment xml:lang="be@latin">dakument dla abmienu raźlikovymi arkušami</comment>
<comment xml:lang="bg">Документ за обмяна между програми за електронни таблици</comment>
<comment xml:lang="ca">document d'intercanvi de full de càlcul</comment>
@@ -31545,7 +32503,7 @@
<comment xml:lang="pt">documento de troca interna de folhas de cálculo</comment>
<comment xml:lang="pt_BR">Documento de intercâmbio de planilhas</comment>
<comment xml:lang="ro">document schimb filă de calcul</comment>
- <comment xml:lang="ru">документ Spreadsheet Interchange</comment>
+ <comment xml:lang="ru">Документ Spreadsheet Interchange</comment>
<comment xml:lang="sk">Zošitový prenosový dokument</comment>
<comment xml:lang="sl">dokument izmenjeve preglednic</comment>
<comment xml:lang="sq">Dokument shkëmbimi për fletë llogaritje</comment>
@@ -31566,6 +32524,7 @@
<mime-type type="text/tab-separated-values">
<comment>TSV document</comment>
<comment xml:lang="ar">مستند TSV</comment>
+ <comment xml:lang="ast">Documentu TSV</comment>
<comment xml:lang="be@latin">Dakument TSV</comment>
<comment xml:lang="bg">Документ — TSV</comment>
<comment xml:lang="ca">document TSV</comment>
@@ -31600,7 +32559,7 @@
<comment xml:lang="pt">documento TSV</comment>
<comment xml:lang="pt_BR">Documento TSV</comment>
<comment xml:lang="ro">Document TSV</comment>
- <comment xml:lang="ru">документ TSV</comment>
+ <comment xml:lang="ru">Документ TSV</comment>
<comment xml:lang="sk">Dokument TSV</comment>
<comment xml:lang="sl">Dokument TSV</comment>
<comment xml:lang="sq">Dokument TSV</comment>
@@ -31658,7 +32617,7 @@
<comment xml:lang="tr">Graphviz DOT grafiği</comment>
<comment xml:lang="uk">граф DOT Graphviz</comment>
<comment xml:lang="vi">Biểu đồ DOT Graphviz</comment>
- <comment xml:lang="zh_CN">Graphviz DOT 科学图形</comment>
+ <comment xml:lang="zh_CN">Graphviz DOT 图形</comment>
<comment xml:lang="zh_TW">Graphviz DOT 圖</comment>
<generic-icon name="x-office-document"/>
<magic priority="50">
@@ -31673,6 +32632,7 @@
<mime-type type="text/vnd.sun.j2me.app-descriptor">
<comment>JAD document</comment>
<comment xml:lang="ar">مستند JAD</comment>
+ <comment xml:lang="ast">Documentu JAD</comment>
<comment xml:lang="be@latin">Dakument JAD</comment>
<comment xml:lang="bg">Документ — JAD</comment>
<comment xml:lang="ca">document JAD</comment>
@@ -31708,7 +32668,7 @@
<comment xml:lang="pt">documento JAD</comment>
<comment xml:lang="pt_BR">Documento JAD</comment>
<comment xml:lang="ro">Document JAD</comment>
- <comment xml:lang="ru">документ JAD</comment>
+ <comment xml:lang="ru">Документ JAD</comment>
<comment xml:lang="sk">Dokument JAD</comment>
<comment xml:lang="sl">Dokument JAD</comment>
<comment xml:lang="sq">Dokument JAD</comment>
@@ -31729,6 +32689,7 @@
<mime-type type="text/vnd.wap.wml">
<comment>WML document</comment>
<comment xml:lang="ar">مستند WML</comment>
+ <comment xml:lang="ast">Documentu WML</comment>
<comment xml:lang="az">WML sənədi</comment>
<comment xml:lang="be@latin">Dakument WML</comment>
<comment xml:lang="bg">Документ — WML</comment>
@@ -31767,7 +32728,7 @@
<comment xml:lang="pt">documento WML</comment>
<comment xml:lang="pt_BR">Documento WML</comment>
<comment xml:lang="ro">Document WML</comment>
- <comment xml:lang="ru">документ WML</comment>
+ <comment xml:lang="ru">Документ WML</comment>
<comment xml:lang="sk">Dokument WML</comment>
<comment xml:lang="sl">Dokument WML</comment>
<comment xml:lang="sq">Dokument WML</comment>
@@ -31820,7 +32781,7 @@
<comment xml:lang="pt">programa WMLScript</comment>
<comment xml:lang="pt_BR">Programa WMLScript</comment>
<comment xml:lang="ro">Program WMLScript</comment>
- <comment xml:lang="ru">сценарий WMLScript</comment>
+ <comment xml:lang="ru">Программа WMLScript</comment>
<comment xml:lang="sk">Program WMLScript</comment>
<comment xml:lang="sl">Programska datoteka WMLScript</comment>
<comment xml:lang="sq">Program WMLScript</comment>
@@ -31872,7 +32833,7 @@
<comment xml:lang="pt">arquivo ACE</comment>
<comment xml:lang="pt_BR">Pacote ACE</comment>
<comment xml:lang="ro">Arhivă ACE</comment>
- <comment xml:lang="ru">архив ACE</comment>
+ <comment xml:lang="ru">Архив ACE</comment>
<comment xml:lang="sk">Archív ACE</comment>
<comment xml:lang="sl">Datoteka arhiva ACE</comment>
<comment xml:lang="sq">Arkiv ACE</comment>
@@ -31909,10 +32870,10 @@
<comment xml:lang="ga">cód foinseach Ada</comment>
<comment xml:lang="gl">código fonte en Ada</comment>
<comment xml:lang="he">קוד מקור Ada</comment>
- <comment xml:lang="hr">Ada izvorni kod</comment>
+ <comment xml:lang="hr">Ada izvorni kôd</comment>
<comment xml:lang="hu">Ada-forráskód</comment>
<comment xml:lang="ia">Codice-fonte Ada</comment>
- <comment xml:lang="id">Kode program Ada</comment>
+ <comment xml:lang="id">Kode sumber Ada</comment>
<comment xml:lang="it">Codice sorgente Ada</comment>
<comment xml:lang="ja">Ada ソースコード</comment>
<comment xml:lang="ka">Ada-ის საწყისი კოდი</comment>
@@ -31929,7 +32890,7 @@
<comment xml:lang="pt">código origem Ada</comment>
<comment xml:lang="pt_BR">Código-fonte Ada</comment>
<comment xml:lang="ro">Cod sursă Ada</comment>
- <comment xml:lang="ru">исходный код Ada</comment>
+ <comment xml:lang="ru">Исходный код Ada</comment>
<comment xml:lang="sk">Zdrojový kód jazyka Ada</comment>
<comment xml:lang="sl">Datoteka izvorne kode Ada</comment>
<comment xml:lang="sq">Kod burues Ada</comment>
@@ -31983,7 +32944,7 @@
<comment xml:lang="pt">lista de autores</comment>
<comment xml:lang="pt_BR">Lista de autores</comment>
<comment xml:lang="ro">listă autori</comment>
- <comment xml:lang="ru">список авторов</comment>
+ <comment xml:lang="ru">Список авторов</comment>
<comment xml:lang="sk">Zoznam autorov</comment>
<comment xml:lang="sl">seznam avtorjev</comment>
<comment xml:lang="sq">Lista e autorëve</comment>
@@ -32000,6 +32961,7 @@
<mime-type type="text/x-bibtex">
<comment>BibTeX document</comment>
<comment xml:lang="ar">مستند BibTeX</comment>
+ <comment xml:lang="ast">Documentu de BibTeX</comment>
<comment xml:lang="be@latin">Dakument BibTeX</comment>
<comment xml:lang="bg">Документ — BibTeX</comment>
<comment xml:lang="ca">document BibTeX</comment>
@@ -32036,7 +32998,7 @@
<comment xml:lang="pt">documento BibTeX</comment>
<comment xml:lang="pt_BR">Documento BibTeX</comment>
<comment xml:lang="ro">Document BibTeX</comment>
- <comment xml:lang="ru">документ BibTeX</comment>
+ <comment xml:lang="ru">Документ BibTeX</comment>
<comment xml:lang="sk">Dokument BibTeX</comment>
<comment xml:lang="sl">Dokument BibTeX</comment>
<comment xml:lang="sq">Dokument BibTeX</comment>
@@ -32075,7 +33037,7 @@
<comment xml:lang="hr">C++ zaglavlje</comment>
<comment xml:lang="hu">C++ fejléc</comment>
<comment xml:lang="ia">Capite C++</comment>
- <comment xml:lang="id">Tajuk C++</comment>
+ <comment xml:lang="id">Header C++</comment>
<comment xml:lang="it">Header C++</comment>
<comment xml:lang="ja">C++ ヘッダー</comment>
<comment xml:lang="ka">C++-ის თავსართი</comment>
@@ -32091,7 +33053,7 @@
<comment xml:lang="pt">cabeçalho C++</comment>
<comment xml:lang="pt_BR">Cabeçalho C++</comment>
<comment xml:lang="ro">Antet C++</comment>
- <comment xml:lang="ru">заголовочный файл C++</comment>
+ <comment xml:lang="ru">Заголовочный файл C++</comment>
<comment xml:lang="sk">Hlavičky jazyka C++</comment>
<comment xml:lang="sl">Datoteka glave C++</comment>
<comment xml:lang="sq">Header C++</comment>
@@ -32100,7 +33062,7 @@
<comment xml:lang="tr">C++ başlığı</comment>
<comment xml:lang="uk">файл заголовків мовою C++</comment>
<comment xml:lang="vi">Phần đầu mã nguồn C++</comment>
- <comment xml:lang="zh_CN">C++ 源代码头文件</comment>
+ <comment xml:lang="zh_CN">C++ 头文件</comment>
<comment xml:lang="zh_TW">C++ 標頭檔</comment>
<sub-class-of type="text/x-chdr"/>
<glob pattern="*.hh"/>
@@ -32115,7 +33077,7 @@
<comment xml:lang="be@latin">Kryničny kod C++</comment>
<comment xml:lang="bg">Изходен код — C++</comment>
<comment xml:lang="ca">codi font en C++</comment>
- <comment xml:lang="cs">zdrojový kód C++</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce C++</comment>
<comment xml:lang="da">C++-kildekode</comment>
<comment xml:lang="de">C++-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας C++</comment>
@@ -32129,10 +33091,10 @@
<comment xml:lang="ga">cód foinseach C++</comment>
<comment xml:lang="gl">código fonte de C++</comment>
<comment xml:lang="he">קוד מקור של C++‎</comment>
- <comment xml:lang="hr">C++ izvorni kod</comment>
+ <comment xml:lang="hr">C++ izvorni kôd</comment>
<comment xml:lang="hu">C++-forráskód</comment>
<comment xml:lang="ia">Codice-fonte C++</comment>
- <comment xml:lang="id">Kode program C++</comment>
+ <comment xml:lang="id">Kode sumber C++</comment>
<comment xml:lang="it">Codice sorgente C++</comment>
<comment xml:lang="ja">C++ ソースコード</comment>
<comment xml:lang="ka">C++-ის საწყისი კოდი</comment>
@@ -32149,7 +33111,7 @@
<comment xml:lang="pt">código origem C++</comment>
<comment xml:lang="pt_BR">Código-fonte C++</comment>
<comment xml:lang="ro">Cod sursă C++</comment>
- <comment xml:lang="ru">исходный код C++</comment>
+ <comment xml:lang="ru">Исходный код C++</comment>
<comment xml:lang="sk">Zdrojový kód jazyka C++</comment>
<comment xml:lang="sl">Datoteka izvorne kode C++</comment>
<comment xml:lang="sq">Kod burues C++</comment>
@@ -32170,6 +33132,7 @@
<mime-type type="text/x-changelog">
<comment>ChangeLog document</comment>
<comment xml:lang="ar">مستند ChangeLog</comment>
+ <comment xml:lang="ast">Documentu de rexistru de cambeos</comment>
<comment xml:lang="be@latin">Dakument zafiksavanych źmienaŭ ChangeLog</comment>
<comment xml:lang="bg">Дневник за промени — ChangeLog</comment>
<comment xml:lang="ca">document de registre de canvis</comment>
@@ -32186,7 +33149,7 @@
<comment xml:lang="ga">cáipéis ChangeLog</comment>
<comment xml:lang="gl">documento Changelog</comment>
<comment xml:lang="he">מסמך של ChangeLog</comment>
- <comment xml:lang="hr">Dokument zaspisa promjena</comment>
+ <comment xml:lang="hr">Dokument zapisa promjena</comment>
<comment xml:lang="hu">ChangeLog dokumentum</comment>
<comment xml:lang="ia">Lista de cambiamentos</comment>
<comment xml:lang="id">Dokumen ChangeLog</comment>
@@ -32205,11 +33168,11 @@
<comment xml:lang="pt">documento ChangeLog</comment>
<comment xml:lang="pt_BR">Documento ChangeLog</comment>
<comment xml:lang="ro">Document ChangeLog</comment>
- <comment xml:lang="ru">протокол изменений</comment>
+ <comment xml:lang="ru">Протокол изменений</comment>
<comment xml:lang="sk">Dokument ChangeLog</comment>
<comment xml:lang="sl">Dokument ChangeLog</comment>
<comment xml:lang="sq">Dokument ChangeLog</comment>
- <comment xml:lang="sr">Ченџ Лог документ</comment>
+ <comment xml:lang="sr">документ дневника измена</comment>
<comment xml:lang="sv">Ändringsloggsdokument</comment>
<comment xml:lang="tr">Değişim Günlüğü belgesi</comment>
<comment xml:lang="uk">документ ChangeLog</comment>
@@ -32241,7 +33204,7 @@
<comment xml:lang="hr">C zaglavlje</comment>
<comment xml:lang="hu">C fejléc</comment>
<comment xml:lang="ia">Capite C</comment>
- <comment xml:lang="id">Tajuk C</comment>
+ <comment xml:lang="id">Header C</comment>
<comment xml:lang="it">Header C</comment>
<comment xml:lang="ja">C ヘッダー</comment>
<comment xml:lang="ka">C-ის თავსართი</comment>
@@ -32257,7 +33220,7 @@
<comment xml:lang="pt">cabeçalho C</comment>
<comment xml:lang="pt_BR">Cabeçalho C</comment>
<comment xml:lang="ro">Antet C</comment>
- <comment xml:lang="ru">заголовочный файл C</comment>
+ <comment xml:lang="ru">Заголовочный файл C</comment>
<comment xml:lang="sk">Hlavičky jazyka C</comment>
<comment xml:lang="sl">Datoteka glave C</comment>
<comment xml:lang="sq">Header C</comment>
@@ -32291,10 +33254,10 @@
<comment xml:lang="ga">cód foinseach CMake</comment>
<comment xml:lang="gl">código fonte de CMake</comment>
<comment xml:lang="he">קוד מקור של CMake</comment>
- <comment xml:lang="hr">CMake izvorni kod</comment>
+ <comment xml:lang="hr">CMake izvorni kôd</comment>
<comment xml:lang="hu">CMake-forráskód</comment>
<comment xml:lang="ia">Codice-fonte CMake</comment>
- <comment xml:lang="id">Kode program CMake</comment>
+ <comment xml:lang="id">Kode sumber CMake</comment>
<comment xml:lang="it">Codice sorgente CMake</comment>
<comment xml:lang="ja">CMake ソースコード</comment>
<comment xml:lang="ka">CMake-ის საწყისი კოდი</comment>
@@ -32310,7 +33273,7 @@
<comment xml:lang="pt">código origem CMake</comment>
<comment xml:lang="pt_BR">Código-fonte CMake</comment>
<comment xml:lang="ro">Cod sursă CMake</comment>
- <comment xml:lang="ru">исходный код CMake</comment>
+ <comment xml:lang="ru">Исходный код CMake</comment>
<comment xml:lang="sk">Zdrojový kód CMake</comment>
<comment xml:lang="sl">Datoteka izvorne kode CMake</comment>
<comment xml:lang="sq">Kod burues CMake</comment>
@@ -32328,6 +33291,7 @@
<mime-type type="text/csv">
<comment>CSV document</comment>
<comment xml:lang="ar">مستند CSV</comment>
+ <comment xml:lang="ast">Documentu CVS</comment>
<comment xml:lang="be@latin">Dakument CSV</comment>
<comment xml:lang="bg">Документ — CSV</comment>
<comment xml:lang="ca">document CSV</comment>
@@ -32364,7 +33328,7 @@
<comment xml:lang="pt">documento CSV</comment>
<comment xml:lang="pt_BR">Documento CSV</comment>
<comment xml:lang="ro">Document CSV</comment>
- <comment xml:lang="ru">документ CSV</comment>
+ <comment xml:lang="ru">Документ CSV</comment>
<comment xml:lang="sk">Dokument CSV</comment>
<comment xml:lang="sl">Dokument CSV</comment>
<comment xml:lang="sq">Dokument CSV</comment>
@@ -32384,6 +33348,7 @@
</mime-type>
<mime-type type="text/csv-schema">
<comment>CSV Schema document</comment>
+ <comment xml:lang="ast">Documentu d'esquema CSV</comment>
<comment xml:lang="ca">document Schema de CSV</comment>
<comment xml:lang="cs">dokument schématu CSV</comment>
<comment xml:lang="da">CSV Schema-dokument</comment>
@@ -32392,6 +33357,8 @@
<comment xml:lang="es">documento esquemático CSV</comment>
<comment xml:lang="eu">CSV Schema dokumentua</comment>
<comment xml:lang="fr">document schéma CSV</comment>
+ <comment xml:lang="ga">cáipéis scéimre CSV</comment>
+ <comment xml:lang="he">מסמך פריסת CSV</comment>
<comment xml:lang="hr">CSV Shema dokument</comment>
<comment xml:lang="hu">CSV sémadokumentum</comment>
<comment xml:lang="ia">Documento CSV Schema</comment>
@@ -32402,7 +33369,7 @@
<comment xml:lang="pl">Dokument schematu CSV</comment>
<comment xml:lang="pt">documento CSV Schema</comment>
<comment xml:lang="pt_BR">Documento CSV Schema</comment>
- <comment xml:lang="ru">документ CSV Schema</comment>
+ <comment xml:lang="ru">Документ CSV Schema</comment>
<comment xml:lang="sk">Dokument schémy CSV</comment>
<comment xml:lang="sr">документ ЦСВ шеме</comment>
<comment xml:lang="sv">CSV Schema-dokument</comment>
@@ -32418,6 +33385,7 @@
<mime-type type="text/x-copying">
<comment>license terms</comment>
<comment xml:lang="ar">شروط الترخيص</comment>
+ <comment xml:lang="ast">términos de llicencia</comment>
<comment xml:lang="be@latin">licenzijnyja ŭmovy</comment>
<comment xml:lang="bg">Лицензни условия</comment>
<comment xml:lang="ca">condicions de llicència</comment>
@@ -32434,7 +33402,7 @@
<comment xml:lang="ga">téarmaí ceadúnais</comment>
<comment xml:lang="gl">termos de licenza</comment>
<comment xml:lang="he">תנאי רישיון</comment>
- <comment xml:lang="hr">uvjeti licence</comment>
+ <comment xml:lang="hr">Uvjeti licence</comment>
<comment xml:lang="hu">licencfeltételek</comment>
<comment xml:lang="ia">Conditiones de licentia</comment>
<comment xml:lang="id">persyaratan lisensi</comment>
@@ -32452,7 +33420,7 @@
<comment xml:lang="pt">termos de licença</comment>
<comment xml:lang="pt_BR">Termos de licença</comment>
<comment xml:lang="ro">termeni de licență</comment>
- <comment xml:lang="ru">лицензионное соглашение</comment>
+ <comment xml:lang="ru">Лицензионное соглашение</comment>
<comment xml:lang="sk">Licenčné podmienky</comment>
<comment xml:lang="sl">pogoji in dovoljenja uporabe</comment>
<comment xml:lang="sq">Kushte liçence</comment>
@@ -32469,6 +33437,7 @@
<mime-type type="text/x-credits">
<comment>author credits</comment>
<comment xml:lang="ar">شكر وتقدير المؤلف</comment>
+ <comment xml:lang="ast">creitos del autor</comment>
<comment xml:lang="be@latin">zasłuhi aŭtara</comment>
<comment xml:lang="bg">Благодарности към авторите</comment>
<comment xml:lang="ca">atribucions d'autor</comment>
@@ -32502,7 +33471,7 @@
<comment xml:lang="pt">créditos de autor</comment>
<comment xml:lang="pt_BR">Créditos do autor</comment>
<comment xml:lang="ro">mulțumiri autori</comment>
- <comment xml:lang="ru">авторы программы</comment>
+ <comment xml:lang="ru">Авторы программы</comment>
<comment xml:lang="sk">Autorské zásluhy</comment>
<comment xml:lang="sl">avtorske zasluge</comment>
<comment xml:lang="sq">Kreditë e autorëve</comment>
@@ -32522,7 +33491,7 @@
<comment xml:lang="be@latin">Kryničny kod C</comment>
<comment xml:lang="bg">Изходен код — C</comment>
<comment xml:lang="ca">codi font en C</comment>
- <comment xml:lang="cs">zdrojový kód C</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce C</comment>
<comment xml:lang="da">C-kildekode</comment>
<comment xml:lang="de">C-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας C</comment>
@@ -32536,10 +33505,10 @@
<comment xml:lang="ga">cód foinseach C</comment>
<comment xml:lang="gl">código fonte en C</comment>
<comment xml:lang="he">קוד מקור של C</comment>
- <comment xml:lang="hr">C izvorni kod</comment>
+ <comment xml:lang="hr">C izvorni kôd</comment>
<comment xml:lang="hu">C-forráskód</comment>
<comment xml:lang="ia">Codice-fonte C</comment>
- <comment xml:lang="id">Kode program C</comment>
+ <comment xml:lang="id">Kode sumber C</comment>
<comment xml:lang="it">Codice sorgente C</comment>
<comment xml:lang="ja">C ソースコード</comment>
<comment xml:lang="ka">C-ის საწყისი კოდი</comment>
@@ -32556,7 +33525,7 @@
<comment xml:lang="pt">código origem C</comment>
<comment xml:lang="pt_BR">Código-fonte C</comment>
<comment xml:lang="ro">Cod sursă C</comment>
- <comment xml:lang="ru">исходный код C</comment>
+ <comment xml:lang="ru">Исходный код C</comment>
<comment xml:lang="sk">Zdrojový kód jazyka C</comment>
<comment xml:lang="sl">Datoteka izvorne kode C</comment>
<comment xml:lang="sq">Kod burues C</comment>
@@ -32582,7 +33551,7 @@
<comment xml:lang="be@latin">Kryničny kod C#</comment>
<comment xml:lang="bg">Изходен код — C#</comment>
<comment xml:lang="ca">codi font en C#</comment>
- <comment xml:lang="cs">zdrojový kód C#</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce C#</comment>
<comment xml:lang="da">C#-kildekode</comment>
<comment xml:lang="de">C#-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας C#</comment>
@@ -32596,10 +33565,10 @@
<comment xml:lang="ga">cód foinseach C#</comment>
<comment xml:lang="gl">código fonte en C#</comment>
<comment xml:lang="he">קוד מקור של C#‎</comment>
- <comment xml:lang="hr">C# izvorni kod</comment>
+ <comment xml:lang="hr">C# izvorni kôd</comment>
<comment xml:lang="hu">C#-forráskód</comment>
<comment xml:lang="ia">Codice-fonte C#</comment>
- <comment xml:lang="id">Kode program C#</comment>
+ <comment xml:lang="id">Kode sumber C#</comment>
<comment xml:lang="it">Codice sorgente C#</comment>
<comment xml:lang="ja">C# ソースコード</comment>
<comment xml:lang="ka">C#-ის საწყისი კოდი</comment>
@@ -32616,7 +33585,7 @@
<comment xml:lang="pt">código origem C#</comment>
<comment xml:lang="pt_BR">Código-fonte C#</comment>
<comment xml:lang="ro">Cod sursă C#</comment>
- <comment xml:lang="ru">исходный код C#</comment>
+ <comment xml:lang="ru">Исходный код C#</comment>
<comment xml:lang="sk">Zdrojový kód jazyka C#</comment>
<comment xml:lang="sl">Datoteka izvorne kode C#</comment>
<comment xml:lang="sq">Kod burues C#</comment>
@@ -32636,7 +33605,7 @@
<comment xml:lang="be@latin">Kryničny kod Vala</comment>
<comment xml:lang="bg">Изходен код — Vala</comment>
<comment xml:lang="ca">codi font en Vala</comment>
- <comment xml:lang="cs">zdrojový kód Vala</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce Vala</comment>
<comment xml:lang="da">Valakildekode</comment>
<comment xml:lang="de">Vala-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας Vala</comment>
@@ -32650,10 +33619,10 @@
<comment xml:lang="ga">cód foinseach Vala</comment>
<comment xml:lang="gl">código fonte en Vala</comment>
<comment xml:lang="he">קוד מקור של Vala</comment>
- <comment xml:lang="hr">Vala izvorni kod</comment>
+ <comment xml:lang="hr">Vala izvorni kôd</comment>
<comment xml:lang="hu">Vala forráskód</comment>
<comment xml:lang="ia">Codice-fonte Vala</comment>
- <comment xml:lang="id">Kode program Vala</comment>
+ <comment xml:lang="id">Kode sumber Vala</comment>
<comment xml:lang="it">Codice sorgente Vala</comment>
<comment xml:lang="ja">Vala ソースコード</comment>
<comment xml:lang="kk">Vala бастапқы коды</comment>
@@ -32668,7 +33637,7 @@
<comment xml:lang="pt">código origem Vala</comment>
<comment xml:lang="pt_BR">Código-fonte Vala</comment>
<comment xml:lang="ro">Cod sursă Vala</comment>
- <comment xml:lang="ru">исходный код Vala</comment>
+ <comment xml:lang="ru">Исходный код Vala</comment>
<comment xml:lang="sk">Zdrojový kód Vala</comment>
<comment xml:lang="sl">Datoteka izvorne kode Vala</comment>
<comment xml:lang="sq">Kod burues Vala</comment>
@@ -32697,9 +33666,10 @@
<comment xml:lang="eu">OOC iturburu-kodea</comment>
<comment xml:lang="fi">OOC-lähdekoodi</comment>
<comment xml:lang="fr">source code OOC</comment>
+ <comment xml:lang="ga">cód foinseach OOC</comment>
<comment xml:lang="gl">código fonte de OOC</comment>
<comment xml:lang="he">קוד מקור של OOC</comment>
- <comment xml:lang="hr">OOC izvorni kod</comment>
+ <comment xml:lang="hr">OOC izvorni kôd</comment>
<comment xml:lang="hu">OOC forráskód</comment>
<comment xml:lang="ia">Codice-fonte OCC</comment>
<comment xml:lang="id">Kode sumber OOC</comment>
@@ -32714,14 +33684,14 @@
<comment xml:lang="pl">Kod źródłowy OOC</comment>
<comment xml:lang="pt">código origem OOC</comment>
<comment xml:lang="pt_BR">Código-fonte OOC</comment>
- <comment xml:lang="ru">исходный код OOC</comment>
+ <comment xml:lang="ru">Исходный код OOC</comment>
<comment xml:lang="sk">Zdrojový kód OOC</comment>
<comment xml:lang="sl">Izvorna koda OOC</comment>
<comment xml:lang="sr">ООЦ изворни ко̂д</comment>
<comment xml:lang="sv">OOC-källkod</comment>
<comment xml:lang="tr">OOC kaynak kodu</comment>
<comment xml:lang="uk">вихідний код мовою OOC</comment>
- <comment xml:lang="zh_CN">OOC</comment>
+ <comment xml:lang="zh_CN">OOC 源代码</comment>
<comment xml:lang="zh_TW">OOC 源碼</comment>
<acronym>OOC</acronym>
<expanded-acronym>Out Of Class</expanded-acronym>
@@ -32770,7 +33740,7 @@
<comment xml:lang="pt">script DCL</comment>
<comment xml:lang="pt_BR">Script DCL</comment>
<comment xml:lang="ro">Script DCL</comment>
- <comment xml:lang="ru">сценарий DCL</comment>
+ <comment xml:lang="ru">Сценарий DCL</comment>
<comment xml:lang="sk">Skript DCL</comment>
<comment xml:lang="sl">Skriptna datoteka DCL</comment>
<comment xml:lang="sq">Script DCL</comment>
@@ -32789,6 +33759,7 @@
<mime-type type="text/x-dsl">
<comment>DSSSL document</comment>
<comment xml:lang="ar">مستند DSSSL</comment>
+ <comment xml:lang="ast">Documentu DSSSL</comment>
<comment xml:lang="az">DSSSL sənədi</comment>
<comment xml:lang="be@latin">Dakument DSSSL</comment>
<comment xml:lang="bg">Документ — DSSSL</comment>
@@ -32828,7 +33799,7 @@
<comment xml:lang="pt">documento DSSSL</comment>
<comment xml:lang="pt_BR">Documento DSSSL</comment>
<comment xml:lang="ro">Document DSSSL</comment>
- <comment xml:lang="ru">документ DSSSL</comment>
+ <comment xml:lang="ru">Документ DSSSL</comment>
<comment xml:lang="sk">Dokument DSSSL</comment>
<comment xml:lang="sl">Dokument DSSSL</comment>
<comment xml:lang="sq">Dokument DSSSL</comment>
@@ -32850,7 +33821,7 @@
<comment xml:lang="be@latin">Kryničny kod D</comment>
<comment xml:lang="bg">Изходен код — D</comment>
<comment xml:lang="ca">codi font en D</comment>
- <comment xml:lang="cs">zdrojový kód D</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce D</comment>
<comment xml:lang="da">D-kildekode</comment>
<comment xml:lang="de">D-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας D</comment>
@@ -32864,10 +33835,10 @@
<comment xml:lang="ga">cód foinseach D</comment>
<comment xml:lang="gl">código fonte de D</comment>
<comment xml:lang="he">קוד מקור לשפת D</comment>
- <comment xml:lang="hr">D izvorni kod</comment>
+ <comment xml:lang="hr">D izvorni kôd</comment>
<comment xml:lang="hu">D-forráskód</comment>
<comment xml:lang="ia">Codice-fonte D</comment>
- <comment xml:lang="id">Kode program D</comment>
+ <comment xml:lang="id">Kode sumber D</comment>
<comment xml:lang="it">Codice sorgente D</comment>
<comment xml:lang="ja">D ソースコード</comment>
<comment xml:lang="ka">D-ის საწყისი კოდი</comment>
@@ -32883,7 +33854,7 @@
<comment xml:lang="pt">código origem D</comment>
<comment xml:lang="pt_BR">Código-fonte D</comment>
<comment xml:lang="ro">Cod sursă D</comment>
- <comment xml:lang="ru">исходный код D</comment>
+ <comment xml:lang="ru">Исходный код D</comment>
<comment xml:lang="sk">Zdrojový kód jazyka D</comment>
<comment xml:lang="sl">Datoteka izvorne kode D</comment>
<comment xml:lang="sq">Kod burues D</comment>
@@ -32937,7 +33908,7 @@
<comment xml:lang="pt">ficheiro DTD</comment>
<comment xml:lang="pt_BR">Arquivo DTD</comment>
<comment xml:lang="ro">Fișier DTD</comment>
- <comment xml:lang="ru">файл DTD</comment>
+ <comment xml:lang="ru">Файл DTD</comment>
<comment xml:lang="sk">Súbor DTD</comment>
<comment xml:lang="sl">Datoteka DTD</comment>
<comment xml:lang="sq">File DTD</comment>
@@ -32961,7 +33932,7 @@
<comment xml:lang="be@latin">Kryničny kod Eiffel</comment>
<comment xml:lang="bg">Изходен код — Eiffel</comment>
<comment xml:lang="ca">codi font en Eiffel</comment>
- <comment xml:lang="cs">zdrojový kód Eiffel</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce Eiffel</comment>
<comment xml:lang="da">Eiffelkildekode</comment>
<comment xml:lang="de">Eiffel-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας Eiffel</comment>
@@ -32975,10 +33946,10 @@
<comment xml:lang="ga">cód foinseach Eiffel</comment>
<comment xml:lang="gl">código fone de Eiffel</comment>
<comment xml:lang="he">קוד מקור של Eiffel</comment>
- <comment xml:lang="hr">Eiffel izvorni kod</comment>
+ <comment xml:lang="hr">Eiffel izvorni kôd</comment>
<comment xml:lang="hu">Eiffel forráskód</comment>
<comment xml:lang="ia">Codice-fonte Eiffel</comment>
- <comment xml:lang="id">Kode program Eiffel</comment>
+ <comment xml:lang="id">Kode sumber Eiffel</comment>
<comment xml:lang="it">Codice sorgente Eiffel</comment>
<comment xml:lang="ja">Eiffel ソースコード</comment>
<comment xml:lang="ka">Eiffel-ის საწყისი კოდი</comment>
@@ -32994,7 +33965,7 @@
<comment xml:lang="pt">código origem Eiffel</comment>
<comment xml:lang="pt_BR">Código-fonte Eiffel</comment>
<comment xml:lang="ro">Cod sursă Eiffel</comment>
- <comment xml:lang="ru">исходный код Eiffel</comment>
+ <comment xml:lang="ru">Исходный код Eiffel</comment>
<comment xml:lang="sk">Zdrojový kód Eiffel</comment>
<comment xml:lang="sl">Datoteka izvorne kode Eiffel</comment>
<comment xml:lang="sq">Kod burues Eiffel</comment>
@@ -33031,7 +34002,7 @@
<comment xml:lang="ga">cód foinseach Emacs Lisp</comment>
<comment xml:lang="gl">código fonte de Emacs Lisp</comment>
<comment xml:lang="he">קוד מקור של Emcas Lisp</comment>
- <comment xml:lang="hr">Emacs Lisp izvorni kod</comment>
+ <comment xml:lang="hr">Emacs Lisp izvorni kôd</comment>
<comment xml:lang="hu">Emacs Lisp-forráskód</comment>
<comment xml:lang="ia">Codice-fonte Lisp de Emacs</comment>
<comment xml:lang="id">Kode sumber Emacs Lisp</comment>
@@ -33051,7 +34022,7 @@
<comment xml:lang="pt">código origem Emacs Lisp</comment>
<comment xml:lang="pt_BR">Código-fonte Lisp do Emacs</comment>
<comment xml:lang="ro">Cod sursă Emacs Lisp</comment>
- <comment xml:lang="ru">исходный код Emacs Lisp</comment>
+ <comment xml:lang="ru">Исходный код Emacs Lisp</comment>
<comment xml:lang="sk">Zdrojový kód Emacs Lisp</comment>
<comment xml:lang="sl">Datoteka izvorne kode Emacs Lisp</comment>
<comment xml:lang="sq">Kod burues Emacs Lisp</comment>
@@ -33075,7 +34046,7 @@
<comment xml:lang="be@latin">Kryničny kod Erlang</comment>
<comment xml:lang="bg">Изходен код — Erlang</comment>
<comment xml:lang="ca">codi font en Erlang</comment>
- <comment xml:lang="cs">zdrojový kód Erlang</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce Erlang</comment>
<comment xml:lang="da">Erlangkildekode</comment>
<comment xml:lang="de">Erlang-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας Erlang</comment>
@@ -33089,10 +34060,10 @@
<comment xml:lang="ga">cód foinseach Erlang</comment>
<comment xml:lang="gl">código fonte de Erlang</comment>
<comment xml:lang="he">קוד מקור של Erlang</comment>
- <comment xml:lang="hr">Erlang izvorni kod</comment>
+ <comment xml:lang="hr">Erlang izvorni kôd</comment>
<comment xml:lang="hu">Erlang forráskód</comment>
<comment xml:lang="ia">Codice-fonte Erlang</comment>
- <comment xml:lang="id">Kode program Erlang</comment>
+ <comment xml:lang="id">Kode sumber Erlang</comment>
<comment xml:lang="it">Codice sorgente Erlang</comment>
<comment xml:lang="ja">Erlang ソースコード</comment>
<comment xml:lang="ka">Erlang-ის საწყისი კოდი</comment>
@@ -33108,7 +34079,7 @@
<comment xml:lang="pt">código origem Erlang</comment>
<comment xml:lang="pt_BR">Código-fonte Erlang</comment>
<comment xml:lang="ro">Cod sursă Erlang</comment>
- <comment xml:lang="ru">исходный код Erlang</comment>
+ <comment xml:lang="ru">Исходный код Erlang</comment>
<comment xml:lang="sk">Zdrojový kód Erlang</comment>
<comment xml:lang="sl">Datoteka izvorne kode Erlang</comment>
<comment xml:lang="sq">Kod burues Erlang</comment>
@@ -33129,7 +34100,7 @@
<comment xml:lang="be@latin">Kryničny kod Fortran</comment>
<comment xml:lang="bg">Изходен код — Fortran</comment>
<comment xml:lang="ca">codi font en Fortran</comment>
- <comment xml:lang="cs">zdrojový kód Fortran</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce Fortran</comment>
<comment xml:lang="cy">Ffynhonnell rhaglen FORTRAN</comment>
<comment xml:lang="da">Fortrankildekode</comment>
<comment xml:lang="de">Fortran-Quelltext</comment>
@@ -33144,10 +34115,10 @@
<comment xml:lang="ga">cód foinseach Fortran</comment>
<comment xml:lang="gl">código fonte de Fortran</comment>
<comment xml:lang="he">קוד מקור של Fortran</comment>
- <comment xml:lang="hr">Fortran izvorni kod</comment>
+ <comment xml:lang="hr">Fortran izvorni kôd</comment>
<comment xml:lang="hu">Fortran-forráskód</comment>
<comment xml:lang="ia">Codice-fonte Fortran</comment>
- <comment xml:lang="id">Kode program Fortran</comment>
+ <comment xml:lang="id">Kode sumber Fortran</comment>
<comment xml:lang="it">Codice sorgente Fortran</comment>
<comment xml:lang="ja">Fortran ソースコード</comment>
<comment xml:lang="ka">Fortran-ის საწყისი კოდი</comment>
@@ -33164,7 +34135,7 @@
<comment xml:lang="pt">código origem Fortran</comment>
<comment xml:lang="pt_BR">Código-fonte Fortran</comment>
<comment xml:lang="ro">Cod sursă Fortran</comment>
- <comment xml:lang="ru">исходный код Fortran</comment>
+ <comment xml:lang="ru">Исходный код Fortran</comment>
<comment xml:lang="sk">Zdrojový kód Fortran</comment>
<comment xml:lang="sl">Datoteka izvorne kode Fortran</comment>
<comment xml:lang="sq">Kod burues Fortran</comment>
@@ -33193,10 +34164,12 @@
<comment xml:lang="eu">Genie iturburu-kodea</comment>
<comment xml:lang="fi">Genie-lähdekoodi</comment>
<comment xml:lang="fr">code source Genie</comment>
+ <comment xml:lang="ga">cód foinseach Genie</comment>
+ <comment xml:lang="he">קוד מקור של Genie</comment>
<comment xml:lang="hr">Genie izvorni kôd</comment>
<comment xml:lang="hu">Genie forráskód</comment>
<comment xml:lang="ia">Codice-fonte Genie</comment>
- <comment xml:lang="id">Kode program Genie</comment>
+ <comment xml:lang="id">Kode sumber Genie</comment>
<comment xml:lang="it">Codice sorgente Genie</comment>
<comment xml:lang="kk">Genie бастапқы коды</comment>
<comment xml:lang="ko">Genie 소스 코드</comment>
@@ -33204,7 +34177,7 @@
<comment xml:lang="pl">Kod źródłowy Genie</comment>
<comment xml:lang="pt">código origem Genie</comment>
<comment xml:lang="pt_BR">Código-fonte Genie</comment>
- <comment xml:lang="ru">исходный код Genie</comment>
+ <comment xml:lang="ru">Исходный код Genie</comment>
<comment xml:lang="sk">Zdrojový kód Genie</comment>
<comment xml:lang="sl">Izvorna koda Genie</comment>
<comment xml:lang="sr">Гение изворни ко̂д</comment>
@@ -33220,6 +34193,7 @@
<mime-type type="text/x-gettext-translation">
<comment>translation file</comment>
<comment xml:lang="ar">ملف الترجمة</comment>
+ <comment xml:lang="ast">ficheru de traducción</comment>
<comment xml:lang="be@latin">fajł pierakładu</comment>
<comment xml:lang="bg">Превод</comment>
<comment xml:lang="ca">fitxer de traducció</comment>
@@ -33234,10 +34208,10 @@
<comment xml:lang="fi">käännöstiedosto</comment>
<comment xml:lang="fo">týðingarfíla</comment>
<comment xml:lang="fr">fichier de traduction</comment>
- <comment xml:lang="ga">comhad aistrithe</comment>
+ <comment xml:lang="ga">comhad aistriúcháin</comment>
<comment xml:lang="gl">ficheiro de tradución</comment>
<comment xml:lang="he">קובץ תרגום</comment>
- <comment xml:lang="hr">datoteka prijevoda</comment>
+ <comment xml:lang="hr">Datoteka prijevoda</comment>
<comment xml:lang="hu">fordítási fájl</comment>
<comment xml:lang="ia">File de traduction</comment>
<comment xml:lang="id">berkas terjemahan</comment>
@@ -33256,7 +34230,7 @@
<comment xml:lang="pt">ficheiro de tradução</comment>
<comment xml:lang="pt_BR">Arquivo de tradução</comment>
<comment xml:lang="ro">fișier traducere</comment>
- <comment xml:lang="ru">файл переводов</comment>
+ <comment xml:lang="ru">Файл переводов</comment>
<comment xml:lang="sk">Súbor prekladu</comment>
<comment xml:lang="sl">datoteka prevoda programa</comment>
<comment xml:lang="sq">File përkthimesh</comment>
@@ -33265,7 +34239,7 @@
<comment xml:lang="tr">çeviri dosyası</comment>
<comment xml:lang="uk">файл перекладу</comment>
<comment xml:lang="vi">tập tin dịch</comment>
- <comment xml:lang="zh_CN">消息翻译文件</comment>
+ <comment xml:lang="zh_CN">翻译文件</comment>
<comment xml:lang="zh_TW">翻譯檔</comment>
<sub-class-of type="text/plain"/>
<glob pattern="*.po"/>
@@ -33275,6 +34249,7 @@
<mime-type type="text/x-gettext-translation-template">
<comment>translation template</comment>
<comment xml:lang="ar">قالب الترجمة</comment>
+ <comment xml:lang="ast">plantía de traducción</comment>
<comment xml:lang="be@latin">šablon dla pierakładu</comment>
<comment xml:lang="bg">Шаблон за преводи</comment>
<comment xml:lang="ca">plantilla de traducció</comment>
@@ -33289,10 +34264,10 @@
<comment xml:lang="fi">käännösmalli</comment>
<comment xml:lang="fo">týðingarformur</comment>
<comment xml:lang="fr">modèle de traduction</comment>
- <comment xml:lang="ga">teimpléad aistrithe</comment>
+ <comment xml:lang="ga">teimpléad aistriúcháin</comment>
<comment xml:lang="gl">plantilla de tradución</comment>
<comment xml:lang="he">תבנית תרגום</comment>
- <comment xml:lang="hr">predložak prijevoda</comment>
+ <comment xml:lang="hr">Predložak prijevoda</comment>
<comment xml:lang="hu">fordítási sablon</comment>
<comment xml:lang="ia">Patrono de traduction</comment>
<comment xml:lang="id">templat terjemahan</comment>
@@ -33311,7 +34286,7 @@
<comment xml:lang="pt">modelo de tradução</comment>
<comment xml:lang="pt_BR">Modelo de tradução</comment>
<comment xml:lang="ro">șablon de traducere</comment>
- <comment xml:lang="ru">шаблон переводов</comment>
+ <comment xml:lang="ru">Шаблон переводов</comment>
<comment xml:lang="sk">Šablóna prekladu</comment>
<comment xml:lang="sl">predloga datoteke prevoda programa</comment>
<comment xml:lang="sq">Model përkthimesh</comment>
@@ -33320,7 +34295,7 @@
<comment xml:lang="tr">çeviri şablonu</comment>
<comment xml:lang="uk">шаблон перекладу</comment>
<comment xml:lang="vi">mẫu dịch</comment>
- <comment xml:lang="zh_CN">消息翻译模板</comment>
+ <comment xml:lang="zh_CN">翻译模板</comment>
<comment xml:lang="zh_TW">翻譯模版</comment>
<sub-class-of type="text/plain"/>
<glob pattern="*.pot"/>
@@ -33332,18 +34307,27 @@
<mime-type type="text/x-gherkin">
<comment>feature specification in Gherkin format</comment>
<comment xml:lang="ca">especificació de funcionalitat en format Gherkin</comment>
+ <comment xml:lang="cs">specifikace vlastností ve formátu Gherkin</comment>
<comment xml:lang="da">funktionspecifikation i Gherkin-format</comment>
<comment xml:lang="de">Funktionsspezifikation im Gherkin-Format</comment>
+ <comment xml:lang="en_GB">feature specification in Gherkin format</comment>
<comment xml:lang="es">especificación de funcionalidad en formato Gherkin</comment>
<comment xml:lang="fr">spécification fonctionnelle au format Gherkin</comment>
+ <comment xml:lang="ga">sonraíocht gnéithe i bhformáid Gherkin</comment>
<comment xml:lang="he">פירוט תכונות בתבנית Gherkin</comment>
+ <comment xml:lang="hr">opis značajke u Gherkin formatu</comment>
<comment xml:lang="hu">funkcióleírás Gherkin formátumban</comment>
+ <comment xml:lang="id">spesifikasi fitur dalam format Gherkin</comment>
+ <comment xml:lang="it">Specifica di funzionalità in formato Gherkin</comment>
<comment xml:lang="kk">Gherkin пішіміндегі функционалды анықтамалар</comment>
<comment xml:lang="ko">Gherkin 형식의 기능 명세</comment>
<comment xml:lang="pl">Specyfikacja funkcji w formacie Gherkin</comment>
<comment xml:lang="pt_BR">Especificação de recurso no formato Gherkin</comment>
- <comment xml:lang="ru">функциональные определения в формате Gherkin</comment>
+ <comment xml:lang="ru">Функциональные определения в формате Gherkin</comment>
<comment xml:lang="sk">Špecifikácia funkcie vo formáte Gherkin</comment>
+ <comment xml:lang="sr">одредба функције у запису Геркина</comment>
+ <comment xml:lang="sv">egenskapsspecifikation i Gherkin-format</comment>
+ <comment xml:lang="tr">Gherkin biçiminde özellik belirtimi</comment>
<comment xml:lang="uk">специфікація можливості у форматі Gherkin</comment>
<comment xml:lang="zh_CN">Gherkin 格式中的功能规范</comment>
<comment xml:lang="zh_TW">Gherkin 格式的特徵規格</comment>
@@ -33353,6 +34337,7 @@
<mime-type type="text/html">
<comment>HTML document</comment>
<comment xml:lang="ar">مستند HTML</comment>
+ <comment xml:lang="ast">Documentu HTML</comment>
<comment xml:lang="be@latin">Dakument HTML</comment>
<comment xml:lang="bg">Документ — HTML</comment>
<comment xml:lang="ca">document HTML</comment>
@@ -33388,7 +34373,7 @@
<comment xml:lang="pt">documento HTML</comment>
<comment xml:lang="pt_BR">Documento HTML</comment>
<comment xml:lang="ro">Document HTML</comment>
- <comment xml:lang="ru">документ HTML</comment>
+ <comment xml:lang="ru">Документ HTML</comment>
<comment xml:lang="sk">Dokument HTML</comment>
<comment xml:lang="sl">Dokument HTML</comment>
<comment xml:lang="sq">Dokument HTML</comment>
@@ -33434,7 +34419,7 @@
<comment xml:lang="de">Webanwendungscache-Manifest</comment>
<comment xml:lang="el">Δηλωτικό λανθάνουσας μνήμης εφαρμογής Ιστού</comment>
<comment xml:lang="en_GB">Web application cache manifest</comment>
- <comment xml:lang="es">manifiesto de caché de aplicación web</comment>
+ <comment xml:lang="es">manifiesto de antememoria de aplicación web</comment>
<comment xml:lang="eu">Web aplikazioaren cache-aren agiria</comment>
<comment xml:lang="fo">Net nýtsluskipanarkova manifest</comment>
<comment xml:lang="fr">manifeste de cache d'application Web</comment>
@@ -33457,7 +34442,7 @@
<comment xml:lang="pt">manifesto de cache de aplicação web</comment>
<comment xml:lang="pt_BR">Manifest de cache de aplicação web</comment>
<comment xml:lang="ro">Manifest de cache pentru aplicații web</comment>
- <comment xml:lang="ru">манифест кэша веб-приложения</comment>
+ <comment xml:lang="ru">Манифест кэша веб-приложения</comment>
<comment xml:lang="sk">Manifest vyrovnávacej pamäte webovej aplikácie</comment>
<comment xml:lang="sl">Predpomnilnik spletnega programa</comment>
<comment xml:lang="sr">проглас оставе Веб програма</comment>
@@ -33480,6 +34465,7 @@
<mime-type type="text/x-google-video-pointer">
<comment>Google Video Pointer</comment>
<comment xml:lang="ar">مؤشر فيديو جوجل</comment>
+ <comment xml:lang="ast">Google Video Pointer</comment>
<comment xml:lang="be@latin">Pakazalnik Google Video</comment>
<comment xml:lang="bg">Документ-указател към видео на Google</comment>
<comment xml:lang="ca">apuntador a vídeo de Google</comment>
@@ -33539,7 +34525,7 @@
<comment xml:lang="be@latin">Kryničny kod Haskell</comment>
<comment xml:lang="bg">Изходен код на Haskell</comment>
<comment xml:lang="ca">codi font en Haskell</comment>
- <comment xml:lang="cs">zdrojový kód Haskell</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce Haskell</comment>
<comment xml:lang="cy">Ffynhonnell rhaglen Haskell</comment>
<comment xml:lang="da">Haskellkildekode</comment>
<comment xml:lang="de">Haskell-Quelltext</comment>
@@ -33554,10 +34540,10 @@
<comment xml:lang="ga">cód foinseach Haskell</comment>
<comment xml:lang="gl">código fonte de Haskell</comment>
<comment xml:lang="he">קוד מקור של Haskell</comment>
- <comment xml:lang="hr">Haskell izvorni kod</comment>
+ <comment xml:lang="hr">Haskell izvorni kôd</comment>
<comment xml:lang="hu">Haskell-forráskód</comment>
<comment xml:lang="ia">Codice-fonte Haskell</comment>
- <comment xml:lang="id">Kode program Haskell</comment>
+ <comment xml:lang="id">Kode sumber Haskell</comment>
<comment xml:lang="it">Codice sorgente Haskell</comment>
<comment xml:lang="ja">Haskell ソースコード</comment>
<comment xml:lang="kk">Haskell бастапқы коды</comment>
@@ -33573,7 +34559,7 @@
<comment xml:lang="pt">código origem Haskell</comment>
<comment xml:lang="pt_BR">Código-fonte Haskell</comment>
<comment xml:lang="ro">Cod sursă Haskell</comment>
- <comment xml:lang="ru">исходный код Haskell</comment>
+ <comment xml:lang="ru">Исходный код Haskell</comment>
<comment xml:lang="sk">Zdrojový kód Haskell</comment>
<comment xml:lang="sl">Datoteka izvorne kode Haskell</comment>
<comment xml:lang="sq">Kod burues Haskell</comment>
@@ -33590,6 +34576,7 @@
<mime-type type="text/x-idl">
<comment>IDL document</comment>
<comment xml:lang="ar">مستند IDL</comment>
+ <comment xml:lang="ast">Documentu IDL</comment>
<comment xml:lang="az">IDL sənədi</comment>
<comment xml:lang="be@latin">Dakument IDL</comment>
<comment xml:lang="bg">Документ — IDL</comment>
@@ -33628,7 +34615,7 @@
<comment xml:lang="pt">documento IDL</comment>
<comment xml:lang="pt_BR">Documento IDL</comment>
<comment xml:lang="ro">Document IDL</comment>
- <comment xml:lang="ru">документ IDL</comment>
+ <comment xml:lang="ru">Документ IDL</comment>
<comment xml:lang="sk">Dokument IDL</comment>
<comment xml:lang="sl">Dokument IDL</comment>
<comment xml:lang="sq">Dokument IDL</comment>
@@ -33647,6 +34634,7 @@
<mime-type type="text/x-install">
<comment>installation instructions</comment>
<comment xml:lang="ar">تعليمات التثبيت</comment>
+ <comment xml:lang="ast">instrucciones d'instalación</comment>
<comment xml:lang="be@latin">instrukcyja dla instalavańnia</comment>
<comment xml:lang="bg">Инструкции за инсталация</comment>
<comment xml:lang="ca">instruccions d'instal·lació</comment>
@@ -33663,7 +34651,7 @@
<comment xml:lang="ga">treoracha suiteála</comment>
<comment xml:lang="gl">instrucións de instalación</comment>
<comment xml:lang="he">הוראות התקנה</comment>
- <comment xml:lang="hr">upute za instalaciju</comment>
+ <comment xml:lang="hr">Upute za instalaciju</comment>
<comment xml:lang="hu">telepítési utasítások</comment>
<comment xml:lang="ia">Instructiones de installation</comment>
<comment xml:lang="id">instruksi instalasi</comment>
@@ -33681,7 +34669,7 @@
<comment xml:lang="pt">instruções de instalação</comment>
<comment xml:lang="pt_BR">Instruções de instalação</comment>
<comment xml:lang="ro">instrucțiuni de instalare</comment>
- <comment xml:lang="ru">инструкции по установке программы</comment>
+ <comment xml:lang="ru">Инструкции по установке</comment>
<comment xml:lang="sk">Návod na inštaláciu</comment>
<comment xml:lang="sl">navodila namestitve</comment>
<comment xml:lang="sq">Udhëzime instalimi</comment>
@@ -33701,7 +34689,7 @@
<comment xml:lang="be@latin">Kryničny kod Java</comment>
<comment xml:lang="bg">Изходен код на Java</comment>
<comment xml:lang="ca">codi font en Java</comment>
- <comment xml:lang="cs">zdrojový kód Java</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce Java</comment>
<comment xml:lang="da">Javakildekode</comment>
<comment xml:lang="de">Java-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας Java</comment>
@@ -33715,10 +34703,10 @@
<comment xml:lang="ga">cód foinseach Java</comment>
<comment xml:lang="gl">código fonte de Java</comment>
<comment xml:lang="he">קוד מקור ב־Java</comment>
- <comment xml:lang="hr">Java izvorni kod</comment>
+ <comment xml:lang="hr">Java izvorni kôd</comment>
<comment xml:lang="hu">Java-forráskód</comment>
<comment xml:lang="ia">Codice-fonte Java</comment>
- <comment xml:lang="id">Kode program Java</comment>
+ <comment xml:lang="id">Kode sumber Java</comment>
<comment xml:lang="it">Codice sorgente Java</comment>
<comment xml:lang="ja">Java ソースコード</comment>
<comment xml:lang="kk">Java бастапқы коды</comment>
@@ -33734,7 +34722,7 @@
<comment xml:lang="pt">código origem Java</comment>
<comment xml:lang="pt_BR">Código-fonte Java</comment>
<comment xml:lang="ro">Cod sursă Java</comment>
- <comment xml:lang="ru">исходный код Java</comment>
+ <comment xml:lang="ru">Исходный код Java</comment>
<comment xml:lang="sk">Zdrojový kód Java</comment>
<comment xml:lang="sl">Datoteka izvorne kode Java</comment>
<comment xml:lang="sq">Kod burues Java</comment>
@@ -33765,7 +34753,7 @@
<comment xml:lang="fi">LDIF-osoitekirja</comment>
<comment xml:lang="fo">LDIF adressubók</comment>
<comment xml:lang="fr">carnet d'adresses LDIF</comment>
- <comment xml:lang="ga">leabhar sheoltaí LDIF</comment>
+ <comment xml:lang="ga">leabhar seoltaí LDIF</comment>
<comment xml:lang="gl">lista de enderezos LDIF</comment>
<comment xml:lang="he">ספר כתובות של LDIF</comment>
<comment xml:lang="hr">LDIF adresar</comment>
@@ -33786,7 +34774,7 @@
<comment xml:lang="pt">livro de endereços LDIF</comment>
<comment xml:lang="pt_BR">Livro de endereços LDIF</comment>
<comment xml:lang="ro">Agendă LDIF</comment>
- <comment xml:lang="ru">адресная книга LDIF</comment>
+ <comment xml:lang="ru">Адресная книга LDIF</comment>
<comment xml:lang="sk">Adresár LDIF</comment>
<comment xml:lang="sl">Datoteka imenika naslovov LDIF</comment>
<comment xml:lang="sq">Rubrikë LDIF</comment>
@@ -33842,7 +34830,7 @@
<comment xml:lang="pt">folha de música Lilypond</comment>
<comment xml:lang="pt_BR">Partitura do Lilypond</comment>
<comment xml:lang="ro">Fișă muzică Lilypond</comment>
- <comment xml:lang="ru">список музыки Lilypond</comment>
+ <comment xml:lang="ru">Список музыки Lilypond</comment>
<comment xml:lang="sk">Notový papier Lilypond</comment>
<comment xml:lang="sl">Glasbena predloga Lilypond</comment>
<comment xml:lang="sq">Partiturë Lilypond</comment>
@@ -33876,10 +34864,10 @@
<comment xml:lang="ga">cód foinseach LHS</comment>
<comment xml:lang="gl">código fonte en LHS</comment>
<comment xml:lang="he">קוד מקור של LHS</comment>
- <comment xml:lang="hr">LHS izvorni kod</comment>
+ <comment xml:lang="hr">LHS izvorni kôd</comment>
<comment xml:lang="hu">LHS forráskód</comment>
<comment xml:lang="ia">Codice-fonte LHS</comment>
- <comment xml:lang="id">Kode program LHS</comment>
+ <comment xml:lang="id">Kode sumber LHS</comment>
<comment xml:lang="it">Codice sorgente LHS</comment>
<comment xml:lang="ja">LHS ソースコード</comment>
<comment xml:lang="kk">LHS бастапқы коды</comment>
@@ -33894,7 +34882,7 @@
<comment xml:lang="pt">código origem LHS</comment>
<comment xml:lang="pt_BR">Código-fonte LHS</comment>
<comment xml:lang="ro">Cod sursă LHS</comment>
- <comment xml:lang="ru">исходный код LHS</comment>
+ <comment xml:lang="ru">Исходный код LHS</comment>
<comment xml:lang="sk">Zdrojový kód LHS</comment>
<comment xml:lang="sl">Datoteka izvorne kode LHS</comment>
<comment xml:lang="sq">Kod burues LHS</comment>
@@ -33913,6 +34901,7 @@
<mime-type type="text/x-log">
<comment>application log</comment>
<comment xml:lang="ar">سجل التطبيق</comment>
+ <comment xml:lang="ast">rexistru d'aplicación</comment>
<comment xml:lang="be@latin">časopis aplikacyi</comment>
<comment xml:lang="bg">Файл-дневник на приложение</comment>
<comment xml:lang="ca">registre d'aplicació</comment>
@@ -33949,7 +34938,7 @@
<comment xml:lang="pt">diário de aplicação</comment>
<comment xml:lang="pt_BR">Registro de aplicativo</comment>
<comment xml:lang="ro">înregistrare aplicație</comment>
- <comment xml:lang="ru">журнал сообщений</comment>
+ <comment xml:lang="ru">Журнал сообщений</comment>
<comment xml:lang="sk">Záznam aplikácie</comment>
<comment xml:lang="sl">dnevnik programa</comment>
<comment xml:lang="sq">log i mesazheve të programit</comment>
@@ -34005,7 +34994,7 @@
<comment xml:lang="pt">Makefile</comment>
<comment xml:lang="pt_BR">Makefile (arquivo do make)</comment>
<comment xml:lang="ro">Makefile</comment>
- <comment xml:lang="ru">Makefile (файл сборки)</comment>
+ <comment xml:lang="ru">Файл Makefile</comment>
<comment xml:lang="sk">Makefile</comment>
<comment xml:lang="sl">Datoteka Makefile</comment>
<comment xml:lang="sq">Makefile</comment>
@@ -34029,6 +35018,7 @@
</mime-type>
<mime-type type="text/markdown">
<comment>Markdown document</comment>
+ <comment xml:lang="ast">Documentu Markdown</comment>
<comment xml:lang="bg">Документ — Markdown</comment>
<comment xml:lang="ca">document Markdown</comment>
<comment xml:lang="cs">dokument Markdown</comment>
@@ -34040,6 +35030,7 @@
<comment xml:lang="eu">Markdown dokumentua</comment>
<comment xml:lang="fi">Markdown-asiakirja</comment>
<comment xml:lang="fr">document Markdown</comment>
+ <comment xml:lang="ga">cáipéis Markdown</comment>
<comment xml:lang="gl">documento de Markdown</comment>
<comment xml:lang="he">מסמך Markdown</comment>
<comment xml:lang="hr">Markdown dokument</comment>
@@ -34056,7 +35047,7 @@
<comment xml:lang="pl">Dokument Markdown</comment>
<comment xml:lang="pt">documento Markdown</comment>
<comment xml:lang="pt_BR">Documento Markdown</comment>
- <comment xml:lang="ru">документ Markdown</comment>
+ <comment xml:lang="ru">Документ Markdown</comment>
<comment xml:lang="sk">Dokument Markdown</comment>
<comment xml:lang="sl">Dokument Markdown</comment>
<comment xml:lang="sr">Маркдаун документ</comment>
@@ -34108,7 +35099,7 @@
<comment xml:lang="pt">ficheiro Qt MOC</comment>
<comment xml:lang="pt_BR">Arquivo Qt MOC</comment>
<comment xml:lang="ro">Fișier Qt MOC</comment>
- <comment xml:lang="ru">файл Qt MOC</comment>
+ <comment xml:lang="ru">Файл Qt MOC</comment>
<comment xml:lang="sk">Súbor Qt MOC</comment>
<comment xml:lang="sl">Datoteka Qt MOC</comment>
<comment xml:lang="sq">File Qt MOC</comment>
@@ -34117,7 +35108,7 @@
<comment xml:lang="tr">Qt MOC dosyası</comment>
<comment xml:lang="uk">файл-метаоб'єкт Qt</comment>
<comment xml:lang="vi">Tập tin MOC của Qt</comment>
- <comment xml:lang="zh_CN">Qt 元对象编译文件</comment>
+ <comment xml:lang="zh_CN">Qt 元对象编译器文件</comment>
<comment xml:lang="zh_TW">Qt MOC 檔</comment>
<acronym>Qt MOC</acronym>
<expanded-acronym>Qt Meta Object Compiler</expanded-acronym>
@@ -34161,7 +35152,7 @@
<comment xml:lang="pt">extrato do registo do Windows</comment>
<comment xml:lang="pt_BR">Extrator de registro do Windows</comment>
<comment xml:lang="ro">Extras al registrului Windows</comment>
- <comment xml:lang="ru">фрагмент Windows Registry</comment>
+ <comment xml:lang="ru">Фрагмент Windows Registry</comment>
<comment xml:lang="sk">Časť registrov Windows</comment>
<comment xml:lang="sl">izvleček vpisnika Windows</comment>
<comment xml:lang="sq">Pjesë Windows Registry</comment>
@@ -34170,7 +35161,7 @@
<comment xml:lang="tr">Windows Kayıt Defteri özü</comment>
<comment xml:lang="uk">частина реєстру Windows</comment>
<comment xml:lang="vi">Bản trích Registry Windows</comment>
- <comment xml:lang="zh_CN">Windows 注册表文件</comment>
+ <comment xml:lang="zh_CN">Windows 注册表提取</comment>
<comment xml:lang="zh_TW">Windows Registry 抽出</comment>
<sub-class-of type="text/plain"/>
<magic priority="50">
@@ -34216,7 +35207,7 @@
<comment xml:lang="pt">formato Managed Object</comment>
<comment xml:lang="pt_BR">Formato de objeto gerenciado</comment>
<comment xml:lang="ro">Managed Object Format</comment>
- <comment xml:lang="ru">формат управляемого объекта</comment>
+ <comment xml:lang="ru">Формат управляемого объекта</comment>
<comment xml:lang="sk">Formát Managed Object</comment>
<comment xml:lang="sl">Datoteka Managed Object</comment>
<comment xml:lang="sq">Managed Object Format</comment>
@@ -34267,7 +35258,7 @@
<comment xml:lang="pt">publicação Mup</comment>
<comment xml:lang="pt_BR">Publicação do Mup</comment>
<comment xml:lang="ro">Publicație Mup</comment>
- <comment xml:lang="ru">публикация Mup</comment>
+ <comment xml:lang="ru">Публикация Mup</comment>
<comment xml:lang="sk">Publikácie Mup</comment>
<comment xml:lang="sl">Datoteka objave Mup</comment>
<comment xml:lang="sq">Publikim Mup</comment>
@@ -34291,7 +35282,7 @@
<comment xml:lang="be@latin">Kryničny kod Objective-C</comment>
<comment xml:lang="bg">Изходен код — Objective C</comment>
<comment xml:lang="ca">codi font en Objective-C</comment>
- <comment xml:lang="cs">zdrojový kód Objective-C</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce Objective-C</comment>
<comment xml:lang="da">Objektiv C-kildekode</comment>
<comment xml:lang="de">Objective-C-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας Objective-C</comment>
@@ -34308,7 +35299,7 @@
<comment xml:lang="hr">Objective-C izvorni kôd</comment>
<comment xml:lang="hu">Objective-C forráskód</comment>
<comment xml:lang="ia">Codice-fonte Objective-C</comment>
- <comment xml:lang="id">Kode program Objective-C</comment>
+ <comment xml:lang="id">Kode sumber Objective-C</comment>
<comment xml:lang="it">Codice sorgente Objective-C</comment>
<comment xml:lang="ja">Objective-C ソースコード</comment>
<comment xml:lang="ka">Objective-C-ის საწყისი კოდი</comment>
@@ -34325,7 +35316,7 @@
<comment xml:lang="pt">código origem Objective-C</comment>
<comment xml:lang="pt_BR">Código-fonte Objective-C</comment>
<comment xml:lang="ro">Cod sursă Objective-C</comment>
- <comment xml:lang="ru">исходный код Objective-C</comment>
+ <comment xml:lang="ru">Исходный код Objective-C</comment>
<comment xml:lang="sk">Zdrojový kód Objective-C</comment>
<comment xml:lang="sl">Datoteka izvorne kode Objective-C</comment>
<comment xml:lang="sq">Kod burues C objekt</comment>
@@ -34348,7 +35339,7 @@
<comment xml:lang="be@latin">Kryničny kod OCaml</comment>
<comment xml:lang="bg">Изходен код — OCaml</comment>
<comment xml:lang="ca">codi font en OCaml</comment>
- <comment xml:lang="cs">zdrojový kód OCaml</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce OCaml</comment>
<comment xml:lang="da">OCaml-kildekode</comment>
<comment xml:lang="de">OCaml-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας OCaml</comment>
@@ -34362,10 +35353,10 @@
<comment xml:lang="ga">cód foinseach OCaml</comment>
<comment xml:lang="gl">código fonte de OCaml</comment>
<comment xml:lang="he">קוד מקור של OCaml</comment>
- <comment xml:lang="hr">OCaml izvorni kod</comment>
+ <comment xml:lang="hr">OCaml izvorni kôd</comment>
<comment xml:lang="hu">OCaml forráskód</comment>
<comment xml:lang="ia">Codice-fonte OCaml</comment>
- <comment xml:lang="id">Kode program OCaml</comment>
+ <comment xml:lang="id">Kode sumber OCaml</comment>
<comment xml:lang="it">Codice sorgente OCaml</comment>
<comment xml:lang="ja">OCaml ソースコード</comment>
<comment xml:lang="kk">OCaml бастапқы коды</comment>
@@ -34380,7 +35371,7 @@
<comment xml:lang="pt">código origem OCaml</comment>
<comment xml:lang="pt_BR">Código-fonte OCaml</comment>
<comment xml:lang="ro">Cod sursă OCaml</comment>
- <comment xml:lang="ru">исходный код OCaml</comment>
+ <comment xml:lang="ru">Исходный код OCaml</comment>
<comment xml:lang="sk">Zdrojový kód OCaml</comment>
<comment xml:lang="sl">Datoteka izvorne kode OCaml</comment>
<comment xml:lang="sq">Kod burues OCaml</comment>
@@ -34394,6 +35385,33 @@
<glob pattern="*.ml"/>
<glob pattern="*.mli"/>
</mime-type>
+ <mime-type type="text/x-opencl-src">
+ <comment>OpenCL source code</comment>
+ <comment xml:lang="ca">codi font en OpenCL</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce OpenCL</comment>
+ <comment xml:lang="de">OpenCL-Quelltext</comment>
+ <comment xml:lang="en_GB">OpenCL source code</comment>
+ <comment xml:lang="es">código fuente en OpenCL</comment>
+ <comment xml:lang="fi">OpenCL-lähdekoodi</comment>
+ <comment xml:lang="hr">OpenCL izvorni kôd</comment>
+ <comment xml:lang="hu">OpenCL forráskód</comment>
+ <comment xml:lang="id">Kode sumber OpenCL</comment>
+ <comment xml:lang="it">Codice sorgente OpenCL</comment>
+ <comment xml:lang="kk">OpenCL бастапқы коды</comment>
+ <comment xml:lang="ko">OpenCL 소스 코드</comment>
+ <comment xml:lang="pl">Kod źródłowy OpenCL</comment>
+ <comment xml:lang="pt_BR">Código-fonte do OpenCL</comment>
+ <comment xml:lang="ru">Исходный код OpenGL</comment>
+ <comment xml:lang="sk">Zdrojový kód OpenCL</comment>
+ <comment xml:lang="sv">OpenCL-källkod</comment>
+ <comment xml:lang="uk">вихідний код мовою OpenCL</comment>
+ <comment xml:lang="zh_CN">OpenCL 源代码</comment>
+ <comment xml:lang="zh_TW">OpenCL 源碼</comment>
+ <acronym>OpenCL</acronym>
+ <expanded-acronym>Open Computing Language</expanded-acronym>
+ <sub-class-of type="text/x-csrc"/>
+ <glob pattern="*.cl"/>
+ </mime-type>
<mime-type type="text/x-matlab">
<comment>MATLAB script/function</comment>
<comment xml:lang="ar">سكربت/وظيفة MATLAB</comment>
@@ -34431,7 +35449,7 @@
<comment xml:lang="pt">script/função MATLAB</comment>
<comment xml:lang="pt_BR">Script/função do MATLAB</comment>
<comment xml:lang="ro">Funcție/script MATLAB</comment>
- <comment xml:lang="ru">сценарий/функция MATLAB</comment>
+ <comment xml:lang="ru">Сценарий/функция MATLAB</comment>
<comment xml:lang="sk">Skript/funkcia MATLAB</comment>
<comment xml:lang="sl">Skriptna datoteka MATLAB</comment>
<comment xml:lang="sq">Script/Funksion MATLAB</comment>
@@ -34467,11 +35485,12 @@
<comment xml:lang="eu">Meson iturburu-kodea</comment>
<comment xml:lang="fi">Meson-lähdekoodi</comment>
<comment xml:lang="fr">code source Meson</comment>
+ <comment xml:lang="ga">cód foinseach Meson</comment>
<comment xml:lang="he">קוד מקור Meson</comment>
<comment xml:lang="hr">Meson izvorni kôd</comment>
<comment xml:lang="hu">Meson forráskód</comment>
<comment xml:lang="ia">Codice-fonte Meson</comment>
- <comment xml:lang="id">Kode program Meson</comment>
+ <comment xml:lang="id">Kode sumber Meson</comment>
<comment xml:lang="it">Codice sorgente Meson</comment>
<comment xml:lang="kk">Meson бастапқы коды</comment>
<comment xml:lang="ko">Meson 소스 코드</comment>
@@ -34479,7 +35498,7 @@
<comment xml:lang="pl">Kod źródłowy Meson</comment>
<comment xml:lang="pt">código origem Meson</comment>
<comment xml:lang="pt_BR">Código-fonte Meson</comment>
- <comment xml:lang="ru">исходный код Meson</comment>
+ <comment xml:lang="ru">Исходный код Meson</comment>
<comment xml:lang="sk">Zdrojový kód Meson</comment>
<comment xml:lang="sr">Месон изворни ко̂д</comment>
<comment xml:lang="sv">Meson-källkod</comment>
@@ -34503,6 +35522,7 @@
<comment xml:lang="eu">Modelica modeloa</comment>
<comment xml:lang="fi">Modelica-malli</comment>
<comment xml:lang="fr">modèle Modelica</comment>
+ <comment xml:lang="ga">samhail Modelica</comment>
<comment xml:lang="gl">Modelo de Modelica</comment>
<comment xml:lang="he">דגם של Modelica</comment>
<comment xml:lang="hr">Modelica model</comment>
@@ -34518,7 +35538,7 @@
<comment xml:lang="pl">Model Modelica</comment>
<comment xml:lang="pt">modelo Modelica</comment>
<comment xml:lang="pt_BR">Modelo da Modelica</comment>
- <comment xml:lang="ru">модель Modelica</comment>
+ <comment xml:lang="ru">Модель Modelica</comment>
<comment xml:lang="sk">Model Modelica</comment>
<comment xml:lang="sl">Model Modelica</comment>
<comment xml:lang="sr">модел Моделике</comment>
@@ -34551,7 +35571,7 @@
<comment xml:lang="be@latin">Kryničny kod Pascal</comment>
<comment xml:lang="bg">Изходен код — Pascal</comment>
<comment xml:lang="ca">codi font en Pascal</comment>
- <comment xml:lang="cs">zdrojový kód Pascal</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce Pascal</comment>
<comment xml:lang="da">Pascalkildekode</comment>
<comment xml:lang="de">Pascal-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας Pascal</comment>
@@ -34568,7 +35588,7 @@
<comment xml:lang="hr">Pascal izvorni kôd</comment>
<comment xml:lang="hu">Pascal-forráskód</comment>
<comment xml:lang="ia">Codice-fonte Pascal</comment>
- <comment xml:lang="id">Kode program Pascal</comment>
+ <comment xml:lang="id">Kode sumber Pascal</comment>
<comment xml:lang="it">Codice sorgente Pascal</comment>
<comment xml:lang="ja">Pascal ソースコード</comment>
<comment xml:lang="kk">Pascal бастапқы коды</comment>
@@ -34584,7 +35604,7 @@
<comment xml:lang="pt">código origem Pascal</comment>
<comment xml:lang="pt_BR">Código-fonte Pascal</comment>
<comment xml:lang="ro">Cod sursă Pascal</comment>
- <comment xml:lang="ru">исходный код Pascal</comment>
+ <comment xml:lang="ru">Исходный код Pascal</comment>
<comment xml:lang="sk">Zdrojový kód Pascal</comment>
<comment xml:lang="sl">Datoteka izvorne kode Pascal</comment>
<comment xml:lang="sq">Kod burues Pascal</comment>
@@ -34619,7 +35639,7 @@
<comment xml:lang="ga">difríochtaí idir chomhaid</comment>
<comment xml:lang="gl">diferenzas entre ficheiros</comment>
<comment xml:lang="he">הבדל בין קבצים</comment>
- <comment xml:lang="hr">razlike između datoteka</comment>
+ <comment xml:lang="hr">Razlike između datoteka</comment>
<comment xml:lang="hu">diff-különbségfájl</comment>
<comment xml:lang="ia">Differentias inter files</comment>
<comment xml:lang="id">perbedaan diantara berkas</comment>
@@ -34638,7 +35658,7 @@
<comment xml:lang="pt">diferenças entre ficheiros</comment>
<comment xml:lang="pt_BR">Diferenças entre arquivos</comment>
<comment xml:lang="ro">diferențe între fișiere</comment>
- <comment xml:lang="ru">различия между файлами</comment>
+ <comment xml:lang="ru">Различия между файлами</comment>
<comment xml:lang="sk">Rozdiely medzi súbormi</comment>
<comment xml:lang="sl">razlike med datotekami</comment>
<comment xml:lang="sq">Diferencë midis file</comment>
@@ -34670,7 +35690,7 @@
<comment>Go source code</comment>
<comment xml:lang="bg">Изходен код — Go</comment>
<comment xml:lang="ca">codi font en Go</comment>
- <comment xml:lang="cs">zdrojový kód Go</comment>
+ <comment xml:lang="cs">zdrojový kód v jazyce Go</comment>
<comment xml:lang="da">Go-kildekode</comment>
<comment xml:lang="de">Go-Quelltext</comment>
<comment xml:lang="el">Πηγαίος κώδικας Go</comment>
@@ -34680,9 +35700,10 @@
<comment xml:lang="eu">Go iturburu-kodea</comment>
<comment xml:lang="fi">Go-lähdekoodi</comment>
<comment xml:lang="fr">code source Go</comment>
+ <comment xml:lang="ga">cód foinseach Go</comment>
<comment xml:lang="gl">código fonte de Go</comment>
<comment xml:lang="he">קוד מקור של Go</comment>
- <comment xml:lang="hr">Go izvorni kod</comment>
+ <comment xml:lang="hr">Go izvorni kôd</comment>
<comment xml:lang="hu">Go forráskód</comment>
<comment xml:lang="ia">Codice-fonte Go</comment>
<comment xml:lang="id">Kode sumber Go</comment>
@@ -34697,14 +35718,14 @@
<comment xml:lang="pl">Kod źródłowy Go</comment>
<comment xml:lang="pt">cigo origem Go</comment>
<comment xml:lang="pt_BR">Código-fonte Go</comment>
- <comment xml:lang="ru">исходный код Go</comment>
+ <comment xml:lang="ru">Исходный код Go</comment>
<comment xml:lang="sk">Zdrojový kód Go</comment>
<comment xml:lang="sl">Izvorna koda Go</comment>
<comment xml:lang="sr">Гоу изворни ко̂д</comment>
<comment xml:lang="sv">Go-källkod</comment>
<comment xml:lang="tr">Go kaynak kodu</comment>
<comment xml:lang="uk">вихідний код мовою Go</comment>
- <comment xml:lang="zh_CN">Go </comment>
+ <comment xml:lang="zh_CN">Go 源代码</comment>
<comment xml:lang="zh_TW">Go 源碼</comment>
<sub-class-of type="text/plain"/>
<glob pattern="*.go"/>
@@ -34721,6 +35742,7 @@
<comment xml:lang="eu">SCons konfigurazio-fitxategia</comment>
<comment xml:lang="fi">SCons-asetustiedosto</comment>
<comment xml:lang="fr">fichier de configuration SCons</comment>
+ <comment xml:lang="ga">comhad cumraíochta SCons</comment>
<comment xml:lang="he">קובץ תצורה של SCons</comment>
<comment xml:lang="hr">SCons datoteka podešavanja</comment>
<comment xml:lang="hu">SCons beállítófájl</comment>
@@ -34733,7 +35755,7 @@
<comment xml:lang="pl">Plik konfiguracji SCons</comment>
<comment xml:lang="pt">ficheiro de configuração SCons</comment>
<comment xml:lang="pt_BR">Arquivo de configuração do SCons</comment>
- <comment xml:lang="ru">файл настроек SCons</comment>
+ <comment xml:lang="ru">Файл настроек SCons</comment>
<comment xml:lang="sk">Konfiguračný súbor SCons</comment>
<comment xml:lang="sl">Prilagoditvena datoteka SCons</comment>
<comment xml:lang="sr">СКонс датотека подешавања</comment>
@@ -34747,13 +35769,52 @@
<glob pattern="SConscript"/>
<glob pattern="SConscript.*"/>
</mime-type>
+ <mime-type type="text/x-python3">
+ <comment>Python 3 script</comment>
+ <comment xml:lang="ca">script Python 3</comment>
+ <comment xml:lang="cs">skript v jazyce Python 3</comment>
+ <comment xml:lang="de">Python-3-Skript</comment>
+ <comment xml:lang="en_GB">Python 3 script</comment>
+ <comment xml:lang="es">secuencia de órdenes en Python 3</comment>
+ <comment xml:lang="fi">Python 3 -skripti</comment>
+ <comment xml:lang="hr">Python3 skripta</comment>
+ <comment xml:lang="hu">Python 3 parancsfájl</comment>
+ <comment xml:lang="id">Skrip Python 3</comment>
+ <comment xml:lang="it">Script Python 3</comment>
+ <comment xml:lang="kk">Python 3 скрипті</comment>
+ <comment xml:lang="ko">파이썬 3 스크립트</comment>
+ <comment xml:lang="pl">Skrypt Python 3</comment>
+ <comment xml:lang="pt_BR">Script Python 3</comment>
+ <comment xml:lang="ru">Сценарий Python 3</comment>
+ <comment xml:lang="sk">Skript Python 3</comment>
+ <comment xml:lang="sv">Python 3-skript</comment>
+ <comment xml:lang="uk">скрипт мовою Python 3</comment>
+ <comment xml:lang="zh_CN">Python 3 脚本</comment>
+ <comment xml:lang="zh_TW">Python 3 指令稿</comment>
+ <sub-class-of type='text/x-python'/>
+ <magic priority="60">
+ <match value="#!/bin/python3" type="string" offset="0"/>
+ <match value="#! /bin/python3" type="string" offset="0"/>
+ <match value='eval \"exec /bin/python3' type="string" offset="0"/>
+ <match value="#!/usr/bin/python3" type="string" offset="0"/>
+ <match value="#! /usr/bin/python3" type="string" offset="0"/>
+ <match value='eval \"exec /usr/bin/python3' type="string" offset="0"/>
+ <match value="#!/usr/local/bin/python3" type="string" offset="0"/>
+ <match value="#! /usr/local/bin/python3" type="string" offset="0"/>
+ <match value='eval \"exec /usr/local/bin/python3' type="string" offset="0"/>
+ <match value='/bin/env python3' type="string" offset="2:16"/>
+ </magic>
+ <glob weight="50" pattern="*.py"/>
+ <glob weight="60" pattern="*.py3"/>
+ <glob weight="60" pattern="*.py3x"/>
+ </mime-type>
<mime-type type="text/x-python">
<comment>Python script</comment>
<comment xml:lang="ar">سكربت بايثون</comment>
<comment xml:lang="be@latin">Skrypt Python</comment>
<comment xml:lang="bg">Скрипт — Python</comment>
<comment xml:lang="ca">script Python</comment>
- <comment xml:lang="cs">skript Python</comment>
+ <comment xml:lang="cs">skript v jazyce Python</comment>
<comment xml:lang="da">Pythonprogram</comment>
<comment xml:lang="de">Python-Skript</comment>
<comment xml:lang="el">Δέσμη ενεργειών Python</comment>
@@ -34786,7 +35847,7 @@
<comment xml:lang="pt">script Python</comment>
<comment xml:lang="pt_BR">Script Python</comment>
<comment xml:lang="ro">Script Python</comment>
- <comment xml:lang="ru">сценарий Python</comment>
+ <comment xml:lang="ru">Сценарий Python</comment>
<comment xml:lang="sk">Skript Python</comment>
<comment xml:lang="sl">Skriptna datoteka Python</comment>
<comment xml:lang="sq">Script Python</comment>
@@ -34811,9 +35872,9 @@
<match value='eval \"exec /usr/local/bin/python' type="string" offset="0"/>
<match value='/bin/env python' type="string" offset="2:16"/>
</magic>
- <glob pattern="*.py"/>
- <glob pattern="*.pyx"/>
- <glob pattern="*.wsgi"/>
+ <glob weight="60" pattern="*.py"/>
+ <glob weight="60" pattern="*.pyx"/>
+ <glob weight="60" pattern="*.wsgi"/>
</mime-type>
<mime-type type="text/x-lua">
<comment>Lua script</comment>
@@ -34821,7 +35882,7 @@
<comment xml:lang="be@latin">Skrypt Lua</comment>
<comment xml:lang="bg">Скрипт на Lua</comment>
<comment xml:lang="ca">script Lua</comment>
- <comment xml:lang="cs">skript Lua</comment>
+ <comment xml:lang="cs">skript v jazyce Lua</comment>
<comment xml:lang="da">Luaprogram</comment>
<comment xml:lang="de">Lua-Skript</comment>
<comment xml:lang="el">Δέσμη ενεργειών Lua</comment>
@@ -34853,7 +35914,7 @@
<comment xml:lang="pt">script Lua</comment>
<comment xml:lang="pt_BR">Script Lua</comment>
<comment xml:lang="ro">Script Lua</comment>
- <comment xml:lang="ru">сценарий Lua</comment>
+ <comment xml:lang="ru">Сценарий Lua</comment>
<comment xml:lang="sk">Skript Lua</comment>
<comment xml:lang="sl">Skriptna datoteka Lua</comment>
<comment xml:lang="sq">Script Lua</comment>
@@ -34877,6 +35938,7 @@
<mime-type type="text/x-readme">
<comment>README document</comment>
<comment xml:lang="ar">مستند README</comment>
+ <comment xml:lang="ast">Documentu LLEIME</comment>
<comment xml:lang="az">README sənədi</comment>
<comment xml:lang="be@latin">Dakument README</comment>
<comment xml:lang="bg">Документ — „Да се прочете“</comment>
@@ -34915,7 +35977,7 @@
<comment xml:lang="pt">documento LEIA-ME</comment>
<comment xml:lang="pt_BR">Documento README</comment>
<comment xml:lang="ro">Document README</comment>
- <comment xml:lang="ru">документ README</comment>
+ <comment xml:lang="ru">Документ README</comment>
<comment xml:lang="sk">Dokument README</comment>
<comment xml:lang="sl">Dokument README</comment>
<comment xml:lang="sq">Dokument README</comment>
@@ -34932,6 +35994,7 @@
<mime-type type="text/x-nfo">
<comment>NFO document</comment>
<comment xml:lang="ar">مستند NFO</comment>
+ <comment xml:lang="ast">Documentu NFO</comment>
<comment xml:lang="be@latin">Dakument NFO</comment>
<comment xml:lang="bg">Документ — NFO</comment>
<comment xml:lang="ca">document NFO</comment>
@@ -34967,7 +36030,7 @@
<comment xml:lang="pt">documento NFO</comment>
<comment xml:lang="pt_BR">Documento NFO</comment>
<comment xml:lang="ro">Document NFO</comment>
- <comment xml:lang="ru">документ NFO</comment>
+ <comment xml:lang="ru">Документ NFO</comment>
<comment xml:lang="sk">Dokument NFO</comment>
<comment xml:lang="sl">Dokument NFO</comment>
<comment xml:lang="sq">Dokument NFO</comment>
@@ -35018,7 +36081,7 @@
<comment xml:lang="pt">ficheiro de especificações RPM</comment>
<comment xml:lang="pt_BR">Arquivo de especificação RPM</comment>
<comment xml:lang="ro">Fișier RPM spec</comment>
- <comment xml:lang="ru">файл описания RPM</comment>
+ <comment xml:lang="ru">Файл описания RPM</comment>
<comment xml:lang="sk">Súbor RPM spec</comment>
<comment xml:lang="sl">Določilna datoteka RPM</comment>
<comment xml:lang="sq">File specifikimi RPM</comment>
@@ -35041,18 +36104,27 @@
<mime-type type="text/x-sass">
<comment>Sass CSS pre-processor file</comment>
<comment xml:lang="ca">fitxer preprocessador CSS Sass</comment>
+ <comment xml:lang="cs">soubor preprocesoru Sass CSS</comment>
<comment xml:lang="da">Sass CSS-forbrænderfil</comment>
<comment xml:lang="de">Sass-CSS-Präprozessordatei</comment>
+ <comment xml:lang="en_GB">Sass CSS pre-processor file</comment>
<comment xml:lang="es">archivo de preprocesador de CSS Sass</comment>
<comment xml:lang="fr">fichier de prétraitement CSS Sass</comment>
+ <comment xml:lang="ga">comhad réamhphróiseálaí CSS Sass</comment>
<comment xml:lang="he">קובץ קדם עיבוד Sass CSS</comment>
+ <comment xml:lang="hr">Sass CSS datoteka predobrade</comment>
<comment xml:lang="hu">Sass CSS előfeldolgozó fájl</comment>
+ <comment xml:lang="id">berkas pre-processor Sass CSS</comment>
+ <comment xml:lang="it">File CSS Sass</comment>
<comment xml:lang="kk">Sass CSS препроцессор файлы</comment>
<comment xml:lang="ko">Sass CSS 전처리기 파일</comment>
<comment xml:lang="pl">Plik preprocesora CSS Sass</comment>
<comment xml:lang="pt_BR">Arquivo de pré-processamento Sass CSS</comment>
- <comment xml:lang="ru">файл препроцессора Sass CSS</comment>
+ <comment xml:lang="ru">Файл препроцессора Sass CSS</comment>
<comment xml:lang="sk">Súbor Sass CSS pre-procesora</comment>
+ <comment xml:lang="sr">датотека Сас ЦСС пре-процесора</comment>
+ <comment xml:lang="sv">Sass CSS-preprocessorfil</comment>
+ <comment xml:lang="tr">Sass CSS önişlemci dosyası</comment>
<comment xml:lang="uk">файл препроцесора CSS Sass</comment>
<comment xml:lang="zh_CN">Sass CSS 预处理器文件</comment>
<comment xml:lang="zh_TW">Sass CSS 處理器前檔案</comment>
@@ -35073,9 +36145,10 @@
<comment xml:lang="eu">Scala iturburu-kodea</comment>
<comment xml:lang="fi">Scala-lähdekoodi</comment>
<comment xml:lang="fr">code source Scala</comment>
+ <comment xml:lang="ga">cód foinseach Scala</comment>
<comment xml:lang="gl">código fnote en Scala</comment>
<comment xml:lang="he">קוד מקור של Scala</comment>
- <comment xml:lang="hr">Scala izvorni kod</comment>
+ <comment xml:lang="hr">Scala izvorni kôd</comment>
<comment xml:lang="hu">Scala forráskód</comment>
<comment xml:lang="ia">Codice-fonte Scala</comment>
<comment xml:lang="id">Kode sumber Scala</comment>
@@ -35090,7 +36163,7 @@
<comment xml:lang="pl">Kod źródłowy Scala</comment>
<comment xml:lang="pt">código origem Scala</comment>
<comment xml:lang="pt_BR">Código-fonte Scala</comment>
- <comment xml:lang="ru">исходный код Scala</comment>
+ <comment xml:lang="ru">Исходный код Scala</comment>
<comment xml:lang="sk">Zdrojový kód Scala</comment>
<comment xml:lang="sl">Izvorna koda Scala</comment>
<comment xml:lang="sr">Скала изворни ко̂д</comment>
@@ -35124,7 +36197,7 @@
<comment xml:lang="ga">cód foinseach Scheme</comment>
<comment xml:lang="gl">código fonte en Scheme</comment>
<comment xml:lang="he">קוד מקור של Scheme</comment>
- <comment xml:lang="hr">Scheme izvorni kod</comment>
+ <comment xml:lang="hr">Scheme izvorni kôd</comment>
<comment xml:lang="hu">Scheme-forráskód</comment>
<comment xml:lang="ia">Codice-fonte Scheme</comment>
<comment xml:lang="id">Kode program Scheme</comment>
@@ -35143,7 +36216,7 @@
<comment xml:lang="pt">código origem Scheme</comment>
<comment xml:lang="pt_BR">Código-fonte Scheme</comment>
<comment xml:lang="ro">Cod sursă Scheme</comment>
- <comment xml:lang="ru">исходный код Scheme</comment>
+ <comment xml:lang="ru">Исходный код Scheme</comment>
<comment xml:lang="sk">Zdrojový kód Scheme</comment>
<comment xml:lang="sl">Datoteka izvorne kode Scheme</comment>
<comment xml:lang="sq">Kod burues Scheme</comment>
@@ -35161,18 +36234,27 @@
<mime-type type="text/x-scss">
<comment>Sass CSS pre-processor file</comment>
<comment xml:lang="ca">fitxer preprocessador CSS Sass</comment>
+ <comment xml:lang="cs">soubor preprocesoru Sass CSS</comment>
<comment xml:lang="da">Sass CSS-forbrænderfil</comment>
<comment xml:lang="de">Sass-CSS-Präprozessordatei</comment>
+ <comment xml:lang="en_GB">Sass CSS pre-processor file</comment>
<comment xml:lang="es">archivo de preprocesador de CSS Sass</comment>
<comment xml:lang="fr">fichier de prétraitement CSS Sass</comment>
+ <comment xml:lang="ga">comhad réamhphróiseálaí CSS Sass</comment>
<comment xml:lang="he">קובץ קדם עיבוד Sass CSS</comment>
+ <comment xml:lang="hr">Sass CSS datoteka predobrade</comment>
<comment xml:lang="hu">Sass CSS előfeldolgozó fájl</comment>
+ <comment xml:lang="id">berkas pre-processor Sass CSS</comment>
+ <comment xml:lang="it">File CSS Sass</comment>
<comment xml:lang="kk">Sass CSS препроцессор файлы</comment>
<comment xml:lang="ko">Sass CSS 전처리기 파일</comment>
<comment xml:lang="pl">Plik preprocesora CSS Sass</comment>
<comment xml:lang="pt_BR">Arquivo de pré-processamento Sass CSS</comment>
- <comment xml:lang="ru">файл препроцессора Sass CSS</comment>
+ <comment xml:lang="ru">Файл препроцессора Sass CSS</comment>
<comment xml:lang="sk">Súbor Sass CSS pre-procesora</comment>
+ <comment xml:lang="sr">датотека Сас ЦСС пре-процесора</comment>
+ <comment xml:lang="sv">Sass CSS-preprocessorfil</comment>
+ <comment xml:lang="tr">Sass CSS önişlemci dosyası</comment>
<comment xml:lang="uk">файл препроцесора CSS Sass</comment>
<comment xml:lang="zh_CN">Sass CSS 预处理器文件</comment>
<comment xml:lang="zh_TW">Sass CSS 處理器前檔案</comment>
@@ -35183,6 +36265,7 @@
<mime-type type="text/x-setext">
<comment>Setext document</comment>
<comment xml:lang="ar">مستند Setext</comment>
+ <comment xml:lang="ast">Documentu Setext</comment>
<comment xml:lang="az">Setext sənədi</comment>
<comment xml:lang="be@latin">Dakument Setext</comment>
<comment xml:lang="bg">Документ — Setext</comment>
@@ -35221,7 +36304,7 @@
<comment xml:lang="pt">documento Setext</comment>
<comment xml:lang="pt_BR">Documento Setext</comment>
<comment xml:lang="ro">Document Setext</comment>
- <comment xml:lang="ru">документ Setext</comment>
+ <comment xml:lang="ru">Документ Setext</comment>
<comment xml:lang="sk">Dokument Setext</comment>
<comment xml:lang="sl">Dokument Setext</comment>
<comment xml:lang="sq">Dokument Setext</comment>
@@ -35257,7 +36340,7 @@
<comment xml:lang="ga">cód SQL</comment>
<comment xml:lang="gl">código SQL</comment>
<comment xml:lang="he">קוד SQL</comment>
- <comment xml:lang="hr">SQL kod</comment>
+ <comment xml:lang="hr">SQL kôd</comment>
<comment xml:lang="hu">SQL-kód</comment>
<comment xml:lang="ia">Codice SQL</comment>
<comment xml:lang="id">Kode SQL</comment>
@@ -35276,7 +36359,7 @@
<comment xml:lang="pt">código SQL</comment>
<comment xml:lang="pt_BR">Código SQL</comment>
<comment xml:lang="ro">Cod SQL</comment>
- <comment xml:lang="ru">код SQL</comment>
+ <comment xml:lang="ru">Код SQL</comment>
<comment xml:lang="sk">Kód SQL</comment>
<comment xml:lang="sl">Datoteka kode SQL</comment>
<comment xml:lang="sq">Kod SQL</comment>
@@ -35330,7 +36413,7 @@
<comment xml:lang="pt">script Tcl</comment>
<comment xml:lang="pt_BR">Script Tcl</comment>
<comment xml:lang="ro">Script Tcl</comment>
- <comment xml:lang="ru">сценарий Tcl</comment>
+ <comment xml:lang="ru">Сценарий Tcl</comment>
<comment xml:lang="sk">Skript Tcl</comment>
<comment xml:lang="sl">Skriptna datoteka Tcl</comment>
<comment xml:lang="sq">Script Tcl</comment>
@@ -35348,6 +36431,7 @@
<mime-type type="text/x-tex">
<comment>TeX document</comment>
<comment xml:lang="ar">مستند TeX</comment>
+ <comment xml:lang="ast">Documentu TeX</comment>
<comment xml:lang="be@latin">Dakument TeX</comment>
<comment xml:lang="bg">Документ — TeX</comment>
<comment xml:lang="ca">document TeX</comment>
@@ -35385,7 +36469,7 @@
<comment xml:lang="pt">documento TeX</comment>
<comment xml:lang="pt_BR">Documento TeX</comment>
<comment xml:lang="ro">Document TeX</comment>
- <comment xml:lang="ru">документ TeX</comment>
+ <comment xml:lang="ru">Документ TeX</comment>
<comment xml:lang="sk">Dokument TeX</comment>
<comment xml:lang="sl">Dokument TeX</comment>
<comment xml:lang="sq">Dokument TeX</comment>
@@ -35415,6 +36499,7 @@
<mime-type type="text/x-texinfo">
<comment>TeXInfo document</comment>
<comment xml:lang="ar">مستند TeXInfo</comment>
+ <comment xml:lang="ast">Documentu TeXInfo</comment>
<comment xml:lang="az">TeXInfo sənədi</comment>
<comment xml:lang="be@latin">Dakument TeXInfo</comment>
<comment xml:lang="bg">Документ — TeXInfo</comment>
@@ -35453,7 +36538,7 @@
<comment xml:lang="pt">documento TeXInfo</comment>
<comment xml:lang="pt_BR">Documento TeXInfo</comment>
<comment xml:lang="ro">Document TexInfo</comment>
- <comment xml:lang="ru">документ TeXInfo</comment>
+ <comment xml:lang="ru">Документ TeXInfo</comment>
<comment xml:lang="sk">Dokument TeXInfo</comment>
<comment xml:lang="sl">Dokument TeXInfo</comment>
<comment xml:lang="sq">Dokument TeXInfo</comment>
@@ -35471,6 +36556,7 @@
<mime-type type="text/x-troff-me">
<comment>Troff ME input document</comment>
<comment xml:lang="ar">مستند Troff ME input</comment>
+ <comment xml:lang="ast">Documentu d'entrada de Troff ME</comment>
<comment xml:lang="be@latin">Uvodny dakument Troff ME</comment>
<comment xml:lang="bg">Изходен документ — Troff ME</comment>
<comment xml:lang="ca">document d'entrada Troff ME</comment>
@@ -35485,7 +36571,7 @@
<comment xml:lang="fi">Troff ME -syöteasiakirja</comment>
<comment xml:lang="fo">Troff ME inntaksskjal</comment>
<comment xml:lang="fr">document d'entrée Troff ME</comment>
- <comment xml:lang="ga">cáipéis ionchur Troff ME</comment>
+ <comment xml:lang="ga">cáipéis ionchurtha Troff ME</comment>
<comment xml:lang="gl">documento de entrada Troff ME</comment>
<comment xml:lang="he">מסמך קלט של Troff ME</comment>
<comment xml:lang="hr">Troff ME ulazni dokument</comment>
@@ -35507,7 +36593,7 @@
<comment xml:lang="pt">documento origem Troff ME</comment>
<comment xml:lang="pt_BR">Documento de entrada Troff ME</comment>
<comment xml:lang="ro">Document intrare Troff ME</comment>
- <comment xml:lang="ru">входной документ Troff ME</comment>
+ <comment xml:lang="ru">Входной документ Troff ME</comment>
<comment xml:lang="sk">Vstupný dokument Troff ME</comment>
<comment xml:lang="sl">Vnosni dokument Troff ME</comment>
<comment xml:lang="sq">Dokument i input Troff ME</comment>
@@ -35524,6 +36610,7 @@
<mime-type type="text/x-troff-mm">
<comment>Troff MM input document</comment>
<comment xml:lang="ar">مستند Troff MM input</comment>
+ <comment xml:lang="ast">Documentu d'entrada de Troff MM</comment>
<comment xml:lang="be@latin">Uvodny dakument Troff MM</comment>
<comment xml:lang="bg">Изходен документ — Troff MM</comment>
<comment xml:lang="ca">document d'entrada Troff MM</comment>
@@ -35538,7 +36625,7 @@
<comment xml:lang="fi">Troff MM -syöteasiakirja</comment>
<comment xml:lang="fo">Troff MM inntaksskjal</comment>
<comment xml:lang="fr">document d'entrée Troff MM</comment>
- <comment xml:lang="ga">cáipéis ionchur Troff MM</comment>
+ <comment xml:lang="ga">cáipéis ionchurtha Troff MM</comment>
<comment xml:lang="gl">documento de entrada Troff MM</comment>
<comment xml:lang="he">מסמך קלט של Troff MM</comment>
<comment xml:lang="hr">Troff MM ulazni dokument</comment>
@@ -35560,7 +36647,7 @@
<comment xml:lang="pt">documento origem Troff MM</comment>
<comment xml:lang="pt_BR">Documento de entrada Troff MM</comment>
<comment xml:lang="ro">Document intrare Troff MM</comment>
- <comment xml:lang="ru">входной документ Troff MM</comment>
+ <comment xml:lang="ru">Входной документ Troff MM</comment>
<comment xml:lang="sk">Vstupný dokument Troff MM</comment>
<comment xml:lang="sl">Vnosni dokument Troff MM</comment>
<comment xml:lang="sq">Dokument i input Troff MM</comment>
@@ -35577,6 +36664,7 @@
<mime-type type="text/x-troff-ms">
<comment>Troff MS input document</comment>
<comment xml:lang="ar">مستند Troff MS input</comment>
+ <comment xml:lang="ast">Documentu d'entrada de Troff MS</comment>
<comment xml:lang="be@latin">Uvodny dakument Troff MS</comment>
<comment xml:lang="bg">Изходен документ — Troff MS</comment>
<comment xml:lang="ca">document d'entrada Troff MS</comment>
@@ -35591,7 +36679,7 @@
<comment xml:lang="fi">Troff MS -syöteasiakirja</comment>
<comment xml:lang="fo">Troff MS inntaksskjal</comment>
<comment xml:lang="fr">document d'entrée Troff MS</comment>
- <comment xml:lang="ga">cáipéis ionchur Troff MS</comment>
+ <comment xml:lang="ga">cáipéis ionchurtha Troff MS</comment>
<comment xml:lang="gl">documento de entrada Troff MS</comment>
<comment xml:lang="he">מסמך קלט של Troff MS</comment>
<comment xml:lang="hr">Troff MS ulazni dokument</comment>
@@ -35613,7 +36701,7 @@
<comment xml:lang="pt">documento origem Troff MS</comment>
<comment xml:lang="pt_BR">Documento de entrada Troff MS</comment>
<comment xml:lang="ro">Document intrare Troff MS</comment>
- <comment xml:lang="ru">входной документ Troff MS</comment>
+ <comment xml:lang="ru">Входной документ Troff MS</comment>
<comment xml:lang="sk">Vstupný dokument Troff MS</comment>
<comment xml:lang="sl">Vnosni dokument Troff MS</comment>
<comment xml:lang="sq">Dokument i input Troff MS</comment>
@@ -35630,18 +36718,28 @@
<mime-type type="text/x-twig">
<comment>Twig template</comment>
<comment xml:lang="ca">plantilla Twig</comment>
+ <comment xml:lang="cs">šablona Twig</comment>
<comment xml:lang="da">Twig-skabelon</comment>
<comment xml:lang="de">Twig-Vorlage</comment>
+ <comment xml:lang="en_GB">Twig template</comment>
<comment xml:lang="es">plantilla de Twig</comment>
+ <comment xml:lang="eu">Twig txantiloia</comment>
<comment xml:lang="fr">modèle Twig</comment>
+ <comment xml:lang="ga">teimpléad Twig</comment>
<comment xml:lang="he">תבנית Twig</comment>
+ <comment xml:lang="hr">Twig predložak</comment>
<comment xml:lang="hu">Twig-sablon</comment>
+ <comment xml:lang="id">templat Twig</comment>
+ <comment xml:lang="it">Modello twig</comment>
<comment xml:lang="kk">Twig үлгісі</comment>
<comment xml:lang="ko">Twig 문서 서식</comment>
<comment xml:lang="pl">Szablon Twig</comment>
<comment xml:lang="pt_BR">Modelo Twig</comment>
- <comment xml:lang="ru">шаблон Twig</comment>
+ <comment xml:lang="ru">Шаблон Twig</comment>
<comment xml:lang="sk">Šablóna Twig</comment>
+ <comment xml:lang="sr">Твиг шаблон</comment>
+ <comment xml:lang="sv">Twig-mall</comment>
+ <comment xml:lang="tr">Twig şablonu</comment>
<comment xml:lang="uk">шаблон twig</comment>
<comment xml:lang="zh_CN">Twig 模板</comment>
<comment xml:lang="zh_TW">Twig 範本</comment>
@@ -35687,7 +36785,7 @@
<comment xml:lang="pt">tabela UIL do X-Motif</comment>
<comment xml:lang="pt_BR">Tabela UIL do X-Motif</comment>
<comment xml:lang="ro">Tabel X-Motif UIL</comment>
- <comment xml:lang="ru">таблица UIL X-Motif</comment>
+ <comment xml:lang="ru">Таблица UIL X-Motif</comment>
<comment xml:lang="sk">Tabuľka X-Motif UIL</comment>
<comment xml:lang="sl">Preglednica X-Motif UIL</comment>
<comment xml:lang="sq">Tabelë X-Motif UIL</comment>
@@ -35721,7 +36819,7 @@
<comment xml:lang="ga">suíomh acmhainne</comment>
<comment xml:lang="gl">localización do recurso</comment>
<comment xml:lang="he">מיקום של משאב</comment>
- <comment xml:lang="hr">položaj resursa</comment>
+ <comment xml:lang="hr">Lokacija resursa</comment>
<comment xml:lang="hu">erőforrás-hely</comment>
<comment xml:lang="ia">Loco de ressources</comment>
<comment xml:lang="id">lokasi sumber daya</comment>
@@ -35740,7 +36838,7 @@
<comment xml:lang="pt">localização de recurso</comment>
<comment xml:lang="pt_BR">Localização de recurso</comment>
<comment xml:lang="ro">locație de resursă</comment>
- <comment xml:lang="ru">расположение ресурса</comment>
+ <comment xml:lang="ru">Расположение ресурса</comment>
<comment xml:lang="sk">Umiestnenie zdroja</comment>
<comment xml:lang="sl">mesto vira</comment>
<comment xml:lang="sq">Pozicion rezerve</comment>
@@ -35765,6 +36863,7 @@
<comment xml:lang="es">archivo codificado con uuencode</comment>
<comment xml:lang="eu">uuencode-aturiko fitxategia</comment>
<comment xml:lang="fr">fichier uuencodé</comment>
+ <comment xml:lang="ga">comhad uuencoded</comment>
<comment xml:lang="gl">Ficheiro uuencoded</comment>
<comment xml:lang="he">קובץ בקידוד uu</comment>
<comment xml:lang="hr">uuencoded datoteka</comment>
@@ -35780,14 +36879,14 @@
<comment xml:lang="pl">Plik zakodowany za pomocą uuencode</comment>
<comment xml:lang="pt">ficheiro uuencoded</comment>
<comment xml:lang="pt_BR">Arquivo codificado UUE</comment>
- <comment xml:lang="ru">файл в кодировке uuencode</comment>
+ <comment xml:lang="ru">Файл, кодированный uuencode</comment>
<comment xml:lang="sk">Súbor v kódovaní uuencode</comment>
<comment xml:lang="sl">Datoteka uuencode</comment>
<comment xml:lang="sr">уукодирана датотека</comment>
<comment xml:lang="sv">uuencode-fil</comment>
<comment xml:lang="tr">uuencoded dosyası</comment>
<comment xml:lang="uk">файл даних у форматі UUE</comment>
- <comment xml:lang="zh_CN">未编码的文件</comment>
+ <comment xml:lang="zh_CN">Uuencode 文件</comment>
<comment xml:lang="zh_TW">uuencoded 檔</comment>
<sub-class-of type="text/plain"/>
<glob pattern="*.uue"/>
@@ -35834,7 +36933,7 @@
<comment xml:lang="pt">ficheiro XMI</comment>
<comment xml:lang="pt_BR">Arquivo XMI</comment>
<comment xml:lang="ro">Fișier XMI</comment>
- <comment xml:lang="ru">файл XMI</comment>
+ <comment xml:lang="ru">Файл XMI</comment>
<comment xml:lang="sk">Súbor XMI</comment>
<comment xml:lang="sl">Datoteka XMI</comment>
<comment xml:lang="sq">File XMI</comment>
@@ -35890,7 +36989,7 @@
<comment xml:lang="pt">ficheiro XSL FO</comment>
<comment xml:lang="pt_BR">Arquivo XSL FO</comment>
<comment xml:lang="ro">Fișier XSL FO</comment>
- <comment xml:lang="ru">файл XSL FO</comment>
+ <comment xml:lang="ru">Файл XSL FO</comment>
<comment xml:lang="sk">Súbor XSL FO</comment>
<comment xml:lang="sl">Datoteka XSL FO</comment>
<comment xml:lang="sq">File XSL FO</comment>
@@ -35911,6 +37010,7 @@
<mime-type type="text/x-iptables">
<comment>iptables configuration file</comment>
<comment xml:lang="ar">ملف تضبيط iptables</comment>
+ <comment xml:lang="ast">ficheru de configuración d'iptables</comment>
<comment xml:lang="be@latin">kanfihuracyjny fajł iptables</comment>
<comment xml:lang="bg">Настройки за iptables</comment>
<comment xml:lang="ca">fitxer de configuració d'iptables</comment>
@@ -35927,7 +37027,7 @@
<comment xml:lang="ga">comhad cumraíochta iptables</comment>
<comment xml:lang="gl">ficheiro de configuración de iptables</comment>
<comment xml:lang="he">קובץ הגדרה של iptables</comment>
- <comment xml:lang="hr">iptables datoteka s postavkama</comment>
+ <comment xml:lang="hr">iptables datoteka podešavanja</comment>
<comment xml:lang="hu">iptables beállítófájl</comment>
<comment xml:lang="ia">File de configuration IPTables</comment>
<comment xml:lang="id">berkas konfigurasi iptables</comment>
@@ -35945,7 +37045,7 @@
<comment xml:lang="pt">ficheiro de configuração iptables</comment>
<comment xml:lang="pt_BR">Arquivo de configuração do iptables</comment>
<comment xml:lang="ro">fișier configurare iptables</comment>
- <comment xml:lang="ru">файл настроек iptables</comment>
+ <comment xml:lang="ru">Файл настроек iptables</comment>
<comment xml:lang="sk">Súbor nastavení iptables</comment>
<comment xml:lang="sl">nastavitvena datoteka iptables</comment>
<comment xml:lang="sq">File konfigurimi iptables</comment>
@@ -35979,6 +37079,110 @@
</magic>
<glob pattern="*.iptables"/>
</mime-type>
+ <mime-type type="text/x-dbus-service">
+ <comment>D-Bus service file</comment>
+ <comment xml:lang="ca">fitxer de servei de D-Bus</comment>
+ <comment xml:lang="cs">soubor služby D-Bus</comment>
+ <comment xml:lang="de">D-Bus-Dienstdatei</comment>
+ <comment xml:lang="en_GB">D-Bus service file</comment>
+ <comment xml:lang="es">archivo de servicio de D-Bus</comment>
+ <comment xml:lang="eu">D-Bus zerbitzu fitxategia</comment>
+ <comment xml:lang="fi">D-Bus-palvelutiedosto</comment>
+ <comment xml:lang="fr">fichier de service D-Bus</comment>
+ <comment xml:lang="ga">comhad seirbhíse D-Bus</comment>
+ <comment xml:lang="hr">Datoteka D-Bus usluge</comment>
+ <comment xml:lang="hu">D-Bus szolgáltatás fájl</comment>
+ <comment xml:lang="id">berkas layanan D-Bus</comment>
+ <comment xml:lang="it">File servizio D-Bus</comment>
+ <comment xml:lang="kk">D-Bus қызметтік файлы</comment>
+ <comment xml:lang="ko">D-Bus 서비스 파일</comment>
+ <comment xml:lang="pl">Plik usługi D-Bus</comment>
+ <comment xml:lang="pt_BR">Arquivo de serviço do D-Bus</comment>
+ <comment xml:lang="ru">Файл службы D-Bus</comment>
+ <comment xml:lang="sk">Súbor služby D-Bus</comment>
+ <comment xml:lang="sr">датотека услуге Д-сабирнице</comment>
+ <comment xml:lang="sv">D-BUS-tjänstfil</comment>
+ <comment xml:lang="tr">D-Bus hizmeti dosyası</comment>
+ <comment xml:lang="uk">файл служби D-Bus</comment>
+ <comment xml:lang="zh_CN">D-Bus 服务文件</comment>
+ <comment xml:lang="zh_TW">D-Bus 服務檔</comment>
+ <sub-class-of type="text/plain"/>
+ <magic priority="50">
+ <match value="\n[D-BUS Service]\n" type="string" offset="0:256"/>
+ <match value="[D-BUS Service]\n" type="string" offset="0"/>
+ </magic>
+ <glob pattern="*.service"/>
+ </mime-type>
+ <mime-type type="text/x-systemd-unit">
+ <comment>systemd unit file</comment>
+ <comment xml:lang="ast">ficheru d'unidaes de systemd</comment>
+ <comment xml:lang="ca">fitxer d'unitat de systemd</comment>
+ <comment xml:lang="cs">jednotkový soubor systemd</comment>
+ <comment xml:lang="de">systemd-Einheitsdatei</comment>
+ <comment xml:lang="en_GB">systemd unit file</comment>
+ <comment xml:lang="es">archivo de unidad de systemd</comment>
+ <comment xml:lang="eu">systemd unitate fitxategia</comment>
+ <comment xml:lang="fi">systemd-yksikkötiedosto</comment>
+ <comment xml:lang="fr">fichier d'unité systemd</comment>
+ <comment xml:lang="ga">comhad aonaid systemd</comment>
+ <comment xml:lang="hr">Datoteka systemd jedinice</comment>
+ <comment xml:lang="hu">systemd egység fájl</comment>
+ <comment xml:lang="id">berkas unit systemd</comment>
+ <comment xml:lang="it">File unità systemd</comment>
+ <comment xml:lang="kk">systemd юнит файлы</comment>
+ <comment xml:lang="ko">systemd 유닛 파일</comment>
+ <comment xml:lang="pl">Plik jednostki systemd</comment>
+ <comment xml:lang="pt_BR">Arquivo de unit do systemd</comment>
+ <comment xml:lang="ru">Модульный файл Systemd</comment>
+ <comment xml:lang="sk">Súbor jednotky systemd</comment>
+ <comment xml:lang="sr">датотека јединице системд-а</comment>
+ <comment xml:lang="sv">systemd-enhetsfil</comment>
+ <comment xml:lang="tr">systemd birim dosyası</comment>
+ <comment xml:lang="uk">файл модуля systemd</comment>
+ <comment xml:lang="zh_CN">systemd 单元文件</comment>
+ <comment xml:lang="zh_TW">systemd 單位檔</comment>
+ <sub-class-of type="text/plain"/>
+ <magic priority="50">
+
+ <match value="\n[Unit]\n" type="string" offset="0:256"/>
+ <match value="\n[Install]\n" type="string" offset="0:256"/>
+ <match value="\n[Automount]\n" type="string" offset="0:256"/>
+
+ <match value="\n[Mount]\n" type="string" offset="0:256"/>
+ <match value="\n[Path]\n" type="string" offset="0:256"/>
+ <match value="\n[Scope]\n" type="string" offset="0:256"/>
+ <match value="\n[Service]\n" type="string" offset="0:256"/>
+ <match value="\n[Slice]\n" type="string" offset="0:256"/>
+ <match value="\n[Socket]\n" type="string" offset="0:256"/>
+ <match value="\n[Swap]\n" type="string" offset="0:256"/>
+
+ <match value="\n[Timer]\n" type="string" offset="0:256"/>
+
+
+ <match value="[Unit]\n" type="string" offset="0"/>
+ <match value="[Install]\n" type="string" offset="0"/>
+ <match value="[Automount]\n" type="string" offset="0"/>
+ <match value="[Mount]\n" type="string" offset="0"/>
+ <match value="[Path]\n" type="string" offset="0"/>
+ <match value="[Scope]\n" type="string" offset="0"/>
+ <match value="[Service]\n" type="string" offset="0"/>
+ <match value="[Slice]\n" type="string" offset="0"/>
+ <match value="[Socket]\n" type="string" offset="0"/>
+ <match value="[Swap]\n" type="string" offset="0"/>
+ <match value="[Timer]\n" type="string" offset="0"/>
+ </magic>
+ <glob pattern="*.automount"/>
+ <glob pattern="*.device"/>
+ <glob pattern="*.mount"/>
+ <glob pattern="*.path"/>
+ <glob pattern="*.scope"/>
+ <glob pattern="*.service"/>
+ <glob pattern="*.slice"/>
+ <glob pattern="*.socket"/>
+ <glob pattern="*.swap"/>
+ <glob pattern="*.target"/>
+ <glob pattern="*.timer"/>
+ </mime-type>
<mime-type type="application/xslt+xml">
<comment>XSLT stylesheet</comment>
<comment xml:lang="ar">نمط XSLT</comment>
@@ -36018,7 +37222,7 @@
<comment xml:lang="pt">folha de estilos XSLT</comment>
<comment xml:lang="pt_BR">Folha de estilo XSLT</comment>
<comment xml:lang="ro">Fișă de stil XSLT</comment>
- <comment xml:lang="ru">таблица стилей XSLT</comment>
+ <comment xml:lang="ru">Таблица стилей XSLT</comment>
<comment xml:lang="sk">Štýl XSLT</comment>
<comment xml:lang="sl">Slogovna predloga XSLT</comment>
<comment xml:lang="sq">Fletë stili XSLT</comment>
@@ -36077,7 +37281,7 @@
<comment xml:lang="pt">base de dados XMCD CD</comment>
<comment xml:lang="pt_BR">Banco de dados de CD XMCD</comment>
<comment xml:lang="ro">Bază de date XMCD CD</comment>
- <comment xml:lang="ru">база данных компакт-дисков XMCD</comment>
+ <comment xml:lang="ru">База данных компакт-дисков XMCD</comment>
<comment xml:lang="sk">Databáza XMCD CD</comment>
<comment xml:lang="sl">Podatkovna zbirka XMCD CD</comment>
<comment xml:lang="sq">Bazë me të dhëna XMCD CD</comment>
@@ -36096,6 +37300,7 @@
<mime-type type="application/xml">
<comment>XML document</comment>
<comment xml:lang="ar">مستند XML</comment>
+ <comment xml:lang="ast">Documentu XML</comment>
<comment xml:lang="be@latin">Dakument XML</comment>
<comment xml:lang="bg">Документ — XML</comment>
<comment xml:lang="ca">document XML</comment>
@@ -36131,7 +37336,7 @@
<comment xml:lang="pt">documento XML</comment>
<comment xml:lang="pt_BR">Documento XML</comment>
<comment xml:lang="ro">Document XML</comment>
- <comment xml:lang="ru">документ XML</comment>
+ <comment xml:lang="ru">Документ XML</comment>
<comment xml:lang="sk">Dokument XML</comment>
<comment xml:lang="sl">Dokument XML</comment>
<comment xml:lang="sq">Dokument XML</comment>
@@ -36159,6 +37364,7 @@
<mime-type type="application/xml-external-parsed-entity">
<comment>XML entities document</comment>
<comment xml:lang="ar">مستند كيانات XML</comment>
+ <comment xml:lang="ast">Documentu d'entidaes XML</comment>
<comment xml:lang="be@latin">Dakument elementaŭ XML</comment>
<comment xml:lang="bg">Документ — заместващи последователности в XML</comment>
<comment xml:lang="ca">document d'entitats XML</comment>
@@ -36193,7 +37399,7 @@
<comment xml:lang="pt">documento de entidades XML</comment>
<comment xml:lang="pt_BR">Documento de entidades XML</comment>
<comment xml:lang="ro">Document entități XML</comment>
- <comment xml:lang="ru">файл сущностей XML</comment>
+ <comment xml:lang="ru">Файл сущностей XML</comment>
<comment xml:lang="sk">Dokument entít XML</comment>
<comment xml:lang="sl">Dokument XML določil</comment>
<comment xml:lang="sq">Dokument njësish XML</comment>
@@ -36214,6 +37420,7 @@
<mime-type type="video/dv">
<comment>DV video</comment>
<comment xml:lang="ar">DV مرئي</comment>
+ <comment xml:lang="ast">Videu en DV</comment>
<comment xml:lang="be@latin">Videa DV</comment>
<comment xml:lang="bg">Видео — DV</comment>
<comment xml:lang="ca">vídeo DV</comment>
@@ -36231,7 +37438,7 @@
<comment xml:lang="ga">físeán DV</comment>
<comment xml:lang="gl">vídeo DV</comment>
<comment xml:lang="he">וידאו DV</comment>
- <comment xml:lang="hr">DV video</comment>
+ <comment xml:lang="hr">DV video snimka</comment>
<comment xml:lang="hu">DV videó</comment>
<comment xml:lang="ia">Video DV</comment>
<comment xml:lang="id">Video DV</comment>
@@ -36250,7 +37457,7 @@
<comment xml:lang="pt">vídeo DV</comment>
<comment xml:lang="pt_BR">Vídeo DV</comment>
<comment xml:lang="ro">Video DV</comment>
- <comment xml:lang="ru">видео DV</comment>
+ <comment xml:lang="ru">Видео DV</comment>
<comment xml:lang="sk">Video DV</comment>
<comment xml:lang="sl">Video datoteka DV</comment>
<comment xml:lang="sq">Video DV</comment>
@@ -36271,6 +37478,7 @@
<mime-type type="video/isivideo">
<comment>ISI video</comment>
<comment xml:lang="ar">مرئي ISI</comment>
+ <comment xml:lang="ast">Videu n'ISI</comment>
<comment xml:lang="az">ISI video faylı</comment>
<comment xml:lang="be@latin">Videa ISI</comment>
<comment xml:lang="bg">Видео — ISI</comment>
@@ -36290,7 +37498,7 @@
<comment xml:lang="ga">físeán ISI</comment>
<comment xml:lang="gl">vídeo ISI</comment>
<comment xml:lang="he">וידאו ISI</comment>
- <comment xml:lang="hr">ISI video</comment>
+ <comment xml:lang="hr">ISI video snimka</comment>
<comment xml:lang="hu">ISI-videó</comment>
<comment xml:lang="ia">Video ISI</comment>
<comment xml:lang="id">Video ISI</comment>
@@ -36309,7 +37517,7 @@
<comment xml:lang="pt">vídeo ISI</comment>
<comment xml:lang="pt_BR">Vídeo ISI</comment>
<comment xml:lang="ro">Video ISI</comment>
- <comment xml:lang="ru">видео ISI</comment>
+ <comment xml:lang="ru">Видео ISI</comment>
<comment xml:lang="sk">Video ISI</comment>
<comment xml:lang="sl">Video datoteka ISI</comment>
<comment xml:lang="sq">Video ISI</comment>
@@ -36336,10 +37544,10 @@
<comment xml:lang="fi">MPEG-2 -siirtobittivirta</comment>
<comment xml:lang="fo">MPEG-2 flutningsstreymur</comment>
<comment xml:lang="fr">flux de transport MPEG-2</comment>
- <comment xml:lang="ga">Sruth aistrithe MPEG-2</comment>
+ <comment xml:lang="ga">sruth aistrithe MPEG-2</comment>
<comment xml:lang="gl">fluxo de transporte MPEG-2</comment>
<comment xml:lang="he">העברת זרימה של MPEG-2</comment>
- <comment xml:lang="hr">MPEG-2 transportni tok</comment>
+ <comment xml:lang="hr">MPEG-2 transportno strujanje</comment>
<comment xml:lang="hu">MPEG-2 átviteli adatfolyam</comment>
<comment xml:lang="ia">Fluxo de transporto MPEG-2</comment>
<comment xml:lang="id">Stream transport MPEG-2</comment>
@@ -36356,7 +37564,7 @@
<comment xml:lang="pt">fluxo de transporte MPEG-2</comment>
<comment xml:lang="pt_BR">Fluxo de transporte de MPEG-2</comment>
<comment xml:lang="ro">Flux transport MPEG-2</comment>
- <comment xml:lang="ru">транспортный поток MPEG-2</comment>
+ <comment xml:lang="ru">Транспортный поток MPEG-2</comment>
<comment xml:lang="sk">MPEG-2 Transport Stream</comment>
<comment xml:lang="sl">Pretočni vir prenosega MPEG</comment>
<comment xml:lang="sr">МПЕГ-2 ток преноса</comment>
@@ -36401,6 +37609,7 @@
<mime-type type="video/mpeg">
<comment>MPEG video</comment>
<comment xml:lang="ar">MPEG مرئي</comment>
+ <comment xml:lang="ast">Videu en MPEG</comment>
<comment xml:lang="be@latin">Videa MPEG</comment>
<comment xml:lang="bg">Видео — MPEG</comment>
<comment xml:lang="ca">vídeo MPEG</comment>
@@ -36418,7 +37627,7 @@
<comment xml:lang="ga">físeán MPEG</comment>
<comment xml:lang="gl">vídeo MPEG</comment>
<comment xml:lang="he">וידאו MPEG</comment>
- <comment xml:lang="hr">MPEG video</comment>
+ <comment xml:lang="hr">MPEG video snimka</comment>
<comment xml:lang="hu">MPEG-videó</comment>
<comment xml:lang="ia">Video MPEG</comment>
<comment xml:lang="id">Video MPEG</comment>
@@ -36438,7 +37647,7 @@
<comment xml:lang="pt">vídeo MPEG</comment>
<comment xml:lang="pt_BR">Vídeo MPEG</comment>
<comment xml:lang="ro">Video MPEG</comment>
- <comment xml:lang="ru">видео MPEG</comment>
+ <comment xml:lang="ru">Видео MPEG</comment>
<comment xml:lang="sk">Video MPEG</comment>
<comment xml:lang="sl">Video datoteka MPEG</comment>
<comment xml:lang="sq">Video MPEG</comment>
@@ -36469,6 +37678,7 @@
</mime-type>
<mime-type type="video/vnd.mpegurl">
<comment>MPEG video (streamed)</comment>
+ <comment xml:lang="ast">Videu en MPEG (tresmitíu)</comment>
<comment xml:lang="bg">Видео — MPEG, поточно</comment>
<comment xml:lang="ca">vídeo MPEG (flux)</comment>
<comment xml:lang="cs">video MPEG (proud)</comment>
@@ -36480,6 +37690,7 @@
<comment xml:lang="eu">MPEG bideoa (korronte bidez)</comment>
<comment xml:lang="fi">MPEG-video (virtaus)</comment>
<comment xml:lang="fr">vidéo MPEG (flux)</comment>
+ <comment xml:lang="ga">físeán MPEG (sruthaithe)</comment>
<comment xml:lang="gl">vídeo MPEG (en stream)</comment>
<comment xml:lang="he">קובץ MPEG (בהזרמה)</comment>
<comment xml:lang="hr">MPEG video snimka (strujanje)</comment>
@@ -36497,7 +37708,7 @@
<comment xml:lang="pl">Plik wideo MPEG (strumień)</comment>
<comment xml:lang="pt">vídeo MPEG (em fluxo)</comment>
<comment xml:lang="pt_BR">Vídeo MPEG (fluxo)</comment>
- <comment xml:lang="ru">видео MPEG (потоковое)</comment>
+ <comment xml:lang="ru">Видео MPEG (потоковое)</comment>
<comment xml:lang="sk">MPEG video (streamované)</comment>
<comment xml:lang="sl">MPEG-video (pretočni)</comment>
<comment xml:lang="sr">МПЕГ видео (проточни)</comment>
@@ -36518,6 +37729,7 @@
<mime-type type="video/quicktime">
<comment>QuickTime video</comment>
<comment xml:lang="ar">QuickTime مرئي</comment>
+ <comment xml:lang="ast">Videu en QuickTime</comment>
<comment xml:lang="be@latin">Videa QuickTime</comment>
<comment xml:lang="bg">Видео — QuickTime</comment>
<comment xml:lang="ca">vídeo QuickTime</comment>
@@ -36535,7 +37747,7 @@
<comment xml:lang="ga">físeán QuickTime</comment>
<comment xml:lang="gl">vídeo QuickTime</comment>
<comment xml:lang="he">וידאו של QuickTime</comment>
- <comment xml:lang="hr">QuickTime video</comment>
+ <comment xml:lang="hr">QuickTime video snimka</comment>
<comment xml:lang="hu">QuickTime videó</comment>
<comment xml:lang="ia">Video QuickTime</comment>
<comment xml:lang="id">Video QuickTime</comment>
@@ -36554,7 +37766,7 @@
<comment xml:lang="pt">vídeo QuickTime</comment>
<comment xml:lang="pt_BR">Vídeo do QuickTime</comment>
<comment xml:lang="ro">Video QuickTime</comment>
- <comment xml:lang="ru">видео QuickTime</comment>
+ <comment xml:lang="ru">Видео QuickTime</comment>
<comment xml:lang="sk">Video QuickTime</comment>
<comment xml:lang="sl">Video datoteka QuickTime</comment>
<comment xml:lang="sq">Video QuickTime</comment>
@@ -36614,7 +37826,7 @@
<comment xml:lang="pt">imagem QuickTime</comment>
<comment xml:lang="pt_BR">Imagem do QuickTime</comment>
<comment xml:lang="ro">Imagine QuickTime</comment>
- <comment xml:lang="ru">изображение QuickTime</comment>
+ <comment xml:lang="ru">Изображение QuickTime</comment>
<comment xml:lang="sk">Obrázok QuickTime</comment>
<comment xml:lang="sl">Slikovna datoteka QuickTime</comment>
<comment xml:lang="sq">Figurë QuickTime</comment>
@@ -36631,9 +37843,44 @@
<glob pattern="*.qtif"/>
<glob pattern="*.qif"/>
</mime-type>
+ <mime-type type="image/ktx">
+ <comment>Khronos texture image</comment>
+ <comment xml:lang="ca">imatge de textura de Khronos</comment>
+ <comment xml:lang="cs">obrázek s texturou Khronos</comment>
+ <comment xml:lang="de">Khronos-Texturbild</comment>
+ <comment xml:lang="en_GB">Khronos texture image</comment>
+ <comment xml:lang="es">imagen de textura de Khronos</comment>
+ <comment xml:lang="fr">image de texture Khronos</comment>
+ <comment xml:lang="ga">íomhá uigeachta Khronos</comment>
+ <comment xml:lang="hr">Khronos tekstura slika</comment>
+ <comment xml:lang="hu">Khronos textúra kép</comment>
+ <comment xml:lang="id">citra tekstur Khronos</comment>
+ <comment xml:lang="it">Immagine texture Khronos</comment>
+ <comment xml:lang="kk">Khronos текстура суреті</comment>
+ <comment xml:lang="ko">크로노스 텍스처 파일</comment>
+ <comment xml:lang="pl">Obraz tekstury Khronos</comment>
+ <comment xml:lang="pt_BR">Imagem de textura do Khronos</comment>
+ <comment xml:lang="ru">Изображение текстуры Khronos</comment>
+ <comment xml:lang="sk">Obrázok textúry Khronos</comment>
+ <comment xml:lang="sr">слика Кронос текстуре</comment>
+ <comment xml:lang="sv">Khronos-texturbild</comment>
+ <comment xml:lang="tr">Khronos kaplama görüntüsü</comment>
+ <comment xml:lang="uk">зображення текстури Khronos</comment>
+ <comment xml:lang="zh_CN">Khronos 纹理图像</comment>
+ <comment xml:lang="zh_TW">Khronos 紋理影像</comment>
+ <magic priority="80">
+ <match value="0xAB4B5458" type="big32" offset="0">
+ <match value="0x203131BB" type="big32" offset="4">
+ <match value="0x0D0A1A0A" type="big32" offset="8"/>
+ </match>
+ </match>
+ </magic>
+ <glob pattern="*.ktx"/>
+ </mime-type>
<mime-type type="video/vnd.vivo">
<comment>Vivo video</comment>
<comment xml:lang="ar">Vivo مرئي</comment>
+ <comment xml:lang="ast">Videu en Vivo</comment>
<comment xml:lang="az">Vivo video faylı</comment>
<comment xml:lang="be@latin">Videa Vivo</comment>
<comment xml:lang="bg">Видео — Vivo</comment>
@@ -36653,7 +37900,7 @@
<comment xml:lang="ga">físeán Vivo</comment>
<comment xml:lang="gl">vídeo Vivo</comment>
<comment xml:lang="he">וידאו של Vivo</comment>
- <comment xml:lang="hr">Vivo video</comment>
+ <comment xml:lang="hr">Vivo video snimka</comment>
<comment xml:lang="hu">Vivo-videó</comment>
<comment xml:lang="ia">Video Vivo</comment>
<comment xml:lang="id">Video Vivo</comment>
@@ -36672,7 +37919,7 @@
<comment xml:lang="pt">vídeo Vivo</comment>
<comment xml:lang="pt_BR">Vídeo Vivo</comment>
<comment xml:lang="ro">Video Vivo</comment>
- <comment xml:lang="ru">видео Vivo</comment>
+ <comment xml:lang="ru">Видео Vivo</comment>
<comment xml:lang="sk">Video Vivo</comment>
<comment xml:lang="sl">Video datoteka Vivo</comment>
<comment xml:lang="sq">Video Vivo</comment>
@@ -36690,6 +37937,7 @@
<mime-type type="video/wavelet">
<comment>Wavelet video</comment>
<comment xml:lang="ar">Wavelet مرئي</comment>
+ <comment xml:lang="ast">Videu en Wavelet</comment>
<comment xml:lang="az">Wavelet video faylı</comment>
<comment xml:lang="be@latin">Videa Wavelet</comment>
<comment xml:lang="bg">Видео — Wavelet</comment>
@@ -36709,7 +37957,7 @@
<comment xml:lang="ga">físeán Wavelet</comment>
<comment xml:lang="gl">vídeo Wavelet</comment>
<comment xml:lang="he">וידאו של Wavelet</comment>
- <comment xml:lang="hr">Wavelet video</comment>
+ <comment xml:lang="hr">Wavelet video snimka</comment>
<comment xml:lang="hu">Wavelet-videó</comment>
<comment xml:lang="ia">Video Wavelet</comment>
<comment xml:lang="id">Video Wavelet</comment>
@@ -36728,7 +37976,7 @@
<comment xml:lang="pt">vídeo Wavelet</comment>
<comment xml:lang="pt_BR">Vídeo Wavelet</comment>
<comment xml:lang="ro">Video Wavelet</comment>
- <comment xml:lang="ru">видео Wavelet</comment>
+ <comment xml:lang="ru">Видео Wavelet</comment>
<comment xml:lang="sk">Video Wavelet</comment>
<comment xml:lang="sl">Video datoteka Wavelet</comment>
<comment xml:lang="sq">Video Wavelet</comment>
@@ -36782,7 +38030,7 @@
<comment xml:lang="pt">animação ANIM</comment>
<comment xml:lang="pt_BR">Animação ANIM</comment>
<comment xml:lang="ro">Animație ANIM</comment>
- <comment xml:lang="ru">анимация ANIM</comment>
+ <comment xml:lang="ru">Анимация ANIM</comment>
<comment xml:lang="sk">Animácia ANIM</comment>
<comment xml:lang="sl">Datoteka animacije ANIM</comment>
<comment xml:lang="sq">Animim ANIM</comment>
@@ -36833,7 +38081,7 @@
<comment xml:lang="pt">animação FLIC</comment>
<comment xml:lang="pt_BR">Animação FLIC</comment>
<comment xml:lang="ro">Animație FLIC</comment>
- <comment xml:lang="ru">анимация FLIC</comment>
+ <comment xml:lang="ru">Анимация FLIC</comment>
<comment xml:lang="sk">Animácia FLIC</comment>
<comment xml:lang="sl">Datoteka animacije FLIC</comment>
<comment xml:lang="sq">Animim FLIC</comment>
@@ -36856,6 +38104,7 @@
<mime-type type="application/x-hwp">
<comment>Haansoft Hangul document</comment>
<comment xml:lang="ar">مستند Haansoft Hangul</comment>
+ <comment xml:lang="ast">Documentu de Haansoft Hangul</comment>
<comment xml:lang="be@latin">Dakument Haansoft Hangul</comment>
<comment xml:lang="bg">Документ — Haansoft Hangul</comment>
<comment xml:lang="ca">document d'Haansoft Hangul</comment>
@@ -36890,7 +38139,7 @@
<comment xml:lang="pt">documento Haansoft Hangul</comment>
<comment xml:lang="pt_BR">Documento do Haansoft Hangul</comment>
<comment xml:lang="ro">Document Haansoft Hangul</comment>
- <comment xml:lang="ru">документ Haansoft Hangul</comment>
+ <comment xml:lang="ru">Документ Haansoft Hangul</comment>
<comment xml:lang="sk">Dokument Haansoft Hangul</comment>
<comment xml:lang="sl">Dokument Haansoft Hangul</comment>
<comment xml:lang="sq">Dokument Haansoft Hangul</comment>
@@ -36911,6 +38160,7 @@
<mime-type type="application/x-hwt">
<comment>Haansoft Hangul document template</comment>
<comment xml:lang="ar">قالب مستند Haansoft Hangul</comment>
+ <comment xml:lang="ast">Plantía de documentu de Haansoft Hangul</comment>
<comment xml:lang="be@latin">Šablon dakumentu Haansoft Hangul</comment>
<comment xml:lang="bg">Шаблон за документи — Haansoft Hangul</comment>
<comment xml:lang="ca">plantilla de document d'Haansoft Hangul</comment>
@@ -36945,7 +38195,7 @@
<comment xml:lang="pt">modelo de documento Haansoft Hangul</comment>
<comment xml:lang="pt_BR">Modelo de documento do Haansoft Hangul</comment>
<comment xml:lang="ro">Document șablon Haansoft Hangul</comment>
- <comment xml:lang="ru">шаблон документа Haansoft Hangul</comment>
+ <comment xml:lang="ru">Шаблон документа Haansoft Hangul</comment>
<comment xml:lang="sk">Šablóna dokumentu Haansoft Hangul</comment>
<comment xml:lang="sl">Predloga dokumenta Haansoft Hangul</comment>
<comment xml:lang="sq">Model dokumenti Haansoft Hangul</comment>
@@ -36999,7 +38249,7 @@
<comment xml:lang="pt">animação MNG</comment>
<comment xml:lang="pt_BR">Animação MNG</comment>
<comment xml:lang="ro">Animație MNG</comment>
- <comment xml:lang="ru">анимация MNG</comment>
+ <comment xml:lang="ru">Анимация MNG</comment>
<comment xml:lang="sk">Animácia MNG</comment>
<comment xml:lang="sl">Datoteka animacije MNG</comment>
<comment xml:lang="sq">Animim MNG</comment>
@@ -37020,6 +38270,7 @@
<mime-type type="application/vnd.ms-asf">
<comment>ASF video</comment>
<comment xml:lang="ar">ASF مرئي</comment>
+ <comment xml:lang="ast">Videu n'ASF</comment>
<comment xml:lang="be@latin">Videa ASF</comment>
<comment xml:lang="bg">Видео — ASF</comment>
<comment xml:lang="ca">vídeo ASF</comment>
@@ -37037,7 +38288,7 @@
<comment xml:lang="ga">físeán ASF</comment>
<comment xml:lang="gl">vídeo ASF</comment>
<comment xml:lang="he">וידאו ASF</comment>
- <comment xml:lang="hr">ASF video</comment>
+ <comment xml:lang="hr">ASF video snimka</comment>
<comment xml:lang="hu">ASF videó</comment>
<comment xml:lang="ia">Video ASF</comment>
<comment xml:lang="id">Video ASF</comment>
@@ -37056,7 +38307,7 @@
<comment xml:lang="pt">vídeo ASF</comment>
<comment xml:lang="pt_BR">Vídeo ASF</comment>
<comment xml:lang="ro">Video ASF</comment>
- <comment xml:lang="ru">видео ASF</comment>
+ <comment xml:lang="ru">Видео ASF</comment>
<comment xml:lang="sk">Video ASF</comment>
<comment xml:lang="sl">Video datoteka ASF</comment>
<comment xml:lang="sq">Video ASF</comment>
@@ -37115,7 +38366,7 @@
<comment xml:lang="pt">ficheiro Windows Media Station</comment>
<comment xml:lang="pt_BR">Arquivo de estação do Windows Media</comment>
<comment xml:lang="ro">Fișier Windows Media Station</comment>
- <comment xml:lang="ru">файл Windows Media Station</comment>
+ <comment xml:lang="ru">Файл Windows Media Station</comment>
<comment xml:lang="sk">Súbor Windows Media Station</comment>
<comment xml:lang="sl">Datoteka Windows Media Station</comment>
<comment xml:lang="sq">File Windows Media Station</comment>
@@ -37136,6 +38387,7 @@
<mime-type type="video/x-ms-wmv">
<comment>Windows Media video</comment>
<comment xml:lang="ar">Windows Media مرئي</comment>
+ <comment xml:lang="ast">Videu de Windows Media</comment>
<comment xml:lang="be@latin">Videa Windows Media</comment>
<comment xml:lang="bg">Видео — Windows Media</comment>
<comment xml:lang="ca">vídeo de Windows Media</comment>
@@ -37152,7 +38404,7 @@
<comment xml:lang="ga">físeán Windows Media</comment>
<comment xml:lang="gl">vídeo de Windows Media</comment>
<comment xml:lang="he">וידאו של Windows Media</comment>
- <comment xml:lang="hr">Windows Media video</comment>
+ <comment xml:lang="hr">Windows Media video snimka</comment>
<comment xml:lang="hu">Windows Media videó</comment>
<comment xml:lang="ia">Video Windows Media</comment>
<comment xml:lang="id">Video Windows Media</comment>
@@ -37170,7 +38422,7 @@
<comment xml:lang="pt">vídeo Windows Media</comment>
<comment xml:lang="pt_BR">Vídeo do Windows Media</comment>
<comment xml:lang="ro">Video Windows Media</comment>
- <comment xml:lang="ru">видео Windows Media</comment>
+ <comment xml:lang="ru">Видео Windows Media</comment>
<comment xml:lang="sk">Video Windows Media</comment>
<comment xml:lang="sl">Video datoteka Windows Media</comment>
<comment xml:lang="sq">Video Windows Media</comment>
@@ -37187,6 +38439,7 @@
<mime-type type="video/x-msvideo">
<comment>AVI video</comment>
<comment xml:lang="ar">AVI مرئي</comment>
+ <comment xml:lang="ast">Videu n'AVI</comment>
<comment xml:lang="az">AVI video faylı</comment>
<comment xml:lang="be@latin">Videa AVI</comment>
<comment xml:lang="bg">Видео — AVI</comment>
@@ -37206,7 +38459,7 @@
<comment xml:lang="ga">físeán AVI</comment>
<comment xml:lang="gl">vídeo AVI</comment>
<comment xml:lang="he">וידאו AVI</comment>
- <comment xml:lang="hr">AVI video</comment>
+ <comment xml:lang="hr">AVI video snimka</comment>
<comment xml:lang="hu">AVI-videó</comment>
<comment xml:lang="ia">Video AVI</comment>
<comment xml:lang="id">Video AVI</comment>
@@ -37226,7 +38479,7 @@
<comment xml:lang="pt">vídeo AVI</comment>
<comment xml:lang="pt_BR">Vídeo AVI</comment>
<comment xml:lang="ro">Video AVI</comment>
- <comment xml:lang="ru">видео AVI</comment>
+ <comment xml:lang="ru">Видео AVI</comment>
<comment xml:lang="sk">Video AVI</comment>
<comment xml:lang="sl">Video datoteka AVI</comment>
<comment xml:lang="sq">Video AVI</comment>
@@ -37259,6 +38512,7 @@
<mime-type type="video/x-nsv">
<comment>NullSoft video</comment>
<comment xml:lang="ar">NullSoft مرئي</comment>
+ <comment xml:lang="ast">Videu de NullSoft</comment>
<comment xml:lang="be@latin">Videa NullSoft</comment>
<comment xml:lang="bg">Видео — NullSoft</comment>
<comment xml:lang="ca">vídeo NullSoft</comment>
@@ -37276,7 +38530,7 @@
<comment xml:lang="ga">físeán NullSoft</comment>
<comment xml:lang="gl">vídeo de NullSoft</comment>
<comment xml:lang="he">וידאו של NullSot</comment>
- <comment xml:lang="hr">NullSoft video</comment>
+ <comment xml:lang="hr">NullSoft video snimka</comment>
<comment xml:lang="hu">NullSoft videó</comment>
<comment xml:lang="ia">Video NullSoft</comment>
<comment xml:lang="id">Video NullSoft</comment>
@@ -37294,7 +38548,7 @@
<comment xml:lang="pt">vídeo NullSoft</comment>
<comment xml:lang="pt_BR">Vídeo do NullSoft</comment>
<comment xml:lang="ro">Video NullSoft</comment>
- <comment xml:lang="ru">видео Nullsoft</comment>
+ <comment xml:lang="ru">Видео Nullsoft</comment>
<comment xml:lang="sk">Video NullSoft</comment>
<comment xml:lang="sl">Video datoteka NullSoft</comment>
<comment xml:lang="sq">Video NullSoft</comment>
@@ -37303,7 +38557,7 @@
<comment xml:lang="tr">Nullsoft videosu</comment>
<comment xml:lang="uk">відеокліп NullSoft</comment>
<comment xml:lang="vi">Ảnh động NullSoft</comment>
- <comment xml:lang="zh_CN">Nullsoft 视频</comment>
+ <comment xml:lang="zh_CN">NullSoft 视频</comment>
<comment xml:lang="zh_TW">NullSoft 視訊</comment>
<magic priority="50">
<match value="NSVf" type="string" offset="0"/>
@@ -37347,7 +38601,7 @@
<comment xml:lang="pt">ficheiro de fluxo SDP multicast</comment>
<comment xml:lang="pt_BR">Arquivo de canal multicast SDP</comment>
<comment xml:lang="ro">Fișier flux multicast SDP</comment>
- <comment xml:lang="ru">файл мультикаст-потока SDP</comment>
+ <comment xml:lang="ru">Файл мультикаст-потока SDP</comment>
<comment xml:lang="sk">Súbor viacsmerového vysielania prúdu SDP</comment>
<comment xml:lang="sl">Pretočni vir večsmernega oddajanja</comment>
<comment xml:lang="sq">File stream multicast SDP</comment>
@@ -37374,6 +38628,7 @@
<mime-type type="video/x-sgi-movie">
<comment>SGI video</comment>
<comment xml:lang="ar">SGI مرئي</comment>
+ <comment xml:lang="ast">Videu en SGI</comment>
<comment xml:lang="az">SGI video faylı</comment>
<comment xml:lang="be@latin">Videa SGI</comment>
<comment xml:lang="bg">Видео — SGI</comment>
@@ -37393,7 +38648,7 @@
<comment xml:lang="ga">físeán SGI</comment>
<comment xml:lang="gl">vídeo SGI</comment>
<comment xml:lang="he">וידאו SGI</comment>
- <comment xml:lang="hr">SGI video</comment>
+ <comment xml:lang="hr">SGI video snimka</comment>
<comment xml:lang="hu">SGI-videó</comment>
<comment xml:lang="ia">Video SGI</comment>
<comment xml:lang="id">Video SGI</comment>
@@ -37412,7 +38667,7 @@
<comment xml:lang="pt">vídeo SGI</comment>
<comment xml:lang="pt_BR">Vídeo SGI</comment>
<comment xml:lang="ro">Video SGI</comment>
- <comment xml:lang="ru">видео SGI</comment>
+ <comment xml:lang="ru">Видео SGI</comment>
<comment xml:lang="sk">Video SGI</comment>
<comment xml:lang="sl">Video datoteka SGI</comment>
<comment xml:lang="sq">Video SGI</comment>
@@ -37465,7 +38720,7 @@
<comment xml:lang="pt">pacote transferido eMusic</comment>
<comment xml:lang="pt_BR">Pacote de download do eMusic</comment>
<comment xml:lang="ro">pachet descărcare eMusic</comment>
- <comment xml:lang="ru">пакет загрузок eMusic</comment>
+ <comment xml:lang="ru">Пакет загрузок eMusic</comment>
<comment xml:lang="sk">Balíček sťahovania eMusic</comment>
<comment xml:lang="sl">Datoteka paketa eMusic</comment>
<comment xml:lang="sq">Paketë shkarkimi eMusic</comment>
@@ -37516,7 +38771,7 @@
<comment xml:lang="pt">dados geográficos KML</comment>
<comment xml:lang="pt_BR">Dados geográficos KML</comment>
<comment xml:lang="ro">Date geografice KML</comment>
- <comment xml:lang="ru">географические данные KML</comment>
+ <comment xml:lang="ru">Географические данные KML</comment>
<comment xml:lang="sk">Zemepisné údaje KML</comment>
<comment xml:lang="sl">Datoteka geografskih podatkov KML</comment>
<comment xml:lang="sr">КМЛ географски подаци</comment>
@@ -37549,7 +38804,7 @@
<comment xml:lang="ga">sonraí comhbhrúite geografacha KML</comment>
<comment xml:lang="gl">datos xeográficos KML comprimidos </comment>
<comment xml:lang="he">מידע גאוגרפי דחוס KML</comment>
- <comment xml:lang="hr">KML geografski komprimirani podaci</comment>
+ <comment xml:lang="hr">KML sažeti geografski podaci</comment>
<comment xml:lang="hu">KML tömörített földrajzi adatok</comment>
<comment xml:lang="ia">Datos geographic KML comprimite</comment>
<comment xml:lang="id">Data geografis KML terkompresi</comment>
@@ -37565,14 +38820,14 @@
<comment xml:lang="pt">dados geográficos comprimidos KML</comment>
<comment xml:lang="pt_BR">Dados geográficos KML compactados</comment>
<comment xml:lang="ro">Date geografice comprimate KML</comment>
- <comment xml:lang="ru">сжатые географические данные KML</comment>
+ <comment xml:lang="ru">Сжатые географические данные KML</comment>
<comment xml:lang="sk">Komprimované zemepisné údaje KML</comment>
<comment xml:lang="sl">Skrčeni geografski podatki KML</comment>
<comment xml:lang="sr">КМЛ географски запаковани подаци</comment>
<comment xml:lang="sv">KML geografiskt komprimerat data</comment>
<comment xml:lang="tr">KML sıkıştırılmış coğrafi verisi</comment>
<comment xml:lang="uk">стиснуті географічні дані KML</comment>
- <comment xml:lang="zh_CN">KML 压缩地理数据</comment>
+ <comment xml:lang="zh_CN">KML 地理压缩数据</comment>
<comment xml:lang="zh_TW">KML 地理壓縮資料</comment>
<acronym>KML</acronym>
<expanded-acronym>Keyhole Markup Language</expanded-acronym>
@@ -37588,6 +38843,7 @@
<comment xml:lang="en_GB">GeoJSON geospatial data</comment>
<comment xml:lang="es">datos geoespaciales en GeoJSON</comment>
<comment xml:lang="fr">données géospatiales GeoJSON</comment>
+ <comment xml:lang="ga">sonraí geospásúla GeoJSON</comment>
<comment xml:lang="hr">GeoJSON geoprostorni podaci</comment>
<comment xml:lang="hu">GeoJSON téradatok</comment>
<comment xml:lang="id">Data geospasial GeoJSON</comment>
@@ -37596,10 +38852,10 @@
<comment xml:lang="ko">GeoJSON 지리 정보 데이터</comment>
<comment xml:lang="pl">Dane geoprzestrzenne GeoJSON</comment>
<comment xml:lang="pt_BR">Dados geoespaciais GeoJSON</comment>
- <comment xml:lang="ru">геопространственные данные GeoJSON</comment>
+ <comment xml:lang="ru">Геопространственные данные GeoJSON</comment>
<comment xml:lang="sk">Geopriestorové údaje GeoJSON</comment>
<comment xml:lang="sr">ГеоЈСОН геопросторни подаци</comment>
- <comment xml:lang="sv">GeoJSON geospatial data</comment>
+ <comment xml:lang="sv">Geospatialt GeoJSON-data</comment>
<comment xml:lang="tr">GeoJSON coğrafi veriler</comment>
<comment xml:lang="uk">геопросторові дані GeoJSON</comment>
<comment xml:lang="zh_CN">GeoJSON 地理空间数据</comment>
@@ -37620,6 +38876,7 @@
<comment xml:lang="eu">GPX datu geografikoak</comment>
<comment xml:lang="fi">GPX-paikkatieto</comment>
<comment xml:lang="fr">données géographiques GPX</comment>
+ <comment xml:lang="ga">sonraí geografacha GPX</comment>
<comment xml:lang="he">נתונים גאוגרפיים GPX</comment>
<comment xml:lang="hr">GPX geografski podaci</comment>
<comment xml:lang="hu">GPX földrajzi adatok</comment>
@@ -37630,13 +38887,13 @@
<comment xml:lang="oc">Donadas geograficas GPX</comment>
<comment xml:lang="pl">Dane geograficzne GPX</comment>
<comment xml:lang="pt_BR">Dados geográficos GPX</comment>
- <comment xml:lang="ru">географические данные GPX</comment>
+ <comment xml:lang="ru">Географические данные GPX</comment>
<comment xml:lang="sk">Zemepisné údaje GPX</comment>
<comment xml:lang="sr">ГПИкс географски подаци</comment>
<comment xml:lang="sv">GPX geografisk data</comment>
<comment xml:lang="tr">GPX coğrafi verileri</comment>
<comment xml:lang="uk">географічні дані GPX</comment>
- <comment xml:lang="zh_CN">GPX 地理空间数据</comment>
+ <comment xml:lang="zh_CN">GPX 地理数据</comment>
<comment xml:lang="zh_TW">GPX 地理資料</comment>
<acronym>GPX</acronym>
<expanded-acronym>GPS Exchange Format</expanded-acronym>
@@ -37686,7 +38943,7 @@
<comment xml:lang="pt">ficheiro de definições Citrix ICA</comment>
<comment xml:lang="pt_BR">Arquivo de configuração do Citrix ICA</comment>
<comment xml:lang="ro">Fișier de configurări Citrix ICA</comment>
- <comment xml:lang="ru">файл настроек Citrix ICA</comment>
+ <comment xml:lang="ru">Файл настроек Citrix ICA</comment>
<comment xml:lang="sk">Súbor nastavení Citrix ICA</comment>
<comment xml:lang="sl">Nastavitvena datoteka Citrix ICA</comment>
<comment xml:lang="sq">File rregullimesh Citrix ICA</comment>
@@ -37706,6 +38963,7 @@
<mime-type type="application/vnd.mozilla.xul+xml">
<comment>XUL interface document</comment>
<comment xml:lang="ar">مستند واجهة XUL</comment>
+ <comment xml:lang="ast">Documentu d'interfaz XUL</comment>
<comment xml:lang="be@latin">Interfejsny dakument XUL</comment>
<comment xml:lang="bg">Документ — интерфейс за XUL</comment>
<comment xml:lang="ca">document d'interfície XUL</comment>
@@ -37740,7 +38998,7 @@
<comment xml:lang="pt">documento de ambiente XUL</comment>
<comment xml:lang="pt_BR">Documento de interface XUL</comment>
<comment xml:lang="ro">Document interfață XUL</comment>
- <comment xml:lang="ru">документ интерфейса XUL</comment>
+ <comment xml:lang="ru">Документ интерфейса XUL</comment>
<comment xml:lang="sk">Dokument rozhrania XUL</comment>
<comment xml:lang="sl">Dokument vmesnika XUL</comment>
<comment xml:lang="sq">Dokument interfaqe XUL</comment>
@@ -37792,7 +39050,7 @@
<comment xml:lang="pt">módulo de instalador XPInstall</comment>
<comment xml:lang="pt_BR">Módulo de instalador XPInstall</comment>
<comment xml:lang="ro">Modul de instalare XPInstall</comment>
- <comment xml:lang="ru">модуль установщика XPInstall</comment>
+ <comment xml:lang="ru">Модуль установщика XPInstall</comment>
<comment xml:lang="sk">Modul inštalátora XPInstall</comment>
<comment xml:lang="sl">modul namestilnika XPInstall</comment>
<comment xml:lang="sr">модул инсталатера Инсталирања ИксПе-а</comment>
@@ -37807,6 +39065,7 @@
<mime-type type="application/vnd.openxmlformats-officedocument.wordprocessingml.document">
<comment>Word 2007 document</comment>
<comment xml:lang="ar">مستند Word 2007</comment>
+ <comment xml:lang="ast">Documentu de Word 2007</comment>
<comment xml:lang="bg">Документ — Word 2007</comment>
<comment xml:lang="ca">document de Word 2007</comment>
<comment xml:lang="cs">dokument Word 2007</comment>
@@ -37838,7 +39097,7 @@
<comment xml:lang="pt">documento Word 2007</comment>
<comment xml:lang="pt_BR">Documento do Word 2007</comment>
<comment xml:lang="ro">Document Word 2007</comment>
- <comment xml:lang="ru">документ Word 2007</comment>
+ <comment xml:lang="ru">Документ Word 2007</comment>
<comment xml:lang="sk">Dokument Word 2007</comment>
<comment xml:lang="sl">Dokument Word 2007</comment>
<comment xml:lang="sr">документ Ворда 2007</comment>
@@ -37846,7 +39105,7 @@
<comment xml:lang="tr">Word 2007 belgesi</comment>
<comment xml:lang="uk">документ Word 2007</comment>
<comment xml:lang="vi">Tài liệu Word 2007</comment>
- <comment xml:lang="zh_CN">Microsoft Word 2007 文档</comment>
+ <comment xml:lang="zh_CN">Word 2007 文档</comment>
<comment xml:lang="zh_TW">Word 2007 文件</comment>
<glob pattern="*.docx"/>
<sub-class-of type="application/zip"/>
@@ -37854,6 +39113,7 @@
</mime-type>
<mime-type type="application/vnd.openxmlformats-officedocument.wordprocessingml.template">
<comment>Word 2007 document template</comment>
+ <comment xml:lang="ast">Plantía de documentu de Word 2007</comment>
<comment xml:lang="bg">Шаблон за документи — Word 2007</comment>
<comment xml:lang="ca">plantilla de document de Word 2007</comment>
<comment xml:lang="cs">šablona dokumentu Word 2007</comment>
@@ -37865,6 +39125,7 @@
<comment xml:lang="eu">Word 2007 dokumentuaren txantiloia</comment>
<comment xml:lang="fi">Word 2007 -asiakirjamalli</comment>
<comment xml:lang="fr">modèle de document Word 2007</comment>
+ <comment xml:lang="ga">teimpléad cháipéis Word 2007</comment>
<comment xml:lang="gl">Plantilla de documento de Word 2007</comment>
<comment xml:lang="he">תבנית מסמך של Word 2007</comment>
<comment xml:lang="hr">Word 2007 predložak dokumenta</comment>
@@ -37882,7 +39143,7 @@
<comment xml:lang="pl">Szablon dokumentu Word 2007</comment>
<comment xml:lang="pt">modelo de documento Word 2007</comment>
<comment xml:lang="pt_BR">Modelo de documento do Word 2007</comment>
- <comment xml:lang="ru">шаблон документа Word 2007</comment>
+ <comment xml:lang="ru">Шаблон документа Word 2007</comment>
<comment xml:lang="sk">Šablóna dokumentu Word 2007</comment>
<comment xml:lang="sl">Predloga dokumenta Word 2007</comment>
<comment xml:lang="sr">шаблон документа Ворда 2007</comment>
@@ -37929,7 +39190,7 @@
<comment xml:lang="pt">apresentação PowerPoint 2007</comment>
<comment xml:lang="pt_BR">Apresentação do PowerPoint 2007</comment>
<comment xml:lang="ro">Prezentare PowerPoint 2007</comment>
- <comment xml:lang="ru">презентация PowerPoint 2007</comment>
+ <comment xml:lang="ru">Презентация PowerPoint 2007</comment>
<comment xml:lang="sk">Prezentácia PowerPoint 2007</comment>
<comment xml:lang="sl">Predstavitev Microsoft PowerPoint 2007</comment>
<comment xml:lang="sr">презентација Пауер Поинта 2007</comment>
@@ -37937,7 +39198,7 @@
<comment xml:lang="tr">PowerPoint 2007 sunumu</comment>
<comment xml:lang="uk">презентація PowerPoint 2007</comment>
<comment xml:lang="vi">Trình diễn PowerPoint 2007</comment>
- <comment xml:lang="zh_CN">Microsoft PowerPoint 2007 演示文稿</comment>
+ <comment xml:lang="zh_CN">PowerPoint 2007 演示文稿</comment>
<comment xml:lang="zh_TW">PowerPoint 2007 簡報</comment>
<glob pattern="*.pptx"/>
<sub-class-of type="application/zip"/>
@@ -37956,9 +39217,10 @@
<comment xml:lang="eu">PowerPoint 2007 diapositiba</comment>
<comment xml:lang="fi">PowerPoint 2007 -dia</comment>
<comment xml:lang="fr">diapositive PowerPoint 2007</comment>
+ <comment xml:lang="ga">sleamhnán PowerPoint 2007</comment>
<comment xml:lang="gl">Diaporama de PowerPoint 2007</comment>
<comment xml:lang="he">שקופית של PowerPoint 2007</comment>
- <comment xml:lang="hr">PowerPoint 2007 slajd</comment>
+ <comment xml:lang="hr">PowerPoint 2007 slikovna prezentacija</comment>
<comment xml:lang="hu">PowerPoint 2007 dia</comment>
<comment xml:lang="ia">Diapositiva PowerPoint 2007</comment>
<comment xml:lang="id">Slide PowerPoint 2007</comment>
@@ -37973,14 +39235,14 @@
<comment xml:lang="pl">Slajd PowerPoint 2007</comment>
<comment xml:lang="pt">diapositivo PowerPoint 2007</comment>
<comment xml:lang="pt_BR">Slide do PowerPoint 2007</comment>
- <comment xml:lang="ru">слайд PowerPoint 2007</comment>
+ <comment xml:lang="ru">Слайд PowerPoint 2007</comment>
<comment xml:lang="sk">Snímka PowerPoint 2007</comment>
<comment xml:lang="sl">Prosojnica PowerPoint 2007</comment>
<comment xml:lang="sr">слајд Пауер Поинта 2007</comment>
<comment xml:lang="sv">PowerPoint 2007-bildspel</comment>
<comment xml:lang="tr">PowerPoint 2007 slaytı</comment>
<comment xml:lang="uk">слайд PowerPoint 2007</comment>
- <comment xml:lang="zh_CN">PowerPoint 2007 文稿</comment>
+ <comment xml:lang="zh_CN">PowerPoint 2007 幻灯片</comment>
<comment xml:lang="zh_TW">PowerPoint 2007 投影片</comment>
<glob pattern="*.sldx"/>
<sub-class-of type="application/zip"/>
@@ -38020,14 +39282,14 @@
<comment xml:lang="pt">espetáculo PowerPoint 2007</comment>
<comment xml:lang="pt_BR">Apresentação do PowerPoint 2007</comment>
<comment xml:lang="ro">Prezentare PowerPoint 2007</comment>
- <comment xml:lang="ru">презентация PowerPoint 2007</comment>
+ <comment xml:lang="ru">Презентация PowerPoint 2007</comment>
<comment xml:lang="sk">Ukážka PowerPoint 2007</comment>
<comment xml:lang="sl">Zagonska predstavitev PowerPoint 2007</comment>
<comment xml:lang="sr">приказ Пауер Поинта 2007</comment>
<comment xml:lang="sv">PowerPoint 2007-visning</comment>
<comment xml:lang="tr">PowerPoint 2007 gösterisi</comment>
<comment xml:lang="uk">показ слайдів PowerPoint 2007</comment>
- <comment xml:lang="zh_CN">Microsoft PowerPoint 2007 演示文稿</comment>
+ <comment xml:lang="zh_CN">PowerPoint 2007 放映</comment>
<comment xml:lang="zh_TW">PowerPoint 2007 展示</comment>
<glob pattern="*.ppsx"/>
<sub-class-of type="application/zip"/>
@@ -38046,6 +39308,7 @@
<comment xml:lang="eu">PowerPoint 2007 aurkezpen txantiloia</comment>
<comment xml:lang="fi">PowerPoint 2007 -esitysmalli</comment>
<comment xml:lang="fr">modèle de présentation PowerPoint 2007</comment>
+ <comment xml:lang="ga">teimpléad láithreoireachta PowerPoint 2007</comment>
<comment xml:lang="gl">modelo de presentación de PowerPoint 2007</comment>
<comment xml:lang="he">תבנית למצגת של PowerPoint 2007</comment>
<comment xml:lang="hr">PowerPoint 2007 predložak prezentacije</comment>
@@ -38063,7 +39326,7 @@
<comment xml:lang="pl">Szablon prezentacji PowerPoint 2007</comment>
<comment xml:lang="pt">modelo de apresentação PowerPoint 2007</comment>
<comment xml:lang="pt_BR">Modelo de apresentação do PowerPoint 2007</comment>
- <comment xml:lang="ru">шаблон презентации PowerPoint 2007</comment>
+ <comment xml:lang="ru">Шаблон презентации PowerPoint 2007</comment>
<comment xml:lang="sk">Šablóna prezentácie PowerPoint 2007</comment>
<comment xml:lang="sl">Predloga predstavitve PowerPoint 2007</comment>
<comment xml:lang="sr">шаблон презентације Пауер Поинта 2007</comment>
@@ -38111,7 +39374,7 @@
<comment xml:lang="pt">folha de cálculo Excel 2007</comment>
<comment xml:lang="pt_BR">Planilha do Excel 2007</comment>
<comment xml:lang="ro">Foaie de calcul Excel 2007</comment>
- <comment xml:lang="ru">электронная таблица Excel 2007</comment>
+ <comment xml:lang="ru">Электронная таблица Excel 2007</comment>
<comment xml:lang="sk">Zošit Excel 2007</comment>
<comment xml:lang="sl">Razpredelnica Microsoft Excel 2007</comment>
<comment xml:lang="sr">табела Ексела 2007</comment>
@@ -38119,7 +39382,7 @@
<comment xml:lang="tr">Excel 2007 çalışma sayfası</comment>
<comment xml:lang="uk">ел. таблиця Excel 2007</comment>
<comment xml:lang="vi">Bảng tính Excel 2007</comment>
- <comment xml:lang="zh_CN">Microsoft Excel 2007 工作簿</comment>
+ <comment xml:lang="zh_CN">Excel 2007 电子表格</comment>
<comment xml:lang="zh_TW">Excel 2007 試算表</comment>
<glob pattern="*.xlsx"/>
<sub-class-of type="application/zip"/>
@@ -38138,6 +39401,7 @@
<comment xml:lang="eu">Excel 2007 kalkulu-orri txantiloia</comment>
<comment xml:lang="fi">Excel 2007 -taulukkomalli</comment>
<comment xml:lang="fr">modèle de feuille de calcul Excel 2007</comment>
+ <comment xml:lang="ga">teimpléad scarbhileoige Excel 2007</comment>
<comment xml:lang="gl">modelo de folla de cálculo Excel 2007</comment>
<comment xml:lang="he">תבנית של גיליון נתונים של Excel 2007</comment>
<comment xml:lang="hr">Excel 2007 predložak proračunske tablice</comment>
@@ -38155,14 +39419,14 @@
<comment xml:lang="pl">Szablon arkusza Excel 2007</comment>
<comment xml:lang="pt">modelo de folha de cálculo Excel 2007</comment>
<comment xml:lang="pt_BR">Modelo de planilha do Excel 2007</comment>
- <comment xml:lang="ru">шаблон электронной таблицы Excel 2007</comment>
+ <comment xml:lang="ru">Шаблон электронной таблицы Excel 2007</comment>
<comment xml:lang="sk">Šablóna zošitu Excel 2007</comment>
<comment xml:lang="sl">Predloga razpredelnice Excel 2007</comment>
<comment xml:lang="sr">шаблон табеле Ексела 2007</comment>
<comment xml:lang="sv">Excel 2007-kalkylarksmall</comment>
<comment xml:lang="tr">Excel 2007 çalışma sayfası şablonu</comment>
<comment xml:lang="uk">шаблон електронної таблиці Excel 2007</comment>
- <comment xml:lang="zh_CN">Excel 2007 工作表模板</comment>
+ <comment xml:lang="zh_CN">Excel 2007 电子表格模板</comment>
<comment xml:lang="zh_TW">Excel 2007 試算表範本</comment>
<glob pattern="*.xltx"/>
<sub-class-of type="application/zip"/>
@@ -38171,6 +39435,7 @@
<mime-type type="application/x-t602">
<comment>T602 document</comment>
<comment xml:lang="ar">مستند T602</comment>
+ <comment xml:lang="ast">Documentu T602</comment>
<comment xml:lang="be@latin">Dakument T602</comment>
<comment xml:lang="bg">Документ — T602</comment>
<comment xml:lang="ca">document T602</comment>
@@ -38206,7 +39471,7 @@
<comment xml:lang="pt">documento T602</comment>
<comment xml:lang="pt_BR">Documento T602</comment>
<comment xml:lang="ro">Document T602</comment>
- <comment xml:lang="ru">документ T602</comment>
+ <comment xml:lang="ru">Документ T602</comment>
<comment xml:lang="sk">Dokument T602</comment>
<comment xml:lang="sl">Dokument T602</comment>
<comment xml:lang="sq">Dokument T602</comment>
@@ -38263,7 +39528,7 @@
<comment xml:lang="pt">definições de Cisco VPN</comment>
<comment xml:lang="pt_BR">Configurações de VPN da Cisco</comment>
<comment xml:lang="ro">Configurări VPN Cisco</comment>
- <comment xml:lang="ru">файл настроек Cisco VPN</comment>
+ <comment xml:lang="ru">Файл настроек Cisco VPN</comment>
<comment xml:lang="sk">Nastavenia Cisco VPN</comment>
<comment xml:lang="sl">Datoteka nastavitev Cisco VPN</comment>
<comment xml:lang="sq">Rregullime VPN Cisco</comment>
@@ -38285,6 +39550,7 @@
<mime-type type="application/vnd.iccprofile">
<comment>ICC profile</comment>
<comment xml:lang="ar">تشكيلة OCL</comment>
+ <comment xml:lang="ast">Perfil ICC</comment>
<comment xml:lang="bg">Цветови профил — OCL</comment>
<comment xml:lang="ca">perfil ICC</comment>
<comment xml:lang="cs">profil ICC</comment>
@@ -38317,14 +39583,14 @@
<comment xml:lang="pt">perfil ICC</comment>
<comment xml:lang="pt_BR">Perfil ICC</comment>
<comment xml:lang="ro">Profil ICC</comment>
- <comment xml:lang="ru">профиль ICC</comment>
+ <comment xml:lang="ru">Профиль ICC</comment>
<comment xml:lang="sk">Profil farieb ICC</comment>
<comment xml:lang="sl">Datoteka profila ICC</comment>
<comment xml:lang="sr">ИЦЦ профил</comment>
<comment xml:lang="sv">ICC-profil</comment>
<comment xml:lang="tr">ICC profili</comment>
<comment xml:lang="uk">профіль ICC</comment>
- <comment xml:lang="zh_CN">ICC 文件</comment>
+ <comment xml:lang="zh_CN">ICC 配置文件</comment>
<comment xml:lang="zh_TW">ICC 設定檔</comment>
<magic priority="50">
<match value="acsp" type="string" offset="36"/>
@@ -38366,7 +39632,7 @@
<comment xml:lang="pt">ficheiro de calibração de cor IT 8.7</comment>
<comment xml:lang="pt_BR">Arquivo de calibração de cor IT 8.7</comment>
<comment xml:lang="ro">Fișier de calibrare a culorii IT 8.7</comment>
- <comment xml:lang="ru">файл калибровки цвета IT 8.7</comment>
+ <comment xml:lang="ru">Файл калибровки цвета IT 8.7</comment>
<comment xml:lang="sk">Súbor kalibrácie farieb IT 8.7</comment>
<comment xml:lang="sl">Umeritvena datoteka barve IT 8.7</comment>
<comment xml:lang="sr">ИТ 8.7 датотека калибрације боје</comment>
@@ -38394,6 +39660,7 @@
<comment xml:lang="eu">CCMX kolore-kalibrazioaren fitxategia</comment>
<comment xml:lang="fi">CCMX-värikorjaustiedosto</comment>
<comment xml:lang="fr">fichier de correction colorimétrique CCMX</comment>
+ <comment xml:lang="ga">comhad ceartúchán dathanna CCMX</comment>
<comment xml:lang="gl">Ficheiro de corrección de cor CCMX</comment>
<comment xml:lang="he">קובץ תיקון צבע מסוג CCMX</comment>
<comment xml:lang="hr">CCMX datotkea ispravka boja</comment>
@@ -38409,7 +39676,7 @@
<comment xml:lang="pl">Plik korekcji kolorów CCMX</comment>
<comment xml:lang="pt">ficheiro de correção de cor CCMX</comment>
<comment xml:lang="pt_BR">Arquivo de correção de cor CCMX</comment>
- <comment xml:lang="ru">файл цветовой коррекции CCMX</comment>
+ <comment xml:lang="ru">Файл цветовой коррекции CCMX</comment>
<comment xml:lang="sk">Súbor korekcie farieb CCMX</comment>
<comment xml:lang="sl">Datoteka barvne poprave CCMX</comment>
<comment xml:lang="sr">ЦЦМИкс датотека поправке боје</comment>
@@ -38437,6 +39704,7 @@
<comment xml:lang="eu">WinHelp laguntza fitxategia</comment>
<comment xml:lang="fi">WinHelp-ohjetiedosto</comment>
<comment xml:lang="fr">fichier d'aide WinHelp</comment>
+ <comment xml:lang="ga">comhad cabhrach WinHelp</comment>
<comment xml:lang="gl">Ficheiro de axuda WinHelp</comment>
<comment xml:lang="he">קובץ עזרה מסוג WinHelp</comment>
<comment xml:lang="hr">WinHelp datoteka pomoći</comment>
@@ -38452,7 +39720,7 @@
<comment xml:lang="pl">Plik pomocy WinHelp</comment>
<comment xml:lang="pt">ficheiro de ajuda WinHelp</comment>
<comment xml:lang="pt_BR">Arquivo de ajuda WinHelp</comment>
- <comment xml:lang="ru">файл справки WinHelp</comment>
+ <comment xml:lang="ru">Файл справки WinHelp</comment>
<comment xml:lang="sk">Súbor Pomocníka WinHelp</comment>
<comment xml:lang="sl">Datoteka pomoči WinHelp</comment>
<comment xml:lang="sr">датотека помоћи Вин хелпа</comment>
@@ -38470,18 +39738,28 @@
<mime-type type="application/x-bsdiff">
<comment>binary differences between files</comment>
<comment xml:lang="ca">diferencies binàries entre fitxers</comment>
+ <comment xml:lang="cs">binární rozdíl mezi soubory</comment>
<comment xml:lang="da">binære forskelle mellem filer</comment>
<comment xml:lang="de">binäre Unterschiede zwischen Dateien</comment>
+ <comment xml:lang="en_GB">binary differences between files</comment>
<comment xml:lang="es">diferencias entre archivos binarios</comment>
+ <comment xml:lang="eu">fitxategi binarioen arteko ezberdinstasunak</comment>
<comment xml:lang="fr">différences binaires entre fichiers</comment>
+ <comment xml:lang="ga">difríochtaí dénártha idir comhaid</comment>
<comment xml:lang="he">הבדלים בינריים בין קבצים</comment>
+ <comment xml:lang="hr">Binarne razlike između datoteka</comment>
<comment xml:lang="hu">bináris különbségfájl</comment>
+ <comment xml:lang="id">perbedaan biner antar berkas</comment>
+ <comment xml:lang="it">Differenze binarie tra file</comment>
<comment xml:lang="kk">файлдар арасындағы бинарлық айырмашылықтар</comment>
<comment xml:lang="ko">바이너리 차이 비교 파일</comment>
<comment xml:lang="pl">Binarna różnica pomiędzy plikami</comment>
<comment xml:lang="pt_BR">Diferenças binárias entre arquivos</comment>
- <comment xml:lang="ru">двоичные различия между файлами</comment>
+ <comment xml:lang="ru">Двоичные различия между файлами</comment>
<comment xml:lang="sk">Binárne rozdiely medzi súbormi</comment>
+ <comment xml:lang="sr">бинарне разлике датотека</comment>
+ <comment xml:lang="sv">binära skillnader mellan filer</comment>
+ <comment xml:lang="tr">dosyalar arasındaki ikilik farklar</comment>
<comment xml:lang="uk">двійкова різниця між файлами</comment>
<comment xml:lang="zh_CN">文件的二进制区别</comment>
<comment xml:lang="zh_TW">檔案間的二進位差異</comment>
@@ -38513,7 +39791,7 @@
<comment xml:lang="ga">grianghraif dhigiteacha</comment>
<comment xml:lang="gl">fotos dixitais</comment>
<comment xml:lang="he">תמונות דיגיטליות</comment>
- <comment xml:lang="hr">digitalne fotografije</comment>
+ <comment xml:lang="hr">Digitalne fotografije</comment>
<comment xml:lang="hu">digitális fényképek</comment>
<comment xml:lang="ia">Photos digital</comment>
<comment xml:lang="id">foto digital</comment>
@@ -38530,7 +39808,7 @@
<comment xml:lang="pt">fotografias digitais</comment>
<comment xml:lang="pt_BR">Fotos digitais</comment>
<comment xml:lang="ro">fotografii digitale</comment>
- <comment xml:lang="ru">цифровые фотографии</comment>
+ <comment xml:lang="ru">Цифровые фотографии</comment>
<comment xml:lang="sk">Digitálne fotografie</comment>
<comment xml:lang="sl">digitalne fotografije</comment>
<comment xml:lang="sq">Fotografi dixhitale</comment>
@@ -38550,6 +39828,7 @@
<comment>Video CD</comment>
<comment xml:lang="ar">Video CD</comment>
+ <comment xml:lang="ast">CD de videu</comment>
<comment xml:lang="be@latin">Videa CD</comment>
<comment xml:lang="bg">CD — видео</comment>
<comment xml:lang="ca">Video CD</comment>
@@ -38564,7 +39843,7 @@
<comment xml:lang="fi">Video CD</comment>
<comment xml:lang="fo">Video CD</comment>
<comment xml:lang="fr">CD vidéo</comment>
- <comment xml:lang="ga">Video CD</comment>
+ <comment xml:lang="ga">dlúthdhiosca físe</comment>
<comment xml:lang="gl">Video CD</comment>
<comment xml:lang="he">תקליטור וידאו</comment>
<comment xml:lang="hr">Video CD</comment>
@@ -38584,7 +39863,7 @@
<comment xml:lang="pt">Video CD</comment>
<comment xml:lang="pt_BR">CD de vídeo</comment>
<comment xml:lang="ro">CD video</comment>
- <comment xml:lang="ru">видеодиск VCD</comment>
+ <comment xml:lang="ru">Видео CD</comment>
<comment xml:lang="sk">Video CD</comment>
<comment xml:lang="sl">Video CD</comment>
<comment xml:lang="sq">CD Video</comment>
@@ -38604,6 +39883,7 @@
<comment>Super Video CD</comment>
<comment xml:lang="ar">Super Video CD</comment>
+ <comment xml:lang="ast">CD de Super Video</comment>
<comment xml:lang="be@latin">Super Video CD</comment>
<comment xml:lang="bg">CD — супер видео</comment>
<comment xml:lang="ca">Super Video CD</comment>
@@ -38618,7 +39898,7 @@
<comment xml:lang="fi">Super Video CD</comment>
<comment xml:lang="fo">Super Video CD</comment>
<comment xml:lang="fr">Super VCD</comment>
- <comment xml:lang="ga">Super Video CD</comment>
+ <comment xml:lang="ga">dlúthdhiosca Super Video</comment>
<comment xml:lang="gl">Super vídeo CD</comment>
<comment xml:lang="he">Super Video CD</comment>
<comment xml:lang="hr">Super Video CD</comment>
@@ -38638,7 +39918,7 @@
<comment xml:lang="pt">Super Video CD</comment>
<comment xml:lang="pt_BR">CD de Super Vídeo (SVCD)</comment>
<comment xml:lang="ro">Super Video CD</comment>
- <comment xml:lang="ru">компакт-диск Super Video</comment>
+ <comment xml:lang="ru">Super Video CD</comment>
<comment xml:lang="sk">Super Video CD</comment>
<comment xml:lang="sl">Super Video CD</comment>
<comment xml:lang="sq">CD Super Video</comment>
@@ -38658,6 +39938,7 @@
<comment>video DVD</comment>
<comment xml:lang="ar">DVD مرئي</comment>
+ <comment xml:lang="ast">DVD de videu</comment>
<comment xml:lang="be@latin">videa DVD</comment>
<comment xml:lang="bg">DVD — видео</comment>
<comment xml:lang="ca">DVD-Video</comment>
@@ -38675,7 +39956,7 @@
<comment xml:lang="ga">DVD físe</comment>
<comment xml:lang="gl">DVD de vídeo</comment>
<comment xml:lang="he">DVD וידאו</comment>
- <comment xml:lang="hr">video DVD</comment>
+ <comment xml:lang="hr">Video DVD</comment>
<comment xml:lang="hu">video DVD</comment>
<comment xml:lang="ia">DVD video</comment>
<comment xml:lang="id">DVD video</comment>
@@ -38693,7 +39974,7 @@
<comment xml:lang="pt">DVD vídeo</comment>
<comment xml:lang="pt_BR">DVD de vídeo</comment>
<comment xml:lang="ro">DVD video</comment>
- <comment xml:lang="ru">видео-DVD</comment>
+ <comment xml:lang="ru">Видео DVD</comment>
<comment xml:lang="sk">DVD-Video</comment>
<comment xml:lang="sl">video DVD</comment>
<comment xml:lang="sq">DVD video</comment>
@@ -38750,7 +40031,7 @@
<comment xml:lang="pt">CD áudio</comment>
<comment xml:lang="pt_BR">CD de áudio</comment>
<comment xml:lang="ro">CD audio</comment>
- <comment xml:lang="ru">звуковой CD</comment>
+ <comment xml:lang="ru">Аудио CD</comment>
<comment xml:lang="sk">Zvukové CD</comment>
<comment xml:lang="sl">zvočni CD</comment>
<comment xml:lang="sq">CD audio</comment>
@@ -38800,7 +40081,7 @@
<comment xml:lang="pt">CD vazio</comment>
<comment xml:lang="pt_BR">Disco CD vazio</comment>
<comment xml:lang="ro">disc gol CD</comment>
- <comment xml:lang="ru">чистый компакт-диск</comment>
+ <comment xml:lang="ru">Чистый диск CD</comment>
<comment xml:lang="sk">Prázdny disk CD</comment>
<comment xml:lang="sl">prazen CD disk</comment>
<comment xml:lang="sq">Disk bosh CD</comment>
@@ -38850,7 +40131,7 @@
<comment xml:lang="pt">DVD vazio</comment>
<comment xml:lang="pt_BR">Disco DVD vazio</comment>
<comment xml:lang="ro">disc gol DVD</comment>
- <comment xml:lang="ru">чистый диск DVD</comment>
+ <comment xml:lang="ru">Чистый диск DVD</comment>
<comment xml:lang="sk">Prázdny disk DVD</comment>
<comment xml:lang="sl">prazen DVD disk</comment>
<comment xml:lang="sq">Disk bosh DVD</comment>
@@ -38900,7 +40181,7 @@
<comment xml:lang="pt">Blu-Ray vazio</comment>
<comment xml:lang="pt_BR">Disco Blu-ray vazio</comment>
<comment xml:lang="ro">disc gol Blu-ray</comment>
- <comment xml:lang="ru">чистый диск Blu-ray</comment>
+ <comment xml:lang="ru">Чистый диск Blu-ray</comment>
<comment xml:lang="sk">Prázdny disk Blu-ray</comment>
<comment xml:lang="sl">prazen Blu-Ray disk</comment>
<comment xml:lang="sq">Disk bosh Blu-ray</comment>
@@ -38950,7 +40231,7 @@
<comment xml:lang="pt">HD DVD vazio</comment>
<comment xml:lang="pt_BR">Disco HD DVD vazio</comment>
<comment xml:lang="ro">disc gol HD DVD</comment>
- <comment xml:lang="ru">чистый диск HD DVD</comment>
+ <comment xml:lang="ru">Чистый диск HD DVD</comment>
<comment xml:lang="sk">Prázdny disk HD DVD</comment>
<comment xml:lang="sl">prazen HD DVD disk</comment>
<comment xml:lang="sq">Disk bosh DVD HD</comment>
@@ -39001,7 +40282,7 @@
<comment xml:lang="pt">DVD áudio</comment>
<comment xml:lang="pt_BR">DVD de áudio</comment>
<comment xml:lang="ro">DVD audio</comment>
- <comment xml:lang="ru">звуковой DVD</comment>
+ <comment xml:lang="ru">Аудио DVD</comment>
<comment xml:lang="sk">Zvukové DVD</comment>
<comment xml:lang="sl">zvočni DVD</comment>
<comment xml:lang="sq">DVD audio</comment>
@@ -39022,6 +40303,7 @@
<comment>Blu-ray video disc</comment>
<comment xml:lang="ar">قرص بلو-راي مرئي</comment>
+ <comment xml:lang="ast">Discu Blu-ray de videu</comment>
<comment xml:lang="be@latin">Videadysk Blu-ray</comment>
<comment xml:lang="bg">Blu-ray — видео</comment>
<comment xml:lang="ca">disc de vídeo Blu-Ray</comment>
@@ -39056,7 +40338,7 @@
<comment xml:lang="pt">Blu-ray de vídeo</comment>
<comment xml:lang="pt_BR">Disco de vídeo Blu-ray</comment>
<comment xml:lang="ro">Disc video Blu-ray</comment>
- <comment xml:lang="ru">видеодиск Blu-ray</comment>
+ <comment xml:lang="ru">Видеодиск Blu-ray</comment>
<comment xml:lang="sk">Videodisk Blu-ray</comment>
<comment xml:lang="sl">Blu-ray video disk</comment>
<comment xml:lang="sq">Disk video Blu-ray</comment>
@@ -39077,6 +40359,7 @@
<comment>HD DVD video disc</comment>
<comment xml:lang="ar">قرص HD DVD مرئي</comment>
+ <comment xml:lang="ast">Discu HD DVD de videu</comment>
<comment xml:lang="be@latin">Videadysk HD DVD</comment>
<comment xml:lang="bg">HD DVD — видео</comment>
<comment xml:lang="ca">disc de vídeo HD-DVD</comment>
@@ -39110,7 +40393,7 @@
<comment xml:lang="pt">HD DVD de vídeo</comment>
<comment xml:lang="pt_BR">Disco de vídeo HD DVD</comment>
<comment xml:lang="ro">Disc video HD DVD</comment>
- <comment xml:lang="ru">видеодиск HD DVD</comment>
+ <comment xml:lang="ru">Видеодиск HD DVD</comment>
<comment xml:lang="sk">Videodisk HD DVD</comment>
<comment xml:lang="sl">HD DVD video disk</comment>
<comment xml:lang="sq">Disk video DVD HD</comment>
@@ -39142,9 +40425,10 @@
<comment xml:lang="eu">e-book irakurlea</comment>
<comment xml:lang="fi">e-kirjan lukulaite</comment>
<comment xml:lang="fr">lecteur de livre numérique</comment>
+ <comment xml:lang="ga">léitheoir r-leabhair</comment>
<comment xml:lang="gl">lector de libros electrónicos</comment>
<comment xml:lang="he">קורא ספרים אלקטרוניים</comment>
- <comment xml:lang="hr">čitač e-knjiga</comment>
+ <comment xml:lang="hr">Čitač e-knjiga</comment>
<comment xml:lang="hu">e-könyvolvasó</comment>
<comment xml:lang="ia">Lector de libro electronic</comment>
<comment xml:lang="id">Pembaca e-book</comment>
@@ -39158,7 +40442,7 @@
<comment xml:lang="pl">Czytnik e-booków</comment>
<comment xml:lang="pt">leitor de ebooks</comment>
<comment xml:lang="pt_BR">Leitor de e-book</comment>
- <comment xml:lang="ru">устройство для чтения электронных книг</comment>
+ <comment xml:lang="ru">Устройство для чтения электронных книг</comment>
<comment xml:lang="sk">Čítačka e-kníh</comment>
<comment xml:lang="sl">Bralnik elektronskih knjig</comment>
<comment xml:lang="sr">читач ел. књига</comment>
@@ -39190,7 +40474,7 @@
<comment xml:lang="fi">Picture CD</comment>
<comment xml:lang="fo">Picture CD</comment>
<comment xml:lang="fr">CD Picture</comment>
- <comment xml:lang="ga">Picture CD</comment>
+ <comment xml:lang="ga">dlúthdhiosca grianghraf</comment>
<comment xml:lang="gl">Picture CD</comment>
<comment xml:lang="he">תקליטור תמונות</comment>
<comment xml:lang="hr">Slikovni CD</comment>
@@ -39246,7 +40530,7 @@
<comment xml:lang="ga">seinnteoir iniompartha fuaime</comment>
<comment xml:lang="gl">dispositivo de son portábel</comment>
<comment xml:lang="he">נגן מוזיקה נייד</comment>
- <comment xml:lang="hr">prenosivi audio svirač</comment>
+ <comment xml:lang="hr">Prenosivi glazbeni svirač</comment>
<comment xml:lang="hu">hordozható zenelejátszó</comment>
<comment xml:lang="ia">Lector audio portabile</comment>
<comment xml:lang="id">pemutar audio portable</comment>
@@ -39263,7 +40547,7 @@
<comment xml:lang="pt">reprodutor áudio portátil</comment>
<comment xml:lang="pt_BR">Reprodutor de áudio portátil</comment>
<comment xml:lang="ro">player audio portabil</comment>
- <comment xml:lang="ru">портативный аудиопроигрыватель</comment>
+ <comment xml:lang="ru">Портативный аудиопроигрыватель</comment>
<comment xml:lang="sk">Prenosný hudobný prehrávač</comment>
<comment xml:lang="sl">prenosni predvajalnik zvoka</comment>
<comment xml:lang="sq">Lexues audio portativ</comment>
@@ -39296,7 +40580,7 @@
<comment xml:lang="ga">bogearraí</comment>
<comment xml:lang="gl">software</comment>
<comment xml:lang="he">תכנה</comment>
- <comment xml:lang="hr">softver</comment>
+ <comment xml:lang="hr">Softver</comment>
<comment xml:lang="hu">szoftver</comment>
<comment xml:lang="ia">Software</comment>
<comment xml:lang="id">peranti lunak</comment>
@@ -39314,7 +40598,7 @@
<comment xml:lang="pt">programa</comment>
<comment xml:lang="pt_BR">Aplicativo</comment>
<comment xml:lang="ro">software</comment>
- <comment xml:lang="ru">программное обеспечение</comment>
+ <comment xml:lang="ru">Программное обеспечение</comment>
<comment xml:lang="sk">Softvér</comment>
<comment xml:lang="sl">programska oprema</comment>
<comment xml:lang="sq">Software</comment>
@@ -39362,7 +40646,7 @@
<comment xml:lang="pt">programa UNIX</comment>
<comment xml:lang="pt_BR">Aplicativo UNIX</comment>
<comment xml:lang="ro">Software UNIX</comment>
- <comment xml:lang="ru">программа UNIX</comment>
+ <comment xml:lang="ru">Программа UNIX</comment>
<comment xml:lang="sk">Softvér UNIX</comment>
<comment xml:lang="sl">Programska datoteka UNIX</comment>
<comment xml:lang="sr">ЈУНИКС-ов софтвер</comment>
@@ -39414,7 +40698,7 @@
<comment xml:lang="pt">programa Windows</comment>
<comment xml:lang="pt_BR">Programa do Windows</comment>
<comment xml:lang="ro">Software Windows</comment>
- <comment xml:lang="ru">программа Windows</comment>
+ <comment xml:lang="ru">Программа Windows</comment>
<comment xml:lang="sk">Softvér Windows</comment>
<comment xml:lang="sl">Programska oprema za okolje Windows</comment>
<comment xml:lang="sr">Виндоузов софтвер</comment>
@@ -39430,9 +40714,9 @@
</treemagic>
</mime-type>
- <mime-type type="application/x-trig">
-
+ <mime-type type="application/trig">
<comment>TriG RDF document</comment>
+ <comment xml:lang="ast">Documentu RDF TriG</comment>
<comment xml:lang="ca">document TriG RDF</comment>
<comment xml:lang="cs">dokument Trig RDF</comment>
<comment xml:lang="da">TriG RDF-dokument</comment>
@@ -39443,6 +40727,7 @@
<comment xml:lang="eu">TriG RDF dokumentua</comment>
<comment xml:lang="fi">TriG RDF -asiakirja</comment>
<comment xml:lang="fr">document RDF TriG</comment>
+ <comment xml:lang="ga">cáipéis RDF TriG</comment>
<comment xml:lang="gl">Documento RDF TriG</comment>
<comment xml:lang="he">מסמך RDF של TriG</comment>
<comment xml:lang="hr">TriG RDF dokument</comment>
@@ -39469,6 +40754,7 @@
<expanded-acronym>TriG RDF Graph Triple Language</expanded-acronym>
<sub-class-of type="text/plain"/>
<glob pattern="*.trig"/>
+ <alias type="application/x-trig"/>
</mime-type>
<mime-type type="application/x-iwork-keynote-sffkey">
@@ -39483,6 +40769,7 @@
<comment xml:lang="eu">Apple Keynote 5 aurkezpena</comment>
<comment xml:lang="fi">Apple Keynote 5 -esitys</comment>
<comment xml:lang="fr">présentation Apple Keynote 5</comment>
+ <comment xml:lang="ga">láithreoireacht Apple Keynote 5</comment>
<comment xml:lang="gl">Presentación de Apple Keynote 5</comment>
<comment xml:lang="he">מצגת Apple Keynote 5</comment>
<comment xml:lang="hr">Apple Keynote 5 prezentacija</comment>
@@ -39528,6 +40815,7 @@
<comment xml:lang="eu">Adobe PageMaker</comment>
<comment xml:lang="fi">Adobe PageMaker</comment>
<comment xml:lang="fr">Adobe PageMaker</comment>
+ <comment xml:lang="ga">Adobe PageMaker</comment>
<comment xml:lang="gl">Adobe PageMaker</comment>
<comment xml:lang="he">Adobe PageMaker</comment>
<comment xml:lang="hr">Adobe PageMaker</comment>
@@ -39568,6 +40856,7 @@
<comment xml:lang="es">WAD de Doom</comment>
<comment xml:lang="eu">Doom WAD</comment>
<comment xml:lang="fr">WAD Doom</comment>
+ <comment xml:lang="ga">WAD Doom</comment>
<comment xml:lang="hr">Doom WAD</comment>
<comment xml:lang="hu">Doom WAD</comment>
<comment xml:lang="ia">WAD pro Doom</comment>
@@ -39608,6 +40897,7 @@
<comment xml:lang="eu">Amiga disko irudia</comment>
<comment xml:lang="fi">Amiga-levytiedosto</comment>
<comment xml:lang="fr">image disque Amiga</comment>
+ <comment xml:lang="ga">íomhá diosca Amiga</comment>
<comment xml:lang="he">דמות כונן Amiga</comment>
<comment xml:lang="hr">Amiga slika diska</comment>
<comment xml:lang="hu">Amiga lemezkép</comment>
@@ -39615,18 +40905,18 @@
<comment xml:lang="id">Image disk Amiga</comment>
<comment xml:lang="it">Disco immagine Amiga</comment>
<comment xml:lang="kk">Amiga диск бейнесі</comment>
- <comment xml:lang="ko">아미가 디스크 이미지</comment>
+ <comment xml:lang="ko">Amiga 디스크 이미지</comment>
<comment xml:lang="oc">imatge disc Amiga</comment>
<comment xml:lang="pl">Obraz dysku Amiga</comment>
<comment xml:lang="pt">imagem de disco Amiga</comment>
<comment xml:lang="pt_BR">Imagem de disco Amiga</comment>
- <comment xml:lang="ru">образ диска Amiga</comment>
+ <comment xml:lang="ru">Образ диска Amiga</comment>
<comment xml:lang="sk">Obraz disku Amiga</comment>
<comment xml:lang="sr">слика диска Амиге</comment>
<comment xml:lang="sv">Amiga-diskavbild</comment>
<comment xml:lang="tr">Amiga disk kalıbı</comment>
<comment xml:lang="uk">образ диска Amiga</comment>
- <comment xml:lang="zh_CN">Amiga 磁盘镜像</comment>
+ <comment xml:lang="zh_CN">Amiga 磁盘映像</comment>
<comment xml:lang="zh_TW">Amiga 磁碟映像檔</comment>
<magic priority="50">
<match value="DOS\x00" type="string" offset="0"/>
@@ -39637,19 +40927,31 @@
<mime-type type="application/vnd.flatpak">
<comment>Flatpak application bundle</comment>
<comment xml:lang="ca">paquet d'aplicació Flatpak</comment>
+ <comment xml:lang="cs">balíček Flatpak s aplikací</comment>
<comment xml:lang="da">Flatpak-programsamling</comment>
<comment xml:lang="de">Flatpak-Anwendungspaket</comment>
+ <comment xml:lang="en_GB">Flatpak application bundle</comment>
<comment xml:lang="es">paquete de aplicación Flatpak</comment>
+ <comment xml:lang="eu">Flatpak aplikazio bilduma</comment>
+ <comment xml:lang="fi">Flatpak-sovelluspaketti</comment>
<comment xml:lang="fr">lot applicatif Flatpak</comment>
+ <comment xml:lang="ga">burla feidhmchláir Flatpak</comment>
+ <comment xml:lang="he">חבילת יישומי Flatpak</comment>
+ <comment xml:lang="hr">Flatpak paket aplikacije</comment>
<comment xml:lang="hu">Flatpak alkalmazáscsomag</comment>
+ <comment xml:lang="id">bundel aplikasi Flatpak</comment>
+ <comment xml:lang="it">Bundle applicazione Flatpak</comment>
<comment xml:lang="kk">Flatpak қолданбалар дестесі</comment>
<comment xml:lang="ko">Flatpak 프로그램 번들</comment>
<comment xml:lang="pl">Pakiet programu Flatpak</comment>
<comment xml:lang="pt_BR">Pacote de aplicativo Flatpak</comment>
- <comment xml:lang="ru">пакет приложений Flatpak</comment>
+ <comment xml:lang="ru">Пакет приложения Flatpak</comment>
<comment xml:lang="sk">Balík aplikácií Flatpak</comment>
+ <comment xml:lang="sr">скуп програма Флатпака</comment>
+ <comment xml:lang="sv">Flatpak-programbunt</comment>
+ <comment xml:lang="tr">Flatpak uygulama paketi</comment>
<comment xml:lang="uk">пакунок із програмами Flatpak</comment>
- <comment xml:lang="zh_CN">Flatpak 应用包</comment>
+ <comment xml:lang="zh_CN">Flatpak 应用组合包</comment>
<comment xml:lang="zh_TW">Flatpak 應用程式套組</comment>
<generic-icon name="package-x-generic"/>
<magic priority="50">
@@ -39664,17 +40966,29 @@
<mime-type type="application/vnd.flatpak.repo">
<comment>Flatpak repository description</comment>
<comment xml:lang="ca">descripció de dipòsit de Flatpak</comment>
+ <comment xml:lang="cs">popis repozitáře Flatpak</comment>
<comment xml:lang="da">Flatpak-arkivbeskrivelse</comment>
<comment xml:lang="de">Flatpak-Repositoriumsbeschreibung</comment>
+ <comment xml:lang="en_GB">Flatpak repository description</comment>
<comment xml:lang="es">descripción de repositorio de Flatpak</comment>
+ <comment xml:lang="eu">Flatpak biltegi deskribapena</comment>
+ <comment xml:lang="fi">Flatpak-ohjelmistolähdekuvaus</comment>
<comment xml:lang="fr">description de dépôt Flatpak</comment>
+ <comment xml:lang="ga">cur síos ar stórlann Flatpak</comment>
+ <comment xml:lang="he">תיאור מאגר Flatpak</comment>
+ <comment xml:lang="hr">Flatpak opis repozitorija</comment>
<comment xml:lang="hu">Flatpak tárolóleírás</comment>
+ <comment xml:lang="id">deskripsi repositori Flatpak</comment>
+ <comment xml:lang="it">Descrizione repository Flatpack</comment>
<comment xml:lang="kk">Flatpak репозиторийі сипаттамасы</comment>
<comment xml:lang="ko">Flatpak 저장소 디스크립션</comment>
<comment xml:lang="pl">Opis repozytorium Flatpak</comment>
<comment xml:lang="pt_BR">Descrição de repositório Flatpak</comment>
- <comment xml:lang="ru">описание репозитория Flatpak</comment>
+ <comment xml:lang="ru">Описание репозитория Flatpak</comment>
<comment xml:lang="sk">Popis repozitára Flatpak</comment>
+ <comment xml:lang="sr">опис ризнице Флатпака</comment>
+ <comment xml:lang="sv">Flatpak-förrådsbeskrivning</comment>
+ <comment xml:lang="tr">Flatpak depo açıklaması</comment>
<comment xml:lang="uk">опис сховища Flatpak</comment>
<comment xml:lang="zh_CN">Flatpak 软件库描述</comment>
<comment xml:lang="zh_TW">Flatpak 軟體庫描述</comment>
@@ -39688,6 +41002,31 @@
<mime-type type="application/vnd.flatpak.ref">
<comment>Flatpak repository reference</comment>
+ <comment xml:lang="ca">referència de dipòsit Flatpak</comment>
+ <comment xml:lang="cs">odkaz na repozitář Flatpak</comment>
+ <comment xml:lang="de">Flatpak-Repositoriumsreferenz</comment>
+ <comment xml:lang="en_GB">Flatpak repository reference</comment>
+ <comment xml:lang="es">referencia a repositorio de Flatpak</comment>
+ <comment xml:lang="eu">Flatpak biltegi erreferentzia</comment>
+ <comment xml:lang="fi">Flatpak-ohjelmistolähdeviite</comment>
+ <comment xml:lang="fr">référence de dépôt Flatpak</comment>
+ <comment xml:lang="ga">tagairt do stórlann Flatpak</comment>
+ <comment xml:lang="hr">Flatpak preporučeni repozitorij</comment>
+ <comment xml:lang="hu">Flatpak tárolóhivatkozás</comment>
+ <comment xml:lang="id">acuan repositori Flatpak</comment>
+ <comment xml:lang="it">Riferimento repository Flatpack</comment>
+ <comment xml:lang="kk">Flatpak репозиторийіне сілтеме</comment>
+ <comment xml:lang="ko">Flatpak 저장소 참조</comment>
+ <comment xml:lang="pl">Odwołanie do repozytorium Flatpak</comment>
+ <comment xml:lang="pt_BR">Referência de repositório Flatpak</comment>
+ <comment xml:lang="ru">Ссылка на репозиторий Flatpak</comment>
+ <comment xml:lang="sk">Referencia repozitára Flatpak</comment>
+ <comment xml:lang="sr">упута ризнице Флатпака</comment>
+ <comment xml:lang="sv">Flatpak-förrådsreferens</comment>
+ <comment xml:lang="tr">Flatpak depo başvurusu</comment>
+ <comment xml:lang="uk">посилання на сховище Flatpak</comment>
+ <comment xml:lang="zh_CN">Flatpak 软件库引用</comment>
+ <comment xml:lang="zh_TW">Flatpak 軟體庫參照</comment>
<generic-icon name="package-x-generic"/>
<sub-class-of type="text/plain"/>
<magic priority="50">
@@ -39699,18 +41038,29 @@
<mime-type type="application/vnd.squashfs">
<comment>Squashfs filesystem</comment>
<comment xml:lang="ca">Sistema de fitxers Squashfs</comment>
+ <comment xml:lang="cs">souborový systém Squashfs</comment>
<comment xml:lang="da">Squashfs-filsystem</comment>
<comment xml:lang="de">Squashfs-Dateisystem</comment>
+ <comment xml:lang="en_GB">Squashfs filesystem</comment>
<comment xml:lang="es">sistema de archivos Squashfs</comment>
+ <comment xml:lang="eu">Squashfs fitxategi sistema</comment>
+ <comment xml:lang="fi">Squashfs-tiedostojärjestelmä</comment>
<comment xml:lang="fr">système de fichiers Squashfs</comment>
+ <comment xml:lang="ga">córas comhad Squashfs</comment>
<comment xml:lang="he">מערכת קבצים Squashfs</comment>
+ <comment xml:lang="hr">Squashfs datotečni sustav</comment>
<comment xml:lang="hu">Squashfs fájlrendszer</comment>
+ <comment xml:lang="id">sistem berkas Squashfs</comment>
+ <comment xml:lang="it">File system squashfs</comment>
<comment xml:lang="kk">Squashfs файлдық жүйесі</comment>
<comment xml:lang="ko">Squashfs 파일 시스템</comment>
<comment xml:lang="pl">System plików SquashFS</comment>
<comment xml:lang="pt_BR">Sistema de arquivos Squashfs</comment>
- <comment xml:lang="ru">файловая система Squashfs</comment>
+ <comment xml:lang="ru">Файловая система Squashfs</comment>
<comment xml:lang="sk">Systém súborov Squashfs</comment>
+ <comment xml:lang="sr">систем датотека Сквошфс</comment>
+ <comment xml:lang="sv">Squashfs-filsystem</comment>
+ <comment xml:lang="tr">Squashfs dosya sistemi</comment>
<comment xml:lang="uk">файлова система squashfs</comment>
<comment xml:lang="zh_CN">Squashfs 文件系统</comment>
<comment xml:lang="zh_TW">Squashfs 檔案系統</comment>
@@ -39721,21 +41071,77 @@
<glob pattern="*.sqsh"/>
</mime-type>
+
+ <mime-type type="application/vnd.appimage">
+ <comment>AppImage application bundle</comment>
+ <comment xml:lang="ca">paquet d'aplicació AppImage</comment>
+ <comment xml:lang="cs">balíček AppImage s aplikací</comment>
+ <comment xml:lang="da">Applmage-programsamling</comment>
+ <comment xml:lang="de">AppImage-Anwendungspaket</comment>
+ <comment xml:lang="en_GB">AppImage application bundle</comment>
+ <comment xml:lang="es">paquete de aplicación AppImage</comment>
+ <comment xml:lang="eu">AppImage aplikazio bilduma</comment>
+ <comment xml:lang="fi">AppImage-sovelluspaketti</comment>
+ <comment xml:lang="fr">lot applicatif AppImage</comment>
+ <comment xml:lang="ga">burla feidhmchláir AppImage</comment>
+ <comment xml:lang="he">חבילת יישומי AppImage</comment>
+ <comment xml:lang="hr">AppImage paket aplikacije</comment>
+ <comment xml:lang="hu">AppImage alkalmazáscsomag</comment>
+ <comment xml:lang="id">bundel aplikasi AppImage</comment>
+ <comment xml:lang="it">Bundle applicazione AppImage</comment>
+ <comment xml:lang="kk">AppImage қолданбалар дестесі</comment>
+ <comment xml:lang="ko">AppImage 프로그램 번들</comment>
+ <comment xml:lang="pl">Pakiet programu AppImage</comment>
+ <comment xml:lang="pt_BR">Pacote de aplicativo AppImage</comment>
+ <comment xml:lang="ru">Пакет приложения AppImage</comment>
+ <comment xml:lang="sk">Balík aplikácií AppImage</comment>
+ <comment xml:lang="sr">скуп програма Ап-слике</comment>
+ <comment xml:lang="sv">AppImage-programbunt</comment>
+ <comment xml:lang="tr">AppImage uygulama paketi</comment>
+ <comment xml:lang="uk">пакунок із програмами AppImage</comment>
+ <comment xml:lang="zh_CN">AppImage 应用组合包</comment>
+ <comment xml:lang="zh_TW">AppImage 應用程式套組</comment>
+ <sub-class-of type="application/x-executable"/>
+ <sub-class-of type="application/vnd.squashfs"/>
+ <generic-icon name="application-x-executable"/>
+ <magic priority="50">
+ <match value="ELF" type="string" offset="1">
+ <match value="0x41" type="byte" offset="8">
+ <match value="0x49" type="byte" offset="9">
+ <match value="0x02" type="byte" offset="10"/>
+ </match>
+ </match>
+ </match>
+ </magic>
+ <glob weight="60" pattern="*.appimage"/>
+ </mime-type>
+
<mime-type type="application/vnd.snap">
<comment>Snap package</comment>
<comment xml:lang="ca">Paquet Snap</comment>
+ <comment xml:lang="cs">balíček Snap</comment>
<comment xml:lang="da">Snap-pakke</comment>
<comment xml:lang="de">Snap-Paket</comment>
+ <comment xml:lang="en_GB">Snap package</comment>
<comment xml:lang="es">paquete Snap</comment>
+ <comment xml:lang="eu">Snap paketea</comment>
+ <comment xml:lang="fi">Snap-paketti</comment>
<comment xml:lang="fr">paquet Snap</comment>
+ <comment xml:lang="ga">pacáiste Snap</comment>
<comment xml:lang="he">חבילת Snap</comment>
+ <comment xml:lang="hr">Snap paket</comment>
<comment xml:lang="hu">Snap-csomag</comment>
+ <comment xml:lang="id">paket Snap</comment>
+ <comment xml:lang="it">Pacchetto snap</comment>
<comment xml:lang="kk">Snap дестесі</comment>
<comment xml:lang="ko">Snap 패키지</comment>
<comment xml:lang="pl">Pakiet Snap</comment>
<comment xml:lang="pt_BR">Pacote Snap</comment>
- <comment xml:lang="ru">пакет Snap</comment>
+ <comment xml:lang="ru">Пакет Snap</comment>
<comment xml:lang="sk">Balík Snap</comment>
+ <comment xml:lang="sr">Снап пакет</comment>
+ <comment xml:lang="sv">Snap-paket</comment>
+ <comment xml:lang="tr">Snap paketi</comment>
<comment xml:lang="uk">пакунок snap</comment>
<comment xml:lang="zh_CN">Snap 软件包</comment>
<comment xml:lang="zh_TW">Snap 軟體包</comment>
@@ -39743,4 +41149,85 @@
<sub-class-of type="application/vnd.squashfs"/>
</mime-type>
+
+ <mime-type type="model/stl">
+ <comment>STL 3D model</comment>
+ <acronym>STL</acronym>
+ <expanded-acronym>StereoLithography</expanded-acronym>
+ <magic priority="50">
+ <match value="solid" type="string" offset="0"/>
+ <match value="SOLID" type="string" offset="0"/>
+ </magic>
+ <glob pattern="*.stl"/>
+ <alias type="model/x.stl-ascii"/>
+ <alias type="model/x.stl-binary"/>
+ </mime-type>
+
+ <mime-type type="text/x.gcode">
+ <comment>G-code file</comment>
+ <comment xml:lang="ca">fitxer G-code</comment>
+ <comment xml:lang="cs">soubor G-code</comment>
+ <comment xml:lang="de">G-Code-Datei</comment>
+ <comment xml:lang="en_GB">G-code file</comment>
+ <comment xml:lang="es">archivo G-code</comment>
+ <comment xml:lang="eu">G-code fitxategia</comment>
+ <comment xml:lang="fi">G-code-tiedosto</comment>
+ <comment xml:lang="fr">fichier G-code</comment>
+ <comment xml:lang="ga">comhad G-code</comment>
+ <comment xml:lang="hr">G-kôd datoteka</comment>
+ <comment xml:lang="hu">G-code fájl</comment>
+ <comment xml:lang="id">berkas G-code</comment>
+ <comment xml:lang="it">File G-code</comment>
+ <comment xml:lang="kk">G-code файлы</comment>
+ <comment xml:lang="ko">지-코드 파일</comment>
+ <comment xml:lang="pl">Plik G-code</comment>
+ <comment xml:lang="pt_BR">Arquivo G-code</comment>
+ <comment xml:lang="ru">Файл G-code</comment>
+ <comment xml:lang="sk">Súbor G-code</comment>
+ <comment xml:lang="sr">датотека Г-ко̂да</comment>
+ <comment xml:lang="sv">G-code-fil</comment>
+ <comment xml:lang="tr">G-code dosyası</comment>
+ <comment xml:lang="uk">файл G-code</comment>
+ <comment xml:lang="zh_CN">G-code 文件</comment>
+ <comment xml:lang="zh_TW">G-code 檔案</comment>
+ <sub-class-of type="text/plain"/>
+ <generic-icon name="text-x-generic"/>
+ <glob pattern="*.gcode"/>
+ </mime-type>
+
+ <mime-type type="application/x-fds-disk">
+ <comment>Nintendo FDS disk image</comment>
+ <comment xml:lang="ca">Imatge de disc Nintendo FDS</comment>
+ <comment xml:lang="cs">obraz disku pro Nintendo FDS</comment>
+ <comment xml:lang="de">Nintendo-FDS-Datenträgerabbild</comment>
+ <comment xml:lang="en_GB">Nintendo FDS disk image</comment>
+ <comment xml:lang="es">imagen de disco FDS de Nintendo</comment>
+ <comment xml:lang="eu">Nintendo FDS disko irudia</comment>
+ <comment xml:lang="fi">Nintendo FDS -levykuva</comment>
+ <comment xml:lang="fr">image disque Nintendo FDS</comment>
+ <comment xml:lang="ga">íomhá diosca Nintendo FDS</comment>
+ <comment xml:lang="hr">Nintendo FDS slika diska</comment>
+ <comment xml:lang="hu">Nintendo FDS lemezkép</comment>
+ <comment xml:lang="id">image disk Nintendo FDS</comment>
+ <comment xml:lang="it">Immagine disco Nintendo FDS</comment>
+ <comment xml:lang="kk">Nintendo FDS диск бейнесі</comment>
+ <comment xml:lang="ko">닌텐도 FDS 디스크 이미지</comment>
+ <comment xml:lang="pl">Obraz dysku Nintendo FDS</comment>
+ <comment xml:lang="pt_BR">Imagem de disco Nintendo FDS</comment>
+ <comment xml:lang="ru">Образ диска Nintendo FDS</comment>
+ <comment xml:lang="sk">Obraz disku Nintendo FDS</comment>
+ <comment xml:lang="sr">Нинтендо ФДС слика диска</comment>
+ <comment xml:lang="sv">Nintendo FDS-diskavbild</comment>
+ <comment xml:lang="tr">Nintendo FDS disk kalıbı</comment>
+ <comment xml:lang="uk">образ диска FDS Nintendo</comment>
+ <comment xml:lang="zh_CN">任天堂 FDS 磁盘映像</comment>
+ <comment xml:lang="zh_TW">Nintendo FDS 磁碟映像檔</comment>
+ <acronym>FDS</acronym>
+ <expanded-acronym>Famicom Disk System</expanded-acronym>
+ <glob pattern="*.fds"/>
+ <magic>
+ <match value="*NINTENDO-HVC*" type="string" offset="1"/>
+ </magic>
+ </mime-type>
+
</mime-info>
diff --git a/src/corelib/mimetypes/mimetypes.qrc b/src/corelib/mimetypes/mimetypes.qrc
index 19bc1d3e2a..4720bd302a 100644
--- a/src/corelib/mimetypes/mimetypes.qrc
+++ b/src/corelib/mimetypes/mimetypes.qrc
@@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/qt-project.org/qmime/packages">
- <file alias="freedesktop.org.xml">mime/packages/freedesktop.org.xml</file>
+ <file alias="freedesktop.org.xml" compression-algorithm="best">mime/packages/freedesktop.org.xml</file>
</qresource>
</RCC>
diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp
index bfe9be559a..24a7a35ea5 100644
--- a/src/corelib/mimetypes/qmimedatabase.cpp
+++ b/src/corelib/mimetypes/qmimedatabase.cpp
@@ -74,7 +74,6 @@ QMimeDatabasePrivate::QMimeDatabasePrivate()
QMimeDatabasePrivate::~QMimeDatabasePrivate()
{
- qDeleteAll(m_providers);
}
#ifdef QT_BUILD_INTERNAL
@@ -107,52 +106,52 @@ void QMimeDatabasePrivate::loadProviders()
mimeDirs.prepend(QLatin1String(":/qt-project.org/qmime"));
//qDebug() << "mime dirs:" << mimeDirs;
- QVector<QMimeProviderBase *> currentProviders = m_providers;
- m_providers.clear();
+ Providers currentProviders;
+ std::swap(m_providers, currentProviders);
m_providers.reserve(mimeDirs.size());
for (const QString &mimeDir : qAsConst(mimeDirs)) {
const QString cacheFile = mimeDir + QStringLiteral("/mime.cache");
QFileInfo fileInfo(cacheFile);
// Check if we already have a provider for this dir
- const auto it = std::find_if(currentProviders.begin(), currentProviders.end(), [mimeDir](QMimeProviderBase *prov) { return prov->directory() == mimeDir; });
+ const auto predicate = [mimeDir](const std::unique_ptr<QMimeProviderBase> &prov)
+ {
+ return prov && prov->directory() == mimeDir;
+ };
+ const auto it = std::find_if(currentProviders.begin(), currentProviders.end(), predicate);
if (it == currentProviders.end()) {
- QMimeProviderBase *provider = nullptr;
+ std::unique_ptr<QMimeProviderBase> provider;
#if defined(QT_USE_MMAP)
if (qEnvironmentVariableIsEmpty("QT_NO_MIME_CACHE") && fileInfo.exists()) {
- provider = new QMimeBinaryProvider(this, mimeDir);
+ provider.reset(new QMimeBinaryProvider(this, mimeDir));
//qDebug() << "Created binary provider for" << mimeDir;
if (!provider->isValid()) {
- delete provider;
- provider = nullptr;
+ provider.reset();
}
}
#endif
if (!provider) {
- provider = new QMimeXMLProvider(this, mimeDir);
+ provider.reset(new QMimeXMLProvider(this, mimeDir));
//qDebug() << "Created XML provider for" << mimeDir;
}
- m_providers.append(provider);
+ m_providers.push_back(std::move(provider));
} else {
- QMimeProviderBase *provider = *it;
- currentProviders.erase(it);
+ auto provider = std::move(*it); // take provider out of the vector
provider->ensureLoaded();
if (!provider->isValid()) {
- delete provider;
- provider = new QMimeXMLProvider(this, mimeDir);
+ provider.reset(new QMimeXMLProvider(this, mimeDir));
//qDebug() << "Created XML provider to replace binary provider for" << mimeDir;
}
- m_providers.append(provider);
+ m_providers.push_back(std::move(provider));
}
}
- qDeleteAll(currentProviders);
}
-QVector<QMimeProviderBase *> QMimeDatabasePrivate::providers()
+const QMimeDatabasePrivate::Providers &QMimeDatabasePrivate::providers()
{
#ifndef Q_OS_WASM // stub implementation always returns true
Q_ASSERT(!mutex.tryLock()); // caller should have locked mutex
#endif
- if (m_providers.isEmpty()) {
+ if (m_providers.empty()) {
loadProviders();
m_lastCheck.start();
} else {
@@ -164,8 +163,7 @@ QVector<QMimeProviderBase *> QMimeDatabasePrivate::providers()
QString QMimeDatabasePrivate::resolveAlias(const QString &nameOrAlias)
{
- const auto allProviders = providers();
- for (QMimeProviderBase *provider : allProviders) {
+ for (const auto &provider : providers()) {
const QString ret = provider->resolveAlias(nameOrAlias);
if (!ret.isEmpty())
return ret;
@@ -179,9 +177,8 @@ QString QMimeDatabasePrivate::resolveAlias(const QString &nameOrAlias)
*/
QMimeType QMimeDatabasePrivate::mimeTypeForName(const QString &nameOrAlias)
{
- const auto allProviders = providers();
const QString mimeName = resolveAlias(nameOrAlias);
- for (QMimeProviderBase *provider : allProviders) {
+ for (const auto &provider : providers()) {
const QMimeType mime = provider->mimeTypeForName(mimeName);
if (mime.isValid())
return mime;
@@ -205,8 +202,7 @@ QMimeGlobMatchResult QMimeDatabasePrivate::findByFileName(const QString &fileNam
{
QMimeGlobMatchResult result;
// TODO this parses in the order (local, global). Check that it handles "NOGLOBS" correctly.
- const auto allProviders = providers();
- for (QMimeProviderBase *provider : allProviders)
+ for (const auto &provider : providers())
provider->addFileNameMatches(fileName, result);
return result;
}
@@ -227,8 +223,7 @@ void QMimeDatabasePrivate::loadGenericIcon(QMimeTypePrivate &mimePrivate)
QMutexLocker locker(&mutex);
if (mimePrivate.fromCache) {
mimePrivate.genericIconName.clear();
- const auto allProviders = providers();
- for (QMimeProviderBase *provider : allProviders) {
+ for (const auto &provider : providers()) {
provider->loadGenericIcon(mimePrivate);
if (!mimePrivate.genericIconName.isEmpty())
break;
@@ -241,8 +236,7 @@ void QMimeDatabasePrivate::loadIcon(QMimeTypePrivate &mimePrivate)
QMutexLocker locker(&mutex);
if (mimePrivate.fromCache) {
mimePrivate.iconName.clear();
- const auto allProviders = providers();
- for (QMimeProviderBase *provider : allProviders) {
+ for (const auto &provider : providers()) {
provider->loadIcon(mimePrivate);
if (!mimePrivate.iconName.isEmpty())
break;
@@ -276,8 +270,7 @@ QStringList QMimeDatabasePrivate::parents(const QString &mimeName)
{
Q_ASSERT(!mutex.tryLock());
QStringList result;
- const auto allProviders = providers();
- for (QMimeProviderBase *provider : allProviders)
+ for (const auto &provider : providers())
provider->addParents(mimeName, result);
if (result.isEmpty()) {
const QString parent = fallbackParent(mimeName);
@@ -291,8 +284,7 @@ QStringList QMimeDatabasePrivate::listAliases(const QString &mimeName)
{
QMutexLocker locker(&mutex);
QStringList result;
- const auto allProviders = providers();
- for (QMimeProviderBase *provider : allProviders)
+ for (const auto &provider : providers())
provider->addAliases(mimeName, result);
return result;
}
@@ -331,8 +323,7 @@ QMimeType QMimeDatabasePrivate::findByData(const QByteArray &data, int *accuracy
*accuracyPtr = 0;
QMimeType candidate;
- const auto allProviders = providers();
- for (QMimeProviderBase *provider : allProviders)
+ for (const auto &provider : providers())
provider->findByMagic(data, accuracyPtr, candidate);
if (candidate.isValid())
@@ -414,8 +405,7 @@ QMimeType QMimeDatabasePrivate::mimeTypeForFileNameAndData(const QString &fileNa
QList<QMimeType> QMimeDatabasePrivate::allMimeTypes()
{
QList<QMimeType> result;
- const auto allProviders = providers();
- for (QMimeProviderBase *provider : allProviders)
+ for (const auto &provider : providers())
provider->addAllMimeTypes(result);
return result;
}
@@ -432,7 +422,7 @@ bool QMimeDatabasePrivate::inherits(const QString &mime, const QString &parent)
toCheck.pop();
const auto parentList = parents(mimeName);
for (const QString &par : parentList)
- toCheck.push(par);
+ toCheck.push(resolveAlias(par));
}
return false;
}
diff --git a/src/corelib/mimetypes/qmimedatabase_p.h b/src/corelib/mimetypes/qmimedatabase_p.h
index 1e605d9a24..d9cf446d44 100644
--- a/src/corelib/mimetypes/qmimedatabase_p.h
+++ b/src/corelib/mimetypes/qmimedatabase_p.h
@@ -63,6 +63,8 @@ QT_REQUIRE_CONFIG(mimetype);
#include <QtCore/qmutex.h>
#include <QtCore/qvector.h>
+#include <memory>
+
QT_BEGIN_NAMESPACE
class QIODevice;
@@ -72,7 +74,7 @@ class QMimeProviderBase;
class QMimeDatabasePrivate
{
public:
- Q_DISABLE_COPY(QMimeDatabasePrivate)
+ Q_DISABLE_COPY_MOVE(QMimeDatabasePrivate)
QMimeDatabasePrivate();
~QMimeDatabasePrivate();
@@ -102,11 +104,12 @@ public:
bool mimeInherits(const QString &mime, const QString &parent);
private:
- QVector<QMimeProviderBase *> providers();
+ using Providers = std::vector<std::unique_ptr<QMimeProviderBase>>;
+ const Providers &providers();
bool shouldCheck();
void loadProviders();
- mutable QVector<QMimeProviderBase *> m_providers;
+ mutable Providers m_providers;
QElapsedTimer m_lastCheck;
public:
diff --git a/src/corelib/mimetypes/qmimeglobpattern.cpp b/src/corelib/mimetypes/qmimeglobpattern.cpp
index cd42b4da83..fd06f6ab6b 100644
--- a/src/corelib/mimetypes/qmimeglobpattern.cpp
+++ b/src/corelib/mimetypes/qmimeglobpattern.cpp
@@ -39,7 +39,7 @@
#include "qmimeglobpattern_p.h"
-#include <QRegExp>
+#include <QRegularExpression>
#include <QStringList>
#include <QDebug>
@@ -142,8 +142,8 @@ bool QMimeGlobPattern::matchFileName(const QString &inputFilename) const
return (m_pattern == filename);
// Other (quite rare) patterns, like "*.anim[1-9j]": use slow but correct method
- QRegExp rx(m_pattern, Qt::CaseSensitive, QRegExp::WildcardUnix);
- return rx.exactMatch(filename);
+ QRegularExpression rx(QRegularExpression::anchoredPattern(QRegularExpression::wildcardToRegularExpression(m_pattern)));
+ return rx.match(filename).hasMatch();
}
static bool isFastPattern(const QString &pattern)
diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp
index aac51184a4..d5b8825972 100644
--- a/src/corelib/mimetypes/qmimeprovider.cpp
+++ b/src/corelib/mimetypes/qmimeprovider.cpp
@@ -445,10 +445,10 @@ void QMimeBinaryProvider::addAllMimeTypes(QList<QMimeType> &result)
loadMimeTypeList();
if (result.isEmpty()) {
result.reserve(m_mimetypeNames.count());
- for (const QString &name : m_mimetypeNames)
+ for (const QString &name : qAsConst(m_mimetypeNames))
result.append(mimeTypeForNameUnchecked(name));
} else {
- for (const QString &name : m_mimetypeNames)
+ for (const QString &name : qAsConst(m_mimetypeNames))
if (std::find_if(result.constBegin(), result.constEnd(), [name](const QMimeType &mime) -> bool { return mime.name() == name; })
== result.constEnd())
result.append(mimeTypeForNameUnchecked(name));
diff --git a/src/corelib/mimetypes/qmimeprovider_p.h b/src/corelib/mimetypes/qmimeprovider_p.h
index 875ff9e0eb..b6268210c0 100644
--- a/src/corelib/mimetypes/qmimeprovider_p.h
+++ b/src/corelib/mimetypes/qmimeprovider_p.h
@@ -97,17 +97,17 @@ public:
QMimeBinaryProvider(QMimeDatabasePrivate *db, const QString &directory);
virtual ~QMimeBinaryProvider();
- virtual bool isValid() override;
- virtual QMimeType mimeTypeForName(const QString &name) override;
+ bool isValid() override;
+ QMimeType mimeTypeForName(const QString &name) override;
void addFileNameMatches(const QString &fileName, QMimeGlobMatchResult &result) override;
void addParents(const QString &mime, QStringList &result) override;
- virtual QString resolveAlias(const QString &name) override;
+ QString resolveAlias(const QString &name) override;
void addAliases(const QString &name, QStringList &result) override;
void findByMagic(const QByteArray &data, int *accuracyPtr, QMimeType &candidate) override;
void addAllMimeTypes(QList<QMimeType> &result) override;
static void loadMimeTypePrivate(QMimeTypePrivate &);
- virtual void loadIcon(QMimeTypePrivate &) override;
- virtual void loadGenericIcon(QMimeTypePrivate &) override;
+ void loadIcon(QMimeTypePrivate &) override;
+ void loadGenericIcon(QMimeTypePrivate &) override;
void ensureLoaded() override;
private:
@@ -135,11 +135,11 @@ public:
QMimeXMLProvider(QMimeDatabasePrivate *db, const QString &directory);
~QMimeXMLProvider();
- virtual bool isValid() override;
- virtual QMimeType mimeTypeForName(const QString &name) override;
+ bool isValid() override;
+ QMimeType mimeTypeForName(const QString &name) override;
void addFileNameMatches(const QString &fileName, QMimeGlobMatchResult &result) override;
void addParents(const QString &mime, QStringList &result) override;
- virtual QString resolveAlias(const QString &name) override;
+ QString resolveAlias(const QString &name) override;
void addAliases(const QString &name, QStringList &result) override;
void findByMagic(const QByteArray &data, int *accuracyPtr, QMimeType &candidate) override;
void addAllMimeTypes(QList<QMimeType> &result) override;
diff --git a/src/corelib/mimetypes/qmimetypeparser_p.h b/src/corelib/mimetypes/qmimetypeparser_p.h
index 6e3f5fd556..d6a1444592 100644
--- a/src/corelib/mimetypes/qmimetypeparser_p.h
+++ b/src/corelib/mimetypes/qmimetypeparser_p.h
@@ -64,7 +64,7 @@ class QIODevice;
class QMimeTypeParserBase
{
- Q_DISABLE_COPY(QMimeTypeParserBase)
+ Q_DISABLE_COPY_MOVE(QMimeTypeParserBase)
public:
QMimeTypeParserBase() {}
diff --git a/src/corelib/plugin/qfactoryinterface.h b/src/corelib/plugin/qfactoryinterface.h
index f306460690..3aec4ddd55 100644
--- a/src/corelib/plugin/qfactoryinterface.h
+++ b/src/corelib/plugin/qfactoryinterface.h
@@ -52,8 +52,9 @@ struct Q_CORE_EXPORT QFactoryInterface
virtual QStringList keys() const = 0;
};
-
+#ifndef Q_CLANG_QDOC
Q_DECLARE_INTERFACE(QFactoryInterface, "org.qt-project.Qt.QFactoryInterface")
+#endif
QT_END_NAMESPACE
diff --git a/src/corelib/plugin/qplugin.h b/src/corelib/plugin/qplugin.h
index 5aca22497a..676b5047d6 100644
--- a/src/corelib/plugin/qplugin.h
+++ b/src/corelib/plugin/qplugin.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -71,13 +72,27 @@ inline constexpr unsigned char qPluginArchRequirements()
}
typedef QObject *(*QtPluginInstanceFunction)();
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
typedef const char *(*QtPluginMetaDataFunction)();
+#else
+typedef QPair<const uchar *, size_t> (*QtPluginMetaDataFunction)();
+#endif
+
struct Q_CORE_EXPORT QStaticPlugin
{
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+public:
+ constexpr QStaticPlugin(QtPluginInstanceFunction i, QtPluginMetaDataFunction m)
+ : instance(i), rawMetaData(m().first), rawMetaDataSize(m().second)
+ QtPluginInstanceFunction instance;
+private:
+ // ### Qt 6: revise, as this is not standard-layout
+ const void *rawMetaData;
+ qsizetype rawMetaDataSize
+#elif !defined(Q_QDOC)
// Note: This struct is initialized using an initializer list.
// As such, it cannot have any new constructors or variables.
-#ifndef Q_QDOC
QtPluginInstanceFunction instance;
QtPluginMetaDataFunction rawMetaData;
#else
@@ -148,6 +163,15 @@ void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin staticPlugin);
return plugin; \
}
+#elif QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+
+# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS, PLUGINCLASSNAME) \
+ Q_EXTERN_C Q_DECL_EXPORT \
+ auto qt_plugin_query_metadata() \
+ { return qMakePair<const void *, size_t>(qt_pluginMetaData, sizeof qt_pluginMetaData); } \
+ Q_EXTERN_C Q_DECL_EXPORT QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance() \
+ Q_PLUGIN_INSTANCE(PLUGINCLASS)
+
#else
# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS, PLUGINCLASSNAME) \
diff --git a/src/corelib/serialization/qcborarray.cpp b/src/corelib/serialization/qcborarray.cpp
index c56536cdb1..28ae40f3df 100644
--- a/src/corelib/serialization/qcborarray.cpp
+++ b/src/corelib/serialization/qcborarray.cpp
@@ -39,6 +39,7 @@
#include "qcborarray.h"
#include "qcborvalue_p.h"
+#include "qdatastream.h"
QT_BEGIN_NAMESPACE
@@ -1218,4 +1219,23 @@ QDebug operator<<(QDebug dbg, const QCborArray &a)
}
#endif
+#ifndef QT_NO_DATASTREAM
+QDataStream &operator<<(QDataStream &stream, const QCborArray &value)
+{
+ stream << value.toCborValue().toCbor();
+ return stream;
+}
+
+QDataStream &operator>>(QDataStream &stream, QCborArray &value)
+{
+ QByteArray buffer;
+ stream >> buffer;
+ QCborParserError parseError{};
+ value = QCborValue::fromCbor(buffer, &parseError).toArray();
+ if (parseError.error)
+ stream.setStatus(QDataStream::ReadCorruptData);
+ return stream;
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qcborarray.h b/src/corelib/serialization/qcborarray.h
index ed0f4912ba..e06544f245 100644
--- a/src/corelib/serialization/qcborarray.h
+++ b/src/corelib/serialization/qcborarray.h
@@ -47,6 +47,7 @@
QT_BEGIN_NAMESPACE
class QJsonArray;
+class QDataStream;
class QCborContainerPrivate;
class Q_CORE_EXPORT QCborArray
@@ -271,6 +272,7 @@ private:
void detach(qsizetype reserve = 0);
friend QCborValue;
+ friend QCborValueRef;
explicit QCborArray(QCborContainerPrivate &dd) noexcept;
QExplicitlySharedDataPointer<QCborContainerPrivate> d;
};
@@ -298,6 +300,11 @@ Q_CORE_EXPORT uint qHash(const QCborArray &array, uint seed = 0);
Q_CORE_EXPORT QDebug operator<<(QDebug, const QCborArray &a);
#endif
+#ifndef QT_NO_DATASTREAM
+Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QCborArray &);
+Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QCborArray &);
+#endif
+
QT_END_NAMESPACE
#endif // QCBORARRAY_H
diff --git a/src/corelib/serialization/qcborcommon.h b/src/corelib/serialization/qcborcommon.h
index f8278f1649..3dfe50cd09 100644
--- a/src/corelib/serialization/qcborcommon.h
+++ b/src/corelib/serialization/qcborcommon.h
@@ -133,6 +133,11 @@ Q_CORE_EXPORT QDebug operator<<(QDebug, QCborKnownTags tg);
Q_CORE_EXPORT QDebug operator<<(QDebug, QCborTag tg);
#endif
+#if !defined(QT_NO_DEBUG_STREAM)
+QDataStream &operator<<(QDataStream &ds, QCborSimpleType st);
+QDataStream &operator>>(QDataStream &ds, QCborSimpleType &st);
+#endif
+
inline uint qHash(QCborSimpleType tag, uint seed = 0)
{
return qHash(quint8(tag), seed);
diff --git a/src/corelib/serialization/qcbormap.cpp b/src/corelib/serialization/qcbormap.cpp
index 33f9249993..4b28ca4a2e 100644
--- a/src/corelib/serialization/qcbormap.cpp
+++ b/src/corelib/serialization/qcbormap.cpp
@@ -1763,4 +1763,23 @@ QDebug operator<<(QDebug dbg, const QCborMap &m)
}
#endif
+#ifndef QT_NO_DATASTREAM
+QDataStream &operator<<(QDataStream &stream, const QCborMap &value)
+{
+ stream << value.toCborValue().toCbor();
+ return stream;
+}
+
+QDataStream &operator>>(QDataStream &stream, QCborMap &value)
+{
+ QByteArray buffer;
+ stream >> buffer;
+ QCborParserError parseError{};
+ value = QCborValue::fromCbor(buffer, &parseError).toMap();
+ if (parseError.error)
+ stream.setStatus(QDataStream::ReadCorruptData);
+ return stream;
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qcbormap.h b/src/corelib/serialization/qcbormap.h
index 3eb2107691..4aea901eef 100644
--- a/src/corelib/serialization/qcbormap.h
+++ b/src/corelib/serialization/qcbormap.h
@@ -52,6 +52,7 @@ typedef QMap<QString, QVariant> QVariantMap;
template <class Key, class T> class QHash;
typedef QHash<QString, QVariant> QVariantHash;
class QJsonObject;
+class QDataStream;
class QCborContainerPrivate;
class Q_CORE_EXPORT QCborMap
@@ -117,6 +118,8 @@ public:
QCborValueRef item; // points to the value
friend class Iterator;
friend class QCborMap;
+ friend class QCborValue;
+ friend class QCborValueRef;
ConstIterator(QCborContainerPrivate *dd, qsizetype ii) : item(dd, ii) {}
public:
typedef std::random_access_iterator_tag iterator_category;
@@ -170,7 +173,7 @@ public:
: QCborMap()
{
detach(args.size());
- for (auto pair : args)
+ for (const auto &pair : args)
insert(pair.first, pair.second);
}
~QCborMap();
@@ -322,9 +325,10 @@ public:
QJsonObject toJsonObject() const;
private:
+ friend class QCborValue;
+ friend class QCborValueRef;
void detach(qsizetype reserve = 0);
- friend QCborValue;
explicit QCborMap(QCborContainerPrivate &dd) noexcept;
QExplicitlySharedDataPointer<QCborContainerPrivate> d;
};
@@ -352,6 +356,12 @@ Q_CORE_EXPORT uint qHash(const QCborMap &map, uint seed = 0);
Q_CORE_EXPORT QDebug operator<<(QDebug, const QCborMap &m);
#endif
+#ifndef QT_NO_DATASTREAM
+Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QCborMap &);
+Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QCborMap &);
+#endif
+
+
QT_END_NAMESPACE
#endif // QCBORMAP_H
diff --git a/src/corelib/serialization/qcborstream.cpp b/src/corelib/serialization/qcborstream.cpp
index d7b81ae324..546f9ffe57 100644
--- a/src/corelib/serialization/qcborstream.cpp
+++ b/src/corelib/serialization/qcborstream.cpp
@@ -44,6 +44,7 @@
#include <qbuffer.h>
#include <qdebug.h>
#include <qstack.h>
+#include <qdatastream.h>
QT_BEGIN_NAMESPACE
@@ -170,6 +171,21 @@ Q_CORE_EXPORT const char *qt_cbor_simpletype_id(QCborSimpleType st)
return nullptr;
}
+#if !defined(QT_NO_DATASTREAM)
+QDataStream &operator<<(QDataStream &ds, QCborSimpleType st)
+{
+ return ds << quint8(st);
+}
+
+QDataStream &operator>>(QDataStream &ds, QCborSimpleType &st)
+{
+ quint8 v;
+ ds >> v;
+ st = QCborSimpleType(v);
+ return ds;
+}
+#endif
+
#if !defined(QT_NO_DEBUG_STREAM)
QDebug operator<<(QDebug dbg, QCborSimpleType st)
{
diff --git a/src/corelib/serialization/qcborvalue.cpp b/src/corelib/serialization/qcborvalue.cpp
index e53b6a0326..9e8c98837c 100644
--- a/src/corelib/serialization/qcborvalue.cpp
+++ b/src/corelib/serialization/qcborvalue.cpp
@@ -39,7 +39,7 @@
#include "qcborvalue.h"
#include "qcborvalue_p.h"
-
+#include "qdatastream.h"
#include "qcborarray.h"
#include "qcbormap.h"
#include "qcborstream.h"
@@ -128,10 +128,11 @@ QT_BEGIN_NAMESPACE
Such values are completely valid and may appear in CBOR streams, unlike
JSON content and QJsonValue's undefined bit. But like QJsonValue's
- Undefined, it is returned by QCborArray::value() when out of range or
- QCborMap::operator[] when the key is not found in the container. It is not
- possible to tell such a case apart from the value of Undefined, so if that
- is required, check the QCborArray size and use the QCborMap iterator API.
+ Undefined, it is returned by a CBOR container's value() or read-only
+ operator[] for invalid look-ups (index out of range for QCborArray, or key
+ not found for QCborMap). It is not possible to tell such a case apart from
+ the value of Undefined, so if that is required, check the QCborArray size
+ and use the QCborMap iterator API.
\section1 Simple types
@@ -457,7 +458,7 @@ QT_BEGIN_NAMESPACE
\fn QCborValue::QCborValue(QCborValue &&other)
\overload
- Moves the contents of the \a other CBorValue object into this one and frees
+ Moves the contents of the \a other QCborValue object into this one and frees
the resources of this one.
*/
@@ -465,7 +466,7 @@ QT_BEGIN_NAMESPACE
\fn QCborValue &&QCborValue::operator=(QCborValue &&other)
\overload
- Moves the contents of the \a other CBorValue object into this one and frees
+ Moves the contents of the \a other QCborValue object into this one and frees
the resources of this one. Returns a reference to this object.
*/
@@ -1982,12 +1983,24 @@ QUuid QCborValue::toUuid(const QUuid &defaultValue) const
return QUuid::fromRfc4122(byteData->asByteArrayView());
}
-QCborArray QCborValue::toArray() const
-{
- return toArray(QCborArray());
-}
+/*!
+ \fn QCborArray QCborValue::toArray() const
+ \fn QCborArray QCborValue::toArray(const QCborArray &defaultValue) const
+
+ Returns the array value stored in this QCborValue, if it is of the array
+ type. Otherwise, it returns \a defaultValue.
+
+ Note that this function performs no conversion from other types to
+ QCborArray.
+
+ \sa isArray(), isByteArray(), isMap(), isContainer(), toMap()
+ */
/*!
+ \fn QCborArray QCborValueRef::toArray() const
+ \fn QCborArray QCborValueRef::toArray(const QCborArray &defaultValue) const
+ \internal
+
Returns the array value stored in this QCborValue, if it is of the array
type. Otherwise, it returns \a defaultValue.
@@ -1996,6 +2009,11 @@ QCborArray QCborValue::toArray() const
\sa isArray(), isByteArray(), isMap(), isContainer(), toMap()
*/
+QCborArray QCborValue::toArray() const
+{
+ return toArray(QCborArray());
+}
+
QCborArray QCborValue::toArray(const QCborArray &defaultValue) const
{
if (!isArray())
@@ -2007,12 +2025,24 @@ QCborArray QCborValue::toArray(const QCborArray &defaultValue) const
return dd ? QCborArray(*dd) : defaultValue;
}
-QCborMap QCborValue::toMap() const
-{
- return toMap(QCborMap());
-}
+/*!
+ \fn QCborMap QCborValue::toMap() const
+ \fn QCborMap QCborValue::toMap(const QCborMap &defaultValue) const
+
+ Returns the map value stored in this QCborValue, if it is of the map type.
+ Otherwise, it returns \a defaultValue.
+
+ Note that this function performs no conversion from other types to
+ QCborMap.
+
+ \sa isMap(), isArray(), isContainer(), toArray()
+ */
/*!
+ \fn QCborMap QCborValueRef::toMap() const
+ \fn QCborMap QCborValueRef::toMap(const QCborMap &defaultValue) const
+ \internal
+
Returns the map value stored in this QCborValue, if it is of the map type.
Otherwise, it returns \a defaultValue.
@@ -2021,6 +2051,11 @@ QCborMap QCborValue::toMap() const
\sa isMap(), isArray(), isContainer(), toArray()
*/
+QCborMap QCborValue::toMap() const
+{
+ return toMap(QCborMap());
+}
+
QCborMap QCborValue::toMap(const QCborMap &defaultValue) const
{
if (!isMap())
@@ -2073,15 +2108,16 @@ const QCborValue QCborValue::operator[](QLatin1String key) const
}
/*!
+ \overload
+
If this QCborValue is a QCborMap, searches elements for the value whose key
- matches \a key. If this is an array, returns the element whose index is \a
- key. If there's no matching value in the array or map, or if this
+ matches \a key. If this is a QCborArray, returns the element whose index is
+ \a key. If there's no matching value in the array or map, or if this
QCborValue object is not an array or map, returns the undefined value.
\sa operator[], QCborMap::operator[], QCborMap::value(),
QCborMap::find(), QCborArray::operator[], QCborArray::at()
*/
-
const QCborValue QCborValue::operator[](qint64 key) const
{
if (isMap())
@@ -2092,6 +2128,191 @@ const QCborValue QCborValue::operator[](qint64 key) const
}
/*!
+ \internal
+ */
+static Q_DECL_COLD_FUNCTION QCborMap arrayAsMap(const QCborArray &array)
+{
+ if (array.size())
+ qWarning("Using CBOR array as map forced conversion");
+ QCborMap map;
+ for (qsizetype i = array.size(); i-- > 0; ) {
+ QCborValue entry = array.at(i);
+ // Ignore padding entries that may have been added to grow the array
+ // when inserting past its end:
+ if (!entry.isInvalid())
+ map[i] = entry;
+ }
+ return map;
+}
+
+/*!
+ \internal
+ */
+static QCborContainerPrivate *maybeDetach(QCborContainerPrivate *container, qsizetype size)
+{
+ auto replace = QCborContainerPrivate::detach(container, size);
+ Q_ASSERT(replace);
+ if (replace != container) {
+ if (container)
+ container->deref();
+ replace->ref.ref();
+ }
+ return replace;
+}
+
+/*!
+ \internal
+ */
+static QCborContainerPrivate *maybeGrow(QCborContainerPrivate *container, qsizetype index)
+{
+ auto replace = QCborContainerPrivate::grow(container, index);
+ Q_ASSERT(replace);
+ if (replace != container) {
+ if (container)
+ container->deref();
+ replace->ref.ref();
+ }
+ if (replace->elements.size() == index)
+ replace->append(Undefined());
+ else
+ Q_ASSERT(replace->elements.size() > index);
+ return replace;
+}
+
+/*!
+ Returns a QCborValueRef that can be used to read or modify the entry in
+ this, as a map, with the given \a key. When this QCborValue is a QCborMap,
+ this function is equivalent to the matching operator[] on that map.
+
+ Before returning the reference: if this QCborValue was an array, it is first
+ converted to a map (so that \c{map[i]} is \c{array[i]} for each index, \c i,
+ with valid \c{array[i]}); otherwise, if it was not a map it will be
+ over-written with an empty map.
+
+ \sa operator[](qint64), QCborMap::operator[], QCborMap::value(),
+ QCborMap::find()
+ */
+QCborValueRef QCborValue::operator[](const QString &key)
+{
+ if (!isMap())
+ *this = QCborValue(isArray() ? arrayAsMap(toArray()) : QCborMap());
+
+ const qsizetype size = container ? container->elements.size() : 0;
+ qsizetype index = size + 1;
+ bool found = false;
+ if (container) {
+ QCborMap proxy(*container);
+ auto it = proxy.constFind(key);
+ if (it < proxy.constEnd()) {
+ found = true;
+ index = it.item.i;
+ }
+ }
+
+ container = maybeDetach(container, size + (found ? 0 : 2));
+ Q_ASSERT(container);
+ if (!found) {
+ container->append(key);
+ container->append(QCborValue());
+ }
+ Q_ASSERT(index & 1 && !(container->elements.size() & 1));
+ Q_ASSERT(index < container->elements.size());
+ return { container, index };
+}
+
+/*!
+ \overload
+
+ Returns a QCborValueRef that can be used to read or modify the entry in
+ this, as a map, with the given \a key. When this QCborValue is a QCborMap,
+ this function is equivalent to the matching operator[] on that map.
+
+ Before returning the reference: if this QCborValue was an array, it is first
+ converted to a map (so that \c{map[i]} is \c{array[i]} for each index, \c i,
+ with valid \c{array[i]}); otherwise, if it was not a map it will be
+ over-written with an empty map.
+
+ \sa operator[](qint64), QCborMap::operator[], QCborMap::value(),
+ QCborMap::find()
+ */
+QCborValueRef QCborValue::operator[](QLatin1String key)
+{
+ if (!isMap())
+ *this = QCborValue(isArray() ? arrayAsMap(toArray()) : QCborMap());
+
+ const qsizetype size = container ? container->elements.size() : 0;
+ qsizetype index = size + 1;
+ bool found = false;
+ if (container) {
+ QCborMap proxy(*container);
+ auto it = proxy.constFind(key);
+ if (it < proxy.constEnd()) {
+ found = true;
+ index = it.item.i;
+ }
+ }
+
+ container = maybeDetach(container, size + (found ? 0 : 2));
+ Q_ASSERT(container);
+ if (!found) {
+ container->append(key);
+ container->append(QCborValue());
+ }
+ Q_ASSERT(index & 1 && !(container->elements.size() & 1));
+ Q_ASSERT(index < container->elements.size());
+ return { container, index };
+}
+
+/*!
+ \overload
+
+ Returns a QCborValueRef that can be used to read or modify the entry in
+ this, as a map or array, with the given \a key. When this QCborValue is a
+ QCborMap or, for 0 <= key < 0x10000, a QCborArray, this function is
+ equivalent to the matching operator[] on that map or array.
+
+ Before returning the reference: if this QCborValue was an array but the key
+ is out of range, the array is first converted to a map (so that \c{map[i]}
+ is \c{array[i]} for each index, \c i, with valid \c{array[i]}); otherwise,
+ if it was not a map it will be over-written with an empty map.
+
+ \sa operator[], QCborMap::operator[], QCborMap::value(),
+ QCborMap::find(), QCborArray::operator[], QCborArray::at()
+ */
+QCborValueRef QCborValue::operator[](qint64 key)
+{
+ if (isArray() && key >= 0 && key < 0x10000) {
+ container = maybeGrow(container, key);
+ return { container, qsizetype(key) };
+ }
+ if (!isMap())
+ *this = QCborValue(isArray() ? arrayAsMap(toArray()) : QCborMap());
+
+ const qsizetype size = container ? container->elements.size() : 0;
+ Q_ASSERT(!(size & 1));
+ qsizetype index = size + 1;
+ bool found = false;
+ if (container) {
+ QCborMap proxy(*container);
+ auto it = proxy.constFind(key);
+ if (it < proxy.constEnd()) {
+ found = true;
+ index = it.item.i;
+ }
+ }
+
+ container = maybeDetach(container, size + (found ? 0 : 2));
+ Q_ASSERT(container);
+ if (!found) {
+ container->append(key);
+ container->append(QCborValue());
+ }
+ Q_ASSERT(index & 1 && !(container->elements.size() & 1));
+ Q_ASSERT(index < container->elements.size());
+ return { container, index };
+}
+
+/*!
Decodes one item from the CBOR stream found in \a reader and returns the
equivalent representation. This function is recursive: if the item is a map
or array, it will decode all items found in that map or array, until the
@@ -2355,6 +2576,255 @@ QCborValue::Type QCborValueRef::concreteType(QCborValueRef self) noexcept
return self.d->elements.at(self.i).type;
}
+/*!
+ If this QCborValueRef refers to a QCborMap, searches elements for the value
+ whose key matches \a key. If there's no key matching \a key in the map or if
+ this QCborValueRef object is not a map, returns the undefined value.
+
+ This function is equivalent to:
+
+ \code
+ value.toMap().value(key);
+ \endcode
+
+ \sa operator[](qint64), QCborMap::operator[], QCborMap::value(),
+ QCborMap::find()
+ */
+const QCborValue QCborValueRef::operator[](const QString &key) const
+{
+ const QCborValue item = d->valueAt(i);
+ return item[key];
+}
+
+/*!
+ \overload
+
+ If this QCborValueRef refers to a QCborMap, searches elements for the value
+ whose key matches \a key. If there's no key matching \a key in the map or if
+ this QCborValueRef object is not a map, returns the undefined value.
+
+ This function is equivalent to:
+
+ \code
+ value.toMap().value(key);
+ \endcode
+
+ \sa operator[](qint64), QCborMap::operator[], QCborMap::value(),
+ QCborMap::find()
+ */
+const QCborValue QCborValueRef::operator[](QLatin1String key) const
+{
+ const QCborValue item = d->valueAt(i);
+ return item[key];
+}
+
+/*!
+ \overload
+
+ If this QCborValueRef refers to a QCborMap, searches elements for the value
+ whose key matches \a key. If this is a QCborArray, returns the element whose
+ index is \a key. If there's no matching value in the array or map, or if
+ this QCborValueRef object is not an array or map, returns the undefined
+ value.
+
+ \sa operator[], QCborMap::operator[], QCborMap::value(),
+ QCborMap::find(), QCborArray::operator[], QCborArray::at()
+ */
+const QCborValue QCborValueRef::operator[](qint64 key) const
+{
+ const QCborValue item = d->valueAt(i);
+ return item[key];
+}
+
+/*!
+ Returns a QCborValueRef that can be used to read or modify the entry in
+ this, as a map, with the given \a key. When this QCborValueRef refers to a
+ QCborMap, this function is equivalent to the matching operator[] on that
+ map.
+
+ Before returning the reference: if the QCborValue referenced was an array,
+ it is first converted to a map (so that \c{map[i]} is \c{array[i]} for each
+ index, \c i, with valid \c{array[i]}); otherwise, if it was not a map it
+ will be over-written with an empty map.
+
+ \sa operator[](qint64), QCborMap::operator[], QCborMap::value(),
+ QCborMap::find()
+ */
+QCborValueRef QCborValueRef::operator[](const QString &key)
+{
+ auto &e = d->elements[i];
+ qsizetype size = 0;
+ if (e.flags & QtCbor::Element::IsContainer) {
+ if (e.container) {
+ if (e.type == QCborValue::Array) {
+ QCborValue repack = QCborValue(arrayAsMap(QCborArray(*e.container)));
+ qSwap(e.container, repack.container);
+ } else if (e.type != QCborValue::Map) {
+ e.container->deref();
+ e.container = nullptr;
+ }
+ }
+ e.type = QCborValue::Map;
+ if (e.container)
+ size = e.container->elements.size();
+ } else {
+ // Stomp any prior e.value, replace with a map (that we'll grow)
+ e.container = nullptr;
+ e.type = QCborValue::Map;
+ e.flags = QtCbor::Element::IsContainer;
+ }
+
+ qsizetype index = size + 1;
+ bool found = false;
+ if (e.container) {
+ QCborMap proxy(*e.container);
+ auto it = proxy.constFind(key);
+ if (it < proxy.constEnd()) {
+ found = true;
+ index = it.item.i;
+ }
+ }
+
+ e.container = maybeDetach(e.container, size + (found ? 0 : 2));
+ Q_ASSERT(e.container);
+ if (!found) {
+ e.container->append(key);
+ e.container->append(QCborValue());
+ }
+ Q_ASSERT(index & 1 && !(e.container->elements.size() & 1));
+ Q_ASSERT(index < e.container->elements.size());
+ return { e.container, index };
+}
+
+/*!
+ \overload
+
+ Returns a QCborValueRef that can be used to read or modify the entry in
+ this, as a map, with the given \a key. When this QCborValue is a QCborMap,
+ this function is equivalent to the matching operator[] on that map.
+
+ Before returning the reference: if the QCborValue referenced was an array,
+ it is first converted to a map (so that \c{map[i]} is \c{array[i]} for each
+ index, \c i, with valid \c{array[i]}); otherwise, if it was not a map it
+ will be over-written with an empty map.
+
+ \sa operator[](qint64), QCborMap::operator[], QCborMap::value(),
+ QCborMap::find()
+ */
+QCborValueRef QCborValueRef::operator[](QLatin1String key)
+{
+ auto &e = d->elements[i];
+ qsizetype size = 0;
+ if (e.flags & QtCbor::Element::IsContainer) {
+ if (e.container) {
+ if (e.type == QCborValue::Array) {
+ QCborValue repack = QCborValue(arrayAsMap(QCborArray(*e.container)));
+ qSwap(e.container, repack.container);
+ } else if (e.type != QCborValue::Map) {
+ e.container->deref();
+ e.container = nullptr;
+ }
+ }
+ e.type = QCborValue::Map;
+ if (e.container)
+ size = e.container->elements.size();
+ } else {
+ // Stomp any prior e.value, replace with a map (that we'll grow)
+ e.container = nullptr;
+ e.type = QCborValue::Map;
+ e.flags = QtCbor::Element::IsContainer;
+ }
+
+ qsizetype index = size + 1;
+ bool found = false;
+ if (e.container) {
+ QCborMap proxy(*e.container);
+ auto it = proxy.constFind(key);
+ if (it < proxy.constEnd()) {
+ found = true;
+ index = it.item.i;
+ }
+ }
+
+ e.container = maybeDetach(e.container, size + (found ? 0 : 2));
+ Q_ASSERT(e.container);
+ if (!found) {
+ e.container->append(key);
+ e.container->append(QCborValue());
+ }
+ Q_ASSERT(index & 1 && !(e.container->elements.size() & 1));
+ Q_ASSERT(index < e.container->elements.size());
+ return { e.container, index };
+}
+
+/*!
+ \overload
+
+ Returns a QCborValueRef that can be used to read or modify the entry in
+ this, as a map or array, with the given \a key. When this QCborValue is a
+ QCborMap or, for 0 <= key < 0x10000, a QCborArray, this function is
+ equivalent to the matching operator[] on that map or array.
+
+ Before returning the reference: if the QCborValue referenced was an array
+ but the key is out of range, the array is first converted to a map (so that
+ \c{map[i]} is \c{array[i]} for each index, \c i, with valid \c{array[i]});
+ otherwise, if it was not a map it will be over-written with an empty map.
+
+ \sa operator[], QCborMap::operator[], QCborMap::value(),
+ QCborMap::find(), QCborArray::operator[], QCborArray::at()
+ */
+QCborValueRef QCborValueRef::operator[](qint64 key)
+{
+ auto &e = d->elements[i];
+ if (e.type == QCborValue::Array && key >= 0 && key < 0x10000) {
+ e.container = maybeGrow(e.container, key);
+ return { e.container, qsizetype(key) };
+ }
+ qsizetype size = 0;
+ if (e.flags & QtCbor::Element::IsContainer) {
+ if (e.container) {
+ if (e.type == QCborValue::Array) {
+ QCborValue repack = QCborValue(arrayAsMap(QCborArray(*e.container)));
+ qSwap(e.container, repack.container);
+ } else if (e.type != QCborValue::Map) {
+ e.container->deref();
+ e.container = nullptr;
+ }
+ }
+ e.type = QCborValue::Map;
+ if (e.container)
+ size = e.container->elements.size();
+ } else {
+ // Stomp any prior e.value, replace with a map (that we'll grow)
+ e.container = nullptr;
+ e.type = QCborValue::Map;
+ e.flags = QtCbor::Element::IsContainer;
+ }
+ Q_ASSERT(!(size & 1));
+
+ qsizetype index = size + 1;
+ bool found = false;
+ if (e.container) {
+ QCborMap proxy(*e.container);
+ auto it = proxy.constFind(key);
+ if (it < proxy.constEnd()) {
+ found = true;
+ index = it.item.i;
+ }
+ }
+
+ e.container = maybeDetach(e.container, size + (found ? 0 : 2));
+ Q_ASSERT(e.container);
+ if (!found) {
+ e.container->append(key);
+ e.container->append(QCborValue());
+ }
+ Q_ASSERT(index & 1 && !(e.container->elements.size() & 1));
+ Q_ASSERT(index < e.container->elements.size());
+ return { e.container, index };
+}
+
+
inline QCborArray::QCborArray(QCborContainerPrivate &dd) noexcept
: d(&dd)
{
@@ -2469,6 +2939,26 @@ QDebug operator<<(QDebug dbg, const QCborValue &v)
}
#endif
+#ifndef QT_NO_DATASTREAM
+QDataStream &operator<<(QDataStream &stream, const QCborValue &value)
+{
+ stream << QCborValue(value).toCbor();
+ return stream;
+}
+
+QDataStream &operator>>(QDataStream &stream, QCborValue &value)
+{
+ QByteArray buffer;
+ stream >> buffer;
+ QCborParserError parseError{};
+ value = QCborValue::fromCbor(buffer, &parseError);
+ if (parseError.error)
+ stream.setStatus(QDataStream::ReadCorruptData);
+ return stream;
+}
+#endif
+
+
QT_END_NAMESPACE
#include "qcborarray.cpp"
diff --git a/src/corelib/serialization/qcborvalue.h b/src/corelib/serialization/qcborvalue.h
index 105af1ba73..e6e73e1fb6 100644
--- a/src/corelib/serialization/qcborvalue.h
+++ b/src/corelib/serialization/qcborvalue.h
@@ -67,6 +67,7 @@ class QCborArray;
class QCborMap;
class QCborStreamReader;
class QCborStreamWriter;
+class QDataStream;
struct QCborParserError
{
@@ -76,6 +77,7 @@ struct QCborParserError
QString errorString() const { return error.toString(); }
};
+class QCborValueRef;
class QCborContainerPrivate;
class Q_CORE_EXPORT QCborValue
{
@@ -236,20 +238,18 @@ public:
QRegularExpression toRegularExpression(const QRegularExpression &defaultValue = {}) const;
QUuid toUuid(const QUuid &defaultValue = {}) const;
-#ifdef Q_QDOC
- QCborArray toArray(const QCborArray &a = {}) const;
- QCborMap toMap(const QCborMap &m = {}) const;
-#else
// only forward-declared, need split functions
QCborArray toArray() const;
QCborArray toArray(const QCborArray &defaultValue) const;
QCborMap toMap() const;
QCborMap toMap(const QCborMap &defaultValue) const;
-#endif
const QCborValue operator[](const QString &key) const;
const QCborValue operator[](QLatin1String key) const;
const QCborValue operator[](qint64 key) const;
+ QCborValueRef operator[](qint64 key);
+ QCborValueRef operator[](QLatin1String key);
+ QCborValueRef operator[](const QString & key);
int compare(const QCborValue &other) const;
#if 0 && QT_HAS_INCLUDE(<compare>)
@@ -385,16 +385,18 @@ public:
QUuid toUuid(const QUuid &defaultValue = {}) const
{ return concrete().toUuid(defaultValue); }
-#ifdef Q_QDOC
- QCborArray toArray(const QCborArray &a = {}) const;
- QCborMap toMap(const QCborMap &m = {}) const;
-#else
// only forward-declared, need split functions. Implemented in qcbor{array,map}.h
QCborArray toArray() const;
QCborArray toArray(const QCborArray &a) const;
QCborMap toMap() const;
QCborMap toMap(const QCborMap &m) const;
-#endif
+
+ const QCborValue operator[](const QString &key) const;
+ const QCborValue operator[](QLatin1String key) const;
+ const QCborValue operator[](qint64 key) const;
+ QCborValueRef operator[](qint64 key);
+ QCborValueRef operator[](QLatin1String key);
+ QCborValueRef operator[](const QString & key);
int compare(const QCborValue &other) const
{ return concrete().compare(other); }
@@ -426,6 +428,7 @@ public:
{ return concrete().toDiagnosticNotation(opt); }
private:
+ friend class QCborValue;
friend class QCborArray;
friend class QCborMap;
friend class QCborContainerPrivate;
@@ -457,6 +460,11 @@ Q_CORE_EXPORT uint qHash(const QCborValue &value, uint seed = 0);
Q_CORE_EXPORT QDebug operator<<(QDebug, const QCborValue &v);
#endif
+#ifndef QT_NO_DATASTREAM
+Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QCborValue &);
+Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QCborValue &);
+#endif
+
QT_END_NAMESPACE
#if defined(QT_X11_DEFINES_FOUND)
diff --git a/src/corelib/serialization/qdatastream.cpp b/src/corelib/serialization/qdatastream.cpp
index 951f6c9736..cc4efc9be3 100644
--- a/src/corelib/serialization/qdatastream.cpp
+++ b/src/corelib/serialization/qdatastream.cpp
@@ -392,17 +392,18 @@ void QDataStream::setDevice(QIODevice *d)
dev = d;
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
Unsets the I/O device.
- Use setDevice(0) instead.
+ Use setDevice(nullptr) instead.
*/
void QDataStream::unsetDevice()
{
- setDevice(0);
+ setDevice(nullptr);
}
-
+#endif
/*!
\fn bool QDataStream::atEnd() const
@@ -559,6 +560,7 @@ void QDataStream::setByteOrder(ByteOrder bo)
\value Qt_5_10 Same as Qt_5_6
\value Qt_5_11 Same as Qt_5_6
\value Qt_5_12 Version 18 (Qt 5.12)
+ \value Qt_5_13 Version 19 (Qt 5.13)
\omitvalue Qt_DefaultCompiledVersion
\sa setVersion(), version()
diff --git a/src/corelib/serialization/qdatastream.h b/src/corelib/serialization/qdatastream.h
index eae0146553..81134f74b0 100644
--- a/src/corelib/serialization/qdatastream.h
+++ b/src/corelib/serialization/qdatastream.h
@@ -99,10 +99,11 @@ public:
Qt_5_10 = Qt_5_9,
Qt_5_11 = Qt_5_10,
Qt_5_12 = 18,
-#if QT_VERSION >= 0x050d00
+ Qt_5_13 = 19,
+#if QT_VERSION >= 0x050e00
#error Add the datastream version for this Qt version and update Qt_DefaultCompiledVersion
#endif
- Qt_DefaultCompiledVersion = Qt_5_12
+ Qt_DefaultCompiledVersion = Qt_5_13
};
enum ByteOrder {
@@ -130,7 +131,10 @@ public:
QIODevice *device() const;
void setDevice(QIODevice *);
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use QDataStream::setDevice(nullptr) instead")
void unsetDevice();
+#endif
bool atEnd() const;
diff --git a/src/corelib/serialization/qjson_p.h b/src/corelib/serialization/qjson_p.h
index feba1faac6..40b2414e4a 100644
--- a/src/corelib/serialization/qjson_p.h
+++ b/src/corelib/serialization/qjson_p.h
@@ -746,7 +746,7 @@ public:
bool valid() const;
private:
- Q_DISABLE_COPY(Data)
+ Q_DISABLE_COPY_MOVE(Data)
};
}
diff --git a/src/corelib/serialization/qjsonarray.cpp b/src/corelib/serialization/qjsonarray.cpp
index 1187bb03a3..7dfa9b43f0 100644
--- a/src/corelib/serialization/qjsonarray.cpp
+++ b/src/corelib/serialization/qjsonarray.cpp
@@ -675,6 +675,14 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
\sa begin(), constEnd()
*/
+/*! \fn QJsonArray::const_iterator QJsonArray::cbegin() const
+
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item
+ in the array.
+
+ \sa begin(), cend()
+*/
+
/*! \fn QJsonArray::iterator QJsonArray::end()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item
@@ -696,6 +704,14 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
\sa constBegin(), end()
*/
+/*! \fn QJsonArray::const_iterator QJsonArray::cend() const
+
+ Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary
+ item after the last item in the array.
+
+ \sa cbegin(), end()
+*/
+
/*! \fn void QJsonArray::push_back(const QJsonValue &value)
This function is provided for STL compatibility. It is equivalent
@@ -1259,5 +1275,22 @@ QDebug operator<<(QDebug dbg, const QJsonArray &a)
}
#endif
+#ifndef QT_NO_DATASTREAM
+QDataStream &operator<<(QDataStream &stream, const QJsonArray &array)
+{
+ QJsonDocument doc{array};
+ stream << doc.toJson(QJsonDocument::Compact);
+ return stream;
+}
+
+QDataStream &operator>>(QDataStream &stream, QJsonArray &array)
+{
+ QJsonDocument doc;
+ stream >> doc;
+ array = doc.array();
+ return stream;
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qjsonarray.h b/src/corelib/serialization/qjsonarray.h
index 5dff4a0aa9..ba346fb848 100644
--- a/src/corelib/serialization/qjsonarray.h
+++ b/src/corelib/serialization/qjsonarray.h
@@ -214,9 +214,11 @@ public:
inline iterator begin() { detach2(); return iterator(this, 0); }
inline const_iterator begin() const { return const_iterator(this, 0); }
inline const_iterator constBegin() const { return const_iterator(this, 0); }
+ inline const_iterator cbegin() const { return const_iterator(this, 0); }
inline iterator end() { detach2(); return iterator(this, size()); }
inline const_iterator end() const { return const_iterator(this, size()); }
inline const_iterator constEnd() const { return const_iterator(this, size()); }
+ inline const_iterator cend() const { return const_iterator(this, size()); }
iterator insert(iterator before, const QJsonValue &value) { insert(before.i, value); return before; }
iterator erase(iterator it) { removeAt(it.i); return it; }
@@ -271,6 +273,11 @@ Q_CORE_EXPORT uint qHash(const QJsonArray &array, uint seed = 0);
Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonArray &);
#endif
+#ifndef QT_NO_DATASTREAM
+Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QJsonArray &);
+Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QJsonArray &);
+#endif
+
QT_END_NAMESPACE
#endif // QJSONARRAY_H
diff --git a/src/corelib/serialization/qjsoncbor.cpp b/src/corelib/serialization/qjsoncbor.cpp
index 158f1950d0..b4d3b4db18 100644
--- a/src/corelib/serialization/qjsoncbor.cpp
+++ b/src/corelib/serialization/qjsoncbor.cpp
@@ -817,7 +817,7 @@ QCborArray QCborArray::fromJsonArray(const QJsonArray &array)
{
QCborArray a;
a.detach(array.size());
- for (const QJsonValue v : array) {
+ for (const QJsonValue &v : array) {
if (v.isString())
a.d->append(v.toString());
else
diff --git a/src/corelib/serialization/qjsondocument.cpp b/src/corelib/serialization/qjsondocument.cpp
index 0cd86d3ded..179a87c699 100644
--- a/src/corelib/serialization/qjsondocument.cpp
+++ b/src/corelib/serialization/qjsondocument.cpp
@@ -47,6 +47,7 @@
#include "qjsonwriter_p.h"
#include "qjsonparser_p.h"
#include "qjson_p.h"
+#include "qdatastream.h"
QT_BEGIN_NAMESPACE
@@ -657,4 +658,23 @@ QDebug operator<<(QDebug dbg, const QJsonDocument &o)
}
#endif
+#ifndef QT_NO_DATASTREAM
+QDataStream &operator<<(QDataStream &stream, const QJsonDocument &doc)
+{
+ stream << doc.toJson(QJsonDocument::Compact);
+ return stream;
+}
+
+QDataStream &operator>>(QDataStream &stream, QJsonDocument &doc)
+{
+ QByteArray buffer;
+ stream >> buffer;
+ QJsonParseError parseError{};
+ doc = QJsonDocument::fromJson(buffer, &parseError);
+ if (parseError.error && !buffer.isEmpty())
+ stream.setStatus(QDataStream::ReadCorruptData);
+ return stream;
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qjsondocument.h b/src/corelib/serialization/qjsondocument.h
index b784890c54..a749439b7d 100644
--- a/src/corelib/serialization/qjsondocument.h
+++ b/src/corelib/serialization/qjsondocument.h
@@ -172,6 +172,11 @@ Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QJsonDocument)
Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonDocument &);
#endif
+#ifndef QT_NO_DATASTREAM
+Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QJsonDocument &);
+Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QJsonDocument &);
+#endif
+
QT_END_NAMESPACE
#endif // QJSONDOCUMENT_H
diff --git a/src/corelib/serialization/qjsonobject.cpp b/src/corelib/serialization/qjsonobject.cpp
index 950bec535b..a9f25a119c 100644
--- a/src/corelib/serialization/qjsonobject.cpp
+++ b/src/corelib/serialization/qjsonobject.cpp
@@ -1320,4 +1320,21 @@ QDebug operator<<(QDebug dbg, const QJsonObject &o)
}
#endif
+#ifndef QT_NO_DATASTREAM
+QDataStream &operator<<(QDataStream &stream, const QJsonObject &object)
+{
+ QJsonDocument doc{object};
+ stream << doc.toJson(QJsonDocument::Compact);
+ return stream;
+}
+
+QDataStream &operator>>(QDataStream &stream, QJsonObject &object)
+{
+ QJsonDocument doc;
+ stream >> doc;
+ object = doc.object();
+ return stream;
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qjsonobject.h b/src/corelib/serialization/qjsonobject.h
index be42d3747a..80fe6b2f3f 100644
--- a/src/corelib/serialization/qjsonobject.h
+++ b/src/corelib/serialization/qjsonobject.h
@@ -268,6 +268,11 @@ Q_CORE_EXPORT uint qHash(const QJsonObject &object, uint seed = 0);
Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonObject &);
#endif
+#ifndef QT_NO_DATASTREAM
+Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QJsonObject &);
+Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QJsonObject &);
+#endif
+
QT_END_NAMESPACE
#endif // QJSONOBJECT_H
diff --git a/src/corelib/serialization/qjsonvalue.cpp b/src/corelib/serialization/qjsonvalue.cpp
index 2c04da4885..1fc610d7c7 100644
--- a/src/corelib/serialization/qjsonvalue.cpp
+++ b/src/corelib/serialization/qjsonvalue.cpp
@@ -45,6 +45,7 @@
#include <qvariant.h>
#include <qstringlist.h>
#include <qdebug.h>
+#include "qdatastream.h"
#ifndef QT_BOOTSTRAPPED
# include <qcborarray.h>
@@ -933,4 +934,78 @@ QDebug operator<<(QDebug dbg, const QJsonValue &o)
}
#endif
+#ifndef QT_NO_DATASTREAM
+QDataStream &operator<<(QDataStream &stream, const QJsonValue &v)
+{
+ quint8 type = v.t;
+ stream << type;
+ switch (type) {
+ case QJsonValue::Undefined:
+ case QJsonValue::Null:
+ break;
+ case QJsonValue::Bool:
+ stream << v.toBool();
+ break;
+ case QJsonValue::Double:
+ stream << v.toDouble();
+ break;
+ case QJsonValue::String:
+ stream << v.toString();
+ break;
+ case QJsonValue::Array:
+ stream << v.toArray();
+ break;
+ case QJsonValue::Object:
+ stream << v.toObject();
+ break;
+ }
+ return stream;
+}
+
+QDataStream &operator>>(QDataStream &stream, QJsonValue &v)
+{
+ quint8 type;
+ stream >> type;
+ switch (type) {
+ case QJsonValue::Undefined:
+ case QJsonValue::Null:
+ v = QJsonValue{QJsonValue::Type(type)};
+ break;
+ case QJsonValue::Bool: {
+ bool b;
+ stream >> b;
+ v = QJsonValue(b);
+ break;
+ } case QJsonValue::Double: {
+ double d;
+ stream >> d;
+ v = QJsonValue{d};
+ break;
+ } case QJsonValue::String: {
+ QString s;
+ stream >> s;
+ v = QJsonValue{s};
+ break;
+ }
+ case QJsonValue::Array: {
+ QJsonArray a;
+ stream >> a;
+ v = QJsonValue{a};
+ break;
+ }
+ case QJsonValue::Object: {
+ QJsonObject o;
+ stream >> o;
+ v = QJsonValue{o};
+ break;
+ }
+ default: {
+ stream.setStatus(QDataStream::ReadCorruptData);
+ v = QJsonValue{QJsonValue::Undefined};
+ }
+ }
+ return stream;
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/corelib/serialization/qjsonvalue.h b/src/corelib/serialization/qjsonvalue.h
index d8e121524d..0339eb59f7 100644
--- a/src/corelib/serialization/qjsonvalue.h
+++ b/src/corelib/serialization/qjsonvalue.h
@@ -152,6 +152,7 @@ private:
friend class QJsonObject;
friend class QCborValue;
friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonValue &);
+ friend Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QJsonValue &);
QJsonValue(QJsonPrivate::Data *d, QJsonPrivate::Base *b, const QJsonPrivate::Value& v);
void stringDataFromQStringHelper(const QString &string);
@@ -218,7 +219,6 @@ private:
uint index : 31;
};
-#ifndef Q_QDOC
// ### Qt 6: Get rid of these fake pointer classes
class QJsonValuePtr
{
@@ -243,7 +243,6 @@ public:
QJsonValueRef& operator*() { return valueRef; }
QJsonValueRef* operator->() { return &valueRef; }
};
-#endif
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QJsonValue)
@@ -253,6 +252,11 @@ Q_CORE_EXPORT uint qHash(const QJsonValue &value, uint seed = 0);
Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonValue &);
#endif
+#ifndef QT_NO_DATASTREAM
+Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QJsonValue &);
+Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QJsonValue &);
+#endif
+
QT_END_NAMESPACE
#endif // QJSONVALUE_H
diff --git a/src/corelib/serialization/qxmlstream.g b/src/corelib/serialization/qxmlstream.g
index 10bfcd491c..e6328a11ac 100644
--- a/src/corelib/serialization/qxmlstream.g
+++ b/src/corelib/serialization/qxmlstream.g
@@ -41,6 +41,8 @@
%merged_output qxmlstream_p.h
+%expect 4
+
%token NOTOKEN
%token SPACE " "
%token LANGLE "<"
@@ -144,7 +146,12 @@
%start document
+
+
/.
+
+#include <QtCore/private/qglobal_p.h>
+
template <typename T> class QXmlStreamSimpleStack {
T *data;
int tos, cap;
@@ -155,7 +162,8 @@ public:
inline void reserve(int extraCapacity) {
if (tos + extraCapacity + 1 > cap) {
cap = qMax(tos + extraCapacity + 1, cap << 1 );
- data = reinterpret_cast<T *>(realloc(data, cap * sizeof(T)));
+ void *ptr = realloc(static_cast<void *>(data), cap * sizeof(T));
+ data = reinterpret_cast<T *>(ptr);
Q_CHECK_PTR(data);
}
}
@@ -753,7 +761,7 @@ bool QXmlStreamReaderPrivate::parse()
state_stack[tos] = 0;
return true;
} else if (act > 0) {
- if (++tos == stack_size-1)
+ if (++tos >= stack_size-1)
reallocateStack();
Value &val = sym_stack[tos];
@@ -890,7 +898,7 @@ doctype_decl ::= langle_bang DOCTYPE qname markup space_opt RANGLE;
/.
case $rule_number:
dtdName = symString(3);
- // fall through
+ Q_FALLTHROUGH();
./
doctype_decl ::= doctype_decl_start external_id space_opt markup space_opt RANGLE;
/.
diff --git a/src/corelib/statemachine/qsignaleventgenerator_p.h b/src/corelib/statemachine/qsignaleventgenerator_p.h
index 271f6317bd..72592b8731 100644
--- a/src/corelib/statemachine/qsignaleventgenerator_p.h
+++ b/src/corelib/statemachine/qsignaleventgenerator_p.h
@@ -71,7 +71,7 @@ private:
void execute(void **_a);
private:
- Q_DISABLE_COPY(QSignalEventGenerator)
+ Q_DISABLE_COPY_MOVE(QSignalEventGenerator)
};
QT_END_NAMESPACE
diff --git a/src/corelib/statemachine/qsignaltransition_p.h b/src/corelib/statemachine/qsignaltransition_p.h
index 0666e600a4..b3de334677 100644
--- a/src/corelib/statemachine/qsignaltransition_p.h
+++ b/src/corelib/statemachine/qsignaltransition_p.h
@@ -70,7 +70,7 @@ public:
void unregister();
void maybeRegister();
- virtual void callOnTransition(QEvent *e) override;
+ void callOnTransition(QEvent *e) override;
const QObject *sender;
QByteArray signal;
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index 7388d496d9..ee3f7be279 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -1721,8 +1721,8 @@ QAbstractTransition *QStateMachinePrivate::createInitialTransition() const
: QAbstractTransition()
{ setTargetStates(targets); }
protected:
- virtual bool eventTest(QEvent *) override { return true; }
- virtual void onTransition(QEvent *) override {}
+ bool eventTest(QEvent *) override { return true; }
+ void onTransition(QEvent *) override {}
};
QState *root = rootState();
diff --git a/src/corelib/thread/qresultstore.cpp b/src/corelib/thread/qresultstore.cpp
index e0ce1b4b78..1b3bc20eca 100644
--- a/src/corelib/thread/qresultstore.cpp
+++ b/src/corelib/thread/qresultstore.cpp
@@ -43,6 +43,21 @@ QT_BEGIN_NAMESPACE
namespace QtPrivate {
+/*!
+ \class QtPrivate::ResultItem
+ \internal
+ */
+
+/*!
+ \class QtPrivate::ResultIteratorBase
+ \internal
+ */
+
+/*!
+ \class QtPrivate::ResultStoreBase
+ \internal
+ */
+
ResultIteratorBase::ResultIteratorBase()
: mapIterator(QMap<int, ResultItem>::const_iterator()), m_vectorIndex(0) { }
ResultIteratorBase::ResultIteratorBase(QMap<int, ResultItem>::const_iterator _mapIterator, int _vectorIndex)
diff --git a/src/corelib/thread/qresultstore.h b/src/corelib/thread/qresultstore.h
index 39f0a6d1bb..1f29e8d187 100644
--- a/src/corelib/thread/qresultstore.h
+++ b/src/corelib/thread/qresultstore.h
@@ -56,7 +56,6 @@ QT_BEGIN_NAMESPACE
either individually or in batches.
*/
-#ifndef Q_QDOC
namespace QtPrivate {
@@ -196,7 +195,6 @@ public:
Q_DECLARE_TYPEINFO(QtPrivate::ResultItem, Q_PRIMITIVE_TYPE);
-#endif //Q_QDOC
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index c8bb384532..70eae9e463 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -3882,9 +3882,7 @@ static qulonglong toIntegral_helper(const char *data, bool *ok, int base, qulong
template <typename T> static inline
T toIntegral_helper(const char *data, bool *ok, int base)
{
- // ### Qt6: use std::conditional<std::is_unsigned<T>::value, qulonglong, qlonglong>::type
- const bool isUnsigned = T(0) < T(-1);
- typedef typename QtPrivate::QConditional<isUnsigned, qulonglong, qlonglong>::Type Int64;
+ using Int64 = typename std::conditional<std::is_unsigned<T>::value, qulonglong, qlonglong>::type;
#if defined(QT_CHECK_RANGE)
if (base != 0 && (base < 2 || base > 36)) {
diff --git a/src/corelib/tools/qbytearraylist.cpp b/src/corelib/tools/qbytearraylist.cpp
index c815e766ab..d04555ed4d 100644
--- a/src/corelib/tools/qbytearraylist.cpp
+++ b/src/corelib/tools/qbytearraylist.cpp
@@ -150,4 +150,26 @@ QByteArray QtPrivate::QByteArrayList_join(const QByteArrayList *that, const char
return res;
}
+/*!
+ \fn int QByteArrayList::indexOf(const char *needle, int from) const
+
+ Returns the index position of the first occurrence of \a needle in
+ the list, searching forward from index position \a from. Returns
+ -1 if no item matched.
+
+ \a needle must be NUL-terminated.
+
+ This overload doesn't require creating a QByteArray, thus saving a
+ memory allocation and some CPU time.
+
+ \since 5.13
+ \overload
+*/
+
+int QtPrivate::QByteArrayList_indexOf(const QByteArrayList *that, const char *needle, int from)
+{
+ const auto it = std::find_if(that->begin() + from, that->end(), [needle](const QByteArray &item) { return item == needle; });
+ return it == that->end() ? -1 : int(std::distance(that->begin(), it));
+}
+
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qbytearraylist.h b/src/corelib/tools/qbytearraylist.h
index ed014dd157..d69e8bb54b 100644
--- a/src/corelib/tools/qbytearraylist.h
+++ b/src/corelib/tools/qbytearraylist.h
@@ -50,21 +50,22 @@ QT_BEGIN_NAMESPACE
typedef QListIterator<QByteArray> QByteArrayListIterator;
typedef QMutableListIterator<QByteArray> QMutableByteArrayListIterator;
-#ifndef Q_QDOC
+#ifndef Q_CLANG_QDOC
typedef QList<QByteArray> QByteArrayList;
namespace QtPrivate {
QByteArray Q_CORE_EXPORT QByteArrayList_join(const QByteArrayList *that, const char *separator, int separatorLength);
+ int Q_CORE_EXPORT QByteArrayList_indexOf(const QByteArrayList *that, const char *needle, int from);
}
#endif
-#ifdef Q_QDOC
+#ifdef Q_CLANG_QDOC
class QByteArrayList : public QList<QByteArray>
#else
template <> struct QListSpecialMethods<QByteArray>
#endif
{
-#ifndef Q_QDOC
+#ifndef Q_CLANG_QDOC
protected:
~QListSpecialMethods() {}
#endif
@@ -76,6 +77,9 @@ public:
inline QByteArray join(char sep) const
{ return QtPrivate::QByteArrayList_join(self(), &sep, 1); }
+ inline int indexOf(const char *needle, int from = 0) const
+ { return QtPrivate::QByteArrayList_indexOf(self(), needle, from); }
+
private:
typedef QList<QByteArray> Self;
Self *self() { return static_cast<Self *>(this); }
diff --git a/src/corelib/tools/qcollator_p.h b/src/corelib/tools/qcollator_p.h
index 361c3fb987..fc2d434a8d 100644
--- a/src/corelib/tools/qcollator_p.h
+++ b/src/corelib/tools/qcollator_p.h
@@ -122,7 +122,7 @@ public:
void cleanup();
private:
- Q_DISABLE_COPY(QCollatorPrivate)
+ Q_DISABLE_COPY_MOVE(QCollatorPrivate)
};
class QCollatorSortKeyPrivate : public QSharedData
@@ -139,7 +139,7 @@ public:
CollatorKeyType m_key;
private:
- Q_DISABLE_COPY(QCollatorSortKeyPrivate)
+ Q_DISABLE_COPY_MOVE(QCollatorSortKeyPrivate)
};
diff --git a/src/corelib/tools/qcommandlineparser.cpp b/src/corelib/tools/qcommandlineparser.cpp
index 279d6565da..6817d73143 100644
--- a/src/corelib/tools/qcommandlineparser.cpp
+++ b/src/corelib/tools/qcommandlineparser.cpp
@@ -589,7 +589,7 @@ static void showParserMessage(const QString &message, MessageType type)
void QCommandLineParser::process(const QStringList &arguments)
{
if (!d->parse(arguments)) {
- showParserMessage(errorText() + QLatin1Char('\n'), ErrorMessage);
+ showParserMessage(QCoreApplication::applicationName() + QLatin1String(": ") + errorText() + QLatin1Char('\n'), ErrorMessage);
qt_call_post_routines();
::exit(EXIT_FAILURE);
}
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 816bd974eb..600bd1e0e5 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -2171,16 +2171,6 @@ int QTime::elapsed() const
typedef QDateTimePrivate::QDateTimeShortData ShortData;
typedef QDateTimePrivate::QDateTimeData QDateTimeData;
-// Calls the platform variant of tzset
-static void qt_tzset()
-{
-#if defined(Q_OS_WIN)
- _tzset();
-#else
- tzset();
-#endif // Q_OS_WIN
-}
-
// Returns the platform variant of timezone, i.e. the standard time offset
// The timezone external variable is documented as always holding the
// Standard Time offset as seconds west of Greenwich, i.e. UTC+01:00 is -3600
@@ -2278,7 +2268,7 @@ static qint64 qt_mktime(QDate *date, QTime *time, QDateTimePrivate::DaylightStat
#if defined(Q_OS_WIN)
int hh = local.tm_hour;
#endif // Q_OS_WIN
- time_t secsSinceEpoch = mktime(&local);
+ time_t secsSinceEpoch = qMkTime(&local);
if (secsSinceEpoch != time_t(-1)) {
*date = QDate(local.tm_year + 1900, local.tm_mon + 1, local.tm_mday);
*time = QTime(local.tm_hour, local.tm_min, local.tm_sec, msec);
@@ -2337,10 +2327,10 @@ static bool qt_localtime(qint64 msecsSinceEpoch, QDate *localDate, QTime *localT
tm local;
bool valid = false;
- // localtime() is required to work as if tzset() was called before it.
- // localtime_r() does not have this requirement, so make an explicit call.
+ // localtime() is specified to work as if it called tzset().
+ // localtime_r() does not have this constraint, so make an explicit call.
// The explicit call should also request the timezone info be re-parsed.
- qt_tzset();
+ qTzSet();
#if QT_CONFIG(thread) && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
// Use the reentrant version of localtime() where available
// as is thread-safe and doesn't use a shared static data area
@@ -2422,7 +2412,7 @@ static bool epochMSecsToLocalTime(qint64 msecs, QDate *localDate, QTime *localTi
if (msecs < 0) {
// Docs state any LocalTime before 1970-01-01 will *not* have any Daylight Time applied
// Instead just use the standard offset from UTC to convert to UTC time
- qt_tzset();
+ qTzSet();
msecsToTime(msecs - qt_timezone() * 1000, localDate, localTime);
if (daylightStatus)
*daylightStatus = QDateTimePrivate::StandardTime;
@@ -2485,7 +2475,7 @@ static qint64 localMSecsToEpochMSecs(qint64 localMsecs,
}
} else {
// If we don't call mktime then need to call tzset to get offset
- qt_tzset();
+ qTzSet();
}
// Time is clearly before 1970-01-01 so just use standard offset to convert
qint64 utcMsecs = localMsecs + qt_timezone() * 1000;
diff --git a/src/corelib/tools/qfreelist_p.h b/src/corelib/tools/qfreelist_p.h
index 2f98cf5cc1..63be0952ff 100644
--- a/src/corelib/tools/qfreelist_p.h
+++ b/src/corelib/tools/qfreelist_p.h
@@ -187,7 +187,7 @@ class QFreeList
QAtomicInt _next;
// QFreeList is not copyable
- Q_DISABLE_COPY(QFreeList)
+ Q_DISABLE_COPY_MOVE(QFreeList)
public:
Q_DECL_CONSTEXPR inline QFreeList();
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index 17aba8035b..1de93ff9e1 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -48,6 +48,23 @@
QT_BEGIN_NAMESPACE
/*
+ ### Qt 5:
+ ### This needs to be removed for next releases of Qt. It is a workaround for vc++ because
+ ### Qt exports QPolygon and QPolygonF that inherit QVector<QPoint> and
+ ### QVector<QPointF> respectively.
+*/
+
+#if defined(Q_CC_MSVC) && defined(QT_BUILD_CORE_LIB)
+QT_BEGIN_INCLUDE_NAMESPACE
+#include <QtCore/qpoint.h>
+QT_END_INCLUDE_NAMESPACE
+
+template class Q_CORE_EXPORT QVector<QPointF>;
+template class Q_CORE_EXPORT QVector<QPoint>;
+#endif
+
+
+/*
QList as an array-list combines the easy-of-use of a random
access interface with fast list operations and the low memory
management overhead of an array. Accessing elements by index,
@@ -948,6 +965,13 @@ void **QListData::erase(void **xi)
/*! \fn template <class T> void QList<T>::swap(int i, int j)
+ \obsolete Use swapItemsAt()
+
+ \sa move(), swapItemsAt()
+*/
+
+/*! \fn template <class T> void QList<T>::swapItemsAt(int i, int j)
+
Exchange the item at index position \a i with the item at index
position \a j. This function assumes that both \a i and \a j are
at least 0 but less than size(). To avoid failure, test that both
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 49ccbc9c9f..6643288bd5 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -45,6 +45,7 @@
#include <QtCore/qrefcount.h>
#include <QtCore/qarraydata.h>
#include <QtCore/qhashfunctions.h>
+#include <QtCore/qvector.h>
#include <iterator>
#include <list>
@@ -117,6 +118,11 @@ struct Q_CORE_EXPORT QListData {
inline void **end() const Q_DECL_NOTHROW { return d->array + d->end; }
};
+namespace QtPrivate {
+ template <typename V, typename U> int indexOf(const QList<V> &list, const U &u, int from);
+ template <typename V, typename U> int lastIndexOf(const QList<V> &list, const U &u, int from);
+}
+
template <typename T>
class QList
#ifndef Q_QDOC
@@ -135,6 +141,8 @@ public:
QListData::InlineWithPaddingLayout
>::type>::type {};
private:
+ template <typename V, typename U> friend int QtPrivate::indexOf(const QList<V> &list, const U &u, int from);
+ template <typename V, typename U> friend int QtPrivate::lastIndexOf(const QList<V> &list, const U &u, int from);
struct Node { void *v;
#if defined(Q_CC_BOR)
Q_INLINE_TEMPLATE T &t();
@@ -213,7 +221,11 @@ public:
T takeFirst();
T takeLast();
void move(int from, int to);
- void swap(int i, int j);
+ void swapItemsAt(int i, int j);
+#if QT_DEPRECATED_SINCE(5, 13) && QT_VERSION < QT_VERSION_CHECK(6,0,0)
+ QT_DEPRECATED_X("Use QList<T>::swapItemsAt()")
+ void swap(int i, int j) { swapItemsAt(i, j); }
+#endif
int indexOf(const T &t, int from = 0) const;
int lastIndexOf(const T &t, int from = -1) const;
bool contains(const T &t) const;
@@ -689,7 +701,7 @@ inline void QList<T>::replace(int i, const T &t)
}
template <typename T>
-inline void QList<T>::swap(int i, int j)
+inline void QList<T>::swapItemsAt(int i, int j)
{
Q_ASSERT_X(i >= 0 && i < p.size() && j >= 0 && j < p.size(),
"QList<T>::swap", "index out of range");
@@ -970,35 +982,57 @@ inline void QList<T>::append(const QList<T> &t)
template <typename T>
Q_OUTOFLINE_TEMPLATE int QList<T>::indexOf(const T &t, int from) const
{
+ return QtPrivate::indexOf<T, T>(*this, t, from);
+}
+
+namespace QtPrivate
+{
+template <typename T, typename U>
+int indexOf(const QList<T> &list, const U &u, int from)
+{
+ typedef typename QList<T>::Node Node;
+
if (from < 0)
- from = qMax(from + p.size(), 0);
- if (from < p.size()) {
- Node *n = reinterpret_cast<Node *>(p.at(from -1));
- Node *e = reinterpret_cast<Node *>(p.end());
+ from = qMax(from + list.p.size(), 0);
+ if (from < list.p.size()) {
+ Node *n = reinterpret_cast<Node *>(list.p.at(from -1));
+ Node *e = reinterpret_cast<Node *>(list.p.end());
while (++n != e)
- if (n->t() == t)
- return int(n - reinterpret_cast<Node *>(p.begin()));
+ if (n->t() == u)
+ return int(n - reinterpret_cast<Node *>(list.p.begin()));
}
return -1;
}
+}
template <typename T>
Q_OUTOFLINE_TEMPLATE int QList<T>::lastIndexOf(const T &t, int from) const
{
+ return QtPrivate::lastIndexOf<T, T>(*this, t, from);
+}
+
+namespace QtPrivate
+{
+template <typename T, typename U>
+int lastIndexOf(const QList<T> &list, const U &u, int from)
+{
+ typedef typename QList<T>::Node Node;
+
if (from < 0)
- from += p.size();
- else if (from >= p.size())
- from = p.size()-1;
+ from += list.p.size();
+ else if (from >= list.p.size())
+ from = list.p.size()-1;
if (from >= 0) {
- Node *b = reinterpret_cast<Node *>(p.begin());
- Node *n = reinterpret_cast<Node *>(p.at(from + 1));
+ Node *b = reinterpret_cast<Node *>(list.p.begin());
+ Node *n = reinterpret_cast<Node *>(list.p.at(from + 1));
while (n-- != b) {
- if (n->t() == t)
+ if (n->t() == u)
return n - b;
}
}
return -1;
}
+}
template <typename T>
Q_OUTOFLINE_TEMPLATE bool QList<T>::contains(const T &t) const
@@ -1051,6 +1085,37 @@ inline int QList<T>::count_impl(const T &t, QListData::ArrayCompatibleLayout) co
t));
}
+template <typename T>
+Q_OUTOFLINE_TEMPLATE QVector<T> QList<T>::toVector() const
+{
+ QVector<T> result(size());
+ for (int i = 0; i < size(); ++i)
+ result[i] = at(i);
+ return result;
+}
+
+template <typename T>
+QList<T> QList<T>::fromVector(const QVector<T> &vector)
+{
+ return vector.toList();
+}
+
+template <typename T>
+Q_OUTOFLINE_TEMPLATE QList<T> QVector<T>::toList() const
+{
+ QList<T> result;
+ result.reserve(size());
+ for (int i = 0; i < size(); ++i)
+ result.append(at(i));
+ return result;
+}
+
+template <typename T>
+QVector<T> QVector<T>::fromList(const QList<T> &list)
+{
+ return list.toVector();
+}
+
Q_DECLARE_SEQUENTIAL_ITERATOR(List)
Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR(List)
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 63499ab93f..86b73bf634 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -620,13 +620,18 @@ static QLocalePrivate *c_private()
*/
/*!
- Constructs a QSystemLocale object. The constructor will automatically
- install this object as the system locale and remove any earlier installed
- system locales.
+ Constructs a QSystemLocale object.
+
+ The constructor will automatically install this object as the system locale,
+ if there's not one active. It also resets the flag that'll prompt
+ QLocale::system() to re-initialize its data, so that instantiating a
+ QSystemLocale transiently (doesn't install the transient as system locale if
+ there was one already and) triggers an update to the system locale's data.
*/
QSystemLocale::QSystemLocale()
{
- _systemLocale = this;
+ if (!_systemLocale)
+ _systemLocale = this;
globalLocaleData.m_language_id = 0;
}
@@ -656,15 +661,17 @@ static const QSystemLocale *systemLocale()
return QSystemLocale_globalSystemLocale();
}
-void QLocalePrivate::updateSystemPrivate()
+static void updateSystemPrivate()
{
- // this function is NOT thread-safe!
+ // This function is NOT thread-safe!
+ // It *should not* be called by anything but systemData()
const QSystemLocale *sys_locale = systemLocale();
// tell the object that the system locale has changed.
sys_locale->query(QSystemLocale::LocaleChanged, QVariant());
- globalLocaleData = *sys_locale->fallbackUiLocale().d->m_data;
+ // Populate global with fallback as basis:
+ globalLocaleData = *sys_locale->fallbackUiLocaleData();
QVariant res = sys_locale->query(QSystemLocale::LanguageId, QVariant());
if (!res.isNull()) {
@@ -715,7 +722,7 @@ static const QLocaleData *systemData()
static QBasicMutex systemDataMutex;
systemDataMutex.lock();
if (globalLocaleData.m_language_id == 0)
- QLocalePrivate::updateSystemPrivate();
+ updateSystemPrivate();
systemDataMutex.unlock();
}
@@ -1180,9 +1187,7 @@ static qulonglong toIntegral_helper(const QLocaleData *d, QStringView str, bool
template <typename T> static inline
T toIntegral_helper(const QLocalePrivate *d, QStringView str, bool *ok)
{
- // ### Qt6: use std::conditional<std::is_unsigned<T>::value, qulonglong, qlonglong>::type
- const bool isUnsigned = T(0) < T(-1);
- typedef typename QtPrivate::QConditional<isUnsigned, qulonglong, qlonglong>::Type Int64;
+ using Int64 = typename std::conditional<std::is_unsigned<T>::value, qulonglong, qlonglong>::type;
// we select the right overload by the last, unused parameter
Int64 val = toIntegral_helper(d->m_data, str, ok, d->m_numberOptions, Int64());
@@ -2365,7 +2370,6 @@ QString QLocale::toString(double i, char f, int prec) const
QLocale QLocale::system()
{
- // this function is NOT thread-safe!
QT_PREPEND_NAMESPACE(systemData)(); // trigger updating of the system data if necessary
if (systemLocalePrivate.isDestroyed())
return QLocale(QLocale::C);
@@ -3891,6 +3895,19 @@ QString QLocale::toCurrencyString(double value, const QString &symbol, int preci
\sa formattedDataSize()
*/
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+/*!
+ \obsolete
+
+ Use the const version instead.
+*/
+QString QLocale::formattedDataSize(qint64 bytes, int precision, DataSizeFormats format)
+{
+ const auto *that = this;
+ return that->formattedDataSize(bytes, precision, format);
+}
+#endif
+
/*!
\since 5.10
@@ -3907,7 +3924,7 @@ QString QLocale::toCurrencyString(double value, const QString &symbol, int preci
whereas \c DataSizeSIFormat uses the older SI quantifiers k, M, etc., and
\c DataSizeTraditionalFormat abuses them.
*/
-QString QLocale::formattedDataSize(qint64 bytes, int precision, DataSizeFormats format)
+QString QLocale::formattedDataSize(qint64 bytes, int precision, DataSizeFormats format) const
{
int power, base = 1000;
if (!bytes) {
diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h
index f3afb8c406..1fbd96c6d5 100644
--- a/src/corelib/tools/qlocale.h
+++ b/src/corelib/tools/qlocale.h
@@ -436,6 +436,11 @@ public:
Cantonese = 357,
Osage = 358,
Tangut = 359,
+ Ido = 360,
+ Lojban = 361,
+ Sicilian = 362,
+ SouthernKurdish = 363,
+ WesternBalochi = 364,
Afan = Oromo,
Bhutani = Dzongkha,
@@ -452,7 +457,7 @@ public:
Twi = Akan,
Uigur = Uighur,
- LastLanguage = Tangut
+ LastLanguage = WesternBalochi
};
enum Script {
@@ -1061,7 +1066,10 @@ public:
{ return toCurrencyString(double(i), symbol, precision); }
#endif
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QString formattedDataSize(qint64 bytes, int precision = 2, DataSizeFormats format = DataSizeIecFormat);
+#endif
+ QString formattedDataSize(qint64 bytes, int precision = 2, DataSizeFormats format = DataSizeIecFormat) const;
QStringList uiLanguages() const;
@@ -1091,6 +1099,7 @@ public:
private:
QLocale(QLocalePrivate &dd);
friend class QLocalePrivate;
+ friend class QSystemLocale;
friend Q_CORE_EXPORT uint qHash(const QLocale &key, uint seed) Q_DECL_NOTHROW;
QSharedDataPointer<QLocalePrivate> d;
diff --git a/src/corelib/tools/qlocale.qdoc b/src/corelib/tools/qlocale.qdoc
index 76ca909d83..b852c10b8d 100644
--- a/src/corelib/tools/qlocale.qdoc
+++ b/src/corelib/tools/qlocale.qdoc
@@ -105,42 +105,80 @@
\value AnyLanguage
\value C The "C" locale is identical in behavior to English/UnitedStates.
+
\value Abkhazian
- \value Oromo
\value Afan Obsolete, please use Oromo
\value Afar
\value Afrikaans
+ \value Aghem
+ \value Ahom Since Qt 5.7
+ \value Akan
+ \value Akkadian Since Qt 5.1
\value Akoose Since Qt 5.3
\value Albanian
+ \value AmericanSignLanguage Since Qt 5.7
\value Amharic
+ \value AncientEgyptian Since Qt 5.1
+ \value AncientGreek Since Qt 5.1
+ \value AncientNorthArabian Since Qt 5.5
\value Arabic
+ \value Aragonese Since Qt 5.1
+ \value Aramaic Since Qt 5.1
+ \value ArdhamagadhiPrakrit Since Qt 5.7
\value Armenian
\value Assamese
+ \value Asturian
+ \value Asu
+ \value Atsam
\value Avaric
+ \value Avestan
\value Aymara
\value Azerbaijani
+ \value Bafia
+ \value Balinese Since Qt 5.1
+ \value Bambara
+ \value Bamun Since Qt 5.1
+ \value Basaa
\value Bashkir
\value Basque
+ \value Bassa Since Qt 5.5
+ \value BatakToba Since Qt 5.1
+ \value Belarusian
+ \value Bemba
+ \value Bena
\value Bengali
- \value Dzongkha
+ \value Bhojpuri Since Qt 5.7
\value Bhutani Obsolete, please use Dzongkha
\value Bihari
\value Bislama
- \value Bosnian
+ \value Blin
\value Bodo
+ \value Bosnian
\value Breton
+ \value Buginese Since Qt 5.1
+ \value Buhid Since Qt 5.1
\value Bulgarian
\value Burmese
- \value Belarusian
\value Byelorussian Obsolete, please use Belarusian
- \value Khmer
\value Cambodian Obsolete, please use Khmer
+ \value Cantonese Since Qt 5.7
+ \value Carian Since Qt 5.1
\value Catalan
+ \value CentralKurdish Since Qt 5.5
+ \value CentralMoroccoTamazight
+ \value Chakma Since Qt 5.1
\value Chamorro
\value Chechen
+ \value Cherokee
+ \value Chewa Obsolete, please use Nyanja
+ \value Chiga
\value Chinese
\value Church
\value Chuvash
+ \value ClassicalMandaic Since Qt 5.1
+ \value Colognian
+ \value CongoSwahili
+ \value Coptic Since Qt 5.1
\value Cornish
\value Corsican
\value Cree
@@ -148,33 +186,58 @@
\value Czech
\value Danish
\value Divehi
+ \value Dogri Since Qt 5.1
+ \value Duala
\value Dutch
+ \value Dzongkha
+ \value EasternCham Since Qt 5.1
+ \value EasternKayah Since Qt 5.1
+ \value Embu
\value English
\value Esperanto
\value Estonian
+ \value Etruscan Since Qt 5.1
+ \value Ewe
+ \value Ewondo
\value Faroese
\value Fijian
+ \value Filipino
\value Finnish
\value French
- \value WesternFrisian same as Frisian
\value Frisian same as WesternFrisian
+ \value Friulian
+ \value Fulah
+ \value Ga
\value Gaelic
\value Galician
+ \value Ganda
+ \value Geez
\value Georgian
\value German
+ \value Gothic Since Qt 5.1
\value Greek
\value Greenlandic
\value Guarani
\value Gujarati
+ \value Gusii
\value Haitian
+ \value Hanunoo Since Qt 5.1
\value Hausa
+ \value Hawaiian
\value Hebrew
\value Herero
+ \value HieroglyphicLuwian Since Qt 5.7
\value Hindi
\value HiriMotu
+ \value HmongNjua Since Qt 5.5
+ \value Ho Since Qt 5.5
\value Hungarian
\value Icelandic
+ \value Ido Since Qt 5.12
+ \value Igbo
+ \value InariSami Since Qt 5.5
\value Indonesian
+ \value Ingush Since Qt 5.1
\value Interlingua
\value Interlingue
\value Inuktitut
@@ -183,306 +246,244 @@
\value Italian
\value Japanese
\value Javanese
+ \value Jju
+ \value JolaFonyi
+ \value Kabuverdianu
+ \value Kabyle
+ \value Kako
+ \value Kalenjin
+ \value Kamba
\value Kannada
\value Kanuri
\value Kashmiri
\value Kazakh
+ \value Kenyang Since Qt 5.5
+ \value Khmer
+ \value Kiche Since Qt 5.5
+ \value Kikuyu
\value Kinyarwanda
\value Kirghiz
\value Komi
\value Kongo
+ \value Konkani
\value Korean
+ \value Koro
+ \value KoyraboroSenni
+ \value KoyraChiini
+ \value Kpelle
\value Kurdish
- \value Rundi
\value Kurundi Obsolete, please use Rundi
\value Kwanyama
+ \value Kwasio
\value Lakota Since Qt 5.3
+ \value Langi
\value Lao
+ \value LargeFloweryMiao Since Qt 5.1
\value Latin
\value Latvian
+ \value Lepcha Since Qt 5.1
+ \value Lezghian Since Qt 5.5
\value Limburgish
+ \value Limbu Since Qt 5.1
+ \value LinearA Since Qt 5.5
\value Lingala
+ \value Lisu Since Qt 5.1
+ \value LiteraryChinese Since Qt 5.7
\value Lithuanian
+ \value Lojban Since Qt 5.12
+ \value LowerSorbian Since Qt 5.5
+ \value LowGerman
\value LubaKatanga
+ \value LuleSami Since Qt 5.5
+ \value Luo
+ \value Lu Since Qt 5.1
\value Luxembourgish
- \value Marshallese
+ \value Luyia
+ \value Lycian Since Qt 5.1
+ \value Lydian Since Qt 5.1
\value Macedonian
+ \value Machame
+ \value Maithili Since Qt 5.5
+ \value MakhuwaMeetto
+ \value Makonde
\value Malagasy
\value Malay
\value Malayalam
\value Maltese
+ \value Mandingo Since Qt 5.1
+ \value ManichaeanMiddlePersian Since Qt 5.5
+ \value Manipuri Since Qt 5.1
\value Manx
\value Maori
+ \value Mapuche Since Qt 5.5
\value Marathi
+ \value Marshallese
+ \value Masai
+ \value Mazanderani Since Qt 5.7
+ \value Mende Since Qt 5.5
+ \value Meroitic Since Qt 5.1
+ \value Meru
+ \value Meta
+ \value Mohawk Since Qt 5.5
\value Moldavian Obsolete, please use Romanian
\value Mongolian
+ \value Mono Since Qt 5.5
+ \value Morisyen
+ \value Mru Since Qt 5.7
+ \value Mundang
+ \value Nama
\value NauruLanguage
\value Navaho
\value Ndonga
\value Nepali
- \value Norwegian same as NorwegianBokmal
+ \value Newari Since Qt 5.7
+ \value Ngiemboon
+ \value Ngomba
+ \value Nko Since Qt 5.5
+ \value NorthernLuri Since Qt 5.7
+ \value NorthernSami
+ \value NorthernSotho
+ \value NorthernThai Since Qt 5.1
+ \value NorthNdebele
\value NorwegianBokmal same as Norwegian
\value NorwegianNynorsk
+ \value Norwegian same as NorwegianBokmal
+ \value Nuer
+ \value Nyanja
+ \value Nyankole
\value Occitan
\value Ojibwa
+ \value OldIrish Since Qt 5.1
+ \value OldNorse Since Qt 5.1
+ \value OldPersian Since Qt 5.1
+ \value OldTurkish Since Qt 5.1
\value Oriya
+ \value Oromo
+ \value Osage Since Qt 5.7
\value Ossetic
+ \value Pahlavi Since Qt 5.1
+ \value Palauan Since Qt 5.7
\value Pali
+ \value Papiamento Since Qt 5.7
+ \value Parthian Since Qt 5.1
\value Pashto
\value Persian
+ \value Phoenician Since Qt 5.1
\value Polish
\value Portuguese
+ \value PrakritLanguage Since Qt 5.1
+ \value Prussian Since Qt 5.5
\value Punjabi
\value Quechua
- \value Romansh
+ \value Rejang Since Qt 5.1
\value RhaetoRomance Obsolete, please use Romansh
\value Romanian
+ \value Romansh
+ \value Rombo
+ \value Rundi
\value Russian
+ \value Rwa
+ \value Sabaean Since Qt 5.1
+ \value Saho
+ \value Sakha
+ \value Samaritan Since Qt 5.1
+ \value Samburu
\value Samoan
\value Sango
+ \value Sangu
\value Sanskrit
+ \value Santali Since Qt 5.1
+ \value Saraiki Since Qt 5.7
\value Sardinian
+ \value Saurashtra Since Qt 5.1
+ \value Sena
\value Serbian
\value SerboCroatian Obsolete, please use Serbian
- \value SouthernSotho
- \value Tswana
+ \value Shambala
\value Shona
+ \value SichuanYi
+ \value Sicilian Since Qt 5.12
+ \value Sidamo
\value Sindhi
\value Sinhala
- \value Swati
+ \value SkoltSami Since Qt 5.5
\value Slovak
\value Slovenian
+ \value Soga
\value Somali
+ \value Sora Since Qt 5.1
+ \value SouthernKurdish Since Qt 5.12
+ \value SouthernSami Since Qt 5.5
+ \value SouthernSotho
+ \value SouthNdebele
\value Spanish
\value StandardMoroccanTamazight Since Qt 5.3
\value Sundanese
\value Swahili
+ \value Swati
\value Swedish
+ \value SwissGerman
+ \value Sylheti Since Qt 5.1
+ \value Syriac
+ \value Tachelhit
\value Tagalog Obsolete, please use Filipino
+ \value Tagbanwa Since Qt 5.1
\value Tahitian
+ \value TaiDam Since Qt 5.1
+ \value TaiNua Since Qt 5.1
+ \value Taita
\value Tajik
\value Tamil
+ \value Tangut Since Qt 5.7
+ \value Taroko
+ \value Tasawaq
\value Tatar
+ \value TedimChin Since Qt 5.5
\value Telugu
+ \value Teso
\value Thai
\value Tibetan
+ \value Tigre
\value Tigrinya
+ \value TokelauLanguage Since Qt 5.7
+ \value TokPisin Since Qt 5.7
\value Tongan
\value Tsonga
+ \value Tswana
\value Turkish
\value Turkmen
+ \value TuvaluLanguage Since Qt 5.7
\value Twi Obsolete, please use Akan
+ \value Tyap
+ \value Ugaritic Since Qt 5.1
\value Uighur
\value Uigur Obsolete, please use Uighur
\value Ukrainian
+ \value UncodedLanguages Since Qt 5.7
+ \value UpperSorbian Since Qt 5.5
\value Urdu
\value Uzbek
+ \value Vai
+ \value Venda
\value Vietnamese
\value Volapuk
+ \value Vunjo
+ \value Walamo
\value Walloon
+ \value Walser
+ \value Warlpiri Since Qt 5.5
\value Welsh
+ \value WesternBalochi Since Qt 5.12
+ \value WesternFrisian same as Frisian
\value Wolof
\value Xhosa
+ \value Yangben
\value Yiddish
\value Yoruba
+ \value Zarma
\value Zhuang
\value Zulu
- \value Bosnian
- \value Divehi
- \value Manx
- \value Cornish
- \value Akan
- \value Konkani
- \value Ga
- \value Igbo
- \value Kamba
- \value Syriac
- \value Blin
- \value Geez
- \value Koro
- \value Sidamo
- \value Atsam
- \value Tigre
- \value Jju
- \value Friulian
- \value Venda
- \value Ewe
- \value Walamo
- \value Hawaiian
- \value Tyap
- \value Nyanja
- \value Chewa Obsolete, please use Nyanja
- \value Filipino
- \value SwissGerman
- \value SichuanYi
- \value Kpelle
- \value LowGerman
- \value SouthNdebele
- \value NorthernSotho
- \value NorthernSami
- \value Taroko
- \value Gusii
- \value Taita
- \value Fulah
- \value Kikuyu
- \value Samburu
- \value Sena
- \value NorthNdebele
- \value Rombo
- \value Tachelhit
- \value Kabyle
- \value Nyankole
- \value Bena
- \value Vunjo
- \value Bambara
- \value Embu
- \value Cherokee
- \value Morisyen
- \value Makonde
- \value Langi
- \value Ganda
- \value Bemba
- \value Kabuverdianu
- \value Meru
- \value Kalenjin
- \value Nama
- \value Machame
- \value Colognian
- \value Masai
- \value Soga
- \value Luyia
- \value Asu
- \value Teso
- \value Saho
- \value KoyraChiini
- \value Rwa
- \value Luo
- \value Chiga
- \value CentralMoroccoTamazight
- \value KoyraboroSenni
- \value Shambala
- \value Aghem
- \value Basaa
- \value Zarma
- \value Duala
- \value JolaFonyi
- \value Ewondo
- \value Bafia
- \value MakhuwaMeetto
- \value Mundang
- \value Kwasio
- \value Nuer
- \value Sakha
- \value Sangu
- \value CongoSwahili
- \value Tasawaq
- \value Vai
- \value Walser
- \value Yangben
- \value Avestan
- \value Asturian
- \value Ngomba
- \value Kako
- \value Meta
- \value Ngiemboon
- \value Aragonese
- \value Akkadian
- \value AncientEgyptian
- \value AncientGreek
- \value Aramaic
- \value Balinese
- \value Bamun
- \value BatakToba
- \value Buginese
- \value Buhid
- \value Carian
- \value Chakma
- \value ClassicalMandaic
- \value Coptic
- \value Dogri
- \value EasternCham
- \value EasternKayah
- \value Etruscan
- \value Gothic
- \value Hanunoo
- \value Ingush
- \value LargeFloweryMiao
- \value Lepcha
- \value Limbu
- \value Lisu
- \value Lu
- \value Lycian
- \value Lydian
- \value Mandingo
- \value Manipuri
- \value Meroitic
- \value NorthernThai
- \value OldIrish
- \value OldNorse
- \value OldPersian
- \value OldTurkish
- \value Pahlavi
- \value Parthian
- \value Phoenician
- \value PrakritLanguage
- \value Rejang
- \value Sabaean
- \value Samaritan
- \value Santali
- \value Saurashtra
- \value Sora
- \value Sylheti
- \value Tagbanwa
- \value TaiDam
- \value TaiNua
- \value Ugaritic
- \value Mapuche Since Qt 5.5
- \value CentralKurdish Since Qt 5.5
- \value LowerSorbian Since Qt 5.5
- \value UpperSorbian Since Qt 5.5
- \value Kenyang Since Qt 5.5
- \value Mohawk Since Qt 5.5
- \value Nko Since Qt 5.5
- \value Prussian Since Qt 5.5
- \value Kiche Since Qt 5.5
- \value SouthernSami Since Qt 5.5
- \value LuleSami Since Qt 5.5
- \value InariSami Since Qt 5.5
- \value SkoltSami Since Qt 5.5
- \value Warlpiri Since Qt 5.5
- \value ManichaeanMiddlePersian Since Qt 5.5
- \value Mende Since Qt 5.5
- \value AncientNorthArabian Since Qt 5.5
- \value LinearA Since Qt 5.5
- \value HmongNjua Since Qt 5.5
- \value Ho Since Qt 5.5
- \value Lezghian Since Qt 5.5
- \value Bassa Since Qt 5.5
- \value Mono Since Qt 5.5
- \value TedimChin Since Qt 5.5
- \value Maithili Since Qt 5.5
- \value LowerSorbian Since Qt 5.5
- \value UpperSorbian Since Qt 5.5
- \value Ahom Since Qt 5.7
- \value AmericanSignLanguage Since Qt 5.7
- \value ArdhamagadhiPrakrit Since Qt 5.7
- \value Bhojpuri Since Qt 5.7
- \value Cantonese Since Qt 5.7
- \value HieroglyphicLuwian Since Qt 5.7
- \value LiteraryChinese Since Qt 5.7
- \value Mazanderani Since Qt 5.7
- \value Mru Since Qt 5.7
- \value Newari Since Qt 5.7
- \value NorthernLuri Since Qt 5.7
- \value Osage Since Qt 5.7
- \value Palauan Since Qt 5.7
- \value Papiamento Since Qt 5.7
- \value Saraiki Since Qt 5.7
- \value Tangut Since Qt 5.7
- \value TokelauLanguage Since Qt 5.7
- \value TokPisin Since Qt 5.7
- \value TuvaluLanguage Since Qt 5.7
- \value UncodedLanguages Since Qt 5.7
+
\omitvalue LastLanguage
\sa language(), languageToString()
@@ -494,7 +495,9 @@
This enumerated type is used to specify a country.
\value AnyCountry
+
\value Afghanistan
+ \value AlandIslands
\value Albania
\value Algeria
\value AmericanSamoa
@@ -506,6 +509,7 @@
\value Argentina
\value Armenia
\value Aruba
+ \value AscensionIsland
\value Australia
\value Austria
\value Azerbaijan
@@ -520,11 +524,13 @@
\value Bermuda
\value Bhutan
\value Bolivia
+ \value Bonaire
\value BosniaAndHerzegowina
\value Botswana
\value BouvetIsland
\value Brazil
\value BritishIndianOceanTerritory
+ \value BritishVirginIslands
\value Brunei
\value Bulgaria
\value BurkinaFaso
@@ -536,6 +542,7 @@
\value CapeVerde
\value CaymanIslands
\value CentralAfricanRepublic
+ \value CeutaAndMelilla
\value Chad
\value Chile
\value China
@@ -544,18 +551,19 @@
\value CocosIslands
\value Colombia
\value Comoros
- \value CongoKinshasa
\value CongoBrazzaville
- \value DemocraticRepublicOfCongo Obsolete, please use CongoKinshasa
- \value PeoplesRepublicOfCongo Obsolete, please use CongoBrazzaville
+ \value CongoKinshasa
\value CookIslands
\value CostaRica
- \value IvoryCoast
\value Croatia
\value Cuba
+ \value CuraSao
\value Cyprus
\value CzechRepublic
+ \value DemocraticRepublicOfCongo Obsolete, please use CongoKinshasa
+ \value DemocraticRepublicOfKorea Obsolete, please use NorthKorea
\value Denmark
+ \value DiegoGarcia
\value Djibouti
\value Dominica
\value DominicanRepublic
@@ -604,19 +612,18 @@
\value Iran
\value Iraq
\value Ireland
+ \value IsleOfMan
\value Israel
\value Italy
+ \value IvoryCoast
\value Jamaica
\value Japan
+ \value Jersey
\value Jordan
\value Kazakhstan
\value Kenya
\value Kiribati
- \value NorthKorea
- \value SouthKorea
- \value DemocraticRepublicOfKorea Obsolete, please use NorthKorea
- \value RepublicOfKorea Obsolete, please use SouthKorea
- \value Kosovo
+ \value Kosovo Since Qt 5.2
\value Kuwait
\value Kyrgyzstan
\value Laos
@@ -648,6 +655,7 @@
\value Moldova
\value Monaco
\value Mongolia
+ \value Montenegro
\value Montserrat
\value Morocco
\value Mozambique
@@ -664,6 +672,7 @@
\value Niue
\value NorfolkIsland
\value NorthernMarianaIslands
+ \value NorthKorea
\value Norway
\value Oman
\value OutlyingOceania Since Qt 5.7
@@ -673,6 +682,7 @@
\value Panama
\value PapuaNewGuinea
\value Paraguay
+ \value PeoplesRepublicOfCongo Obsolete, please use CongoBrazzaville
\value Peru
\value Philippines
\value Pitcairn
@@ -680,32 +690,39 @@
\value Portugal
\value PuertoRico
\value Qatar
+ \value RepublicOfKorea Obsolete, please use SouthKorea
\value Reunion
\value Romania
- \value Russia same as RussianFederation
\value RussianFederation same as Russia
+ \value Russia same as RussianFederation
\value Rwanda
+ \value SaintBarthelemy
+ \value SaintHelena
\value SaintKittsAndNevis
\value SaintLucia
+ \value SaintMartin
+ \value SaintPierreAndMiquelon
\value SaintVincentAndTheGrenadines
\value Samoa
\value SanMarino
\value SaoTomeAndPrincipe
\value SaudiArabia
\value Senegal
+ \value Serbia
\value Seychelles
\value SierraLeone
\value Singapore
+ \value SintMaarten
\value Slovakia
\value Slovenia
\value SolomonIslands
\value Somalia
\value SouthAfrica
\value SouthGeorgiaAndTheSouthSandwichIslands
+ \value SouthKorea
+ \value SouthSudan
\value Spain
\value SriLanka
- \value SaintHelena
- \value SaintPierreAndMiquelon
\value Sudan
\value Suriname
\value SvalbardAndJanMayenIslands
@@ -723,6 +740,7 @@
\value Tokelau Obsolete, please use TokelauCountry
\value Tonga
\value TrinidadAndTobago
+ \value TristanDaCunha
\value Tunisia
\value Turkey
\value Turkmenistan
@@ -735,35 +753,20 @@
\value UnitedKingdom
\value UnitedStates
\value UnitedStatesMinorOutlyingIslands
+ \value UnitedStatesVirginIslands
\value Uruguay
\value Uzbekistan
\value Vanuatu
\value VaticanCityState
\value Venezuela
\value Vietnam
- \value BritishVirginIslands
- \value UnitedStatesVirginIslands
\value WallisAndFutunaIslands
\value WesternSahara
\value World Since Qt 5.12
\value Yemen
\value Zambia
\value Zimbabwe
- \value Montenegro
- \value Serbia
- \value SaintBarthelemy
- \value SaintMartin
- \value AscensionIsland
- \value AlandIslands
- \value DiegoGarcia
- \value CeutaAndMelilla
- \value IsleOfMan
- \value Jersey
- \value TristanDaCunha
- \value SouthSudan
- \value CuraSao
- \value Bonaire
- \value SintMaarten
+
\omitvalue LastCountry
\sa country(), countryToString()
@@ -775,135 +778,136 @@
This enumerated type is used to specify a script.
\value AnyScript
+
\value AdlamScript Since Qt 5.7
\value AhomScript Since Qt 5.7
\value AnatolianHieroglyphsScript Since Qt 5.7
\value ArabicScript
\value ArmenianScript
- \value AvestanScript
- \value BalineseScript
- \value BamumScript
+ \value AvestanScript Since Qt 5.1
+ \value BalineseScript Since Qt 5.1
+ \value BamumScript Since Qt 5.1
\value BassaVahScript Since Qt 5.5
- \value BatakScript
+ \value BatakScript Since Qt 5.1
\value BengaliScript
\value BhaiksukiScript Since Qt 5.7
- \value BopomofoScript
- \value BrahmiScript
- \value BrailleScript
- \value BugineseScript
- \value BuhidScript
- \value CanadianAboriginalScript
- \value CarianScript
+ \value BopomofoScript Since Qt 5.1
+ \value BrahmiScript Since Qt 5.1
+ \value BrailleScript Since Qt 5.1
+ \value BugineseScript Since Qt 5.1
+ \value BuhidScript Since Qt 5.1
+ \value CanadianAboriginalScript Since Qt 5.1
+ \value CarianScript Since Qt 5.1
\value CaucasianAlbanianScript Since Qt 5.5
- \value ChakmaScript
- \value ChamScript
+ \value ChakmaScript Since Qt 5.1
+ \value ChamScript Since Qt 5.1
\value CherokeeScript
- \value CopticScript
- \value CypriotScript
+ \value CopticScript Since Qt 5.1
+ \value CuneiformScript Since Qt 5.1
+ \value CypriotScript Since Qt 5.1
\value CyrillicScript
- \value DeseretScript
+ \value DeseretScript Since Qt 5.1
\value DevanagariScript
\value DuployanScript Since Qt 5.5
- \value EgyptianHieroglyphsScript
+ \value EgyptianHieroglyphsScript Since Qt 5.1
\value ElbasanScript Since Qt 5.5
\value EthiopicScript
- \value FraserScript
+ \value FraserScript Since Qt 5.1
\value GeorgianScript
- \value GlagoliticScript
- \value GothicScript
+ \value GlagoliticScript Since Qt 5.1
+ \value GothicScript Since Qt 5.1
\value GranthaScript Since Qt 5.5
\value GreekScript
\value GujaratiScript
\value GurmukhiScript
- \value HanScript
- \value HangulScript
- \value HanunooScript
+ \value HangulScript Since Qt 5.1
+ \value HanScript Since Qt 5.1
+ \value HanunooScript Since Qt 5.1
\value HanWithBopomofoScript Since Qt 5.7
\value HatranScript Since Qt 5.7
\value HebrewScript
- \value HiraganaScript
- \value ImperialAramaicScript
- \value InscriptionalPahlaviScript
- \value InscriptionalParthianScript
+ \value HiraganaScript Since Qt 5.1
+ \value ImperialAramaicScript Since Qt 5.1
+ \value InscriptionalPahlaviScript Since Qt 5.1
+ \value InscriptionalParthianScript Since Qt 5.1
\value JamoScript Since Qt 5.7
\value JapaneseScript
- \value JavaneseScript
- \value KaithiScript
+ \value JavaneseScript Since Qt 5.1
+ \value KaithiScript Since Qt 5.1
\value KannadaScript
- \value KatakanaScript
- \value KayahLiScript
- \value KharoshthiScript
- \value KhmerScript
+ \value KatakanaScript Since Qt 5.1
+ \value KayahLiScript Since Qt 5.1
+ \value KharoshthiScript Since Qt 5.1
+ \value KhmerScript Since Qt 5.1
\value KhojkiScript Since Qt 5.5
\value KhudawadiScript Since Qt 5.5
\value KoreanScript
- \value LannaScript
+ \value LannaScript Since Qt 5.1
\value LaoScript
\value LatinScript
- \value LepchaScript
- \value LimbuScript
+ \value LepchaScript Since Qt 5.1
+ \value LimbuScript Since Qt 5.1
\value LinearAScript Since Qt 5.5
- \value LinearBScript
- \value LycianScript
- \value LydianScript
+ \value LinearBScript Since Qt 5.1
+ \value LycianScript Since Qt 5.1
+ \value LydianScript Since Qt 5.1
\value MahajaniScript Since Qt 5.5
\value MalayalamScript
- \value MandaeanScript
+ \value MandaeanScript Since Qt 5.1
\value ManichaeanScript Since Qt 5.5
\value MarchenScript Since Qt 5.7
- \value MeiteiMayekScript
+ \value MeiteiMayekScript Since Qt 5.1
\value MendeKikakuiScript Since Qt 5.5
- \value MeroiticScript
- \value MeroiticCursiveScript
+ \value MeroiticCursiveScript Since Qt 5.1
+ \value MeroiticScript Since Qt 5.1
\value ModiScript Since Qt 5.5
\value MongolianScript
\value MroScript Since Qt 5.5
\value MultaniScript Since Qt 5.7
\value MyanmarScript
\value NabataeanScript Since Qt 5.5
- \value NkoScript
\value NewaScript Since Qt 5.7
- \value NewTaiLueScript
- \value OghamScript
- \value OlChikiScript
- \value OldItalicScript
+ \value NewTaiLueScript Since Qt 5.1
+ \value NkoScript Since Qt 5.1
+ \value OghamScript Since Qt 5.1
+ \value OlChikiScript Since Qt 5.1
\value OldHungarianScript Since Qt 5.7
+ \value OldItalicScript Since Qt 5.1
\value OldNorthArabianScript Since Qt 5.5
\value OldPermicScript Since Qt 5.5
- \value OldPersianScript
- \value OldSouthArabianScript
+ \value OldPersianScript Since Qt 5.1
+ \value OldSouthArabianScript Since Qt 5.1
\value OriyaScript
- \value OrkhonScript
+ \value OrkhonScript Since Qt 5.1
\value OsageScript Since Qt 5.7
- \value OsmanyaScript
+ \value OsmanyaScript Since Qt 5.1
\value PahawhHmongScript Since Qt 5.5
\value PalmyreneScript Since Qt 5.5
\value PauCinHauScript Since Qt 5.5
- \value PhagsPaScript
- \value PhoenicianScript
- \value PollardPhoneticScript
+ \value PhagsPaScript Since Qt 5.1
+ \value PhoenicianScript Since Qt 5.1
+ \value PollardPhoneticScript Since Qt 5.1
\value PsalterPahlaviScript Since Qt 5.5
- \value RejangScript
- \value RunicScript
- \value SamaritanScript
- \value SaurashtraScript
- \value SharadaScript
- \value ShavianScript
+ \value RejangScript Since Qt 5.1
+ \value RunicScript Since Qt 5.1
+ \value SamaritanScript Since Qt 5.1
+ \value SaurashtraScript Since Qt 5.1
+ \value SharadaScript Since Qt 5.1
+ \value ShavianScript Since Qt 5.1
\value SiddhamScript Since Qt 5.5
\value SignWritingScript Since Qt 5.7
- \value SimplifiedHanScript same as SimplifiedChineseScript
\value SimplifiedChineseScript same as SimplifiedHanScript
+ \value SimplifiedHanScript same as SimplifiedChineseScript
\value SinhalaScript
- \value SoraSompengScript
- \value CuneiformScript
- \value SundaneseScript
- \value SylotiNagriScript
+ \value SoraSompengScript Since Qt 5.1
+ \value SundaneseScript Since Qt 5.1
+ \value SylotiNagriScript Since Qt 5.1
\value SyriacScript
- \value TagalogScript
- \value TagbanwaScript
- \value TaiLeScript
- \value TaiVietScript
- \value TakriScript
+ \value TagalogScript Since Qt 5.1
+ \value TagbanwaScript Since Qt 5.1
+ \value TaiLeScript Since Qt 5.1
+ \value TaiVietScript Since Qt 5.1
+ \value TakriScript Since Qt 5.1
\value TamilScript
\value TangutScript Since Qt 5.7
\value TeluguScript
@@ -912,12 +916,13 @@
\value TibetanScript
\value TifinaghScript
\value TirhutaScript Since Qt 5.5
- \value TraditionalHanScript same as TraditionalChineseScript
\value TraditionalChineseScript same as TraditionalHanScript
- \value UgariticScript
+ \value TraditionalHanScript same as TraditionalChineseScript
+ \value UgariticScript Since Qt 5.1
\value VaiScript
\value VarangKshitiScript Since Qt 5.5
\value YiScript
+
\omitvalue LastScript
\sa script(), scriptToString(), languageToString()
diff --git a/src/corelib/tools/qlocale_data_p.h b/src/corelib/tools/qlocale_data_p.h
index 507afdcecd..58e71e1dcc 100644
--- a/src/corelib/tools/qlocale_data_p.h
+++ b/src/corelib/tools/qlocale_data_p.h
@@ -77,7 +77,7 @@ static const int ImperialMeasurementSystemsCount =
// GENERATED PART STARTS HERE
/*
- This part of the file was generated on 2018-10-19 from the
+ This part of the file was generated on 2018-11-08 from the
Common Locale Data Repository v34
http://www.unicode.org/cldr/
@@ -122,6 +122,7 @@ static const QLocaleId likely_subtags[] = {
{ 195, 0, 0 }, { 195, 7, 239 }, // bem -> bem_Latn_ZM
{ 186, 0, 0 }, { 186, 7, 210 }, // bez -> bez_Latn_TZ
{ 20, 0, 0 }, { 20, 2, 33 }, // bg -> bg_Cyrl_BG
+ { 364, 0, 0 }, { 364, 1, 163 }, // bgn -> bgn_Arab_PK
{ 343, 0, 0 }, { 343, 13, 100 }, // bho -> bho_Deva_IN
{ 18, 0, 0 }, { 18, 7, 229 }, // bi -> bi_Latn_VU
{ 270, 0, 0 }, { 270, 7, 170 }, // bku -> bku_Latn_PH
@@ -224,10 +225,12 @@ static const QLocaleId likely_subtags[] = {
{ 168, 0, 0 }, { 168, 34, 44 }, // ii -> ii_Yiii_CN
{ 56, 0, 0 }, { 56, 7, 225 }, // ik -> ik_Latn_US
{ 281, 0, 0 }, { 281, 2, 178 }, // inh -> inh_Cyrl_RU
+ { 360, 0, 0 }, { 360, 7, 260 }, // io -> io_Latn_001
{ 51, 0, 0 }, { 51, 7, 99 }, // is -> is_Latn_IS
{ 58, 0, 0 }, { 58, 7, 106 }, // it -> it_Latn_IT
{ 55, 0, 0 }, { 55, 44, 38 }, // iu -> iu_Cans_CA
{ 59, 0, 0 }, { 59, 19, 108 }, // ja -> ja_Jpan_JP
+ { 361, 0, 0 }, { 361, 7, 260 }, // jbo -> jbo_Latn_001
{ 257, 0, 0 }, { 257, 7, 37 }, // jgo -> jgo_Latn_CM
{ 200, 0, 0 }, { 200, 7, 210 }, // jmc -> jmc_Latn_TZ
{ 60, 0, 0 }, { 60, 7, 101 }, // jv -> jv_Latn_ID
@@ -385,10 +388,12 @@ static const QLocaleId likely_subtags[] = {
{ 305, 0, 0 }, { 305, 90, 100 }, // saz -> saz_Saur_IN
{ 249, 0, 0 }, { 249, 7, 210 }, // sbp -> sbp_Latn_TZ
{ 115, 0, 0 }, { 115, 7, 106 }, // sc -> sc_Latn_IT
+ { 362, 0, 0 }, { 362, 7, 106 }, // scn -> scn_Latn_IT
{ 105, 0, 0 }, { 105, 1, 163 }, // sd -> sd_Arab_PK
{ 105, 13, 0 }, { 105, 13, 100 }, // sd_Deva -> sd_Deva_IN
{ 105, 111, 0 }, { 105, 111, 100 }, // sd_Khoj -> sd_Khoj_IN
{ 105, 125, 0 }, { 105, 125, 100 }, // sd_Sind -> sd_Sind_IN
+ { 363, 0, 0 }, { 363, 1, 102 }, // sdh -> sdh_Arab_IR
{ 173, 0, 0 }, { 173, 7, 161 }, // se -> se_Latn_NO
{ 180, 0, 0 }, { 180, 7, 146 }, // seh -> seh_Latn_MZ
{ 213, 0, 0 }, { 213, 7, 132 }, // ses -> ses_Latn_ML
@@ -1252,6 +1257,11 @@ static const quint16 locale_index[] = {
574, // Cantonese
0, // Osage
0, // Tangut
+ 576, // Ido
+ 577, // Lojban
+ 578, // Sicilian
+ 579, // Southern Kurdish
+ 580, // Western Balochi
0 // trailing 0
};
@@ -1592,13 +1602,13 @@ static const QLocaleData locale_data[] = {
{ 98, 7, 41, 44, 46, 59, 37, 48, 45, 43, 101, 171, 187, 8220, 8221, 0,6 , 0,6 , 0,6 , 0,6 , 415,8 , 97,16 , 37,5 , 8,10 , 16581,48 , 16629,91 , 16720,24 , 16581,48 , 16629,91 , 16720,24 , 8692,28 , 8720,66 , 8786,14 , 8692,28 , 8720,66 , 8786,14 , 226,2 , 216,2 , 45,4 , 5,17 , 22,23 , {88,65,70}, 32,4 , 11499,25 , 4,4 , 36,5 , 3506,5 , 3511,22 , 0, 0, 1, 6, 7 }, // Sango/Latin/Central African Republic
{ 99, 13, 100, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,78,82}, 121,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 7, 7 }, // Sanskrit/Devanagari/India
{ 100, 2, 243, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 16744,48 , 16792,81 , 12698,24 , 16744,48 , 16792,81 , 12698,24 , 8800,28 , 8828,52 , 8880,14 , 8800,28 , 8828,52 , 8880,14 , 228,9 , 218,8 , 803,7 , 5,17 , 22,23 , {82,83,68}, 288,3 , 11524,58 , 13,5 , 4,0 , 3533,6 , 3539,6 , 0, 0, 1, 6, 7 }, // Serbian/Cyrillic/Serbia
- { 100, 2, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 16873,50 , 16792,81 , 12698,24 , 16744,48 , 16792,81 , 12698,24 , 8894,26 , 8920,55 , 8880,14 , 8894,26 , 8920,55 , 8880,14 , 237,11 , 218,8 , 803,7 , 5,17 , 22,23 , {66,65,77}, 291,2 , 11582,174 , 13,5 , 4,0 , 3533,6 , 3545,19 , 2, 1, 1, 6, 7 }, // Serbian/Cyrillic/Bosnia And Herzegowina
- { 100, 2, 242, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 16923,58 , 16792,81 , 12698,24 , 16923,58 , 16792,81 , 12698,24 , 8975,33 , 8920,55 , 8880,14 , 8975,33 , 8920,55 , 8880,14 , 237,11 , 218,8 , 803,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11756,23 , 13,5 , 4,0 , 3533,6 , 3564,9 , 2, 1, 1, 6, 7 }, // Serbian/Cyrillic/Montenegro
- { 100, 2, 257, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 16923,58 , 16792,81 , 12698,24 , 16923,58 , 16792,81 , 12698,24 , 8975,33 , 8828,52 , 8880,14 , 8975,33 , 8828,52 , 8880,14 , 228,9 , 218,8 , 803,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11756,23 , 13,5 , 4,0 , 3533,6 , 3573,6 , 2, 1, 1, 6, 7 }, // Serbian/Cyrillic/Kosovo
- { 100, 7, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 16981,50 , 17031,81 , 9742,24 , 17112,48 , 17031,81 , 9742,24 , 9008,26 , 9034,57 , 2102,14 , 9008,26 , 9034,57 , 2102,14 , 248,11 , 226,8 , 296,7 , 5,17 , 22,23 , {66,65,77}, 144,2 , 11779,174 , 13,5 , 4,0 , 3579,6 , 620,19 , 2, 1, 1, 6, 7 }, // Serbian/Latin/Bosnia And Herzegowina
- { 100, 7, 242, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 17160,58 , 17031,81 , 9742,24 , 17160,58 , 17031,81 , 9742,24 , 9091,33 , 9034,57 , 2102,14 , 9091,33 , 9034,57 , 2102,14 , 248,11 , 226,8 , 296,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11953,23 , 13,5 , 4,0 , 3579,6 , 3585,9 , 2, 1, 1, 6, 7 }, // Serbian/Latin/Montenegro
- { 100, 7, 243, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 17112,48 , 17031,81 , 9742,24 , 17112,48 , 17031,81 , 9742,24 , 9124,28 , 9152,54 , 2102,14 , 9124,28 , 9152,54 , 2102,14 , 259,9 , 226,8 , 296,7 , 5,17 , 22,23 , {82,83,68}, 288,3 , 11976,58 , 13,5 , 4,0 , 3579,6 , 3594,6 , 0, 0, 1, 6, 7 }, // Serbian/Latin/Serbia
- { 100, 7, 257, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 17160,58 , 17031,81 , 9742,24 , 17160,58 , 17031,81 , 9742,24 , 9091,33 , 9152,54 , 2102,14 , 9091,33 , 9152,54 , 2102,14 , 259,9 , 226,8 , 296,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11953,23 , 13,5 , 4,0 , 3579,6 , 3600,6 , 2, 1, 1, 6, 7 }, // Serbian/Latin/Kosovo
+ { 100, 7, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 16873,50 , 16923,81 , 9742,24 , 17004,48 , 16923,81 , 9742,24 , 8894,26 , 8920,57 , 2102,14 , 8894,26 , 8920,57 , 2102,14 , 237,11 , 226,8 , 296,7 , 5,17 , 22,23 , {66,65,77}, 144,2 , 11582,174 , 13,5 , 4,0 , 3545,6 , 620,19 , 2, 1, 1, 6, 7 }, // Serbian/Latin/Bosnia And Herzegowina
+ { 100, 7, 242, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 17052,58 , 16923,81 , 9742,24 , 17052,58 , 16923,81 , 9742,24 , 8977,33 , 8920,57 , 2102,14 , 8977,33 , 8920,57 , 2102,14 , 237,11 , 226,8 , 296,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11756,23 , 13,5 , 4,0 , 3545,6 , 3551,9 , 2, 1, 1, 6, 7 }, // Serbian/Latin/Montenegro
+ { 100, 7, 243, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 17004,48 , 16923,81 , 9742,24 , 17004,48 , 16923,81 , 9742,24 , 9010,28 , 9038,54 , 2102,14 , 9010,28 , 9038,54 , 2102,14 , 248,9 , 226,8 , 296,7 , 5,17 , 22,23 , {82,83,68}, 288,3 , 11779,58 , 13,5 , 4,0 , 3545,6 , 3560,6 , 0, 0, 1, 6, 7 }, // Serbian/Latin/Serbia
+ { 100, 2, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 17110,50 , 16792,81 , 12698,24 , 16744,48 , 16792,81 , 12698,24 , 9092,26 , 9118,55 , 8880,14 , 9092,26 , 9118,55 , 8880,14 , 257,11 , 218,8 , 803,7 , 5,17 , 22,23 , {66,65,77}, 291,2 , 11837,174 , 13,5 , 4,0 , 3533,6 , 3566,19 , 2, 1, 1, 6, 7 }, // Serbian/Cyrillic/Bosnia And Herzegowina
+ { 100, 2, 242, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 17160,58 , 16792,81 , 12698,24 , 17160,58 , 16792,81 , 12698,24 , 9173,33 , 9118,55 , 8880,14 , 9173,33 , 9118,55 , 8880,14 , 257,11 , 218,8 , 803,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 12011,23 , 13,5 , 4,0 , 3533,6 , 3585,9 , 2, 1, 1, 6, 7 }, // Serbian/Cyrillic/Montenegro
+ { 100, 2, 257, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 17160,58 , 16792,81 , 12698,24 , 17160,58 , 16792,81 , 12698,24 , 9173,33 , 8828,52 , 8880,14 , 9173,33 , 8828,52 , 8880,14 , 228,9 , 218,8 , 803,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 12011,23 , 13,5 , 4,0 , 3533,6 , 3594,6 , 2, 1, 1, 6, 7 }, // Serbian/Cyrillic/Kosovo
+ { 100, 7, 257, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8216, 8216, 0,6 , 0,6 , 163,7 , 163,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 17052,58 , 16923,81 , 9742,24 , 17052,58 , 16923,81 , 9742,24 , 8977,33 , 9038,54 , 2102,14 , 8977,33 , 9038,54 , 2102,14 , 248,9 , 226,8 , 296,7 , 5,17 , 22,23 , {69,85,82}, 14,1 , 11756,23 , 13,5 , 4,0 , 3545,6 , 3600,6 , 2, 1, 1, 6, 7 }, // Serbian/Latin/Kosovo
{ 101, 2, 81, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 610,9 , 610,9 , 156,8 , 1094,23 , 37,5 , 8,10 , 17218,63 , 17281,82 , 11058,24 , 17363,60 , 17423,86 , 11058,24 , 9206,28 , 9234,61 , 9295,14 , 9309,28 , 9337,61 , 9295,14 , 268,15 , 234,15 , 45,4 , 5,17 , 22,23 , {71,69,76}, 228,1 , 12034,17 , 8,5 , 4,0 , 3606,4 , 3610,11 , 2, 1, 1, 6, 7 }, // Ossetic/Cyrillic/Georgia
{ 101, 2, 178, 44, 160, 59, 37, 48, 45, 43, 101, 171, 187, 8222, 8220, 0,6 , 0,6 , 610,9 , 610,9 , 156,8 , 1094,23 , 37,5 , 8,10 , 17218,63 , 17281,82 , 11058,24 , 17363,60 , 17423,86 , 11058,24 , 9206,28 , 9234,61 , 9295,14 , 9309,28 , 9337,61 , 9295,14 , 268,15 , 234,15 , 45,4 , 5,17 , 22,23 , {82,85,66}, 123,1 , 12051,17 , 8,5 , 4,0 , 3606,4 , 3621,6 , 2, 1, 1, 6, 7 }, // Ossetic/Cyrillic/Russia
{ 102, 7, 195, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {90,65,82}, 5,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 7, 6, 7 }, // Southern Sotho/Latin/South Africa
@@ -1684,7 +1694,7 @@ static const QLocaleData locale_data[] = {
{ 140, 7, 195, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 842,9 , 851,8 , 547,6 , 35,18 , 37,5 , 8,10 , 23839,48 , 23887,91 , 134,24 , 23839,48 , 23887,91 , 23978,24 , 12558,28 , 12586,74 , 12660,14 , 12558,28 , 12586,74 , 12660,14 , 0,2 , 0,2 , 0,5 , 5,17 , 22,23 , {90,65,82}, 5,1 , 14929,67 , 4,4 , 4,0 , 4446,7 , 4453,17 , 2, 1, 7, 6, 7 }, // Zulu/Latin/South Africa
{ 141, 7, 161, 44, 160, 59, 37, 48, 8722, 43, 101, 171, 187, 8216, 8217, 0,6 , 0,6 , 192,8 , 192,8 , 495,10 , 478,17 , 37,5 , 441,16 , 5656,48 , 14503,83 , 134,24 , 24002,59 , 14503,83 , 134,24 , 12674,28 , 12702,51 , 2293,14 , 12753,28 , 12702,51 , 2293,14 , 414,9 , 380,11 , 45,4 , 5,17 , 22,23 , {78,79,75}, 190,2 , 9840,44 , 13,5 , 4,0 , 4470,7 , 4477,5 , 2, 0, 1, 6, 7 }, // Norwegian Nynorsk/Latin/Norway
{ 142, 7, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8221, 8216, 8217, 0,6 , 0,6 , 163,7 , 163,7 , 1507,11 , 450,19 , 37,5 , 8,10 , 8336,48 , 24061,83 , 9742,24 , 8336,48 , 24061,83 , 9742,24 , 2016,28 , 2044,58 , 2102,14 , 2016,28 , 2044,58 , 2116,14 , 423,10 , 391,7 , 296,7 , 5,17 , 22,23 , {66,65,77}, 144,2 , 14996,170 , 13,5 , 4,0 , 4482,8 , 620,19 , 2, 1, 1, 6, 7 }, // Bosnian/Latin/Bosnia And Herzegowina
- { 142, 2, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 24144,48 , 24192,83 , 12698,24 , 24144,48 , 24192,83 , 12698,24 , 12781,28 , 12809,56 , 8880,14 , 12781,28 , 12809,56 , 8880,14 , 228,9 , 398,7 , 45,4 , 5,17 , 22,23 , {66,65,77}, 291,2 , 15166,151 , 13,5 , 4,0 , 4490,8 , 3545,19 , 2, 1, 1, 6, 7 }, // Bosnian/Cyrillic/Bosnia And Herzegowina
+ { 142, 2, 27, 44, 46, 59, 37, 48, 45, 43, 101, 8222, 8220, 8218, 8216, 0,6 , 0,6 , 116,7 , 116,7 , 1067,7 , 1074,20 , 37,5 , 8,10 , 24144,48 , 24192,83 , 12698,24 , 24144,48 , 24192,83 , 12698,24 , 12781,28 , 12809,56 , 8880,14 , 12781,28 , 12809,56 , 8880,14 , 228,9 , 398,7 , 45,4 , 5,17 , 22,23 , {66,65,77}, 291,2 , 15166,151 , 13,5 , 4,0 , 4490,8 , 3566,19 , 2, 1, 1, 6, 7 }, // Bosnian/Cyrillic/Bosnia And Herzegowina
{ 143, 29, 131, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {77,86,82}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 5, 6, 7 }, // Divehi/Thaana/Maldives
{ 144, 7, 251, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 27,8 , 80,17 , 37,5 , 8,10 , 24275,102 , 24377,140 , 158,27 , 24275,102 , 24377,140 , 158,27 , 12865,30 , 12895,57 , 85,14 , 12865,30 , 12895,57 , 85,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {71,66,80}, 119,1 , 0,7 , 4,4 , 4,0 , 4498,5 , 4503,12 , 2, 1, 1, 6, 7 }, // Manx/Latin/Isle Of Man
{ 145, 7, 224, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 119,10 , 97,16 , 37,5 , 8,10 , 24517,46 , 24563,130 , 158,27 , 24517,46 , 24563,130 , 158,27 , 12952,28 , 12980,61 , 85,14 , 12952,28 , 12980,61 , 85,14 , 64,4 , 61,4 , 45,4 , 5,17 , 22,23 , {71,66,80}, 119,1 , 0,7 , 4,4 , 4,0 , 4515,8 , 4523,14 , 2, 1, 1, 6, 7 }, // Cornish/Latin/United Kingdom
@@ -1833,6 +1843,11 @@ static const QLocaleData locale_data[] = {
{ 349, 1, 103, 1643, 1644, 1563, 1642, 1776, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 18,7 , 25,12 , 39219,77 , 39219,77 , 158,27 , 39219,77 , 39219,77 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,81,68}, 44,5 , 0,7 , 8,5 , 4,0 , 5865,11 , 0,0 , 0, 0, 6, 5, 6 }, // Northern Luri/Arabic/Iraq
{ 357, 6, 97, 46, 44, 59, 37, 48, 45, 43, 101, 12300, 12301, 12302, 12303, 170,5 , 170,5 , 1010,5 , 1010,5 , 394,8 , 423,14 , 198,6 , 215,13 , 4423,39 , 4423,39 , 158,27 , 4423,39 , 4423,39 , 158,27 , 1953,28 , 1953,28 , 1981,14 , 1953,28 , 1953,28 , 1981,14 , 58,2 , 55,2 , 45,4 , 5,17 , 22,23 , {72,75,68}, 134,3 , 17327,11 , 4,4 , 4,0 , 5876,2 , 5878,14 , 2, 1, 7, 6, 7 }, // Cantonese/Traditional Han/Hong Kong
{ 357, 5, 44, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 170,5 , 170,5 , 1010,5 , 1010,5 , 394,8 , 402,13 , 198,6 , 204,11 , 4423,39 , 4462,38 , 158,27 , 4423,39 , 4462,38 , 158,27 , 1932,21 , 1953,28 , 1981,14 , 1932,21 , 1953,28 , 1981,14 , 58,2 , 55,2 , 45,4 , 5,17 , 22,23 , {67,78,89}, 133,1 , 3122,13 , 4,4 , 4,0 , 5892,2 , 5894,7 , 2, 1, 7, 6, 7 }, // Cantonese/Simplified Han/China
+ { 360, 7, 260, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {0,0,0}, 0,0 , 2586,0 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Ido/Latin/World
+ { 361, 7, 260, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {0,0,0}, 0,0 , 2586,0 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Lojban/Latin/World
+ { 362, 7, 106, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {69,85,82}, 14,1 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 1, 1, 6, 7 }, // Sicilian/Latin/Italy
+ { 363, 1, 102, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {73,82,82}, 0,0 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 0, 0, 6, 5, 5 }, // Southern Kurdish/Arabic/Iran
+ { 364, 1, 163, 46, 44, 59, 37, 48, 45, 43, 101, 8220, 8221, 8216, 8217, 0,6 , 0,6 , 0,6 , 0,6 , 53,10 , 63,17 , 37,5 , 8,10 , 368,48 , 368,48 , 158,27 , 368,48 , 368,48 , 158,27 , 0,28 , 0,28 , 85,14 , 0,28 , 0,28 , 85,14 , 0,2 , 0,2 , 45,4 , 5,17 , 22,23 , {80,75,82}, 176,2 , 0,7 , 8,5 , 4,0 , 0,0 , 0,0 , 2, 0, 7, 6, 7 }, // Western Balochi/Arabic/Pakistan
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, {0,0,0}, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0, 0, 0, 0, 0 } // trailing 0s
};
@@ -2860,24 +2875,24 @@ static const ushort months_data[] = {
0x435, 0x431, 0x440, 0x443, 0x430, 0x440, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x438, 0x43b, 0x3b, 0x43c, 0x430,
0x458, 0x3b, 0x458, 0x443, 0x43d, 0x3b, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x443, 0x441, 0x442, 0x3b, 0x441, 0x435, 0x43f,
0x442, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x43e, 0x43a, 0x442, 0x43e, 0x431, 0x430, 0x440, 0x3b, 0x43d, 0x43e, 0x432, 0x435, 0x43c,
-0x431, 0x430, 0x440, 0x3b, 0x434, 0x435, 0x446, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x458, 0x430, 0x43d, 0x3b, 0x444, 0x435, 0x431,
-0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x3b, 0x458, 0x443,
-0x43b, 0x3b, 0x430, 0x432, 0x433, 0x3b, 0x441, 0x435, 0x43f, 0x442, 0x3b, 0x43e, 0x43a, 0x442, 0x3b, 0x43d, 0x43e, 0x432, 0x3b, 0x434,
-0x435, 0x446, 0x3b, 0x458, 0x430, 0x43d, 0x2e, 0x3b, 0x444, 0x435, 0x431, 0x2e, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f,
-0x440, 0x2e, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x3b, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x2e, 0x3b,
-0x441, 0x435, 0x43f, 0x442, 0x2e, 0x3b, 0x43e, 0x43a, 0x442, 0x2e, 0x3b, 0x43d, 0x43e, 0x432, 0x2e, 0x3b, 0x434, 0x435, 0x446, 0x2e,
-0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61,
-0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x3b, 0x6f,
-0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x63, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65,
-0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x6a,
-0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74,
-0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62,
-0x61, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b,
-0x6d, 0x61, 0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b,
-0x61, 0x76, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x63, 0x3b,
-0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b,
-0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70,
-0x74, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x42f, 0x43d,
+0x431, 0x430, 0x440, 0x3b, 0x434, 0x435, 0x446, 0x435, 0x43c, 0x431, 0x430, 0x440, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62,
+0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75,
+0x6c, 0x3b, 0x61, 0x76, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64,
+0x65, 0x63, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x6d, 0x61,
+0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c,
+0x3b, 0x61, 0x76, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x6f, 0x6b,
+0x74, 0x6f, 0x62, 0x61, 0x72, 0x3b, 0x6e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x64, 0x65, 0x63, 0x65, 0x6d,
+0x62, 0x61, 0x72, 0x3b, 0x6a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x70, 0x72, 0x3b,
+0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b, 0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x3b, 0x73, 0x65, 0x70, 0x3b,
+0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x63, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62,
+0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x74, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x6a, 0x3b, 0x6a, 0x75, 0x6e, 0x3b,
+0x6a, 0x75, 0x6c, 0x3b, 0x61, 0x76, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b,
+0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x63, 0x2e, 0x3b, 0x458, 0x430, 0x43d, 0x3b, 0x444, 0x435, 0x431, 0x3b, 0x43c, 0x430,
+0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x3b, 0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x3b, 0x458, 0x443, 0x43b, 0x3b, 0x430,
+0x432, 0x433, 0x3b, 0x441, 0x435, 0x43f, 0x442, 0x3b, 0x43e, 0x43a, 0x442, 0x3b, 0x43d, 0x43e, 0x432, 0x3b, 0x434, 0x435, 0x446, 0x3b,
+0x458, 0x430, 0x43d, 0x2e, 0x3b, 0x444, 0x435, 0x431, 0x2e, 0x3b, 0x43c, 0x430, 0x440, 0x442, 0x3b, 0x430, 0x43f, 0x440, 0x2e, 0x3b,
+0x43c, 0x430, 0x458, 0x3b, 0x458, 0x443, 0x43d, 0x3b, 0x458, 0x443, 0x43b, 0x3b, 0x430, 0x432, 0x433, 0x2e, 0x3b, 0x441, 0x435, 0x43f,
+0x442, 0x2e, 0x3b, 0x43e, 0x43a, 0x442, 0x2e, 0x3b, 0x43d, 0x43e, 0x432, 0x2e, 0x3b, 0x434, 0x435, 0x446, 0x2e, 0x3b, 0x42f, 0x43d,
0x432, 0x2e, 0x3b, 0x424, 0x435, 0x432, 0x440, 0x2e, 0x3b, 0x41c, 0x430, 0x440, 0x442, 0x2e, 0x3b, 0x410, 0x43f, 0x440, 0x2e, 0x3b,
0x41c, 0x430, 0x439, 0x3b, 0x418, 0x44e, 0x43d, 0x44c, 0x3b, 0x418, 0x44e, 0x43b, 0x44c, 0x3b, 0x410, 0x432, 0x433, 0x2e, 0x3b, 0x421,
0x435, 0x43d, 0x442, 0x2e, 0x3b, 0x41e, 0x43a, 0x442, 0x2e, 0x3b, 0x41d, 0x43e, 0x44f, 0x431, 0x2e, 0x3b, 0x414, 0x435, 0x43a, 0x2e,
@@ -4429,23 +4444,23 @@ static const ushort days_data[] = {
0x43f, 0x435, 0x442, 0x3b, 0x441, 0x443, 0x431, 0x3b, 0x43d, 0x435, 0x434, 0x435, 0x459, 0x430, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434,
0x435, 0x459, 0x430, 0x43a, 0x3b, 0x443, 0x442, 0x43e, 0x440, 0x430, 0x43a, 0x3b, 0x441, 0x440, 0x435, 0x434, 0x430, 0x3b, 0x447, 0x435,
0x442, 0x432, 0x440, 0x442, 0x430, 0x43a, 0x3b, 0x43f, 0x435, 0x442, 0x430, 0x43a, 0x3b, 0x441, 0x443, 0x431, 0x43e, 0x442, 0x430, 0x3b,
-0x43d, 0x3b, 0x43f, 0x3b, 0x443, 0x3b, 0x441, 0x3b, 0x447, 0x3b, 0x43f, 0x3b, 0x441, 0x3b, 0x43d, 0x435, 0x434, 0x3b, 0x43f, 0x43e,
-0x43d, 0x3b, 0x443, 0x442, 0x3b, 0x441, 0x440, 0x3b, 0x447, 0x435, 0x442, 0x3b, 0x43f, 0x435, 0x442, 0x3b, 0x441, 0x443, 0x431, 0x3b,
-0x43d, 0x435, 0x434, 0x458, 0x435, 0x459, 0x430, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434, 0x435, 0x459, 0x430, 0x43a, 0x3b, 0x443, 0x442,
-0x43e, 0x440, 0x430, 0x43a, 0x3b, 0x441, 0x440, 0x438, 0x458, 0x435, 0x434, 0x430, 0x3b, 0x447, 0x435, 0x442, 0x432, 0x440, 0x442, 0x430,
-0x43a, 0x3b, 0x43f, 0x435, 0x442, 0x430, 0x43a, 0x3b, 0x441, 0x443, 0x431, 0x43e, 0x442, 0x430, 0x3b, 0x43d, 0x435, 0x434, 0x2e, 0x3b,
-0x43f, 0x43e, 0x43d, 0x2e, 0x3b, 0x443, 0x442, 0x2e, 0x3b, 0x441, 0x440, 0x2e, 0x3b, 0x447, 0x435, 0x442, 0x2e, 0x3b, 0x43f, 0x435,
-0x442, 0x2e, 0x3b, 0x441, 0x443, 0x431, 0x2e, 0x3b, 0x6e, 0x65, 0x64, 0x3b, 0x70, 0x6f, 0x6e, 0x3b, 0x75, 0x74, 0x3b, 0x73,
-0x72, 0x3b, 0x10d, 0x65, 0x74, 0x3b, 0x70, 0x65, 0x74, 0x3b, 0x73, 0x75, 0x62, 0x3b, 0x6e, 0x65, 0x64, 0x6a, 0x65, 0x6c,
-0x6a, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x65, 0x64, 0x65, 0x6c, 0x6a, 0x61, 0x6b, 0x3b, 0x75, 0x74, 0x6f, 0x72, 0x61, 0x6b,
-0x3b, 0x73, 0x72, 0x69, 0x6a, 0x65, 0x64, 0x61, 0x3b, 0x10d, 0x65, 0x74, 0x76, 0x72, 0x74, 0x61, 0x6b, 0x3b, 0x70, 0x65,
-0x74, 0x61, 0x6b, 0x3b, 0x73, 0x75, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x6e, 0x65, 0x64, 0x2e, 0x3b, 0x70, 0x6f, 0x6e, 0x2e,
-0x3b, 0x75, 0x74, 0x2e, 0x3b, 0x73, 0x72, 0x2e, 0x3b, 0x10d, 0x65, 0x74, 0x2e, 0x3b, 0x70, 0x65, 0x74, 0x2e, 0x3b, 0x73,
-0x75, 0x62, 0x2e, 0x3b, 0x6e, 0x65, 0x64, 0x3b, 0x70, 0x6f, 0x6e, 0x3b, 0x75, 0x74, 0x6f, 0x3b, 0x73, 0x72, 0x65, 0x3b,
-0x10d, 0x65, 0x74, 0x3b, 0x70, 0x65, 0x74, 0x3b, 0x73, 0x75, 0x62, 0x3b, 0x6e, 0x65, 0x64, 0x65, 0x6c, 0x6a, 0x61, 0x3b,
-0x70, 0x6f, 0x6e, 0x65, 0x64, 0x65, 0x6c, 0x6a, 0x61, 0x6b, 0x3b, 0x75, 0x74, 0x6f, 0x72, 0x61, 0x6b, 0x3b, 0x73, 0x72,
-0x65, 0x64, 0x61, 0x3b, 0x10d, 0x65, 0x74, 0x76, 0x72, 0x74, 0x61, 0x6b, 0x3b, 0x70, 0x65, 0x74, 0x61, 0x6b, 0x3b, 0x73,
-0x75, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x425, 0x446, 0x431, 0x3b, 0x41a, 0x440, 0x441, 0x3b, 0x414, 0x446, 0x433, 0x3b, 0x4d4, 0x440,
+0x43d, 0x3b, 0x43f, 0x3b, 0x443, 0x3b, 0x441, 0x3b, 0x447, 0x3b, 0x43f, 0x3b, 0x441, 0x3b, 0x6e, 0x65, 0x64, 0x3b, 0x70, 0x6f,
+0x6e, 0x3b, 0x75, 0x74, 0x3b, 0x73, 0x72, 0x3b, 0x10d, 0x65, 0x74, 0x3b, 0x70, 0x65, 0x74, 0x3b, 0x73, 0x75, 0x62, 0x3b,
+0x6e, 0x65, 0x64, 0x6a, 0x65, 0x6c, 0x6a, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x65, 0x64, 0x65, 0x6c, 0x6a, 0x61, 0x6b, 0x3b,
+0x75, 0x74, 0x6f, 0x72, 0x61, 0x6b, 0x3b, 0x73, 0x72, 0x69, 0x6a, 0x65, 0x64, 0x61, 0x3b, 0x10d, 0x65, 0x74, 0x76, 0x72,
+0x74, 0x61, 0x6b, 0x3b, 0x70, 0x65, 0x74, 0x61, 0x6b, 0x3b, 0x73, 0x75, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x6e, 0x65, 0x64,
+0x2e, 0x3b, 0x70, 0x6f, 0x6e, 0x2e, 0x3b, 0x75, 0x74, 0x2e, 0x3b, 0x73, 0x72, 0x2e, 0x3b, 0x10d, 0x65, 0x74, 0x2e, 0x3b,
+0x70, 0x65, 0x74, 0x2e, 0x3b, 0x73, 0x75, 0x62, 0x2e, 0x3b, 0x6e, 0x65, 0x64, 0x3b, 0x70, 0x6f, 0x6e, 0x3b, 0x75, 0x74,
+0x6f, 0x3b, 0x73, 0x72, 0x65, 0x3b, 0x10d, 0x65, 0x74, 0x3b, 0x70, 0x65, 0x74, 0x3b, 0x73, 0x75, 0x62, 0x3b, 0x6e, 0x65,
+0x64, 0x65, 0x6c, 0x6a, 0x61, 0x3b, 0x70, 0x6f, 0x6e, 0x65, 0x64, 0x65, 0x6c, 0x6a, 0x61, 0x6b, 0x3b, 0x75, 0x74, 0x6f,
+0x72, 0x61, 0x6b, 0x3b, 0x73, 0x72, 0x65, 0x64, 0x61, 0x3b, 0x10d, 0x65, 0x74, 0x76, 0x72, 0x74, 0x61, 0x6b, 0x3b, 0x70,
+0x65, 0x74, 0x61, 0x6b, 0x3b, 0x73, 0x75, 0x62, 0x6f, 0x74, 0x61, 0x3b, 0x43d, 0x435, 0x434, 0x3b, 0x43f, 0x43e, 0x43d, 0x3b,
+0x443, 0x442, 0x3b, 0x441, 0x440, 0x3b, 0x447, 0x435, 0x442, 0x3b, 0x43f, 0x435, 0x442, 0x3b, 0x441, 0x443, 0x431, 0x3b, 0x43d, 0x435,
+0x434, 0x458, 0x435, 0x459, 0x430, 0x3b, 0x43f, 0x43e, 0x43d, 0x435, 0x434, 0x435, 0x459, 0x430, 0x43a, 0x3b, 0x443, 0x442, 0x43e, 0x440,
+0x430, 0x43a, 0x3b, 0x441, 0x440, 0x438, 0x458, 0x435, 0x434, 0x430, 0x3b, 0x447, 0x435, 0x442, 0x432, 0x440, 0x442, 0x430, 0x43a, 0x3b,
+0x43f, 0x435, 0x442, 0x430, 0x43a, 0x3b, 0x441, 0x443, 0x431, 0x43e, 0x442, 0x430, 0x3b, 0x43d, 0x435, 0x434, 0x2e, 0x3b, 0x43f, 0x43e,
+0x43d, 0x2e, 0x3b, 0x443, 0x442, 0x2e, 0x3b, 0x441, 0x440, 0x2e, 0x3b, 0x447, 0x435, 0x442, 0x2e, 0x3b, 0x43f, 0x435, 0x442, 0x2e,
+0x3b, 0x441, 0x443, 0x431, 0x2e, 0x3b, 0x425, 0x446, 0x431, 0x3b, 0x41a, 0x440, 0x441, 0x3b, 0x414, 0x446, 0x433, 0x3b, 0x4d4, 0x440,
0x442, 0x3b, 0x426, 0x43f, 0x440, 0x3b, 0x41c, 0x440, 0x431, 0x3b, 0x421, 0x431, 0x442, 0x3b, 0x425, 0x443, 0x44b, 0x446, 0x430, 0x443,
0x431, 0x43e, 0x43d, 0x3b, 0x41a, 0x44a, 0x443, 0x44b, 0x440, 0x438, 0x441, 0x4d5, 0x440, 0x3b, 0x414, 0x44b, 0x446, 0x446, 0x4d5, 0x433,
0x3b, 0x4d4, 0x440, 0x442, 0x44b, 0x446, 0x446, 0x4d5, 0x433, 0x3b, 0x426, 0x44b, 0x43f, 0x43f, 0x4d5, 0x440, 0x4d5, 0x43c, 0x3b, 0x41c,
@@ -5138,9 +5153,9 @@ static const ushort am_data[] = {
0x101, 0x6e, 0x74, 0x254, 0x301, 0x6e, 0x67, 0x254, 0x301, 0x70, 0x72, 0x69, 0x65, 0x161, 0x70, 0x69, 0x65, 0x74, 0x43f, 0x440,
0x435, 0x442, 0x43f, 0x43b, 0x430, 0x434, 0x43d, 0x435, 0x50, 0x47, 0x92e, 0x2e, 0x92a, 0x942, 0x2e, 0x4af, 0x2e, 0x4e9, 0x2e, 0x63a,
0x2e, 0x645, 0x2e, 0x642, 0x628, 0x644, 0x200c, 0x627, 0x632, 0x638, 0x647, 0x631, 0x64, 0x61, 0x20, 0x6d, 0x61, 0x6e, 0x68, 0xe3,
-0xa2a, 0xa42, 0x2e, 0xa26, 0xa41, 0x2e, 0x4e, 0x44, 0x43f, 0x440, 0x435, 0x20, 0x43f, 0x43e, 0x434, 0x43d, 0x435, 0x43f, 0x440, 0x438,
-0x458, 0x435, 0x20, 0x43f, 0x43e, 0x434, 0x43d, 0x435, 0x70, 0x72, 0x69, 0x6a, 0x65, 0x20, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0x70,
-0x72, 0x65, 0x20, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0x4d5, 0x43c, 0x431, 0x438, 0x441, 0x431, 0x43e, 0x43d, 0x44b, 0x20, 0x440, 0x430,
+0xa2a, 0xa42, 0x2e, 0xa26, 0xa41, 0x2e, 0x4e, 0x44, 0x43f, 0x440, 0x435, 0x20, 0x43f, 0x43e, 0x434, 0x43d, 0x435, 0x70, 0x72, 0x69,
+0x6a, 0x65, 0x20, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0x70, 0x72, 0x65, 0x20, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0x43f, 0x440, 0x438,
+0x458, 0x435, 0x20, 0x43f, 0x43e, 0x434, 0x43d, 0x435, 0x4d5, 0x43c, 0x431, 0x438, 0x441, 0x431, 0x43e, 0x43d, 0x44b, 0x20, 0x440, 0x430,
0x437, 0x43c, 0x4d5, 0x635, 0x628, 0x62d, 0x60c, 0x20, 0x645, 0x646, 0x62c, 0x647, 0x646, 0x62f, 0xdb4, 0xdd9, 0x2e, 0xdc0, 0x2e, 0x73,
0x6e, 0x2e, 0x66, 0x6d, 0x43f, 0x435, 0x2e, 0x20, 0x447, 0x43e, 0x2e, 0xbae, 0xbc1, 0xbb1, 0xbcd, 0xbaa, 0xb95, 0xbb2, 0xbcd, 0xe01,
0xe48, 0xe2d, 0xe19, 0xe40, 0xe17, 0xe35, 0xe48, 0xe22, 0xe07, 0xf66, 0xf94, 0xf0b, 0xf51, 0xfb2, 0xf7c, 0xf0b, 0x1295, 0x1309, 0x1206, 0x20,
@@ -5814,29 +5829,29 @@ static const ushort currency_display_name_data[] = {
0x3b, 0x3b, 0x3b, 0x3b, 0x421, 0x440, 0x43f, 0x441, 0x43a, 0x438, 0x20, 0x434, 0x438, 0x43d, 0x430, 0x440, 0x3b, 0x3b, 0x441, 0x440,
0x43f, 0x441, 0x43a, 0x438, 0x20, 0x434, 0x438, 0x43d, 0x430, 0x440, 0x3b, 0x3b, 0x441, 0x440, 0x43f, 0x441, 0x43a, 0x430, 0x20, 0x434,
0x438, 0x43d, 0x430, 0x440, 0x430, 0x3b, 0x3b, 0x441, 0x440, 0x43f, 0x441, 0x43a, 0x438, 0x445, 0x20, 0x434, 0x438, 0x43d, 0x430, 0x440,
-0x430, 0x3b, 0x411, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430,
-0x447, 0x43a, 0x430, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x430, 0x20, 0x43c, 0x430,
-0x440, 0x43a, 0x430, 0x3b, 0x3b, 0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433,
-0x43e, 0x432, 0x430, 0x447, 0x43a, 0x430, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x430,
-0x20, 0x43c, 0x430, 0x440, 0x43a, 0x430, 0x3b, 0x3b, 0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440,
-0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x435, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438,
-0x43b, 0x43d, 0x435, 0x20, 0x43c, 0x430, 0x440, 0x43a, 0x65, 0x3b, 0x3b, 0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d,
-0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x438, 0x445, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440,
-0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x438, 0x445, 0x20, 0x43c, 0x430, 0x440, 0x430, 0x43a, 0x430, 0x3b, 0x415, 0x432, 0x440, 0x43e,
-0x3b, 0x3b, 0x435, 0x432, 0x440, 0x43e, 0x3b, 0x3b, 0x435, 0x432, 0x440, 0x430, 0x3b, 0x3b, 0x435, 0x432, 0x440, 0x430, 0x3b, 0x42,
-0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x2d, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x61,
-0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x61, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61,
-0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x2d, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61,
+0x430, 0x3b, 0x42, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x2d, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61,
0x10d, 0x6b, 0x61, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x61, 0x20, 0x6d, 0x61,
0x72, 0x6b, 0x61, 0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x2d, 0x68, 0x65, 0x72, 0x63, 0x65, 0x67,
-0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x65, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x65,
-0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x2d, 0x68, 0x65, 0x72,
-0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x69, 0x68, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62,
-0x69, 0x6c, 0x6e, 0x69, 0x68, 0x20, 0x6d, 0x61, 0x72, 0x61, 0x6b, 0x61, 0x3b, 0x45, 0x76, 0x72, 0x6f, 0x3b, 0x3b, 0x65,
-0x76, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x76, 0x72, 0x61, 0x3b, 0x3b, 0x65, 0x76, 0x72, 0x61, 0x3b, 0x53, 0x72, 0x70, 0x73,
-0x6b, 0x69, 0x20, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x3b, 0x3b, 0x73, 0x72, 0x70, 0x73, 0x6b, 0x69, 0x20, 0x64, 0x69, 0x6e,
-0x61, 0x72, 0x3b, 0x3b, 0x73, 0x72, 0x70, 0x73, 0x6b, 0x61, 0x20, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x61, 0x3b, 0x3b, 0x73,
-0x72, 0x70, 0x73, 0x6b, 0x69, 0x68, 0x20, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x61, 0x3b, 0x41b, 0x430, 0x440, 0x3b, 0x3b, 0x43b,
+0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x61, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x61,
+0x20, 0x6d, 0x61, 0x72, 0x6b, 0x61, 0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x2d, 0x68, 0x65, 0x72,
+0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x65, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x62, 0x69,
+0x6c, 0x6e, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x3b, 0x3b, 0x62, 0x6f, 0x73, 0x61, 0x6e, 0x73, 0x6b, 0x6f, 0x2d,
+0x68, 0x65, 0x72, 0x63, 0x65, 0x67, 0x6f, 0x76, 0x61, 0x10d, 0x6b, 0x69, 0x68, 0x20, 0x6b, 0x6f, 0x6e, 0x76, 0x65, 0x72,
+0x74, 0x69, 0x62, 0x69, 0x6c, 0x6e, 0x69, 0x68, 0x20, 0x6d, 0x61, 0x72, 0x61, 0x6b, 0x61, 0x3b, 0x45, 0x76, 0x72, 0x6f,
+0x3b, 0x3b, 0x65, 0x76, 0x72, 0x6f, 0x3b, 0x3b, 0x65, 0x76, 0x72, 0x61, 0x3b, 0x3b, 0x65, 0x76, 0x72, 0x61, 0x3b, 0x53,
+0x72, 0x70, 0x73, 0x6b, 0x69, 0x20, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x3b, 0x3b, 0x73, 0x72, 0x70, 0x73, 0x6b, 0x69, 0x20,
+0x64, 0x69, 0x6e, 0x61, 0x72, 0x3b, 0x3b, 0x73, 0x72, 0x70, 0x73, 0x6b, 0x61, 0x20, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x61,
+0x3b, 0x3b, 0x73, 0x72, 0x70, 0x73, 0x6b, 0x69, 0x68, 0x20, 0x64, 0x69, 0x6e, 0x61, 0x72, 0x61, 0x3b, 0x411, 0x43e, 0x441,
+0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x430, 0x20, 0x43a,
+0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x430, 0x20, 0x43c, 0x430, 0x440, 0x43a, 0x430, 0x3b, 0x3b,
+0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a,
+0x430, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x430, 0x20, 0x43c, 0x430, 0x440, 0x43a,
+0x430, 0x3b, 0x3b, 0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e, 0x432,
+0x430, 0x447, 0x43a, 0x435, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b, 0x43d, 0x435, 0x20, 0x43c,
+0x430, 0x440, 0x43a, 0x65, 0x3b, 0x3b, 0x431, 0x43e, 0x441, 0x430, 0x43d, 0x441, 0x43a, 0x43e, 0x2d, 0x445, 0x435, 0x440, 0x446, 0x435,
+0x433, 0x43e, 0x432, 0x430, 0x447, 0x43a, 0x438, 0x445, 0x20, 0x43a, 0x43e, 0x43d, 0x432, 0x435, 0x440, 0x442, 0x438, 0x431, 0x438, 0x43b,
+0x43d, 0x438, 0x445, 0x20, 0x43c, 0x430, 0x440, 0x430, 0x43a, 0x430, 0x3b, 0x415, 0x432, 0x440, 0x43e, 0x3b, 0x3b, 0x435, 0x432, 0x440,
+0x43e, 0x3b, 0x3b, 0x435, 0x432, 0x440, 0x430, 0x3b, 0x3b, 0x435, 0x432, 0x440, 0x430, 0x3b, 0x41b, 0x430, 0x440, 0x3b, 0x3b, 0x43b,
0x430, 0x440, 0x3b, 0x3b, 0x3b, 0x3b, 0x43b, 0x430, 0x440, 0x44b, 0x3b, 0x421, 0x43e, 0x43c, 0x3b, 0x3b, 0x441, 0x43e, 0x43c, 0x3b,
0x3b, 0x3b, 0x3b, 0x441, 0x43e, 0x43c, 0x44b, 0x3b, 0x44, 0x6f, 0x72, 0x61, 0x20, 0x72, 0x65, 0x20, 0x41, 0x6d, 0x65, 0x72,
0x69, 0x6b, 0x61, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x67e, 0x627, 0x6aa, 0x633, 0x62a, 0x627, 0x646, 0x64a, 0x20, 0x631,
@@ -6291,9 +6306,9 @@ static const ushort endonyms_data[] = {
0x441, 0x442, 0x430, 0x43d, 0x41a, 0x438, 0x440, 0x433, 0x438, 0x437, 0x438, 0x44f, 0x41c, 0x43e, 0x43b, 0x434, 0x43e, 0x432, 0x430, 0x423,
0x43a, 0x440, 0x430, 0x438, 0x43d, 0x430, 0x53, 0xe4, 0x6e, 0x67, 0xf6, 0x4b, 0xf6, 0x64, 0xf6, 0x72, 0xf6, 0x73, 0xea, 0x73,
0x65, 0x20, 0x74, 0xee, 0x20, 0x42, 0xea, 0x61, 0x66, 0x72, 0xee, 0x6b, 0x61, 0x441, 0x440, 0x43f, 0x441, 0x43a, 0x438, 0x421,
-0x440, 0x431, 0x438, 0x458, 0x430, 0x411, 0x43e, 0x441, 0x43d, 0x430, 0x20, 0x438, 0x20, 0x425, 0x435, 0x440, 0x446, 0x435, 0x433, 0x43e,
-0x432, 0x438, 0x43d, 0x430, 0x426, 0x440, 0x43d, 0x430, 0x20, 0x413, 0x43e, 0x440, 0x430, 0x41a, 0x43e, 0x441, 0x43e, 0x432, 0x43e, 0x73,
-0x72, 0x70, 0x73, 0x6b, 0x69, 0x43, 0x72, 0x6e, 0x61, 0x20, 0x47, 0x6f, 0x72, 0x61, 0x53, 0x72, 0x62, 0x69, 0x6a, 0x61,
+0x440, 0x431, 0x438, 0x458, 0x430, 0x73, 0x72, 0x70, 0x73, 0x6b, 0x69, 0x43, 0x72, 0x6e, 0x61, 0x20, 0x47, 0x6f, 0x72, 0x61,
+0x53, 0x72, 0x62, 0x69, 0x6a, 0x61, 0x411, 0x43e, 0x441, 0x43d, 0x430, 0x20, 0x438, 0x20, 0x425, 0x435, 0x440, 0x446, 0x435, 0x433,
+0x43e, 0x432, 0x438, 0x43d, 0x430, 0x426, 0x440, 0x43d, 0x430, 0x20, 0x413, 0x43e, 0x440, 0x430, 0x41a, 0x43e, 0x441, 0x43e, 0x432, 0x43e,
0x4b, 0x6f, 0x73, 0x6f, 0x76, 0x6f, 0x438, 0x440, 0x43e, 0x43d, 0x413, 0x443, 0x44b, 0x440, 0x434, 0x437, 0x44b, 0x441, 0x442, 0x43e,
0x43d, 0x423, 0x4d5, 0x440, 0x4d5, 0x441, 0x435, 0x63, 0x68, 0x69, 0x53, 0x68, 0x6f, 0x6e, 0x61, 0x633, 0x646, 0x68c, 0x64a, 0x67e,
0x627, 0x6aa, 0x633, 0x62a, 0x627, 0x646, 0xdc3, 0xdd2, 0xd82, 0xdc4, 0xdbd, 0xdc1, 0xdca, 0x200d, 0xdbb, 0xdd3, 0x20, 0xdbd, 0xd82, 0xd9a,
@@ -6773,6 +6788,11 @@ static const char language_name_list[] =
"Cantonese\0"
"Osage\0"
"Tangut\0"
+"Ido\0"
+"Lojban\0"
+"Sicilian\0"
+"Southern Kurdish\0"
+"Western Balochi\0"
;
static const quint16 language_name_index[] = {
@@ -7136,6 +7156,11 @@ static const quint16 language_name_index[] = {
3050, // Cantonese
3060, // Osage
3066, // Tangut
+ 3073, // Ido
+ 3077, // Lojban
+ 3084, // Sicilian
+ 3093, // Southern Kurdish
+ 3110, // Western Balochi
};
static const char script_name_list[] =
@@ -8319,6 +8344,11 @@ static const unsigned char language_code_list[] =
"yue" // Cantonese
"osa" // Osage
"txg" // Tangut
+"io\0" // Ido
+"jbo" // Lojban
+"scn" // Sicilian
+"sdh" // Southern Kurdish
+"bgn" // Western Balochi
;
static const unsigned char script_code_list[] =
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index a96ecf1c1c..98b6a31a46 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -66,6 +66,7 @@
QT_BEGIN_NAMESPACE
#ifndef QT_NO_SYSTEMLOCALE
+struct QLocaleData;
class Q_CORE_EXPORT QSystemLocale
{
public:
@@ -126,6 +127,7 @@ public:
virtual QVariant query(QueryType type, QVariant in) const;
virtual QLocale fallbackUiLocale() const;
+ inline const QLocaleData *fallbackUiLocaleData() const;
private:
QSystemLocale(bool);
friend class QSystemLocaleSingleton;
@@ -373,8 +375,6 @@ public:
QLocale::MeasurementSystem measurementSystem() const;
- static void updateSystemPrivate();
-
QString dateTimeToString(QStringView format, const QDateTime &datetime,
const QDate &dateOnly, const QTime &timeOnly,
const QLocale *q) const;
@@ -384,6 +384,10 @@ public:
QLocale::NumberOptions m_numberOptions;
};
+#ifndef QT_NO_SYSTEMLOCALE
+const QLocaleData *QSystemLocale::fallbackUiLocaleData() const { return fallbackUiLocale().d->m_data; }
+#endif
+
template <>
inline QLocalePrivate *QSharedDataPointer<QLocalePrivate>::clone()
{
diff --git a/src/corelib/tools/qmakearray_p.h b/src/corelib/tools/qmakearray_p.h
index ae4d7f07c6..71441c2c27 100644
--- a/src/corelib/tools/qmakearray_p.h
+++ b/src/corelib/tools/qmakearray_p.h
@@ -111,10 +111,10 @@ struct QuickSortFilter<Predicate, QuickSortData<Head, Tail...>>
using TailFilteredData = typename QuickSortFilter<
Predicate, QuickSortData<Tail...>>::Type;
- using Type = typename QConditional<
+ using Type = typename std::conditional<
Predicate<Head>::value,
decltype(quickSortConcat(QuickSortData<Head> {}, TailFilteredData{})),
- TailFilteredData>::Type;
+ TailFilteredData>::type;
};
template <template <typename> class Predicate>
diff --git a/src/corelib/tools/qoffsetstringarray_p.h b/src/corelib/tools/qoffsetstringarray_p.h
new file mode 100644
index 0000000000..4dd9e9603b
--- /dev/null
+++ b/src/corelib/tools/qoffsetstringarray_p.h
@@ -0,0 +1,198 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QOFFSETSTRINGARRAY_P_H
+#define QOFFSETSTRINGARRAY_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "private/qglobal_p.h"
+
+#include <tuple>
+#include <array>
+
+QT_BEGIN_NAMESPACE
+
+namespace QtPrivate {
+template<int N, int O, int I, int ... Idx>
+struct OffsetSequenceHelper : OffsetSequenceHelper<N - 1, O + I, Idx..., O> { };
+
+template<int Last, int I, int S, int ... Idx>
+struct OffsetSequenceHelper<1, Last, I, S, Idx...> : IndexesList<Last + I, Idx..., Last>
+{
+ static const constexpr auto Length = Last + I;
+ using Type = typename std::conditional<
+ Last <= std::numeric_limits<quint8>::max(),
+ quint8,
+ typename std::conditional<
+ Last <= std::numeric_limits<quint16>::max(),
+ quint16,
+ int>::type
+ >::type;
+};
+
+template<int ... Idx>
+struct OffsetSequence : OffsetSequenceHelper<sizeof ... (Idx), 0, Idx..., 0> { };
+
+template<int N>
+struct StaticString
+{
+ const char data[N];
+};
+
+
+template<>
+struct StaticString<0>
+{
+ static constexpr int size() noexcept
+ {
+ return 0;
+ }
+};
+
+template<typename, typename>
+struct StaticStringBuilder;
+
+template<int ... I1, int ... I2>
+struct StaticStringBuilder<IndexesList<I1...>, IndexesList<I2...>>
+{
+
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_MSVC(4100) // The formal parameter is not referenced in the body of the function.
+ // The unreferenced parameter is ignored.
+ // It happens when 'rs' is StaticString<0>
+ template<int N1, int N2>
+ static constexpr StaticString<N1 + N2> concatenate(
+ const char (&ls)[N1], const StaticString<N2> &rs) noexcept
+ {
+ return StaticString<N1 + N2>{{ls[I1]..., rs.data[I2]...}};
+ }
+QT_WARNING_POP
+};
+
+template<int Sum>
+constexpr StaticString<0> staticString() noexcept
+{
+ return StaticString<0>{};
+}
+
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_MSVC(4503)
+template<int Sum, int I, int ... Ix>
+constexpr StaticString<Sum> staticString(const char (&s)[I], const char (&...sx)[Ix]) noexcept
+{
+ return StaticStringBuilder<
+ makeIndexSequence<I>,
+ makeIndexSequence<Sum - I>>::concatenate(s, staticString<Sum - I>(sx...));
+}
+QT_WARNING_POP
+} // namespace QtPrivate
+
+template<typename T, int SizeString, int SizeOffsets>
+class QOffsetStringArray
+{
+public:
+ using Type = T;
+
+ template<int ... Ox>
+ constexpr QOffsetStringArray(const QtPrivate::StaticString<SizeString> &str,
+ QtPrivate::IndexesList<SizeString, Ox...>) noexcept
+ : m_string(str),
+ m_offsets{Ox...}
+ { }
+
+ constexpr inline const char *operator[](const int index) const noexcept
+ {
+ return m_string.data + m_offsets[qBound(int(0), index, SizeOffsets - 1)];
+ }
+
+ constexpr inline const char *at(const int index) const noexcept
+ {
+ return m_string.data + m_offsets[index];
+ }
+
+ constexpr inline const char *str() const { return m_string.data; }
+ constexpr inline const T *offsets() const { return m_offsets; }
+ constexpr inline int count() const { return SizeOffsets; };
+
+ static constexpr const auto sizeString = SizeString;
+ static constexpr const auto sizeOffsets = SizeOffsets;
+
+private:
+ QtPrivate::StaticString<SizeString> m_string;
+ const T m_offsets[SizeOffsets];
+};
+
+template<typename T, int N, int ... Ox>
+constexpr QOffsetStringArray<T, N, sizeof ... (Ox)> qOffsetStringArray(
+ const QtPrivate::StaticString<N> &string,
+ QtPrivate::IndexesList<N, Ox...> offsets) noexcept
+{
+ return QOffsetStringArray<T, N, sizeof ... (Ox)>(
+ string,
+ offsets);
+}
+
+template<int ... Nx>
+struct QOffsetStringArrayRet
+{
+ using Offsets = QtPrivate::OffsetSequence<Nx...>;
+ using Type = QOffsetStringArray<typename Offsets::Type, Offsets::Length, sizeof ... (Nx)>;
+};
+
+template<int ... Nx>
+constexpr auto qOffsetStringArray(const char (&...strings)[Nx]) noexcept -> typename QOffsetStringArrayRet<Nx...>::Type
+{
+ using Offsets = QtPrivate::OffsetSequence<Nx...>;
+ return qOffsetStringArray<typename Offsets::Type>(
+ QtPrivate::staticString<Offsets::Length>(strings...), Offsets{});
+}
+
+QT_END_NAMESPACE
+
+#endif // QOFFSETSTRINGARRAY_P_H
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index 1b51b591f7..1508681021 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -529,7 +529,7 @@ Q_CORE_EXPORT QBasicAtomicInteger<quint64> qt_cpu_features[1] = { Q_BASIC_ATOMIC
Q_CORE_EXPORT QBasicAtomicInteger<unsigned> qt_cpu_features[2] = { Q_BASIC_ATOMIC_INITIALIZER(0), Q_BASIC_ATOMIC_INITIALIZER(0) };
#endif
-void qDetectCpuFeatures()
+quint64 qDetectCpuFeatures()
{
quint64 f = detectProcessorFeatures();
QByteArray disable = qgetenv("QT_NO_CPU_FEATURE");
@@ -563,6 +563,7 @@ void qDetectCpuFeatures()
#ifndef Q_ATOMIC_INT64_IS_SUPPORTED
qt_cpu_features[1].store(f >> 32);
#endif
+ return f;
}
void qDumpCPUFeatures()
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 9f1321df94..c36e1e484f 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -344,7 +344,7 @@ extern Q_CORE_EXPORT QBasicAtomicInteger<quint64> qt_cpu_features[1];
#else
extern Q_CORE_EXPORT QBasicAtomicInteger<unsigned> qt_cpu_features[2];
#endif
-Q_CORE_EXPORT void qDetectCpuFeatures();
+Q_CORE_EXPORT quint64 qDetectCpuFeatures();
static inline quint64 qCpuFeatures()
{
@@ -353,11 +353,7 @@ static inline quint64 qCpuFeatures()
features |= quint64(qt_cpu_features[1].load()) << 32;
#endif
if (Q_UNLIKELY(features == 0)) {
- qDetectCpuFeatures();
- features = qt_cpu_features[0].load();
-#ifndef Q_ATOMIC_INT64_IS_SUPPORTED
- features |= quint64(qt_cpu_features[1].load()) << 32;
-#endif
+ features = qDetectCpuFeatures();
Q_ASSUME(features != 0);
}
return features;
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 63d44eb39c..dc09c8e729 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -120,7 +120,7 @@ QT_BEGIN_NAMESPACE
* Whenever multiple alternatives are equivalent or near so, we prefer the one
* using instructions from SSE2, since SSE2 is guaranteed to be enabled for all
* 64-bit builds and we enable it for 32-bit builds by default. Use of higher
- * SSE versions should be done when there's a clear performance benefit and
+ * SSE versions should be done when there is a clear performance benefit and
* requires fallback code to SSE2, if it exists.
*
* Performance measurement in the past shows that most strings are short in
@@ -1550,7 +1550,7 @@ const QString::Null QString::null = { };
functions. The former searches forward starting from a given index
position, the latter searches backward. Both return the index
position of the character or substring if they find it; otherwise,
- they return -1. For example, here's a typical loop that finds all
+ they return -1. For example, here is a typical loop that finds all
occurrences of a particular substring:
\snippet qstring/main.cpp 6
@@ -6712,7 +6712,7 @@ namespace QUnicodeTables {
this function requires to be a valid, empty string) and \c{s} contains the
only copy of the string, without reallocation (thus, \a it is still valid).
- There's one pathological case left: when the in-place conversion needs to
+ There is one pathological case left: when the in-place conversion needs to
reallocate memory to grow the buffer. In that case, we need to adjust the \a
it pointer.
*/
@@ -6870,7 +6870,7 @@ QString &QString::sprintf(const char *cformat, ...)
\warning We do not recommend using QString::asprintf() in new Qt
code. Instead, consider using QTextStream or arg(), both of
which support Unicode strings seamlessly and are type-safe.
- Here's an example that uses QTextStream:
+ Here is an example that uses QTextStream:
\snippet qstring/main.cpp 64
@@ -7837,7 +7837,7 @@ QStringList QString::split(const QString &sep, SplitBehavior behavior, Qt::CaseS
the result.
\note All references are valid as long this string is alive. Destroying this
- string will cause all references be dangling pointers.
+ string will cause all references to be dangling pointers.
\since 5.4
\sa QStringRef split()
@@ -7871,7 +7871,7 @@ QVector<QStringRef> QString::splitRef(QChar sep, SplitBehavior behavior, Qt::Cas
the result.
\note All references are valid as long this string is alive. Destroying this
- string will cause all references be dangling pointers.
+ string will cause all references to be dangling pointers.
\since 5.4
*/
@@ -7920,17 +7920,17 @@ static ResultList splitString(const QString &source, MidMethod mid, const QRegEx
does not match anywhere in the string, split() returns a
single-element list containing this string.
- Here's an example where we extract the words in a sentence
+ Here is an example where we extract the words in a sentence
using one or more whitespace characters as the separator:
\snippet qstring/main.cpp 59
- Here's a similar example, but this time we use any sequence of
+ Here is a similar example, but this time we use any sequence of
non-word characters as the separator:
\snippet qstring/main.cpp 60
- Here's a third example where we use a zero-length assertion,
+ Here is a third example where we use a zero-length assertion,
\b{\\b} (word boundary), to split the string into an
alternating sequence of non-word and word tokens:
@@ -7953,7 +7953,7 @@ QStringList QString::split(const QRegExp &rx, SplitBehavior behavior) const
single-element vector containing this string reference.
\note All references are valid as long this string is alive. Destroying this
- string will cause all references be dangling pointers.
+ string will cause all references to be dangling pointers.
\sa QStringRef split()
*/
@@ -8002,17 +8002,17 @@ static ResultList splitString(const QString &source, MidMethod mid, const QRegul
does not match anywhere in the string, split() returns a
single-element list containing this string.
- Here's an example where we extract the words in a sentence
+ Here is an example where we extract the words in a sentence
using one or more whitespace characters as the separator:
\snippet qstring/main.cpp 90
- Here's a similar example, but this time we use any sequence of
+ Here is a similar example, but this time we use any sequence of
non-word characters as the separator:
\snippet qstring/main.cpp 91
- Here's a third example where we use a zero-length assertion,
+ Here is a third example where we use a zero-length assertion,
\b{\\b} (word boundary), to split the string into an
alternating sequence of non-word and word tokens:
@@ -8035,7 +8035,7 @@ QStringList QString::split(const QRegularExpression &re, SplitBehavior behavior)
single-element vector containing this string reference.
\note All references are valid as long this string is alive. Destroying this
- string will cause all references be dangling pointers.
+ string will cause all references to be dangling pointers.
\sa split() QStringRef
*/
@@ -9172,7 +9172,7 @@ bool QString::isRightToLeft() const
to create a deep copy of the data, ensuring that the raw data
isn't modified.
- Here's an example of how we can use a QRegularExpression on raw data in
+ Here is an example of how we can use a QRegularExpression on raw data in
memory without requiring to copy the data into a QString:
\snippet qstring/main.cpp 22
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 6be3dcdbe1..da76601e88 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -899,10 +899,8 @@ private:
template <typename T> static
T toIntegral_helper(const QChar *data, int len, bool *ok, int base)
{
- // ### Qt6: use std::conditional<std::is_unsigned<T>::value, qulonglong, qlonglong>::type
- const bool isUnsigned = T(0) < T(-1);
- typedef typename QtPrivate::QConditional<isUnsigned, qulonglong, qlonglong>::Type Int64;
- typedef typename QtPrivate::QConditional<isUnsigned, uint, int>::Type Int32;
+ using Int64 = typename std::conditional<std::is_unsigned<T>::value, qulonglong, qlonglong>::type;
+ using Int32 = typename std::conditional<std::is_unsigned<T>::value, uint, int>::type;
// we select the right overload by casting size() to int or uint
Int64 val = toIntegral_helper(data, Int32(len), ok, base);
diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp
index cf150c2a1b..cc6eaf8ad2 100644
--- a/src/corelib/tools/qstringlist.cpp
+++ b/src/corelib/tools/qstringlist.cpp
@@ -376,6 +376,56 @@ bool QtPrivate::QStringList_contains(const QStringList *that, QLatin1String str,
return stringList_contains(*that, str, cs);
}
+/*!
+ \fn bool QStringList::indexOf(QStringView str, int from) const
+ \overload
+ \since 5.13
+
+ Returns the index position of the first occurrence of \a str in
+ the list, searching forward from index position \a from. Returns
+ -1 if no item matched.
+
+ \sa lastIndexOf(), contains()
+ */
+
+/*!
+ \fn bool QStringList::indexOf(QLatin1String str, int from) const
+ \overload
+ \since 5.13
+
+ Returns the index position of the first occurrence of \a str in
+ the list, searching forward from index position \a from. Returns
+ -1 if no item matched.
+
+ \sa lastIndexOf(), contains()
+ */
+
+/*!
+ \fn bool QStringList::lastIndexOf(QStringView str, int from) const
+ \overload
+ \since 5.13
+
+ Returns the index position of the last occurrence of \a str in
+ the list, searching backward from index position \a from. If \a
+ from is -1 (the default), the search starts at the last item.
+ Returns -1 if no item matched.
+
+ \sa indexOf(), contains()
+ */
+
+/*!
+ \fn bool QStringList::lastIndexOf(QLatin1String str, int from) const
+ \overload
+ \since 5.13
+
+ Returns the index position of the last occurrence of \a str in
+ the list, searching backward from index position \a from. If \a
+ from is -1 (the default), the search starts at the last item.
+ Returns -1 if no item matched.
+
+ \sa indexOf(), contains()
+ */
+
#ifndef QT_NO_REGEXP
/*!
\fn QStringList QStringList::filter(const QRegExp &rx) const
@@ -780,7 +830,7 @@ int QtPrivate::QStringList_removeDuplicates(QStringList *that)
continue;
++setSize;
if (j != i)
- that->swap(i, j);
+ that->swapItemsAt(i, j);
++j;
}
if (n != j)
diff --git a/src/corelib/tools/qstringlist.h b/src/corelib/tools/qstringlist.h
index 10cbad04d6..b6c48488df 100644
--- a/src/corelib/tools/qstringlist.h
+++ b/src/corelib/tools/qstringlist.h
@@ -132,6 +132,12 @@ public:
inline QStringList &operator<<(const QList<QString> &l)
{ *this += l; return *this; }
+ inline int indexOf(QStringView str, int from = 0) const;
+ inline int indexOf(QLatin1String str, int from = 0) const;
+
+ inline int lastIndexOf(QStringView str, int from = -1) const;
+ inline int lastIndexOf(QLatin1String str, int from = -1) const;
+
#ifndef QT_NO_REGEXP
inline int indexOf(const QRegExp &rx, int from = 0) const;
inline int lastIndexOf(const QRegExp &rx, int from = -1) const;
@@ -249,6 +255,26 @@ inline QStringList operator+(const QList<QString> &one, const QStringList &other
return n;
}
+inline int QStringList::indexOf(QStringView string, int from) const
+{
+ return QtPrivate::indexOf<QString, QStringView>(*this, string, from);
+}
+
+inline int QStringList::indexOf(QLatin1String string, int from) const
+{
+ return QtPrivate::indexOf<QString, QLatin1String>(*this, string, from);
+}
+
+inline int QStringList::lastIndexOf(QStringView string, int from) const
+{
+ return QtPrivate::lastIndexOf<QString, QStringView>(*this, string, from);
+}
+
+inline int QStringList::lastIndexOf(QLatin1String string, int from) const
+{
+ return QtPrivate::lastIndexOf<QString, QLatin1String>(*this, string, from);
+}
+
#ifndef QT_NO_REGEXP
inline QStringList &QListSpecialMethods<QString>::replaceInStrings(const QRegExp &rx, const QString &after)
{
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 30fd7b2865..b51cd819c5 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -42,7 +42,6 @@
#include <QtCore/qalgorithms.h>
#include <QtCore/qiterator.h>
-#include <QtCore/qlist.h>
#include <QtCore/qrefcount.h>
#include <QtCore/qarraydata.h>
#include <QtCore/qhashfunctions.h>
@@ -94,7 +93,13 @@ public:
void reserve(int size);
inline void squeeze()
{
- reallocData(d->size, d->size);
+ if (d->size < int(d->alloc)) {
+ if (!d->size) {
+ *this = QVector<T>();
+ return;
+ }
+ realloc(d->size);
+ }
if (d->capacityReserved) {
// capacity reserved in a read only memory would be useless
// this checks avoid writing to such memory.
@@ -297,9 +302,10 @@ public:
inline std::vector<T> toStdVector() const
{ return std::vector<T>(d->begin(), d->end()); }
private:
- // ### Qt6: remove const from int parameters
+ // ### Qt6: remove methods, they are unused
void reallocData(const int size, const int alloc, QArrayData::AllocationOptions options = QArrayData::Default);
void reallocData(const int sz) { reallocData(sz, d->alloc); }
+ void realloc(int alloc, QArrayData::AllocationOptions options = QArrayData::Default);
void freeData(Data *d);
void defaultConstruct(T *from, T *to);
void copyConstruct(const T *srcFrom, const T *srcTo, T *dstFrom);
@@ -387,7 +393,7 @@ void QVector<T>::detach()
d = Data::unsharableEmpty();
else
#endif
- reallocData(d->size, int(d->alloc));
+ realloc(int(d->alloc));
}
Q_ASSERT(isDetached());
}
@@ -396,7 +402,7 @@ template <typename T>
void QVector<T>::reserve(int asize)
{
if (asize > int(d->alloc))
- reallocData(d->size, asize);
+ realloc(asize);
if (isDetached()
#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
&& d != Data::unsharableEmpty()
@@ -409,21 +415,26 @@ void QVector<T>::reserve(int asize)
template <typename T>
void QVector<T>::resize(int asize)
{
- int newAlloc;
- const int oldAlloc = int(d->alloc);
- QArrayData::AllocationOptions opt;
-
- if (asize > oldAlloc) { // there is not enough space
- newAlloc = asize;
- opt = QArrayData::Grow;
- } else {
- newAlloc = oldAlloc;
+ if (asize == d->size)
+ return;
+ if (asize > int(d->alloc) || !isDetached()) { // there is not enough space
+ QArrayData::AllocationOptions opt = asize > int(d->alloc) ? QArrayData::Grow : QArrayData::Default;
+ realloc(qMax(int(d->alloc), asize), opt);
}
- reallocData(asize, newAlloc, opt);
+ if (asize < d->size)
+ destruct(begin() + asize, end());
+ else
+ defaultConstruct(end(), begin() + asize);
+ d->size = asize;
}
template <typename T>
inline void QVector<T>::clear()
-{ resize(0); }
+{
+ if (!d->size)
+ return;
+ destruct(begin(), end());
+ d->size = 0;
+}
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");
@@ -654,6 +665,77 @@ void QVector<T>::reallocData(const int asize, const int aalloc, QArrayData::Allo
Q_ASSERT(d->size == asize);
}
+template<typename T>
+void QVector<T>::realloc(int aalloc, QArrayData::AllocationOptions options)
+{
+ Q_ASSERT(aalloc >= d->size);
+ Data *x = d;
+
+ const bool isShared = d->ref.isShared();
+ Q_ASSERT(aalloc != int(d->alloc) || isShared);
+
+ QT_TRY {
+ // allocate memory
+ x = Data::allocate(aalloc, options);
+ Q_CHECK_PTR(x);
+ // aalloc is bigger then 0 so it is not [un]sharedEmpty
+#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
+ Q_ASSERT(x->ref.isSharable() || options.testFlag(QArrayData::Unsharable));
+#endif
+ Q_ASSERT(!x->ref.isStatic());
+ x->size = d->size;
+
+ T *srcBegin = d->begin();
+ T *srcEnd = d->end();
+ T *dst = x->begin();
+
+ if (!QTypeInfoQuery<T>::isRelocatable || (isShared && QTypeInfo<T>::isComplex)) {
+ QT_TRY {
+ if (isShared || !std::is_nothrow_move_constructible<T>::value) {
+ // we can not move the data, we need to copy construct it
+ while (srcBegin != srcEnd)
+ new (dst++) T(*srcBegin++);
+ } else {
+ while (srcBegin != srcEnd)
+ new (dst++) T(std::move(*srcBegin++));
+ }
+ } QT_CATCH (...) {
+ // destruct already copied objects
+ destruct(x->begin(), dst);
+ QT_RETHROW;
+ }
+ } else {
+ ::memcpy(static_cast<void *>(dst), static_cast<void *>(srcBegin), (srcEnd - srcBegin) * sizeof(T));
+ dst += srcEnd - srcBegin;
+ }
+
+ } QT_CATCH (...) {
+ Data::deallocate(x);
+ QT_RETHROW;
+ }
+ x->capacityReserved = d->capacityReserved;
+
+ Q_ASSERT(d != x);
+ if (!d->ref.deref()) {
+ if (!QTypeInfoQuery<T>::isRelocatable || !aalloc || (isShared && QTypeInfo<T>::isComplex)) {
+ // data was copy constructed, we need to call destructors
+ // or if !alloc we did nothing to the old 'd'.
+ freeData(d);
+ } else {
+ Data::deallocate(d);
+ }
+ }
+ d = x;
+
+ Q_ASSERT(d->data());
+ Q_ASSERT(uint(d->size) <= d->alloc);
+#if !defined(QT_NO_UNSHARABLE_CONTAINERS)
+ Q_ASSERT(d != Data::unsharableEmpty());
+#endif
+ Q_ASSERT(d != Data::sharedNull());
+ Q_ASSERT(d->alloc >= uint(aalloc));
+}
+
#if defined(Q_CC_MSVC)
QT_WARNING_POP
#endif
@@ -679,7 +761,7 @@ void QVector<T>::append(const T &t)
if (!isDetached() || isTooSmall) {
T copy(t);
QArrayData::AllocationOptions opt(isTooSmall ? QArrayData::Grow : QArrayData::Default);
- reallocData(d->size, isTooSmall ? d->size + 1 : d->alloc, opt);
+ realloc(isTooSmall ? d->size + 1 : d->alloc, opt);
if (QTypeInfo<T>::isComplex)
new (d->end()) T(qMove(copy));
@@ -702,7 +784,7 @@ void QVector<T>::append(T &&t)
const bool isTooSmall = uint(d->size + 1) > d->alloc;
if (!isDetached() || isTooSmall) {
QArrayData::AllocationOptions opt(isTooSmall ? QArrayData::Grow : QArrayData::Default);
- reallocData(d->size, isTooSmall ? d->size + 1 : d->alloc, opt);
+ realloc(isTooSmall ? d->size + 1 : d->alloc, opt);
}
new (d->end()) T(std::move(t));
@@ -717,13 +799,11 @@ void QVector<T>::removeLast()
Q_ASSERT(!isEmpty());
Q_ASSERT(d->alloc);
- if (!d->ref.isShared()) {
- --d->size;
- if (QTypeInfo<T>::isComplex)
- (d->data() + d->size)->~T();
- } else {
- reallocData(d->size - 1);
- }
+ if (d->ref.isShared())
+ detach();
+ --d->size;
+ if (QTypeInfo<T>::isComplex)
+ (d->data() + d->size)->~T();
}
template <typename T>
@@ -735,7 +815,7 @@ typename QVector<T>::iterator QVector<T>::insert(iterator before, size_type n, c
if (n != 0) {
const T copy(t);
if (!isDetached() || d->size + n > int(d->alloc))
- reallocData(d->size, d->size + n, QArrayData::Grow);
+ realloc(d->size + n, QArrayData::Grow);
if (!QTypeInfoQuery<T>::isRelocatable) {
T *b = d->end();
T *i = d->end() + n;
@@ -768,7 +848,7 @@ typename QVector<T>::iterator QVector<T>::insert(iterator before, T &&t)
const auto offset = std::distance(d->begin(), before);
if (!isDetached() || d->size + 1 > int(d->alloc))
- reallocData(d->size, d->size + 1, QArrayData::Grow);
+ realloc(d->size + 1, QArrayData::Grow);
if (!QTypeInfoQuery<T>::isRelocatable) {
T *i = d->end();
T *j = i + 1;
@@ -870,14 +950,14 @@ QVector<T> &QVector<T>::fill(const T &from, int asize)
template <typename T>
QVector<T> &QVector<T>::operator+=(const QVector &l)
{
- if (d == Data::sharedNull()) {
+ if (d->size == 0) {
*this = l;
} else {
uint newSize = d->size + l.d->size;
const bool isTooSmall = newSize > d->alloc;
if (!isDetached() || isTooSmall) {
QArrayData::AllocationOptions opt(isTooSmall ? QArrayData::Grow : QArrayData::Default);
- reallocData(d->size, isTooSmall ? newSize : d->alloc, opt);
+ realloc(isTooSmall ? newSize : d->alloc, opt);
}
if (d->alloc) {
@@ -960,7 +1040,7 @@ Q_OUTOFLINE_TEMPLATE QVector<T> QVector<T>::mid(int pos, int len) const
}
QVector<T> midResult;
- midResult.reallocData(0, len);
+ midResult.realloc(len);
T *srcFrom = d->begin() + pos;
T *srcTo = d->begin() + pos + len;
midResult.copyConstruct(srcFrom, srcTo, midResult.data());
@@ -968,37 +1048,6 @@ Q_OUTOFLINE_TEMPLATE QVector<T> QVector<T>::mid(int pos, int len) const
return midResult;
}
-template <typename T>
-Q_OUTOFLINE_TEMPLATE QList<T> QVector<T>::toList() const
-{
- QList<T> result;
- result.reserve(size());
- for (int i = 0; i < size(); ++i)
- result.append(at(i));
- return result;
-}
-
-template <typename T>
-Q_OUTOFLINE_TEMPLATE QVector<T> QList<T>::toVector() const
-{
- QVector<T> result(size());
- for (int i = 0; i < size(); ++i)
- result[i] = at(i);
- return result;
-}
-
-template <typename T>
-QVector<T> QVector<T>::fromList(const QList<T> &list)
-{
- return list.toVector();
-}
-
-template <typename T>
-QList<T> QList<T>::fromVector(const QVector<T> &vector)
-{
- return vector.toList();
-}
-
Q_DECLARE_SEQUENTIAL_ITERATOR(Vector)
Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR(Vector)
@@ -1046,20 +1095,12 @@ inline bool operator>=(const QVector<T> &lhs, const QVector<T> &rhs)
### QVector<QPointF> respectively.
*/
-#ifdef Q_CC_MSVC
+#if defined(Q_CC_MSVC) && !defined(QT_BUILD_CORE_LIB)
QT_BEGIN_INCLUDE_NAMESPACE
#include <QtCore/qpoint.h>
QT_END_INCLUDE_NAMESPACE
-
-#ifndef Q_TEMPLATE_EXTERN
-#if defined(QT_BUILD_CORE_LIB)
-#define Q_TEMPLATE_EXTERN
-#else
-#define Q_TEMPLATE_EXTERN extern
-#endif
-#endif
-Q_TEMPLATE_EXTERN template class Q_CORE_EXPORT QVector<QPointF>;
-Q_TEMPLATE_EXTERN template class Q_CORE_EXPORT QVector<QPoint>;
+extern template class Q_CORE_EXPORT QVector<QPointF>;
+extern template class Q_CORE_EXPORT QVector<QPoint>;
#endif
QVector<uint> QStringView::toUcs4() const { return QtPrivate::convertToUcs4(*this); }
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index dc28e0e0a2..995bab694e 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -39,6 +39,7 @@ HEADERS += \
tools/qmargins.h \
tools/qmessageauthenticationcode.h \
tools/qcontiguouscache.h \
+ tools/qoffsetstringarray_p.h \
tools/qpair.h \
tools/qpoint.h \
tools/qqueue.h \
diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro
index ce799e0951..920a04315d 100644
--- a/src/dbus/dbus.pro
+++ b/src/dbus/dbus.pro
@@ -20,7 +20,7 @@ DEFINES += QT_NO_FOREACH
QMAKE_DOCS = $$PWD/doc/qtdbus.qdocconf
-PUB_HEADERS = qtdbusglobal.h \
+HEADERS += qtdbusglobal.h \
qdbusargument.h \
qdbusconnectioninterface.h \
qdbuserror.h \
@@ -38,8 +38,7 @@ PUB_HEADERS = qtdbusglobal.h \
qdbuscontext.h \
qdbusvirtualobject.h \
qdbusservicewatcher.h \
- qdbusunixfiledescriptor.h
-HEADERS += $$PUB_HEADERS \
+ qdbusunixfiledescriptor.h \
qtdbusglobal_p.h \
qdbusconnection_p.h \
qdbusconnectionmanager_p.h \
diff --git a/src/dbus/doc/qtdbus.qdocconf b/src/dbus/doc/qtdbus.qdocconf
index 69eaa0eec3..4ff7242b25 100644
--- a/src/dbus/doc/qtdbus.qdocconf
+++ b/src/dbus/doc/qtdbus.qdocconf
@@ -21,6 +21,8 @@ excludedirs += ../../../examples/widgets/doc
examplesinstallpath = dbus
+tagfile = qtdbus.tags
+
depends += qtdoc qtcore
# The following parameters are for creating a qhp file, the qhelpgenerator
diff --git a/src/dbus/qdbusargument.cpp b/src/dbus/qdbusargument.cpp
index a33c4f8363..2d1373006d 100644
--- a/src/dbus/qdbusargument.cpp
+++ b/src/dbus/qdbusargument.cpp
@@ -267,7 +267,7 @@ bool QDBusArgumentPrivate::checkReadAndDetach(QDBusArgumentPrivate *&d)
*/
/*!
- \fn qdbus_cast(const QDBusArgument &arg)
+ \fn template<typename T> T qdbus_cast(const QDBusArgument &arg, T*)
\relates QDBusArgument
\since 4.2
diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h
index a6d4e9cd25..ac650d5f62 100644
--- a/src/dbus/qdbusargument.h
+++ b/src/dbus/qdbusargument.h
@@ -158,22 +158,14 @@ QT_END_NAMESPACE
Q_DECLARE_METATYPE(QDBusArgument)
QT_BEGIN_NAMESPACE
-template<typename T> inline T qdbus_cast(const QDBusArgument &arg
-#ifndef Q_QDOC
-, T * = nullptr
-#endif
- )
+template<typename T> inline T qdbus_cast(const QDBusArgument &arg, T * = nullptr)
{
T item;
arg >> item;
return item;
}
-template<typename T> inline T qdbus_cast(const QVariant &v
-#ifndef Q_QDOC
-, T * = nullptr
-#endif
- )
+template<typename T> inline T qdbus_cast(const QVariant &v, T * = nullptr)
{
int id = v.userType();
if (id == qMetaTypeId<QDBusArgument>())
diff --git a/src/dbus/qdbusargument_p.h b/src/dbus/qdbusargument_p.h
index 559f8b1186..b678b9606f 100644
--- a/src/dbus/qdbusargument_p.h
+++ b/src/dbus/qdbusargument_p.h
@@ -155,7 +155,7 @@ public:
bool skipSignature;
private:
- Q_DISABLE_COPY(QDBusMarshaller)
+ Q_DISABLE_COPY_MOVE(QDBusMarshaller)
};
class QDBusDemarshaller: public QDBusArgumentPrivate
@@ -208,7 +208,7 @@ public:
QDBusDemarshaller *parent;
private:
- Q_DISABLE_COPY(QDBusDemarshaller)
+ Q_DISABLE_COPY_MOVE(QDBusDemarshaller)
QString toStringUnchecked();
QDBusObjectPath toObjectPathUnchecked();
QDBusSignature toSignatureUnchecked();
diff --git a/src/dbus/qdbusconnection.h b/src/dbus/qdbusconnection.h
index ca7adfaaeb..3711981f78 100644
--- a/src/dbus/qdbusconnection.h
+++ b/src/dbus/qdbusconnection.h
@@ -122,9 +122,7 @@ public:
SubPath = 0x1
// Reserved = 0xff000000
};
-#ifndef Q_QDOC
Q_DECLARE_FLAGS(VirtualObjectRegisterOptions, VirtualObjectRegisterOption)
-#endif
enum ConnectionCapability {
UnixFileDescriptorPassing = 0x0001
diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
index 444d4727fd..7769b9ea71 100644
--- a/src/dbus/qdbusconnection_p.h
+++ b/src/dbus/qdbusconnection_p.h
@@ -94,7 +94,7 @@ class QDBusServer;
class QDBusErrorInternal
{
mutable DBusError error;
- Q_DISABLE_COPY(QDBusErrorInternal)
+ Q_DISABLE_COPY_MOVE(QDBusErrorInternal)
public:
inline QDBusErrorInternal() { q_dbus_error_init(&error); }
inline ~QDBusErrorInternal() { q_dbus_error_free(&error); }
@@ -121,6 +121,15 @@ public:
QSocketNotifier *write;
};
+ struct ArgMatchRules {
+ QStringList args;
+ QString arg0namespace;
+ bool operator==(const ArgMatchRules &other) const {
+ return args == other.args &&
+ arg0namespace == other.arg0namespace;
+ }
+ };
+
struct SignalHook
{
inline SignalHook() : obj(0), midx(-1) { }
@@ -128,7 +137,7 @@ public:
QObject* obj;
int midx;
QVector<int> params;
- QStringList argumentMatch;
+ ArgMatchRules argumentMatch;
QByteArray matchRule;
};
@@ -207,12 +216,19 @@ public:
QDBusMessage sendWithReplyLocal(const QDBusMessage &message);
QDBusPendingCallPrivate *sendWithReplyAsync(const QDBusMessage &message, QObject *receiver,
const char *returnMethod, const char *errorMethod,int timeout = -1);
+
bool connectSignal(const QString &service, const QString &path, const QString& interface,
const QString &name, const QStringList &argumentMatch, const QString &signature,
QObject *receiver, const char *slot);
bool disconnectSignal(const QString &service, const QString &path, const QString& interface,
const QString &name, const QStringList &argumentMatch, const QString &signature,
QObject *receiver, const char *slot);
+ bool connectSignal(const QString &service, const QString &path, const QString& interface,
+ const QString &name, const ArgMatchRules &argumentMatch, const QString &signature,
+ QObject *receiver, const char *slot);
+ bool disconnectSignal(const QString &service, const QString &path, const QString& interface,
+ const QString &name, const ArgMatchRules &argumentMatch, const QString &signature,
+ QObject *receiver, const char *slot);
void registerObject(const ObjectTreeNode *node);
void unregisterObject(const QString &path, QDBusConnection::UnregisterMode mode);
void connectRelay(const QString &service,
@@ -332,7 +348,7 @@ public:
static bool prepareHook(QDBusConnectionPrivate::SignalHook &hook, QString &key,
const QString &service,
const QString &path, const QString &interface, const QString &name,
- const QStringList &argMatch,
+ const ArgMatchRules &argMatch,
QObject *receiver, const char *signal, int minMIdx,
bool buildSignature);
static DBusHandlerResult messageFilter(DBusConnection *, DBusMessage *, void *);
diff --git a/src/dbus/qdbuserror.cpp b/src/dbus/qdbuserror.cpp
index e966f9dcde..decd345ece 100644
--- a/src/dbus/qdbuserror.cpp
+++ b/src/dbus/qdbuserror.cpp
@@ -41,6 +41,7 @@
#include <qdebug.h>
#include <qvarlengtharray.h>
+#include <private/qoffsetstringarray_p.h>
#ifndef QT_BOOTSTRAPPED
#include "qdbus_symbols_p.h"
@@ -52,110 +53,46 @@
QT_BEGIN_NAMESPACE
-/*
- * Use the following Perl script to generate the error string index list:
-===== PERL SCRIPT ====
-print "static const char errorMessages_string[] =\n";
-$counter = 0;
-$i = 0;
-while (<STDIN>) {
- chomp;
- print " \"$_\\0\"\n";
- $sizes[$i++] = $counter;
- $counter += 1 + length $_;
-}
-print " \"\\0\";\n\nstatic const int errorMessages_indices[] = {\n ";
-for ($j = 0; $j < $i; ++$j) {
- printf "$sizes[$j], ";
-}
-print "0\n};\n";
-===== PERL SCRIPT ====
-
- * The input data is as follows:
-other
-org.freedesktop.DBus.Error.Failed
-org.freedesktop.DBus.Error.NoMemory
-org.freedesktop.DBus.Error.ServiceUnknown
-org.freedesktop.DBus.Error.NoReply
-org.freedesktop.DBus.Error.BadAddress
-org.freedesktop.DBus.Error.NotSupported
-org.freedesktop.DBus.Error.LimitsExceeded
-org.freedesktop.DBus.Error.AccessDenied
-org.freedesktop.DBus.Error.NoServer
-org.freedesktop.DBus.Error.Timeout
-org.freedesktop.DBus.Error.NoNetwork
-org.freedesktop.DBus.Error.AddressInUse
-org.freedesktop.DBus.Error.Disconnected
-org.freedesktop.DBus.Error.InvalidArgs
-org.freedesktop.DBus.Error.UnknownMethod
-org.freedesktop.DBus.Error.TimedOut
-org.freedesktop.DBus.Error.InvalidSignature
-org.freedesktop.DBus.Error.UnknownInterface
-org.freedesktop.DBus.Error.UnknownObject
-org.freedesktop.DBus.Error.UnknownProperty
-org.freedesktop.DBus.Error.PropertyReadOnly
-org.qtproject.QtDBus.Error.InternalError
-org.qtproject.QtDBus.Error.InvalidService
-org.qtproject.QtDBus.Error.InvalidObjectPath
-org.qtproject.QtDBus.Error.InvalidInterface
-org.qtproject.QtDBus.Error.InvalidMember
-*/
-
-// in the same order as KnownErrors!
-static const char errorMessages_string[] =
- "other\0"
- "org.freedesktop.DBus.Error.Failed\0"
- "org.freedesktop.DBus.Error.NoMemory\0"
- "org.freedesktop.DBus.Error.ServiceUnknown\0"
- "org.freedesktop.DBus.Error.NoReply\0"
- "org.freedesktop.DBus.Error.BadAddress\0"
- "org.freedesktop.DBus.Error.NotSupported\0"
- "org.freedesktop.DBus.Error.LimitsExceeded\0"
- "org.freedesktop.DBus.Error.AccessDenied\0"
- "org.freedesktop.DBus.Error.NoServer\0"
- "org.freedesktop.DBus.Error.Timeout\0"
- "org.freedesktop.DBus.Error.NoNetwork\0"
- "org.freedesktop.DBus.Error.AddressInUse\0"
- "org.freedesktop.DBus.Error.Disconnected\0"
- "org.freedesktop.DBus.Error.InvalidArgs\0"
- "org.freedesktop.DBus.Error.UnknownMethod\0"
- "org.freedesktop.DBus.Error.TimedOut\0"
- "org.freedesktop.DBus.Error.InvalidSignature\0"
- "org.freedesktop.DBus.Error.UnknownInterface\0"
- "org.freedesktop.DBus.Error.UnknownObject\0"
- "org.freedesktop.DBus.Error.UnknownProperty\0"
- "org.freedesktop.DBus.Error.PropertyReadOnly\0"
- "org.qtproject.QtDBus.Error.InternalError\0"
- "org.qtproject.QtDBus.Error.InvalidService\0"
- "org.qtproject.QtDBus.Error.InvalidObjectPath\0"
- "org.qtproject.QtDBus.Error.InvalidInterface\0"
- "org.qtproject.QtDBus.Error.InvalidMember\0"
- "\0";
-
-static const int errorMessages_indices[] = {
- 0, 6, 40, 76, 118, 153, 191, 231,
- 273, 313, 349, 384, 421, 461, 501, 540,
- 581, 617, 661, 705, 746, 789, 833, 874,
- 916, 961, 1005
-};
-
-static const int errorMessages_count = sizeof errorMessages_indices /
- sizeof errorMessages_indices[0];
-
-static inline const char *get(QDBusError::ErrorType code)
-{
- int intcode = qBound(0, int(code) - int(QDBusError::Other), errorMessages_count);
- return errorMessages_string + errorMessages_indices[intcode];
-}
+static constexpr const auto errorMessages = qOffsetStringArray(
+ "NoError",
+ "other",
+ "org.freedesktop.DBus.Error.Failed",
+ "org.freedesktop.DBus.Error.NoMemory",
+ "org.freedesktop.DBus.Error.ServiceUnknown",
+ "org.freedesktop.DBus.Error.NoReply",
+ "org.freedesktop.DBus.Error.BadAddress",
+ "org.freedesktop.DBus.Error.NotSupported",
+ "org.freedesktop.DBus.Error.LimitsExceeded",
+ "org.freedesktop.DBus.Error.AccessDenied",
+ "org.freedesktop.DBus.Error.NoServer",
+ "org.freedesktop.DBus.Error.Timeout",
+ "org.freedesktop.DBus.Error.NoNetwork",
+ "org.freedesktop.DBus.Error.AddressInUse",
+ "org.freedesktop.DBus.Error.Disconnected",
+ "org.freedesktop.DBus.Error.InvalidArgs",
+ "org.freedesktop.DBus.Error.UnknownMethod",
+ "org.freedesktop.DBus.Error.TimedOut",
+ "org.freedesktop.DBus.Error.InvalidSignature",
+ "org.freedesktop.DBus.Error.UnknownInterface",
+ "org.freedesktop.DBus.Error.UnknownObject",
+ "org.freedesktop.DBus.Error.UnknownProperty",
+ "org.freedesktop.DBus.Error.PropertyReadOnly",
+ "org.qtproject.QtDBus.Error.InternalError",
+ "org.qtproject.QtDBus.Error.InvalidService",
+ "org.qtproject.QtDBus.Error.InvalidObjectPath",
+ "org.qtproject.QtDBus.Error.InvalidInterface",
+ "org.qtproject.QtDBus.Error.InvalidMember",
+ ""
+);
#ifndef QT_BOOTSTRAPPED
static inline QDBusError::ErrorType get(const char *name)
{
if (!name || !*name)
return QDBusError::NoError;
- for (int i = 0; i < errorMessages_count; ++i)
- if (strcmp(name, errorMessages_string + errorMessages_indices[i]) == 0)
- return QDBusError::ErrorType(i + int(QDBusError::Other));
+ for (int i = 0; i < errorMessages.count(); ++i)
+ if (strcmp(name, errorMessages.at(i)) == 0)
+ return QDBusError::ErrorType(i);
return QDBusError::Other;
}
#endif
@@ -301,7 +238,7 @@ QDBusError::QDBusError(const QDBusMessage &qdmsg)
QDBusError::QDBusError(ErrorType error, const QString &mess)
: code(error)
{
- nm = QLatin1String(::get(error));
+ nm = QLatin1String(errorMessages[error]);
msg = mess;
}
@@ -397,7 +334,7 @@ bool QDBusError::isValid() const
*/
QString QDBusError::errorString(ErrorType error)
{
- return QLatin1String(::get(error));
+ return QLatin1String(errorMessages[error]);
}
#ifndef QT_NO_DEBUG_STREAM
@@ -418,3 +355,11 @@ QDebug operator<<(QDebug dbg, const QDBusError &msg)
QT_END_NAMESPACE
#endif // QT_NO_DBUS
+
+/*
+MSVC2015 has the warning C4503 at the end of the file:
+QtPrivate::StaticStringBuilder<QtPrivate::IndexesList<...> - decorated name length exceeded, name was truncated
+It is used by qOffsetStringArray in a constexpr evaulation and this code does not exist in the object file,
+but we still have the warning or even error with -WX flag
+*/
+QT_WARNING_DISABLE_MSVC(4503)
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index dfef25e3a8..1125480447 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -338,7 +338,7 @@ void QDBusConnectionPrivate::_q_newConnection(QDBusConnectionPrivate *newConnect
static QByteArray buildMatchRule(const QString &service,
const QString &objectPath, const QString &interface,
- const QString &member, const QStringList &argMatch, const QString & /*signature*/)
+ const QString &member, const QDBusConnectionPrivate::ArgMatchRules &argMatch, const QString & /*signature*/)
{
QString result = QLatin1String("type='signal',");
QString keyValue = QLatin1String("%1='%2',");
@@ -353,11 +353,14 @@ static QByteArray buildMatchRule(const QString &service,
result += keyValue.arg(QLatin1String("member"), member);
// add the argument string-matching now
- if (!argMatch.isEmpty()) {
+ if (!argMatch.args.isEmpty()) {
keyValue = QLatin1String("arg%1='%2',");
- for (int i = 0; i < argMatch.count(); ++i)
- if (!argMatch.at(i).isNull())
- result += keyValue.arg(i).arg(argMatch.at(i));
+ for (int i = 0; i < argMatch.args.count(); ++i)
+ if (!argMatch.args.at(i).isNull())
+ result += keyValue.arg(i).arg(argMatch.args.at(i));
+ }
+ if (!argMatch.arg0namespace.isEmpty()) {
+ result += QStringLiteral("arg0namespace='%1',").arg(argMatch.arg0namespace);
}
result.chop(1); // remove ending comma
@@ -456,21 +459,26 @@ static QObject *findChildObject(const QDBusConnectionPrivate::ObjectTreeNode *ro
return 0;
}
-static QStringList matchArgsForService(const QString &service, QDBusServiceWatcher::WatchMode mode)
+static QDBusConnectionPrivate::ArgMatchRules matchArgsForService(const QString &service, QDBusServiceWatcher::WatchMode mode)
{
- QStringList matchArgs;
- matchArgs << service;
+ QDBusConnectionPrivate::ArgMatchRules matchArgs;
+ if (service.endsWith(QLatin1Char('*'))) {
+ matchArgs.arg0namespace = service.chopped(1);
+ matchArgs.args << QString();
+ }
+ else
+ matchArgs.args << service;
switch (mode) {
case QDBusServiceWatcher::WatchForOwnerChange:
break;
case QDBusServiceWatcher::WatchForRegistration:
- matchArgs << QString::fromLatin1("", 0);
+ matchArgs.args << QString::fromLatin1("", 0);
break;
case QDBusServiceWatcher::WatchForUnregistration:
- matchArgs << QString() << QString::fromLatin1("", 0);
+ matchArgs.args << QString() << QString::fromLatin1("", 0);
break;
}
return matchArgs;
@@ -1311,7 +1319,7 @@ int QDBusConnectionPrivate::findSlot(QObject* obj, const QByteArray &normalizedN
bool QDBusConnectionPrivate::prepareHook(QDBusConnectionPrivate::SignalHook &hook, QString &key,
const QString &service,
const QString &path, const QString &interface, const QString &name,
- const QStringList &argMatch,
+ const ArgMatchRules &argMatch,
QObject *receiver, const char *signal, int minMIdx,
bool buildSignature)
{
@@ -1621,14 +1629,14 @@ void QDBusConnectionPrivate::handleSignal(const QString &key, const QDBusMessage
continue;
if (hook.signature.isEmpty() && !hook.signature.isNull() && !msg.signature().isEmpty())
continue;
- if (!hook.argumentMatch.isEmpty()) {
+ if (!hook.argumentMatch.args.isEmpty()) {
const QVariantList arguments = msg.arguments();
- if (hook.argumentMatch.size() > arguments.size())
+ if (hook.argumentMatch.args.size() > arguments.size())
continue;
bool matched = true;
- for (int i = 0; i < hook.argumentMatch.size(); ++i) {
- const QString &param = hook.argumentMatch.at(i);
+ for (int i = 0; i < hook.argumentMatch.args.size(); ++i) {
+ const QString &param = hook.argumentMatch.args.at(i);
if (param.isNull())
continue; // don't try to match against this
if (param == arguments.at(i).toString())
@@ -1639,7 +1647,15 @@ void QDBusConnectionPrivate::handleSignal(const QString &key, const QDBusMessage
if (!matched)
continue;
}
-
+ if (!hook.argumentMatch.arg0namespace.isEmpty()) {
+ const QVariantList arguments = msg.arguments();
+ if (arguments.size() < 1)
+ continue;
+ const QString param = arguments.at(0).toString();
+ if (param != hook.argumentMatch.arg0namespace
+ && !param.startsWith(hook.argumentMatch.arg0namespace + QLatin1Char('.')))
+ continue;
+ }
activateSignal(hook, msg);
}
}
@@ -2181,11 +2197,22 @@ void QDBusConnectionPrivate::sendInternal(QDBusPendingCallPrivate *pcall, void *
}
}
+
bool QDBusConnectionPrivate::connectSignal(const QString &service,
const QString &path, const QString &interface, const QString &name,
const QStringList &argumentMatch, const QString &signature,
QObject *receiver, const char *slot)
{
+ ArgMatchRules rules;
+ rules.args = argumentMatch;
+ return connectSignal(service, path, interface, name, rules, signature, receiver, slot);
+}
+
+bool QDBusConnectionPrivate::connectSignal(const QString &service,
+ const QString &path, const QString &interface, const QString &name,
+ const ArgMatchRules &argumentMatch, const QString &signature,
+ QObject *receiver, const char *slot)
+{
// check the slot
QDBusConnectionPrivate::SignalHook hook;
QString key;
@@ -2242,9 +2269,11 @@ bool QDBusConnectionPrivate::addSignalHook(const QString &key, const SignalHook
WatchedServicesHash::mapped_type &data = watchedServices[hook.service];
if (++data.refcount == 1) {
// we need to watch for this service changing
+ ArgMatchRules rules;
+ rules.args << hook.service;
q_dbus_bus_add_match(connection,
buildMatchRule(QDBusUtil::dbusService(), QString(), QDBusUtil::dbusInterface(),
- QDBusUtil::nameOwnerChanged(), QStringList() << hook.service, QString()),
+ QDBusUtil::nameOwnerChanged(), rules, QString()),
NULL);
data.owner = getNameOwnerNoCache(hook.service);
qDBusDebug() << this << "Watching service" << hook.service << "for owner changes (current owner:"
@@ -2257,8 +2286,18 @@ bool QDBusConnectionPrivate::addSignalHook(const QString &key, const SignalHook
}
bool QDBusConnectionPrivate::disconnectSignal(const QString &service,
+ const QString &path, const QString &interface, const QString &name,
+ const QStringList &argumentMatch, const QString &signature,
+ QObject *receiver, const char *slot)
+{
+ ArgMatchRules rules;
+ rules.args = argumentMatch;
+ return disconnectSignal(service, path, interface, name, rules, signature, receiver, slot);
+}
+
+bool QDBusConnectionPrivate::disconnectSignal(const QString &service,
const QString &path, const QString &interface, const QString &name,
- const QStringList &argumentMatch, const QString &signature,
+ const ArgMatchRules &argumentMatch, const QString &signature,
QObject *receiver, const char *slot)
{
// check the slot
@@ -2289,7 +2328,7 @@ bool QDBusConnectionPrivate::removeSignalHook(const QString &key, const SignalHo
entry.signature == hook.signature &&
entry.obj == hook.obj &&
entry.midx == hook.midx &&
- entry.argumentMatch == hook.argumentMatch) {
+ entry.argumentMatch.args == hook.argumentMatch.args) {
// no need to compare the parameters if it's the same slot
removeSignalHookNoLock(it);
return true; // it was there
@@ -2331,9 +2370,11 @@ QDBusConnectionPrivate::removeSignalHookNoLock(SignalHookHash::Iterator it)
if (sit != watchedServices.end()) {
if (--sit.value().refcount == 0) {
watchedServices.erase(sit);
+ ArgMatchRules rules;
+ rules.args << hook.service;
q_dbus_bus_remove_match(connection,
buildMatchRule(QDBusUtil::dbusService(), QString(), QDBusUtil::dbusInterface(),
- QDBusUtil::nameOwnerChanged(), QStringList() << hook.service, QString()),
+ QDBusUtil::nameOwnerChanged(), rules, QString()),
NULL);
}
}
@@ -2394,7 +2435,7 @@ void QDBusConnectionPrivate::connectRelay(const QString &service,
QByteArray sig;
sig.append(QSIGNAL_CODE + '0');
sig.append(signal.methodSignature());
- if (!prepareHook(hook, key, service, path, interface, QString(), QStringList(), receiver, sig,
+ if (!prepareHook(hook, key, service, path, interface, QString(), ArgMatchRules(), receiver, sig,
QDBusAbstractInterface::staticMetaObject.methodCount(), true))
return; // don't connect
@@ -2415,7 +2456,7 @@ void QDBusConnectionPrivate::disconnectRelay(const QString &service,
QByteArray sig;
sig.append(QSIGNAL_CODE + '0');
sig.append(signal.methodSignature());
- if (!prepareHook(hook, key, service, path, interface, QString(), QStringList(), receiver, sig,
+ if (!prepareHook(hook, key, service, path, interface, QString(), ArgMatchRules(), receiver, sig,
QDBusAbstractInterface::staticMetaObject.methodCount(), true))
return; // don't disconnect
@@ -2448,7 +2489,7 @@ bool QDBusConnectionPrivate::shouldWatchService(const QString &service)
*/
void QDBusConnectionPrivate::watchService(const QString &service, QDBusServiceWatcher::WatchMode mode, QObject *obj, const char *member)
{
- QStringList matchArgs = matchArgsForService(service, mode);
+ ArgMatchRules matchArgs = matchArgsForService(service, mode);
connectSignal(QDBusUtil::dbusService(), QString(), QDBusUtil::dbusInterface(), QDBusUtil::nameOwnerChanged(),
matchArgs, QString(), obj, member);
}
@@ -2463,7 +2504,7 @@ void QDBusConnectionPrivate::watchService(const QString &service, QDBusServiceWa
*/
void QDBusConnectionPrivate::unwatchService(const QString &service, QDBusServiceWatcher::WatchMode mode, QObject *obj, const char *member)
{
- QStringList matchArgs = matchArgsForService(service, mode);
+ ArgMatchRules matchArgs = matchArgsForService(service, mode);
disconnectSignal(QDBusUtil::dbusService(), QString(), QDBusUtil::dbusInterface(), QDBusUtil::nameOwnerChanged(),
matchArgs, QString(), obj, member);
}
diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
index 2a31dd950a..4d0131afff 100644
--- a/src/dbus/qdbuspendingcall.cpp
+++ b/src/dbus/qdbuspendingcall.cpp
@@ -311,7 +311,7 @@ QDBusPendingCall &QDBusPendingCall::operator=(const QDBusPendingCall &other)
\sa QDBusPendingReply::isFinished()
*/
/*!
- \fn bool QDBusPendingReply::isFinished() const
+ \fn template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> bool QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::isFinished() const
Returns \c true if the pending call has finished processing and the
reply has been received. If this function returns \c true, the
@@ -340,7 +340,7 @@ void QDBusPendingCall::waitForFinished()
}
/*!
- \fn bool QDBusPendingReply::isValid() const
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> bool QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::isValid() const
Returns \c true if the reply contains a normal reply message, false
if it contains anything else.
@@ -357,7 +357,7 @@ bool QDBusPendingCall::isValid() const
}
/*!
- \fn bool QDBusPendingReply::isError() const
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> bool QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::isError() const
Returns \c true if the reply contains an error message, false if it
contains a normal method reply.
@@ -374,7 +374,7 @@ bool QDBusPendingCall::isError() const
}
/*!
- \fn QDBusError QDBusPendingReply::error() const
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusError QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::error() const
Retrieves the error content of the reply message, if it has
finished processing. If the reply message has not finished
@@ -395,7 +395,7 @@ QDBusError QDBusPendingCall::error() const
}
/*!
- \fn QDBusMessage QDBusPendingReply::reply() const
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusMessage QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::reply() const
Retrieves the reply message received for the asynchronous call
that was sent, if it has finished processing. If the pending call
@@ -445,7 +445,7 @@ bool QDBusPendingCall::setReplyCallback(QObject *target, const char *member)
\since 4.6
Creates a QDBusPendingCall object based on the error condition
\a error. The resulting pending call object will be in the
- "finished" state and QDBusPendingReply::isError() will return true.
+ "finished" state and QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::isError() will return true.
\sa fromCompletedCall()
*/
diff --git a/src/dbus/qdbuspendingcall.h b/src/dbus/qdbuspendingcall.h
index ec8ba6c541..24b1d6a7ca 100644
--- a/src/dbus/qdbuspendingcall.h
+++ b/src/dbus/qdbuspendingcall.h
@@ -67,7 +67,7 @@ public:
void swap(QDBusPendingCall &other) Q_DECL_NOTHROW { qSwap(d, other.d); }
-#ifndef Q_QDOC
+#ifndef Q_CLANG_QDOC
// pretend that they aren't here
bool isFinished() const;
void waitForFinished();
diff --git a/src/dbus/qdbuspendingreply.cpp b/src/dbus/qdbuspendingreply.cpp
index fef6f36432..6aec571563 100644
--- a/src/dbus/qdbuspendingreply.cpp
+++ b/src/dbus/qdbuspendingreply.cpp
@@ -94,7 +94,7 @@
*/
/*!
- \fn QDBusPendingReply::QDBusPendingReply()
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::QDBusPendingReply()
Creates an empty QDBusPendingReply object. Without assigning a
QDBusPendingCall object to this reply, QDBusPendingReply cannot do
@@ -102,7 +102,7 @@
*/
/*!
- \fn QDBusPendingReply::QDBusPendingReply(const QDBusPendingReply &other)
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::QDBusPendingReply(const QDBusPendingReply &other)
Creates a copy of the \a other QDBusPendingReply object. Just like
QDBusPendingCall and QDBusPendingCallWatcher, this QDBusPendingReply
@@ -111,7 +111,7 @@
*/
/*!
- \fn QDBusPendingReply::QDBusPendingReply(const QDBusPendingCall &call)
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::QDBusPendingReply(const QDBusPendingCall &call)
Creates a QDBusPendingReply object that will take its contents from
the \a call pending asynchronous call. This QDBusPendingReply object
@@ -119,7 +119,7 @@
*/
/*!
- \fn QDBusPendingReply::QDBusPendingReply(const QDBusMessage &message)
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::QDBusPendingReply(const QDBusMessage &message)
Creates a QDBusPendingReply object that will take its contents from
the message \a message. In this case, this object will be already
@@ -129,7 +129,7 @@
*/
/*!
- \fn QDBusPendingReply &QDBusPendingReply::operator=(const QDBusPendingReply &other)
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply &QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::operator=(const QDBusPendingReply &other)
Makes a copy of \a other and drops the reference to the current
pending call. If the current reference is to an unfinished pending
@@ -139,7 +139,7 @@
*/
/*!
- \fn QDBusPendingReply &QDBusPendingReply::operator=(const QDBusPendingCall &call)
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply &QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::operator=(const QDBusPendingCall &call)
Makes this object take its contents from the \a call pending call
and drops the reference to the current pending call. If the
@@ -149,7 +149,7 @@
*/
/*!
- \fn QDBusPendingReply &QDBusPendingReply::operator=(const QDBusMessage &message)
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply &QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::operator=(const QDBusMessage &message)
Makes this object take its contents from the \a message message
and drops the reference to the current pending call. If the
@@ -171,7 +171,7 @@
*/
/*!
- \fn int QDBusPendingReply::count() const
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> int QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::count() const
Return the number of arguments the reply is supposed to have. This
number matches the number of non-void template parameters in this
@@ -183,7 +183,7 @@
*/
/*!
- \fn QVariant QDBusPendingReply::argumentAt(int index) const
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QVariant QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::argumentAt(int index) const
Returns the argument at position \a index in the reply's
contents. If the reply doesn't have that many elements, this
@@ -198,12 +198,7 @@
*/
/*!
- \typedef QDBusPendingReply::T1
- \internal
- */
-
-/*!
- \fn T1 QDBusPendingReply::value() const
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> T1 QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::value() const
Returns the first argument in this reply, cast to type \c T1 (the
first template parameter of this class). This is equivalent to
@@ -221,7 +216,7 @@
*/
/*!
- \fn QDBusPendingReply::operator T1() const
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::operator T1() const
Returns the first argument in this reply, cast to type \c T1 (the
first template parameter of this class). This is equivalent to
@@ -239,7 +234,7 @@
*/
/*!
- \fn void QDBusPendingReply::waitForFinished()
+ \fn template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> void QDBusPendingReply<T1, T2, T3, T4, T5, T6, T7, T8>::waitForFinished()
Suspends the execution of the calling thread until the reply is
received and processed. After this function returns, isFinished()
diff --git a/src/dbus/qdbuspendingreply.h b/src/dbus/qdbuspendingreply.h
index 4d2c3a7c5a..bc5cd92c84 100644
--- a/src/dbus/qdbuspendingreply.h
+++ b/src/dbus/qdbuspendingreply.h
@@ -108,10 +108,8 @@ namespace QDBusPendingReplyTypes {
template <> struct NotVoid<void> { typedef TypeIsVoid Type; };
} // namespace QDBusPendingReplyTypes
-#ifndef Q_CLANG_QDOC
template<typename T1 = void, typename T2 = void, typename T3 = void, typename T4 = void,
typename T5 = void, typename T6 = void, typename T7 = void, typename T8 = void>
-#endif
class QDBusPendingReply:
#ifdef Q_CLANG_QDOC
public QDBusPendingCall
@@ -171,7 +169,6 @@ public:
QDBusError error() const;
QDBusMessage reply() const;
- typedef QVariant T1;
inline T1 value() const;
inline operator T1() const;
#else
diff --git a/src/dbus/qdbusreply.cpp b/src/dbus/qdbusreply.cpp
index ab361f1674..6abfaf174c 100644
--- a/src/dbus/qdbusreply.cpp
+++ b/src/dbus/qdbusreply.cpp
@@ -81,7 +81,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn template<typename T> QDBusReply<T>::QDBusReply(const QDBusPendingReply &reply)
+ \fn template<typename T> QDBusReply<T>::QDBusReply(const QDBusPendingReply<T> &reply)
Constructs a QDBusReply object from the pending reply message, \a reply.
*/
diff --git a/src/dbus/qdbusreply.h b/src/dbus/qdbusreply.h
index 177b6c6e89..869687ac85 100644
--- a/src/dbus/qdbusreply.h
+++ b/src/dbus/qdbusreply.h
@@ -82,14 +82,10 @@ public:
other.waitForFinished();
return *this = other.reply();
}
-#if defined(Q_CLANG_QDOC)
- inline QDBusReply(const QDBusPendingReply &reply) { }
-#else
inline QDBusReply(const QDBusPendingReply<T> &reply)
{
*this = static_cast<QDBusPendingCall>(reply);
}
-#endif
inline QDBusReply(const QDBusError &dbusError = QDBusError())
: m_error(dbusError), m_data(Type())
diff --git a/src/dbus/qdbusservicewatcher.cpp b/src/dbus/qdbusservicewatcher.cpp
index 0c2fb9118f..b0bfe7254d 100644
--- a/src/dbus/qdbusservicewatcher.cpp
+++ b/src/dbus/qdbusservicewatcher.cpp
@@ -139,6 +139,17 @@ void QDBusServiceWatcherPrivate::removeService(const QString &service)
QDBusConnectionInterface::serviceOwnerChanged() signal because it allows
one to receive only the signals for which the class is interested in.
+ Ending a service name with the character '*' will match all service names
+ within the specified namespace.
+
+ For example "com.example.backend1*" will match
+ \list
+ \li com.example.backend1
+ \li com.example.backend1.foo
+ \li com.example.backend1.foo.bar
+ \endlist
+ Substrings in the same domain will not be matched, i.e "com.example.backend12".
+
\sa QDBusConnection
*/
diff --git a/src/dbus/qdbusutil.cpp b/src/dbus/qdbusutil.cpp
index 28341a71a8..dc94897ac4 100644
--- a/src/dbus/qdbusutil.cpp
+++ b/src/dbus/qdbusutil.cpp
@@ -331,8 +331,8 @@ namespace QDBusUtil
/*!
\internal
- \fn bool QDBusUtil::isValidPartOfObjectPath(const QStringRef &part)
- See QDBusUtil::isValidObjectPath
+ \fn bool isValidPartOfObjectPath(const QStringRef &part)
+ See isValidObjectPath
*/
bool isValidPartOfObjectPath(const QStringRef &part)
{
@@ -349,13 +349,13 @@ namespace QDBusUtil
/*!
\internal
- \fn bool QDBusUtil::isValidPartOfObjectPath(const QString &part)
+ \fn bool isValidPartOfObjectPath(const QString &part)
\overload
*/
/*!
- \fn bool QDBusUtil::isValidInterfaceName(const QString &ifaceName)
+ \fn bool isValidInterfaceName(const QString &ifaceName)
Returns \c true if this is \a ifaceName is a valid interface name.
Valid interface names must:
@@ -384,7 +384,7 @@ namespace QDBusUtil
}
/*!
- \fn bool QDBusUtil::isValidUniqueConnectionName(const QStringRef &connName)
+ \fn bool isValidUniqueConnectionName(const QStringRef &connName)
Returns \c true if \a connName is a valid unique connection name.
Unique connection names start with a colon (":") and are followed by a list of dot-separated
@@ -414,13 +414,13 @@ namespace QDBusUtil
}
/*!
- \fn bool QDBusUtil::isValidUniqueConnectionName(const QString &connName)
+ \fn bool isValidUniqueConnectionName(const QString &connName)
\overload
*/
/*!
- \fn bool QDBusUtil::isValidBusName(const QString &busName)
+ \fn bool isValidBusName(const QString &busName)
Returns \c true if \a busName is a valid bus name.
A valid bus name is either a valid unique connection name or follows the rules:
@@ -462,7 +462,7 @@ namespace QDBusUtil
}
/*!
- \fn bool QDBusUtil::isValidMemberName(const QStringRef &memberName)
+ \fn bool isValidMemberName(const QStringRef &memberName)
Returns \c true if \a memberName is a valid member name. A valid member name does not exceed
255 characters in length, is not empty, is composed only of ASCII letters, digits and
underscores, but does not start with a digit.
@@ -482,13 +482,13 @@ namespace QDBusUtil
}
/*!
- \fn bool QDBusUtil::isValidMemberName(const QString &memberName)
+ \fn bool isValidMemberName(const QString &memberName)
\overload
*/
/*!
- \fn bool QDBusUtil::isValidErrorName(const QString &errorName)
+ \fn bool isValidErrorName(const QString &errorName)
Returns \c true if \a errorName is a valid error name. Valid error names are valid interface
names and vice-versa, so this function is actually an alias for isValidInterfaceName.
*/
@@ -498,7 +498,7 @@ namespace QDBusUtil
}
/*!
- \fn bool QDBusUtil::isValidObjectPath(const QString &path)
+ \fn bool isValidObjectPath(const QString &path)
Returns \c true if \a path is valid object path.
Valid object paths follow the rules:
@@ -529,7 +529,7 @@ namespace QDBusUtil
}
/*!
- \fn bool QDBusUtil::isValidBasicType(int type)
+ \fn bool isValidBasicType(int type)
Returns \c true if \a c is a valid, basic D-Bus type.
*/
bool isValidBasicType(int c)
@@ -538,7 +538,7 @@ namespace QDBusUtil
}
/*!
- \fn bool QDBusUtil::isValidFixedType(int type)
+ \fn bool isValidFixedType(int type)
Returns \c true if \a c is a valid, fixed D-Bus type.
*/
bool isValidFixedType(int c)
@@ -548,7 +548,7 @@ namespace QDBusUtil
/*!
- \fn bool QDBusUtil::isValidSignature(const QString &signature)
+ \fn bool isValidSignature(const QString &signature)
Returns \c true if \a signature is a valid D-Bus type signature for one or more types.
This function returns \c true if it can all of \a signature into valid, individual types and no
characters remain in \a signature.
@@ -569,7 +569,7 @@ namespace QDBusUtil
}
/*!
- \fn bool QDBusUtil::isValidSingleSignature(const QString &signature)
+ \fn bool isValidSingleSignature(const QString &signature)
Returns \c true if \a signature is a valid D-Bus type signature for exactly one full type. This
function tries to convert the type signature into a D-Bus type and, if it succeeds and no
characters remain in the signature, it returns \c true.
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 1309f17efd..e2163b06d0 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -966,8 +966,10 @@ protected:
int m_lastColumn;
};
+#ifndef Q_CLANG_QDOC
#define QAccessibleInterface_iid "org.qt-project.Qt.QAccessibleInterface"
Q_DECLARE_INTERFACE(QAccessibleInterface, QAccessibleInterface_iid)
+#endif
Q_GUI_EXPORT const char *qAccessibleRoleString(QAccessible::Role role);
Q_GUI_EXPORT const char *qAccessibleEventString(QAccessible::Event event);
diff --git a/src/gui/accessible/qaccessibleobject.h b/src/gui/accessible/qaccessibleobject.h
index 81479c32ab..fd07d33a18 100644
--- a/src/gui/accessible/qaccessibleobject.h
+++ b/src/gui/accessible/qaccessibleobject.h
@@ -65,7 +65,7 @@ public:
QAccessibleInterface *childAt(int x, int y) const override;
protected:
- virtual ~QAccessibleObject();
+ ~QAccessibleObject();
private:
QAccessibleObjectPrivate *d;
diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp
index e91aa3d548..961ecd6cde 100644
--- a/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp
+++ b/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication_x11.cpp
@@ -49,7 +49,7 @@
****************************************************************************/
//! [0]
-QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+QGuiApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
calculateHugeMandelbrot(); // lunch time...
-QApplication::restoreOverrideCursor();
+QGuiApplication::restoreOverrideCursor();
//! [0]
diff --git a/src/gui/doc/src/richtext.qdoc b/src/gui/doc/src/richtext.qdoc
index a0f739d418..a8ba076e3d 100644
--- a/src/gui/doc/src/richtext.qdoc
+++ b/src/gui/doc/src/richtext.qdoc
@@ -1197,6 +1197,9 @@
\row \li \c text-transform
\li [ uppercase | lowercase ]
\li Select the transformation that will be performed on the text prior to displaying it.
+ \row \li \c font-kerning
+ \li [ normal | none ]
+ \li Enables or disables kerning between text characters.
\row \li \c font-variant
\li small-caps
\li Perform the smallcaps transformation on the text prior to displaying it.
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index c362d0dc3f..285cdf790a 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -1080,11 +1080,12 @@ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State
if (!d) {
QFileInfo info(fileName);
- QIconEngine *engine = iconEngineFromSuffix(fileName, info.suffix());
+ QString suffix = info.suffix();
#if QT_CONFIG(mimetype)
- if (!engine)
- engine = iconEngineFromSuffix(fileName, QMimeDatabase().mimeTypeForFile(info).preferredSuffix());
+ if (suffix.isEmpty())
+ suffix = QMimeDatabase().mimeTypeForFile(info).preferredSuffix(); // determination from contents
#endif // mimetype
+ QIconEngine *engine = iconEngineFromSuffix(fileName, suffix);
d = new QIconPrivate(engine ? engine : new QPixmapIconEngine);
}
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 9897c3aa6f..16de045cf0 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -117,7 +117,7 @@ QImageData::QImageData()
*/
QImageData * QImageData::create(const QSize &size, QImage::Format format)
{
- if (!size.isValid() || format == QImage::Format_Invalid)
+ if (size.isEmpty() || format == QImage::Format_Invalid)
return nullptr; // invalid parameter(s)
int width = size.width();
@@ -288,6 +288,7 @@ bool QImageData::checkForAlphaPixels() const
case QImage::Format_BGR30:
case QImage::Format_RGB30:
case QImage::Format_Grayscale8:
+ case QImage::Format_Grayscale16:
case QImage::Format_RGBX64:
break;
case QImage::Format_Invalid:
@@ -710,6 +711,7 @@ bool QImageData::checkForAlphaPixels() const
\value Format_A2RGB30_Premultiplied The image is stored using a 32-bit premultiplied ARGB format (2-10-10-10). (added in Qt 5.4)
\value Format_Alpha8 The image is stored using an 8-bit alpha only format. (added in Qt 5.5)
\value Format_Grayscale8 The image is stored using an 8-bit grayscale format. (added in Qt 5.5)
+ \value Format_Grayscale16 The image is stored using an 16-bit grayscale format. (added in Qt 5.13)
\value Format_RGBX64 The image is stored using a 64-bit halfword-ordered RGB(x) format (16-16-16-16).
This is the same as the Format_RGBX64 except alpha must always be 65535. (added in Qt 5.12)
\value Format_RGBA64 The image is stored using a 64-bit halfword-ordered RGBA format (16-16-16-16). (added in Qt 5.12)
@@ -2038,6 +2040,7 @@ static bool highColorPrecision(QImage::Format format)
case QImage::Format_RGBX64:
case QImage::Format_RGBA64:
case QImage::Format_RGBA64_Premultiplied:
+ case QImage::Format_Grayscale16:
return true;
default:
break;
@@ -2059,13 +2062,7 @@ QImage QImage::convertToFormat_helper(Format format, Qt::ImageConversionFlags fl
Image_Converter converter = qimage_converter_map[d->format][format];
if (!converter && format > QImage::Format_Indexed8 && d->format > QImage::Format_Indexed8) {
if (highColorPrecision(format) && highColorPrecision(d->format)) {
- // Convert over RGBA64_Premultiplied
- if (format == QImage::Format_RGBA64_Premultiplied)
- converter = convert_generic_to_rgb64;
- else {
- Q_ASSERT(d->format != QImage::Format_RGBA64_Premultiplied);
- return convertToFormat(Format_RGBA64_Premultiplied, flags).convertToFormat(format, flags);
- }
+ converter = convert_generic_to_rgb64;
} else
converter = convert_generic;
}
@@ -2246,6 +2243,29 @@ bool QImage::reinterpretAsFormat(Format format)
}
/*!
+ \since 5.13
+
+ Detach and convert the image to the given \a format in place.
+
+ The specified image conversion \a flags control how the image data
+ is handled during the conversion process.
+
+ \sa convertToFormat()
+*/
+
+void QImage::convertTo(Format f, Qt::ImageConversionFlags flags)
+{
+ if (!d || f == QImage::Format_Invalid)
+ return;
+
+ detach();
+ if (convertToFormat_inplace(f, flags))
+ return;
+
+ *this = convertToFormat_helper(f, flags);
+}
+
+/*!
\fn bool QImage::valid(const QPoint &pos) const
Returns \c true if \a pos is a valid coordinate pair within the
@@ -2531,6 +2551,10 @@ QColor QImage::pixelColor(int x, int y) const
case Format_RGBA64_Premultiplied:
c = reinterpret_cast<const QRgba64 *>(s)[x];
break;
+ case Format_Grayscale16: {
+ quint16 v = reinterpret_cast<const quint16 *>(s)[x];
+ return QColor(qRgba64(v, v, v, 0xffff));
+ }
default:
c = QRgba64::fromArgb32(pixel(x, y));
break;
@@ -2641,6 +2665,7 @@ bool QImage::allGray() const
case Format_Alpha8:
return false;
case Format_Grayscale8:
+ case Format_Grayscale16:
return true;
case Format_RGB32:
case Format_ARGB32:
@@ -2707,7 +2732,7 @@ bool QImage::isGrayscale() const
if (d->format == QImage::Format_Alpha8)
return false;
- if (d->format == QImage::Format_Grayscale8)
+ if (d->format == QImage::Format_Grayscale8 || d->format == QImage::Format_Grayscale16)
return true;
switch (depth()) {
@@ -3341,6 +3366,7 @@ QImage QImage::rgbSwapped_helper() const
break;
case Format_Alpha8:
case Format_Grayscale8:
+ case Format_Grayscale16:
return *this;
case Format_Mono:
case Format_MonoLSB:
@@ -3452,6 +3478,7 @@ void QImage::rgbSwapped_inplace()
break;
case Format_Alpha8:
case Format_Grayscale8:
+ case Format_Grayscale16:
return;
case Format_Mono:
case Format_MonoLSB:
@@ -5349,6 +5376,19 @@ static Q_CONSTEXPR QPixelFormat pixelformats[] = {
/*PREMULTIPLIED*/ QPixelFormat::Premultiplied,
/*INTERPRETATION*/ QPixelFormat::UnsignedShort,
/*BYTE ORDER*/ QPixelFormat::CurrentSystemEndian),
+ //QImage::Format_Grayscale16:
+ QPixelFormat(QPixelFormat::Grayscale,
+ /*GRAY*/ 16,
+ /*SECOND*/ 0,
+ /*THIRD*/ 0,
+ /*FOURTH*/ 0,
+ /*FIFTH*/ 0,
+ /*ALPHA*/ 0,
+ /*ALPHA USAGE*/ QPixelFormat::IgnoresAlpha,
+ /*ALPHA POSITION*/ QPixelFormat::AtBeginning,
+ /*PREMULTIPLIED*/ QPixelFormat::NotPremultiplied,
+ /*INTERPRETATION*/ QPixelFormat::UnsignedShort,
+ /*BYTE ORDER*/ QPixelFormat::CurrentSystemEndian),
};
Q_STATIC_ASSERT(sizeof(pixelformats) / sizeof(*pixelformats) == QImage::NImageFormats);
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 4b7a3b1ead..45f571807c 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -128,10 +128,7 @@ public:
Format_RGBX64,
Format_RGBA64,
Format_RGBA64_Premultiplied,
-#if 0
- // reserved for future use
Format_Grayscale16,
-#endif
#ifndef Q_QDOC
NImageFormats
#endif
@@ -199,6 +196,8 @@ public:
Q_REQUIRED_RESULT QImage convertToFormat(Format f, const QVector<QRgb> &colorTable, Qt::ImageConversionFlags flags = Qt::AutoColor) const;
bool reinterpretAsFormat(Format f);
+ void convertTo(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor);
+
int width() const;
int height() const;
QSize size() const;
diff --git a/src/gui/image/qimage_conversions.cpp b/src/gui/image/qimage_conversions.cpp
index 215dd33499..82ffb8af8b 100644
--- a/src/gui/image/qimage_conversions.cpp
+++ b/src/gui/image/qimage_conversions.cpp
@@ -223,18 +223,29 @@ void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversio
void convert_generic_to_rgb64(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
{
- Q_ASSERT(dest->format == QImage::Format_RGBA64_Premultiplied);
+ Q_ASSERT(dest->format > QImage::Format_Indexed8);
Q_ASSERT(src->format > QImage::Format_Indexed8);
+ QRgba64 buf[BufferSize];
+ QRgba64 *buffer = buf;
const QPixelLayout *srcLayout = &qPixelLayouts[src->format];
+ const QPixelLayout *destLayout = &qPixelLayouts[dest->format];
const uchar *srcData = src->data;
uchar *destData = dest->data;
const FetchAndConvertPixelsFunc64 fetch = srcLayout->fetchToRGBA64PM;
+ const ConvertAndStorePixelsFunc64 store = qStoreFromRGBA64PM[dest->format];
for (int y = 0; y < src->height; ++y) {
- const QRgba64 *ptr = fetch((QRgba64*)destData, srcData, 0, src->width, nullptr, nullptr);
- if (ptr != (const QRgba64*)destData) {
- memcpy(destData, ptr, dest->bytes_per_line);
+ int x = 0;
+ while (x < src->width) {
+ int l = src->width - x;
+ if (destLayout->bpp == QPixelLayout::BPP64)
+ buffer = reinterpret_cast<QRgba64 *>(destData) + x;
+ else
+ l = qMin(l, BufferSize);
+ const QRgba64 *ptr = fetch(buffer, srcData, x, l, nullptr, nullptr);
+ store(destData, ptr, x, l, nullptr, nullptr);
+ x += l;
}
srcData += src->bytes_per_line;
destData += dest->bytes_per_line;
@@ -1205,33 +1216,6 @@ static void convert_RGBA64_to_ARGB32(QImageData *dest, const QImageData *src, Qt
}
template<bool RGBA>
-static void convert_RGBA64PM_to_ARGB32(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_RGBA64_Premultiplied);
- Q_ASSERT(RGBA || dest->format == QImage::Format_ARGB32);
- Q_ASSERT(!RGBA || dest->format == QImage::Format_RGBA8888);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 3) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const QRgba64 *src_data = reinterpret_cast<const QRgba64 *>(src->data);
- uint *dest_data = reinterpret_cast<uint *>(dest->data);
-
- for (int i = 0; i < src->height; ++i) {
- const QRgba64 *end = src_data + src->width;
- while (src_data < end) {
- QRgba64 s = src_data->unpremultiplied();
- *dest_data = RGBA ? ARGB2RGBA(s.toArgb32()) : s.toArgb32();
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
-template<bool RGBA>
static void convert_ARGB32_to_RGBA64(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
{
Q_ASSERT(RGBA || src->format == QImage::Format_ARGB32);
@@ -1240,74 +1224,14 @@ static void convert_ARGB32_to_RGBA64(QImageData *dest, const QImageData *src, Qt
Q_ASSERT(src->width == dest->width);
Q_ASSERT(src->height == dest->height);
- const int src_pad = (src->bytes_per_line >> 2) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 3) - dest->width;
- const uint *src_data = reinterpret_cast<const uint *>(src->data);
- QRgba64 *dest_data = reinterpret_cast<QRgba64 *>(dest->data);
-
- for (int i = 0; i < src->height; ++i) {
- const uint *end = src_data + src->width;
- while (src_data < end) {
- if (RGBA)
- *dest_data = QRgba64::fromArgb32(RGBA2ARGB(*src_data));
- else
- *dest_data = QRgba64::fromArgb32(*src_data);
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
-template<QtPixelOrder PixelOrder>
-static void convert_RGBA64PM_to_RGB30(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_RGBA64_Premultiplied);
- Q_ASSERT(dest->format == QImage::Format_RGB30 || dest->format == QImage::Format_BGR30);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 3) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const QRgba64 *src_data = reinterpret_cast<const QRgba64 *>(src->data);
- uint *dest_data = reinterpret_cast<uint *>(dest->data);
-
- for (int i = 0; i < src->height; ++i) {
- const QRgba64 *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = 0xc0000000 | qConvertRgb64ToRgb30<PixelOrder>(src_data->unpremultiplied());
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
- }
-}
-
-template<QtPixelOrder PixelOrder>
-static void convert_RGBA64PM_to_A2RGB30(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
-{
- Q_ASSERT(src->format == QImage::Format_RGBA64_Premultiplied);
- Q_ASSERT(dest->format == QImage::Format_A2RGB30_Premultiplied
- || dest->format == QImage::Format_A2BGR30_Premultiplied);
- Q_ASSERT(src->width == dest->width);
- Q_ASSERT(src->height == dest->height);
-
- const int src_pad = (src->bytes_per_line >> 3) - src->width;
- const int dest_pad = (dest->bytes_per_line >> 2) - dest->width;
- const QRgba64 *src_data = reinterpret_cast<const QRgba64 *>(src->data);
- uint *dest_data = reinterpret_cast<uint *>(dest->data);
+ const uchar *src_data = src->data;
+ uchar *dest_data = dest->data;
+ const FetchAndConvertPixelsFunc64 fetch = qPixelLayouts[src->format + 1].fetchToRGBA64PM;
for (int i = 0; i < src->height; ++i) {
- const QRgba64 *end = src_data + src->width;
- while (src_data < end) {
- *dest_data = qConvertRgb64ToRgb30<PixelOrder>(*src_data);
- ++src_data;
- ++dest_data;
- }
- src_data += src_pad;
- dest_data += dest_pad;
+ fetch(reinterpret_cast<QRgba64 *>(dest_data), src_data, 0, src->width, nullptr, nullptr);
+ src_data += src->bytes_per_line;;
+ dest_data += dest->bytes_per_line;
}
}
@@ -1447,6 +1371,56 @@ static bool convert_RGBA64PM_to_RGBA64_inplace(QImageData *data, Qt::ImageConver
return true;
}
+static void convert_gray16_to_RGBA64(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(src->format == QImage::Format_Grayscale16);
+ Q_ASSERT(dest->format == QImage::Format_RGBA64 || dest->format == QImage::Format_RGBX64 ||
+ dest->format == QImage::Format_RGBA64_Premultiplied);
+ Q_ASSERT(src->width == dest->width);
+ Q_ASSERT(src->height == dest->height);
+
+ const qsizetype sbpl = src->bytes_per_line;
+ const qsizetype dbpl = dest->bytes_per_line;
+ const uchar *src_data = src->data;
+ uchar *dest_data = dest->data;
+
+ for (int i = 0; i < src->height; ++i) {
+ const quint16 *src_line = reinterpret_cast<const quint16 *>(src_data);
+ QRgba64 *dest_line = reinterpret_cast<QRgba64 *>(dest_data);
+ for (int j = 0; j < src->width; ++j) {
+ quint16 s = src_line[j];
+ dest_line[j] = qRgba64(s, s, s, 0xFFFF);
+ }
+ src_data += sbpl;
+ dest_data += dbpl;
+ }
+}
+
+static void convert_RGBA64_to_gray16(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(dest->format == QImage::Format_Grayscale16);
+ Q_ASSERT(src->format == QImage::Format_RGBX64 ||
+ src->format == QImage::Format_RGBA64_Premultiplied);
+ Q_ASSERT(src->width == dest->width);
+ Q_ASSERT(src->height == dest->height);
+
+ const qsizetype sbpl = src->bytes_per_line;
+ const qsizetype dbpl = dest->bytes_per_line;
+ const uchar *src_data = src->data;
+ uchar *dest_data = dest->data;
+
+ for (int i = 0; i < src->height; ++i) {
+ const QRgba64 *src_line = reinterpret_cast<const QRgba64 *>(src_data);
+ quint16 *dest_line = reinterpret_cast<quint16 *>(dest_data);
+ for (int j = 0; j < src->width; ++j) {
+ QRgba64 s = src_line[j].unpremultiplied();
+ dest_line[j] = qGray(s.red(), s.green(), s.blue());
+ }
+ src_data += sbpl;
+ dest_data += dbpl;
+ }
+}
+
static QVector<QRgb> fix_color_table(const QVector<QRgb> &ctbl, QImage::Format format)
{
QVector<QRgb> colorTable = ctbl;
@@ -2291,7 +2265,7 @@ static bool convert_Grayscale8_to_Indexed8_inplace(QImageData *data, Qt::ImageCo
Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormats] =
{
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
},
{
0,
@@ -2312,7 +2286,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_Mono
{
@@ -2334,7 +2308,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_MonoLSB
{
@@ -2359,7 +2333,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0, 0, 0, 0, 0,
convert_Indexed8_to_Alpha8,
convert_Indexed8_to_Grayscale8,
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_Indexed8
{
@@ -2387,7 +2361,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
convert_RGB_to_RGB30<PixelOrderRGB, false>,
0,
0, 0,
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_RGB32
{
@@ -2417,7 +2391,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0, 0,
0,
convert_ARGB32_to_RGBA64<false>,
- 0
+ 0, 0
}, // Format_ARGB32
{
@@ -2442,7 +2416,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
convert_ARGB_to_RGBA,
0, 0, 0, 0,
0, 0,
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_ARGB32_Premultiplied
{
@@ -2464,7 +2438,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB16
{
@@ -2486,7 +2460,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB8565_Premultiplied
{
@@ -2508,7 +2482,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB666
{
@@ -2530,7 +2504,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB6666_Premultiplied
{
@@ -2552,7 +2526,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB555
{
@@ -2574,7 +2548,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB8555_Premultiplied
{
@@ -2597,7 +2571,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
convert_RGB888_to_RGB<true>,
convert_RGB888_to_RGB<true>,
convert_RGB888_to_RGB<true>,
- 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB888
{
@@ -2619,7 +2593,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB444
{
@@ -2640,7 +2614,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB4444_Premultiplied
{
0,
@@ -2667,7 +2641,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
convert_RGB_to_RGB30<PixelOrderRGB, true>,
0,
0, 0,
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_RGBX8888
{
0,
@@ -2696,7 +2670,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0, 0,
0,
convert_ARGB32_to_RGBA64<true>,
- 0
+ 0, 0
}, // Format_RGBA8888
{
@@ -2718,7 +2692,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGBA8888_Premultiplied
{
@@ -2746,7 +2720,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
convert_BGR30_to_RGB30,
convert_BGR30_to_RGB30,
0, 0,
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_BGR30
{
0,
@@ -2773,8 +2747,8 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
convert_A2RGB30_PM_to_RGB30<true>,
convert_BGR30_to_RGB30,
0, 0,
- 0, 0, 0
- }, // Format_BGR30A2_Premultiplied
+ 0, 0, 0, 0
+ }, // Format_A2BGR30_Premultiplied
{
0,
0,
@@ -2799,7 +2773,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
convert_BGR30_to_RGB30,
0,
convert_passthrough,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0
}, // Format_RGB30
{
0,
@@ -2826,8 +2800,8 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
convert_A2RGB30_PM_to_RGB30<false>,
0,
0, 0,
- 0, 0, 0
- }, // Format_RGB30A2_Premultiplied
+ 0, 0, 0, 0
+ }, // Format_A2RGB30_Premultiplied
{
0,
0,
@@ -2846,7 +2820,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_Alpha8
{
0,
@@ -2872,7 +2846,8 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, // self
convert_passthrough,
- convert_passthrough
+ convert_passthrough,
+ convert_RGBA64_to_gray16
}, // Format_RGBX64
{
0,
@@ -2898,7 +2873,8 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0, 0,
convert_RGBA64_to_RGBx64,
0, // self
- convert_RGBA64_to_RGBA64PM
+ convert_RGBA64_to_RGBA64PM,
+ 0
}, // Format_RGBA64
{
0,
@@ -2906,7 +2882,6 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- convert_RGBA64PM_to_ARGB32<false>,
0,
0,
0,
@@ -2918,29 +2893,58 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat
0,
0,
0,
- convert_RGBA64PM_to_ARGB32<true>,
0,
- convert_RGBA64PM_to_RGB30<PixelOrderBGR>,
- convert_RGBA64PM_to_A2RGB30<PixelOrderBGR>,
- convert_RGBA64PM_to_RGB30<PixelOrderRGB>,
- convert_RGBA64PM_to_A2RGB30<PixelOrderRGB>,
+ 0,
+ 0,
+ 0, 0, 0, 0,
0, 0,
convert_RGBA64PM_to_RGBA64<true>,
convert_RGBA64PM_to_RGBA64<false>,
- 0 // self
- } // Format_RGBA64_Premultiplied
+ 0, // self
+ convert_RGBA64_to_gray16
+ }, // Format_RGBA64_Premultiplied
+ {
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0, 0,
+ convert_gray16_to_RGBA64,
+ convert_gray16_to_RGBA64,
+ convert_gray16_to_RGBA64,
+ 0 // self
+ }, // Format_Grayscale16
};
InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QImage::NImageFormats] =
{
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
},
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_Mono
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_MonoLSB
{
0,
@@ -2964,7 +2968,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0, 0, 0, 0, 0,
convert_Indexed8_to_Alpha8_inplace,
convert_Indexed8_to_Grayscale8_inplace,
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_Indexed8
{
0,
@@ -2991,7 +2995,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
convert_RGB_to_RGB30_inplace<PixelOrderRGB, false>,
0,
0, 0,
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_RGB32
{
0,
@@ -3018,7 +3022,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
convert_RGB_to_RGB30_inplace<PixelOrderRGB, false>,
0,
0, 0,
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_ARGB32
{
0,
@@ -3042,34 +3046,34 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
convert_ARGB_to_RGBA_inplace<QImage::Format_RGBA8888_Premultiplied>,
0, 0, 0, 0,
0, 0,
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_ARGB32_Premultiplied
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB16
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB8565_Premultiplied
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB666
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB6666_Premultiplied
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB555
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB8555_Premultiplied
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB888
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGB444
{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_ARGB4444_Premultiplied
{
0,
@@ -3096,7 +3100,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
convert_RGB_to_RGB30_inplace<PixelOrderRGB, true>,
0,
0, 0,
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_RGBX8888
{
0,
@@ -3123,7 +3127,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
convert_RGB_to_RGB30_inplace<PixelOrderRGB, true>,
0,
0, 0,
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_RGBA8888
{
0,
@@ -3145,7 +3149,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0,
0,
0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}, // Format_RGBA8888_Premultiplied
{
0,
@@ -3172,7 +3176,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
convert_BGR30_to_RGB30_inplace,
convert_BGR30_to_A2RGB30_inplace,
0, 0,
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_BGR30
{
0,
@@ -3198,8 +3202,8 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0, // self
convert_A2RGB30_PM_to_RGB30_inplace<true>,
convert_BGR30_to_RGB30_inplace,
- 0, 0, 0, 0, 0
- }, // Format_BGR30A2_Premultiplied
+ 0, 0, 0, 0, 0, 0
+ }, // Format_A2BGR30_Premultiplied
{
0,
0,
@@ -3224,7 +3228,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
convert_BGR30_to_A2RGB30_inplace,
0, // self
convert_passthrough_inplace<QImage::Format_A2RGB30_Premultiplied>,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0
}, // Format_RGB30
{
0,
@@ -3251,8 +3255,8 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
convert_A2RGB30_PM_to_RGB30_inplace<false>,
0, // self
0, 0,
- 0, 0, 0
- }, // Format_RGB30A2_Premultiplied
+ 0, 0, 0, 0
+ }, // Format_A2RGB30_Premultiplied
{
0,
0,
@@ -3276,7 +3280,7 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0, 0, 0, 0,
0, // self
0,
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_Alpha8
{
0,
@@ -3301,26 +3305,32 @@ InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QIma
0, 0, 0, 0,
0,
0, // self
- 0, 0, 0
+ 0, 0, 0, 0
}, // Format_Grayscale8
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, // self
convert_passthrough_inplace<QImage::Format_RGBA64>,
convert_passthrough_inplace<QImage::Format_RGBA64_Premultiplied>,
+ 0
}, // Format_RGBX64
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
convert_RGBA64_to_RGBx64_inplace,
0, // self
- convert_RGBA64_to_RGBA64PM_inplace
+ convert_RGBA64_to_RGBA64PM_inplace,
+ 0
}, // Format_RGBA64
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
convert_RGBA64PM_to_RGBA64_inplace<true>,
convert_RGBA64PM_to_RGBA64_inplace<false>,
- 0 // self
- } // Format_RGBA64_Premultiplied
+ 0, // self
+ 0
+ }, // Format_RGBA64_Premultiplied
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }, // Format_Grayscale16
};
static void qInitImageConversions()
diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h
index e3a6c53833..de12a313e8 100644
--- a/src/gui/image/qimage_p.h
+++ b/src/gui/image/qimage_p.h
@@ -189,6 +189,7 @@ inline int qt_depthForFormat(QImage::Format format)
case QImage::Format_RGB16:
case QImage::Format_RGB444:
case QImage::Format_ARGB4444_Premultiplied:
+ case QImage::Format_Grayscale16:
depth = 16;
break;
case QImage::Format_RGB666:
diff --git a/src/gui/image/qimageiohandler.h b/src/gui/image/qimageiohandler.h
index 35984dd6a5..990df96534 100644
--- a/src/gui/image/qimageiohandler.h
+++ b/src/gui/image/qimageiohandler.h
@@ -141,7 +141,7 @@ class Q_GUI_EXPORT QImageIOPlugin : public QObject
Q_OBJECT
public:
explicit QImageIOPlugin(QObject *parent = nullptr);
- virtual ~QImageIOPlugin();
+ ~QImageIOPlugin();
enum Capability {
CanRead = 0x1,
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 0fb1d808e5..3f1297c81a 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -526,7 +526,7 @@ bool QImageReaderPrivate::initHandler()
// Try the most probable extension first
int currentFormatIndex = extensions.indexOf(format.toLower());
if (currentFormatIndex > 0)
- extensions.swap(0, currentFormatIndex);
+ extensions.swapItemsAt(0, currentFormatIndex);
}
int currentExtension = 0;
diff --git a/src/gui/image/qpaintengine_pic_p.h b/src/gui/image/qpaintengine_pic_p.h
index c3044796ad..c9e4b43197 100644
--- a/src/gui/image/qpaintengine_pic_p.h
+++ b/src/gui/image/qpaintengine_pic_p.h
@@ -103,7 +103,7 @@ protected:
QPicturePaintEngine(QPaintEnginePrivate &dptr);
private:
- Q_DISABLE_COPY(QPicturePaintEngine)
+ Q_DISABLE_COPY_MOVE(QPicturePaintEngine)
void writeCmdLength(int pos, const QRectF &r, bool corr);
};
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 4b2334ae52..918e200549 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1356,12 +1356,6 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
The cacheKey() function returns a number that uniquely
identifies the contents of the QPixmap object.
- The x11Info() function returns information about the configuration
- of the X display used by the screen to which the pixmap currently
- belongs. The x11PictureHandle() function returns the X11 Picture
- handle of the pixmap for XRender support. Note that the two latter
- functions are only available on x11.
-
\endtable
\section1 Pixmap Conversion
@@ -1392,9 +1386,6 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
function returns the actual matrix used for transforming the
pixmap.
- \note When using the native X11 graphics system, the pixmap
- becomes invalid when the QApplication instance is destroyed.
-
\sa QBitmap, QImage, QImageReader, QImageWriter
*/
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index 13c1c29d5b..2732bbd197 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -203,6 +203,9 @@ void QRasterPlatformPixmap::fill(const QColor &color)
pixel = qAlpha(color.rgba());
} else if (image.format() == QImage::Format_Grayscale8) {
pixel = qGray(color.rgba());
+ } else if (image.format() == QImage::Format_Grayscale16) {
+ QRgba64 c = color.rgba64();
+ pixel = qGray(c.red(), c.green(), c.blue());
} else
{
pixel = 0;
diff --git a/src/gui/image/qpixmap_win.cpp b/src/gui/image/qpixmap_win.cpp
index b5f8d43041..3a2db74098 100644
--- a/src/gui/image/qpixmap_win.cpp
+++ b/src/gui/image/qpixmap_win.cpp
@@ -210,7 +210,7 @@ static QImage copyImageData(const BITMAPINFOHEADER &header, const RGBQUAD *color
class DisplayHdc
{
- Q_DISABLE_COPY(DisplayHdc)
+ Q_DISABLE_COPY_MOVE(DisplayHdc)
public:
DisplayHdc() : m_displayDc(GetDC(nullptr)) {}
~DisplayHdc() { ReleaseDC(nullptr, m_displayDc); }
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 8ae03d5d38..3655c39326 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -266,6 +266,18 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, QSize scal
else if (g == 1)
image.setColor(0, qRgba(255, 255, 255, 0));
}
+ } else if (bit_depth == 16
+ && png_get_channels(png_ptr, info_ptr) == 1
+ && !png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
+ if (image.size() != QSize(width, height) || image.format() != QImage::Format_Grayscale16) {
+ image = QImage(width, height, QImage::Format_Grayscale16);
+ if (image.isNull())
+ return;
+ }
+
+ png_read_update_info(png_ptr, info_ptr);
+ if (QSysInfo::ByteOrder == QSysInfo::LittleEndian)
+ png_set_swap(png_ptr);
} else if (bit_depth == 16) {
bool hasMask = png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS);
if (!hasMask)
@@ -687,7 +699,7 @@ QImage::Format QPngHandlerPrivate::readImageFormat()
if (bit_depth == 1 && png_get_channels(png_ptr, info_ptr) == 1) {
format = QImage::Format_Mono;
} else if (bit_depth == 16) {
- format = png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ? QImage::Format_RGBA64 : QImage::Format_RGBX64;
+ format = png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ? QImage::Format_RGBA64 : QImage::Format_Grayscale16;
} else if (bit_depth == 8 && !png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
format = QImage::Format_Grayscale8;
} else {
@@ -861,7 +873,8 @@ bool QPNGImageWriter::writeImage(const QImage& image, volatile int compression_i
else
color_type = PNG_COLOR_TYPE_PALETTE;
}
- else if (image.format() == QImage::Format_Grayscale8)
+ else if (image.format() == QImage::Format_Grayscale8
+ || image.format() == QImage::Format_Grayscale16)
color_type = PNG_COLOR_TYPE_GRAY;
else if (image.hasAlphaChannel())
color_type = PNG_COLOR_TYPE_RGB_ALPHA;
@@ -877,6 +890,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, volatile int compression_i
case QImage::Format_RGBX64:
case QImage::Format_RGBA64:
case QImage::Format_RGBA64_Premultiplied:
+ case QImage::Format_Grayscale16:
bpc = 16;
break;
default:
@@ -988,6 +1002,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, volatile int compression_i
case QImage::Format_RGBX64:
case QImage::Format_RGBA64:
case QImage::Format_RGBA64_Premultiplied:
+ case QImage::Format_Grayscale16:
png_set_swap(png_ptr);
break;
default:
@@ -1018,6 +1033,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, volatile int compression_i
case QImage::Format_MonoLSB:
case QImage::Format_Indexed8:
case QImage::Format_Grayscale8:
+ case QImage::Format_Grayscale16:
case QImage::Format_RGB32:
case QImage::Format_ARGB32:
case QImage::Format_RGB888:
diff --git a/src/gui/image/qppmhandler.cpp b/src/gui/image/qppmhandler.cpp
index 53e3fa293d..bfde0aa76e 100644
--- a/src/gui/image/qppmhandler.cpp
+++ b/src/gui/image/qppmhandler.cpp
@@ -68,13 +68,19 @@ static int read_pbm_int(QIODevice *d)
char c;
int val = -1;
bool digit;
+ bool hasOverflow = false;
for (;;) {
if (!d->getChar(&c)) // end of file
break;
digit = isdigit((uchar) c);
if (val != -1) {
if (digit) {
- val = 10*val + c - '0';
+ const int cValue = c - '0';
+ if (val <= (INT_MAX - cValue) / 10) {
+ val = 10*val + cValue;
+ } else {
+ hasOverflow = true;
+ }
continue;
} else {
if (c == '#') // comment
@@ -91,7 +97,7 @@ static int read_pbm_int(QIODevice *d)
else
break;
}
- return val;
+ return hasOverflow ? -1 : val;
}
static bool read_pbm_header(QIODevice *device, char& type, int& w, int& h, int& mcc)
@@ -123,7 +129,7 @@ static bool read_pbm_header(QIODevice *device, char& type, int& w, int& h, int&
static inline QRgb scale_pbm_color(quint16 mx, quint16 rv, quint16 gv, quint16 bv)
{
- return QRgba64::fromRgba64((rv * 0xffff) / mx, (gv * 0xffff) / mx, (bv * 0xffff) / mx, 0xffff).toArgb32();
+ return QRgba64::fromRgba64((rv * 0xffffu) / mx, (gv * 0xffffu) / mx, (bv * 0xffffu) / mx, 0xffff).toArgb32();
}
static bool read_pbm_body(QIODevice *device, char type, int w, int h, int mcc, QImage *outImage)
@@ -252,7 +258,7 @@ static bool read_pbm_body(QIODevice *device, char type, int w, int h, int mcc, Q
}
} else {
while (n--) {
- *p++ = read_pbm_int(device) * 255 / mcc;
+ *p++ = (read_pbm_int(device) & 0xffff) * 255 / mcc;
}
}
} else { // 32 bits
diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp
index 7afad95bd9..97cbf5f9d3 100644
--- a/src/gui/itemmodels/qstandarditemmodel.cpp
+++ b/src/gui/itemmodels/qstandarditemmodel.cpp
@@ -3010,6 +3010,11 @@ bool QStandardItemModel::setData(const QModelIndex &index, const QVariant &value
return true;
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+/*!
+ \reimp
+ */
+#else
/*!
\since 5.12
Removes the data stored in all the roles for the given \a index.
@@ -3018,6 +3023,7 @@ bool QStandardItemModel::setData(const QModelIndex &index, const QVariant &value
\sa setData(), data()
*/
+#endif
bool QStandardItemModel::clearItemData(const QModelIndex &index)
{
if (!checkIndex(index, CheckIndexOption::IndexIsValid))
diff --git a/src/gui/itemmodels/qstandarditemmodel_p.h b/src/gui/itemmodels/qstandarditemmodel_p.h
index 00e83f7b08..23d2938bc4 100644
--- a/src/gui/itemmodels/qstandarditemmodel_p.h
+++ b/src/gui/itemmodels/qstandarditemmodel_p.h
@@ -207,7 +207,7 @@ class QStandardItemModelPrivate : public QAbstractItemModelPrivate
public:
QStandardItemModelPrivate();
- virtual ~QStandardItemModelPrivate();
+ ~QStandardItemModelPrivate();
void init();
diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h
index 5f6db07987..8f8eb03f87 100644
--- a/src/gui/kernel/qdnd_p.h
+++ b/src/gui/kernel/qdnd_p.h
@@ -110,7 +110,7 @@ private:
QDrag *m_object;
static QDragManager *m_instance;
- Q_DISABLE_COPY(QDragManager)
+ Q_DISABLE_COPY_MOVE(QDragManager)
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qdrag.cpp b/src/gui/kernel/qdrag.cpp
index bb0e490aa0..dcd0d13d5c 100644
--- a/src/gui/kernel/qdrag.cpp
+++ b/src/gui/kernel/qdrag.cpp
@@ -284,6 +284,7 @@ Qt::DropAction QDrag::exec(Qt::DropActions supportedActions, Qt::DropAction defa
return d->executed_action;
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
@@ -311,6 +312,7 @@ Qt::DropAction QDrag::start(Qt::DropActions request)
d->executed_action = QDragManager::self()->drag(this);
return d->executed_action;
}
+#endif
/*!
Sets the drag \a cursor for the \a action. This allows you
diff --git a/src/gui/kernel/qdrag.h b/src/gui/kernel/qdrag.h
index 27b9c2c88f..7acd5088bd 100644
--- a/src/gui/kernel/qdrag.h
+++ b/src/gui/kernel/qdrag.h
@@ -74,7 +74,10 @@ public:
QObject *source() const;
QObject *target() const;
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use QDrag::exec() instead")
Qt::DropAction start(Qt::DropActions supportedActions = Qt::CopyAction);
+#endif
Qt::DropAction exec(Qt::DropActions supportedActions = Qt::MoveAction);
Qt::DropAction exec(Qt::DropActions supportedActions, Qt::DropAction defaultAction);
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index fd01f8bb7b..4a0febc615 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -208,6 +208,8 @@ bool QGuiApplicationPrivate::obey_desktop_settings = true;
QInputDeviceManager *QGuiApplicationPrivate::m_inputDeviceManager = 0;
+qreal QGuiApplicationPrivate::m_maxDevicePixelRatio = 0.0;
+
static qreal fontSmoothingGamma = 1.7;
extern void qRegisterGuiVariant();
@@ -1093,17 +1095,19 @@ QScreen *QGuiApplication::screenAt(const QPoint &point)
*/
qreal QGuiApplication::devicePixelRatio() const
{
- // Cache topDevicePixelRatio, iterate through the screen list once only.
- static qreal topDevicePixelRatio = 0.0;
- if (!qFuzzyIsNull(topDevicePixelRatio)) {
- return topDevicePixelRatio;
- }
+ if (!qFuzzyIsNull(QGuiApplicationPrivate::m_maxDevicePixelRatio))
+ return QGuiApplicationPrivate::m_maxDevicePixelRatio;
- topDevicePixelRatio = 1.0; // make sure we never return 0.
+ QGuiApplicationPrivate::m_maxDevicePixelRatio = 1.0; // make sure we never return 0.
for (QScreen *screen : qAsConst(QGuiApplicationPrivate::screen_list))
- topDevicePixelRatio = qMax(topDevicePixelRatio, screen->devicePixelRatio());
+ QGuiApplicationPrivate::m_maxDevicePixelRatio = qMax(QGuiApplicationPrivate::m_maxDevicePixelRatio, screen->devicePixelRatio());
- return topDevicePixelRatio;
+ return QGuiApplicationPrivate::m_maxDevicePixelRatio;
+}
+
+void QGuiApplicationPrivate::resetCachedDevicePixelRatio()
+{
+ m_maxDevicePixelRatio = 0.0;
}
/*!
@@ -1168,7 +1172,7 @@ static void init_platform(const QString &pluginNamesWithArguments, const QString
QStringList plugins = pluginNamesWithArguments.split(QLatin1Char(';'));
QStringList platformArguments;
QStringList availablePlugins = QPlatformIntegrationFactory::keys(platformPluginPath);
- for (auto pluginArgument : plugins) {
+ for (const auto &pluginArgument : plugins) {
// Split into platform name and arguments
QStringList arguments = pluginArgument.split(QLatin1Char(':'));
const QString name = arguments.takeFirst().toLower();
@@ -3000,6 +3004,8 @@ void QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfaceP
for (QScreen* sibling : siblings)
emit sibling->virtualGeometryChanged(sibling->virtualGeometry());
}
+
+ resetCachedDevicePixelRatio();
}
void QGuiApplicationPrivate::processScreenLogicalDotsPerInchChange(QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent *e)
@@ -3015,6 +3021,8 @@ void QGuiApplicationPrivate::processScreenLogicalDotsPerInchChange(QWindowSystem
s->d_func()->logicalDpi = QDpi(e->dpiX, e->dpiY);
emit s->logicalDotsPerInchChanged(s->logicalDotsPerInch());
+
+ resetCachedDevicePixelRatio();
}
void QGuiApplicationPrivate::processScreenRefreshRateChange(QWindowSystemInterfacePrivate::ScreenRefreshRateEvent *e)
diff --git a/src/gui/kernel/qguiapplication.h b/src/gui/kernel/qguiapplication.h
index 02dffef0fe..5ea72fa0f6 100644
--- a/src/gui/kernel/qguiapplication.h
+++ b/src/gui/kernel/qguiapplication.h
@@ -86,7 +86,7 @@ public:
#else
QGuiApplication(int &argc, char **argv, int = ApplicationFlags);
#endif
- virtual ~QGuiApplication();
+ ~QGuiApplication();
static void setApplicationDisplayName(const QString &name);
static QString applicationDisplayName();
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index 042a36c31f..63646dcd50 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -311,6 +311,8 @@ public:
static void setApplicationState(Qt::ApplicationState state, bool forcePropagate = false);
+ static void resetCachedDevicePixelRatio();
+
protected:
virtual void notifyThemeChanged();
virtual void sendApplicationPaletteChange(bool toAllWidgets = false, const char *className = nullptr);
@@ -331,6 +333,10 @@ private:
bool ownGlobalShareContext;
static QInputDeviceManager *m_inputDeviceManager;
+
+ // Cache the maximum device pixel ratio, to iterate through the screen list
+ // only the first time it's required, or when devices are added or removed.
+ static qreal m_maxDevicePixelRatio;
};
Q_GUI_EXPORT uint qHash(const QGuiApplicationPrivate::ActiveTouchPointsKey &k);
diff --git a/src/gui/kernel/qkeymapper_p.h b/src/gui/kernel/qkeymapper_p.h
index aeec7b7414..8364557020 100644
--- a/src/gui/kernel/qkeymapper_p.h
+++ b/src/gui/kernel/qkeymapper_p.h
@@ -76,7 +76,7 @@ public:
private:
friend QKeyMapperPrivate *qt_keymapper_private();
Q_DECLARE_PRIVATE(QKeyMapper)
- Q_DISABLE_COPY(QKeyMapper)
+ Q_DISABLE_COPY_MOVE(QKeyMapper)
};
struct KeyboardLayoutItem;
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
index a428da8ca4..74bf6e6b47 100644
--- a/src/gui/kernel/qkeysequence.cpp
+++ b/src/gui/kernel/qkeysequence.cpp
@@ -1221,10 +1221,12 @@ QString QKeySequence::encodeString(int key)
static inline void addKey(QString &str, const QString &theKey, QKeySequence::SequenceFormat format)
{
if (!str.isEmpty()) {
- if (format == QKeySequence::NativeText)
+ if (format == QKeySequence::NativeText) {
+ //: Key separator in shortcut string
str += QCoreApplication::translate("QShortcut", "+");
- else
+ } else {
str += QLatin1Char('+');
+ }
}
str += theKey;
diff --git a/src/gui/kernel/qoffscreensurface.h b/src/gui/kernel/qoffscreensurface.h
index 9d4839cb25..1b9e7c00ca 100644
--- a/src/gui/kernel/qoffscreensurface.h
+++ b/src/gui/kernel/qoffscreensurface.h
@@ -60,7 +60,7 @@ public:
// ### Qt 6: merge overloads
explicit QOffscreenSurface(QScreen *screen, QObject *parent);
explicit QOffscreenSurface(QScreen *screen = nullptr);
- virtual ~QOffscreenSurface();
+ ~QOffscreenSurface();
SurfaceType surfaceType() const override;
diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h
index 4f2f951d61..2849d0c58e 100644
--- a/src/gui/kernel/qopenglcontext_p.h
+++ b/src/gui/kernel/qopenglcontext_p.h
@@ -97,7 +97,7 @@ private:
friend class QOpenGLContextGroupPrivate;
friend class QOpenGLMultiGroupSharedResource;
- Q_DISABLE_COPY(QOpenGLSharedResource)
+ Q_DISABLE_COPY_MOVE(QOpenGLSharedResource)
};
class Q_GUI_EXPORT QOpenGLSharedResourceGuard : public QOpenGLSharedResource
@@ -219,7 +219,7 @@ public:
requestedFormat = QSurfaceFormat::defaultFormat();
}
- virtual ~QOpenGLContextPrivate()
+ ~QOpenGLContextPrivate()
{
//do not delete the QOpenGLContext handle here as it is deleted in
//QWidgetPrivate::deleteTLSysExtra()
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index 9ccfb9b819..b4383c5bfc 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -941,7 +941,8 @@ qint64 QPalette::cacheKey() const
}
/*!
- Returns a new QPalette that has attributes copied from \a other.
+ Returns a new QPalette that is a union of this instance and \a other.
+ Color roles set in this instance take precedence.
*/
QPalette QPalette::resolve(const QPalette &other) const
{
@@ -959,6 +960,7 @@ QPalette QPalette::resolve(const QPalette &other) const
if (!(data.resolve_mask & (1<<role)))
for(int grp = 0; grp < (int)NColorGroups; grp++)
palette.d->br[grp][role] = other.d->br[grp][role];
+ palette.data.resolve_mask |= other.data.resolve_mask;
return palette;
}
@@ -981,7 +983,7 @@ QPalette QPalette::resolve(const QPalette &other) const
#ifndef QT_NO_DATASTREAM
static const int NumOldRoles = 7;
-static const int oldRoles[7] = { QPalette::Foreground, QPalette::Background, QPalette::Light,
+static const int oldRoles[7] = { QPalette::WindowText, QPalette::Window, QPalette::Light,
QPalette::Dark, QPalette::Mid, QPalette::Text, QPalette::Base };
/*!
diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h
index 071eddbc4d..e931e01480 100644
--- a/src/gui/kernel/qpalette.h
+++ b/src/gui/kernel/qpalette.h
@@ -98,7 +98,10 @@ public:
ToolTipBase, ToolTipText,
PlaceholderText,
NColorRoles = PlaceholderText + 1,
- Foreground = WindowText, Background = Window
+#if QT_DEPRECATED_SINCE(5, 13)
+ Foreground Q_DECL_ENUMERATOR_DEPRECATED_X("Use QPalette::WindowText instead") = WindowText,
+ Background Q_DECL_ENUMERATOR_DEPRECATED_X("Use QPalette::Window instead") = Window
+#endif
};
Q_ENUM(ColorRole)
@@ -121,7 +124,6 @@ public:
inline const QColor &color(ColorRole cr) const { return color(Current, cr); }
inline const QBrush &brush(ColorRole cr) const { return brush(Current, cr); }
- inline const QBrush &foreground() const { return brush(WindowText); }
inline const QBrush &windowText() const { return brush(WindowText); }
inline const QBrush &button() const { return brush(Button); }
inline const QBrush &light() const { return brush(Light); }
@@ -132,7 +134,6 @@ public:
inline const QBrush &alternateBase() const { return brush(AlternateBase); }
inline const QBrush &toolTipBase() const { return brush(ToolTipBase); }
inline const QBrush &toolTipText() const { return brush(ToolTipText); }
- inline const QBrush &background() const { return brush(Window); }
inline const QBrush &window() const { return brush(Window); }
inline const QBrush &midlight() const { return brush(Midlight); }
inline const QBrush &brightText() const { return brush(BrightText); }
@@ -143,6 +144,12 @@ public:
inline const QBrush &link() const { return brush(Link); }
inline const QBrush &linkVisited() const { return brush(LinkVisited); }
inline const QBrush &placeholderText() const { return brush(PlaceholderText); }
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use QPalette::windowText() instead")
+ inline const QBrush &foreground() const { return windowText(); }
+ QT_DEPRECATED_X("Use QPalette::window() instead")
+ inline const QBrush &background() const { return window(); }
+#endif
bool operator==(const QPalette &p) const;
inline bool operator!=(const QPalette &p) const { return !(operator==(p)); }
diff --git a/src/gui/kernel/qplatformclipboard.h b/src/gui/kernel/qplatformclipboard.h
index 60733b0a9f..3220201720 100644
--- a/src/gui/kernel/qplatformclipboard.h
+++ b/src/gui/kernel/qplatformclipboard.h
@@ -61,6 +61,9 @@ QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QPlatformClipboard
{
public:
+ Q_DISABLE_COPY_MOVE(QPlatformClipboard)
+
+ QPlatformClipboard() = default;
virtual ~QPlatformClipboard();
virtual QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard);
diff --git a/src/gui/kernel/qplatformcursor.h b/src/gui/kernel/qplatformcursor.h
index 40e8a562f8..f36a73c861 100644
--- a/src/gui/kernel/qplatformcursor.h
+++ b/src/gui/kernel/qplatformcursor.h
@@ -78,6 +78,8 @@ private:
class Q_GUI_EXPORT QPlatformCursor : public QObject {
public:
+ Q_DISABLE_COPY_MOVE(QPlatformCursor)
+
enum Capability {
OverrideCursor = 0x1
};
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp
index 628ad06478..8b3a2ad193 100644
--- a/src/gui/kernel/qplatformdialoghelper.cpp
+++ b/src/gui/kernel/qplatformdialoghelper.cpp
@@ -63,6 +63,18 @@ QT_BEGIN_NAMESPACE
*/
+/*!
+ \enum QPlatformDialogHelper::StyleHint
+
+ This enum type specifies platform-specific style hints.
+
+ \value DialogIsQtWindow Indicates that a platform-specific dialog is implemented
+ as in-process Qt window. It allows to prevent blocking the
+ dialog by an invisible proxy Qt dialog.
+
+ \sa styleHint()
+*/
+
static const int buttonRoleLayouts[2][6][14] =
{
// Qt::Horizontal
diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h
index bfcb658172..0832e19dc3 100644
--- a/src/gui/kernel/qplatformdialoghelper.h
+++ b/src/gui/kernel/qplatformdialoghelper.h
@@ -80,6 +80,7 @@ class Q_GUI_EXPORT QPlatformDialogHelper : public QObject
Q_OBJECT
public:
enum StyleHint {
+ DialogIsQtWindow
};
enum DialogCode { Rejected, Accepted };
@@ -153,7 +154,7 @@ public:
Q_ENUM(ButtonLayout)
QPlatformDialogHelper();
- virtual ~QPlatformDialogHelper();
+ ~QPlatformDialogHelper();
virtual QVariant styleHint(StyleHint hint) const;
diff --git a/src/gui/kernel/qplatformdrag.h b/src/gui/kernel/qplatformdrag.h
index 9d4e352b4b..0c99539357 100644
--- a/src/gui/kernel/qplatformdrag.h
+++ b/src/gui/kernel/qplatformdrag.h
@@ -91,6 +91,8 @@ class Q_GUI_EXPORT QPlatformDrag
{
Q_DECLARE_PRIVATE(QPlatformDrag)
public:
+ Q_DISABLE_COPY_MOVE(QPlatformDrag)
+
QPlatformDrag();
virtual ~QPlatformDrag();
@@ -108,8 +110,6 @@ public:
private:
QPlatformDragPrivate *d_ptr;
-
- Q_DISABLE_COPY(QPlatformDrag)
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformgraphicsbuffer.h b/src/gui/kernel/qplatformgraphicsbuffer.h
index 0aeef946e6..65c24bebc9 100644
--- a/src/gui/kernel/qplatformgraphicsbuffer.h
+++ b/src/gui/kernel/qplatformgraphicsbuffer.h
@@ -78,7 +78,7 @@ public:
OriginTopLeft
};
- virtual ~QPlatformGraphicsBuffer();
+ ~QPlatformGraphicsBuffer();
AccessTypes isLocked() const { return m_lock_access; }
bool lock(AccessTypes access, const QRect &rect = QRect());
diff --git a/src/gui/kernel/qplatforminputcontext.h b/src/gui/kernel/qplatforminputcontext.h
index 26d40cd2c6..ad0e5bcf35 100644
--- a/src/gui/kernel/qplatforminputcontext.h
+++ b/src/gui/kernel/qplatforminputcontext.h
@@ -67,7 +67,7 @@ public:
};
QPlatformInputContext();
- virtual ~QPlatformInputContext();
+ ~QPlatformInputContext();
virtual bool isValid() const;
virtual bool hasCapability(Capability capability) const;
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp
index 7d1fcd4eeb..bb20a160db 100644
--- a/src/gui/kernel/qplatformintegration.cpp
+++ b/src/gui/kernel/qplatformintegration.cpp
@@ -482,6 +482,9 @@ void QPlatformIntegration::screenAdded(QPlatformScreen *ps, bool isPrimary)
} else {
QGuiApplicationPrivate::screen_list.append(screen);
}
+
+ QGuiApplicationPrivate::resetCachedDevicePixelRatio();
+
emit qGuiApp->screenAdded(screen);
if (isPrimary)
@@ -499,6 +502,8 @@ void QPlatformIntegration::removeScreen(QScreen *screen)
const bool wasPrimary = (!QGuiApplicationPrivate::screen_list.isEmpty() && QGuiApplicationPrivate::screen_list.at(0) == screen);
QGuiApplicationPrivate::screen_list.removeOne(screen);
+ QGuiApplicationPrivate::resetCachedDevicePixelRatio();
+
if (wasPrimary && qGuiApp && !QGuiApplicationPrivate::screen_list.isEmpty())
emit qGuiApp->primaryScreenChanged(QGuiApplicationPrivate::screen_list.at(0));
}
@@ -534,7 +539,7 @@ void QPlatformIntegration::setPrimaryScreen(QPlatformScreen *newPrimary)
if (idx == 0)
return;
- QGuiApplicationPrivate::screen_list.swap(0, idx);
+ QGuiApplicationPrivate::screen_list.swapItemsAt(0, idx);
emit qGuiApp->primaryScreenChanged(newPrimaryScreen);
}
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
index efb1481f6d..de5f9c1c9a 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -84,6 +84,8 @@ class QVulkanInstance;
class Q_GUI_EXPORT QPlatformIntegration
{
public:
+ Q_DISABLE_COPY_MOVE(QPlatformIntegration)
+
enum Capability {
ThreadedPixmaps = 1,
OpenGL,
@@ -199,6 +201,8 @@ public:
#endif
protected:
+ QPlatformIntegration() = default;
+
void screenAdded(QPlatformScreen *screen, bool isPrimary = false);
void destroyScreen(QPlatformScreen *screen);
void setPrimaryScreen(QPlatformScreen *newPrimary);
diff --git a/src/gui/kernel/qplatformscreen.h b/src/gui/kernel/qplatformscreen.h
index e9d64c8a29..b9ecc80320 100644
--- a/src/gui/kernel/qplatformscreen.h
+++ b/src/gui/kernel/qplatformscreen.h
@@ -80,6 +80,8 @@ class Q_GUI_EXPORT QPlatformScreen
Q_DECLARE_PRIVATE(QPlatformScreen)
public:
+ Q_DISABLE_COPY_MOVE(QPlatformScreen)
+
enum SubpixelAntialiasingType { // copied from qfontengine_p.h since we can't include private headers
Subpixel_None,
Subpixel_RGB,
@@ -164,8 +166,6 @@ protected:
QScopedPointer<QPlatformScreenPrivate> d_ptr;
private:
- Q_DISABLE_COPY(QPlatformScreen)
-
friend class QScreenPrivate;
};
diff --git a/src/gui/kernel/qplatformservices.h b/src/gui/kernel/qplatformservices.h
index 339bbfde3f..5de96cfa7d 100644
--- a/src/gui/kernel/qplatformservices.h
+++ b/src/gui/kernel/qplatformservices.h
@@ -58,6 +58,8 @@ class QUrl;
class Q_GUI_EXPORT QPlatformServices
{
public:
+ Q_DISABLE_COPY_MOVE(QPlatformServices)
+
QPlatformServices();
virtual ~QPlatformServices() { }
diff --git a/src/gui/kernel/qplatformsessionmanager.h b/src/gui/kernel/qplatformsessionmanager.h
index ca7cab389b..c6c3984816 100644
--- a/src/gui/kernel/qplatformsessionmanager.h
+++ b/src/gui/kernel/qplatformsessionmanager.h
@@ -64,6 +64,8 @@ QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QPlatformSessionManager
{
public:
+ Q_DISABLE_COPY_MOVE(QPlatformSessionManager)
+
explicit QPlatformSessionManager(const QString &id, const QString &key);
virtual ~QPlatformSessionManager();
@@ -101,8 +103,6 @@ private:
QStringList m_restartCommand;
QStringList m_discardCommand;
QSessionManager::RestartHint m_restartHint;
-
- Q_DISABLE_COPY(QPlatformSessionManager)
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformsurface.h b/src/gui/kernel/qplatformsurface.h
index 4d8854fb40..475f3ef330 100644
--- a/src/gui/kernel/qplatformsurface.h
+++ b/src/gui/kernel/qplatformsurface.h
@@ -65,6 +65,8 @@ class QDebug;
class Q_GUI_EXPORT QPlatformSurface
{
public:
+ Q_DISABLE_COPY_MOVE(QPlatformSurface)
+
virtual ~QPlatformSurface();
virtual QSurfaceFormat format() const = 0;
diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h
index 1d6049a98d..54c8c70025 100644
--- a/src/gui/kernel/qplatformtheme.h
+++ b/src/gui/kernel/qplatformtheme.h
@@ -76,6 +76,8 @@ class Q_GUI_EXPORT QPlatformTheme
{
Q_DECLARE_PRIVATE(QPlatformTheme)
public:
+ Q_DISABLE_COPY_MOVE(QPlatformTheme)
+
enum ThemeHint {
CursorFlashTime,
KeyboardInputInterval,
@@ -324,8 +326,6 @@ public:
protected:
explicit QPlatformTheme(QPlatformThemePrivate *priv);
QScopedPointer<QPlatformThemePrivate> d_ptr;
-private:
- Q_DISABLE_COPY(QPlatformTheme)
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h
index 075ac0f82b..4d48cc2f13 100644
--- a/src/gui/kernel/qplatformwindow.h
+++ b/src/gui/kernel/qplatformwindow.h
@@ -71,6 +71,8 @@ class Q_GUI_EXPORT QPlatformWindow : public QPlatformSurface
{
Q_DECLARE_PRIVATE(QPlatformWindow)
public:
+ Q_DISABLE_COPY_MOVE(QPlatformWindow)
+
explicit QPlatformWindow(QWindow *window);
~QPlatformWindow() override;
@@ -164,8 +166,6 @@ protected:
static QSize constrainWindowSize(const QSize &size);
QScopedPointer<QPlatformWindowPrivate> d_ptr;
-private:
- Q_DISABLE_COPY(QPlatformWindow)
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qsessionmanager_p.h b/src/gui/kernel/qsessionmanager_p.h
index 954443430e..d07d9b5eb8 100644
--- a/src/gui/kernel/qsessionmanager_p.h
+++ b/src/gui/kernel/qsessionmanager_p.h
@@ -69,7 +69,7 @@ public:
QSessionManagerPrivate(const QString &id,
const QString &key);
- virtual ~QSessionManagerPrivate();
+ ~QSessionManagerPrivate();
QPlatformSessionManager *platformSessionManager;
};
diff --git a/src/gui/kernel/qsimpledrag_p.h b/src/gui/kernel/qsimpledrag_p.h
index f9e8a83a39..8638b05155 100644
--- a/src/gui/kernel/qsimpledrag_p.h
+++ b/src/gui/kernel/qsimpledrag_p.h
@@ -71,7 +71,7 @@ class QScreen;
class Q_GUI_EXPORT QBasicDrag : public QPlatformDrag, public QObject
{
public:
- virtual ~QBasicDrag();
+ ~QBasicDrag();
virtual Qt::DropAction drag(QDrag *drag) override;
void cancelDrag() override;
diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp
index 48060a2c37..9b5b7a6f1e 100644
--- a/src/gui/kernel/qstylehints.cpp
+++ b/src/gui/kernel/qstylehints.cpp
@@ -69,29 +69,17 @@ class QStyleHintsPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QStyleHints)
public:
- inline QStyleHintsPrivate()
- : m_mouseDoubleClickInterval(-1)
- , m_mousePressAndHoldInterval(-1)
- , m_startDragDistance(-1)
- , m_startDragTime(-1)
- , m_keyboardInputInterval(-1)
- , m_cursorFlashTime(-1)
- , m_tabFocusBehavior(-1)
- , m_uiEffects(-1)
- , m_wheelScrollLines(-1)
- , m_mouseQuickSelectionThreshold(-1)
- {}
-
- int m_mouseDoubleClickInterval;
- int m_mousePressAndHoldInterval;
- int m_startDragDistance;
- int m_startDragTime;
- int m_keyboardInputInterval;
- int m_cursorFlashTime;
- int m_tabFocusBehavior;
- int m_uiEffects;
- int m_wheelScrollLines;
- int m_mouseQuickSelectionThreshold;
+ int m_mouseDoubleClickInterval = -1;
+ int m_mousePressAndHoldInterval = -1;
+ int m_startDragDistance = -1;
+ int m_startDragTime = -1;
+ int m_keyboardInputInterval = -1;
+ int m_cursorFlashTime = -1;
+ int m_tabFocusBehavior = -1;
+ int m_uiEffects = -1;
+ int m_showShortcutsInContextMenus = -1;
+ int m_wheelScrollLines = -1;
+ int m_mouseQuickSelectionThreshold = -1;
};
/*!
@@ -371,10 +359,25 @@ bool QStyleHints::showIsMaximized() const
\since 5.10
\brief \c true if the platform normally shows shortcut key sequences in
context menus, otherwise \c false.
+
+ Since Qt 5.13, the setShowShortcutsInContextMenus() function can be used to
+ override the platform default.
*/
bool QStyleHints::showShortcutsInContextMenus() const
{
- return themeableHint(QPlatformTheme::ShowShortcutsInContextMenus, QPlatformIntegration::ShowShortcutsInContextMenus).toBool();
+ Q_D(const QStyleHints);
+ return d->m_showShortcutsInContextMenus >= 0
+ ? d->m_showShortcutsInContextMenus != 0
+ : themeableHint(QPlatformTheme::ShowShortcutsInContextMenus, QPlatformIntegration::ShowShortcutsInContextMenus).toBool();
+}
+
+void QStyleHints::setShowShortcutsInContextMenus(bool s)
+{
+ Q_D(QStyleHints);
+ if (s != showShortcutsInContextMenus()) {
+ d->m_showShortcutsInContextMenus = s ? 1 : 0;
+ emit showShortcutsInContextMenusChanged(s);
+ }
}
/*!
diff --git a/src/gui/kernel/qstylehints.h b/src/gui/kernel/qstylehints.h
index 7b0683e9b1..9091db9624 100644
--- a/src/gui/kernel/qstylehints.h
+++ b/src/gui/kernel/qstylehints.h
@@ -64,7 +64,7 @@ class Q_GUI_EXPORT QStyleHints : public QObject
Q_PROPERTY(bool setFocusOnTouchRelease READ setFocusOnTouchRelease STORED false CONSTANT FINAL)
Q_PROPERTY(bool showIsFullScreen READ showIsFullScreen STORED false CONSTANT FINAL)
Q_PROPERTY(bool showIsMaximized READ showIsMaximized STORED false CONSTANT FINAL)
- Q_PROPERTY(bool showShortcutsInContextMenus READ showShortcutsInContextMenus STORED false CONSTANT FINAL)
+ Q_PROPERTY(bool showShortcutsInContextMenus READ showShortcutsInContextMenus WRITE setShowShortcutsInContextMenus NOTIFY showShortcutsInContextMenusChanged FINAL)
Q_PROPERTY(int startDragDistance READ startDragDistance NOTIFY startDragDistanceChanged FINAL)
Q_PROPERTY(int startDragTime READ startDragTime NOTIFY startDragTimeChanged FINAL)
Q_PROPERTY(int startDragVelocity READ startDragVelocity STORED false CONSTANT FINAL)
@@ -93,6 +93,7 @@ public:
bool showIsFullScreen() const;
bool showIsMaximized() const;
bool showShortcutsInContextMenus() const;
+ void setShowShortcutsInContextMenus(bool showShortcutsInContextMenus);
int passwordMaskDelay() const;
QChar passwordMaskCharacter() const;
qreal fontSmoothingGamma() const;
@@ -117,6 +118,7 @@ Q_SIGNALS:
void startDragTimeChanged(int startDragTime);
void tabFocusBehaviorChanged(Qt::TabFocusBehavior tabFocusBehavior);
void useHoverEffectsChanged(bool useHoverEffects);
+ void showShortcutsInContextMenusChanged(bool);
void wheelScrollLinesChanged(int scrollLines);
void mouseQuickSelectionThresholdChanged(int threshold);
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index f1e08826a8..0b833cfbc7 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -1330,16 +1330,18 @@ Qt::WindowStates QWindow::windowStates() const
*/
/*!
- Sets the transient \a parent
+ \property QWindow::transientParent
+ \brief the window for which this window is a transient pop-up
+ \since 5.13
This is a hint to the window manager that this window is a dialog or pop-up
- on behalf of the given window.
+ on behalf of the transient parent.
In order to cause the window to be centered above its transient parent by
default, depending on the window manager, it may also be necessary to call
setFlags() with a suitable \l Qt::WindowType (such as \c Qt::Dialog).
- \sa transientParent(), parent()
+ \sa parent()
*/
void QWindow::setTransientParent(QWindow *parent)
{
@@ -1356,19 +1358,28 @@ void QWindow::setTransientParent(QWindow *parent)
d->transientParent = parent;
QGuiApplicationPrivate::updateBlockedStatus(this);
+ emit transientParentChanged(parent);
}
-/*!
- Returns the transient parent of the window.
-
- \sa setTransientParent(), parent()
-*/
QWindow *QWindow::transientParent() const
{
Q_D(const QWindow);
return d->transientParent.data();
}
+/*
+ The setter for the QWindow::transientParent property.
+ The only reason this exists is to set the transientParentPropertySet flag
+ so that Qt Quick knows whether it was set programmatically (because of
+ Window declaration context) or because the user set the property.
+*/
+void QWindowPrivate::setTransientParent(QWindow *parent)
+{
+ Q_Q(QWindow);
+ q->setTransientParent(parent);
+ transientParentPropertySet = true;
+}
+
/*!
\enum QWindow::AncestorMode
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h
index 439e62d0bd..1be3c845fe 100644
--- a/src/gui/kernel/qwindow.h
+++ b/src/gui/kernel/qwindow.h
@@ -123,6 +123,7 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface
Q_PROPERTY(Visibility visibility READ visibility WRITE setVisibility NOTIFY visibilityChanged REVISION 1)
Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation WRITE reportContentOrientationChange NOTIFY contentOrientationChanged)
Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged REVISION 1)
+ Q_PRIVATE_PROPERTY(QWindow::d_func(), QWindow* transientParent MEMBER transientParent WRITE setTransientParent NOTIFY transientParentChanged REVISION 13)
public:
enum Visibility {
@@ -143,7 +144,7 @@ public:
explicit QWindow(QScreen *screen = nullptr);
explicit QWindow(QWindow *parent);
- virtual ~QWindow();
+ ~QWindow();
void setSurfaceType(SurfaceType surfaceType);
SurfaceType surfaceType() const override;
@@ -336,6 +337,8 @@ Q_SIGNALS:
Q_REVISION(1) void opacityChanged(qreal opacity);
+ Q_REVISION(13) void transientParentChanged(QWindow *transientParent);
+
protected:
virtual void exposeEvent(QExposeEvent *);
virtual void resizeEvent(QResizeEvent *);
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h
index bf5e645114..25f9a8a9b2 100644
--- a/src/gui/kernel/qwindow_p.h
+++ b/src/gui/kernel/qwindow_p.h
@@ -148,6 +148,7 @@ public:
void disconnectFromScreen();
void emitScreenChangedRecursion(QScreen *newScreen);
QScreen *screenForGeometry(const QRect &rect);
+ void setTransientParent(QWindow *parent);
virtual void clearFocusObject();
virtual QRectF closestAcceptableGeometry(const QRectF &rect) const;
@@ -191,6 +192,7 @@ public:
bool blockedByModalWindow;
bool updateRequestPending;
+ bool transientParentPropertySet = false;
QPointer<QWindow> transientParent;
QPointer<QScreen> topLevelScreen;
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h
index 9cb4e191cc..563ca8f922 100644
--- a/src/gui/kernel/qwindowsysteminterface_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_p.h
@@ -508,7 +508,7 @@ public:
}
}
private:
- Q_DISABLE_COPY(WindowSystemEventList)
+ Q_DISABLE_COPY_MOVE(WindowSystemEventList)
};
static WindowSystemEventList windowSystemEventQueue;
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp
index 3a476978e7..e961c42a25 100644
--- a/src/gui/opengl/qopengl.cpp
+++ b/src/gui/opengl/qopengl.cpp
@@ -54,8 +54,6 @@
#include <QtCore/QFile>
#include <QtCore/QDir>
-#include <set>
-
QT_BEGIN_NAMESPACE
#if defined(QT_OPENGL_3)
@@ -527,13 +525,4 @@ QOpenGLConfig::Gpu QOpenGLConfig::Gpu::fromContext()
return gpu;
}
-Q_GUI_EXPORT std::set<QByteArray> *qgpu_features(const QString &filename)
-{
- const QSet<QString> features = QOpenGLConfig::gpuFeatures(QOpenGLConfig::Gpu::fromContext(), filename);
- std::set<QByteArray> *result = new std::set<QByteArray>;
- for (const QString &feature : features)
- result->insert(feature.toUtf8());
- return result;
-}
-
QT_END_NAMESPACE
diff --git a/src/gui/opengl/qopenglcustomshaderstage_p.h b/src/gui/opengl/qopenglcustomshaderstage_p.h
index f4a71af88e..ce3e9efd23 100644
--- a/src/gui/opengl/qopenglcustomshaderstage_p.h
+++ b/src/gui/opengl/qopenglcustomshaderstage_p.h
@@ -80,7 +80,7 @@ protected:
private:
QOpenGLCustomShaderStagePrivate* d_ptr;
- Q_DISABLE_COPY(QOpenGLCustomShaderStage)
+ Q_DISABLE_COPY_MOVE(QOpenGLCustomShaderStage)
};
diff --git a/src/gui/opengl/qopenglext.h b/src/gui/opengl/qopenglext.h
index 856adb679e..63873476e4 100644
--- a/src/gui/opengl/qopenglext.h
+++ b/src/gui/opengl/qopenglext.h
@@ -468,9 +468,14 @@ GLAPI void APIENTRY glBlendEquation (GLenum mode);
#ifndef GL_VERSION_1_5
#define GL_VERSION_1_5 1
-#include <stddef.h>
-typedef ptrdiff_t GLsizeiptr;
-typedef ptrdiff_t GLintptr;
+#ifdef _WIN64
+typedef signed long long int GLsizeiptr;
+typedef signed long long int GLintptr;
+#else
+typedef signed long int GLsizeiptr;
+typedef signed long int GLintptr;
+#endif
+
#define GL_BUFFER_SIZE 0x8764
#define GL_BUFFER_USAGE 0x8765
#define GL_QUERY_COUNTER_BITS 0x8864
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index 00287b0665..4554291bbd 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -228,26 +228,8 @@ struct QOpenGLFunctionsPrivate;
#undef glTexLevelParameteriv
#if defined(Q_CLANG_QDOC)
-#undef GLint
-typedef int GLint;
-#undef GLsizei
-typedef int GLsizei;
-#undef GLuint
-typedef unsigned int GLuint;
-#undef GLubyte
-typedef unsigned int GLubyte;
-#undef GLenum
-typedef unsigned int GLenum;
#undef GLbitfield
typedef unsigned int GLbitfield;
-#undef GLfloat
-typedef float GLfloat;
-#undef GLclampf
-typedef float GLclampf;
-#undef GLboolean
-typedef bool GLboolean;
-#undef GLvoid
-typedef void GLvoid;
#undef GLchar
typedef char GLchar;
#endif
diff --git a/src/gui/opengl/qopenglpaintdevice.h b/src/gui/opengl/qopenglpaintdevice.h
index 300002a9c1..54118f2926 100644
--- a/src/gui/opengl/qopenglpaintdevice.h
+++ b/src/gui/opengl/qopenglpaintdevice.h
@@ -59,7 +59,7 @@ public:
QOpenGLPaintDevice();
explicit QOpenGLPaintDevice(const QSize &size);
QOpenGLPaintDevice(int width, int height);
- virtual ~QOpenGLPaintDevice();
+ ~QOpenGLPaintDevice();
int devType() const override { return QInternal::OpenGL; }
QPaintEngine *paintEngine() const override;
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 001cb839fa..042b9ebd79 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -1574,14 +1574,15 @@ void QOpenGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, c
case QImage::Format_Alpha8:
if (ctx->functions()->hasOpenGLFeature(QOpenGLFunctions::TextureRGFormats)) {
d->shaderManager->setSrcPixelType(QOpenGLEngineShaderManager::AlphaImageSrc);
- bindOption = QOpenGLTextureUploader::UseRedFor8BitBindOption;
+ bindOption = QOpenGLTextureUploader::UseRedForAlphaAndLuminanceBindOption;
} else
d->shaderManager->setSrcPixelType(QOpenGLEngineShaderManager::ImageSrc);
break;
case QImage::Format_Grayscale8:
+ case QImage::Format_Grayscale16:
if (ctx->functions()->hasOpenGLFeature(QOpenGLFunctions::TextureRGFormats)) {
d->shaderManager->setSrcPixelType(QOpenGLEngineShaderManager::GrayscaleImageSrc);
- bindOption = QOpenGLTextureUploader::UseRedFor8BitBindOption;
+ bindOption = QOpenGLTextureUploader::UseRedForAlphaAndLuminanceBindOption;
} else
d->shaderManager->setSrcPixelType(QOpenGLEngineShaderManager::ImageSrc);
break;
diff --git a/src/gui/opengl/qopenglpaintengine_p.h b/src/gui/opengl/qopenglpaintengine_p.h
index 0541ce6168..15ac240b89 100644
--- a/src/gui/opengl/qopenglpaintengine_p.h
+++ b/src/gui/opengl/qopenglpaintengine_p.h
@@ -166,7 +166,7 @@ public:
bool shouldDrawCachedGlyphs(QFontEngine *, const QTransform &) const override;
private:
- Q_DISABLE_COPY(QOpenGL2PaintEngineEx)
+ Q_DISABLE_COPY_MOVE(QOpenGL2PaintEngineEx)
friend class QOpenGLEngineShaderManager;
};
diff --git a/src/gui/opengl/qopenglshaderprogram.h b/src/gui/opengl/qopenglshaderprogram.h
index 84eb8d6956..c79101fd4d 100644
--- a/src/gui/opengl/qopenglshaderprogram.h
+++ b/src/gui/opengl/qopenglshaderprogram.h
@@ -50,13 +50,6 @@
#include <QtGui/qvector4d.h>
#include <QtGui/qmatrix4x4.h>
-#if defined(Q_CLANG_QDOC)
-#undef GLint
-typedef int GLint;
-#undef GLfloat
-typedef double GLfloat;
-#endif
-
QT_BEGIN_NAMESPACE
@@ -80,7 +73,7 @@ public:
Q_DECLARE_FLAGS(ShaderType, ShaderTypeBit)
explicit QOpenGLShader(QOpenGLShader::ShaderType type, QObject *parent = nullptr);
- virtual ~QOpenGLShader();
+ ~QOpenGLShader();
QOpenGLShader::ShaderType shaderType() const;
@@ -115,7 +108,7 @@ class Q_GUI_EXPORT QOpenGLShaderProgram : public QObject
Q_OBJECT
public:
explicit QOpenGLShaderProgram(QObject *parent = nullptr);
- virtual ~QOpenGLShaderProgram();
+ ~QOpenGLShaderProgram();
bool addShader(QOpenGLShader *shader);
void removeShader(QOpenGLShader *shader);
diff --git a/src/gui/opengl/qopengltextureuploader.cpp b/src/gui/opengl/qopengltextureuploader.cpp
index 42e309b733..90253546c8 100644
--- a/src/gui/opengl/qopengltextureuploader.cpp
+++ b/src/gui/opengl/qopengltextureuploader.cpp
@@ -104,7 +104,7 @@ qsizetype QOpenGLTextureUploader::textureImage(GLenum target, const QImage &imag
const bool isOpenGLES3orBetter = context->isOpenGLES() && context->format().majorVersion() >= 3;
const bool sRgbBinding = (options & SRgbBindOption);
Q_ASSERT(isOpenGL12orBetter || context->isOpenGLES());
- Q_ASSERT((options & (SRgbBindOption | UseRedFor8BitBindOption)) != (SRgbBindOption | UseRedFor8BitBindOption));
+ Q_ASSERT((options & (SRgbBindOption | UseRedForAlphaAndLuminanceBindOption)) != (SRgbBindOption | UseRedForAlphaAndLuminanceBindOption));
switch (image.format()) {
case QImage::Format_RGB32:
@@ -213,7 +213,7 @@ qsizetype QOpenGLTextureUploader::textureImage(GLenum target, const QImage &imag
if (sRgbBinding) {
// Always needs conversion
break;
- } else if (options & UseRedFor8BitBindOption) {
+ } else if (options & UseRedForAlphaAndLuminanceBindOption) {
externalFormat = internalFormat = GL_RED;
pixelType = GL_UNSIGNED_BYTE;
targetFormat = image.format();
@@ -223,7 +223,7 @@ qsizetype QOpenGLTextureUploader::textureImage(GLenum target, const QImage &imag
if (sRgbBinding) {
// Always needs conversion
break;
- } else if (options & UseRedFor8BitBindOption) {
+ } else if (options & UseRedForAlphaAndLuminanceBindOption) {
externalFormat = internalFormat = GL_RED;
pixelType = GL_UNSIGNED_BYTE;
targetFormat = image.format();
@@ -243,7 +243,7 @@ qsizetype QOpenGLTextureUploader::textureImage(GLenum target, const QImage &imag
if (sRgbBinding) {
// Always needs conversion
break;
- } else if (options & UseRedFor8BitBindOption) {
+ } else if (options & UseRedForAlphaAndLuminanceBindOption) {
externalFormat = internalFormat = GL_RED;
pixelType = GL_UNSIGNED_BYTE;
targetFormat = image.format();
@@ -259,6 +259,26 @@ qsizetype QOpenGLTextureUploader::textureImage(GLenum target, const QImage &imag
targetFormat = image.format();
}
break;
+ case QImage::Format_Grayscale16:
+ if (sRgbBinding) {
+ // Always needs conversion
+ break;
+ } else if (options & UseRedForAlphaAndLuminanceBindOption) {
+ externalFormat = internalFormat = GL_RED;
+ pixelType = GL_UNSIGNED_SHORT;
+ targetFormat = image.format();
+ } else if (context->isOpenGLES() || context->format().profile() != QSurfaceFormat::CoreProfile) {
+ externalFormat = internalFormat = GL_LUMINANCE;
+ pixelType = GL_UNSIGNED_SHORT;
+ targetFormat = image.format();
+ } else if (funcs->hasOpenGLExtension(QOpenGLExtensions::TextureSwizzle)) {
+ GLint swizzle[4] = { GL_RED, GL_RED, GL_RED, GL_ONE };
+ funcs->glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzle);
+ externalFormat = internalFormat = GL_RED;
+ pixelType = GL_UNSIGNED_SHORT;
+ targetFormat = image.format();
+ }
+ break;
default:
break;
}
diff --git a/src/gui/opengl/qopengltextureuploader_p.h b/src/gui/opengl/qopengltextureuploader_p.h
index d758b3787b..0dcf709d7e 100644
--- a/src/gui/opengl/qopengltextureuploader_p.h
+++ b/src/gui/opengl/qopengltextureuploader_p.h
@@ -65,7 +65,7 @@ public:
enum BindOption {
NoBindOption = 0x0000,
PremultipliedAlphaBindOption = 0x0001,
- UseRedFor8BitBindOption = 0x0002,
+ UseRedForAlphaAndLuminanceBindOption = 0x0002,
SRgbBindOption = 0x0004,
PowerOfTwoBindOption = 0x0008
};
diff --git a/src/gui/opengl/qopenglversionfunctions.h b/src/gui/opengl/qopenglversionfunctions.h
index 3af1ed0466..f828e5668b 100644
--- a/src/gui/opengl/qopenglversionfunctions.h
+++ b/src/gui/opengl/qopenglversionfunctions.h
@@ -214,6 +214,7 @@ public:
virtual bool initializeOpenGLFunctions();
+ Q_DISABLE_COPY(QAbstractOpenGLFunctions)
Q_DECLARE_PRIVATE(QAbstractOpenGLFunctions)
protected:
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index 2dd5144e40..348eceb47f 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -187,19 +187,11 @@ void qt_blend_rgb16_on_rgb16(uchar *dst, int dbpl,
#endif
if (const_alpha == 256) {
- if (w <= 64) {
- while (h--) {
- QT_MEMCPY_USHORT(dst, src, w);
- dst += dbpl;
- src += sbpl;
- }
- } else {
- int length = w << 1;
- while (h--) {
- memcpy(dst, src, length);
- dst += dbpl;
- src += sbpl;
- }
+ int length = w << 1;
+ while (h--) {
+ memcpy(dst, src, length);
+ dst += dbpl;
+ src += sbpl;
}
} else if (const_alpha != 0) {
quint16 *d = (quint16 *) dst;
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 318d55c4c3..b3fa1eedde 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -2487,6 +2487,15 @@ QColor QColor::fromHslF(qreal h, qreal s, qreal l, qreal a)
return color;
}
+/*!
+ \obsolete
+
+ Use the \c const overload instead.
+*/
+void QColor::getCmyk(int *c, int *m, int *y, int *k, int *a)
+{
+ const_cast<const QColor *>(this)->getCmyk(c, m, y, k, a);
+}
/*!
Sets the contents pointed to by \a c, \a m, \a y, \a k, and \a a, to the
@@ -2498,7 +2507,7 @@ QColor QColor::fromHslF(qreal h, qreal s, qreal l, qreal a)
\sa setCmyk(), {QColor#The CMYK Color Model}{The CMYK Color Model}
*/
-void QColor::getCmyk(int *c, int *m, int *y, int *k, int *a)
+void QColor::getCmyk(int *c, int *m, int *y, int *k, int *a) const
{
if (!c || !m || !y || !k)
return;
@@ -2518,6 +2527,16 @@ void QColor::getCmyk(int *c, int *m, int *y, int *k, int *a)
}
/*!
+ \obsolete
+
+ Use the \c const overload instead.
+*/
+void QColor::getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a)
+{
+ const_cast<const QColor *>(this)->getCmykF(c, m, y, k, a);
+}
+
+/*!
Sets the contents pointed to by \a c, \a m, \a y, \a k, and \a a, to the
cyan, magenta, yellow, black, and alpha-channel (transparency) components
of the color's CMYK value.
@@ -2527,7 +2546,7 @@ void QColor::getCmyk(int *c, int *m, int *y, int *k, int *a)
\sa setCmykF(), {QColor#The CMYK Color Model}{The CMYK Color Model}
*/
-void QColor::getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a)
+void QColor::getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a) const
{
if (!c || !m || !y || !k)
return;
@@ -2676,18 +2695,13 @@ QColor QColor::fromCmykF(qreal c, qreal m, qreal y, qreal k, qreal a)
recommend using the darker() function for this purpose. If the \a factor
is 0 or negative, the return value is unspecified.
- The function converts the current RGB color to HSV, multiplies the value
- (V) component by \a factor and converts the color back to RGB.
+ The function converts the current color to HSV, multiplies the value
+ (V) component by \a factor and converts the color back to it's original
+ color spec.
\sa darker(), isValid()
*/
-
-/*!
- \obsolete
-
- Use lighter(\a factor) instead.
-*/
-QColor QColor::light(int factor) const Q_DECL_NOTHROW
+QColor QColor::lighter(int factor) const Q_DECL_NOTHROW
{
if (factor <= 0) // invalid lightness factor
return *this;
@@ -2726,18 +2740,13 @@ QColor QColor::light(int factor) const Q_DECL_NOTHROW
but we recommend using the lighter() function for this purpose. If the
\a factor is 0 or negative, the return value is unspecified.
- The function converts the current RGB color to HSV, divides the value (V)
- component by \a factor and converts the color back to RGB.
+ The function converts the current color to HSV, divides the value (V)
+ component by \a factor and converts the color back to it's original
+ color spec.
\sa lighter(), isValid()
*/
-
-/*!
- \obsolete
-
- Use darker(\a factor) instead.
-*/
-QColor QColor::dark(int factor) const Q_DECL_NOTHROW
+QColor QColor::darker(int factor) const Q_DECL_NOTHROW
{
if (factor <= 0) // invalid darkness factor
return *this;
@@ -2751,6 +2760,28 @@ QColor QColor::dark(int factor) const Q_DECL_NOTHROW
return hsv.convertTo(cspec);
}
+#if QT_DEPRECATED_SINCE(5, 13)
+/*!
+ \obsolete
+
+ Use lighter(\a factor) instead.
+*/
+QColor QColor::light(int factor) const Q_DECL_NOTHROW
+{
+ return lighter(factor);
+}
+
+/*!
+ \obsolete
+
+ Use darker(\a factor) instead.
+*/
+QColor QColor::dark(int factor) const Q_DECL_NOTHROW
+{
+ return darker(factor);
+}
+#endif
+
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
/*!
Assigns a copy of \a color to this color, and returns a reference to it.
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index f7a9e9db59..4822612cf8 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -172,10 +172,12 @@ public:
qreal yellowF() const Q_DECL_NOTHROW;
qreal blackF() const Q_DECL_NOTHROW;
- void getCmyk(int *c, int *m, int *y, int *k, int *a = nullptr);
+ void getCmyk(int *c, int *m, int *y, int *k, int *a = nullptr); // ### Qt 6: remove
+ void getCmyk(int *c, int *m, int *y, int *k, int *a = nullptr) const;
void setCmyk(int c, int m, int y, int k, int a = 255);
- void getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a = nullptr);
+ void getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a = nullptr); // ### Qt 6: remove
+ void getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a = nullptr) const;
void setCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0);
int hslHue() const Q_DECL_NOTHROW; // 0 <= hue < 360
@@ -217,9 +219,13 @@ public:
static QColor fromHsl(int h, int s, int l, int a = 255);
static QColor fromHslF(qreal h, qreal s, qreal l, qreal a = 1.0);
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X("Use QColor::lighter() instead")
Q_REQUIRED_RESULT QColor light(int f = 150) const Q_DECL_NOTHROW;
- Q_REQUIRED_RESULT QColor lighter(int f = 150) const Q_DECL_NOTHROW;
+ QT_DEPRECATED_X("Use QColor::darker() instead")
Q_REQUIRED_RESULT QColor dark(int f = 200) const Q_DECL_NOTHROW;
+#endif
+ Q_REQUIRED_RESULT QColor lighter(int f = 150) const Q_DECL_NOTHROW;
Q_REQUIRED_RESULT QColor darker(int f = 200) const Q_DECL_NOTHROW;
bool operator==(const QColor &c) const Q_DECL_NOTHROW;
@@ -306,12 +312,6 @@ inline QColor::QColor(const QColor &acolor) Q_DECL_NOTHROW
inline bool QColor::isValid() const Q_DECL_NOTHROW
{ return cspec != Invalid; }
-inline QColor QColor::lighter(int f) const Q_DECL_NOTHROW
-{ return light(f); }
-
-inline QColor QColor::darker(int f) const Q_DECL_NOTHROW
-{ return dark(f); }
-
QT_END_NAMESPACE
#endif // QCOLOR_H
diff --git a/src/gui/painting/qcompositionfunctions.cpp b/src/gui/painting/qcompositionfunctions.cpp
index 027bf23115..5c1afe8425 100644
--- a/src/gui/painting/qcompositionfunctions.cpp
+++ b/src/gui/painting/qcompositionfunctions.cpp
@@ -1107,7 +1107,7 @@ static inline uint multiply_op_rgb64(uint dst, uint src, uint da, uint sa)
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Multiply_impl(uint *dest, int length, uint color, const T &coverage)
+static inline void comp_func_solid_Multiply_impl(uint *dest, int length, uint color, const T &coverage)
{
int sa = qAlpha(color);
int sr = qRed(color);
@@ -1130,7 +1130,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Multiply_impl(uint *dest,
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Multiply_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
+static inline void comp_func_solid_Multiply_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
{
uint sa = color.alpha();
uint sr = color.red();
@@ -1169,7 +1169,7 @@ void QT_FASTCALL comp_func_solid_Multiply_rgb64(QRgba64 *dest, int length, QRgba
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Multiply_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Multiply_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
uint d = dest[i];
@@ -1190,7 +1190,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Multiply_impl(uint *Q_DECL_REST
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Multiply_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Multiply_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
QRgba64 d = dest[i];
@@ -1231,7 +1231,7 @@ void QT_FASTCALL comp_func_Multiply_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const Q
= Sca + Dca - Sca.Dca
*/
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Screen_impl(uint *dest, int length, uint color, const T &coverage)
+static inline void comp_func_solid_Screen_impl(uint *dest, int length, uint color, const T &coverage)
{
int sa = qAlpha(color);
int sr = qRed(color);
@@ -1254,7 +1254,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Screen_impl(uint *dest, i
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Screen_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
+static inline void comp_func_solid_Screen_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
{
uint sa = color.alpha();
uint sr = color.red();
@@ -1293,7 +1293,7 @@ void QT_FASTCALL comp_func_solid_Screen_rgb64(QRgba64 *dest, int length, QRgba64
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Screen_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Screen_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
uint d = dest[i];
@@ -1314,7 +1314,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Screen_impl(uint *Q_DECL_RESTRI
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Screen_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Screen_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
QRgba64 d = dest[i];
@@ -1375,7 +1375,7 @@ static inline uint overlay_op_rgb64(uint dst, uint src, uint da, uint sa)
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Overlay_impl(uint *dest, int length, uint color, const T &coverage)
+static inline void comp_func_solid_Overlay_impl(uint *dest, int length, uint color, const T &coverage)
{
int sa = qAlpha(color);
int sr = qRed(color);
@@ -1398,7 +1398,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Overlay_impl(uint *dest,
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Overlay_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
+static inline void comp_func_solid_Overlay_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
{
uint sa = color.alpha();
uint sr = color.red();
@@ -1437,7 +1437,7 @@ void QT_FASTCALL comp_func_solid_Overlay_rgb64(QRgba64 *dest, int length, QRgba6
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Overlay_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Overlay_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
uint d = dest[i];
@@ -1458,7 +1458,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Overlay_impl(uint *Q_DECL_RESTR
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Overlay_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Overlay_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
QRgba64 d = dest[i];
@@ -1509,7 +1509,7 @@ static inline uint darken_op_rgb64(uint dst, uint src, uint da, uint sa)
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Darken_impl(uint *dest, int length, uint color, const T &coverage)
+static inline void comp_func_solid_Darken_impl(uint *dest, int length, uint color, const T &coverage)
{
int sa = qAlpha(color);
int sr = qRed(color);
@@ -1532,7 +1532,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Darken_impl(uint *dest, i
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Darken_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
+static inline void comp_func_solid_Darken_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
{
uint sa = color.alpha();
uint sr = color.red();
@@ -1571,7 +1571,7 @@ void QT_FASTCALL comp_func_solid_Darken_rgb64(QRgba64 *dest, int length, QRgba64
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Darken_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Darken_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
uint d = dest[i];
@@ -1592,7 +1592,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Darken_impl(uint *Q_DECL_RESTRI
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Darken_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Darken_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
QRgba64 d = dest[i];
@@ -1643,7 +1643,7 @@ static inline uint lighten_op_rgb64(uint dst, uint src, uint da, uint sa)
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Lighten_impl(uint *dest, int length, uint color, const T &coverage)
+static inline void comp_func_solid_Lighten_impl(uint *dest, int length, uint color, const T &coverage)
{
int sa = qAlpha(color);
int sr = qRed(color);
@@ -1666,7 +1666,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Lighten_impl(uint *dest,
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Lighten_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
+static inline void comp_func_solid_Lighten_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
{
uint sa = color.alpha();
uint sr = color.red();
@@ -1705,7 +1705,7 @@ void QT_FASTCALL comp_func_solid_Lighten_rgb64(QRgba64 *dest, int length, QRgba6
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Lighten_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Lighten_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
uint d = dest[i];
@@ -1726,7 +1726,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Lighten_impl(uint *Q_DECL_RESTR
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Lighten_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Lighten_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
QRgba64 d = dest[i];
@@ -1795,7 +1795,7 @@ static inline uint color_dodge_op_rgb64(qint64 dst, qint64 src, qint64 da, qint6
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_ColorDodge_impl(uint *dest, int length, uint color, const T &coverage)
+static inline void comp_func_solid_ColorDodge_impl(uint *dest, int length, uint color, const T &coverage)
{
int sa = qAlpha(color);
int sr = qRed(color);
@@ -1818,7 +1818,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_ColorDodge_impl(uint *des
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_ColorDodge_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
+static inline void comp_func_solid_ColorDodge_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
{
uint sa = color.alpha();
uint sr = color.red();
@@ -1857,7 +1857,7 @@ void QT_FASTCALL comp_func_solid_ColorDodge_rgb64(QRgba64 *dest, int length, QRg
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorDodge_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_ColorDodge_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
uint d = dest[i];
@@ -1878,7 +1878,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorDodge_impl(uint *Q_DECL_RE
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorDodge_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_ColorDodge_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
QRgba64 d = dest[i];
@@ -1947,7 +1947,7 @@ static inline uint color_burn_op_rgb64(qint64 dst, qint64 src, qint64 da, qint64
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_ColorBurn_impl(uint *dest, int length, uint color, const T &coverage)
+static inline void comp_func_solid_ColorBurn_impl(uint *dest, int length, uint color, const T &coverage)
{
int sa = qAlpha(color);
int sr = qRed(color);
@@ -1970,7 +1970,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_ColorBurn_impl(uint *dest
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_ColorBurn_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
+static inline void comp_func_solid_ColorBurn_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
{
uint sa = color.alpha();
uint sr = color.red();
@@ -2009,7 +2009,7 @@ void QT_FASTCALL comp_func_solid_ColorBurn_rgb64(QRgba64 *dest, int length, QRgb
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorBurn_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_ColorBurn_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
uint d = dest[i];
@@ -2030,7 +2030,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorBurn_impl(uint *Q_DECL_RES
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorBurn_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_ColorBurn_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
QRgba64 d = dest[i];
@@ -2093,7 +2093,7 @@ static inline uint hardlight_op_rgb64(uint dst, uint src, uint da, uint sa)
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_HardLight_impl(uint *dest, int length, uint color, const T &coverage)
+static inline void comp_func_solid_HardLight_impl(uint *dest, int length, uint color, const T &coverage)
{
int sa = qAlpha(color);
int sr = qRed(color);
@@ -2116,7 +2116,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_HardLight_impl(uint *dest
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_HardLight_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
+static inline void comp_func_solid_HardLight_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
{
uint sa = color.alpha();
uint sr = color.red();
@@ -2155,7 +2155,7 @@ void QT_FASTCALL comp_func_solid_HardLight_rgb64(QRgba64 *dest, int length, QRgb
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_HardLight_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_HardLight_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
uint d = dest[i];
@@ -2176,7 +2176,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_HardLight_impl(uint *Q_DECL_RES
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_HardLight_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_HardLight_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
QRgba64 d = dest[i];
@@ -2252,7 +2252,7 @@ static inline uint soft_light_op_rgb64(qint64 dst, qint64 src, qint64 da, qint64
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_SoftLight_impl(uint *dest, int length, uint color, const T &coverage)
+static inline void comp_func_solid_SoftLight_impl(uint *dest, int length, uint color, const T &coverage)
{
int sa = qAlpha(color);
int sr = qRed(color);
@@ -2275,7 +2275,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_SoftLight_impl(uint *dest
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_SoftLight_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
+static inline void comp_func_solid_SoftLight_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
{
uint sa = color.alpha();
uint sr = color.red();
@@ -2314,7 +2314,7 @@ void QT_FASTCALL comp_func_solid_SoftLight_rgb64(QRgba64 *dest, int length, QRgb
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_SoftLight_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_SoftLight_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
uint d = dest[i];
@@ -2335,7 +2335,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_SoftLight_impl(uint *Q_DECL_RES
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_SoftLight_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_SoftLight_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
QRgba64 d = dest[i];
@@ -2386,7 +2386,7 @@ static inline uint difference_op_rgb64(qint64 dst, qint64 src, qint64 da, qint64
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Difference_impl(uint *dest, int length, uint color, const T &coverage)
+static inline void comp_func_solid_Difference_impl(uint *dest, int length, uint color, const T &coverage)
{
int sa = qAlpha(color);
int sr = qRed(color);
@@ -2409,7 +2409,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Difference_impl(uint *des
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_solid_Difference_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
+static inline void comp_func_solid_Difference_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
{
uint sa = color.alpha();
uint sr = color.red();
@@ -2448,7 +2448,7 @@ void QT_FASTCALL comp_func_solid_Difference_rgb64(QRgba64 *dest, int length, QRg
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Difference_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Difference_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
uint d = dest[i];
@@ -2469,7 +2469,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Difference_impl(uint *Q_DECL_RE
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Difference_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Difference_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
QRgba64 d = dest[i];
@@ -2509,7 +2509,7 @@ void QT_FASTCALL comp_func_Difference_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const
Dca' = (Sca.Da + Dca.Sa - 2.Sca.Dca) + Sca.(1 - Da) + Dca.(1 - Sa)
*/
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void QT_FASTCALL comp_func_solid_Exclusion_impl(uint *dest, int length, uint color, const T &coverage)
+static inline void QT_FASTCALL comp_func_solid_Exclusion_impl(uint *dest, int length, uint color, const T &coverage)
{
int sa = qAlpha(color);
int sr = qRed(color);
@@ -2532,7 +2532,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void QT_FASTCALL comp_func_solid_Exclusion_imp
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void QT_FASTCALL comp_func_solid_Exclusion_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
+static inline void QT_FASTCALL comp_func_solid_Exclusion_impl(QRgba64 *dest, int length, QRgba64 color, const T &coverage)
{
uint sa = color.alpha();
uint sr = color.red();
@@ -2572,7 +2572,7 @@ void QT_FASTCALL comp_func_solid_Exclusion_rgb64(QRgba64 *dest, int length, QRgb
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Exclusion_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Exclusion_impl(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
uint d = dest[i];
@@ -2593,7 +2593,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Exclusion_impl(uint *Q_DECL_RES
}
template <typename T>
-Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Exclusion_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Exclusion_impl(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
QRgba64 d = dest[i];
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index 436a62d486..0fb89a75b5 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -289,7 +289,7 @@ void QCosmeticStroker::setup()
drawCaps = state->lastPen.capStyle() != Qt::FlatCap;
if (strokeSelection & FastDraw) {
- color = multiplyAlpha256(state->penData.solid.color, opacity).toArgb32();
+ color = multiplyAlpha256(state->penData.solidColor, opacity).toArgb32();
QRasterBuffer *buffer = state->penData.rasterBuffer;
pixels = (uint *)buffer->buffer();
ppl = buffer->stride<quint32>();
diff --git a/src/gui/painting/qdatabuffer_p.h b/src/gui/painting/qdatabuffer_p.h
index 7cac2ac358..28d5f6d6c5 100644
--- a/src/gui/painting/qdatabuffer_p.h
+++ b/src/gui/painting/qdatabuffer_p.h
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
template <typename Type> class QDataBuffer
{
- Q_DISABLE_COPY(QDataBuffer)
+ Q_DISABLE_COPY_MOVE(QDataBuffer)
public:
QDataBuffer(int res)
{
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index ca3590e280..2dd18f6dfc 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
-** Copyright (C) 2016 Intel Corporation.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -55,6 +55,7 @@
#endif
#include <private/qguiapplication_p.h>
#include <private/qrgba64_p.h>
+#include <qendian.h>
#include <qloggingcategory.h>
#include <qmath.h>
@@ -856,6 +857,44 @@ static const QRgba64 *QT_FASTCALL fetchGrayscale8ToRGB64(QRgba64 *buffer, const
return buffer;
}
+static void QT_FASTCALL convertGrayscale16ToRGB32(uint *buffer, int count, const QVector<QRgb> *)
+{
+ for (int i = 0; i < count; ++i) {
+ const uint x = qt_div_257(buffer[i]);
+ buffer[i] = qRgb(x, x, x);
+ }
+}
+
+static const uint *QT_FASTCALL fetchGrayscale16ToRGB32(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ const unsigned short *s = reinterpret_cast<const unsigned short *>(src) + index;
+ for (int i = 0; i < count; ++i) {
+ const uint x = qt_div_257(s[i]);
+ buffer[i] = qRgb(x, x, x);
+ }
+ return buffer;
+}
+
+static const QRgba64 *QT_FASTCALL convertGrayscale16ToRGBA64(QRgba64 *buffer, const uint *src, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ const unsigned short *s = reinterpret_cast<const unsigned short *>(src);
+ for (int i = 0; i < count; ++i)
+ buffer[i] = QRgba64::fromRgba64(s[i], s[i], s[i], 65535);
+ return buffer;
+}
+
+static const QRgba64 *QT_FASTCALL fetchGrayscale16ToRGBA64(QRgba64 *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ const unsigned short *s = reinterpret_cast<const unsigned short *>(src) + index;
+ for (int i = 0; i < count; ++i) {
+ buffer[i] = QRgba64::fromRgba64(s[i], s[i], s[i], 65535);
+ }
+ return buffer;
+}
+
static void QT_FASTCALL storeARGB32FromARGB32PM(uchar *dest, const uint *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *)
{
@@ -1047,18 +1086,8 @@ static const QRgba64 *QT_FASTCALL fetchRGB32ToRGB64(QRgba64 *buffer, const uchar
static const QRgba64 *QT_FASTCALL convertARGB32ToRGBA64PM(QRgba64 *buffer, const uint *src, int count,
const QVector<QRgb> *, QDitherInfo *)
{
-#ifdef __SSE2__
- qConvertARGB32PMToRGBA64PM_sse2<false, false>(buffer, src, count);
- for (int i = 0; i < count; ++i)
- buffer[i] = buffer[i].premultiplied();
-#elif defined(__ARM_NEON__)
- qConvertARGB32PMToRGBA64PM_neon<false, false>(buffer, src, count);
- for (int i = 0; i < count; ++i)
- buffer[i] = buffer[i].premultiplied();
-#else
for (int i = 0; i < count; ++i)
buffer[i] = QRgba64::fromArgb32(src[i]).premultiplied();
-#endif
return buffer;
}
@@ -1110,18 +1139,8 @@ static const QRgba64 *QT_FASTCALL fetchRGBA64ToRGBA64PM(QRgba64 *buffer, const u
static const QRgba64 *QT_FASTCALL convertRGBA8888ToRGBA64PM(QRgba64 *buffer, const uint *src, int count,
const QVector<QRgb> *, QDitherInfo *)
{
-#ifdef __SSE2__
- qConvertARGB32PMToRGBA64PM_sse2<true, false>(buffer, src, count);
- for (int i = 0; i < count; ++i)
- buffer[i] = buffer[i].premultiplied();
-#elif defined(__ARM_NEON__)
- qConvertARGB32PMToRGBA64PM_neon<true, false>(buffer, src, count);
- for (int i = 0; i < count; ++i)
- buffer[i] = buffer[i].premultiplied();
-#else
for (int i = 0; i < count; ++i)
buffer[i] = QRgba64::fromArgb32(RGBA2ARGB(src[i])).premultiplied();
-#endif
return buffer;
}
@@ -1361,6 +1380,22 @@ static void QT_FASTCALL storeGrayscale8FromARGB32PM(uchar *dest, const uint *src
dest[index + i] = qGray(qUnpremultiply(src[i]));
}
+static void QT_FASTCALL storeGrayscale16FromRGB32(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ unsigned short *d = reinterpret_cast<unsigned short *>(dest) + index;
+ for (int i = 0; i < count; ++i)
+ d[i] = qGray(src[i]) * 257;
+}
+
+static void QT_FASTCALL storeGrayscale16FromARGB32PM(uchar *dest, const uint *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ unsigned short *d = reinterpret_cast<unsigned short *>(dest) + index;
+ for (int i = 0; i < count; ++i)
+ d[i] = qGray(qUnpremultiply(src[i])) * 257;
+}
+
static const uint *QT_FASTCALL fetchRGB64ToRGB32(uint *buffer, const uchar *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *)
{
@@ -1487,7 +1522,11 @@ QPixelLayout qPixelLayouts[QImage::NImageFormats] = {
{ true, true, QPixelLayout::BPP64, nullptr,
convertPassThrough, nullptr,
fetchRGB64ToRGB32, fetchPassThrough64,
- storeRGB64FromRGB32, storeRGB64FromRGB32 } // Format_RGBA64_Premultiplied
+ storeRGB64FromRGB32, storeRGB64FromRGB32 }, // Format_RGBA64_Premultiplied
+ { false, false, QPixelLayout::BPP16, nullptr,
+ convertGrayscale16ToRGB32, convertGrayscale16ToRGBA64,
+ fetchGrayscale16ToRGB32, fetchGrayscale16ToRGBA64,
+ storeGrayscale16FromARGB32PM, storeGrayscale16FromRGB32 } // Format_Grayscale16
};
Q_STATIC_ASSERT(sizeof(qPixelLayouts) / sizeof(*qPixelLayouts) == QImage::NImageFormats);
@@ -1563,6 +1602,16 @@ static void QT_FASTCALL storeRGBA64PMFromRGBA64PM(uchar *dest, const QRgba64 *sr
memcpy(d, src, count * sizeof(QRgba64));
}
+static void QT_FASTCALL storeGray16FromRGBA64PM(uchar *dest, const QRgba64 *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ quint16 *d = reinterpret_cast<quint16*>(dest) + index;
+ for (int i = 0; i < count; ++i) {
+ QRgba64 s = src[i].unpremultiplied();
+ d[i] = qGray(s.red(), s.green(), s.blue());
+ }
+}
+
ConvertAndStorePixelsFunc64 qStoreFromRGBA64PM[QImage::NImageFormats] = {
nullptr,
nullptr,
@@ -1591,7 +1640,8 @@ ConvertAndStorePixelsFunc64 qStoreFromRGBA64PM[QImage::NImageFormats] = {
storeGenericFromRGBA64PM<QImage::Format_Grayscale8>,
storeRGBX64FromRGBA64PM,
storeRGBA64FromRGBA64PM,
- storeRGBA64PMFromRGBA64PM
+ storeRGBA64PMFromRGBA64PM,
+ storeGray16FromRGBA64PM
};
/*
@@ -1695,6 +1745,7 @@ static DestFetchProc destFetchProc[QImage::NImageFormats] =
destFetch, // Format_RGBX64
destFetch, // Format_RGBA64
destFetch, // Format_RGBA64_Premultiplied
+ destFetch, // Format_Grayscale16
};
static DestFetchProc64 destFetchProc64[QImage::NImageFormats] =
@@ -1727,6 +1778,7 @@ static DestFetchProc64 destFetchProc64[QImage::NImageFormats] =
destFetchRGB64, // Format_RGBX64
destFetch64, // Format_RGBA64
destFetchRGB64, // Format_RGBA64_Premultiplied
+ destFetch64, // Format_Grayscale16
};
/*
@@ -1880,6 +1932,7 @@ static DestStoreProc destStoreProc[QImage::NImageFormats] =
destStore, // Format_RGBX64
destStore, // Format_RGBA64
destStore, // Format_RGBA64_Premultiplied
+ destStore, // Format_Grayscale16
};
static DestStoreProc64 destStoreProc64[QImage::NImageFormats] =
@@ -1911,7 +1964,8 @@ static DestStoreProc64 destStoreProc64[QImage::NImageFormats] =
destStore64, // Format_Grayscale8
0, // Format_RGBX64
destStore64RGBA64, // Format_RGBA64
- 0 // Format_RGBA64_Premultiplied
+ 0, // Format_RGBA64_Premultiplied
+ destStore64, // Format_Grayscale16
};
/*
@@ -3838,6 +3892,7 @@ static SourceFetchProc sourceFetchUntransformed[QImage::NImageFormats] = {
fetchUntransformed, // RGBX64
fetchUntransformed, // RGBA64
fetchUntransformed, // RGBA64_Premultiplied
+ fetchUntransformed, // Grayscale16
};
static const SourceFetchProc sourceFetchGeneric[NBlendTypes] = {
@@ -4232,7 +4287,7 @@ static inline Operator getOperator(const QSpanData *data, const QSpan *spans, in
switch(data->type) {
case QSpanData::Solid:
- solidSource = data->solid.color.isOpaque();
+ solidSource = data->solidColor.isOpaque();
op.srcFetch = 0;
op.srcFetch64 = 0;
break;
@@ -4280,7 +4335,7 @@ static inline Operator getOperator(const QSpanData *data, const QSpan *spans, in
}
++spans;
}
- if (!alphaSpans) {
+ if (!alphaSpans && spanCount > 0) {
// If all spans are opaque we do not need to fetch dest.
// But don't clear passthrough destFetch as they are just as fast and save destStore.
if (op.destFetch != destFetchARGB32P)
@@ -4301,23 +4356,62 @@ static inline Operator getOperator(const QSpanData *data, const QSpan *spans, in
return op;
}
+static void spanfill_from_first(QRasterBuffer *rasterBuffer, QPixelLayout::BPP bpp, int x, int y, int length)
+{
+ switch (bpp) {
+ case QPixelLayout::BPP64: {
+ quint64 *dest = reinterpret_cast<quint64 *>(rasterBuffer->scanLine(y)) + x;
+ qt_memfill_template(dest + 1, dest[0], length - 1);
+ break;
+ }
+ case QPixelLayout::BPP32: {
+ quint32 *dest = reinterpret_cast<quint32 *>(rasterBuffer->scanLine(y)) + x;
+ qt_memfill_template(dest + 1, dest[0], length - 1);
+ break;
+ }
+ case QPixelLayout::BPP24: {
+ quint24 *dest = reinterpret_cast<quint24 *>(rasterBuffer->scanLine(y)) + x;
+ qt_memfill_template(dest + 1, dest[0], length - 1);
+ break;
+ }
+ case QPixelLayout::BPP16: {
+ quint16 *dest = reinterpret_cast<quint16 *>(rasterBuffer->scanLine(y)) + x;
+ qt_memfill_template(dest + 1, dest[0], length - 1);
+ break;
+ }
+ case QPixelLayout::BPP8: {
+ uchar *dest = rasterBuffer->scanLine(y) + x;
+ memset(dest + 1, dest[0], length - 1);
+ break;
+ }
+ default:
+ Q_UNREACHABLE();
+ }
+}
// -------------------- blend methods ---------------------
-#if !defined(Q_CC_SUN)
-static
-#endif
-void blend_color_generic(int count, const QSpan *spans, void *userData)
+static void blend_color_generic(int count, const QSpan *spans, void *userData)
{
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
uint buffer[BufferSize];
- Operator op = getOperator(data, spans, count);
- const uint color = data->solid.color.toArgb32();
+ Operator op = getOperator(data, nullptr, 0);
+ const uint color = data->solidColor.toArgb32();
+ bool solidFill = data->rasterBuffer->compositionMode == QPainter::CompositionMode_Source
+ || (data->rasterBuffer->compositionMode == QPainter::CompositionMode_SourceOver && qAlpha(color) == 255);
+ QPixelLayout::BPP bpp = qPixelLayouts[data->rasterBuffer->format].bpp;
while (count--) {
int x = spans->x;
int length = spans->len;
+ if (solidFill && bpp >= QPixelLayout::BPP8 && spans->coverage == 255 && length) {
+ // If dest doesn't matter we don't need to bother with blending or converting all the identical pixels
+ op.destStore(data->rasterBuffer, x, spans->y, &color, 1);
+ spanfill_from_first(data->rasterBuffer, bpp, x, spans->y, length);
+ length = 0;
+ }
+
while (length) {
int l = qMin(BufferSize, length);
uint *dest = op.destFetch(buffer, data->rasterBuffer, x, spans->y, l);
@@ -4335,15 +4429,15 @@ static void blend_color_argb(int count, const QSpan *spans, void *userData)
{
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
- const Operator op = getOperator(data, spans, count);
- const uint color = data->solid.color.toArgb32();
+ const Operator op = getOperator(data, nullptr, 0);
+ const uint color = data->solidColor.toArgb32();
if (op.mode == QPainter::CompositionMode_Source) {
// inline for performance
while (count--) {
uint *target = ((uint *)data->rasterBuffer->scanLine(spans->y)) + spans->x;
if (spans->coverage == 255) {
- QT_MEMFILL_UINT(target, spans->len, color);
+ qt_memfill(target, color, spans->len);
} else {
uint c = BYTE_MUL(color, spans->coverage);
int ialpha = 255 - spans->coverage;
@@ -4365,29 +4459,26 @@ static void blend_color_argb(int count, const QSpan *spans, void *userData)
void blend_color_generic_rgb64(int count, const QSpan *spans, void *userData)
{
QSpanData *data = reinterpret_cast<QSpanData *>(userData);
- Operator op = getOperator(data, spans, count);
+ Operator op = getOperator(data, nullptr, 0);
if (!op.funcSolid64) {
qCDebug(lcQtGuiDrawHelper, "blend_color_generic_rgb64: unsupported 64bit blend attempted, falling back to 32-bit");
return blend_color_generic(count, spans, userData);
}
alignas(8) QRgba64 buffer[BufferSize];
- const QRgba64 color = data->solid.color;
+ const QRgba64 color = data->solidColor;
bool solidFill = data->rasterBuffer->compositionMode == QPainter::CompositionMode_Source
|| (data->rasterBuffer->compositionMode == QPainter::CompositionMode_SourceOver && color.isOpaque());
- bool isBpp32 = qPixelLayouts[data->rasterBuffer->format].bpp == QPixelLayout::BPP32;
+ QPixelLayout::BPP bpp = qPixelLayouts[data->rasterBuffer->format].bpp;
while (count--) {
int x = spans->x;
int length = spans->len;
- if (solidFill && isBpp32 && spans->coverage == 255) {
+ if (solidFill && bpp >= QPixelLayout::BPP8 && spans->coverage == 255 && length) {
// If dest doesn't matter we don't need to bother with blending or converting all the identical pixels
- if (length > 0) {
- op.destStore64(data->rasterBuffer, x, spans->y, &color, 1);
- uint *dest = (uint*)data->rasterBuffer->scanLine(spans->y) + x;
- qt_memfill32(dest + 1, dest[0], length - 1);
- length = 0;
- }
+ op.destStore64(data->rasterBuffer, x, spans->y, &color, 1);
+ spanfill_from_first(data->rasterBuffer, bpp, x, spans->y, length);
+ length = 0;
}
while (length) {
@@ -4413,16 +4504,16 @@ static void blend_color_rgb16(int count, const QSpan *spans, void *userData)
from qt_gradient_quint16 with minimal overhead.
*/
QPainter::CompositionMode mode = data->rasterBuffer->compositionMode;
- if (mode == QPainter::CompositionMode_SourceOver && data->solid.color.isOpaque())
+ if (mode == QPainter::CompositionMode_SourceOver && data->solidColor.isOpaque())
mode = QPainter::CompositionMode_Source;
if (mode == QPainter::CompositionMode_Source) {
// inline for performance
- ushort c = data->solid.color.toRgb16();
+ ushort c = data->solidColor.toRgb16();
while (count--) {
ushort *target = ((ushort *)data->rasterBuffer->scanLine(spans->y)) + spans->x;
if (spans->coverage == 255) {
- QT_MEMFILL_USHORT(target, spans->len, c);
+ qt_memfill(target, c, spans->len);
} else {
ushort color = BYTE_MUL_RGB16(c, spans->coverage);
int ialpha = 255 - spans->coverage;
@@ -4439,7 +4530,7 @@ static void blend_color_rgb16(int count, const QSpan *spans, void *userData)
if (mode == QPainter::CompositionMode_SourceOver) {
while (count--) {
- uint color = BYTE_MUL(data->solid.color.toArgb32(), spans->coverage);
+ uint color = BYTE_MUL(data->solidColor.toArgb32(), spans->coverage);
int ialpha = qAlpha(~color);
ushort c = qConvertRgb32To16(color);
ushort *target = ((ushort *)data->rasterBuffer->scanLine(spans->y)) + spans->x;
@@ -5216,6 +5307,7 @@ void qBlendTexture(int count, const QSpan *spans, void *userData)
case QImage::Format_RGBX64:
case QImage::Format_RGBA64:
case QImage::Format_RGBA64_Premultiplied:
+ case QImage::Format_Grayscale16:
proc = processTextureSpansGeneric64[blendType];
break;
case QImage::Format_Invalid:
@@ -5228,7 +5320,111 @@ void qBlendTexture(int count, const QSpan *spans, void *userData)
proc(count, spans, userData);
}
-template <class DST> Q_STATIC_TEMPLATE_FUNCTION
+static void blend_vertical_gradient_argb(int count, const QSpan *spans, void *userData)
+{
+ QSpanData *data = reinterpret_cast<QSpanData *>(userData);
+
+ LinearGradientValues linear;
+ getLinearGradientValues(&linear, data);
+
+ CompositionFunctionSolid funcSolid =
+ functionForModeSolid[data->rasterBuffer->compositionMode];
+
+ /*
+ The logic for vertical gradient calculations is a mathematically
+ reduced copy of that in fetchLinearGradient() - which is basically:
+
+ qreal ry = data->m22 * (y + 0.5) + data->dy;
+ qreal t = linear.dy*ry + linear.off;
+ t *= (GRADIENT_STOPTABLE_SIZE - 1);
+ quint32 color =
+ qt_gradient_pixel_fixed(&data->gradient,
+ int(t * FIXPT_SIZE));
+
+ This has then been converted to fixed point to improve performance.
+ */
+ const int gss = GRADIENT_STOPTABLE_SIZE - 1;
+ int yinc = int((linear.dy * data->m22 * gss) * FIXPT_SIZE);
+ int off = int((((linear.dy * (data->m22 * qreal(0.5) + data->dy) + linear.off) * gss) * FIXPT_SIZE));
+
+ while (count--) {
+ int y = spans->y;
+ int x = spans->x;
+
+ quint32 *dst = (quint32 *)(data->rasterBuffer->scanLine(y)) + x;
+ quint32 color =
+ qt_gradient_pixel_fixed(&data->gradient, yinc * y + off);
+
+ funcSolid(dst, spans->len, color, spans->coverage);
+ ++spans;
+ }
+}
+
+template<ProcessSpans blend_color>
+static void blend_vertical_gradient(int count, const QSpan *spans, void *userData)
+{
+ QSpanData *data = reinterpret_cast<QSpanData *>(userData);
+
+ LinearGradientValues linear;
+ getLinearGradientValues(&linear, data);
+
+ // Based on the same logic as blend_vertical_gradient_argb.
+
+ const int gss = GRADIENT_STOPTABLE_SIZE - 1;
+ int yinc = int((linear.dy * data->m22 * gss) * FIXPT_SIZE);
+ int off = int((((linear.dy * (data->m22 * qreal(0.5) + data->dy) + linear.off) * gss) * FIXPT_SIZE));
+
+ while (count--) {
+ int y = spans->y;
+
+ data->solidColor = qt_gradient_pixel64_fixed(&data->gradient, yinc * y + off);
+ blend_color(1, spans, userData);
+ ++spans;
+ }
+}
+
+void qBlendGradient(int count, const QSpan *spans, void *userData)
+{
+ QSpanData *data = reinterpret_cast<QSpanData *>(userData);
+ bool isVerticalGradient =
+ data->txop <= QTransform::TxScale &&
+ data->type == QSpanData::LinearGradient &&
+ data->gradient.linear.end.x == data->gradient.linear.origin.x;
+ switch (data->rasterBuffer->format) {
+ case QImage::Format_RGB16:
+ if (isVerticalGradient)
+ return blend_vertical_gradient<blend_color_rgb16>(count, spans, userData);
+ return blend_src_generic(count, spans, userData);
+ case QImage::Format_RGB32:
+ case QImage::Format_ARGB32_Premultiplied:
+ if (isVerticalGradient)
+ return blend_vertical_gradient_argb(count, spans, userData);
+ return blend_src_generic(count, spans, userData);
+#if defined(__SSE2__) || defined(__ARM_NEON__) || (Q_PROCESSOR_WORDSIZE == 8)
+ case QImage::Format_ARGB32:
+ case QImage::Format_RGBA8888:
+#endif
+ case QImage::Format_BGR30:
+ case QImage::Format_A2BGR30_Premultiplied:
+ case QImage::Format_RGB30:
+ case QImage::Format_A2RGB30_Premultiplied:
+ case QImage::Format_RGBX64:
+ case QImage::Format_RGBA64:
+ case QImage::Format_RGBA64_Premultiplied:
+ if (isVerticalGradient)
+ return blend_vertical_gradient<blend_color_generic_rgb64>(count, spans, userData);
+ return blend_src_generic_rgb64(count, spans, userData);
+ case QImage::Format_Invalid:
+ break;
+ default:
+ if (isVerticalGradient)
+ return blend_vertical_gradient<blend_color_generic>(count, spans, userData);
+ return blend_src_generic(count, spans, userData);
+ }
+ Q_UNREACHABLE();
+}
+
+template <class DST> static
inline void qt_bitmapblit_template(QRasterBuffer *rasterBuffer,
int x, int y, DST color,
const uchar *map,
@@ -5290,103 +5486,6 @@ inline void qt_bitmapblit_template(QRasterBuffer *rasterBuffer,
}
}
-static void qt_gradient_argb32(int count, const QSpan *spans, void *userData)
-{
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- bool isVerticalGradient =
- data->txop <= QTransform::TxScale &&
- data->type == QSpanData::LinearGradient &&
- data->gradient.linear.end.x == data->gradient.linear.origin.x;
-
- if (isVerticalGradient) {
- LinearGradientValues linear;
- getLinearGradientValues(&linear, data);
-
- CompositionFunctionSolid funcSolid =
- functionForModeSolid[data->rasterBuffer->compositionMode];
-
- /*
- The logic for vertical gradient calculations is a mathematically
- reduced copy of that in fetchLinearGradient() - which is basically:
-
- qreal ry = data->m22 * (y + 0.5) + data->dy;
- qreal t = linear.dy*ry + linear.off;
- t *= (GRADIENT_STOPTABLE_SIZE - 1);
- quint32 color =
- qt_gradient_pixel_fixed(&data->gradient,
- int(t * FIXPT_SIZE));
-
- This has then been converted to fixed point to improve performance.
- */
- const int gss = GRADIENT_STOPTABLE_SIZE - 1;
- int yinc = int((linear.dy * data->m22 * gss) * FIXPT_SIZE);
- int off = int((((linear.dy * (data->m22 * qreal(0.5) + data->dy) + linear.off) * gss) * FIXPT_SIZE));
-
- while (count--) {
- int y = spans->y;
- int x = spans->x;
-
- quint32 *dst = (quint32 *)(data->rasterBuffer->scanLine(y)) + x;
- quint32 color =
- qt_gradient_pixel_fixed(&data->gradient, yinc * y + off);
-
- funcSolid(dst, spans->len, color, spans->coverage);
- ++spans;
- }
-
- } else {
- blend_src_generic(count, spans, userData);
- }
-}
-
-static void qt_gradient_quint16(int count, const QSpan *spans, void *userData)
-{
- QSpanData *data = reinterpret_cast<QSpanData *>(userData);
-
- bool isVerticalGradient =
- data->txop <= QTransform::TxScale &&
- data->type == QSpanData::LinearGradient &&
- data->gradient.linear.end.x == data->gradient.linear.origin.x;
-
- if (isVerticalGradient) {
-
- LinearGradientValues linear;
- getLinearGradientValues(&linear, data);
-
- /*
- The logic for vertical gradient calculations is a mathematically
- reduced copy of that in fetchLinearGradient() - which is basically:
-
- qreal ry = data->m22 * (y + 0.5) + data->dy;
- qreal t = linear.dy*ry + linear.off;
- t *= (GRADIENT_STOPTABLE_SIZE - 1);
- quint32 color =
- qt_gradient_pixel_fixed(&data->gradient,
- int(t * FIXPT_SIZE));
-
- This has then been converted to fixed point to improve performance.
- */
- const int gss = GRADIENT_STOPTABLE_SIZE - 1;
- int yinc = int((linear.dy * data->m22 * gss) * FIXPT_SIZE);
- int off = int((((linear.dy * (data->m22 * qreal(0.5) + data->dy) + linear.off) * gss) * FIXPT_SIZE));
-
- // Save the fillData since we overwrite it when setting solid.color.
- QGradientData gradient = data->gradient;
- while (count--) {
- int y = spans->y;
-
- data->solid.color = QRgba64::fromArgb32(qt_gradient_pixel_fixed(&gradient, yinc * y + off));
- blend_color_rgb16(1, spans, userData);
- ++spans;
- }
- data->gradient = gradient;
-
- } else {
- blend_src_generic(count, spans, userData);
- }
-}
-
inline static void qt_bitmapblit_argb32(QRasterBuffer *rasterBuffer,
int x, int y, const QRgba64 &color,
const uchar *map,
@@ -6007,29 +6106,25 @@ static void qt_rectfill_quint64(QRasterBuffer *rasterBuffer,
DrawHelper qDrawHelper[QImage::NImageFormats] =
{
// Format_Invalid,
- { 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
// Format_Mono,
{
blend_color_generic,
- blend_src_generic,
0, 0, 0, 0
},
// Format_MonoLSB,
{
blend_color_generic,
- blend_src_generic,
0, 0, 0, 0
},
// Format_Indexed8,
{
blend_color_generic,
- blend_src_generic,
0, 0, 0, 0
},
// Format_RGB32,
{
blend_color_argb,
- qt_gradient_argb32,
qt_bitmapblit_argb32,
qt_alphamapblit_argb32,
qt_alphargbblit_argb32,
@@ -6038,7 +6133,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB32,
{
blend_color_generic,
- blend_src_generic,
qt_bitmapblit_argb32,
qt_alphamapblit_argb32,
qt_alphargbblit_argb32,
@@ -6047,7 +6141,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB32_Premultiplied
{
blend_color_argb,
- qt_gradient_argb32,
qt_bitmapblit_argb32,
qt_alphamapblit_argb32,
qt_alphargbblit_argb32,
@@ -6056,7 +6149,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB16
{
blend_color_rgb16,
- qt_gradient_quint16,
qt_bitmapblit_quint16,
qt_alphamapblit_quint16,
qt_alphargbblit_generic,
@@ -6065,7 +6157,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB8565_Premultiplied
{
blend_color_generic,
- blend_src_generic,
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6074,7 +6165,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB666
{
blend_color_generic,
- blend_src_generic,
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6083,7 +6173,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB6666_Premultiplied
{
blend_color_generic,
- blend_src_generic,
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6092,7 +6181,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB555
{
blend_color_generic,
- blend_src_generic,
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6101,7 +6189,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB8555_Premultiplied
{
blend_color_generic,
- blend_src_generic,
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6110,7 +6197,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB888
{
blend_color_generic,
- blend_src_generic,
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6119,7 +6205,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB444
{
blend_color_generic,
- blend_src_generic,
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6128,7 +6213,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB4444_Premultiplied
{
blend_color_generic,
- blend_src_generic,
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6137,7 +6221,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGBX8888
{
blend_color_generic,
- blend_src_generic,
qt_bitmapblit_rgba8888,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6146,7 +6229,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGBA8888
{
blend_color_generic,
- blend_src_generic,
qt_bitmapblit_rgba8888,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6155,7 +6237,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB8888_Premultiplied
{
blend_color_generic,
- blend_src_generic,
qt_bitmapblit_rgba8888,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6164,7 +6245,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_BGR30
{
blend_color_generic_rgb64,
- blend_src_generic_rgb64,
qt_bitmapblit_rgb30<PixelOrderBGR>,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6173,7 +6253,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_A2BGR30_Premultiplied
{
blend_color_generic_rgb64,
- blend_src_generic_rgb64,
qt_bitmapblit_rgb30<PixelOrderBGR>,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6182,7 +6261,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB30
{
blend_color_generic_rgb64,
- blend_src_generic_rgb64,
qt_bitmapblit_rgb30<PixelOrderRGB>,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6191,7 +6269,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_A2RGB30_Premultiplied
{
blend_color_generic_rgb64,
- blend_src_generic_rgb64,
qt_bitmapblit_rgb30<PixelOrderRGB>,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6200,7 +6277,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_Alpha8
{
blend_color_generic,
- blend_src_generic,
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6209,7 +6285,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_Grayscale8
{
blend_color_generic,
- blend_src_generic,
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6218,7 +6293,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGBX64
{
blend_color_generic_rgb64,
- blend_src_generic_rgb64,
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6227,7 +6301,6 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGBA64
{
blend_color_generic_rgb64,
- blend_src_generic_rgb64,
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
@@ -6236,82 +6309,98 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGBA64_Premultiplied
{
blend_color_generic_rgb64,
- blend_src_generic_rgb64,
0,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint64
},
+ // Format_Grayscale16
+ {
+ blend_color_generic_rgb64,
+ 0,
+ qt_alphamapblit_generic,
+ qt_alphargbblit_generic,
+ qt_rectfill_quint16
+ },
};
-#if defined(Q_CC_MSVC) && !defined(_MIPS_)
-template <class T>
-inline void qt_memfill_template(T *dest, T color, int count)
+#if !defined(__SSE2__)
+void qt_memfill64(quint64 *dest, quint64 color, qsizetype count)
{
- while (count--)
- *dest++ = color;
+ qt_memfill_template<quint64>(dest, color, count);
}
+#endif
-#else
-
-template <class T>
-inline void qt_memfill_template(T *dest, T color, int count)
+#if defined(QT_COMPILER_SUPPORTS_SSSE3) && defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG)
+__attribute__((optimize("no-tree-vectorize")))
+#endif
+void qt_memfill24(quint24 *dest, quint24 color, qsizetype count)
{
- int n = (count + 7) / 8;
- switch (count & 0x07)
- {
- case 0: do { *dest++ = color; Q_FALLTHROUGH();
- case 7: *dest++ = color; Q_FALLTHROUGH();
- case 6: *dest++ = color; Q_FALLTHROUGH();
- case 5: *dest++ = color; Q_FALLTHROUGH();
- case 4: *dest++ = color; Q_FALLTHROUGH();
- case 3: *dest++ = color; Q_FALLTHROUGH();
- case 2: *dest++ = color; Q_FALLTHROUGH();
- case 1: *dest++ = color;
- } while (--n > 0);
- }
-}
+# ifdef QT_COMPILER_SUPPORTS_SSSE3
+ extern void qt_memfill24_ssse3(quint24 *, quint24, qsizetype);
+ if (qCpuHasFeature(SSSE3))
+ return qt_memfill24_ssse3(dest, color, count);
+# endif
-template <>
-inline void qt_memfill_template(quint16 *dest, quint16 value, int count)
-{
- if (count < 3) {
- switch (count) {
- case 2: *dest++ = value; Q_FALLTHROUGH();
- case 1: *dest = value;
- }
+ const quint32 v = color;
+ quint24 *end = dest + count;
+
+ // prolog: align dest to 32bit
+ while ((quintptr(dest) & 0x3) && dest < end) {
+ *dest++ = v;
+ }
+ if (dest >= end)
return;
+
+ const uint val1 = qFromBigEndian((v << 8) | (v >> 16));
+ const uint val2 = qFromBigEndian((v << 16) | (v >> 8));
+ const uint val3 = qFromBigEndian((v << 24) | (v >> 0));
+
+ for ( ; dest <= (end - 4); dest += 4) {
+ quint32 *dst = reinterpret_cast<quint32 *>(dest);
+ dst[0] = val1;
+ dst[1] = val2;
+ dst[2] = val3;
}
- const int align = (quintptr)(dest) & 0x3;
- switch (align) {
- case 2: *dest++ = value; --count;
+ // less than 4px left
+ switch (end - dest) {
+ case 3:
+ *dest++ = v;
+ Q_FALLTHROUGH();
+ case 2:
+ *dest++ = v;
+ Q_FALLTHROUGH();
+ case 1:
+ *dest++ = v;
+ }
+}
+
+void qt_memfill16(quint16 *dest, quint16 value, qsizetype count)
+{
+ const int align = quintptr(dest) & 0x3;
+ if (align) {
+ *dest++ = value;
+ --count;
}
- const quint32 value32 = (value << 16) | value;
- qt_memfill(reinterpret_cast<quint32*>(dest), value32, count / 2);
if (count & 0x1)
dest[count - 1] = value;
-}
-#endif
-void qt_memfill64(quint64 *dest, quint64 color, int count)
-{
- qt_memfill_template<quint64>(dest, color, count);
+ const quint32 value32 = (value << 16) | value;
+ qt_memfill32(reinterpret_cast<quint32*>(dest), value32, count / 2);
}
-#if !defined(__SSE2__)
-void qt_memfill16(quint16 *dest, quint16 color, int count)
-{
- qt_memfill_template<quint16>(dest, color, count);
-}
-#endif
#if !defined(__SSE2__) && !defined(__ARM_NEON__) && !defined(__MIPS_DSP__)
-void qt_memfill32(quint32 *dest, quint32 color, int count)
+void qt_memfill32(quint32 *dest, quint32 color, qsizetype count)
{
qt_memfill_template<quint32>(dest, color, count);
}
#endif
+#ifdef __SSE2__
+decltype(qt_memfill32_sse2) *qt_memfill32 = nullptr;
+decltype(qt_memfill64_sse2) *qt_memfill64 = nullptr;
+#endif
#ifdef QT_COMPILER_SUPPORTS_SSE4_1
template<QtPixelOrder> void QT_FASTCALL storeA2RGB30PMFromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count, const QVector<QRgb> *, QDitherInfo *);
@@ -6325,6 +6414,10 @@ static void qInitDrawhelperFunctions()
qInitBlendFunctions();
#ifdef __SSE2__
+# ifndef __AVX2__
+ qt_memfill32 = qt_memfill32_sse2;
+ qt_memfill64 = qt_memfill64_sse2;
+# endif
qDrawHelper[QImage::Format_RGB32].bitmapBlit = qt_bitmapblit32_sse2;
qDrawHelper[QImage::Format_ARGB32].bitmapBlit = qt_bitmapblit32_sse2;
qDrawHelper[QImage::Format_ARGB32_Premultiplied].bitmapBlit = qt_bitmapblit32_sse2;
@@ -6401,6 +6494,14 @@ static void qInitDrawhelperFunctions()
const QVector<QRgb> *, QDitherInfo *);
extern const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_sse4(uint *buffer, const uchar *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *);
+ extern const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_sse4(QRgba64 *buffer, const uint *src, int count,
+ const QVector<QRgb> *, QDitherInfo *);
+ extern const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_sse4(QRgba64 *buffer, const uint *src, int count,
+ const QVector<QRgb> *, QDitherInfo *);
+ extern const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_sse4(QRgba64 *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *);
+ extern const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_sse4(QRgba64 *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *);
extern void QT_FASTCALL storeARGB32FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *);
extern void QT_FASTCALL storeRGBA8888FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
@@ -6413,10 +6514,18 @@ static void qInitDrawhelperFunctions()
const QVector<QRgb> *, QDitherInfo *);
extern void QT_FASTCALL destStore64ARGB32_sse4(QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 *buffer, int length);
extern void QT_FASTCALL destStore64RGBA8888_sse4(QRasterBuffer *rasterBuffer, int x, int y, const QRgba64 *buffer, int length);
+# ifndef __AVX2__
qPixelLayouts[QImage::Format_ARGB32].fetchToARGB32PM = fetchARGB32ToARGB32PM_sse4;
qPixelLayouts[QImage::Format_ARGB32].convertToARGB32PM = convertARGB32ToARGB32PM_sse4;
qPixelLayouts[QImage::Format_RGBA8888].fetchToARGB32PM = fetchRGBA8888ToARGB32PM_sse4;
qPixelLayouts[QImage::Format_RGBA8888].convertToARGB32PM = convertRGBA8888ToARGB32PM_sse4;
+ qPixelLayouts[QImage::Format_ARGB32].fetchToRGBA64PM = fetchARGB32ToRGBA64PM_sse4;
+ qPixelLayouts[QImage::Format_ARGB32].convertToRGBA64PM = convertARGB32ToRGBA64PM_sse4;
+ qPixelLayouts[QImage::Format_RGBA8888].fetchToRGBA64PM = fetchRGBA8888ToRGBA64PM_sse4;
+ qPixelLayouts[QImage::Format_RGBA8888].convertToRGBA64PM = convertRGBA8888ToRGBA64PM_sse4;
+ qPixelLayouts[QImage::Format_RGBX8888].fetchToRGBA64PM = fetchRGBA8888ToRGBA64PM_sse4;
+ qPixelLayouts[QImage::Format_RGBX8888].convertToRGBA64PM = convertRGBA8888ToRGBA64PM_sse4;
+# endif
qPixelLayouts[QImage::Format_ARGB32].storeFromARGB32PM = storeARGB32FromARGB32PM_sse4;
qPixelLayouts[QImage::Format_RGBA8888].storeFromARGB32PM = storeRGBA8888FromARGB32PM_sse4;
qPixelLayouts[QImage::Format_RGBX8888].storeFromARGB32PM = storeRGBXFromARGB32PM_sse4;
@@ -6431,6 +6540,8 @@ static void qInitDrawhelperFunctions()
#if defined(QT_COMPILER_SUPPORTS_AVX2)
if (qCpuHasFeature(ArchHaswell)) {
+ qt_memfill32 = qt_memfill32_avx2;
+ qt_memfill64 = qt_memfill64_avx2;
extern void qt_blend_rgb32_on_rgb32_avx2(uchar *destPixels, int dbpl,
const uchar *srcPixels, int sbpl,
int w, int h, int const_alpha);
@@ -6470,6 +6581,26 @@ static void qInitDrawhelperFunctions()
bilinearFastTransformHelperARGB32PM[0][SimpleScaleTransform] = fetchTransformedBilinearARGB32PM_simple_scale_helper_avx2;
bilinearFastTransformHelperARGB32PM[0][DownscaleTransform] = fetchTransformedBilinearARGB32PM_downscale_helper_avx2;
bilinearFastTransformHelperARGB32PM[0][FastRotateTransform] = fetchTransformedBilinearARGB32PM_fast_rotate_helper_avx2;
+
+ extern void QT_FASTCALL convertARGB32ToARGB32PM_avx2(uint *buffer, int count, const QVector<QRgb> *);
+ extern void QT_FASTCALL convertRGBA8888ToARGB32PM_avx2(uint *buffer, int count, const QVector<QRgb> *);
+ extern const uint *QT_FASTCALL fetchARGB32ToARGB32PM_avx2(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *);
+ extern const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_avx2(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *);
+ qPixelLayouts[QImage::Format_ARGB32].fetchToARGB32PM = fetchARGB32ToARGB32PM_avx2;
+ qPixelLayouts[QImage::Format_ARGB32].convertToARGB32PM = convertARGB32ToARGB32PM_avx2;
+ qPixelLayouts[QImage::Format_RGBA8888].fetchToARGB32PM = fetchRGBA8888ToARGB32PM_avx2;
+ qPixelLayouts[QImage::Format_RGBA8888].convertToARGB32PM = convertRGBA8888ToARGB32PM_avx2;
+
+ extern const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_avx2(QRgba64 *, const uint *, int, const QVector<QRgb> *, QDitherInfo *);
+ extern const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_avx2(QRgba64 *, const uint *, int count, const QVector<QRgb> *, QDitherInfo *);
+ extern const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_avx2(QRgba64 *, const uchar *, int, int, const QVector<QRgb> *, QDitherInfo *);
+ extern const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_avx2(QRgba64 *, const uchar *, int, int, const QVector<QRgb> *, QDitherInfo *);
+ qPixelLayouts[QImage::Format_ARGB32].convertToRGBA64PM = convertARGB32ToRGBA64PM_avx2;
+ qPixelLayouts[QImage::Format_RGBX8888].convertToRGBA64PM = convertRGBA8888ToRGBA64PM_avx2;
+ qPixelLayouts[QImage::Format_ARGB32].fetchToRGBA64PM = fetchARGB32ToRGBA64PM_avx2;
+ qPixelLayouts[QImage::Format_RGBX8888].fetchToRGBA64PM = fetchRGBA8888ToRGBA64PM_avx2;
}
#endif
@@ -6505,6 +6636,14 @@ static void qInitDrawhelperFunctions()
const QVector<QRgb> *, QDitherInfo *);
extern const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_neon(uint *buffer, const uchar *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *);
+ extern const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_neon(QRgba64 *buffer, const uint *src, int count,
+ const QVector<QRgb> *, QDitherInfo *);
+ extern const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_neon(QRgba64 *buffer, const uint *src, int count,
+ const QVector<QRgb> *, QDitherInfo *);
+ extern const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_neon(QRgba64 *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *);
+ extern const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_neon(QRgba64 *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *);
extern void QT_FASTCALL storeARGB32FromARGB32PM_neon(uchar *dest, const uint *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *);
extern void QT_FASTCALL storeRGBA8888FromARGB32PM_neon(uchar *dest, const uint *src, int index, int count,
@@ -6514,10 +6653,16 @@ static void qInitDrawhelperFunctions()
qPixelLayouts[QImage::Format_ARGB32].fetchToARGB32PM = fetchARGB32ToARGB32PM_neon;
qPixelLayouts[QImage::Format_ARGB32].convertToARGB32PM = convertARGB32ToARGB32PM_neon;
qPixelLayouts[QImage::Format_ARGB32].storeFromARGB32PM = storeARGB32FromARGB32PM_neon;
+ qPixelLayouts[QImage::Format_ARGB32].fetchToRGBA64PM = fetchARGB32ToRGBA64PM_neon;
+ qPixelLayouts[QImage::Format_ARGB32].convertToRGBA64PM = convertARGB32ToRGBA64PM_neon;
qPixelLayouts[QImage::Format_RGBA8888].fetchToARGB32PM = fetchRGBA8888ToARGB32PM_neon;
qPixelLayouts[QImage::Format_RGBA8888].convertToARGB32PM = convertRGBA8888ToARGB32PM_neon;
qPixelLayouts[QImage::Format_RGBA8888].storeFromARGB32PM = storeRGBA8888FromARGB32PM_neon;
+ qPixelLayouts[QImage::Format_RGBA8888].fetchToRGBA64PM = fetchRGBA8888ToRGBA64PM_neon;
+ qPixelLayouts[QImage::Format_RGBA8888].convertToRGBA64PM = convertRGBA8888ToRGBA64PM_neon;
qPixelLayouts[QImage::Format_RGBX8888].storeFromARGB32PM = storeRGBXFromARGB32PM_neon;
+ qPixelLayouts[QImage::Format_RGBX8888].fetchToRGBA64PM = fetchRGBA8888ToRGBA64PM_neon;
+ qPixelLayouts[QImage::Format_RGBX8888].convertToRGBA64PM = convertRGBA8888ToRGBA64PM_neon;
#endif
#if defined(ENABLE_PIXMAN_DRAWHELPERS)
diff --git a/src/gui/painting/qdrawhelper_avx2.cpp b/src/gui/painting/qdrawhelper_avx2.cpp
index ec6643deed..8c69e21569 100644
--- a/src/gui/painting/qdrawhelper_avx2.cpp
+++ b/src/gui/painting/qdrawhelper_avx2.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -38,6 +39,7 @@
****************************************************************************/
#include "qdrawhelper_p.h"
+#include "qdrawhelper_x86_p.h"
#include "qdrawingprimitive_sse2_p.h"
#include "qrgba64_p.h"
@@ -53,7 +55,8 @@ enum {
// Vectorized blend functions:
// See BYTE_MUL_SSE2 for details.
-inline static void BYTE_MUL_AVX2(__m256i &pixelVector, const __m256i &alphaChannel, const __m256i &colorMask, const __m256i &half)
+inline static void Q_DECL_VECTORCALL
+BYTE_MUL_AVX2(__m256i &pixelVector, __m256i alphaChannel, __m256i colorMask, __m256i half)
{
__m256i pixelVectorAG = _mm256_srli_epi16(pixelVector, 8);
__m256i pixelVectorRB = _mm256_and_si256(pixelVector, colorMask);
@@ -72,7 +75,8 @@ inline static void BYTE_MUL_AVX2(__m256i &pixelVector, const __m256i &alphaChann
pixelVector = _mm256_or_si256(pixelVectorAG, pixelVectorRB);
}
-inline static void BYTE_MUL_RGB64_AVX2(__m256i &pixelVector, const __m256i &alphaChannel, const __m256i &colorMask, const __m256i &half)
+inline static void Q_DECL_VECTORCALL
+BYTE_MUL_RGB64_AVX2(__m256i &pixelVector, __m256i alphaChannel, __m256i colorMask, __m256i half)
{
__m256i pixelVectorAG = _mm256_srli_epi32(pixelVector, 16);
__m256i pixelVectorRB = _mm256_and_si256(pixelVector, colorMask);
@@ -92,7 +96,8 @@ inline static void BYTE_MUL_RGB64_AVX2(__m256i &pixelVector, const __m256i &alph
}
// See INTERPOLATE_PIXEL_255_SSE2 for details.
-inline static void INTERPOLATE_PIXEL_255_AVX2(const __m256i &srcVector, __m256i &dstVector, const __m256i &alphaChannel, const __m256i &oneMinusAlphaChannel, const __m256i &colorMask, const __m256i &half)
+inline static void Q_DECL_VECTORCALL
+INTERPOLATE_PIXEL_255_AVX2(__m256i srcVector, __m256i &dstVector, __m256i alphaChannel, __m256i oneMinusAlphaChannel, __m256i colorMask, __m256i half)
{
const __m256i srcVectorAG = _mm256_srli_epi16(srcVector, 8);
const __m256i dstVectorAG = _mm256_srli_epi16(dstVector, 8);
@@ -114,7 +119,8 @@ inline static void INTERPOLATE_PIXEL_255_AVX2(const __m256i &srcVector, __m256i
dstVector = _mm256_or_si256(finalAG, finalRB);
}
-inline static void INTERPOLATE_PIXEL_RGB64_AVX2(const __m256i &srcVector, __m256i &dstVector, const __m256i &alphaChannel, const __m256i &oneMinusAlphaChannel, const __m256i &colorMask, const __m256i &half)
+inline static void Q_DECL_VECTORCALL
+INTERPOLATE_PIXEL_RGB64_AVX2(__m256i srcVector, __m256i &dstVector, __m256i alphaChannel, __m256i oneMinusAlphaChannel, __m256i colorMask, __m256i half)
{
const __m256i srcVectorAG = _mm256_srli_epi32(srcVector, 16);
const __m256i dstVectorAG = _mm256_srli_epi32(dstVector, 16);
@@ -138,7 +144,7 @@ inline static void INTERPOLATE_PIXEL_RGB64_AVX2(const __m256i &srcVector, __m256
// See BLEND_SOURCE_OVER_ARGB32_SSE2 for details.
-inline static void BLEND_SOURCE_OVER_ARGB32_AVX2(quint32 *dst, const quint32 *src, const int length)
+inline static void Q_DECL_VECTORCALL BLEND_SOURCE_OVER_ARGB32_AVX2(quint32 *dst, const quint32 *src, const int length)
{
const __m256i half = _mm256_set1_epi16(0x80);
const __m256i one = _mm256_set1_epi16(0xff);
@@ -209,7 +215,8 @@ inline static void BLEND_SOURCE_OVER_ARGB32_AVX2(quint32 *dst, const quint32 *sr
// See BLEND_SOURCE_OVER_ARGB32_WITH_CONST_ALPHA_SSE2 for details.
-inline static void BLEND_SOURCE_OVER_ARGB32_WITH_CONST_ALPHA_AVX2(quint32 *dst, const quint32 *src, const int length, const int const_alpha)
+inline static void Q_DECL_VECTORCALL
+BLEND_SOURCE_OVER_ARGB32_WITH_CONST_ALPHA_AVX2(quint32 *dst, const quint32 *src, const int length, const int const_alpha)
{
int x = 0;
@@ -316,6 +323,66 @@ void qt_blend_rgb32_on_rgb32_avx2(uchar *destPixels, int dbpl,
}
}
+static Q_NEVER_INLINE
+void Q_DECL_VECTORCALL qt_memfillXX_avx2(uchar *dest, __m256i value256, qsizetype bytes)
+{
+ __m128i value128 = _mm256_castsi256_si128(value256);
+
+ // main body
+ __m256i *dst256 = reinterpret_cast<__m256i *>(dest);
+ uchar *end = dest + bytes;
+ while (reinterpret_cast<uchar *>(dst256 + 4) <= end) {
+ _mm256_storeu_si256(dst256 + 0, value256);
+ _mm256_storeu_si256(dst256 + 1, value256);
+ _mm256_storeu_si256(dst256 + 2, value256);
+ _mm256_storeu_si256(dst256 + 3, value256);
+ dst256 += 4;
+ }
+
+ // first epilogue: fewer than 128 bytes / 32 entries
+ bytes = end - reinterpret_cast<uchar *>(dst256);
+ switch (bytes / sizeof(value256)) {
+ case 3: _mm256_storeu_si256(dst256++, value256); Q_FALLTHROUGH();
+ case 2: _mm256_storeu_si256(dst256++, value256); Q_FALLTHROUGH();
+ case 1: _mm256_storeu_si256(dst256++, value256);
+ }
+
+ // second epilogue: fewer than 32 bytes
+ __m128i *dst128 = reinterpret_cast<__m128i *>(dst256);
+ if (bytes & sizeof(value128))
+ _mm_storeu_si128(dst128++, value128);
+
+ // third epilogue: fewer than 16 bytes
+ if (bytes & 8)
+ _mm_storel_epi64(reinterpret_cast<__m128i *>(end - 8), value128);
+}
+
+void qt_memfill64_avx2(quint64 *dest, quint64 value, qsizetype count)
+{
+#if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
+ // work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80820
+ __m128i value64 = _mm_set_epi64x(0, value); // _mm_cvtsi64_si128(value);
+# ifdef Q_PROCESSOR_X86_64
+ asm ("" : "+x" (value64));
+# endif
+ __m256i value256 = _mm256_broadcastq_epi64(value64);
+#else
+ __m256i value256 = _mm256_set1_epi64x(value);
+#endif
+
+ qt_memfillXX_avx2(reinterpret_cast<uchar *>(dest), value256, count * sizeof(quint64));
+}
+
+void qt_memfill32_avx2(quint32 *dest, quint32 value, qsizetype count)
+{
+ if (count % 2) {
+ // odd number of pixels, round to even
+ *dest++ = value;
+ --count;
+ }
+ qt_memfillXX_avx2(reinterpret_cast<uchar *>(dest), _mm256_set1_epi32(value), count * sizeof(quint32));
+}
+
void QT_FASTCALL comp_func_SourceOver_avx2(uint *destPixels, const uint *srcPixels, int length, uint const_alpha)
{
Q_ASSERT(const_alpha < 256);
@@ -928,6 +995,237 @@ void QT_FASTCALL fetchTransformedBilinearARGB32PM_fast_rotate_helper_avx2(uint *
}
}
+static inline __m128i maskFromCount(qsizetype count)
+{
+ Q_ASSERT(count > 0);
+ static const qint64 data[] = { -1, -1, 0, 0 };
+ auto ptr = reinterpret_cast<const quint8 *>(data) + sizeof(__m128i);
+
+ if (count > int(sizeof(__m128i)))
+ return _mm_set1_epi8(-1);
+
+ return _mm_loadu_si128(reinterpret_cast<const __m128i *>(ptr - count));
+}
+
+template<bool RGBA>
+static void convertARGBToARGB32PM_avx2(uint *buffer, const uint *src, qsizetype count)
+{
+ qsizetype i = 0;
+ const __m256i alphaMask = _mm256_set1_epi32(0xff000000);
+ const __m256i rgbaMask = _mm256_broadcastsi128_si256(_mm_setr_epi8(2, 1, 0, 3, 6, 5, 4, 7, 10, 9, 8, 11, 14, 13, 12, 15));
+ const __m256i shuffleMask = _mm256_broadcastsi128_si256(_mm_setr_epi8(6, 7, 6, 7, 6, 7, 6, 7, 14, 15, 14, 15, 14, 15, 14, 15));
+ const __m256i half = _mm256_set1_epi16(0x0080);
+ const __m256i zero = _mm256_setzero_si256();
+
+ for (; i < count - 7; i += 8) {
+ __m256i srcVector = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(src + i));
+ if (!_mm256_testz_si256(srcVector, alphaMask)) {
+ // keep the two _mm_test[zc]_siXXX next to each other
+ bool cf = _mm256_testc_si256(srcVector, alphaMask);
+ if (RGBA)
+ srcVector = _mm256_shuffle_epi8(srcVector, rgbaMask);
+ if (!cf) {
+ __m256i src1 = _mm256_unpacklo_epi8(srcVector, zero);
+ __m256i src2 = _mm256_unpackhi_epi8(srcVector, zero);
+ __m256i alpha1 = _mm256_shuffle_epi8(src1, shuffleMask);
+ __m256i alpha2 = _mm256_shuffle_epi8(src2, shuffleMask);
+ src1 = _mm256_mullo_epi16(src1, alpha1);
+ src2 = _mm256_mullo_epi16(src2, alpha2);
+ src1 = _mm256_add_epi16(src1, _mm256_srli_epi16(src1, 8));
+ src2 = _mm256_add_epi16(src2, _mm256_srli_epi16(src2, 8));
+ src1 = _mm256_add_epi16(src1, half);
+ src2 = _mm256_add_epi16(src2, half);
+ src1 = _mm256_srli_epi16(src1, 8);
+ src2 = _mm256_srli_epi16(src2, 8);
+ src1 = _mm256_blend_epi16(src1, alpha1, 0x88);
+ src2 = _mm256_blend_epi16(src2, alpha2, 0x88);
+ srcVector = _mm256_packus_epi16(src1, src2);
+ _mm256_storeu_si256(reinterpret_cast<__m256i *>(buffer + i), srcVector);
+ } else {
+ if (buffer != src || RGBA)
+ _mm256_storeu_si256(reinterpret_cast<__m256i *>(buffer + i), srcVector);
+ }
+ } else {
+ _mm256_storeu_si256(reinterpret_cast<__m256i *>(buffer + i), zero);
+ }
+ }
+
+ for ( ; i < count; i += 4) {
+ __m128i maskedAlphaMask = _mm256_castsi256_si128(alphaMask);
+ __m128i mask = maskFromCount((count - i) * sizeof(*src));
+ maskedAlphaMask = _mm_and_si128(mask, maskedAlphaMask);
+ __m128i srcVector = _mm_maskload_epi32(reinterpret_cast<const int *>(src), mask);
+
+ if (!_mm_testz_si128(srcVector, maskedAlphaMask)) {
+ // keep the two _mm_test[zc]_siXXX next to each other
+ bool cf = _mm_testc_si128(srcVector, maskedAlphaMask);
+ if (RGBA)
+ srcVector = _mm_shuffle_epi8(srcVector, _mm256_castsi256_si128(rgbaMask));
+ if (!cf) {
+ __m128i src1 = _mm_unpacklo_epi8(srcVector, _mm256_castsi256_si128(zero));
+ __m128i src2 = _mm_unpackhi_epi8(srcVector, _mm256_castsi256_si128(zero));
+ __m128i alpha1 = _mm_shuffle_epi8(src1, _mm256_castsi256_si128(shuffleMask));
+ __m128i alpha2 = _mm_shuffle_epi8(src2, _mm256_castsi256_si128(shuffleMask));
+ src1 = _mm_mullo_epi16(src1, alpha1);
+ src2 = _mm_mullo_epi16(src2, alpha2);
+ src1 = _mm_add_epi16(src1, _mm_srli_epi16(src1, 8));
+ src2 = _mm_add_epi16(src2, _mm_srli_epi16(src2, 8));
+ src1 = _mm_add_epi16(src1, _mm256_castsi256_si128(half));
+ src2 = _mm_add_epi16(src2, _mm256_castsi256_si128(half));
+ src1 = _mm_srli_epi16(src1, 8);
+ src2 = _mm_srli_epi16(src2, 8);
+ src1 = _mm_blend_epi16(src1, alpha1, 0x88);
+ src2 = _mm_blend_epi16(src2, alpha2, 0x88);
+ srcVector = _mm_packus_epi16(src1, src2);
+ _mm_maskstore_epi32(reinterpret_cast<int *>(buffer + i), mask, srcVector);
+ } else {
+ if (buffer != src || RGBA)
+ _mm_maskstore_epi32(reinterpret_cast<int *>(buffer + i), mask, srcVector);
+ }
+ } else {
+ _mm_maskstore_epi32(reinterpret_cast<int *>(buffer + i), mask, _mm256_castsi256_si128(zero));
+ }
+ }
+}
+
+void QT_FASTCALL convertARGB32ToARGB32PM_avx2(uint *buffer, int count, const QVector<QRgb> *)
+{
+ convertARGBToARGB32PM_avx2<false>(buffer, buffer, count);
+}
+
+void QT_FASTCALL convertRGBA8888ToARGB32PM_avx2(uint *buffer, int count, const QVector<QRgb> *)
+{
+ convertARGBToARGB32PM_avx2<true>(buffer, buffer, count);
+}
+
+const uint *QT_FASTCALL fetchARGB32ToARGB32PM_avx2(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGBToARGB32PM_avx2<false>(buffer, reinterpret_cast<const uint *>(src) + index, count);
+ return buffer;
+}
+
+const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_avx2(uint *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGBToARGB32PM_avx2<true>(buffer, reinterpret_cast<const uint *>(src) + index, count);
+ return buffer;
+}
+
+template<bool RGBA>
+static void convertARGBToRGBA64PM_avx2(QRgba64 *buffer, const uint *src, qsizetype count)
+{
+ qsizetype i = 0;
+ const __m256i alphaMask = _mm256_broadcastsi128_si256(_mm_set1_epi32(0xff000000));
+ const __m256i rgbaMask = _mm256_broadcastsi128_si256(_mm_setr_epi8(2, 1, 0, 3, 6, 5, 4, 7, 10, 9, 8, 11, 14, 13, 12, 15));
+ const __m256i shuffleMask = _mm256_broadcastsi128_si256(_mm_setr_epi8(6, 7, 6, 7, 6, 7, 6, 7, 14, 15, 14, 15, 14, 15, 14, 15));
+ const __m256i zero = _mm256_setzero_si256();
+
+ for (; i < count - 7; i += 8) {
+ __m256i src1, src2;
+ __m256i srcVector = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(src + i));
+ if (!_mm256_testz_si256(srcVector, alphaMask)) {
+ // keep the two _mm_test[zc]_siXXX next to each other
+ bool cf = _mm256_testc_si256(srcVector, alphaMask);
+ if (!RGBA)
+ srcVector = _mm256_shuffle_epi8(srcVector, rgbaMask);
+
+ // The two unpack instructions unpack the low and upper halves of
+ // each 128-bit half of the 256-bit register. Here's the tracking
+ // of what's where: (p is 32-bit, P is 64-bit)
+ // as loaded: [ p1, p2, p3, p4; p5, p6, p7, p8 ]
+ // after permute4x64 [ p1, p2, p5, p6; p3, p4, p7, p8 ]
+ // after unpacklo/hi [ P1, P2; P3, P4 ] [ P5, P6; P7, P8 ]
+ srcVector = _mm256_permute4x64_epi64(srcVector, _MM_SHUFFLE(3, 1, 2, 0));
+
+ if (!cf) {
+ src1 = _mm256_unpacklo_epi8(srcVector, zero);
+ src2 = _mm256_unpackhi_epi8(srcVector, zero);
+ __m256i alpha1 = _mm256_shuffle_epi8(src1, shuffleMask);
+ __m256i alpha2 = _mm256_shuffle_epi8(src2, shuffleMask);
+ src1 = _mm256_mullo_epi16(src1, alpha1);
+ src2 = _mm256_mullo_epi16(src2, alpha2);
+ alpha1 = _mm256_unpacklo_epi8(srcVector, srcVector);
+ alpha2 = _mm256_unpackhi_epi8(srcVector, srcVector);
+ src1 = _mm256_add_epi16(src1, _mm256_srli_epi16(src1, 7));
+ src2 = _mm256_add_epi16(src2, _mm256_srli_epi16(src2, 7));
+ src1 = _mm256_blend_epi16(src1, alpha1, 0x88);
+ src2 = _mm256_blend_epi16(src2, alpha2, 0x88);
+ } else {
+ src1 = _mm256_unpacklo_epi8(srcVector, srcVector);
+ src2 = _mm256_unpackhi_epi8(srcVector, srcVector);
+ }
+ } else {
+ src1 = src2 = zero;
+ }
+ _mm256_storeu_si256(reinterpret_cast<__m256i *>(buffer + i), src1);
+ _mm256_storeu_si256(reinterpret_cast<__m256i *>(buffer + i) + 1, src2);
+ }
+
+ for ( ; i < count; i += 4) {
+ __m128i maskedAlphaMask = _mm256_castsi256_si128(alphaMask);
+ __m128i mask = maskFromCount((count - i) * sizeof(*src));
+ maskedAlphaMask = _mm_and_si128(mask, maskedAlphaMask);
+ __m128i srcVector = _mm_maskload_epi32(reinterpret_cast<const int *>(src), mask);
+ __m256i src;
+
+ if (!_mm_testz_si128(srcVector, maskedAlphaMask)) {
+ // keep the two _mm_test[zc]_siXXX next to each other
+ bool cf = _mm_testc_si128(srcVector, maskedAlphaMask);
+ if (!RGBA)
+ srcVector = _mm_shuffle_epi8(srcVector, _mm256_castsi256_si128(rgbaMask));
+ if (!cf) {
+ src = _mm256_cvtepu8_epi16(srcVector);
+ __m256i alpha = _mm256_shuffle_epi8(src, shuffleMask);
+ src = _mm256_mullo_epi16(src, alpha);
+
+ __m128i alpha1 = _mm_unpacklo_epi8(srcVector, srcVector);
+ __m128i alpha2 = _mm_unpackhi_epi8(srcVector, srcVector);
+ alpha = _mm256_inserti128_si256(_mm256_castsi128_si256(alpha1), alpha2, 1);
+ src = _mm256_add_epi16(src, _mm256_srli_epi16(src, 7));
+ src = _mm256_blend_epi16(src, alpha, 0x88);
+ } else {
+ const __m128i src1 = _mm_unpacklo_epi8(srcVector, srcVector);
+ const __m128i src2 = _mm_unpackhi_epi8(srcVector, srcVector);
+ src = _mm256_castsi128_si256(src1);
+ src = _mm256_inserti128_si256(src, src2, 1);
+ }
+ } else {
+ src = zero;
+ }
+ __m256i xmask = _mm256_cvtepi32_epi64(mask);
+ _mm256_maskstore_epi64(reinterpret_cast<qint64 *>(buffer + i), xmask, src);
+ };
+}
+
+const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_avx2(QRgba64 *buffer, const uint *src, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGBToRGBA64PM_avx2<false>(buffer, src, count);
+ return buffer;
+}
+
+const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_avx2(QRgba64 *buffer, const uint *src, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGBToRGBA64PM_avx2<true>(buffer, src, count);
+ return buffer;
+}
+
+const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_avx2(QRgba64 *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGBToRGBA64PM_avx2<false>(buffer, reinterpret_cast<const uint *>(src) + index, count);
+ return buffer;
+}
+
+const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_avx2(QRgba64 *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGBToRGBA64PM_avx2<true>(buffer, reinterpret_cast<const uint *>(src) + index, count);
+ return buffer;
+}
+
QT_END_NAMESPACE
#endif
diff --git a/src/gui/painting/qdrawhelper_mips_dsp.cpp b/src/gui/painting/qdrawhelper_mips_dsp.cpp
index e92a6606de..17597deb1d 100644
--- a/src/gui/painting/qdrawhelper_mips_dsp.cpp
+++ b/src/gui/painting/qdrawhelper_mips_dsp.cpp
@@ -43,7 +43,7 @@
QT_BEGIN_NAMESPACE
-void qt_memfill32(quint32 *dest, quint32 color, int count)
+void qt_memfill32(quint32 *dest, quint32 color, qsizetype count)
{
qt_memfill32_asm_mips_dsp(dest, color, count);
}
diff --git a/src/gui/painting/qdrawhelper_mips_dsp_p.h b/src/gui/painting/qdrawhelper_mips_dsp_p.h
index 36c4af2732..a3d0410274 100644
--- a/src/gui/painting/qdrawhelper_mips_dsp_p.h
+++ b/src/gui/painting/qdrawhelper_mips_dsp_p.h
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
#if defined(QT_COMPILER_SUPPORTS_MIPS_DSP)
-extern "C" void qt_memfill32_asm_mips_dsp(quint32 *dest, quint32 value, int count);
+extern "C" void qt_memfill32_asm_mips_dsp(quint32 *dest, quint32 value, qsizetype count);
extern "C" void comp_func_SourceOver_asm_mips_dsp(uint *dest, const uint *src, int length, uint const_alpha);
diff --git a/src/gui/painting/qdrawhelper_neon.cpp b/src/gui/painting/qdrawhelper_neon.cpp
index 629dfe2358..3fcbcfd053 100644
--- a/src/gui/painting/qdrawhelper_neon.cpp
+++ b/src/gui/painting/qdrawhelper_neon.cpp
@@ -47,7 +47,7 @@
QT_BEGIN_NAMESPACE
-void qt_memfill32(quint32 *dest, quint32 value, int count)
+void qt_memfill32(quint32 *dest, quint32 value, qsizetype count)
{
const int epilogueSize = count % 16;
#if !defined(Q_PROCESSOR_ARM_64)
@@ -84,20 +84,20 @@ void qt_memfill32(quint32 *dest, quint32 value, int count)
switch (epilogueSize)
{
- case 15: *dest++ = value;
- case 14: *dest++ = value;
- case 13: *dest++ = value;
- case 12: *dest++ = value;
- case 11: *dest++ = value;
- case 10: *dest++ = value;
- case 9: *dest++ = value;
- case 8: *dest++ = value;
- case 7: *dest++ = value;
- case 6: *dest++ = value;
- case 5: *dest++ = value;
- case 4: *dest++ = value;
- case 3: *dest++ = value;
- case 2: *dest++ = value;
+ case 15: *dest++ = value; Q_FALLTHROUGH();
+ case 14: *dest++ = value; Q_FALLTHROUGH();
+ case 13: *dest++ = value; Q_FALLTHROUGH();
+ case 12: *dest++ = value; Q_FALLTHROUGH();
+ case 11: *dest++ = value; Q_FALLTHROUGH();
+ case 10: *dest++ = value; Q_FALLTHROUGH();
+ case 9: *dest++ = value; Q_FALLTHROUGH();
+ case 8: *dest++ = value; Q_FALLTHROUGH();
+ case 7: *dest++ = value; Q_FALLTHROUGH();
+ case 6: *dest++ = value; Q_FALLTHROUGH();
+ case 5: *dest++ = value; Q_FALLTHROUGH();
+ case 4: *dest++ = value; Q_FALLTHROUGH();
+ case 3: *dest++ = value; Q_FALLTHROUGH();
+ case 2: *dest++ = value; Q_FALLTHROUGH();
case 1: *dest++ = value;
}
}
@@ -791,7 +791,7 @@ void QT_FASTCALL qt_destStoreRGB16_neon(QRasterBuffer *rasterBuffer, int x, int
void QT_FASTCALL comp_func_solid_SourceOver_neon(uint *destPixels, int length, uint color, uint const_alpha)
{
if ((const_alpha & qAlpha(color)) == 255) {
- QT_MEMFILL_UINT(destPixels, length, color);
+ qt_memfill32(destPixels, color, length);
} else {
if (const_alpha != 255)
color = BYTE_MUL(color, const_alpha);
@@ -1149,6 +1149,72 @@ static inline void convertARGBToARGB32PM_neon(uint *buffer, const uint *src, int
}
}
+template<bool RGBA>
+static inline void convertARGB32ToRGBA64PM_neon(QRgba64 *buffer, const uint *src, int count)
+{
+ if (count <= 0)
+ return;
+
+ const uint8x8_t shuffleMask = { 3, 3, 3, 3, 7, 7, 7, 7};
+ const uint64x2_t blendMask = vdupq_n_u64(Q_UINT64_C(0xffff000000000000));
+
+ int i = 0;
+ for (; i < count-3; i += 4) {
+ uint32x4_t vs32 = vld1q_u32(src + i);
+ uint32x4_t alphaVector = vshrq_n_u32(vs32, 24);
+#if defined(Q_PROCESSOR_ARM_64)
+ uint32_t alphaSum = vaddvq_u32(alphaVector);
+#else
+ // no vaddvq_u32
+ uint32x2_t tmp = vpadd_u32(vget_low_u32(alphaVector), vget_high_u32(alphaVector));
+ uint32_t alphaSum = vget_lane_u32(vpadd_u32(tmp, tmp), 0);
+#endif
+ if (alphaSum) {
+ if (!RGBA)
+ vs32 = vrgba2argb(vs32);
+ const uint8x16_t vs8 = vreinterpretq_u8_u32(vs32);
+ const uint8x16x2_t v = vzipq_u8(vs8, vs8);
+ if (alphaSum != 255 * 4) {
+ const uint8x8_t s1 = vreinterpret_u8_u32(vget_low_u32(vs32));
+ const uint8x8_t s2 = vreinterpret_u8_u32(vget_high_u32(vs32));
+ const uint8x8_t alpha1 = vtbl1_u8(s1, shuffleMask);
+ const uint8x8_t alpha2 = vtbl1_u8(s2, shuffleMask);
+ uint16x8_t src1 = vmull_u8(s1, alpha1);
+ uint16x8_t src2 = vmull_u8(s2, alpha2);
+ // convert from 0->(255x255) to 0->(255x257)
+ src1 = vsraq_n_u16(src1, src1, 7);
+ src2 = vsraq_n_u16(src2, src2, 7);
+
+ // now restore alpha from the trivial conversion
+ const uint64x2_t d1 = vbslq_u64(blendMask, vreinterpretq_u64_u8(v.val[0]), vreinterpretq_u64_u16(src1));
+ const uint64x2_t d2 = vbslq_u64(blendMask, vreinterpretq_u64_u8(v.val[1]), vreinterpretq_u64_u16(src2));
+
+ vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u64(d1));
+ buffer += 2;
+ vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u64(d2));
+ buffer += 2;
+ } else {
+ vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u8(v.val[0]));
+ buffer += 2;
+ vst1q_u16((uint16_t *)buffer, vreinterpretq_u16_u8(v.val[1]));
+ buffer += 2;
+ }
+ } else {
+ vst1q_u16((uint16_t *)buffer, vdupq_n_u16(0));
+ buffer += 2;
+ vst1q_u16((uint16_t *)buffer, vdupq_n_u16(0));
+ buffer += 2;
+ }
+ }
+
+ SIMD_EPILOGUE(i, count, 3) {
+ uint s = src[i];
+ if (RGBA)
+ s = RGBA2ARGB(s);
+ *buffer++ = QRgba64::fromArgb32(s).premultiplied();
+ }
+}
+
static inline float32x4_t reciprocal_mul_ps(float32x4_t a, float mul)
{
float32x4_t ia = vrecpeq_f32(a); // estimate 1/a
@@ -1258,6 +1324,34 @@ const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_neon(uint *buffer, const uchar *
return buffer;
}
+const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_neon(QRgba64 *buffer, const uint *src, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGB32ToRGBA64PM_neon<false>(buffer, src, count);
+ return buffer;
+}
+
+const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_neon(QRgba64 *buffer, const uint *src, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGB32ToRGBA64PM_neon<true>(buffer, src, count);
+ return buffer;
+}
+
+const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_neon(QRgba64 *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGB32ToRGBA64PM_neon<false>(buffer, reinterpret_cast<const uint *>(src) + index, count);
+ return buffer;
+}
+
+const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_neon(QRgba64 *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGB32ToRGBA64PM_neon<true>(buffer, reinterpret_cast<const uint *>(src) + index, count);
+ return buffer;
+}
+
void QT_FASTCALL storeRGB32FromARGB32PM_neon(uchar *dest, const uint *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *)
{
diff --git a/src/gui/painting/qdrawhelper_neon_p.h b/src/gui/painting/qdrawhelper_neon_p.h
index 40475a9bde..19e1f21a3b 100644
--- a/src/gui/painting/qdrawhelper_neon_p.h
+++ b/src/gui/painting/qdrawhelper_neon_p.h
@@ -123,7 +123,7 @@ void qt_transform_image_rgb16_on_rgb16_neon(uchar *destPixels, int dbpl,
const QTransform &targetRectTransform,
int const_alpha);
-void qt_memfill32_neon(quint32 *dest, quint32 value, int count);
+void qt_memfill32_neon(quint32 *dest, quint32 value, qsizetype count);
void qt_memrotate90_16_neon(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl);
void qt_memrotate270_16_neon(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl);
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index fb08261205..37108949d6 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -69,14 +69,18 @@
QT_BEGIN_NAMESPACE
#if defined(Q_CC_GNU)
-# define Q_STATIC_TEMPLATE_FUNCTION static
# define Q_DECL_RESTRICT __restrict__
+# if defined(Q_PROCESSOR_X86_32) && defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
+# define Q_DECL_VECTORCALL __attribute__((sseregparm,regparm(3)))
+# else
+# define Q_DECL_VECTORCALL
+# endif
#elif defined(Q_CC_MSVC)
-# define Q_STATIC_TEMPLATE_FUNCTION static
# define Q_DECL_RESTRICT __restrict
+# define Q_DECL_VECTORCALL __vectorcall
#else
-# define Q_STATIC_TEMPLATE_FUNCTION static
# define Q_DECL_RESTRICT
+# define Q_DECL_VECTORCALL
#endif
static const uint AMASK = 0xff000000;
@@ -149,7 +153,6 @@ typedef void (*MemRotateFunc)(const uchar *srcPixels, int w, int h, int sbpl, uc
struct DrawHelper {
ProcessSpans blendColor;
- ProcessSpans blendGradient;
BitmapBlitFunc bitmapBlit;
AlphamapBlitFunc alphamapBlit;
AlphaRGBBlitFunc alphaRGBBlit;
@@ -162,10 +165,33 @@ extern SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::N
extern DrawHelper qDrawHelper[QImage::NImageFormats];
+struct quint24 {
+ quint24() = default;
+ quint24(uint value)
+ {
+ data[0] = uchar(value >> 16);
+ data[1] = uchar(value >> 8);
+ data[2] = uchar(value);
+ }
+ operator uint() const
+ {
+ return data[2] | (data[1] << 8) | (data[0] << 16);
+ }
+
+ uchar data[3];
+};
+
+void qBlendGradient(int count, const QSpan *spans, void *userData);
void qBlendTexture(int count, const QSpan *spans, void *userData);
-extern void qt_memfill64(quint64 *dest, quint64 value, int count);
-extern void qt_memfill32(quint32 *dest, quint32 value, int count);
-extern void qt_memfill16(quint16 *dest, quint16 value, int count);
+#ifdef __SSE2__
+extern void (*qt_memfill64)(quint64 *dest, quint64 value, qsizetype count);
+extern void (*qt_memfill32)(quint32 *dest, quint32 value, qsizetype count);
+#else
+extern void qt_memfill64(quint64 *dest, quint64 value, qsizetype count);
+extern void qt_memfill32(quint32 *dest, quint32 value, qsizetype count);
+#endif
+extern void qt_memfill24(quint24 *dest, quint24 value, qsizetype count);
+extern void qt_memfill16(quint16 *dest, quint16 value, qsizetype count);
typedef void (QT_FASTCALL *CompositionFunction)(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha);
typedef void (QT_FASTCALL *CompositionFunction64)(QRgba64 *Q_DECL_RESTRICT dest, const QRgba64 *Q_DECL_RESTRICT src, int length, uint const_alpha);
@@ -222,11 +248,6 @@ struct Operator
class QRasterPaintEngine;
-struct QSolidData
-{
- QRgba64 color;
-};
-
struct QLinearGradientData
{
struct {
@@ -331,8 +352,8 @@ struct QSpanData
int fast_matrix : 1;
bool bilinear;
QImage *tempImage;
+ QRgba64 solidColor;
union {
- QSolidData solid;
QGradientData gradient;
QTextureData texture;
};
@@ -858,6 +879,8 @@ static Q_ALWAYS_INLINE uint BYTE_MUL_RGB16_32(uint x, uint a) {
// qt_div_255 is a fast rounded division by 255 using an approximation that is accurate for all positive 16-bit integers
static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE int qt_div_255(int x) { return (x + (x>>8) + 0x80) >> 8; }
+static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_div_257_floor(uint x) { return (x - (x >> 8)) >> 8; }
+static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_div_257(uint x) { return qt_div_257_floor(x + 128); }
static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_div_65535(uint x) { return (x + (x>>16) + 0x8000U) >> 16; }
static Q_ALWAYS_INLINE uint qAlphaRgb30(uint c)
@@ -868,76 +891,63 @@ static Q_ALWAYS_INLINE uint qAlphaRgb30(uint c)
return a;
}
-struct quint24 {
- quint24() = default;
- quint24(uint value);
- operator uint() const;
- uchar data[3];
-};
-
-inline quint24::quint24(uint value)
+template <class T> inline void qt_memfill_template(T *dest, T color, qsizetype count)
{
- data[0] = uchar(value >> 16);
- data[1] = uchar(value >> 8);
- data[2] = uchar(value);
+ if (!count)
+ return;
+
+ qsizetype n = (count + 7) / 8;
+ switch (count & 0x07)
+ {
+ case 0: do { *dest++ = color; Q_FALLTHROUGH();
+ case 7: *dest++ = color; Q_FALLTHROUGH();
+ case 6: *dest++ = color; Q_FALLTHROUGH();
+ case 5: *dest++ = color; Q_FALLTHROUGH();
+ case 4: *dest++ = color; Q_FALLTHROUGH();
+ case 3: *dest++ = color; Q_FALLTHROUGH();
+ case 2: *dest++ = color; Q_FALLTHROUGH();
+ case 1: *dest++ = color;
+ } while (--n > 0);
+ }
}
-inline quint24::operator uint() const
+template <class T> inline void qt_memfill(T *dest, T value, qsizetype count)
{
- return data[2] | (data[1] << 8) | (data[0] << 16);
+ qt_memfill_template(dest, value, count);
}
-template <class T> Q_STATIC_TEMPLATE_FUNCTION
-void qt_memfill(T *dest, T value, int count);
-
-template<> inline void qt_memfill(quint64 *dest, quint64 color, int count)
+template<> inline void qt_memfill(quint64 *dest, quint64 color, qsizetype count)
{
qt_memfill64(dest, color, count);
}
-template<> inline void qt_memfill(quint32 *dest, quint32 color, int count)
+template<> inline void qt_memfill(quint32 *dest, quint32 color, qsizetype count)
{
qt_memfill32(dest, color, count);
}
-template<> inline void qt_memfill(quint16 *dest, quint16 color, int count)
+template<> inline void qt_memfill(quint24 *dest, quint24 color, qsizetype count)
{
- qt_memfill16(dest, color, count);
+ qt_memfill24(dest, color, count);
}
-template<> inline void qt_memfill(quint8 *dest, quint8 color, int count)
+template<> inline void qt_memfill(quint16 *dest, quint16 color, qsizetype count)
{
- memset(dest, color, count);
+ qt_memfill16(dest, color, count);
}
-template <class T>
-inline void qt_memfill(T *dest, T value, int count)
+template<> inline void qt_memfill(quint8 *dest, quint8 color, qsizetype count)
{
- if (!count)
- return;
-
- int n = (count + 7) / 8;
- switch (count & 0x07)
- {
- case 0: do { *dest++ = value; Q_FALLTHROUGH();
- case 7: *dest++ = value; Q_FALLTHROUGH();
- case 6: *dest++ = value; Q_FALLTHROUGH();
- case 5: *dest++ = value; Q_FALLTHROUGH();
- case 4: *dest++ = value; Q_FALLTHROUGH();
- case 3: *dest++ = value; Q_FALLTHROUGH();
- case 2: *dest++ = value; Q_FALLTHROUGH();
- case 1: *dest++ = value;
- } while (--n > 0);
- }
+ memset(dest, color, count);
}
-template <class T> Q_STATIC_TEMPLATE_FUNCTION
+template <class T> static
inline void qt_rectfill(T *dest, T value,
int x, int y, int width, int height, qsizetype stride)
{
char *d = reinterpret_cast<char*>(dest + x) + y * stride;
if (uint(stride) == (width * sizeof(T))) {
- qt_memfill(reinterpret_cast<T*>(d), value, width * height);
+ qt_memfill(reinterpret_cast<T*>(d), value, qsizetype(width) * height);
} else {
for (int j = 0; j < height; ++j) {
dest = reinterpret_cast<T*>(d);
@@ -947,52 +957,6 @@ inline void qt_rectfill(T *dest, T value,
}
}
-#define QT_MEMFILL_UINT(dest, length, color) \
- qt_memfill<quint32>(dest, color, length);
-
-#define QT_MEMFILL_USHORT(dest, length, color) \
- qt_memfill<quint16>(dest, color, length);
-
-#define QT_MEMCPY_REV_UINT(dest, src, length) \
-do { \
- /* Duff's device */ \
- uint *_d = (uint*)(dest) + length; \
- const uint *_s = (uint*)(src) + length; \
- int n = ((length) + 7) / 8; \
- switch ((length) & 0x07) \
- { \
- case 0: do { *--_d = *--_s; Q_FALLTHROUGH(); \
- case 7: *--_d = *--_s; Q_FALLTHROUGH(); \
- case 6: *--_d = *--_s; Q_FALLTHROUGH(); \
- case 5: *--_d = *--_s; Q_FALLTHROUGH(); \
- case 4: *--_d = *--_s; Q_FALLTHROUGH(); \
- case 3: *--_d = *--_s; Q_FALLTHROUGH(); \
- case 2: *--_d = *--_s; Q_FALLTHROUGH(); \
- case 1: *--_d = *--_s; \
- } while (--n > 0); \
- } \
-} while (false)
-
-#define QT_MEMCPY_USHORT(dest, src, length) \
-do { \
- /* Duff's device */ \
- ushort *_d = (ushort*)(dest); \
- const ushort *_s = (const ushort*)(src); \
- int n = ((length) + 7) / 8; \
- switch ((length) & 0x07) \
- { \
- case 0: do { *_d++ = *_s++; Q_FALLTHROUGH(); \
- case 7: *_d++ = *_s++; Q_FALLTHROUGH(); \
- case 6: *_d++ = *_s++; Q_FALLTHROUGH(); \
- case 5: *_d++ = *_s++; Q_FALLTHROUGH(); \
- case 4: *_d++ = *_s++; Q_FALLTHROUGH(); \
- case 3: *_d++ = *_s++; Q_FALLTHROUGH(); \
- case 2: *_d++ = *_s++; Q_FALLTHROUGH(); \
- case 1: *_d++ = *_s++; \
- } while (--n > 0); \
- } \
-} while (false)
-
inline ushort qConvertRgb32To16(uint c)
{
return (((c) >> 3) & 0x001f)
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp
index 3212ffdd2d..c82f41ec88 100644
--- a/src/gui/painting/qdrawhelper_sse2.cpp
+++ b/src/gui/painting/qdrawhelper_sse2.cpp
@@ -233,19 +233,71 @@ void QT_FASTCALL comp_func_Source_sse2(uint *dst, const uint *src, int length, u
}
}
-void qt_memfill32(quint32 *dest, quint32 value, int count)
+#ifndef __AVX2__
+static Q_NEVER_INLINE
+void Q_DECL_VECTORCALL qt_memfillXX_aligned(void *dest, __m128i value128, quintptr bytecount)
{
- if (count < 7) {
+ __m128i *dst128 = reinterpret_cast<__m128i *>(dest);
+ __m128i *end128 = reinterpret_cast<__m128i *>(static_cast<uchar *>(dest) + bytecount);
+
+ while (dst128 + 4 <= end128) {
+ _mm_store_si128(dst128 + 0, value128);
+ _mm_store_si128(dst128 + 1, value128);
+ _mm_store_si128(dst128 + 2, value128);
+ _mm_store_si128(dst128 + 3, value128);
+ dst128 += 4;
+ }
+
+ bytecount %= 4 * sizeof(__m128i);
+ switch (bytecount / sizeof(__m128i)) {
+ case 3: _mm_store_si128(dst128++, value128); Q_FALLTHROUGH();
+ case 2: _mm_store_si128(dst128++, value128); Q_FALLTHROUGH();
+ case 1: _mm_store_si128(dst128++, value128);
+ }
+}
+
+void qt_memfill64_sse2(quint64 *dest, quint64 value, qsizetype count)
+{
+ quintptr misaligned = quintptr(dest) % sizeof(__m128i);
+ if (misaligned && count) {
+#if defined(Q_PROCESSOR_X86_32)
+ // Before SSE came out, the alignment of the stack used to be only 4
+ // bytes and some OS/ABIs (notably, code generated by MSVC) still only
+ // align to that. In any case, we cannot count on the alignment of
+ // quint64 to be 8 -- see QtPrivate::AlignOf_WorkaroundForI386Abi in
+ // qglobal.h.
+ //
+ // If the pointer is not aligned to at least 8 bytes, then we'll never
+ // in turn hit a multiple of 16 for the qt_memfillXX_aligned call
+ // below.
+ if (Q_UNLIKELY(misaligned % sizeof(quint64)))
+ return qt_memfill_template(dest, value, count);
+#endif
+
+ *dest++ = value;
+ --count;
+ }
+
+ if (count % 2) {
+ dest[count - 1] = value;
+ --count;
+ }
+
+ qt_memfillXX_aligned(dest, _mm_set1_epi64x(value), count * sizeof(quint64));
+}
+
+void qt_memfill32_sse2(quint32 *dest, quint32 value, qsizetype count)
+{
+ if (count < 4) {
+ // this simplifies the code below: the first switch can fall through
+ // without checking the value of count
switch (count) {
- case 6: *dest++ = value; Q_FALLTHROUGH();
- case 5: *dest++ = value; Q_FALLTHROUGH();
- case 4: *dest++ = value; Q_FALLTHROUGH();
case 3: *dest++ = value; Q_FALLTHROUGH();
case 2: *dest++ = value; Q_FALLTHROUGH();
case 1: *dest = value;
}
return;
- };
+ }
const int align = (quintptr)(dest) & 0xf;
switch (align) {
@@ -263,25 +315,9 @@ void qt_memfill32(quint32 *dest, quint32 value, int count)
}
}
- int count128 = count / 4;
- __m128i *dst128 = reinterpret_cast<__m128i*>(dest);
- __m128i *end128 = dst128 + count128;
- const __m128i value128 = _mm_set_epi32(value, value, value, value);
-
- while (dst128 + 3 < end128) {
- _mm_stream_si128(dst128 + 0, value128);
- _mm_stream_si128(dst128 + 1, value128);
- _mm_stream_si128(dst128 + 2, value128);
- _mm_stream_si128(dst128 + 3, value128);
- dst128 += 4;
- }
-
- switch (count128 & 0x3) {
- case 3: _mm_stream_si128(dst128++, value128); Q_FALLTHROUGH();
- case 2: _mm_stream_si128(dst128++, value128); Q_FALLTHROUGH();
- case 1: _mm_stream_si128(dst128++, value128);
- }
+ qt_memfillXX_aligned(dest, _mm_set1_epi32(value), count * sizeof(quint32));
}
+#endif // !__AVX2__
void QT_FASTCALL comp_func_solid_SourceOver_sse2(uint *destPixels, int length, uint color, uint const_alpha)
{
@@ -314,28 +350,6 @@ void QT_FASTCALL comp_func_solid_SourceOver_sse2(uint *destPixels, int length, u
}
}
-void qt_memfill16(quint16 *dest, quint16 value, int count)
-{
- if (count < 3) {
- switch (count) {
- case 2: *dest++ = value; Q_FALLTHROUGH();
- case 1: *dest = value;
- }
- return;
- }
-
- const int align = (quintptr)(dest) & 0x3;
- switch (align) {
- case 2: *dest++ = value; --count;
- }
-
- const quint32 value32 = (value << 16) | value;
- qt_memfill32(reinterpret_cast<quint32*>(dest), value32, count / 2);
-
- if (count & 0x1)
- dest[count - 1] = value;
-}
-
void qt_bitmapblit32_sse2_base(QRasterBuffer *rasterBuffer, int x, int y,
quint32 color,
const uchar *src, int width, int height, int stride)
@@ -440,30 +454,30 @@ public:
union Vect_buffer_i { Int32x4 v; int i[4]; };
union Vect_buffer_f { Float32x4 v; float f[4]; };
- static inline Float32x4 v_dup(float x) { return _mm_set1_ps(x); }
- static inline Float32x4 v_dup(double x) { return _mm_set1_ps(x); }
- static inline Int32x4 v_dup(int x) { return _mm_set1_epi32(x); }
- static inline Int32x4 v_dup(uint x) { return _mm_set1_epi32(x); }
+ static inline Float32x4 Q_DECL_VECTORCALL v_dup(float x) { return _mm_set1_ps(x); }
+ static inline Float32x4 Q_DECL_VECTORCALL v_dup(double x) { return _mm_set1_ps(x); }
+ static inline Int32x4 Q_DECL_VECTORCALL v_dup(int x) { return _mm_set1_epi32(x); }
+ static inline Int32x4 Q_DECL_VECTORCALL v_dup(uint x) { return _mm_set1_epi32(x); }
- static inline Float32x4 v_add(Float32x4 a, Float32x4 b) { return _mm_add_ps(a, b); }
- static inline Int32x4 v_add(Int32x4 a, Int32x4 b) { return _mm_add_epi32(a, b); }
+ static inline Float32x4 Q_DECL_VECTORCALL v_add(Float32x4 a, Float32x4 b) { return _mm_add_ps(a, b); }
+ static inline Int32x4 Q_DECL_VECTORCALL v_add(Int32x4 a, Int32x4 b) { return _mm_add_epi32(a, b); }
- static inline Float32x4 v_max(Float32x4 a, Float32x4 b) { return _mm_max_ps(a, b); }
- static inline Float32x4 v_min(Float32x4 a, Float32x4 b) { return _mm_min_ps(a, b); }
- static inline Int32x4 v_min_16(Int32x4 a, Int32x4 b) { return _mm_min_epi16(a, b); }
+ static inline Float32x4 Q_DECL_VECTORCALL v_max(Float32x4 a, Float32x4 b) { return _mm_max_ps(a, b); }
+ static inline Float32x4 Q_DECL_VECTORCALL v_min(Float32x4 a, Float32x4 b) { return _mm_min_ps(a, b); }
+ static inline Int32x4 Q_DECL_VECTORCALL v_min_16(Int32x4 a, Int32x4 b) { return _mm_min_epi16(a, b); }
- static inline Int32x4 v_and(Int32x4 a, Int32x4 b) { return _mm_and_si128(a, b); }
+ static inline Int32x4 Q_DECL_VECTORCALL v_and(Int32x4 a, Int32x4 b) { return _mm_and_si128(a, b); }
- static inline Float32x4 v_sub(Float32x4 a, Float32x4 b) { return _mm_sub_ps(a, b); }
- static inline Int32x4 v_sub(Int32x4 a, Int32x4 b) { return _mm_sub_epi32(a, b); }
+ static inline Float32x4 Q_DECL_VECTORCALL v_sub(Float32x4 a, Float32x4 b) { return _mm_sub_ps(a, b); }
+ static inline Int32x4 Q_DECL_VECTORCALL v_sub(Int32x4 a, Int32x4 b) { return _mm_sub_epi32(a, b); }
- static inline Float32x4 v_mul(Float32x4 a, Float32x4 b) { return _mm_mul_ps(a, b); }
+ static inline Float32x4 Q_DECL_VECTORCALL v_mul(Float32x4 a, Float32x4 b) { return _mm_mul_ps(a, b); }
- static inline Float32x4 v_sqrt(Float32x4 x) { return _mm_sqrt_ps(x); }
+ static inline Float32x4 Q_DECL_VECTORCALL v_sqrt(Float32x4 x) { return _mm_sqrt_ps(x); }
- static inline Int32x4 v_toInt(Float32x4 x) { return _mm_cvttps_epi32(x); }
+ static inline Int32x4 Q_DECL_VECTORCALL v_toInt(Float32x4 x) { return _mm_cvttps_epi32(x); }
- static inline Int32x4 v_greaterOrEqual(Float32x4 a, Float32x4 b) { return _mm_castps_si128(_mm_cmpgt_ps(a, b)); }
+ static inline Int32x4 Q_DECL_VECTORCALL v_greaterOrEqual(Float32x4 a, Float32x4 b) { return _mm_castps_si128(_mm_cmpgt_ps(a, b)); }
};
const uint * QT_FASTCALL qt_fetch_radial_gradient_sse2(uint *buffer, const Operator *op, const QSpanData *data,
diff --git a/src/gui/painting/qdrawhelper_sse4.cpp b/src/gui/painting/qdrawhelper_sse4.cpp
index f6c2f11eaf..1da3b75ade 100644
--- a/src/gui/painting/qdrawhelper_sse4.cpp
+++ b/src/gui/painting/qdrawhelper_sse4.cpp
@@ -45,6 +45,7 @@
QT_BEGIN_NAMESPACE
+#ifndef __AVX2__
template<bool RGBA>
static void convertARGBToARGB32PM_sse4(uint *buffer, const uint *src, int count)
{
@@ -94,7 +95,57 @@ static void convertARGBToARGB32PM_sse4(uint *buffer, const uint *src, int count)
}
}
-static inline __m128 reciprocal_mul_ps(__m128 a, float mul)
+template<bool RGBA>
+static void convertARGBToRGBA64PM_sse4(QRgba64 *buffer, const uint *src, int count)
+{
+ int i = 0;
+ const __m128i alphaMask = _mm_set1_epi32(0xff000000);
+ const __m128i rgbaMask = _mm_setr_epi8(2, 1, 0, 3, 6, 5, 4, 7, 10, 9, 8, 11, 14, 13, 12, 15);
+ const __m128i shuffleMask = _mm_setr_epi8(6, 7, 6, 7, 6, 7, 6, 7, 14, 15, 14, 15, 14, 15, 14, 15);
+ const __m128i zero = _mm_setzero_si128();
+
+ for (; i < count - 3; i += 4) {
+ __m128i srcVector = _mm_loadu_si128((const __m128i *)&src[i]);
+ if (!_mm_testz_si128(srcVector, alphaMask)) {
+ if (!_mm_testc_si128(srcVector, alphaMask)) {
+ if (!RGBA)
+ srcVector = _mm_shuffle_epi8(srcVector, rgbaMask);
+ __m128i src1 = _mm_unpacklo_epi8(srcVector, zero);
+ __m128i src2 = _mm_unpackhi_epi8(srcVector, zero);
+ __m128i alpha1 = _mm_shuffle_epi8(src1, shuffleMask);
+ __m128i alpha2 = _mm_shuffle_epi8(src2, shuffleMask);
+ src1 = _mm_mullo_epi16(src1, alpha1);
+ src2 = _mm_mullo_epi16(src2, alpha2);
+ alpha1 = _mm_unpacklo_epi8(srcVector, srcVector);
+ alpha2 = _mm_unpackhi_epi8(srcVector, srcVector);
+ src1 = _mm_add_epi16(src1, _mm_srli_epi16(src1, 7));
+ src2 = _mm_add_epi16(src2, _mm_srli_epi16(src2, 7));
+ src1 = _mm_blend_epi16(src1, alpha1, 0x88);
+ src2 = _mm_blend_epi16(src2, alpha2, 0x88);
+ _mm_storeu_si128((__m128i *)&buffer[i], src1);
+ _mm_storeu_si128((__m128i *)&buffer[i + 2], src2);
+ } else {
+ if (!RGBA)
+ srcVector = _mm_shuffle_epi8(srcVector, rgbaMask);
+ const __m128i src1 = _mm_unpacklo_epi8(srcVector, srcVector);
+ const __m128i src2 = _mm_unpackhi_epi8(srcVector, srcVector);
+ _mm_storeu_si128((__m128i *)&buffer[i], src1);
+ _mm_storeu_si128((__m128i *)&buffer[i + 2], src2);
+ }
+ } else {
+ _mm_storeu_si128((__m128i *)&buffer[i], zero);
+ _mm_storeu_si128((__m128i *)&buffer[i + 2], zero);
+ }
+ }
+
+ SIMD_EPILOGUE(i, count, 3) {
+ const uint s = RGBA ? RGBA2ARGB(src[i]) : src[i];
+ buffer[i] = QRgba64::fromArgb32(s).premultiplied();
+ }
+}
+#endif // __AVX2__
+
+static inline __m128 Q_DECL_VECTORCALL reciprocal_mul_ps(__m128 a, float mul)
{
__m128 ia = _mm_rcp_ps(a); // Approximate 1/a
// Improve precision of ia using Newton-Raphson
@@ -259,6 +310,7 @@ static inline void convertARGBFromRGBA64PM_sse4(uint *buffer, const QRgba64 *src
}
}
+#ifndef __AVX2__
void QT_FASTCALL convertARGB32ToARGB32PM_sse4(uint *buffer, int count, const QVector<QRgb> *)
{
convertARGBToARGB32PM_sse4<false>(buffer, buffer, count);
@@ -269,6 +321,20 @@ void QT_FASTCALL convertRGBA8888ToARGB32PM_sse4(uint *buffer, int count, const Q
convertARGBToARGB32PM_sse4<true>(buffer, buffer, count);
}
+const QRgba64 * QT_FASTCALL convertARGB32ToRGBA64PM_sse4(QRgba64 *buffer, const uint *src, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGBToRGBA64PM_sse4<false>(buffer, src, count);
+ return buffer;
+}
+
+const QRgba64 * QT_FASTCALL convertRGBA8888ToRGBA64PM_sse4(QRgba64 *buffer, const uint *src, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGBToRGBA64PM_sse4<true>(buffer, src, count);
+ return buffer;
+}
+
const uint *QT_FASTCALL fetchARGB32ToARGB32PM_sse4(uint *buffer, const uchar *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *)
{
@@ -283,6 +349,21 @@ const uint *QT_FASTCALL fetchRGBA8888ToARGB32PM_sse4(uint *buffer, const uchar *
return buffer;
}
+const QRgba64 *QT_FASTCALL fetchARGB32ToRGBA64PM_sse4(QRgba64 *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGBToRGBA64PM_sse4<false>(buffer, reinterpret_cast<const uint *>(src) + index, count);
+ return buffer;
+}
+
+const QRgba64 *QT_FASTCALL fetchRGBA8888ToRGBA64PM_sse4(QRgba64 *buffer, const uchar *src, int index, int count,
+ const QVector<QRgb> *, QDitherInfo *)
+{
+ convertARGBToRGBA64PM_sse4<true>(buffer, reinterpret_cast<const uint *>(src) + index, count);
+ return buffer;
+}
+#endif // __AVX2__
+
void QT_FASTCALL storeRGB32FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count,
const QVector<QRgb> *, QDitherInfo *)
{
diff --git a/src/gui/painting/qdrawhelper_ssse3.cpp b/src/gui/painting/qdrawhelper_ssse3.cpp
index 42d760d5cc..35d61c3e6c 100644
--- a/src/gui/painting/qdrawhelper_ssse3.cpp
+++ b/src/gui/painting/qdrawhelper_ssse3.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -79,55 +80,58 @@ QT_BEGIN_NAMESPACE
// The computation being done is:
// result = s + d * (1-alpha)
// with shortcuts if fully opaque or fully transparent.
-#define BLEND_SOURCE_OVER_ARGB32_SSSE3(dst, src, length, nullVector, half, one, colorMask, alphaMask) { \
- int x = 0; \
-\
- /* First, get dst aligned. */ \
- ALIGNMENT_PROLOGUE_16BYTES(dst, x, length) { \
- blend_pixel(dst[x], src[x]); \
- } \
-\
- const int minusOffsetToAlignSrcOn16Bytes = (reinterpret_cast<quintptr>(&(src[x])) >> 2) & 0x3;\
-\
- if (!minusOffsetToAlignSrcOn16Bytes) {\
- /* src is aligned, usual algorithm but with aligned operations.\
- See the SSE2 version for more documentation on the algorithm itself. */\
- const __m128i alphaShuffleMask = _mm_set_epi8(char(0xff),15,char(0xff),15,char(0xff),11,char(0xff),11,char(0xff),7,char(0xff),7,char(0xff),3,char(0xff),3);\
- for (; x < length-3; x += 4) { \
- const __m128i srcVector = _mm_load_si128((const __m128i *)&src[x]); \
- const __m128i srcVectorAlpha = _mm_and_si128(srcVector, alphaMask); \
- if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, alphaMask)) == 0xffff) { \
- _mm_store_si128((__m128i *)&dst[x], srcVector); \
- } else if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, nullVector)) != 0xffff) { \
- __m128i alphaChannel = _mm_shuffle_epi8(srcVector, alphaShuffleMask); \
- alphaChannel = _mm_sub_epi16(one, alphaChannel); \
- const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]); \
- __m128i destMultipliedByOneMinusAlpha; \
- BYTE_MUL_SSE2(destMultipliedByOneMinusAlpha, dstVector, alphaChannel, colorMask, half); \
- const __m128i result = _mm_add_epi8(srcVector, destMultipliedByOneMinusAlpha); \
- _mm_store_si128((__m128i *)&dst[x], result); \
- } \
- } /* end for() */\
- } else if ((length - x) >= 8) {\
- /* We use two vectors to extract the src: prevLoaded for the first pixels, lastLoaded for the current pixels. */\
- __m128i srcVectorPrevLoaded = _mm_load_si128((const __m128i *)&src[x - minusOffsetToAlignSrcOn16Bytes]);\
- const int palignrOffset = minusOffsetToAlignSrcOn16Bytes << 2;\
-\
- const __m128i alphaShuffleMask = _mm_set_epi8(char(0xff),15,char(0xff),15,char(0xff),11,char(0xff),11,char(0xff),7,char(0xff),7,char(0xff),3,char(0xff),3);\
- switch (palignrOffset) {\
- case 4:\
- BLENDING_LOOP(4, length)\
- break;\
- case 8:\
- BLENDING_LOOP(8, length)\
- break;\
- case 12:\
- BLENDING_LOOP(12, length)\
- break;\
- }\
- }\
- for (; x < length; ++x) \
- blend_pixel(dst[x], src[x]); \
+static inline void Q_DECL_VECTORCALL
+BLEND_SOURCE_OVER_ARGB32_SSSE3(quint32 *dst, const quint32 *src, int length,
+ __m128i nullVector, __m128i half, __m128i one, __m128i colorMask, __m128i alphaMask)
+{
+ int x = 0;
+
+ /* First, get dst aligned. */
+ ALIGNMENT_PROLOGUE_16BYTES(dst, x, length) {
+ blend_pixel(dst[x], src[x]);
+ }
+
+ const int minusOffsetToAlignSrcOn16Bytes = (reinterpret_cast<quintptr>(&(src[x])) >> 2) & 0x3;
+
+ if (!minusOffsetToAlignSrcOn16Bytes) {
+ /* src is aligned, usual algorithm but with aligned operations.
+ See the SSE2 version for more documentation on the algorithm itself. */
+ const __m128i alphaShuffleMask = _mm_set_epi8(char(0xff),15,char(0xff),15,char(0xff),11,char(0xff),11,char(0xff),7,char(0xff),7,char(0xff),3,char(0xff),3);
+ for (; x < length-3; x += 4) {
+ const __m128i srcVector = _mm_load_si128((const __m128i *)&src[x]);
+ const __m128i srcVectorAlpha = _mm_and_si128(srcVector, alphaMask);
+ if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, alphaMask)) == 0xffff) {
+ _mm_store_si128((__m128i *)&dst[x], srcVector);
+ } else if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, nullVector)) != 0xffff) {
+ __m128i alphaChannel = _mm_shuffle_epi8(srcVector, alphaShuffleMask);
+ alphaChannel = _mm_sub_epi16(one, alphaChannel);
+ const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
+ __m128i destMultipliedByOneMinusAlpha;
+ BYTE_MUL_SSE2(destMultipliedByOneMinusAlpha, dstVector, alphaChannel, colorMask, half);
+ const __m128i result = _mm_add_epi8(srcVector, destMultipliedByOneMinusAlpha);
+ _mm_store_si128((__m128i *)&dst[x], result);
+ }
+ } /* end for() */
+ } else if ((length - x) >= 8) {
+ /* We use two vectors to extract the src: prevLoaded for the first pixels, lastLoaded for the current pixels. */
+ __m128i srcVectorPrevLoaded = _mm_load_si128((const __m128i *)&src[x - minusOffsetToAlignSrcOn16Bytes]);
+ const int palignrOffset = minusOffsetToAlignSrcOn16Bytes << 2;
+
+ const __m128i alphaShuffleMask = _mm_set_epi8(char(0xff),15,char(0xff),15,char(0xff),11,char(0xff),11,char(0xff),7,char(0xff),7,char(0xff),3,char(0xff),3);
+ switch (palignrOffset) {
+ case 4:
+ BLENDING_LOOP(4, length)
+ break;
+ case 8:
+ BLENDING_LOOP(8, length)
+ break;
+ case 12:
+ BLENDING_LOOP(12, length)
+ break;
+ }
+ }
+ for (; x < length; ++x)
+ blend_pixel(dst[x], src[x]);
}
void qt_blend_argb32_on_argb32_ssse3(uchar *destPixels, int dbpl,
@@ -185,6 +189,71 @@ const uint * QT_FASTCALL qt_fetchUntransformed_888_ssse3(uint *buffer, const Ope
return buffer;
}
+void qt_memfill24_ssse3(quint24 *dest, quint24 color, qsizetype count)
+{
+ // LCM of 12 and 16 bytes is 48 bytes (16 px)
+ quint32 v = color;
+ __m128i m = _mm_cvtsi32_si128(v);
+ quint24 *end = dest + count;
+
+ constexpr uchar x = 2, y = 1, z = 0;
+ Q_DECL_ALIGN(__m128i) static const uchar
+ shuffleMask[16 + 1] = { x, y, z, x, y, z, x, y, z, x, y, z, x, y, z, x, y };
+
+ __m128i mval1 = _mm_shuffle_epi8(m, _mm_load_si128(reinterpret_cast<const __m128i *>(shuffleMask)));
+ __m128i mval2 = _mm_shuffle_epi8(m, _mm_loadu_si128(reinterpret_cast<const __m128i *>(shuffleMask + 1)));
+ __m128i mval3 = _mm_alignr_epi8(mval2, mval1, 2);
+
+ for ( ; dest + 16 <= end; dest += 16) {
+#ifdef __AVX__
+ // Store using 32-byte AVX instruction
+ __m256 mval12 = _mm256_castps128_ps256(_mm_castsi128_ps(mval1));
+ mval12 = _mm256_insertf128_ps(mval12, _mm_castsi128_ps(mval2), 1);
+ _mm256_storeu_ps(reinterpret_cast<float *>(dest), mval12);
+#else
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(dest) + 0, mval1);
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(dest) + 1, mval2);
+#endif
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(dest) + 2, mval3);
+ }
+
+ if (count < 3) {
+ if (count > 1)
+ end[-2] = v;
+ if (count)
+ end[-1] = v;
+ return;
+ }
+
+ // less than 16px/48B left
+ uchar *ptr = reinterpret_cast<uchar *>(dest);
+ uchar *ptr_end = reinterpret_cast<uchar *>(end);
+ qptrdiff left = ptr_end - ptr;
+ if (left >= 24) {
+ // 8px/24B or more left
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(ptr) + 0, mval1);
+ _mm_storel_epi64(reinterpret_cast<__m128i *>(ptr) + 1, mval2);
+ ptr += 24;
+ left -= 24;
+ }
+
+ // less than 8px/24B left
+
+ if (left >= 16) {
+ // but more than 5px/15B left
+ _mm_storeu_si128(reinterpret_cast<__m128i *>(ptr) , mval1);
+ } else if (left >= 8) {
+ // but more than 2px/6B left
+ _mm_storel_epi64(reinterpret_cast<__m128i *>(ptr), mval1);
+ }
+
+ if (left) {
+ // 1 or 2px left
+ // store 8 bytes ending with the right values (will overwrite a bit)
+ _mm_storel_epi64(reinterpret_cast<__m128i *>(ptr_end - 8), mval2);
+ }
+}
+
QT_END_NAMESPACE
#endif // QT_COMPILER_SUPPORTS_SSSE3
diff --git a/src/gui/painting/qdrawhelper_x86_p.h b/src/gui/painting/qdrawhelper_x86_p.h
index cefc213999..5749d8c9fb 100644
--- a/src/gui/painting/qdrawhelper_x86_p.h
+++ b/src/gui/painting/qdrawhelper_x86_p.h
@@ -57,8 +57,8 @@
QT_BEGIN_NAMESPACE
#ifdef __SSE2__
-void qt_memfill32(quint32 *dest, quint32 value, int count);
-void qt_memfill16(quint16 *dest, quint16 value, int count);
+void qt_memfill64_sse2(quint64 *dest, quint64 value, qsizetype count);
+void qt_memfill32_sse2(quint32 *dest, quint32 value, qsizetype count);
void qt_bitmapblit32_sse2(QRasterBuffer *rasterBuffer, int x, int y,
const QRgba64 &color,
const uchar *src, int width, int height, int stride);
@@ -79,6 +79,9 @@ void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
extern CompositionFunction qt_functionForMode_SSE2[];
extern CompositionFunctionSolid qt_functionForModeSolid_SSE2[];
+
+void qt_memfill64_avx2(quint64 *dest, quint64 value, qsizetype count);
+void qt_memfill32_avx2(quint32 *dest, quint32 value, qsizetype count);
#endif // __SSE2__
static const int numCompositionFunctions = 38;
diff --git a/src/gui/painting/qdrawingprimitive_sse2_p.h b/src/gui/painting/qdrawingprimitive_sse2_p.h
index b237ea1611..cc8d230fa8 100644
--- a/src/gui/painting/qdrawingprimitive_sse2_p.h
+++ b/src/gui/painting/qdrawingprimitive_sse2_p.h
@@ -42,7 +42,7 @@
#include <QtGui/private/qtguiglobal_p.h>
#include <private/qsimd_p.h>
-#include "qdrawhelper_p.h"
+#include "qdrawhelper_x86_p.h"
#include "qrgba64_p.h"
#ifdef __SSE2__
@@ -232,7 +232,7 @@ QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
#if QT_COMPILER_SUPPORTS_HERE(SSE4_1)
QT_FUNCTION_TARGET(SSE2)
-Q_ALWAYS_INLINE void reciprocal_mul_ss(__m128 &ia, const __m128 a, float mul)
+Q_ALWAYS_INLINE void Q_DECL_VECTORCALL reciprocal_mul_ss(__m128 &ia, const __m128 a, float mul)
{
ia = _mm_rcp_ss(a); // Approximate 1/a
// Improve precision of ia using Newton-Raphson
diff --git a/src/gui/painting/qimagescale_sse4.cpp b/src/gui/painting/qimagescale_sse4.cpp
index 34d6b3882e..5861a2e2ff 100644
--- a/src/gui/painting/qimagescale_sse4.cpp
+++ b/src/gui/painting/qimagescale_sse4.cpp
@@ -39,6 +39,7 @@
#include "qimagescale_p.h"
#include "qimage.h"
+#include <private/qdrawhelper_x86_p.h>
#include <private/qsimd_p.h>
#if defined(QT_COMPILER_SUPPORTS_SSE4_1)
@@ -47,7 +48,8 @@ QT_BEGIN_NAMESPACE
using namespace QImageScale;
-inline static __m128i qt_qimageScaleAARGBA_helper(const unsigned int *pix, int xyap, int Cxy, int step, const __m128i vxyap, const __m128i vCxy)
+inline static __m128i Q_DECL_VECTORCALL
+qt_qimageScaleAARGBA_helper(const unsigned int *pix, int xyap, int Cxy, int step, const __m128i vxyap, const __m128i vCxy)
{
__m128i vpix = _mm_cvtepu8_epi32(_mm_cvtsi32_si128(*pix));
__m128i vx = _mm_mullo_epi32(vpix, vxyap);
diff --git a/src/gui/painting/qmemrotate.cpp b/src/gui/painting/qmemrotate.cpp
index 43aeff3268..9cb787fb2c 100644
--- a/src/gui/painting/qmemrotate.cpp
+++ b/src/gui/painting/qmemrotate.cpp
@@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE
static const int tileSize = 32;
template <class T>
-Q_STATIC_TEMPLATE_FUNCTION
+static
inline void qt_memrotate90_tiled(const T *src, int w, int h, int sstride, T *dest, int dstride)
{
sstride /= sizeof(T);
@@ -103,7 +103,7 @@ inline void qt_memrotate90_tiled(const T *src, int w, int h, int sstride, T *des
}
template <class T>
-Q_STATIC_TEMPLATE_FUNCTION
+static
inline void qt_memrotate90_tiled_unpacked(const T *src, int w, int h, int sstride, T *dest,
int dstride)
{
@@ -131,7 +131,7 @@ inline void qt_memrotate90_tiled_unpacked(const T *src, int w, int h, int sstrid
}
template <class T>
-Q_STATIC_TEMPLATE_FUNCTION
+static
inline void qt_memrotate270_tiled(const T *src, int w, int h, int sstride, T *dest, int dstride)
{
sstride /= sizeof(T);
@@ -190,7 +190,7 @@ inline void qt_memrotate270_tiled(const T *src, int w, int h, int sstride, T *de
}
template <class T>
-Q_STATIC_TEMPLATE_FUNCTION
+static
inline void qt_memrotate270_tiled_unpacked(const T *src, int w, int h, int sstride, T *dest,
int dstride)
{
@@ -219,7 +219,7 @@ inline void qt_memrotate270_tiled_unpacked(const T *src, int w, int h, int sstri
template <class T>
-Q_STATIC_TEMPLATE_FUNCTION
+static
inline void qt_memrotate90_template(const T *src, int srcWidth, int srcHeight, int srcStride,
T *dest, int dstStride)
{
@@ -246,7 +246,7 @@ inline void qt_memrotate90_template<quint64>(const quint64 *src, int w, int h, i
}
template <class T>
-Q_STATIC_TEMPLATE_FUNCTION
+static
inline void qt_memrotate180_template(const T *src, int w, int h, int sstride, T *dest, int dstride)
{
const char *s = (const char*)(src) + (h - 1) * sstride;
@@ -261,7 +261,7 @@ inline void qt_memrotate180_template(const T *src, int w, int h, int sstride, T
}
template <class T>
-Q_STATIC_TEMPLATE_FUNCTION
+static
inline void qt_memrotate270_template(const T *src, int srcWidth, int srcHeight, int srcStride,
T *dest, int dstStride)
{
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 90b6d16551..0f5c7756ad 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -873,7 +873,7 @@ void QRasterPaintEngine::updateRasterState()
&& s->intOpacity == 256
&& (mode == QPainter::CompositionMode_Source
|| (mode == QPainter::CompositionMode_SourceOver
- && s->penData.solid.color.isOpaque()));
+ && s->penData.solidColor.isOpaque()));
}
s->dirty = 0;
@@ -1536,9 +1536,9 @@ static void fillRect_normalized(const QRect &r, QSpanData *data,
if (data->fillRect && (mode == QPainter::CompositionMode_Source
|| (mode == QPainter::CompositionMode_SourceOver
- && data->solid.color.isOpaque())))
+ && data->solidColor.isOpaque())))
{
- data->fillRect(data->rasterBuffer, x1, y1, width, height, data->solid.color);
+ data->fillRect(data->rasterBuffer, x1, y1, width, height, data->solidColor);
return;
}
}
@@ -1900,9 +1900,9 @@ void QRasterPaintEngine::fillRect(const QRectF &r, const QColor &color)
Q_D(QRasterPaintEngine);
QRasterPaintEngineState *s = state();
- d->solid_color_filler.solid.color = qPremultiply(combineAlpha256(color.rgba64(), s->intOpacity));
+ d->solid_color_filler.solidColor = qPremultiply(combineAlpha256(color.rgba64(), s->intOpacity));
- if (d->solid_color_filler.solid.color.isTransparent()
+ if (d->solid_color_filler.solidColor.isTransparent()
&& s->composition_mode == QPainter::CompositionMode_SourceOver) {
return;
}
@@ -2356,14 +2356,14 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe
case QImage::Format_A2BGR30_Premultiplied:
case QImage::Format_A2RGB30_Premultiplied:
// Combine premultiplied color with the opacity set on the painter.
- d->solid_color_filler.solid.color = multiplyAlpha256(QRgba64::fromArgb32(color), s->intOpacity);
+ d->solid_color_filler.solidColor = multiplyAlpha256(QRgba64::fromArgb32(color), s->intOpacity);
break;
default:
- d->solid_color_filler.solid.color = qPremultiply(combineAlpha256(QRgba64::fromArgb32(color), s->intOpacity));
+ d->solid_color_filler.solidColor = qPremultiply(combineAlpha256(QRgba64::fromArgb32(color), s->intOpacity));
break;
}
- if (d->solid_color_filler.solid.color.isTransparent() && s->composition_mode == QPainter::CompositionMode_SourceOver)
+ if (d->solid_color_filler.solidColor.isTransparent() && s->composition_mode == QPainter::CompositionMode_SourceOver)
return;
d->solid_color_filler.clip = d->clip();
@@ -2713,20 +2713,20 @@ void QRasterPaintEngine::alphaPenBlt(const void* src, int bpl, int depth, int rx
if (unclipped) {
if (depth == 1) {
if (s->penData.bitmapBlit) {
- s->penData.bitmapBlit(rb, rx, ry, s->penData.solid.color,
+ s->penData.bitmapBlit(rb, rx, ry, s->penData.solidColor,
scanline, w, h, bpl);
return;
}
} else if (depth == 8) {
if (s->penData.alphamapBlit) {
- s->penData.alphamapBlit(rb, rx, ry, s->penData.solid.color,
+ s->penData.alphamapBlit(rb, rx, ry, s->penData.solidColor,
scanline, w, h, bpl, 0, useGammaCorrection);
return;
}
} else if (depth == 32) {
// (A)RGB Alpha mask where the alpha component is not used.
if (s->penData.alphaRGBBlit) {
- s->penData.alphaRGBBlit(rb, rx, ry, s->penData.solid.color,
+ s->penData.alphaRGBBlit(rb, rx, ry, s->penData.solidColor,
(const uint *) scanline, w, h, bpl / 4, 0, useGammaCorrection);
return;
}
@@ -2755,10 +2755,10 @@ void QRasterPaintEngine::alphaPenBlt(const void* src, int bpl, int depth, int rx
ry = ny;
}
if (depth == 8)
- s->penData.alphamapBlit(rb, rx, ry, s->penData.solid.color,
+ s->penData.alphamapBlit(rb, rx, ry, s->penData.solidColor,
scanline, w, h, bpl, clip, useGammaCorrection);
else if (depth == 32)
- s->penData.alphaRGBBlit(rb, rx, ry, s->penData.solid.color,
+ s->penData.alphaRGBBlit(rb, rx, ry, s->penData.solidColor,
(const uint *) scanline, w, h, bpl / 4, clip, useGammaCorrection);
return;
}
@@ -3835,7 +3835,6 @@ QImage::Format QRasterBuffer::prepare(QImage *image)
bytes_per_line = image->bytesPerLine();
format = image->format();
- drawHelper = qDrawHelper + format;
if (image->depth() == 1 && image->colorTable().size() == 2) {
monoDestinationWithClut = true;
const QVector<QRgb> colorTable = image->colorTable();
@@ -3883,51 +3882,15 @@ void QClipData::initialize()
Q_CHECK_PTR(m_clipLines);
QT_TRY {
- m_spans = (QSpan *)malloc(clipSpanHeight*sizeof(QSpan));
allocated = clipSpanHeight;
- Q_CHECK_PTR(m_spans);
-
QT_TRY {
- if (hasRectClip) {
- int y = 0;
- while (y < ymin) {
- m_clipLines[y].spans = 0;
- m_clipLines[y].count = 0;
- ++y;
- }
-
- const int len = clipRect.width();
- count = 0;
- while (y < ymax) {
- QSpan *span = m_spans + count;
- span->x = xmin;
- span->len = len;
- span->y = y;
- span->coverage = 255;
- ++count;
-
- m_clipLines[y].spans = span;
- m_clipLines[y].count = 1;
- ++y;
- }
-
- while (y < clipSpanHeight) {
- m_clipLines[y].spans = 0;
- m_clipLines[y].count = 0;
- ++y;
- }
- } else if (hasRegionClip) {
-
+ if (hasRegionClip) {
const auto rects = clipRegion.begin();
const int numRects = clipRegion.rectCount();
-
- { // resize
- const int maxSpans = (ymax - ymin) * numRects;
- if (maxSpans > allocated) {
- m_spans = q_check_ptr((QSpan *)realloc(m_spans, maxSpans * sizeof(QSpan)));
- allocated = maxSpans;
- }
- }
+ const int maxSpans = (ymax - ymin) * numRects;
+ allocated = qMax(allocated, maxSpans);
+ m_spans = (QSpan *)malloc(allocated * sizeof(QSpan));
+ Q_CHECK_PTR(m_spans);
int y = 0;
int firstInBand = 0;
@@ -3974,6 +3937,40 @@ void QClipData::initialize()
++y;
}
+ return;
+ }
+
+ m_spans = (QSpan *)malloc(allocated * sizeof(QSpan));
+ Q_CHECK_PTR(m_spans);
+
+ if (hasRectClip) {
+ int y = 0;
+ while (y < ymin) {
+ m_clipLines[y].spans = 0;
+ m_clipLines[y].count = 0;
+ ++y;
+ }
+
+ const int len = clipRect.width();
+ count = 0;
+ while (y < ymax) {
+ QSpan *span = m_spans + count;
+ span->x = xmin;
+ span->len = len;
+ span->y = y;
+ span->coverage = 255;
+ ++count;
+
+ m_clipLines[y].spans = span;
+ m_clipLines[y].count = 1;
+ ++y;
+ }
+
+ while (y < clipSpanHeight) {
+ m_clipLines[y].spans = 0;
+ m_clipLines[y].count = 0;
+ ++y;
+ }
}
} QT_CATCH(...) {
free(m_spans); // have to free m_spans again or someone might think that we were successfully initialized.
@@ -4596,8 +4593,8 @@ void QSpanData::setup(const QBrush &brush, int alpha, QPainter::CompositionMode
case Qt::SolidPattern: {
type = Solid;
QColor c = qbrush_color(brush);
- solid.color = qPremultiply(combineAlpha256(c.rgba64(), alpha));
- if (solid.color.isTransparent() && compositionMode == QPainter::CompositionMode_SourceOver)
+ solidColor = qPremultiply(combineAlpha256(c.rgba64(), alpha));
+ if (solidColor.isTransparent() && compositionMode == QPainter::CompositionMode_SourceOver)
type = None;
break;
}
@@ -4723,17 +4720,19 @@ void QSpanData::adjustSpanMethods()
case None:
unclipped_blend = 0;
break;
- case Solid:
- unclipped_blend = rasterBuffer->drawHelper->blendColor;
- bitmapBlit = rasterBuffer->drawHelper->bitmapBlit;
- alphamapBlit = rasterBuffer->drawHelper->alphamapBlit;
- alphaRGBBlit = rasterBuffer->drawHelper->alphaRGBBlit;
- fillRect = rasterBuffer->drawHelper->fillRect;
+ case Solid: {
+ const DrawHelper &drawHelper = qDrawHelper[rasterBuffer->format];
+ unclipped_blend = drawHelper.blendColor;
+ bitmapBlit = drawHelper.bitmapBlit;
+ alphamapBlit = drawHelper.alphamapBlit;
+ alphaRGBBlit = drawHelper.alphaRGBBlit;
+ fillRect = drawHelper.fillRect;
break;
+ }
case LinearGradient:
case RadialGradient:
case ConicalGradient:
- unclipped_blend = rasterBuffer->drawHelper->blendGradient;
+ unclipped_blend = qBlendGradient;
break;
case Texture:
unclipped_blend = qBlendTexture;
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h
index 14eddf07b1..881144d1c2 100644
--- a/src/gui/painting/qpaintengine_raster_p.h
+++ b/src/gui/painting/qpaintengine_raster_p.h
@@ -471,7 +471,6 @@ public:
QPainter::CompositionMode compositionMode;
QImage::Format format;
- DrawHelper *drawHelper;
QImage colorizeBitmap(const QImage &image, const QColor &color);
private:
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index f4cbf15fc7..22d3fb3001 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -439,6 +439,9 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
}
}
+ if (d->activeStroker == &d->stroker)
+ d->stroker.setForceOpen(path.hasExplicitOpen());
+
const QPainterPath::ElementType *types = path.elements();
const qreal *points = path.points();
int pointCount = path.elementCount();
@@ -1097,7 +1100,7 @@ bool QPaintEngineEx::shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTran
}(), 2);
qreal pixelSize = fontEngine->fontDef.pixelSize;
- return (pixelSize * pixelSize * qAbs(m.determinant())) < maxCachedGlyphSizeSquared;
+ return (pixelSize * pixelSize * qAbs(m.determinant())) <= maxCachedGlyphSizeSquared;
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index b70b29e54e..df2f5e11d3 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1437,6 +1437,13 @@ void QPainterPrivate::updateState(QPainterState *newState)
by slightly less than half a pixel. Also will treat default constructed pens
as cosmetic. Potentially useful when porting a Qt 4 application to Qt 5.
+ \value LosslessImageRendering Use a lossless image rendering, whenever possible.
+ Currently, this hint is only used when QPainter is employed to output a PDF
+ file through QPrinter or QPdfWriter, where drawImage()/drawPixmap() calls
+ will encode images using a lossless compression algorithm instead of lossy
+ JPEG compression.
+ This value was added in Qt 5.13.
+
\sa renderHints(), setRenderHint(), {QPainter#Rendering
Quality}{Rendering Quality}, {Concentric Circles Example}
diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h
index 482f5fb63d..87c4899f0b 100644
--- a/src/gui/painting/qpainter.h
+++ b/src/gui/painting/qpainter.h
@@ -91,7 +91,8 @@ public:
SmoothPixmapTransform = 0x04,
HighQualityAntialiasing = 0x08,
NonCosmeticDefaultPen = 0x10,
- Qt4CompatiblePainting = 0x20
+ Qt4CompatiblePainting = 0x20,
+ LosslessImageRendering = 0x40,
};
Q_FLAG(RenderHint)
diff --git a/src/gui/painting/qpainter_p.h b/src/gui/painting/qpainter_p.h
index 2d44577310..930180e9fa 100644
--- a/src/gui/painting/qpainter_p.h
+++ b/src/gui/painting/qpainter_p.h
@@ -51,6 +51,7 @@
// We mean it.
//
+#include <QtCore/qvarlengtharray.h>
#include <QtGui/private/qtguiglobal_p.h>
#include "QtGui/qbrush.h"
#include "QtGui/qfont.h"
@@ -202,7 +203,7 @@ public:
QPainterPrivate **d_ptrs;
QPainterState *state;
- QVector<QPainterState*> states;
+ QVarLengthArray<QPainterState *, 8> states;
mutable QPainterDummyState *dummyState;
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index c5ccf0003d..3687bcf7d0 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -629,6 +629,55 @@ QPainterPath::~QPainterPath()
}
/*!
+ Clears the path elements stored.
+
+ This allows the path to reuse previous memory allocations.
+
+ \sa reserve(), capacity()
+ \since 5.13
+*/
+void QPainterPath::clear()
+{
+ if (!d_ptr)
+ return;
+
+ detach();
+ d_func()->clear();
+}
+
+/*!
+ Reserves a given amount of elements in QPainterPath's internal memory.
+
+ Attempts to allocate memory for at least \a size elements.
+
+ \sa clear(), capacity(), QVector::reserve()
+ \since 5.13
+*/
+void QPainterPath::reserve(int size)
+{
+ Q_D(QPainterPath);
+ if ((!d && size > 0) || (d && d->elements.capacity() < size)) {
+ detach();
+ d->elements.reserve(size);
+ }
+}
+
+/*!
+ Returns the number of elements allocated by the QPainterPath.
+
+ \sa clear(), reserve()
+ \since 5.13
+*/
+int QPainterPath::capacity() const
+{
+ Q_D(QPainterPath);
+ if (d)
+ return d->elements.capacity();
+
+ return 0;
+}
+
+/*!
Closes the current subpath by drawing a line to the beginning of
the subpath, automatically starting a new path. The current point
of the new path is (0, 0).
@@ -2271,13 +2320,19 @@ static inline bool epsilonCompare(const QPointF &a, const QPointF &b, const QSiz
bool QPainterPath::operator==(const QPainterPath &path) const
{
QPainterPathData *d = reinterpret_cast<QPainterPathData *>(d_func());
- if (path.d_func() == d)
+ QPainterPathData *other_d = path.d_func();
+ if (other_d == d)
return true;
- else if (!d || !path.d_func())
+ else if (!d || !other_d) {
+ if (!d && other_d->elements.empty() && other_d->fillRule == Qt::OddEvenFill)
+ return true;
+ if (!other_d && d && d->elements.empty() && d->fillRule == Qt::OddEvenFill)
+ return true;
return false;
- else if (d->fillRule != path.d_func()->fillRule)
+ }
+ else if (d->fillRule != other_d->fillRule)
return false;
- else if (d->elements.size() != path.d_func()->elements.size())
+ else if (d->elements.size() != other_d->elements.size())
return false;
const qreal qt_epsilon = sizeof(qreal) == sizeof(double) ? 1e-12 : qreal(1e-5);
@@ -2287,8 +2342,8 @@ bool QPainterPath::operator==(const QPainterPath &path) const
epsilon.rheight() *= qt_epsilon;
for (int i = 0; i < d->elements.size(); ++i)
- if (d->elements.at(i).type != path.d_func()->elements.at(i).type
- || !epsilonCompare(d->elements.at(i), path.d_func()->elements.at(i), epsilon))
+ if (d->elements.at(i).type != other_d->elements.at(i).type
+ || !epsilonCompare(d->elements.at(i), other_d->elements.at(i), epsilon))
return false;
return true;
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index db39c1c5a0..770b8f48d0 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -97,8 +97,13 @@ public:
{ qSwap(d_ptr, other.d_ptr); return *this; }
#endif
~QPainterPath();
+
inline void swap(QPainterPath &other) Q_DECL_NOEXCEPT { d_ptr.swap(other.d_ptr); }
+ void clear();
+ void reserve(int size);
+ int capacity() const;
+
void closeSubpath();
void moveTo(const QPointF &p);
diff --git a/src/gui/painting/qpainterpath_p.h b/src/gui/painting/qpainterpath_p.h
index 92d9a4ea66..a36c8005bc 100644
--- a/src/gui/painting/qpainterpath_p.h
+++ b/src/gui/painting/qpainterpath_p.h
@@ -157,7 +157,7 @@ public:
QVectorPath path;
private:
- Q_DISABLE_COPY(QVectorPathConverter)
+ Q_DISABLE_COPY_MOVE(QVectorPathConverter)
};
class QPainterPathData : public QPainterPathPrivate
@@ -194,6 +194,7 @@ public:
inline bool isClosed() const;
inline void close();
inline void maybeMoveTo();
+ inline void clear();
const QVectorPath &vectorPath() {
if (!pathConverter)
@@ -290,6 +291,25 @@ inline void QPainterPathData::maybeMoveTo()
}
}
+inline void QPainterPathData::clear()
+{
+ Q_ASSERT(ref.load() == 1);
+
+ elements.clear();
+
+ cStart = 0;
+
+ bounds = {};
+ controlBounds = {};
+
+ require_moveTo = false;
+ dirtyBounds = false;
+ dirtyControlBounds = false;
+ convex = false;
+
+ delete pathConverter;
+ pathConverter = nullptr;
+}
#define KAPPA qreal(0.5522847498)
diff --git a/src/gui/painting/qpathclipper_p.h b/src/gui/painting/qpathclipper_p.h
index 64e684e1ad..c25a479807 100644
--- a/src/gui/painting/qpathclipper_p.h
+++ b/src/gui/painting/qpathclipper_p.h
@@ -86,7 +86,7 @@ public:
static QPainterPath intersect(const QPainterPath &path, const QRectF &rect);
private:
- Q_DISABLE_COPY(QPathClipper)
+ Q_DISABLE_COPY_MOVE(QPathClipper)
enum ClipperMode {
ClipMode, // do the full clip
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index ae3df6f9ec..b23cc903b1 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -856,7 +856,6 @@ void QPdfEngine::drawRects (const QRectF *rects, int rectCount)
if (!d->hasPen && !d->hasBrush)
return;
- QBrush penBrush = d->pen.brush();
if (d->simplePen || !d->hasPen) {
// draw strokes natively in this case for better output
if(!d->simplePen && !d->stroker.matrix.isIdentity())
@@ -949,7 +948,8 @@ void QPdfEngine::drawPixmap (const QRectF &rectangle, const QPixmap &pixmap, con
QPixmap pm = sourceRect != pixmap.rect() ? pixmap.copy(sourceRect) : pixmap;
QImage image = pm.toImage();
bool bitmap = true;
- const int object = d->addImage(image, &bitmap, pm.cacheKey());
+ const bool lossless = painter()->testRenderHint(QPainter::LosslessImageRendering);
+ const int object = d->addImage(image, &bitmap, lossless, pm.cacheKey());
if (object < 0)
return;
@@ -988,7 +988,8 @@ void QPdfEngine::drawImage(const QRectF &rectangle, const QImage &image, const Q
QRect sourceRect = sr.toRect();
QImage im = sourceRect != image.rect() ? image.copy(sourceRect) : image;
bool bitmap = true;
- const int object = d->addImage(im, &bitmap, im.cacheKey());
+ const bool lossless = painter()->testRenderHint(QPainter::LosslessImageRendering);
+ const int object = d->addImage(im, &bitmap, lossless, im.cacheKey());
if (object < 0)
return;
@@ -2633,6 +2634,8 @@ int QPdfEnginePrivate::addConstantAlphaObject(int brushAlpha, int penAlpha)
int QPdfEnginePrivate::addBrushPattern(const QTransform &m, bool *specifyColor, int *gStateObject)
{
+ Q_Q(QPdfEngine);
+
int paintType = 2; // Uncolored tiling
int w = 8;
int h = 8;
@@ -2662,7 +2665,8 @@ int QPdfEnginePrivate::addBrushPattern(const QTransform &m, bool *specifyColor,
return 0;
QImage image = brush.textureImage();
bool bitmap = true;
- imageObject = addImage(image, &bitmap, image.cacheKey());
+ const bool lossless = q->painter()->testRenderHint(QPainter::LosslessImageRendering);
+ imageObject = addImage(image, &bitmap, lossless, image.cacheKey());
if (imageObject != -1) {
QImage::Format f = image.format();
if (f != QImage::Format_MonoLSB && f != QImage::Format_Mono) {
@@ -2724,7 +2728,7 @@ static inline bool is_monochrome(const QVector<QRgb> &colorTable)
/*!
* Adds an image to the pdf and return the pdf-object id. Returns -1 if adding the image failed.
*/
-int QPdfEnginePrivate::addImage(const QImage &img, bool *bitmap, qint64 serial_no)
+int QPdfEnginePrivate::addImage(const QImage &img, bool *bitmap, bool lossless, qint64 serial_no)
{
if (img.isNull())
return -1;
@@ -2785,7 +2789,7 @@ int QPdfEnginePrivate::addImage(const QImage &img, bool *bitmap, qint64 serial_n
bool hasAlpha = false;
bool hasMask = false;
- if (QImageWriter::supportedImageFormats().contains("jpeg") && !grayscale) {
+ if (QImageWriter::supportedImageFormats().contains("jpeg") && !grayscale && !lossless) {
QBuffer buffer(&imageData);
QImageWriter writer(&buffer, "jpeg");
writer.setQuality(94);
diff --git a/src/gui/painting/qpdf_p.h b/src/gui/painting/qpdf_p.h
index e2526de67d..e337c61f64 100644
--- a/src/gui/painting/qpdf_p.h
+++ b/src/gui/painting/qpdf_p.h
@@ -242,7 +242,7 @@ public:
void writeHeader();
void writeTail();
- int addImage(const QImage &image, bool *bitmap, qint64 serial_no);
+ int addImage(const QImage &image, bool *bitmap, bool lossless, qint64 serial_no);
int addConstantAlphaObject(int brushAlpha, int penAlpha = 255);
int addBrushPattern(const QTransform &matrix, bool *specifyColor, int *gStateObject);
diff --git a/src/gui/painting/qpdfwriter.cpp b/src/gui/painting/qpdfwriter.cpp
index 6c85d65538..258939a763 100644
--- a/src/gui/painting/qpdfwriter.cpp
+++ b/src/gui/painting/qpdfwriter.cpp
@@ -76,7 +76,7 @@ public:
: QPagedPaintDevicePrivate(), pd(d)
{}
- virtual ~QPdfPagedPaintDevicePrivate()
+ ~QPdfPagedPaintDevicePrivate()
{}
bool setPageLayout(const QPageLayout &newPageLayout) override
diff --git a/src/gui/painting/qrgba64.h b/src/gui/painting/qrgba64.h
index 0e5344cacb..0e0b567890 100644
--- a/src/gui/painting/qrgba64.h
+++ b/src/gui/painting/qrgba64.h
@@ -118,7 +118,27 @@ public:
Q_DECL_CONSTEXPR quint8 alpha8() const { return div_257(alpha()); }
Q_DECL_CONSTEXPR uint toArgb32() const
{
+#if defined(__cpp_constexpr) && __cpp_constexpr-0 >= 201304
+ quint64 br = rgba & Q_UINT64_C(0xffff0000ffff);
+ quint64 ag = (rgba >> 16) & Q_UINT64_C(0xffff0000ffff);
+ br += Q_UINT64_C(0x8000000080);
+ ag += Q_UINT64_C(0x8000000080);
+ br = (br - ((br >> 8) & Q_UINT64_C(0xffff0000ffff))) >> 8;
+ ag = (ag - ((ag >> 8) & Q_UINT64_C(0xffff0000ffff)));
+#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+ return ((br << 24) & 0xff000000)
+ | ((ag >> 24) & 0xff0000)
+ | ((br >> 24) & 0xff00)
+ | ((ag >> 8) & 0xff);
+#else
+ return ((ag >> 16) & 0xff000000)
+ | ((br << 16) & 0xff0000)
+ | (ag & 0xff00)
+ | ((br >> 32) & 0xff);
+#endif
+#else
return uint((alpha8() << 24) | (red8() << 16) | (green8() << 8) | blue8());
+#endif
}
Q_DECL_CONSTEXPR ushort toRgb16() const
{
@@ -131,11 +151,20 @@ public:
return *this;
if (isTransparent())
return QRgba64::fromRgba64(0);
- const quint32 a = alpha();
- const quint16 r = div_65535(red() * a);
- const quint16 g = div_65535(green() * a);
- const quint16 b = div_65535(blue() * a);
- return fromRgba64(r, g, b, quint16(a));
+ const quint64 a = alpha();
+ quint64 br = (rgba & Q_UINT64_C(0xffff0000ffff)) * a;
+ quint64 ag = ((rgba >> 16) & Q_UINT64_C(0xffff0000ffff)) * a;
+ br = (br + ((br >> 16) & Q_UINT64_C(0xffff0000ffff)) + Q_UINT64_C(0x800000008000));
+ ag = (ag + ((ag >> 16) & Q_UINT64_C(0xffff0000ffff)) + Q_UINT64_C(0x800000008000));
+#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+ ag = ag & Q_UINT64_C(0xffff0000ffff0000);
+ br = (br >> 16) & Q_UINT64_C(0xffff00000000);
+ return fromRgba64(a | br | ag);
+#else
+ br = (br >> 16) & Q_UINT64_C(0xffff0000ffff);
+ ag = ag & Q_UINT64_C(0xffff0000);
+ return fromRgba64((a << 48) | br | ag);
+#endif
}
Q_DECL_RELAXED_CONSTEXPR QRgba64 unpremultiplied() const
@@ -163,7 +192,6 @@ private:
static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE quint8 div_257_floor(uint x) { return quint8((x - (x >> 8)) >> 8); }
static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE quint8 div_257(quint16 x) { return div_257_floor(x + 128U); }
- static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE quint16 div_65535(uint x) { return quint16((x + (x>>16) + 0x8000U) >> 16); }
Q_DECL_RELAXED_CONSTEXPR Q_ALWAYS_INLINE QRgba64 unpremultiplied_32bit() const
{
if (isOpaque() || isTransparent())
diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp
index 4776545be6..0a3d802b21 100644
--- a/src/gui/painting/qstroker.cpp
+++ b/src/gui/painting/qstroker.cpp
@@ -369,7 +369,8 @@ void QStrokerOps::strokeEllipse(const QRectF &rect, void *data, const QTransform
QStroker::QStroker()
: m_capStyle(SquareJoin), m_joinStyle(FlatJoin),
m_back1X(0), m_back1Y(0),
- m_back2X(0), m_back2Y(0)
+ m_back2X(0), m_back2Y(0),
+ m_forceOpen(false)
{
m_strokeWidth = qt_real_to_fixed(1);
m_miterLimit = qt_real_to_fixed(2);
@@ -748,7 +749,7 @@ template <class Iterator> bool qt_stroke_side(Iterator *it,
}
}
- if (start == prev) {
+ if (start == prev && !stroker->forceOpen()) {
// closed subpath, join first and last point
#ifdef QPP_STROKE_DEBUG
qDebug("\n ---> (side) closed subpath");
diff --git a/src/gui/painting/qstroker_p.h b/src/gui/painting/qstroker_p.h
index 1a7c184e1a..722a0904f3 100644
--- a/src/gui/painting/qstroker_p.h
+++ b/src/gui/painting/qstroker_p.h
@@ -222,6 +222,9 @@ public:
void setMiterLimit(qfixed length) { m_miterLimit = length; }
qfixed miterLimit() const { return m_miterLimit; }
+ void setForceOpen(bool state) { m_forceOpen = state; }
+ bool forceOpen() { return m_forceOpen; }
+
void joinPoints(qfixed x, qfixed y, const QLineF &nextLine, LineJoinMode join);
inline void emitMoveTo(qfixed x, qfixed y);
inline void emitLineTo(qfixed x, qfixed y);
@@ -247,6 +250,8 @@ protected:
qfixed m_back2X;
qfixed m_back2Y;
+
+ bool m_forceOpen;
};
class Q_GUI_EXPORT QDashStroker : public QStrokerOps
diff --git a/src/gui/painting/qvectorpath_p.h b/src/gui/painting/qvectorpath_p.h
index d1b08ed423..1b649a5d2a 100644
--- a/src/gui/painting/qvectorpath_p.h
+++ b/src/gui/painting/qvectorpath_p.h
@@ -99,7 +99,8 @@ public:
// Shape rendering specifiers...
OddEvenFill = 0x1000,
WindingFill = 0x2000,
- ImplicitClose = 0x4000
+ ImplicitClose = 0x4000,
+ ExplicitOpen = 0x8000
};
// ### Falcon: introduca a struct XY for points so lars is not so confused...
@@ -124,6 +125,7 @@ public:
inline bool isCacheable() const { return m_hints & ShouldUseCacheHint; }
inline bool hasImplicitClose() const { return m_hints & ImplicitClose; }
+ inline bool hasExplicitOpen() const { return m_hints & ExplicitOpen; }
inline bool hasWindingFill() const { return m_hints & WindingFill; }
inline void makeCacheable() const { m_hints |= ShouldUseCacheHint; m_cache = 0; }
@@ -142,7 +144,7 @@ public:
case QPaintEngine::ConvexMode: return ConvexPolygonHint | ImplicitClose;
case QPaintEngine::OddEvenMode: return PolygonHint | OddEvenFill | ImplicitClose;
case QPaintEngine::WindingMode: return PolygonHint | WindingFill | ImplicitClose;
- case QPaintEngine::PolylineMode: return PolygonHint;
+ case QPaintEngine::PolylineMode: return PolygonHint | ExplicitOpen;
default: return 0;
}
}
@@ -194,7 +196,7 @@ public:
private:
- Q_DISABLE_COPY(QVectorPath)
+ Q_DISABLE_COPY_MOVE(QVectorPath)
const QPainterPath::ElementType *m_elements;
const qreal *m_points;
diff --git a/src/gui/text/qabstracttextdocumentlayout.h b/src/gui/text/qabstracttextdocumentlayout.h
index 8fea27f772..3371401420 100644
--- a/src/gui/text/qabstracttextdocumentlayout.h
+++ b/src/gui/text/qabstracttextdocumentlayout.h
@@ -143,7 +143,9 @@ public:
virtual void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) = 0;
};
+#ifndef Q_CLANG_QDOC
Q_DECLARE_INTERFACE(QTextObjectInterface, "org.qt-project.Qt.QTextObjectInterface")
+#endif
QT_END_NAMESPACE
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index 325fd26a31..dc7e128bcd 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -115,6 +115,7 @@ static const QCssKnownValue properties[NumProperties - 1] = {
{ "float", Float },
{ "font", Font },
{ "font-family", FontFamily },
+ { "font-kerning", FontKerning },
{ "font-size", FontSize },
{ "font-style", FontStyle },
{ "font-variant", FontVariant },
@@ -368,6 +369,7 @@ static inline bool isInheritable(Property propertyId)
{
switch (propertyId) {
case Font:
+ case FontKerning:
case FontFamily:
case FontSize:
case FontStyle:
@@ -721,7 +723,8 @@ static ColorData parseColorValue(QCss::Value v)
if (lst.count() != 2)
return ColorData();
- if ((lst.at(0).compare(QLatin1String("palette"), Qt::CaseInsensitive)) == 0) {
+ const QString &identifier = lst.at(0);
+ if ((identifier.compare(QLatin1String("palette"), Qt::CaseInsensitive)) == 0) {
int role = findKnownValue(lst.at(1).trimmed(), values, NumKnownValues);
if (role >= Value_FirstColorRole && role <= Value_LastColorRole)
return (QPalette::ColorRole)(role-Value_FirstColorRole);
@@ -729,8 +732,16 @@ static ColorData parseColorValue(QCss::Value v)
return ColorData();
}
- bool rgb = lst.at(0).startsWith(QLatin1String("rgb"));
- bool rgba = lst.at(0).startsWith(QLatin1String("rgba"));
+ const bool rgb = identifier.startsWith(QLatin1String("rgb"));
+ const bool hsv = !rgb && identifier.startsWith(QLatin1String("hsv"));
+ const bool hsl = !rgb && !hsv && identifier.startsWith(QLatin1String("hsl"));
+
+ if (!rgb && !hsv && !hsl)
+ return ColorData();
+
+ const bool hasAlpha = identifier.size() == 4 && identifier.at(3) == QLatin1Char('a');
+ if (identifier.size() > 3 && !hasAlpha)
+ return ColorData();
Parser p(lst.at(1));
if (!p.testExpr())
@@ -743,7 +754,8 @@ static ColorData parseColorValue(QCss::Value v)
for (int i = 0; i < qMin(tokenCount, 7); i += 2) {
if (colorDigits.at(i).type == Value::Percentage) {
- colorDigits[i].variant = colorDigits.at(i).variant.toReal() * (255. / 100.);
+ const qreal maxRange = (rgb || i != 0) ? 255. : 359.;
+ colorDigits[i].variant = colorDigits.at(i).variant.toReal() * (maxRange / 100.);
colorDigits[i].type = Value::Number;
} else if (colorDigits.at(i).type != Value::Number) {
return ColorData();
@@ -754,20 +766,29 @@ static ColorData parseColorValue(QCss::Value v)
if (tokenCount < 5)
return ColorData();
+ // ### Qt6: replace this with a check and return invalid color when token count does not match
+ if (hasAlpha && tokenCount != 7)
+ qWarning("QCssParser::parseColorValue: Specified color with alpha value but no alpha given: '%s'", qPrintable(lst.join(QLatin1Char(' '))));
+ if (!hasAlpha && tokenCount != 5)
+ qWarning("QCssParser::parseColorValue: Specified color without alpha value but alpha given: '%s'", qPrintable(lst.join(QLatin1Char(' '))));
+
int v1 = colorDigits.at(0).variant.toInt();
int v2 = colorDigits.at(2).variant.toInt();
int v3 = colorDigits.at(4).variant.toInt();
int alpha = 255;
- if (tokenCount >= 7) {
+ if (tokenCount == 7) {
int alphaValue = colorDigits.at(6).variant.toInt();
- if (rgba && alphaValue <= 1)
+ if (alphaValue <= 1)
alpha = colorDigits.at(6).variant.toReal() * 255.;
else
alpha = alphaValue;
}
- return rgb ? QColor::fromRgb(v1, v2, v3, alpha)
- : QColor::fromHsv(v1, v2, v3, alpha);
+ if (rgb)
+ return QColor::fromRgb(v1, v2, v3, alpha);
+ if (hsv)
+ return QColor::fromHsv(v1, v2, v3, alpha);
+ return QColor::fromHsl(v1, v2, v3, alpha);
}
static QColor colorFromData(const ColorData& c, const QPalette &pal)
@@ -1142,6 +1163,19 @@ static bool setFontStyleFromValue(const QCss::Value &value, QFont *font)
return false;
}
+static bool setFontKerningFromValue(const QCss::Value &value, QFont *font)
+{
+ if (value.type != Value::KnownIdentifier)
+ return false ;
+ switch (value.variant.toInt()) {
+ case Value_Normal: font->setKerning(true); return true;
+ case Value_None: font->setKerning(false); return true;
+ case Value_Auto: return true;
+ default: break;
+ }
+ return false;
+}
+
static bool setFontWeightFromValue(const QCss::Value &value, QFont *font)
{
if (value.type == Value::KnownIdentifier) {
@@ -1166,11 +1200,13 @@ static bool setFontWeightFromValue(const QCss::Value &value, QFont *font)
static bool setFontFamilyFromValues(const QVector<QCss::Value> &values, QFont *font, int start = 0)
{
QString family;
+ QStringList families;
bool shouldAddSpace = false;
for (int i = start; i < values.count(); ++i) {
const QCss::Value &v = values.at(i);
if (v.type == Value::TermOperatorComma) {
- family += QLatin1Char(',');
+ families << family;
+ family.clear();
shouldAddSpace = false;
continue;
}
@@ -1182,9 +1218,12 @@ static bool setFontFamilyFromValues(const QVector<QCss::Value> &values, QFont *f
family += str;
shouldAddSpace = true;
}
- if (family.isEmpty())
+ if (!family.isEmpty())
+ families << family;
+ if (families.isEmpty())
return false;
- font->setFamily(family);
+ font->setFamily(families.at(0));
+ font->setFamilies(families);
return true;
}
@@ -1274,6 +1313,7 @@ bool ValueExtractor::extractFont(QFont *font, int *fontSizeAdjustment)
case FontStyle: setFontStyleFromValue(val, font); break;
case FontWeight: setFontWeightFromValue(val, font); break;
case FontFamily: setFontFamilyFromValues(decl.d->values, font); break;
+ case FontKerning: setFontKerningFromValue(val, font); break;
case TextDecoration: setTextDecorationFromValues(decl.d->values, font); break;
case Font: parseShorthandFontProperty(decl.d->values, font, fontSizeAdjustment); break;
case FontVariant: setFontVariantFromValue(val, font); break;
@@ -1968,7 +2008,7 @@ bool StyleSelector::basicSelectorMatches(const BasicSelector &sel, NodePtr node)
}
void StyleSelector::matchRule(NodePtr node, const StyleRule &rule, StyleSheetOrigin origin,
- int depth, QMap<uint, StyleRule> *weightedRules)
+ int depth, QMultiMap<uint, StyleRule> *weightedRules)
{
for (int j = 0; j < rule.selectors.count(); ++j) {
const Selector& selector = rule.selectors.at(j);
@@ -1982,7 +2022,7 @@ void StyleSelector::matchRule(NodePtr node, const StyleRule &rule, StyleSheetOri
newRule.selectors[0] = selector;
}
//We might have rules with the same weight if they came from a rule with several selectors
- weightedRules->insertMulti(weight, newRule);
+ weightedRules->insert(weight, newRule);
}
}
}
@@ -1995,7 +2035,7 @@ QVector<StyleRule> StyleSelector::styleRulesForNode(NodePtr node)
if (styleSheets.isEmpty())
return rules;
- QMap<uint, StyleRule> weightedRules; // (spec, rule) that will be sorted below
+ QMultiMap<uint, StyleRule> weightedRules; // (spec, rule) that will be sorted below
//prune using indexed stylesheet
for (int sheetIdx = 0; sheetIdx < styleSheets.count(); ++sheetIdx) {
diff --git a/src/gui/text/qcssparser_p.h b/src/gui/text/qcssparser_p.h
index c1594531ea..860bbe382a 100644
--- a/src/gui/text/qcssparser_p.h
+++ b/src/gui/text/qcssparser_p.h
@@ -195,6 +195,7 @@ enum Property {
QtListNumberSuffix,
LineHeight,
QtLineHeightType,
+ FontKerning,
NumProperties
};
@@ -673,7 +674,7 @@ public:
Qt::CaseSensitivity nameCaseSensitivity;
private:
void matchRule(NodePtr node, const StyleRule &rules, StyleSheetOrigin origin,
- int depth, QMap<uint, StyleRule> *weightedRules);
+ int depth, QMultiMap<uint, StyleRule> *weightedRules);
bool selectorMatches(const Selector &rule, NodePtr node);
bool basicSelectorMatches(const BasicSelector &rule, NodePtr node);
};
diff --git a/src/gui/text/qcssscanner.cpp b/src/gui/text/qcssscanner.cpp
index 33dc01c8bc..d48cbb71d7 100644
--- a/src/gui/text/qcssscanner.cpp
+++ b/src/gui/text/qcssscanner.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -37,7 +37,7 @@
**
****************************************************************************/
-// auto generated. DO NOT EDIT.
+// auto generated by qtbase/util/lexgen/. DO NOT EDIT.
class QCssScanner_Generated
{
public:
@@ -75,23 +75,23 @@ int QCssScanner_Generated::lex()
// initial state
ch = next();
if (ch.unicode() >= 9 && ch.unicode() <= 10)
- goto state_1;
+ goto state_4;
if (ch.unicode() >= 12 && ch.unicode() <= 13)
- goto state_1;
+ goto state_4;
if (ch.unicode() == 32)
- goto state_1;
+ goto state_4;
if (ch.unicode() == 33) {
token = QCss::EXCLAMATION_SYM;
goto found;
}
if (ch.unicode() == 34)
- goto state_3;
+ goto state_2;
if (ch.unicode() == 35)
- goto state_4;
+ goto state_1;
if (ch.unicode() == 36)
- goto state_5;
- if (ch.unicode() == 39)
goto state_6;
+ if (ch.unicode() == 39)
+ goto state_5;
if (ch.unicode() == 40) {
token = QCss::LPAREN;
goto found;
@@ -101,17 +101,17 @@ int QCssScanner_Generated::lex()
goto found;
}
if (ch.unicode() == 42)
- goto state_9;
+ goto state_8;
if (ch.unicode() == 43)
- goto state_10;
+ goto state_7;
if (ch.unicode() == 44)
- goto state_11;
+ goto state_14;
if (ch.unicode() == 45)
- goto state_12;
- if (ch.unicode() == 46)
goto state_13;
+ if (ch.unicode() == 46)
+ goto state_12;
if (ch.unicode() == 47)
- goto state_14;
+ goto state_11;
if (ch.unicode() >= 48 && ch.unicode() <= 57)
goto state_15;
if (ch.unicode() == 58) {
@@ -123,64 +123,56 @@ int QCssScanner_Generated::lex()
goto found;
}
if (ch.unicode() == 60)
- goto state_18;
+ goto state_20;
if (ch.unicode() == 61) {
token = QCss::EQUAL;
goto found;
}
if (ch.unicode() == 62)
- goto state_20;
+ goto state_18;
if (ch.unicode() == 64)
- goto state_21;
+ goto state_26;
if (ch.unicode() == 91) {
token = QCss::LBRACKET;
goto found;
}
if (ch.unicode() == 92)
- goto state_23;
+ goto state_30;
if (ch.unicode() == 93) {
token = QCss::RBRACKET;
goto found;
}
if (ch.unicode() == 94)
- goto state_25;
+ goto state_28;
if (ch.unicode() == 95)
- goto state_26;
+ goto state_21;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_26;
+ goto state_21;
if (ch.unicode() == 123)
- goto state_27;
+ goto state_22;
if (ch.unicode() == 124)
- goto state_28;
+ goto state_25;
if (ch.unicode() == 125) {
token = QCss::RBRACE;
goto found;
}
if (ch.unicode() == 126)
- goto state_30;
+ goto state_23;
goto out;
state_1:
- lastAcceptingPos = pos;
- token = QCss::S;
ch = next();
- if (ch.unicode() >= 9 && ch.unicode() <= 10)
- goto state_31;
- if (ch.unicode() >= 12 && ch.unicode() <= 13)
+ if (ch.unicode() == 45)
goto state_31;
- if (ch.unicode() == 32)
+ if (ch.unicode() >= 48 && ch.unicode() <= 57)
goto state_31;
- if (ch.unicode() == 43)
- goto state_10;
- if (ch.unicode() == 44)
- goto state_11;
- if (ch.unicode() == 62)
- goto state_20;
- if (ch.unicode() == 123)
- goto state_27;
- if (ch.unicode() == 126)
+ if (ch.unicode() == 92)
goto state_32;
+ if (ch.unicode() == 95)
+ goto state_31;
+ if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
+ goto state_31;
goto out;
- state_3:
+ state_2:
lastAcceptingPos = pos;
token = QCss::INVALID;
ch = next();
@@ -204,93 +196,101 @@ int QCssScanner_Generated::lex()
goto state_33;
goto out;
state_4:
+ lastAcceptingPos = pos;
+ token = QCss::S;
ch = next();
- if (ch.unicode() == 45)
- goto state_36;
- if (ch.unicode() >= 48 && ch.unicode() <= 57)
+ if (ch.unicode() >= 9 && ch.unicode() <= 10)
goto state_36;
- if (ch.unicode() == 92)
- goto state_37;
- if (ch.unicode() == 95)
+ if (ch.unicode() >= 12 && ch.unicode() <= 13)
goto state_36;
- if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
+ if (ch.unicode() == 32)
goto state_36;
+ if (ch.unicode() == 43)
+ goto state_7;
+ if (ch.unicode() == 44)
+ goto state_14;
+ if (ch.unicode() == 62)
+ goto state_18;
+ if (ch.unicode() == 123)
+ goto state_22;
+ if (ch.unicode() == 126)
+ goto state_37;
goto out;
state_5:
- ch = next();
- if (ch.unicode() == 61) {
- token = QCss::ENDSWITH;
- goto found;
- }
- goto out;
- state_6:
lastAcceptingPos = pos;
token = QCss::INVALID;
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
- goto state_39;
+ goto state_38;
if (ch.unicode() == 11)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 14 && ch.unicode() <= 38)
- goto state_39;
+ goto state_38;
if (ch.unicode() == 39)
- goto state_40;
- if (ch.unicode() >= 40 && ch.unicode() <= 91)
goto state_39;
+ if (ch.unicode() >= 40 && ch.unicode() <= 91)
+ goto state_38;
if (ch.unicode() == 92)
- goto state_41;
+ goto state_40;
if (ch.unicode() >= 93 && ch.unicode() <= 96)
- goto state_39;
+ goto state_38;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 123)
- goto state_39;
+ goto state_38;
goto out;
- state_9:
- lastAcceptingPos = pos;
- token = QCss::STAR;
+ state_6:
ch = next();
if (ch.unicode() == 61) {
- token = QCss::CONTAINS;
+ token = QCss::ENDSWITH;
goto found;
}
goto out;
- state_10:
+ state_7:
lastAcceptingPos = pos;
token = QCss::PLUS;
goto out;
+ state_8:
+ lastAcceptingPos = pos;
+ token = QCss::STAR;
+ ch = next();
+ if (ch.unicode() == 61) {
+ token = QCss::CONTAINS;
+ goto found;
+ }
+ goto out;
state_11:
lastAcceptingPos = pos;
- token = QCss::COMMA;
+ token = QCss::SLASH;
+ ch = next();
+ if (ch.unicode() == 42) {
+ token = handleCommentStart();
+ goto found;
+ }
goto out;
state_12:
lastAcceptingPos = pos;
+ token = QCss::DOT;
+ ch = next();
+ if (ch.unicode() >= 48 && ch.unicode() <= 57)
+ goto state_44;
+ goto out;
+ state_13:
+ lastAcceptingPos = pos;
token = QCss::MINUS;
ch = next();
if (ch.unicode() == 45)
- goto state_43;
+ goto state_45;
if (ch.unicode() == 92)
- goto state_23;
+ goto state_30;
if (ch.unicode() == 95)
- goto state_26;
+ goto state_21;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_26;
- goto out;
- state_13:
- lastAcceptingPos = pos;
- token = QCss::DOT;
- ch = next();
- if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_44;
+ goto state_21;
goto out;
state_14:
lastAcceptingPos = pos;
- token = QCss::SLASH;
- ch = next();
- if (ch.unicode() == 42) {
- token = handleCommentStart();
- goto found;
- }
+ token = QCss::COMMA;
goto out;
state_15:
lastAcceptingPos = pos;
@@ -299,68 +299,70 @@ int QCssScanner_Generated::lex()
if (ch.unicode() == 37)
goto state_46;
if (ch.unicode() == 45)
- goto state_47;
- if (ch.unicode() == 46)
goto state_48;
+ if (ch.unicode() == 46)
+ goto state_47;
if (ch.unicode() >= 48 && ch.unicode() <= 57)
goto state_49;
if (ch.unicode() == 92)
- goto state_50;
- if (ch.unicode() == 95)
goto state_51;
+ if (ch.unicode() == 95)
+ goto state_50;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_51;
+ goto state_50;
goto out;
state_18:
+ lastAcceptingPos = pos;
+ token = QCss::GREATER;
+ goto out;
+ state_20:
ch = next();
if (ch.unicode() == 33)
goto state_52;
goto out;
- state_20:
- lastAcceptingPos = pos;
- token = QCss::GREATER;
- goto out;
state_21:
+ lastAcceptingPos = pos;
+ token = QCss::IDENT;
ch = next();
- if (ch.unicode() == 45)
+ if (ch.unicode() == 40)
goto state_53;
- if (ch.unicode() == 92)
+ if (ch.unicode() == 45)
goto state_54;
- if (ch.unicode() == 95)
+ if (ch.unicode() >= 48 && ch.unicode() <= 57)
+ goto state_54;
+ if (ch.unicode() == 92)
goto state_55;
+ if (ch.unicode() == 95)
+ goto state_54;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_55;
+ goto state_54;
+ goto out;
+ state_22:
+ lastAcceptingPos = pos;
+ token = QCss::LBRACE;
goto out;
state_23:
+ lastAcceptingPos = pos;
+ token = QCss::TILDE;
ch = next();
- if (ch.unicode() >= 1 && ch.unicode() <= 9)
- goto state_56;
- if (ch.unicode() == 11)
- goto state_56;
- if (ch.unicode() >= 14 && ch.unicode() <= 47)
- goto state_56;
- if (ch.unicode() >= 58 && ch.unicode() <= 96)
- goto state_56;
- if (ch.unicode() >= 103)
- goto state_56;
+ if (ch.unicode() == 61) {
+ token = QCss::INCLUDES;
+ goto found;
+ }
goto out;
state_25:
+ lastAcceptingPos = pos;
+ token = QCss::OR;
ch = next();
if (ch.unicode() == 61) {
- token = QCss::BEGINSWITH;
+ token = QCss::DASHMATCH;
goto found;
}
goto out;
state_26:
- lastAcceptingPos = pos;
- token = QCss::IDENT;
ch = next();
- if (ch.unicode() == 40)
- goto state_58;
if (ch.unicode() == 45)
- goto state_59;
- if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_59;
+ goto state_58;
if (ch.unicode() == 92)
goto state_60;
if (ch.unicode() == 95)
@@ -368,52 +370,53 @@ int QCssScanner_Generated::lex()
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
goto state_59;
goto out;
- state_27:
- lastAcceptingPos = pos;
- token = QCss::LBRACE;
- goto out;
state_28:
- lastAcceptingPos = pos;
- token = QCss::OR;
ch = next();
if (ch.unicode() == 61) {
- token = QCss::DASHMATCH;
+ token = QCss::BEGINSWITH;
goto found;
}
goto out;
state_30:
- lastAcceptingPos = pos;
- token = QCss::TILDE;
ch = next();
- if (ch.unicode() == 61) {
- token = QCss::INCLUDES;
- goto found;
- }
+ if (ch.unicode() >= 1 && ch.unicode() <= 9)
+ goto state_62;
+ if (ch.unicode() == 11)
+ goto state_62;
+ if (ch.unicode() >= 14 && ch.unicode() <= 47)
+ goto state_62;
+ if (ch.unicode() >= 58 && ch.unicode() <= 96)
+ goto state_62;
+ if (ch.unicode() >= 103)
+ goto state_62;
goto out;
state_31:
lastAcceptingPos = pos;
- token = QCss::S;
+ token = QCss::HASH;
ch = next();
- if (ch.unicode() >= 9 && ch.unicode() <= 10)
- goto state_31;
- if (ch.unicode() >= 12 && ch.unicode() <= 13)
- goto state_31;
- if (ch.unicode() == 32)
- goto state_31;
- if (ch.unicode() == 43)
- goto state_10;
- if (ch.unicode() == 44)
- goto state_11;
- if (ch.unicode() == 62)
- goto state_20;
- if (ch.unicode() == 123)
- goto state_27;
- if (ch.unicode() == 126)
- goto state_32;
+ if (ch.unicode() == 45)
+ goto state_63;
+ if (ch.unicode() >= 48 && ch.unicode() <= 57)
+ goto state_63;
+ if (ch.unicode() == 92)
+ goto state_64;
+ if (ch.unicode() == 95)
+ goto state_63;
+ if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
+ goto state_63;
goto out;
state_32:
- lastAcceptingPos = pos;
- token = QCss::TILDE;
+ ch = next();
+ if (ch.unicode() >= 1 && ch.unicode() <= 9)
+ goto state_65;
+ if (ch.unicode() == 11)
+ goto state_65;
+ if (ch.unicode() >= 14 && ch.unicode() <= 47)
+ goto state_65;
+ if (ch.unicode() >= 58 && ch.unicode() <= 96)
+ goto state_65;
+ if (ch.unicode() >= 103)
+ goto state_65;
goto out;
state_33:
lastAcceptingPos = pos;
@@ -445,78 +448,75 @@ int QCssScanner_Generated::lex()
state_35:
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
- goto state_63;
+ goto state_66;
if (ch.unicode() == 10)
- goto state_64;
+ goto state_67;
if (ch.unicode() == 11)
- goto state_63;
+ goto state_66;
if (ch.unicode() == 12)
- goto state_65;
+ goto state_69;
if (ch.unicode() == 13)
- goto state_66;
+ goto state_68;
if (ch.unicode() >= 14 && ch.unicode() <= 47)
- goto state_63;
+ goto state_66;
if (ch.unicode() >= 58 && ch.unicode() <= 96)
- goto state_63;
+ goto state_66;
if (ch.unicode() >= 103)
- goto state_63;
+ goto state_66;
goto out;
state_36:
lastAcceptingPos = pos;
- token = QCss::HASH;
+ token = QCss::S;
ch = next();
- if (ch.unicode() == 45)
- goto state_67;
- if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_67;
- if (ch.unicode() == 92)
- goto state_68;
- if (ch.unicode() == 95)
- goto state_67;
- if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_67;
+ if (ch.unicode() >= 9 && ch.unicode() <= 10)
+ goto state_36;
+ if (ch.unicode() >= 12 && ch.unicode() <= 13)
+ goto state_36;
+ if (ch.unicode() == 32)
+ goto state_36;
+ if (ch.unicode() == 43)
+ goto state_7;
+ if (ch.unicode() == 44)
+ goto state_14;
+ if (ch.unicode() == 62)
+ goto state_18;
+ if (ch.unicode() == 123)
+ goto state_22;
+ if (ch.unicode() == 126)
+ goto state_37;
goto out;
state_37:
- ch = next();
- if (ch.unicode() >= 1 && ch.unicode() <= 9)
- goto state_69;
- if (ch.unicode() == 11)
- goto state_69;
- if (ch.unicode() >= 14 && ch.unicode() <= 47)
- goto state_69;
- if (ch.unicode() >= 58 && ch.unicode() <= 96)
- goto state_69;
- if (ch.unicode() >= 103)
- goto state_69;
+ lastAcceptingPos = pos;
+ token = QCss::TILDE;
goto out;
- state_39:
+ state_38:
lastAcceptingPos = pos;
token = QCss::INVALID;
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
- goto state_39;
+ goto state_38;
if (ch.unicode() == 11)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 14 && ch.unicode() <= 38)
- goto state_39;
+ goto state_38;
if (ch.unicode() == 39)
- goto state_40;
- if (ch.unicode() >= 40 && ch.unicode() <= 91)
goto state_39;
+ if (ch.unicode() >= 40 && ch.unicode() <= 91)
+ goto state_38;
if (ch.unicode() == 92)
- goto state_41;
+ goto state_40;
if (ch.unicode() >= 93 && ch.unicode() <= 96)
- goto state_39;
+ goto state_38;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 123)
- goto state_39;
+ goto state_38;
goto out;
- state_40:
+ state_39:
lastAcceptingPos = pos;
token = QCss::STRING;
goto out;
- state_41:
+ state_40:
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
goto state_70;
@@ -525,9 +525,9 @@ int QCssScanner_Generated::lex()
if (ch.unicode() == 11)
goto state_70;
if (ch.unicode() == 12)
- goto state_72;
- if (ch.unicode() == 13)
goto state_73;
+ if (ch.unicode() == 13)
+ goto state_72;
if (ch.unicode() >= 14 && ch.unicode() <= 47)
goto state_70;
if (ch.unicode() >= 58 && ch.unicode() <= 96)
@@ -535,13 +535,6 @@ int QCssScanner_Generated::lex()
if (ch.unicode() >= 103)
goto state_70;
goto out;
- state_43:
- ch = next();
- if (ch.unicode() == 62) {
- token = QCss::CDC;
- goto found;
- }
- goto out;
state_44:
lastAcceptingPos = pos;
token = QCss::NUMBER;
@@ -549,15 +542,22 @@ int QCssScanner_Generated::lex()
if (ch.unicode() == 37)
goto state_46;
if (ch.unicode() == 45)
- goto state_47;
+ goto state_48;
if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_75;
+ goto state_74;
if (ch.unicode() == 92)
- goto state_50;
- if (ch.unicode() == 95)
goto state_51;
+ if (ch.unicode() == 95)
+ goto state_50;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_51;
+ goto state_50;
+ goto out;
+ state_45:
+ ch = next();
+ if (ch.unicode() == 62) {
+ token = QCss::CDC;
+ goto found;
+ }
goto out;
state_46:
lastAcceptingPos = pos;
@@ -565,17 +565,17 @@ int QCssScanner_Generated::lex()
goto out;
state_47:
ch = next();
- if (ch.unicode() == 92)
- goto state_50;
- if (ch.unicode() == 95)
- goto state_51;
- if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_51;
+ if (ch.unicode() >= 48 && ch.unicode() <= 57)
+ goto state_44;
goto out;
state_48:
ch = next();
- if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_44;
+ if (ch.unicode() == 92)
+ goto state_51;
+ if (ch.unicode() == 95)
+ goto state_50;
+ if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
+ goto state_50;
goto out;
state_49:
lastAcceptingPos = pos;
@@ -584,45 +584,45 @@ int QCssScanner_Generated::lex()
if (ch.unicode() == 37)
goto state_46;
if (ch.unicode() == 45)
- goto state_47;
- if (ch.unicode() == 46)
goto state_48;
+ if (ch.unicode() == 46)
+ goto state_47;
if (ch.unicode() >= 48 && ch.unicode() <= 57)
goto state_49;
if (ch.unicode() == 92)
- goto state_50;
- if (ch.unicode() == 95)
goto state_51;
+ if (ch.unicode() == 95)
+ goto state_50;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_51;
+ goto state_50;
goto out;
state_50:
+ lastAcceptingPos = pos;
+ token = QCss::LENGTH;
ch = next();
- if (ch.unicode() >= 1 && ch.unicode() <= 9)
- goto state_76;
- if (ch.unicode() == 11)
+ if (ch.unicode() == 45)
goto state_76;
- if (ch.unicode() >= 14 && ch.unicode() <= 47)
+ if (ch.unicode() >= 48 && ch.unicode() <= 57)
goto state_76;
- if (ch.unicode() >= 58 && ch.unicode() <= 96)
+ if (ch.unicode() == 92)
+ goto state_77;
+ if (ch.unicode() == 95)
goto state_76;
- if (ch.unicode() >= 103)
+ if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
goto state_76;
goto out;
state_51:
- lastAcceptingPos = pos;
- token = QCss::LENGTH;
ch = next();
- if (ch.unicode() == 45)
- goto state_77;
- if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_77;
- if (ch.unicode() == 92)
+ if (ch.unicode() >= 1 && ch.unicode() <= 9)
+ goto state_78;
+ if (ch.unicode() == 11)
+ goto state_78;
+ if (ch.unicode() >= 14 && ch.unicode() <= 47)
+ goto state_78;
+ if (ch.unicode() >= 58 && ch.unicode() <= 96)
+ goto state_78;
+ if (ch.unicode() >= 103)
goto state_78;
- if (ch.unicode() == 95)
- goto state_77;
- if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_77;
goto out;
state_52:
ch = next();
@@ -630,15 +630,27 @@ int QCssScanner_Generated::lex()
goto state_79;
goto out;
state_53:
+ lastAcceptingPos = pos;
+ token = QCss::FUNCTION;
+ goto out;
+ state_54:
+ lastAcceptingPos = pos;
+ token = QCss::IDENT;
ch = next();
- if (ch.unicode() == 92)
+ if (ch.unicode() == 40)
+ goto state_53;
+ if (ch.unicode() == 45)
goto state_54;
- if (ch.unicode() == 95)
+ if (ch.unicode() >= 48 && ch.unicode() <= 57)
+ goto state_54;
+ if (ch.unicode() == 92)
goto state_55;
+ if (ch.unicode() == 95)
+ goto state_54;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_55;
+ goto state_54;
goto out;
- state_54:
+ state_55:
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
goto state_80;
@@ -651,7 +663,16 @@ int QCssScanner_Generated::lex()
if (ch.unicode() >= 103)
goto state_80;
goto out;
- state_55:
+ state_58:
+ ch = next();
+ if (ch.unicode() == 92)
+ goto state_60;
+ if (ch.unicode() == 95)
+ goto state_59;
+ if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
+ goto state_59;
+ goto out;
+ state_59:
lastAcceptingPos = pos;
token = QCss::ATKEYWORD_SYM;
ch = next();
@@ -666,58 +687,80 @@ int QCssScanner_Generated::lex()
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
goto state_81;
goto out;
- state_56:
+ state_60:
+ ch = next();
+ if (ch.unicode() >= 1 && ch.unicode() <= 9)
+ goto state_83;
+ if (ch.unicode() == 11)
+ goto state_83;
+ if (ch.unicode() >= 14 && ch.unicode() <= 47)
+ goto state_83;
+ if (ch.unicode() >= 58 && ch.unicode() <= 96)
+ goto state_83;
+ if (ch.unicode() >= 103)
+ goto state_83;
+ goto out;
+ state_62:
lastAcceptingPos = pos;
token = QCss::IDENT;
ch = next();
if (ch.unicode() == 40)
- goto state_58;
+ goto state_53;
if (ch.unicode() == 45)
- goto state_59;
+ goto state_54;
if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_59;
+ goto state_54;
if (ch.unicode() == 92)
- goto state_60;
+ goto state_55;
if (ch.unicode() == 95)
- goto state_59;
+ goto state_54;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_59;
- goto out;
- state_58:
- lastAcceptingPos = pos;
- token = QCss::FUNCTION;
+ goto state_54;
goto out;
- state_59:
+ state_63:
lastAcceptingPos = pos;
- token = QCss::IDENT;
+ token = QCss::HASH;
ch = next();
- if (ch.unicode() == 40)
- goto state_58;
if (ch.unicode() == 45)
- goto state_59;
+ goto state_63;
if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_59;
+ goto state_63;
if (ch.unicode() == 92)
- goto state_60;
+ goto state_64;
if (ch.unicode() == 95)
- goto state_59;
+ goto state_63;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_59;
+ goto state_63;
goto out;
- state_60:
+ state_64:
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
- goto state_83;
+ goto state_84;
if (ch.unicode() == 11)
- goto state_83;
+ goto state_84;
if (ch.unicode() >= 14 && ch.unicode() <= 47)
- goto state_83;
+ goto state_84;
if (ch.unicode() >= 58 && ch.unicode() <= 96)
- goto state_83;
+ goto state_84;
if (ch.unicode() >= 103)
- goto state_83;
+ goto state_84;
goto out;
- state_63:
+ state_65:
+ lastAcceptingPos = pos;
+ token = QCss::HASH;
+ ch = next();
+ if (ch.unicode() == 45)
+ goto state_63;
+ if (ch.unicode() >= 48 && ch.unicode() <= 57)
+ goto state_63;
+ if (ch.unicode() == 92)
+ goto state_64;
+ if (ch.unicode() == 95)
+ goto state_63;
+ if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
+ goto state_63;
+ goto out;
+ state_66:
lastAcceptingPos = pos;
token = QCss::INVALID;
ch = next();
@@ -740,7 +783,7 @@ int QCssScanner_Generated::lex()
if (ch.unicode() >= 123)
goto state_33;
goto out;
- state_64:
+ state_67:
lastAcceptingPos = pos;
token = QCss::INVALID;
ch = next();
@@ -763,12 +806,14 @@ int QCssScanner_Generated::lex()
if (ch.unicode() >= 123)
goto state_33;
goto out;
- state_65:
+ state_68:
lastAcceptingPos = pos;
token = QCss::INVALID;
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
goto state_33;
+ if (ch.unicode() == 10)
+ goto state_85;
if (ch.unicode() == 11)
goto state_33;
if (ch.unicode() >= 14 && ch.unicode() <= 33)
@@ -786,14 +831,12 @@ int QCssScanner_Generated::lex()
if (ch.unicode() >= 123)
goto state_33;
goto out;
- state_66:
+ state_69:
lastAcceptingPos = pos;
token = QCss::INVALID;
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
goto state_33;
- if (ch.unicode() == 10)
- goto state_84;
if (ch.unicode() == 11)
goto state_33;
if (ch.unicode() >= 14 && ch.unicode() <= 33)
@@ -811,191 +854,133 @@ int QCssScanner_Generated::lex()
if (ch.unicode() >= 123)
goto state_33;
goto out;
- state_67:
- lastAcceptingPos = pos;
- token = QCss::HASH;
- ch = next();
- if (ch.unicode() == 45)
- goto state_67;
- if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_67;
- if (ch.unicode() == 92)
- goto state_68;
- if (ch.unicode() == 95)
- goto state_67;
- if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_67;
- goto out;
- state_68:
- ch = next();
- if (ch.unicode() >= 1 && ch.unicode() <= 9)
- goto state_85;
- if (ch.unicode() == 11)
- goto state_85;
- if (ch.unicode() >= 14 && ch.unicode() <= 47)
- goto state_85;
- if (ch.unicode() >= 58 && ch.unicode() <= 96)
- goto state_85;
- if (ch.unicode() >= 103)
- goto state_85;
- goto out;
- state_69:
- lastAcceptingPos = pos;
- token = QCss::HASH;
- ch = next();
- if (ch.unicode() == 45)
- goto state_67;
- if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_67;
- if (ch.unicode() == 92)
- goto state_68;
- if (ch.unicode() == 95)
- goto state_67;
- if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_67;
- goto out;
state_70:
lastAcceptingPos = pos;
token = QCss::INVALID;
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
- goto state_39;
+ goto state_38;
if (ch.unicode() == 11)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 14 && ch.unicode() <= 38)
- goto state_39;
+ goto state_38;
if (ch.unicode() == 39)
- goto state_40;
- if (ch.unicode() >= 40 && ch.unicode() <= 91)
goto state_39;
+ if (ch.unicode() >= 40 && ch.unicode() <= 91)
+ goto state_38;
if (ch.unicode() == 92)
- goto state_41;
+ goto state_40;
if (ch.unicode() >= 93 && ch.unicode() <= 96)
- goto state_39;
+ goto state_38;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 123)
- goto state_39;
+ goto state_38;
goto out;
state_71:
lastAcceptingPos = pos;
token = QCss::INVALID;
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
- goto state_39;
+ goto state_38;
if (ch.unicode() == 11)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 14 && ch.unicode() <= 38)
- goto state_39;
+ goto state_38;
if (ch.unicode() == 39)
- goto state_40;
- if (ch.unicode() >= 40 && ch.unicode() <= 91)
goto state_39;
+ if (ch.unicode() >= 40 && ch.unicode() <= 91)
+ goto state_38;
if (ch.unicode() == 92)
- goto state_41;
+ goto state_40;
if (ch.unicode() >= 93 && ch.unicode() <= 96)
- goto state_39;
+ goto state_38;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 123)
- goto state_39;
+ goto state_38;
goto out;
state_72:
lastAcceptingPos = pos;
token = QCss::INVALID;
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
- goto state_39;
+ goto state_38;
+ if (ch.unicode() == 10)
+ goto state_86;
if (ch.unicode() == 11)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 14 && ch.unicode() <= 38)
- goto state_39;
+ goto state_38;
if (ch.unicode() == 39)
- goto state_40;
- if (ch.unicode() >= 40 && ch.unicode() <= 91)
goto state_39;
+ if (ch.unicode() >= 40 && ch.unicode() <= 91)
+ goto state_38;
if (ch.unicode() == 92)
- goto state_41;
+ goto state_40;
if (ch.unicode() >= 93 && ch.unicode() <= 96)
- goto state_39;
+ goto state_38;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 123)
- goto state_39;
+ goto state_38;
goto out;
state_73:
lastAcceptingPos = pos;
token = QCss::INVALID;
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
- goto state_39;
- if (ch.unicode() == 10)
- goto state_86;
+ goto state_38;
if (ch.unicode() == 11)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 14 && ch.unicode() <= 38)
- goto state_39;
+ goto state_38;
if (ch.unicode() == 39)
- goto state_40;
- if (ch.unicode() >= 40 && ch.unicode() <= 91)
goto state_39;
+ if (ch.unicode() >= 40 && ch.unicode() <= 91)
+ goto state_38;
if (ch.unicode() == 92)
- goto state_41;
+ goto state_40;
if (ch.unicode() >= 93 && ch.unicode() <= 96)
- goto state_39;
+ goto state_38;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 123)
- goto state_39;
+ goto state_38;
goto out;
- state_75:
+ state_74:
lastAcceptingPos = pos;
token = QCss::NUMBER;
ch = next();
if (ch.unicode() == 37)
goto state_46;
if (ch.unicode() == 45)
- goto state_47;
+ goto state_48;
if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_75;
+ goto state_74;
if (ch.unicode() == 92)
- goto state_50;
- if (ch.unicode() == 95)
goto state_51;
+ if (ch.unicode() == 95)
+ goto state_50;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_51;
+ goto state_50;
goto out;
state_76:
lastAcceptingPos = pos;
token = QCss::LENGTH;
ch = next();
if (ch.unicode() == 45)
- goto state_77;
+ goto state_76;
if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_77;
+ goto state_76;
if (ch.unicode() == 92)
- goto state_78;
- if (ch.unicode() == 95)
- goto state_77;
- if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_77;
- goto out;
- state_77:
- lastAcceptingPos = pos;
- token = QCss::LENGTH;
- ch = next();
- if (ch.unicode() == 45)
goto state_77;
- if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_77;
- if (ch.unicode() == 92)
- goto state_78;
if (ch.unicode() == 95)
- goto state_77;
+ goto state_76;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_77;
+ goto state_76;
goto out;
- state_78:
+ state_77:
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
goto state_87;
@@ -1008,6 +993,21 @@ int QCssScanner_Generated::lex()
if (ch.unicode() >= 103)
goto state_87;
goto out;
+ state_78:
+ lastAcceptingPos = pos;
+ token = QCss::LENGTH;
+ ch = next();
+ if (ch.unicode() == 45)
+ goto state_76;
+ if (ch.unicode() >= 48 && ch.unicode() <= 57)
+ goto state_76;
+ if (ch.unicode() == 92)
+ goto state_77;
+ if (ch.unicode() == 95)
+ goto state_76;
+ if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
+ goto state_76;
+ goto out;
state_79:
ch = next();
if (ch.unicode() == 45) {
@@ -1017,18 +1017,20 @@ int QCssScanner_Generated::lex()
goto out;
state_80:
lastAcceptingPos = pos;
- token = QCss::ATKEYWORD_SYM;
+ token = QCss::IDENT;
ch = next();
+ if (ch.unicode() == 40)
+ goto state_53;
if (ch.unicode() == 45)
- goto state_81;
+ goto state_54;
if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_81;
+ goto state_54;
if (ch.unicode() == 92)
- goto state_82;
+ goto state_55;
if (ch.unicode() == 95)
- goto state_81;
+ goto state_54;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_81;
+ goto state_54;
goto out;
state_81:
lastAcceptingPos = pos;
@@ -1060,23 +1062,36 @@ int QCssScanner_Generated::lex()
goto out;
state_83:
lastAcceptingPos = pos;
- token = QCss::IDENT;
+ token = QCss::ATKEYWORD_SYM;
ch = next();
- if (ch.unicode() == 40)
- goto state_58;
if (ch.unicode() == 45)
- goto state_59;
+ goto state_81;
if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_59;
+ goto state_81;
if (ch.unicode() == 92)
- goto state_60;
+ goto state_82;
if (ch.unicode() == 95)
- goto state_59;
+ goto state_81;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_59;
+ goto state_81;
goto out;
state_84:
lastAcceptingPos = pos;
+ token = QCss::HASH;
+ ch = next();
+ if (ch.unicode() == 45)
+ goto state_63;
+ if (ch.unicode() >= 48 && ch.unicode() <= 57)
+ goto state_63;
+ if (ch.unicode() == 92)
+ goto state_64;
+ if (ch.unicode() == 95)
+ goto state_63;
+ if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
+ goto state_63;
+ goto out;
+ state_85:
+ lastAcceptingPos = pos;
token = QCss::INVALID;
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
@@ -1098,58 +1113,43 @@ int QCssScanner_Generated::lex()
if (ch.unicode() >= 123)
goto state_33;
goto out;
- state_85:
- lastAcceptingPos = pos;
- token = QCss::HASH;
- ch = next();
- if (ch.unicode() == 45)
- goto state_67;
- if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_67;
- if (ch.unicode() == 92)
- goto state_68;
- if (ch.unicode() == 95)
- goto state_67;
- if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_67;
- goto out;
state_86:
lastAcceptingPos = pos;
token = QCss::INVALID;
ch = next();
if (ch.unicode() >= 1 && ch.unicode() <= 9)
- goto state_39;
+ goto state_38;
if (ch.unicode() == 11)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 14 && ch.unicode() <= 38)
- goto state_39;
+ goto state_38;
if (ch.unicode() == 39)
- goto state_40;
- if (ch.unicode() >= 40 && ch.unicode() <= 91)
goto state_39;
+ if (ch.unicode() >= 40 && ch.unicode() <= 91)
+ goto state_38;
if (ch.unicode() == 92)
- goto state_41;
+ goto state_40;
if (ch.unicode() >= 93 && ch.unicode() <= 96)
- goto state_39;
+ goto state_38;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_39;
+ goto state_38;
if (ch.unicode() >= 123)
- goto state_39;
+ goto state_38;
goto out;
state_87:
lastAcceptingPos = pos;
token = QCss::LENGTH;
ch = next();
if (ch.unicode() == 45)
- goto state_77;
+ goto state_76;
if (ch.unicode() >= 48 && ch.unicode() <= 57)
- goto state_77;
+ goto state_76;
if (ch.unicode() == 92)
- goto state_78;
- if (ch.unicode() == 95)
goto state_77;
+ if (ch.unicode() == 95)
+ goto state_76;
if ((ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256)
- goto state_77;
+ goto state_76;
goto out;
state_89:
lastAcceptingPos = pos;
@@ -1176,4 +1176,3 @@ int QCssScanner_Generated::lex()
}
return token;
}
-
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 69255fd59d..d879836572 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -116,7 +116,17 @@ bool QFontDef::exactMatch(const QFontDef &other) const
if (stretch != 0 && other.stretch != 0 && stretch != other.stretch)
return false;
+ if (families.size() != other.families.size())
+ return false;
+
QString this_family, this_foundry, other_family, other_foundry;
+ for (int i = 0; i < families.size(); ++i) {
+ QFontDatabase::parseFontName(families.at(i), this_foundry, this_family);
+ QFontDatabase::parseFontName(other.families.at(i), other_foundry, other_family);
+ if (this_family != other_family || this_foundry != other_foundry)
+ return false;
+ }
+
QFontDatabase::parseFontName(family, this_foundry, this_family);
QFontDatabase::parseFontName(other.family, other_foundry, other_family);
@@ -261,6 +271,9 @@ void QFontPrivate::resolve(uint mask, const QFontPrivate *other)
if (! (mask & QFont::FamilyResolved))
request.family = other->request.family;
+ if (!(mask & QFont::FamiliesResolved))
+ request.families = other->request.families;
+
if (! (mask & QFont::StyleNameResolved))
request.styleName = other->request.styleName;
@@ -340,7 +353,7 @@ QFontEngineData::~QFontEngineData()
\class QFont
\reentrant
- \brief The QFont class specifies a font used for drawing text.
+ \brief The QFont class specifies a query for a font used for drawing text.
\ingroup painting
\ingroup appearance
@@ -348,6 +361,7 @@ QFontEngineData::~QFontEngineData()
\ingroup richtext-processing
\inmodule QtGui
+ QFont can be regarded as a query for one or more fonts on the system.
When you create a QFont object you specify various attributes that
you want the font to have. Qt will use the font with the specified
@@ -355,9 +369,15 @@ QFontEngineData::~QFontEngineData()
matching installed font. The attributes of the font that is
actually used are retrievable from a QFontInfo object. If the
window system provides an exact match exactMatch() returns \c true.
- Use QFontMetrics to get measurements, e.g. the pixel length of a
+ Use QFontMetricsF to get measurements, e.g. the pixel length of a
string using QFontMetrics::width().
+ Attributes which are not specifically set will not affect the font
+ selection algorithm, and default values will be preferred instead.
+
+ To load a specific physical font, typically represented by a single file,
+ use QRawFont instead.
+
Note that a QGuiApplication instance must exist before a QFont can be
used. You can set the application's default font with
QGuiApplication::setFont().
@@ -390,8 +410,6 @@ QFontEngineData::~QFontEngineData()
setStyleHint(). The default family (corresponding to the current
style hint) is returned by defaultFamily().
- The font-matching algorithm has a lastResortFamily() and
- lastResortFont() in cases where a suitable match cannot be found.
You can provide substitutions for font family names using
insertSubstitution() and insertSubstitutions(). Substitutions can
be removed with removeSubstitutions(). Use substitute() to retrieve
@@ -419,18 +437,21 @@ QFontEngineData::~QFontEngineData()
\target fontmatching
The font matching algorithm works as follows:
\list 1
- \li The specified font family is searched for.
- \li If not found, the styleHint() is used to select a replacement
- family.
- \li Each replacement font family is searched for.
- \li If none of these are found or there was no styleHint(), "helvetica"
- will be searched for.
- \li If "helvetica" isn't found Qt will try the lastResortFamily().
- \li If the lastResortFamily() isn't found Qt will try the
- lastResortFont() which will always return a name of some kind.
+ \li The specified font families (set by setFamilies()) are searched for.
+ \li If not found, then if set the specified font family exists and can be used to represent
+ the writing system in use, it will be selected.
+ \li If not, a replacement font that supports the writing system is
+ selected. The font matching algorithm will try to find the
+ best match for all the properties set in the QFont. How this is
+ done varies from platform to platform.
+ \li If no font exists on the system that can support the text,
+ then special "missing character" boxes will be shown in its place.
\endlist
- Note that the actual font matching algorithm varies from platform to platform.
+ \note If the selected font, though supporting the writing system in general,
+ is missing glyphs for one or more specific characters, then Qt will try to
+ find a fallback font for this or these particular characters. This feature
+ can be disabled using QFont::NoFontMerging style strategy.
In Windows a request for the "Courier" font is automatically changed to
"Courier New", an improved version of Courier that allows for smooth scaling.
@@ -499,6 +520,7 @@ QFontEngineData::~QFontEngineData()
individually and then considered resolved.
\value FamilyResolved
+ \value FamiliesResolved
\value SizeResolved
\value StyleHintResolved
\value StyleStrategyResolved
@@ -540,14 +562,25 @@ QFontEngineData::~QFontEngineData()
\since 5.2
*/
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
/*!
+ \obsolete
Constructs a font from \a font for use on the paint device \a pd.
*/
QFont::QFont(const QFont &font, QPaintDevice *pd)
+ : QFont(font, static_cast<const QPaintDevice*>(pd))
+{}
+#endif
+
+/*!
+ \since 5.13
+ Constructs a font from \a font for use on the paint device \a pd.
+*/
+QFont::QFont(const QFont &font, const QPaintDevice *pd)
: resolve_mask(font.resolve_mask)
{
- Q_ASSERT(pd != 0);
- int dpi = pd->logicalDpiY();
+ Q_ASSERT(pd);
+ const int dpi = pd->logicalDpiY();
const int screen = 0;
if (font.d->dpi != dpi || font.d->screen != screen ) {
d = new QFontPrivate(*font.d);
@@ -1684,6 +1717,7 @@ bool QFont::operator<(const QFont &f) const
if (r1.stretch != r2.stretch) return r1.stretch < r2.stretch;
if (r1.styleHint != r2.styleHint) return r1.styleHint < r2.styleHint;
if (r1.styleStrategy != r2.styleStrategy) return r1.styleStrategy < r2.styleStrategy;
+ if (r1.families != r2.families) return r1.families < r2.families;
if (r1.family != r2.family) return r1.family < r2.family;
if (f.d->capital != d->capital) return f.d->capital < d->capital;
@@ -2133,21 +2167,22 @@ void QFont::cacheStatistics()
{
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\fn QString QFont::lastResortFamily() const
- Returns the "last resort" font family name.
+ \obsolete
- The current implementation tries a wide variety of common fonts,
- returning the first one it finds. Is is possible that no family is
- found in which case an empty string is returned.
+ This function is deprecated and is not in use by the font
+ selection algorithm in Qt 5. It always returns "helvetica".
\sa lastResortFont()
*/
QString QFont::lastResortFamily() const
{
- return QString::fromLatin1("helvetica");
+ return QStringLiteral("helvetica");
}
+#endif
extern QStringList qt_fallbacksForFamily(const QString &family, QFont::Style style,
QFont::StyleHint styleHint, QChar::Script script);
@@ -2169,34 +2204,63 @@ QString QFont::defaultFamily() const
return QString();
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\fn QString QFont::lastResortFont() const
- Returns a "last resort" font name for the font matching algorithm.
- This is used if the last resort family is not available. It will
- always return a name, if necessary returning something like
- "fixed" or "system".
+ \obsolete
+
+ Deprecated function. Since Qt 5.0, this is not used by the font selection algorithm. For
+ compatibility it remains in the API, but will always return the same value as lastResortFamily().
+*/
+QString QFont::lastResortFont() const
+{
+ return lastResortFamily();
+}
+#endif
+
+/*!
+ \since 5.13
+
+ Returns the requested font family names, i.e. the names set in the last
+ setFamilies() call or via the constructor. Otherwise it returns an
+ empty list.
+
+ \sa setFamily(), setFamilies(), family(), substitutes(), substitute()
+*/
+
+QStringList QFont::families() const
+{
+ return d->request.families;
+}
- The current implementation tries a wide variety of common fonts,
- returning the first one it finds. The implementation may change
- at any time, but this function will always return a string
- containing something.
+/*!
+ \since 5.13
- It is theoretically possible that there really isn't a
- lastResortFont() in which case Qt will abort with an error
- message. We have not been able to identify a case where this
- happens. Please \l{bughowto.html}{report it as a bug} if
- it does, preferably with a list of the fonts you have installed.
+ Sets the list of family names for the font. The names are case
+ insensitive and may include a foundry name. The first family in
+ \a families will be set as the main family for the font.
- \sa lastResortFamily()
+ Each family name entry in \a families may optionally also include a
+ foundry name, e.g. "Helvetica [Cronyx]". If the family is
+ available from more than one foundry and the foundry isn't
+ specified, an arbitrary foundry is chosen. If the family isn't
+ available a family will be set using the \l{QFont}{font matching}
+ algorithm.
+
+ \sa family(), families(), setFamily(), setStyleHint(), QFontInfo
*/
-QString QFont::lastResortFont() const
+
+void QFont::setFamilies(const QStringList &families)
{
- qFatal("QFont::lastResortFont: Cannot find any reasonable font");
- // Shut compiler up
- return QString();
+ if ((resolve_mask & QFont::FamiliesResolved) && d->request.families == families)
+ return;
+ detach();
+ d->request.families = families;
+ resolve_mask |= QFont::FamiliesResolved;
}
+
/*****************************************************************************
QFont stream functions
*****************************************************************************/
@@ -2261,6 +2325,8 @@ QDataStream &operator<<(QDataStream &s, const QFont &font)
s << (quint8)font.d->request.hintingPreference;
if (s.version() >= QDataStream::Qt_5_6)
s << (quint8)font.d->capital;
+ if (s.version() >= QDataStream::Qt_5_13)
+ s << font.d->request.families;
return s;
}
@@ -2356,6 +2422,11 @@ QDataStream &operator>>(QDataStream &s, QFont &font)
s >> value;
font.d->capital = QFont::Capitalization(value);
}
+ if (s.version() >= QDataStream::Qt_5_13) {
+ QStringList value;
+ s >> value;
+ font.d->request.families = value;
+ }
return s;
}
@@ -2879,9 +2950,9 @@ void QFontCache::insertEngine(const Key &key, QFontEngine *engine, bool insertMu
data.timestamp = ++current_timestamp;
if (insertMulti)
- engineCache.insertMulti(key, data);
- else
engineCache.insert(key, data);
+ else
+ engineCache.replace(key, data);
// only increase the cost if this is the first time we insert the engine
if (++engineCacheCount[engine] == 1)
increaseCost(engine->cache_cost);
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h
index 9c250c82c3..e86f06353a 100644
--- a/src/gui/text/qfont.h
+++ b/src/gui/text/qfont.h
@@ -164,13 +164,17 @@ public:
WordSpacingResolved = 0x4000,
HintingPreferenceResolved = 0x8000,
StyleNameResolved = 0x10000,
- AllPropertiesResolved = 0x1ffff
+ FamiliesResolved = 0x20000,
+ AllPropertiesResolved = 0x3ffff
};
QFont();
QFont(const QString &family, int pointSize = -1, int weight = -1, bool italic = false);
- QFont(const QFont &, QPaintDevice *pd);
- QFont(const QFont &);
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ QFont(const QFont &font, QPaintDevice *pd);
+#endif
+ QFont(const QFont &font, const QPaintDevice *pd);
+ QFont(const QFont &font);
~QFont();
void swap(QFont &other)
@@ -179,6 +183,9 @@ public:
QString family() const;
void setFamily(const QString &);
+ QStringList families() const;
+ void setFamilies(const QStringList &);
+
QString styleName() const;
void setStyleName(const QString &);
@@ -282,8 +289,10 @@ public:
static void cacheStatistics();
QString defaultFamily() const;
- QString lastResortFamily() const;
- QString lastResortFont() const;
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED QString lastResortFamily() const;
+ QT_DEPRECATED QString lastResortFont() const;
+#endif
QFont resolve(const QFont &) const;
inline uint resolve() const { return resolve_mask; }
diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h
index c5847f532b..e86ec31e47 100644
--- a/src/gui/text/qfont_p.h
+++ b/src/gui/text/qfont_p.h
@@ -78,6 +78,7 @@ struct QFontDef
}
QString family;
+ QStringList families;
QString styleName;
QStringList fallBackFamilies;
@@ -109,6 +110,7 @@ struct QFontDef
&& styleStrategy == other.styleStrategy
&& ignorePitch == other.ignorePitch && fixedPitch == other.fixedPitch
&& family == other.family
+ && families == other.families
&& styleName == other.styleName
&& hintingPreference == other.hintingPreference
;
@@ -122,6 +124,7 @@ struct QFontDef
if (styleHint != other.styleHint) return styleHint < other.styleHint;
if (styleStrategy != other.styleStrategy) return styleStrategy < other.styleStrategy;
if (family != other.family) return family < other.family;
+ if (families != other.families) return families < other.families;
if (styleName != other.styleName)
return styleName < other.styleName;
if (hintingPreference != other.hintingPreference) return hintingPreference < other.hintingPreference;
@@ -144,6 +147,7 @@ inline uint qHash(const QFontDef &fd, uint seed = 0) Q_DECL_NOTHROW
^ qHash(fd.ignorePitch)
^ qHash(fd.fixedPitch)
^ qHash(fd.family, seed)
+ ^ qHash(fd.families, seed)
^ qHash(fd.styleName)
^ qHash(fd.hintingPreference)
;
@@ -161,7 +165,7 @@ public:
QFontEngine *engines[QChar::ScriptCount];
private:
- Q_DISABLE_COPY(QFontEngineData)
+ Q_DISABLE_COPY_MOVE(QFontEngineData)
};
@@ -270,7 +274,7 @@ public:
uint hits;
};
- typedef QMap<Key,Engine> EngineCache;
+ typedef QMultiMap<Key,Engine> EngineCache;
EngineCache engineCache;
QHash<QFontEngine *, int> engineCacheCount;
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 196eebb353..fa9573441a 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -696,20 +696,20 @@ static QStringList familyList(const QFontDef &req)
{
// list of families to try
QStringList family_list;
- if (req.family.isEmpty())
- return family_list;
- const auto list = req.family.splitRef(QLatin1Char(','));
- const int numFamilies = list.size();
- family_list.reserve(numFamilies);
- for (int i = 0; i < numFamilies; ++i) {
- QStringRef str = list.at(i).trimmed();
- if ((str.startsWith(QLatin1Char('"')) && str.endsWith(QLatin1Char('"')))
- || (str.startsWith(QLatin1Char('\'')) && str.endsWith(QLatin1Char('\''))))
- str = str.mid(1, str.length() - 2);
- family_list << str.toString();
+ family_list << req.families;
+ if (!req.family.isEmpty()) {
+ const auto list = req.family.splitRef(QLatin1Char(','));
+ const int numFamilies = list.size();
+ family_list.reserve(numFamilies);
+ for (int i = 0; i < numFamilies; ++i) {
+ QStringRef str = list.at(i).trimmed();
+ if ((str.startsWith(QLatin1Char('"')) && str.endsWith(QLatin1Char('"')))
+ || (str.startsWith(QLatin1Char('\'')) && str.endsWith(QLatin1Char('\''))))
+ str = str.mid(1, str.length() - 2);
+ family_list << str.toString();
+ }
}
-
// append the substitute list for each family in family_list
for (int i = 0, size = family_list.size(); i < size; ++i)
family_list += QFont::substitutes(family_list.at(i));
@@ -2688,9 +2688,8 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script)
}
QString family_name, foundry_name;
-
- parseFontName(request.family, foundry_name, family_name);
-
+ const QString requestFamily = request.families.size() > 0 ? request.families.at(0) : request.family;
+ parseFontName(requestFamily, foundry_name, family_name);
QtFontDesc desc;
QList<int> blackListed;
int index = match(multi ? QChar::Script_Common : script, request, family_name, foundry_name, &desc, blackListed);
@@ -2703,8 +2702,8 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script)
// Don't pass empty family names to the platform font database, since it will then invoke its own matching
// and we will be out of sync with the matched font.
- if (fontDef.family.isEmpty())
- fontDef.family = desc.family->name;
+ if (fontDef.families.isEmpty() && fontDef.family.isEmpty())
+ fontDef.families = QStringList(desc.family->name);
engine = loadEngine(script, fontDef, desc.family, desc.foundry, desc.style, desc.size);
@@ -2717,13 +2716,13 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script)
}
if (!engine) {
- if (!request.family.isEmpty()) {
+ if (!requestFamily.isEmpty()) {
QFont::StyleHint styleHint = QFont::StyleHint(request.styleHint);
if (styleHint == QFont::AnyStyle && request.fixedPitch)
styleHint = QFont::TypeWriter;
QStringList fallbacks = request.fallBackFamilies
- + fallbacksForFamily(request.family,
+ + fallbacksForFamily(requestFamily,
QFont::Style(request.style),
styleHint,
QChar::Script(script));
@@ -2741,7 +2740,7 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script)
index = match(multi ? QChar::Script_Common : script, def, def.family, QLatin1String(""), &desc, blackListed);
if (index >= 0) {
QFontDef loadDef = def;
- if (loadDef.family.isEmpty())
+ if (loadDef.families.isEmpty() && loadDef.family.isEmpty())
loadDef.family = desc.family->name;
engine = loadEngine(script, loadDef, desc.family, desc.foundry, desc.style, desc.size);
if (engine)
@@ -2782,7 +2781,10 @@ void QFontDatabase::load(const QFontPrivate *d, int script)
// look for the requested font in the engine data cache
// note: fallBackFamilies are not respected in the EngineData cache key;
// join them with the primary selection family to avoid cache misses
- req.family = fallBackFamilies.join(QLatin1Char(','));
+ if (!d->request.family.isEmpty())
+ req.family = fallBackFamilies.join(QLatin1Char(','));
+ if (!d->request.families.isEmpty())
+ req.families = fallBackFamilies;
d->engineData = fontCache->findEngineData(req);
if (!d->engineData) {
@@ -2803,14 +2805,14 @@ void QFontDatabase::load(const QFontPrivate *d, int script)
req.fallBackFamilies = fallBackFamilies;
if (!req.fallBackFamilies.isEmpty())
- req.family = req.fallBackFamilies.takeFirst();
+ req.families = QStringList(req.fallBackFamilies.takeFirst());
// list of families to try
QStringList family_list;
- if (!req.family.isEmpty()) {
+ if (!req.families.isEmpty()) {
// Add primary selection
- family_list << req.family;
+ family_list << req.families.at(0);
// add the default family
QString defaultFamily = QGuiApplication::font().family();
@@ -2824,11 +2826,11 @@ void QFontDatabase::load(const QFontPrivate *d, int script)
QStringList::ConstIterator it = family_list.constBegin(), end = family_list.constEnd();
for (; !fe && it != end; ++it) {
- req.family = *it;
+ req.families = QStringList(*it);
fe = QFontDatabase::findFont(req, script);
if (fe) {
- if (fe->type() == QFontEngine::Box && !req.family.isEmpty()) {
+ if (fe->type() == QFontEngine::Box && !req.families.at(0).isEmpty()) {
if (fe->ref.load() == 0)
delete fe;
fe = 0;
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index eb7e416dd1..cab4ca0047 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -1842,7 +1842,7 @@ QFontEngine *QFontEngineMulti::loadEngine(int at)
{
QFontDef request(fontDef);
request.styleStrategy |= QFont::NoFontMerging;
- request.family = fallbackFamilyAt(at - 1);
+ request.families = QStringList(fallbackFamilyAt(at - 1));
// At this point, the main script of the text has already been considered
// when fetching the list of fallback families from the database, and the
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index 407559ad51..c8dc8d676e 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -156,6 +156,8 @@ QFontMetrics::QFontMetrics(const QFont &font)
}
/*!
+ \since 5.13
+ \fn QFontMetrics::QFontMetrics(const QFont &font, const QPaintDevice *paintdevice)
Constructs a font metrics object for \a font and \a paintdevice.
The font metrics will be compatible with the paintdevice passed.
@@ -168,9 +170,21 @@ QFontMetrics::QFontMetrics(const QFont &font)
passed in the constructor at the time it is created, and is not
updated if the font's attributes are changed later.
*/
+
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+/*!
+ \fn QFontMetrics::QFontMetrics(const QFont &font, QPaintDevice *paintdevice)
+ \obsolete
+ Identical to QFontMetrics::QFontMetrics(const QFont &font, const QPaintDevice *paintdevice)
+*/
+
+
QFontMetrics::QFontMetrics(const QFont &font, QPaintDevice *paintdevice)
+#else
+QFontMetrics::QFontMetrics(const QFont &font, const QPaintDevice *paintdevice)
+#endif
{
- int dpi = paintdevice ? paintdevice->logicalDpiY() : qt_defaultDpi();
+ const int dpi = paintdevice ? paintdevice->logicalDpiY() : qt_defaultDpi();
const int screen = 0;
if (font.d->dpi != dpi || font.d->screen != screen ) {
d = new QFontPrivate(*font.d);
@@ -1127,6 +1141,8 @@ QFontMetricsF::QFontMetricsF(const QFont &font)
}
/*!
+ \fn QFontMetricsF::QFontMetricsF(const QFont &font, const QPaintDevice *paintdevice)
+ \since 5.13
Constructs a font metrics object for \a font and \a paintdevice.
The font metrics will be compatible with the paintdevice passed.
@@ -1139,7 +1155,20 @@ QFontMetricsF::QFontMetricsF(const QFont &font)
passed in the constructor at the time it is created, and is not
updated if the font's attributes are changed later.
*/
+
+
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+/*!
+ \fn QFontMetricsF::QFontMetricsF(const QFont &font, QPaintDevice *paintdevice)
+ \obsolete
+ Identical to QFontMetricsF::QFontMetricsF(const QFont &font, const QPaintDevice *paintdevice)
+*/
+
+
QFontMetricsF::QFontMetricsF(const QFont &font, QPaintDevice *paintdevice)
+#else
+QFontMetricsF::QFontMetricsF(const QFont &font, const QPaintDevice *paintdevice)
+#endif
{
int dpi = paintdevice ? paintdevice->logicalDpiY() : qt_defaultDpi();
const int screen = 0;
diff --git a/src/gui/text/qfontmetrics.h b/src/gui/text/qfontmetrics.h
index b6167a1d47..61931fa9bc 100644
--- a/src/gui/text/qfontmetrics.h
+++ b/src/gui/text/qfontmetrics.h
@@ -59,7 +59,19 @@ class Q_GUI_EXPORT QFontMetrics
{
public:
explicit QFontMetrics(const QFont &);
- QFontMetrics(const QFont &, QPaintDevice *pd);
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ QFontMetrics(const QFont &font, QPaintDevice *pd);
+#ifndef Q_QDOC
+ // the template is necessary to make QFontMetrics(font,nullptr) and QFontMetrics(font,NULL)
+ // not ambiguous. Implementation detail that should not be documented.
+ template<char = 0>
+#endif
+ QFontMetrics(const QFont &font, const QPaintDevice *pd)
+ : QFontMetrics(font, const_cast<QPaintDevice*>(pd))
+ {}
+#else
+ QFontMetrics(const QFont &font, const QPaintDevice *pd);
+#endif
QFontMetrics(const QFontMetrics &);
~QFontMetrics();
@@ -92,8 +104,11 @@ public:
int rightBearing(QChar) const;
#if QT_DEPRECATED_SINCE(5, 11)
+ QT_DEPRECATED_X("Use QFontMetrics::horizontalAdvance")
int width(const QString &, int len = -1) const;
+ QT_DEPRECATED_X("Use QFontMetrics::horizontalAdvance")
int width(const QString &, int len, int flags) const;
+ QT_DEPRECATED_X("Use QFontMetrics::horizontalAdvance")
int width(QChar) const;
#endif
@@ -137,8 +152,20 @@ Q_DECLARE_SHARED(QFontMetrics)
class Q_GUI_EXPORT QFontMetricsF
{
public:
- explicit QFontMetricsF(const QFont &);
- QFontMetricsF(const QFont &, QPaintDevice *pd);
+ explicit QFontMetricsF(const QFont &font);
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ QFontMetricsF(const QFont &font, QPaintDevice *pd);
+#ifndef Q_QDOC
+ // the template is necessary to make QFontMetrics(font,nullptr) and QFontMetrics(font,NULL)
+ // not ambiguous. Implementation detail that should not be documented.
+ template<char = 0>
+#endif
+ QFontMetricsF(const QFont &font, const QPaintDevice *pd)
+ : QFontMetricsF(font, const_cast<QPaintDevice*>(pd))
+ {}
+#else
+ QFontMetricsF(const QFont &font, const QPaintDevice *pd);
+#endif
QFontMetricsF(const QFontMetrics &);
QFontMetricsF(const QFontMetricsF &);
~QFontMetricsF();
diff --git a/src/gui/text/qsyntaxhighlighter.h b/src/gui/text/qsyntaxhighlighter.h
index d87f89f0fd..ad0d50a4c0 100644
--- a/src/gui/text/qsyntaxhighlighter.h
+++ b/src/gui/text/qsyntaxhighlighter.h
@@ -64,7 +64,7 @@ class Q_GUI_EXPORT QSyntaxHighlighter : public QObject
public:
explicit QSyntaxHighlighter(QObject *parent);
explicit QSyntaxHighlighter(QTextDocument *parent);
- virtual ~QSyntaxHighlighter();
+ ~QSyntaxHighlighter();
void setDocument(QTextDocument *doc);
QTextDocument *document() const;
diff --git a/src/gui/text/qtextdocumentfragment_p.h b/src/gui/text/qtextdocumentfragment_p.h
index 02a6a429fa..de01a02fbb 100644
--- a/src/gui/text/qtextdocumentfragment_p.h
+++ b/src/gui/text/qtextdocumentfragment_p.h
@@ -109,7 +109,7 @@ public:
uint importedFromPlainText : 1;
private:
- Q_DISABLE_COPY(QTextDocumentFragmentPrivate)
+ Q_DISABLE_COPY_MOVE(QTextDocumentFragmentPrivate)
};
#ifndef QT_NO_TEXTHTMLPARSER
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp
index 919cdf3ff1..136e7dc140 100644
--- a/src/gui/text/qtextformat.cpp
+++ b/src/gui/text/qtextformat.cpp
@@ -361,6 +361,12 @@ void QTextFormatPrivate::recalcFont() const
case QTextFormat::FontFamily:
f.setFamily(props.at(i).value.toString());
break;
+ case QTextFormat::FontFamilies:
+ f.setFamilies(props.at(i).value.toStringList());
+ break;
+ case QTextFormat::FontStyleName:
+ f.setStyleName(props.at(i).value.toString());
+ break;
case QTextFormat::FontPointSize:
f.setPointSizeF(props.at(i).value.toReal());
break;
@@ -562,6 +568,8 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &stream, QTextFormat &fmt)
Character properties
\value FontFamily
+ \value FontFamilies
+ \value FontStyleName
\value FontPointSize
\value FontPixelSize
\value FontSizeAdjustment Specifies the change in size given to the fontsize already set using
@@ -1391,6 +1399,41 @@ QTextCharFormat::QTextCharFormat(const QTextFormat &fmt)
\sa font()
*/
+/*!
+ \fn void QTextCharFormat::setFontFamilies(const QStringList &families)
+ \since 5.13
+
+ Sets the text format's font \a families.
+
+ \sa setFont()
+*/
+
+/*!
+ \fn QStringList QTextCharFormat::fontFamilies() const
+ \since 5.13
+
+ Returns the text format's font families.
+
+ \sa font()
+*/
+
+/*!
+ \fn void QTextCharFormat::setFontStyleName(const QString &styleName)
+ \since 5.13
+
+ Sets the text format's font \a style name.
+
+ \sa setFont(), QFont::setStyleName()
+*/
+
+/*!
+ \fn QStringList QTextCharFormat::fontStyleName() const
+ \since 5.13
+
+ Returns the text format's font style name.
+
+ \sa font(), QFont::styleName()
+*/
/*!
\fn void QTextCharFormat::setFontPointSize(qreal size)
@@ -1920,6 +1963,11 @@ void QTextCharFormat::setFont(const QFont &font, FontPropertiesInheritanceBehavi
if (mask & QFont::FamilyResolved)
setFontFamily(font.family());
+ if (mask & QFont::FamiliesResolved)
+ setFontFamilies(font.families());
+ if (mask & QFont::StyleNameResolved)
+ setFontStyleName(font.styleName());
+
if (mask & QFont::SizeResolved) {
const qreal pointSize = font.pointSizeF();
if (pointSize > 0) {
diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h
index a8e573d5a4..f292feabe8 100644
--- a/src/gui/text/qtextformat.h
+++ b/src/gui/text/qtextformat.h
@@ -188,6 +188,8 @@ public:
FontStyleStrategy = 0x1FE4,
FontKerning = 0x1FE5,
FontHintingPreference = 0x1FE6,
+ FontFamilies = 0x1FE7,
+ FontStyleName = 0x1FE8,
FontFamily = 0x2000,
FontPointSize = 0x2001,
FontSizeAdjustment = 0x2002,
@@ -428,6 +430,16 @@ public:
inline QString fontFamily() const
{ return stringProperty(FontFamily); }
+ inline void setFontFamilies(const QStringList &families)
+ { setProperty(FontFamilies, QVariant(families)); }
+ inline QVariant fontFamilies() const
+ { return property(FontFamilies); }
+
+ inline void setFontStyleName(const QString &styleName)
+ { setProperty(FontStyleName, styleName); }
+ inline QVariant fontStyleName() const
+ { return property(FontStyleName); }
+
inline void setFontPointSize(qreal size)
{ setProperty(FontPointSize, size); }
inline qreal fontPointSize() const
diff --git a/src/gui/text/qtextformat_p.h b/src/gui/text/qtextformat_p.h
index 3557c17a97..001a243e84 100644
--- a/src/gui/text/qtextformat_p.h
+++ b/src/gui/text/qtextformat_p.h
@@ -104,7 +104,7 @@ public:
private:
QFont defaultFnt;
- Q_DISABLE_COPY(QTextFormatCollection)
+ Q_DISABLE_COPY_MOVE(QTextFormatCollection)
};
QT_END_NAMESPACE
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp
index c9a2a33e5a..04300a4d22 100644
--- a/src/gui/text/qtexthtmlparser.cpp
+++ b/src/gui/text/qtexthtmlparser.cpp
@@ -861,7 +861,8 @@ QString QTextHtmlParser::parseWord()
++pos;
while (pos < len) {
QChar c = txt.at(pos++);
- if (c == QLatin1Char('\''))
+ // Allow for escaped single quotes as they may be part of the string
+ if (c == QLatin1Char('\'') && (txt.length() > 1 && txt.at(pos - 2) != QLatin1Char('\\')))
break;
else
word += c;
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index f3f0caa379..a3e194f835 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -344,6 +344,8 @@ QTextLayout::QTextLayout(const QString& text)
}
/*!
+ \since 5.13
+ \fn QTextLayout::QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice)
Constructs a text layout to lay out the given \a text with the specified
\a font.
@@ -351,11 +353,20 @@ QTextLayout::QTextLayout(const QString& text)
the paint device, \a paintdevice. If \a paintdevice is 0 the
calculations will be done in screen metrics.
*/
-QTextLayout::QTextLayout(const QString& text, const QFont &font, QPaintDevice *paintdevice)
+
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+/*!
+ \fn QTextLayout::QTextLayout(const QString &text, const QFont &font, QPaintDevice *paintdevice)
+ \obsolete
+ Identical to QTextLayout::QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice)
+*/
+
+QTextLayout::QTextLayout(const QString &text, const QFont &font, QPaintDevice *paintdevice)
+#else
+QTextLayout::QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice)
+#endif
{
- QFont f(font);
- if (paintdevice)
- f = QFont(font, paintdevice);
+ const QFont f(paintdevice ? QFont(font, paintdevice) : font);
d = new QTextEngine((text.isNull() ? (const QString&)QString::fromLatin1("") : text), f);
}
@@ -1127,8 +1138,6 @@ void QTextLayout::draw(QPainter *p, const QPointF &pos, const QVector<FormatRang
QPainterPath textDoneRegion;
for (int i = 0; i < selections.size(); ++i) {
FormatRange selection = selections.at(i);
- const QBrush bg = selection.format.background();
-
QPainterPath region;
region.setFillRule(Qt::WindingFill);
diff --git a/src/gui/text/qtextlayout.h b/src/gui/text/qtextlayout.h
index 67bc75a6b8..a29791534e 100644
--- a/src/gui/text/qtextlayout.h
+++ b/src/gui/text/qtextlayout.h
@@ -107,7 +107,19 @@ public:
// does itemization
QTextLayout();
QTextLayout(const QString& text);
- QTextLayout(const QString& text, const QFont &font, QPaintDevice *paintdevice = nullptr);
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ QTextLayout(const QString &text, const QFont &font, QPaintDevice *paintdevice = nullptr);
+#ifndef Q_QDOC
+ // the template is necessary to make QTextLayout(font,text,nullptr) and QTextLayout(font,text,NULL)
+ // not ambiguous. Implementation detail that should not be documented.
+ template<char = 0>
+#endif
+ QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice)
+ : QTextLayout(text, font, const_cast<QPaintDevice*>(paintdevice))
+ {}
+#else
+ QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice = nullptr);
+#endif
QTextLayout(const QTextBlock &b);
~QTextLayout();
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index 103e0a8222..1a3f5309ae 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -89,7 +89,7 @@ public:
contentStream = device;
}
- virtual ~QXmlStreamStrategy()
+ ~QXmlStreamStrategy()
{
if (contentStream)
contentStream->close();
@@ -886,26 +886,30 @@ void QTextOdfWriter::tableCellStyleElement(QXmlStreamWriter &writer, const int &
if (hasBorder) {
writer.writeAttribute(foNS, QString::fromLatin1("border"),
pixelToPoint(tableFormatTmp.border()) + QLatin1String(" ")
- + borderStyleName(tableFormatTmp.borderStyle())
- + QLatin1String(" #000000")); //!! HARD-CODING color black
+ + borderStyleName(tableFormatTmp.borderStyle()) + QLatin1String(" ")
+ + tableFormatTmp.borderBrush().color().name(QColor::HexRgb));
}
- qreal padding = format.topPadding();
- if (padding > 0 && padding == format.bottomPadding()
- && padding == format.leftPadding() && padding == format.rightPadding()) {
+ qreal topPadding = format.topPadding();
+ qreal padding = topPadding + tableFormatTmp.cellPadding();
+ if (padding > 0 && topPadding == format.bottomPadding()
+ && topPadding == format.leftPadding() && topPadding == format.rightPadding()) {
writer.writeAttribute(foNS, QString::fromLatin1("padding"), pixelToPoint(padding));
}
else {
if (padding > 0)
writer.writeAttribute(foNS, QString::fromLatin1("padding-top"), pixelToPoint(padding));
- if (format.bottomPadding() > 0)
+ padding = format.bottomPadding() + tableFormatTmp.cellPadding();
+ if (padding > 0)
writer.writeAttribute(foNS, QString::fromLatin1("padding-bottom"),
- pixelToPoint(format.bottomPadding()));
- if (format.leftPadding() > 0)
+ pixelToPoint(padding));
+ padding = format.leftPadding() + tableFormatTmp.cellPadding();
+ if (padding > 0)
writer.writeAttribute(foNS, QString::fromLatin1("padding-left"),
- pixelToPoint(format.leftPadding()));
- if (format.rightPadding() > 0)
+ pixelToPoint(padding));
+ padding = format.rightPadding() + tableFormatTmp.cellPadding();
+ if (padding > 0)
writer.writeAttribute(foNS, QString::fromLatin1("padding-right"),
- pixelToPoint(format.rightPadding()));
+ pixelToPoint(padding));
}
if (format.hasProperty(QTextFormat::TextVerticalAlignment)) {
diff --git a/src/gui/text/qzipreader_p.h b/src/gui/text/qzipreader_p.h
index eed6ee6a62..378072b366 100644
--- a/src/gui/text/qzipreader_p.h
+++ b/src/gui/text/qzipreader_p.h
@@ -116,7 +116,7 @@ public:
private:
QZipReaderPrivate *d;
- Q_DISABLE_COPY(QZipReader)
+ Q_DISABLE_COPY_MOVE(QZipReader)
};
Q_DECLARE_TYPEINFO(QZipReader::FileInfo, Q_MOVABLE_TYPE);
Q_DECLARE_TYPEINFO(QZipReader::Status, Q_PRIMITIVE_TYPE);
diff --git a/src/gui/text/qzipwriter_p.h b/src/gui/text/qzipwriter_p.h
index 433bbab31e..b3bb5929cf 100644
--- a/src/gui/text/qzipwriter_p.h
+++ b/src/gui/text/qzipwriter_p.h
@@ -108,7 +108,7 @@ public:
void close();
private:
QZipWriterPrivate *d;
- Q_DISABLE_COPY(QZipWriter)
+ Q_DISABLE_COPY_MOVE(QZipWriter)
};
QT_END_NAMESPACE
diff --git a/src/gui/util/qlayoutpolicy_p.h b/src/gui/util/qlayoutpolicy_p.h
index a729a57e8b..993bf71472 100644
--- a/src/gui/util/qlayoutpolicy_p.h
+++ b/src/gui/util/qlayoutpolicy_p.h
@@ -66,6 +66,7 @@ class QVariant;
class Q_GUI_EXPORT QLayoutPolicy
{
+ Q_GADGET
Q_ENUMS(Policy)
public:
diff --git a/src/network/access/http2/bitstreams_p.h b/src/network/access/http2/bitstreams_p.h
index 9eba319dc2..ca272062a6 100644
--- a/src/network/access/http2/bitstreams_p.h
+++ b/src/network/access/http2/bitstreams_p.h
@@ -89,7 +89,7 @@ public:
void clear();
private:
- Q_DISABLE_COPY(BitOStream);
+ Q_DISABLE_COPY_MOVE(BitOStream);
std::vector<uchar> &buffer;
quint64 bitsSet;
diff --git a/src/network/access/http2/hpacktable_p.h b/src/network/access/http2/hpacktable_p.h
index aaea89b986..5eaccbffce 100644
--- a/src/network/access/http2/hpacktable_p.h
+++ b/src/network/access/http2/hpacktable_p.h
@@ -227,7 +227,7 @@ private:
mutable QByteArray dummyDst;
- Q_DISABLE_COPY(FieldLookupTable);
+ Q_DISABLE_COPY_MOVE(FieldLookupTable);
};
}
diff --git a/src/network/access/qabstractnetworkcache.cpp b/src/network/access/qabstractnetworkcache.cpp
index 2b670b2cce..1008b8e7f0 100644
--- a/src/network/access/qabstractnetworkcache.cpp
+++ b/src/network/access/qabstractnetworkcache.cpp
@@ -331,11 +331,11 @@ QDataStream &operator<<(QDataStream &out, const QNetworkCacheMetaData &metaData)
static inline QDataStream &operator<<(QDataStream &out, const QNetworkCacheMetaData::AttributesMap &hash)
{
out << quint32(hash.size());
- QNetworkCacheMetaData::AttributesMap::ConstIterator it = hash.end();
- QNetworkCacheMetaData::AttributesMap::ConstIterator begin = hash.begin();
- while (it != begin) {
- --it;
+ QNetworkCacheMetaData::AttributesMap::ConstIterator it = hash.begin();
+ QNetworkCacheMetaData::AttributesMap::ConstIterator end = hash.end();
+ while (it != end) {
out << int(it.key()) << it.value();
+ ++it;
}
return out;
}
@@ -383,7 +383,7 @@ static inline QDataStream &operator>>(QDataStream &in, QNetworkCacheMetaData::At
int k;
QVariant t;
in >> k >> t;
- hash.insertMulti(QNetworkRequest::Attribute(k), t);
+ hash.insert(QNetworkRequest::Attribute(k), t);
}
if (in.status() != QDataStream::Ok)
diff --git a/src/network/access/qftp_p.h b/src/network/access/qftp_p.h
index bba1f9b09d..0516c3d1f9 100644
--- a/src/network/access/qftp_p.h
+++ b/src/network/access/qftp_p.h
@@ -158,7 +158,7 @@ Q_SIGNALS:
void done(bool);
private:
- Q_DISABLE_COPY(QFtp)
+ Q_DISABLE_COPY_MOVE(QFtp)
Q_DECLARE_PRIVATE(QFtp)
Q_PRIVATE_SLOT(d_func(), void _q_startNextCommand())
diff --git a/src/network/access/qhstsstore_p.h b/src/network/access/qhstsstore_p.h
index e82596b250..5338d15592 100644
--- a/src/network/access/qhstsstore_p.h
+++ b/src/network/access/qhstsstore_p.h
@@ -87,7 +87,7 @@ private:
QVector<QHstsPolicy> observedPolicies;
QSettings store;
- Q_DISABLE_COPY(QHstsStore)
+ Q_DISABLE_COPY_MOVE(QHstsStore)
};
QT_END_NAMESPACE
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index c58fd24a44..9fd6acb26c 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -641,7 +641,7 @@ QHttpNetworkReply* QHttpNetworkConnectionPrivate::queueRequest(const QHttpNetwor
else { // SPDY, HTTP/2 ('h2' mode)
if (!pair.second->d_func()->requestIsPrepared)
prepareRequest(pair);
- channels[0].spdyRequestsToSend.insertMulti(request.priority(), pair);
+ channels[0].spdyRequestsToSend.insert(request.priority(), pair);
}
#ifndef Q_OS_WINRT
@@ -677,7 +677,7 @@ void QHttpNetworkConnectionPrivate::fillHttp2Queue()
for (auto &pair : highPriorityQueue) {
if (!pair.second->d_func()->requestIsPrepared)
prepareRequest(pair);
- channels[0].spdyRequestsToSend.insertMulti(QHttpNetworkRequest::HighPriority, pair);
+ channels[0].spdyRequestsToSend.insert(QHttpNetworkRequest::HighPriority, pair);
}
highPriorityQueue.clear();
@@ -685,7 +685,7 @@ void QHttpNetworkConnectionPrivate::fillHttp2Queue()
for (auto &pair : lowPriorityQueue) {
if (!pair.second->d_func()->requestIsPrepared)
prepareRequest(pair);
- channels[0].spdyRequestsToSend.insertMulti(pair.first.priority(), pair);
+ channels[0].spdyRequestsToSend.insert(pair.first.priority(), pair);
}
lowPriorityQueue.clear();
diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h
index 91827a6eb1..da54fbac2c 100644
--- a/src/network/access/qhttpnetworkconnection_p.h
+++ b/src/network/access/qhttpnetworkconnection_p.h
@@ -156,7 +156,7 @@ public:
private:
Q_DECLARE_PRIVATE(QHttpNetworkConnection)
- Q_DISABLE_COPY(QHttpNetworkConnection)
+ Q_DISABLE_COPY_MOVE(QHttpNetworkConnection)
friend class QHttpThreadDelegate;
friend class QHttpNetworkReply;
friend class QHttpNetworkReplyPrivate;
diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp
index 072a7f249d..af5b126953 100644
--- a/src/network/access/qnetworkcookiejar.cpp
+++ b/src/network/access/qnetworkcookiejar.cpp
@@ -45,6 +45,14 @@
#include "QtCore/qdatetime.h"
#if QT_CONFIG(topleveldomain)
#include "private/qtldurl_p.h"
+#else
+QT_BEGIN_NAMESPACE
+static bool qIsEffectiveTLD(QString domain)
+{
+ // provide minimal checking by not accepting cookies on real TLDs
+ return !domain.contains(QLatin1Char('.'));
+}
+QT_END_NAMESPACE
#endif
QT_BEGIN_NAMESPACE
@@ -356,19 +364,12 @@ bool QNetworkCookieJar::validateCookie(const QNetworkCookie &cookie, const QUrl
// https://tools.ietf.org/html/rfc6265#section-5.3 step 5
if (host == domain)
return true;
-#if QT_CONFIG(topleveldomain)
// the check for effective TLDs makes the "embedded dot" rule from RFC 2109 section 4.3.2
// redundant; the "leading dot" rule has been relaxed anyway, see QNetworkCookie::normalize()
// we remove the leading dot for this check if it's present
- if (qIsEffectiveTLD(domain))
- return false; // not accepted
-#else
- // provide minimal checking by not accepting cookies on real TLDs
- if (!domain.contains(QLatin1Char('.')))
- return false;
-#endif
-
- return true;
+ // Normally defined in qtldurl_p.h, but uses fall-back in this file when topleveldomain isn't
+ // configured:
+ return !qIsEffectiveTLD(domain);
}
QT_END_NAMESPACE
diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h
index 2fdb490ea0..1b1ece39b7 100644
--- a/src/network/bearer/qnetworkconfiguration_p.h
+++ b/src/network/bearer/qnetworkconfiguration_p.h
@@ -97,7 +97,7 @@ public:
static Q_CONSTEXPR int DefaultTimeout = 30000;
private:
- Q_DISABLE_COPY(QNetworkConfigurationPrivate)
+ Q_DISABLE_COPY_MOVE(QNetworkConfigurationPrivate)
};
QT_END_NAMESPACE
diff --git a/src/network/configure.json b/src/network/configure.json
index 10c4f87a2e..f87e0b12ab 100644
--- a/src/network/configure.json
+++ b/src/network/configure.json
@@ -15,8 +15,10 @@
"openssl-linked": { "type": "void", "name": "openssl", "value": "linked" },
"openssl-runtime": { "type": "void", "name": "openssl", "value": "runtime" },
"dtls": "boolean",
+ "ocsp": "boolean",
"sctp": "boolean",
"securetransport": "boolean",
+ "schannel": "boolean",
"ssl": "boolean",
"system-proxies": "boolean"
}
@@ -184,6 +186,19 @@
]
},
"use": "openssl"
+ },
+ "ocsp": {
+ "label": "OCSP stapling support in OpenSSL",
+ "type": "compile",
+ "test": {
+ "include": ["openssl/ssl.h", "openssl/ocsp.h"],
+ "tail": [
+ "#if defined(OPENSSL_NO_OCSP) || defined(OPENSSL_NO_TLSEXT)",
+ "# error OpenSSL without OCSP stapling",
+ "#endif"
+ ]
+ },
+ "use": "openssl"
}
},
@@ -229,13 +244,13 @@
"autoDetect": "!config.winrt && !config.wasm",
"enable": "input.openssl == 'yes' || input.openssl == 'runtime'",
"disable": "input.openssl == 'no' || input.openssl == 'linked' || input.ssl == 'no'",
- "condition": "!features.securetransport && libs.openssl_headers"
+ "condition": "!features.securetransport && !features.schannel && libs.openssl_headers"
},
"openssl-linked": {
"label": " Qt directly linked to OpenSSL",
"autoDetect": false,
"enable": "input.openssl == 'linked'",
- "condition": "!features.securetransport && libs.openssl",
+ "condition": "!features.securetransport && !features.schannel && libs.openssl",
"output": [
"privateFeature",
{ "type": "define", "name": "QT_LINKED_OPENSSL" }
@@ -250,9 +265,18 @@
{ "type": "define", "name": "QT_SECURETRANSPORT" }
]
},
+ "schannel": {
+ "label": "Schannel",
+ "disable": "input.schannel == 'no' || input.ssl == 'no'",
+ "condition": "input.schannel == 'yes' && config.win32 && !config.winrt && (input.openssl == '' || input.openssl == 'no')",
+ "output": [
+ "publicFeature",
+ { "type": "define", "name": "QT_SCHANNEL" }
+ ]
+ },
"ssl": {
"label": "SSL",
- "condition": "config.winrt || features.securetransport || features.openssl",
+ "condition": "config.winrt || features.securetransport || features.openssl || features.schannel",
"output": [ "publicFeature", "feature" ]
},
"dtls": {
@@ -262,6 +286,13 @@
"condition": "features.openssl && tests.dtls",
"output": [ "publicFeature" ]
},
+ "ocsp": {
+ "label": "OCSP-stapling",
+ "purpose": "Provides OCSP stapling support",
+ "section": "Networking",
+ "condition": "features.opensslv11 && tests.ocsp",
+ "output": [ "publicFeature" ]
+ },
"opensslv11": {
"label": "OpenSSL 1.1",
"condition": "features.openssl && tests.openssl11",
@@ -391,10 +422,16 @@ For example:
"args": "securetransport",
"condition": "config.darwin"
},
+ {
+ "type": "feature",
+ "args": "schannel",
+ "condition": "config.win32 && !config.winrt"
+ },
"openssl",
"openssl-linked",
"opensslv11",
"dtls",
+ "ocsp",
"sctp",
"system-proxies"
]
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index 34db5b4b31..47ce9ab0c6 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -465,27 +465,12 @@ QByteArray QAuthenticatorPrivate::calculateResponse(const QByteArray &requestMet
methodString = "";
phase = Done;
break;
- case QAuthenticatorPrivate::Plain:
- response = '\0' + user.toUtf8() + '\0' + password.toUtf8();
- phase = Done;
- break;
case QAuthenticatorPrivate::Basic:
methodString = "Basic ";
response = user.toLatin1() + ':' + password.toLatin1();
response = response.toBase64();
phase = Done;
break;
- case QAuthenticatorPrivate::Login:
- if (challenge.contains("VXNlciBOYW1lAA==")) {
- response = user.toUtf8().toBase64();
- phase = Phase2;
- } else if (challenge.contains("UGFzc3dvcmQA")) {
- response = password.toUtf8().toBase64();
- phase = Done;
- }
- break;
- case QAuthenticatorPrivate::CramMd5:
- break;
case QAuthenticatorPrivate::DigestMd5:
methodString = "Digest ";
response = digestMd5Response(challenge, requestMethod, path);
diff --git a/src/network/kernel/qauthenticator_p.h b/src/network/kernel/qauthenticator_p.h
index 8a1ee0ebe6..265cb7afe2 100644
--- a/src/network/kernel/qauthenticator_p.h
+++ b/src/network/kernel/qauthenticator_p.h
@@ -68,7 +68,7 @@ class QNtlmWindowsHandles;
class Q_AUTOTEST_EXPORT QAuthenticatorPrivate
{
public:
- enum Method { None, Basic, Plain, Login, Ntlm, CramMd5, DigestMd5 };
+ enum Method { None, Basic, Ntlm, DigestMd5 };
QAuthenticatorPrivate();
~QAuthenticatorPrivate();
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 0973d0dd52..1c7a8da06d 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -300,25 +300,6 @@ int QHostInfo::lookupHost(const QString &name, QObject *receiver,
*/
/*!
- \fn template<typename PointerToMemberFunction> int QHostInfo::lookupHost(const QString &name, const QObject *receiver, PointerToMemberFunction function)
-
- \since 5.9
-
- \overload
-
- Looks up the IP address(es) associated with host name \a name, and
- returns an ID for the lookup. When the result of the lookup is
- ready, the slot or signal \a function in \a receiver is called with
- a QHostInfo argument. The QHostInfo object can then be inspected
- to get the results of the lookup.
-
- \note There is no guarantee on the order the signals will be emitted
- if you start multiple requests with lookupHost().
-
- \sa abortHostLookup(), addresses(), error(), fromName()
-*/
-
-/*!
\fn template<typename Functor> int QHostInfo::lookupHost(const QString &name, Functor functor)
\since 5.9
@@ -354,6 +335,16 @@ int QHostInfo::lookupHost(const QString &name, QObject *receiver,
thread of \a context. The context's thread must have a running Qt
event loop.
+ Here is an alternative signature for the function:
+ \code
+ lookupHost(const QString &name, const QObject *receiver, PointerToMemberFunction function)
+ \endcode
+
+ In this case, when the result of the lookup is ready, the slot or
+ signal \c{function} in \c{receiver} is called with a QHostInfo
+ argument. The QHostInfo object can then be inspected to get the
+ results of the lookup.
+
\note There is no guarantee on the order the signals will be emitted
if you start multiple requests with lookupHost().
diff --git a/src/network/kernel/qhostinfo.h b/src/network/kernel/qhostinfo.h
index 75917a02a3..49871ad470 100644
--- a/src/network/kernel/qhostinfo.h
+++ b/src/network/kernel/qhostinfo.h
@@ -91,13 +91,10 @@ public:
static QString localDomainName();
#ifdef Q_CLANG_QDOC
- template<typename PointerToMemberFunction>
- static int QHostInfo::lookupHost(const QString &name, const QObject *receiver,
- PointerToMemberFunction function);
template<typename Functor>
- static int QHostInfo::lookupHost(const QString &name, Functor functor);
+ static int lookupHost(const QString &name, Functor functor);
template<typename Functor>
- static int QHostInfo::lookupHost(const QString &name, const QObject *context, Functor functor);
+ static int lookupHost(const QString &name, const QObject *context, Functor functor);
#else
// lookupHost to a QObject slot
template <typename Func>
diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp
index db51732bd3..56397814b0 100644
--- a/src/network/kernel/qnetworkproxy_win.cpp
+++ b/src/network/kernel/qnetworkproxy_win.cpp
@@ -370,7 +370,7 @@ static QList<QNetworkProxy> parseServerList(const QNetworkProxyQuery &query, con
#if !defined(Q_OS_WINRT)
namespace {
class QRegistryWatcher {
- Q_DISABLE_COPY(QRegistryWatcher)
+ Q_DISABLE_COPY_MOVE(QRegistryWatcher)
public:
QRegistryWatcher() = default;
@@ -425,7 +425,7 @@ private:
class QWindowsSystemProxy
{
- Q_DISABLE_COPY(QWindowsSystemProxy)
+ Q_DISABLE_COPY_MOVE(QWindowsSystemProxy)
public:
QWindowsSystemProxy();
~QWindowsSystemProxy();
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index e86793cb21..9c8f29e18a 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -914,7 +914,7 @@ void QAbstractSocketPrivate::resolveProxy(const QString &hostname, quint16 port)
proxies << proxy;
} else {
// try the application settings instead
- QNetworkProxyQuery query(hostname, port, QString(),
+ QNetworkProxyQuery query(hostname, port, protocolTag,
socketType == QAbstractSocket::TcpSocket ?
QNetworkProxyQuery::TcpSocket :
socketType == QAbstractSocket::SctpSocket ?
@@ -2959,6 +2959,38 @@ QNetworkProxy QAbstractSocket::proxy() const
Q_D(const QAbstractSocket);
return d->proxy;
}
+
+/*!
+ \since 5.13
+
+ Returns the protocol tag for this socket.
+ If the protocol tag is set then this is passed to QNetworkProxyQuery
+ when this is created internally to indicate the protocol tag to be
+ used.
+
+ \sa setProtocolTag(), QNetworkProxyQuery
+*/
+
+QString QAbstractSocket::protocolTag() const
+{
+ Q_D(const QAbstractSocket);
+ return d->protocolTag;
+}
+
+/*!
+ \since 5.13
+
+ Sets the protocol tag for this socket to \a tag.
+
+ \sa protocolTag()
+*/
+
+void QAbstractSocket::setProtocolTag(const QString &tag)
+{
+ Q_D(QAbstractSocket);
+ d->protocolTag = tag;
+}
+
#endif // QT_NO_NETWORKPROXY
#ifndef QT_NO_DEBUG_STREAM
diff --git a/src/network/socket/qabstractsocket.h b/src/network/socket/qabstractsocket.h
index 6d5e57ac52..de09195eeb 100644
--- a/src/network/socket/qabstractsocket.h
+++ b/src/network/socket/qabstractsocket.h
@@ -197,6 +197,8 @@ public:
#ifndef QT_NO_NETWORKPROXY
void setProxy(const QNetworkProxy &networkProxy);
QNetworkProxy proxy() const;
+ QString protocolTag() const;
+ void setProtocolTag(const QString &tag);
#endif
Q_SIGNALS:
diff --git a/src/network/socket/qabstractsocket_p.h b/src/network/socket/qabstractsocket_p.h
index 066a35ff85..38c0caef49 100644
--- a/src/network/socket/qabstractsocket_p.h
+++ b/src/network/socket/qabstractsocket_p.h
@@ -124,6 +124,7 @@ public:
#ifndef QT_NO_NETWORKPROXY
QNetworkProxy proxy;
QNetworkProxy proxyInUse;
+ QString protocolTag;
void resolveProxy(const QString &hostName, quint16 port);
#else
inline void resolveProxy(const QString &, quint16) { }
diff --git a/src/network/socket/qabstractsocketengine_p.h b/src/network/socket/qabstractsocketengine_p.h
index b15dd73c96..8eebb06a4d 100644
--- a/src/network/socket/qabstractsocketengine_p.h
+++ b/src/network/socket/qabstractsocketengine_p.h
@@ -215,7 +215,7 @@ protected:
private:
Q_DECLARE_PRIVATE(QAbstractSocketEngine)
- Q_DISABLE_COPY(QAbstractSocketEngine)
+ Q_DISABLE_COPY_MOVE(QAbstractSocketEngine)
};
class QAbstractSocketEnginePrivate : public QObjectPrivate
diff --git a/src/network/socket/qhttpsocketengine_p.h b/src/network/socket/qhttpsocketengine_p.h
index cb7798694a..bbcc09eee9 100644
--- a/src/network/socket/qhttpsocketengine_p.h
+++ b/src/network/socket/qhttpsocketengine_p.h
@@ -160,7 +160,7 @@ private:
bool readHttpHeader();
Q_DECLARE_PRIVATE(QHttpSocketEngine)
- Q_DISABLE_COPY(QHttpSocketEngine)
+ Q_DISABLE_COPY_MOVE(QHttpSocketEngine)
};
diff --git a/src/network/socket/qnativesocketengine_p.h b/src/network/socket/qnativesocketengine_p.h
index aa61b74823..2292566265 100644
--- a/src/network/socket/qnativesocketengine_p.h
+++ b/src/network/socket/qnativesocketengine_p.h
@@ -196,7 +196,7 @@ public Q_SLOTS:
private:
Q_DECLARE_PRIVATE(QNativeSocketEngine)
- Q_DISABLE_COPY(QNativeSocketEngine)
+ Q_DISABLE_COPY_MOVE(QNativeSocketEngine)
};
class QSocketNotifier;
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp
index c999bd2088..24e8eabb6e 100644
--- a/src/network/socket/qnativesocketengine_win.cpp
+++ b/src/network/socket/qnativesocketengine_win.cpp
@@ -1146,22 +1146,17 @@ qint64 QNativeSocketEnginePrivate::nativePendingDatagramSize() const
qint64 ret = -1;
int recvResult = 0;
DWORD flags;
- DWORD bufferCount = 5;
- WSABUF * buf = 0;
+ // We start at 1500 bytes (the MTU for Ethernet V2), which should catch
+ // almost all uses (effective MTU for UDP under IPv4 is 1468), except
+ // for localhost datagrams and those reassembled by the IP layer.
+ char udpMessagePeekBuffer[1500];
+ std::vector<WSABUF> buf;
for (;;) {
- // We start at 1500 bytes (the MTU for Ethernet V2), which should catch
- // almost all uses (effective MTU for UDP under IPv4 is 1468), except
- // for localhost datagrams and those reassembled by the IP layer.
- char udpMessagePeekBuffer[1500];
-
- buf = new WSABUF[bufferCount];
- for (DWORD i=0; i<bufferCount; i++) {
- buf[i].buf = udpMessagePeekBuffer;
- buf[i].len = sizeof(udpMessagePeekBuffer);
- }
+ buf.resize(buf.size() + 5, {sizeof(udpMessagePeekBuffer), udpMessagePeekBuffer});
+
flags = MSG_PEEK;
DWORD bytesRead = 0;
- recvResult = ::WSARecv(socketDescriptor, buf, bufferCount, &bytesRead, &flags, 0,0);
+ recvResult = ::WSARecv(socketDescriptor, buf.data(), DWORD(buf.size()), &bytesRead, &flags, nullptr, nullptr);
int err = WSAGetLastError();
if (recvResult != SOCKET_ERROR) {
ret = qint64(bytesRead);
@@ -1169,8 +1164,6 @@ qint64 QNativeSocketEnginePrivate::nativePendingDatagramSize() const
} else {
switch (err) {
case WSAEMSGSIZE:
- bufferCount += 5;
- delete[] buf;
continue;
case WSAECONNRESET:
case WSAENETRESET:
@@ -1185,9 +1178,6 @@ qint64 QNativeSocketEnginePrivate::nativePendingDatagramSize() const
}
}
- if (buf)
- delete[] buf;
-
#if defined (QNATIVESOCKETENGINE_DEBUG)
qDebug("QNativeSocketEnginePrivate::nativePendingDatagramSize() == %lli", ret);
#endif
diff --git a/src/network/socket/qnativesocketengine_winrt_p.h b/src/network/socket/qnativesocketengine_winrt_p.h
index 6688bfe35c..e1fe58bb97 100644
--- a/src/network/socket/qnativesocketengine_winrt_p.h
+++ b/src/network/socket/qnativesocketengine_winrt_p.h
@@ -188,7 +188,7 @@ private slots:
private:
Q_DECLARE_PRIVATE(QNativeSocketEngine)
- Q_DISABLE_COPY(QNativeSocketEngine)
+ Q_DISABLE_COPY_MOVE(QNativeSocketEngine)
};
class QNativeSocketEnginePrivate : public QAbstractSocketEnginePrivate
diff --git a/src/network/socket/qsocks5socketengine_p.h b/src/network/socket/qsocks5socketengine_p.h
index 1942eff4ca..ef9d771753 100644
--- a/src/network/socket/qsocks5socketengine_p.h
+++ b/src/network/socket/qsocks5socketengine_p.h
@@ -127,7 +127,7 @@ public:
private:
Q_DECLARE_PRIVATE(QSocks5SocketEngine)
- Q_DISABLE_COPY(QSocks5SocketEngine)
+ Q_DISABLE_COPY_MOVE(QSocks5SocketEngine)
Q_PRIVATE_SLOT(d_func(), void _q_controlSocketConnected())
Q_PRIVATE_SLOT(d_func(), void _q_controlSocketReadNotification())
Q_PRIVATE_SLOT(d_func(), void _q_controlSocketError(QAbstractSocket::SocketError))
diff --git a/src/network/ssl/qasn1element_p.h b/src/network/ssl/qasn1element_p.h
index 2068254a95..22948e3ca5 100644
--- a/src/network/ssl/qasn1element_p.h
+++ b/src/network/ssl/qasn1element_p.h
@@ -64,6 +64,7 @@ QT_BEGIN_NAMESPACE
#define RSA_ENCRYPTION_OID QByteArrayLiteral(RSADSI_OID "1.1.1")
#define DSA_ENCRYPTION_OID QByteArrayLiteral("1.2.840.10040.4.1")
#define EC_ENCRYPTION_OID QByteArrayLiteral("1.2.840.10045.2.1")
+#define DH_ENCRYPTION_OID QByteArrayLiteral(RSADSI_OID "1.3.1")
// These are mostly from the RFC for PKCS#5
// PKCS#5: https://tools.ietf.org/html/rfc8018#appendix-B
@@ -137,6 +138,7 @@ public:
Rfc822NameType = 0x81,
DnsNameType = 0x82,
UniformResourceIdentifierType = 0x86,
+ IpAddressType = 0x87,
// context specific
Context0Type = 0xA0,
diff --git a/src/network/ssl/qdtls.h b/src/network/ssl/qdtls.h
index 8505b00d5e..d057eadf19 100644
--- a/src/network/ssl/qdtls.h
+++ b/src/network/ssl/qdtls.h
@@ -48,7 +48,9 @@
#include <QtCore/qcryptographichash.h>
#include <QtCore/qobject.h>
+#ifndef Q_CLANG_QDOC
QT_REQUIRE_CONFIG(dtls);
+#endif
QT_BEGIN_NAMESPACE
diff --git a/src/network/ssl/qocspresponse.cpp b/src/network/ssl/qocspresponse.cpp
new file mode 100644
index 0000000000..acc24047e7
--- /dev/null
+++ b/src/network/ssl/qocspresponse.cpp
@@ -0,0 +1,238 @@
+/****************************************************************************
+** Copyright (C) 2011 Richard J. Moore <rich@kde.org>
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qocspresponse_p.h"
+#include "qocspresponse.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QOcspResponse
+ \brief This class represents Online Certificate Status Protocol response
+ \since 5.13
+
+ \ingroup network
+ \ingroup ssl
+ \inmodule QtNetwork
+
+ The QOcspResponse class represents the revocation status of a server's certficate,
+ received by the client-side socket during the TLS handshake. QSslSocket must be
+ configured with OCSP stapling enabled. A non-empty response corresponds to the
+ certificate that can be obtained from QSslConfiguration::peerCertificate().
+
+ \sa QSslSocket, QSslSocket::ocspResponse(), isNull(), clear(), certificateStatus(),
+ revocationReason(), responder(), OcspCertificateStatus, OcspRevocationReason,
+ QSslConfiguration::setOcspStaplingEnabled(), QSslConfiguration::ocspStaplingEnabled(),
+ QSslConfiguration::peerCertificate()
+*/
+
+/*!
+ \enum OcspCertificateStatus
+ \brief Describes the Online Certificate Status
+ \relates QOcspResponse
+ \since 5.13
+
+ \ingroup network
+ \ingroup ssl
+ \inmodule QtNetwork
+
+ \value Good The certificate is not revoked, but this does not necessarily
+ mean that the certificate was ever issued or that the time at which
+ the response was produced is within the certificate's validity interval.
+ \value Revoked This state indicates that the certificate has been revoked
+ (either permanently or temporarily - on hold).
+ \value Unknown This state indicates that the responder doesn't know about
+ the certificate being requested.
+
+ \sa OcspRevocationReason
+*/
+
+/*!
+ \enum OcspRevocationReason
+ \brief Describes the reason for revocation
+ \relates QOcspResponse
+ \since 5.13
+
+ \ingroup network
+ \ingroup ssl
+ \inmodule QtNetwork
+
+
+ This enumeration describes revocation reasons, defined in \l{https://tools.ietf.org/html/rfc5280#section-5.3.1}{RFC 5280, section 5.3.1}
+
+ \value None
+ \value Unspecified
+ \value KeyCompromise
+ \value CACompromise
+ \value AffiliationChanged
+ \value Superseded
+ \value CessationOfOperation
+ \value CertificateHold
+ \value RemoveFromCRL
+*/
+
+/*!
+ \since 5.13
+
+ Creates a new, null OCSP response.
+
+ \sa isNull()
+*/
+QOcspResponse::QOcspResponse()
+ : d(new QOcspResponsePrivate)
+{
+}
+
+/*!
+ \since 5.13
+
+ Creates a new response, the copy of \a other.
+*/
+QOcspResponse::QOcspResponse(const QOcspResponse &other)
+{
+ *d = *other.d;
+}
+
+/*!
+ \since 5.13
+
+ Move-constructs a QOcspResponse instance.
+*/
+QOcspResponse::QOcspResponse(QOcspResponse &&other) Q_DECL_NOTHROW
+{
+ d.swap(other.d);
+}
+
+/*!
+ \since 5.13
+
+ Destroys the response.
+*/
+QOcspResponse::~QOcspResponse()
+{
+}
+
+/*!
+ \since 5.13
+
+ Assignes \a other to the response and returns a reference to this response.
+*/
+QOcspResponse &QOcspResponse::operator=(const QOcspResponse &other)
+{
+ if (this != &other)
+ *d = *other.d;
+
+ return *this;
+}
+
+/*!
+ \since 5.13
+
+ Move-assigns \a other to this QOcspResponse instance.
+*/
+QOcspResponse &QOcspResponse::operator=(QOcspResponse &&other) Q_DECL_NOTHROW
+{
+ if (this != &other)
+ d.swap(other.d);
+
+ return *this;
+}
+
+/*!
+ \since 5.13
+
+ Returns \c true for default-constructed OCSP responses and also if during a
+ handshake no definitive OCSP response, or no response was received at all.
+
+ \sa QOcspResponse(), QSslSocket::ocspResponse()
+*/
+bool QOcspResponse::isNull() const
+{
+ return d->isNull;
+}
+
+/*!
+ \since 5.13
+
+ Resets this QOcspResponse to its default, null state.
+
+ \sa QOcspResponse(), isNull()
+*/
+void QOcspResponse::clear()
+{
+
+ d->certificateStatus = OcspCertificateStatus::Unknown;
+ d->revocationReason = OcspRevocationReason::None;
+ d->isNull = true;
+ d->signerCert.clear();
+}
+
+/*!
+ \since 5.13
+
+ Returns the certificate status.
+
+ \sa OcspCertificateStatus
+*/
+OcspCertificateStatus QOcspResponse::certificateStatus() const
+{
+ return d->certificateStatus;
+}
+
+/*!
+ \since 5.13
+
+ Returns the reason for revocation.
+*/
+OcspRevocationReason QOcspResponse::revocationReason() const
+{
+ return d->revocationReason;
+}
+
+/*!
+ \since 5.13
+
+ This function returns a certificate used to sign OCSP response.
+*/
+QSslCertificate QOcspResponse::responder() const
+{
+ return d->signerCert;
+}
+
+QT_END_NAMESPACE
diff --git a/src/network/ssl/qocspresponse.h b/src/network/ssl/qocspresponse.h
new file mode 100644
index 0000000000..163acd535f
--- /dev/null
+++ b/src/network/ssl/qocspresponse.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+** Copyright (C) 2011 Richard J. Moore <rich@kde.org>
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QOCSPRESPONSE_H
+#define QOCSPRESPONSE_H
+
+#include <QtNetwork/qtnetworkglobal.h>
+
+#include <QtCore/qobject.h>
+#include <QtCore/qscopedpointer.h>
+
+#ifndef Q_CLANG_QDOC
+QT_REQUIRE_CONFIG(ssl);
+#endif
+
+QT_BEGIN_NAMESPACE
+
+enum class OcspCertificateStatus
+{
+ Good,
+ Revoked,
+ Unknown
+};
+
+enum class OcspRevocationReason
+{
+ None = -1,
+ Unspecified,
+ KeyCompromise,
+ CACompromise,
+ AffiliationChanged,
+ Superseded,
+ CessationOfOperation,
+ CertificateHold,
+ RemoveFromCRL
+};
+
+class QOcspResponsePrivate;
+class QOcspResponse
+{
+public:
+
+ QOcspResponse();
+ QOcspResponse(const QOcspResponse &other);
+ QOcspResponse(QOcspResponse && other) Q_DECL_NOEXCEPT;
+ ~QOcspResponse();
+
+ QOcspResponse &operator = (const QOcspResponse &other);
+ QOcspResponse &operator = (QOcspResponse &&other) Q_DECL_NOTHROW;
+
+ bool isNull() const;
+ void clear();
+
+ OcspCertificateStatus certificateStatus() const;
+ OcspRevocationReason revocationReason() const;
+
+ class QSslCertificate responder() const;
+
+private:
+
+ friend class QSslSocketBackendPrivate;
+ QScopedPointer<QOcspResponsePrivate> d;
+};
+
+QT_END_NAMESPACE
+
+#endif // QOCSPRESPONSE_H
diff --git a/src/network/ssl/qocspresponse_p.h b/src/network/ssl/qocspresponse_p.h
new file mode 100644
index 0000000000..652b2bfca7
--- /dev/null
+++ b/src/network/ssl/qocspresponse_p.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+** Copyright (C) 2011 Richard J. Moore <rich@kde.org>
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QOCSPRESPONSE_P_H
+#define QOCSPRESPONSE_P_H
+
+#include <private/qtnetworkglobal_p.h>
+
+#include <qsslcertificate.h>
+#include <qocspresponse.h>
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_BEGIN_NAMESPACE
+
+class QOcspResponsePrivate
+{
+public:
+
+ OcspCertificateStatus certificateStatus = OcspCertificateStatus::Unknown;
+ OcspRevocationReason revocationReason = OcspRevocationReason::None;
+ bool isNull = true;
+
+ QSslCertificate signerCert;
+};
+
+QT_END_NAMESPACE
+
+#endif // QOCSPRESPONSE_P_H
diff --git a/src/network/ssl/qssl.cpp b/src/network/ssl/qssl.cpp
index 19d99bc489..c9fa7f85d9 100644
--- a/src/network/ssl/qssl.cpp
+++ b/src/network/ssl/qssl.cpp
@@ -71,7 +71,8 @@ Q_LOGGING_CATEGORY(lcSsl, "qt.network.ssl");
\value Rsa The RSA algorithm.
\value Dsa The DSA algorithm.
- \value Ec The Elliptic Curve algorithm
+ \value Ec The Elliptic Curve algorithm.
+ \value Dh The Diffie-Hellman algorithm.
\value Opaque A key that should be treated as a 'black box' by QSslKey.
The opaque key facility allows applications to add support for facilities
@@ -98,6 +99,9 @@ Q_LOGGING_CATEGORY(lcSsl, "qt.network.ssl");
\value DnsEntry A DNS host name entry; the entry contains a host name
entry that the certificate is valid for. The entry may contain wildcards.
+ \value IpAddressEntry An IP address entry; the entry contains an IP address
+ entry that the certificate is valid for, introduced in Qt 5.13.
+
\note In Qt 4, this enum was called \c {AlternateNameEntryType}. That name
is deprecated in Qt 5.
@@ -116,8 +120,8 @@ Q_LOGGING_CATEGORY(lcSsl, "qt.network.ssl");
Describes the protocol of the cipher.
- \value SslV3 SSLv3. When using the WinRT backend this option will also enable TLSv1.0
- \value SslV2 SSLv2. Note, SSLv2 support was removed in OpenSSL 1.1.
+ \value SslV3 SSLv3; not supported by QSslSocket.
+ \value SslV2 SSLv2; not supported by QSslSocket.
\value TlsV1_0 TLSv1.0
\value TlsV1_0OrLater TLSv1.0 and later versions. This option is not available when using the WinRT backend due to platform limitations.
\value TlsV1 Obsolete, means the same as TlsV1_0
@@ -132,19 +136,9 @@ Q_LOGGING_CATEGORY(lcSsl, "qt.network.ssl");
\value TlsV1_3 TLSv1.3. (Since Qt 5.12)
\value TlsV1_3OrLater TLSv1.3 and later versions. (Since Qt 5.12)
\value UnknownProtocol The cipher's protocol cannot be determined.
- \value AnyProtocol The socket understands SSLv2, SSLv3, TLSv1.0 and all
- supported later versions of TLS. This value is used by QSslSocket only.
- \value TlsV1SslV3 On the client side, this will send
- a TLS 1.0 Client Hello, enabling TLSv1_0 and SSLv3 connections.
- On the server side, this will enable both SSLv3 and TLSv1_0 connections.
- \value SecureProtocols The default option, using protocols known to be secure;
- currently behaves similar to TlsV1Ssl3 except denying SSLv3 connections that does
- not upgrade to TLS.
-
- \note most servers understand both SSL and TLS, but it is recommended to use
- TLS only for security reasons. However, SSL and TLS are not compatible with
- each other: if you get unexpected handshake failures, verify that you chose
- the correct setting for your protocol.
+ \value AnyProtocol Any supported protocol. This value is used by QSslSocket only.
+ \value TlsV1SslV3 Same as TlsV1_0.
+ \value SecureProtocols The default option, using protocols known to be secure.
*/
/*!
diff --git a/src/network/ssl/qssl.h b/src/network/ssl/qssl.h
index 60362cb410..42c7b5c56d 100644
--- a/src/network/ssl/qssl.h
+++ b/src/network/ssl/qssl.h
@@ -62,12 +62,14 @@ namespace QSsl {
Opaque,
Rsa,
Dsa,
- Ec
+ Ec,
+ Dh,
};
enum AlternativeNameEntryType {
EmailEntry,
- DnsEntry
+ DnsEntry,
+ IpAddressEntry
};
#if QT_DEPRECATED_SINCE(5,0)
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index d153e0b929..0156b5bf96 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -121,6 +121,9 @@
#ifdef QT_SECURETRANSPORT
#include "qsslsocket_mac_p.h"
#endif
+#if QT_CONFIG(schannel)
+#include "qsslsocket_schannel_p.h"
+#endif
#include "qssl_p.h"
#include "qsslcertificate.h"
diff --git a/src/network/ssl/qsslcertificate_openssl.cpp b/src/network/ssl/qsslcertificate_openssl.cpp
index fa87cfeaaf..899c8a0d2d 100644
--- a/src/network/ssl/qsslcertificate_openssl.cpp
+++ b/src/network/ssl/qsslcertificate_openssl.cpp
@@ -44,13 +44,15 @@
#include "qsslkey_p.h"
#include "qsslcertificateextension_p.h"
+#include <QtCore/qendian.h>
+
#if QT_CONFIG(thread)
#include <QtCore/private/qmutexpool_p.h>
#endif
QT_BEGIN_NAMESPACE
// forward declaration
-static QMap<QByteArray, QString> _q_mapFromX509Name(X509_NAME *name);
+static QMultiMap<QByteArray, QString> _q_mapFromX509Name(X509_NAME *name);
bool QSslCertificate::operator==(const QSslCertificate &other) const
{
@@ -207,10 +209,14 @@ QMultiMap<QSsl::AlternativeNameEntryType, QString> QSslCertificate::subjectAlter
STACK_OF(GENERAL_NAME) *altNames = (STACK_OF(GENERAL_NAME) *)q_X509_get_ext_d2i(
d->x509, NID_subject_alt_name, nullptr, nullptr);
+ auto altName = [](ASN1_IA5STRING *ia5, int len) {
+ const char *altNameStr = reinterpret_cast<const char *>(q_ASN1_STRING_get0_data(ia5));
+ return QString::fromLatin1(altNameStr, len);
+ };
if (altNames) {
for (int i = 0; i < q_sk_GENERAL_NAME_num(altNames); ++i) {
const GENERAL_NAME *genName = q_sk_GENERAL_NAME_value(altNames, i);
- if (genName->type != GEN_DNS && genName->type != GEN_EMAIL)
+ if (genName->type != GEN_DNS && genName->type != GEN_EMAIL && genName->type != GEN_IPADD)
continue;
int len = q_ASN1_STRING_length(genName->d.ia5);
@@ -219,12 +225,32 @@ QMultiMap<QSsl::AlternativeNameEntryType, QString> QSslCertificate::subjectAlter
continue;
}
- const char *altNameStr = reinterpret_cast<const char *>(q_ASN1_STRING_get0_data(genName->d.ia5));
- const QString altName = QString::fromLatin1(altNameStr, len);
- if (genName->type == GEN_DNS)
- result.insert(QSsl::DnsEntry, altName);
- else if (genName->type == GEN_EMAIL)
- result.insert(QSsl::EmailEntry, altName);
+ switch (genName->type) {
+ case GEN_DNS:
+ result.insert(QSsl::DnsEntry, altName(genName->d.ia5, len));
+ break;
+ case GEN_EMAIL:
+ result.insert(QSsl::EmailEntry, altName(genName->d.ia5, len));
+ break;
+ case GEN_IPADD: {
+ QHostAddress ipAddress;
+ switch (len) {
+ case 4: // IPv4
+ ipAddress = QHostAddress(qFromBigEndian(*reinterpret_cast<quint32 *>(genName->d.iPAddress->data)));
+ break;
+ case 16: // IPv6
+ ipAddress = QHostAddress(reinterpret_cast<quint8 *>(genName->d.iPAddress->data));
+ break;
+ default: // Unknown IP address format
+ break;
+ }
+ if (!ipAddress.isNull())
+ result.insert(QSsl::IpAddressEntry, ipAddress.toString());
+ break;
+ }
+ default:
+ break;
+ }
}
q_OPENSSL_sk_pop_free((OPENSSL_STACK*)altNames, reinterpret_cast<void(*)(void*)>(q_GENERAL_NAME_free));
@@ -615,16 +641,16 @@ QByteArray QSslCertificatePrivate::asn1ObjectName(ASN1_OBJECT *object)
return asn1ObjectId(object);
}
-static QMap<QByteArray, QString> _q_mapFromX509Name(X509_NAME *name)
+static QMultiMap<QByteArray, QString> _q_mapFromX509Name(X509_NAME *name)
{
- QMap<QByteArray, QString> info;
+ QMultiMap<QByteArray, QString> info;
for (int i = 0; i < q_X509_NAME_entry_count(name); ++i) {
X509_NAME_ENTRY *e = q_X509_NAME_get_entry(name, i);
QByteArray name = QSslCertificatePrivate::asn1ObjectName(q_X509_NAME_ENTRY_get_object(e));
unsigned char *data = nullptr;
int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
- info.insertMulti(name, QString::fromUtf8((char*)data, size));
+ info.insert(name, QString::fromUtf8((char*)data, size));
#if QT_CONFIG(opensslv11)
q_CRYPTO_free(data, nullptr, 0);
#else
diff --git a/src/network/ssl/qsslcertificate_p.h b/src/network/ssl/qsslcertificate_p.h
index dfdceab502..4b331d4c4e 100644
--- a/src/network/ssl/qsslcertificate_p.h
+++ b/src/network/ssl/qsslcertificate_p.h
@@ -75,6 +75,10 @@ struct ASN1_OBJECT;
#include <windows.security.cryptography.certificates.h>
#endif
+#if QT_CONFIG(schannel)
+#include <wincrypt.h>
+#endif
+
QT_BEGIN_NAMESPACE
// forward declaration
@@ -96,14 +100,18 @@ public:
if (x509)
q_X509_free(x509);
#endif
+#if QT_CONFIG(schannel)
+ if (certificateContext)
+ CertFreeCertificateContext(certificateContext);
+#endif
}
bool null;
QByteArray versionString;
QByteArray serialNumberString;
- QMap<QByteArray, QString> issuerInfo;
- QMap<QByteArray, QString> subjectInfo;
+ QMultiMap<QByteArray, QString> issuerInfo;
+ QMultiMap<QByteArray, QString> subjectInfo;
QDateTime notValidAfter;
QDateTime notValidBefore;
@@ -143,6 +151,12 @@ public:
static QSslCertificate QSslCertificate_from_Certificate(ABI::Windows::Security::Cryptography::Certificates::ICertificate *iCertificate);
#endif
+
+#if QT_CONFIG(schannel)
+ const CERT_CONTEXT *certificateContext = nullptr;
+
+ static QSslCertificate QSslCertificate_from_CERT_CONTEXT(const CERT_CONTEXT *certificateContext);
+#endif
};
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslcertificate_qt.cpp b/src/network/ssl/qsslcertificate_qt.cpp
index dfdfd529e5..cce59b5ef3 100644
--- a/src/network/ssl/qsslcertificate_qt.cpp
+++ b/src/network/ssl/qsslcertificate_qt.cpp
@@ -50,6 +50,8 @@
#include "qasn1element_p.h"
#include <QtCore/qdatastream.h>
+#include <QtCore/qendian.h>
+#include <QtNetwork/qhostaddress.h>
QT_BEGIN_NAMESPACE
@@ -139,7 +141,7 @@ QDateTime QSslCertificate::expiryDate() const
return d->notValidAfter;
}
-#ifndef Q_OS_WINRT // implemented in qsslcertificate_winrt.cpp
+#if !defined(Q_OS_WINRT) && !QT_CONFIG(schannel) // implemented in qsslcertificate_{winrt,schannel}.cpp
Qt::HANDLE QSslCertificate::handle() const
{
Q_UNIMPLEMENTED();
@@ -206,6 +208,10 @@ void QSslCertificatePrivate::init(const QByteArray &data, QSsl::EncodingFormat f
: certificatesFromDer(data, 1);
if (!certs.isEmpty()) {
*this = *certs.first().d;
+#if QT_CONFIG(schannel)
+ if (certificateContext)
+ certificateContext = CertDuplicateCertificateContext(certificateContext);
+#endif
}
}
}
@@ -399,10 +405,32 @@ bool QSslCertificatePrivate::parse(const QByteArray &data)
QDataStream nameStream(sanElem.value());
QAsn1Element nameElem;
while (nameElem.read(nameStream)) {
- if (nameElem.type() == QAsn1Element::Rfc822NameType) {
+ switch (nameElem.type()) {
+ case QAsn1Element::Rfc822NameType:
subjectAlternativeNames.insert(QSsl::EmailEntry, nameElem.toString());
- } else if (nameElem.type() == QAsn1Element::DnsNameType) {
+ break;
+ case QAsn1Element::DnsNameType:
subjectAlternativeNames.insert(QSsl::DnsEntry, nameElem.toString());
+ break;
+ case QAsn1Element::IpAddressType: {
+ QHostAddress ipAddress;
+ QByteArray ipAddrValue = nameElem.value();
+ switch (ipAddrValue.length()) {
+ case 4: // IPv4
+ ipAddress = QHostAddress(qFromBigEndian(*reinterpret_cast<quint32 *>(ipAddrValue.data())));
+ break;
+ case 16: // IPv6
+ ipAddress = QHostAddress(reinterpret_cast<quint8 *>(ipAddrValue.data()));
+ break;
+ default: // Unknown IP address format
+ break;
+ }
+ if (!ipAddress.isNull())
+ subjectAlternativeNames.insert(QSsl::IpAddressEntry, ipAddress.toString());
+ break;
+ }
+ default:
+ break;
}
}
}
diff --git a/src/network/ssl/qsslcertificate_schannel.cpp b/src/network/ssl/qsslcertificate_schannel.cpp
new file mode 100644
index 0000000000..5ea713612a
--- /dev/null
+++ b/src/network/ssl/qsslcertificate_schannel.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qsslcertificate.h"
+#include "qsslcertificate_p.h"
+
+#include <wincrypt.h>
+
+QT_BEGIN_NAMESPACE
+
+QSslCertificate QSslCertificatePrivate::QSslCertificate_from_CERT_CONTEXT(const CERT_CONTEXT *certificateContext)
+{
+ QByteArray derData = QByteArray((const char *)certificateContext->pbCertEncoded,
+ certificateContext->cbCertEncoded);
+
+ QSslCertificate certificate(derData, QSsl::Der);
+ certificate.d->certificateContext = CertDuplicateCertificateContext(certificateContext);
+ return certificate;
+}
+
+Qt::HANDLE QSslCertificate::handle() const
+{
+ return Qt::HANDLE(d->certificateContext);
+}
+
+QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
index 3f732b4646..7e92d3a526 100644
--- a/src/network/ssl/qsslconfiguration.cpp
+++ b/src/network/ssl/qsslconfiguration.cpp
@@ -228,7 +228,8 @@ bool QSslConfiguration::operator==(const QSslConfiguration &other) const
d->nextAllowedProtocols == other.d->nextAllowedProtocols &&
d->nextNegotiatedProtocol == other.d->nextNegotiatedProtocol &&
d->nextProtocolNegotiationStatus == other.d->nextProtocolNegotiationStatus &&
- d->dtlsCookieEnabled == other.d->dtlsCookieEnabled;
+ d->dtlsCookieEnabled == other.d->dtlsCookieEnabled &&
+ d->ocspStaplingEnabled == other.d->ocspStaplingEnabled;
}
/*!
@@ -272,7 +273,8 @@ bool QSslConfiguration::isNull() const
d->preSharedKeyIdentityHint.isNull() &&
d->nextAllowedProtocols.isEmpty() &&
d->nextNegotiatedProtocol.isNull() &&
- d->nextProtocolNegotiationStatus == QSslConfiguration::NextProtocolNegotiationNone);
+ d->nextProtocolNegotiationStatus == QSslConfiguration::NextProtocolNegotiationNone &&
+ d->ocspStaplingEnabled == false);
}
/*!
@@ -585,6 +587,8 @@ void QSslConfiguration::setPrivateKey(const QSslKey &key)
ciphers. You can revert to using the entire set by calling
setCiphers() with the list returned by QSslSocket::supportedCiphers().
+ \note This is not currently supported in the Schannel backend.
+
\sa setCiphers(), QSslSocket::supportedCiphers()
*/
QList<QSslCipher> QSslConfiguration::ciphers() const
@@ -600,6 +604,8 @@ QList<QSslCipher> QSslConfiguration::ciphers() const
Restricting the cipher suite must be done before the handshake
phase, where the session cipher is chosen.
+ \note This is not currently supported in the Schannel backend.
+
\sa ciphers(), QSslSocket::supportedCiphers()
*/
void QSslConfiguration::setCiphers(const QList<QSslCipher> &ciphers)
@@ -1094,6 +1100,37 @@ void QSslConfiguration::setDefaultDtlsConfiguration(const QSslConfiguration &con
#endif // dtls
+/*!
+ \since 5.13
+ If \a enabled is true, client QSslSocket will send a certificate status request
+ to its peer when initiating a handshake. During the handshake QSslSocket will
+ verify the server's response. This value must be set before the handshake
+ starts.
+
+ \sa ocspStaplingEnabled()
+*/
+void QSslConfiguration::setOcspStaplingEnabled(bool enabled)
+{
+#if QT_CONFIG(ocsp)
+ d->ocspStaplingEnabled = enabled;
+#else
+ if (enabled)
+ qCWarning(lcSsl, "Enabling OCSP-stapling requires the feature 'ocsp'");
+#endif // ocsp
+}
+
+/*!
+ \since 5.13
+ Returns true if OCSP stapling was enabled by setOCSPStaplingEnabled(),
+ otherwise false (which is the default value).
+
+ \sa setOcspStaplingEnabled()
+*/
+bool QSslConfiguration::ocspStaplingEnabled() const
+{
+ return d->ocspStaplingEnabled;
+}
+
/*! \internal
*/
bool QSslConfigurationPrivate::peerSessionWasShared(const QSslConfiguration &configuration) {
diff --git a/src/network/ssl/qsslconfiguration.h b/src/network/ssl/qsslconfiguration.h
index 454ac0cee3..8f53e25a53 100644
--- a/src/network/ssl/qsslconfiguration.h
+++ b/src/network/ssl/qsslconfiguration.h
@@ -170,6 +170,9 @@ public:
static void setDefaultDtlsConfiguration(const QSslConfiguration &configuration);
#endif // dtls
+ void setOcspStaplingEnabled(bool enable);
+ bool ocspStaplingEnabled() const;
+
enum NextProtocolNegotiationStatus {
NextProtocolNegotiationNone,
NextProtocolNegotiationNegotiated,
diff --git a/src/network/ssl/qsslconfiguration_p.h b/src/network/ssl/qsslconfiguration_p.h
index 6c23165c6a..83126bb9a0 100644
--- a/src/network/ssl/qsslconfiguration_p.h
+++ b/src/network/ssl/qsslconfiguration_p.h
@@ -143,6 +143,12 @@ public:
const bool dtlsCookieEnabled = false;
#endif // dtls
+#if QT_CONFIG(ocsp)
+ bool ocspStaplingEnabled = false;
+#else
+ const bool ocspStaplingEnabled = false;
+#endif
+
// in qsslsocket.cpp:
static QSslConfiguration defaultConfiguration();
static void setDefaultConfiguration(const QSslConfiguration &configuration);
diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
index 35cca9f01a..e81e5582f4 100644
--- a/src/network/ssl/qsslcontext_openssl.cpp
+++ b/src/network/ssl/qsslcontext_openssl.cpp
@@ -243,12 +243,28 @@ QString QSslContext::errorString() const
return errorStr;
}
+#if QT_CONFIG(ocsp)
+extern "C" int qt_OCSP_status_server_callback(SSL *ssl, void *); // Defined in qsslsocket_openssl.cpp.
+#endif // ocsp
// static
void QSslContext::applyBackendConfig(QSslContext *sslContext)
{
- if (sslContext->sslConfiguration.backendConfiguration().isEmpty())
+ const QMap<QByteArray, QVariant> &conf = sslContext->sslConfiguration.backendConfiguration();
+ if (conf.isEmpty())
return;
+#if QT_CONFIG(ocsp)
+ auto ocspResponsePos = conf.find("Qt-OCSP-response");
+ if (ocspResponsePos != conf.end()) {
+ // This is our private, undocumented configuration option, existing only for
+ // the purpose of testing OCSP status responses. We don't even check this
+ // callback was set. If no - the test must fail.
+ q_SSL_CTX_set_tlsext_status_cb(sslContext->ctx, qt_OCSP_status_server_callback);
+ if (conf.size() == 1)
+ return;
+ }
+#endif // ocsp
+
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
if (QSslSocket::sslLibraryVersionNumber() >= 0x10002000L) {
QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
@@ -256,8 +272,10 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
q_SSL_CONF_CTX_set_flags(cctx.data(), SSL_CONF_FLAG_FILE);
- const auto &backendConfig = sslContext->sslConfiguration.backendConfiguration();
- for (auto i = backendConfig.constBegin(); i != backendConfig.constEnd(); ++i) {
+ for (auto i = conf.constBegin(); i != conf.constEnd(); ++i) {
+ if (i.key() == "Qt-OCSP-response") // This never goes to SSL_CONF_cmd().
+ continue;
+
if (!i.value().canConvert(QMetaType::QByteArray)) {
sslContext->errorCode = QSslError::UnspecifiedError;
sslContext->errorStr = msgErrorSettingBackendConfig(
diff --git a/src/network/ssl/qsslcontext_openssl11.cpp b/src/network/ssl/qsslcontext_openssl11.cpp
index c96a48dac1..21a5c779f7 100644
--- a/src/network/ssl/qsslcontext_openssl11.cpp
+++ b/src/network/ssl/qsslcontext_openssl11.cpp
@@ -95,6 +95,10 @@ init_context:
// SSL 2 is no longer supported, but chosen deliberately -> error
sslContext->ctx = nullptr;
unsupportedProtocol = true;
+ } else if (sslContext->sslConfiguration.protocol() == QSsl::SslV3) {
+ // SSL 3 is no longer supported, but chosen deliberately -> error
+ sslContext->ctx = nullptr;
+ unsupportedProtocol = true;
} else {
switch (sslContext->sslConfiguration.protocol()) {
case QSsl::DtlsV1_0:
@@ -151,11 +155,6 @@ init_context:
long maxVersion = anyVersion;
switch (sslContext->sslConfiguration.protocol()) {
- // The single-protocol versions first:
- case QSsl::SslV3:
- minVersion = SSL3_VERSION;
- maxVersion = SSL3_VERSION;
- break;
case QSsl::TlsV1_0:
minVersion = TLS1_VERSION;
maxVersion = TLS1_VERSION;
@@ -181,9 +180,6 @@ init_context:
// Ranges:
case QSsl::TlsV1SslV3:
case QSsl::AnyProtocol:
- minVersion = SSL3_VERSION;
- maxVersion = 0;
- break;
case QSsl::SecureProtocols:
case QSsl::TlsV1_0OrLater:
minVersion = TLS1_VERSION;
@@ -227,8 +223,9 @@ init_context:
break;
#endif // TLS1_3_VERSION
case QSsl::SslV2:
- // This protocol is not supported by OpenSSL 1.1 and we handle
- // it as an error (see the code above).
+ case QSsl::SslV3:
+ // These protocols are not supported, and we handle
+ // them as an error (see the code above).
Q_UNREACHABLE();
break;
case QSsl::UnknownProtocol:
diff --git a/src/network/ssl/qsslcontext_opensslpre11.cpp b/src/network/ssl/qsslcontext_opensslpre11.cpp
index 34537d1da4..956c5c32ec 100644
--- a/src/network/ssl/qsslcontext_opensslpre11.cpp
+++ b/src/network/ssl/qsslcontext_opensslpre11.cpp
@@ -115,32 +115,19 @@ init_context:
break;
#endif // dtls
case QSsl::SslV2:
-#ifndef OPENSSL_NO_SSL2
- sslContext->ctx = q_SSL_CTX_new(client ? q_SSLv2_client_method() : q_SSLv2_server_method());
-#else
- // SSL 2 not supported by the system, but chosen deliberately -> error
- sslContext->ctx = 0;
- unsupportedProtocol = true;
-#endif
- break;
case QSsl::SslV3:
-#ifndef OPENSSL_NO_SSL3_METHOD
- sslContext->ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method());
-#else
- // SSL 3 not supported by the system, but chosen deliberately -> error
+ // We don't support SSLv2 / SSLv3.
sslContext->ctx = 0;
unsupportedProtocol = true;
-#endif
break;
case QSsl::SecureProtocols:
// SSLv2 and SSLv3 will be disabled by SSL options
// But we need q_SSLv23_server_method() otherwise AnyProtocol will be unable to connect on Win32.
- case QSsl::TlsV1SslV3:
- // SSLv2 will will be disabled by SSL options
case QSsl::AnyProtocol:
default:
sslContext->ctx = q_SSL_CTX_new(client ? q_SSLv23_client_method() : q_SSLv23_server_method());
break;
+ case QSsl::TlsV1SslV3:
case QSsl::TlsV1_0:
sslContext->ctx = q_SSL_CTX_new(client ? q_TLSv1_client_method() : q_TLSv1_server_method());
break;
@@ -212,12 +199,9 @@ init_context:
long options = QSslSocketBackendPrivate::setupOpenSslOptions(configuration.protocol(), configuration.d->sslOptions);
q_SSL_CTX_set_options(sslContext->ctx, options);
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
// Tell OpenSSL to release memory early
// http://www.openssl.org/docs/ssl/SSL_CTX_set_mode.html
- if (q_SSLeay() >= 0x10000000L)
- q_SSL_CTX_set_mode(sslContext->ctx, SSL_MODE_RELEASE_BUFFERS);
-#endif
+ q_SSL_CTX_set_mode(sslContext->ctx, SSL_MODE_RELEASE_BUFFERS);
// Initialize ciphers
QByteArray cipherString;
diff --git a/src/network/ssl/qsslellipticcurve.cpp b/src/network/ssl/qsslellipticcurve.cpp
index 88baa1ff6c..5608d32fa7 100644
--- a/src/network/ssl/qsslellipticcurve.cpp
+++ b/src/network/ssl/qsslellipticcurve.cpp
@@ -64,6 +64,8 @@ QT_BEGIN_NAMESPACE
QSslEllipticCurve instances can be compared for equality and can be used as keys
in QHash and QSet. They cannot be used as key in a QMap.
+
+ \note This class is currently only supported in OpenSSL.
*/
/*!
diff --git a/src/network/ssl/qsslerror.cpp b/src/network/ssl/qsslerror.cpp
index 3f79d1a037..74ff6987d2 100644
--- a/src/network/ssl/qsslerror.cpp
+++ b/src/network/ssl/qsslerror.cpp
@@ -86,6 +86,18 @@
\value UnspecifiedError
\value NoSslSupport
\value CertificateBlacklisted
+ \value OcspNoResponseFound
+ \value OcspMalformedRequest
+ \value OcspMalformedResponse
+ \value OcspInternalError
+ \value OcspTryLater
+ \value OcspSigRequred
+ \value OcspUnauthorized
+ \value OcspResponseCannotBeTrusted
+ \value OcspResponseCertIdUnknown
+ \value OcspResponseExpired
+ \value OcspStatusUnknown
+
\sa QSslError::errorString()
*/
@@ -292,6 +304,39 @@ QString QSslError::errorString() const
case CertificateBlacklisted:
errStr = QSslSocket::tr("The peer certificate is blacklisted");
break;
+ case OcspNoResponseFound:
+ errStr = QSslSocket::tr("No OCSP status response found");
+ break;
+ case OcspMalformedRequest:
+ errStr = QSslSocket::tr("The OCSP status request had invalid syntax");
+ break;
+ case OcspMalformedResponse:
+ errStr = QSslSocket::tr("OCSP response contains an unexpected number of SingleResponse structures");
+ break;
+ case OcspInternalError:
+ errStr = QSslSocket::tr("OCSP responder reached an inconsistent internal state");
+ break;
+ case OcspTryLater:
+ errStr = QSslSocket::tr("OCSP responder was unable to return a status for the requested certificate");
+ break;
+ case OcspSigRequred:
+ errStr = QSslSocket::tr("The server requires the client to sign the OCSP request in order to construct a response");
+ break;
+ case OcspUnauthorized:
+ errStr = QSslSocket::tr("The client is not authorized to request OCSP status from this server");
+ break;
+ case OcspResponseCannotBeTrusted:
+ errStr = QSslSocket::tr("OCSP reponder's identity cannot be verified");
+ break;
+ case OcspResponseCertIdUnknown:
+ errStr = QSslSocket::tr("The identity of a certificate in an OCSP response cannot be established");
+ break;
+ case OcspResponseExpired:
+ errStr = QSslSocket::tr("The certificate status response has expired");
+ break;
+ case OcspStatusUnknown:
+ errStr = QSslSocket::tr("The certificate's status is unknown");
+ break;
default:
errStr = QSslSocket::tr("Unknown error");
break;
diff --git a/src/network/ssl/qsslerror.h b/src/network/ssl/qsslerror.h
index d7c959423d..513b8afd7f 100644
--- a/src/network/ssl/qsslerror.h
+++ b/src/network/ssl/qsslerror.h
@@ -80,6 +80,18 @@ public:
HostNameMismatch,
NoSslSupport,
CertificateBlacklisted,
+ CertificateStatusUnknown,
+ OcspNoResponseFound,
+ OcspMalformedRequest,
+ OcspMalformedResponse,
+ OcspInternalError,
+ OcspTryLater,
+ OcspSigRequred,
+ OcspUnauthorized,
+ OcspResponseCannotBeTrusted,
+ OcspResponseCertIdUnknown,
+ OcspResponseExpired,
+ OcspStatusUnknown,
UnspecifiedError = -1
};
diff --git a/src/network/ssl/qsslkey_openssl.cpp b/src/network/ssl/qsslkey_openssl.cpp
index 9a43e67772..99c1a39c73 100644
--- a/src/network/ssl/qsslkey_openssl.cpp
+++ b/src/network/ssl/qsslkey_openssl.cpp
@@ -69,6 +69,11 @@ void QSslKeyPrivate::clear(bool deep)
q_DSA_free(dsa);
dsa = nullptr;
}
+ if (algorithm == QSsl::Dh && dh) {
+ if (deep)
+ q_DH_free(dh);
+ dh = nullptr;
+ }
#ifndef OPENSSL_NO_EC
if (algorithm == QSsl::Ec && ec) {
if (deep)
@@ -105,6 +110,12 @@ bool QSslKeyPrivate::fromEVP_PKEY(EVP_PKEY *pkey)
type = QSsl::PrivateKey;
dsa = q_EVP_PKEY_get1_DSA(pkey);
return true;
+ } else if (keyType == EVP_PKEY_DH) {
+ isNull = false;
+ algorithm = QSsl::Dh;
+ type = QSsl::PrivateKey;
+ dh = q_EVP_PKEY_get1_DH(pkey);
+ return true;
}
#ifndef OPENSSL_NO_EC
else if (keyType == EVP_PKEY_EC) {
@@ -160,6 +171,15 @@ void QSslKeyPrivate::decodePem(const QByteArray &pem, const QByteArray &passPhra
: q_PEM_read_bio_DSAPrivateKey(bio, &dsa, nullptr, phrase);
if (dsa && dsa == result)
isNull = false;
+ } else if (algorithm == QSsl::Dh) {
+ EVP_PKEY *result = (type == QSsl::PublicKey)
+ ? q_PEM_read_bio_PUBKEY(bio, nullptr, nullptr, phrase)
+ : q_PEM_read_bio_PrivateKey(bio, nullptr, nullptr, phrase);
+ if (result)
+ dh = q_EVP_PKEY_get1_DH(result);
+ if (dh)
+ isNull = false;
+ q_EVP_PKEY_free(result);
#ifndef OPENSSL_NO_EC
} else if (algorithm == QSsl::Ec) {
EC_KEY *result = (type == QSsl::PublicKey)
@@ -181,6 +201,7 @@ int QSslKeyPrivate::length() const
switch (algorithm) {
case QSsl::Rsa: return q_RSA_bits(rsa);
case QSsl::Dsa: return q_DSA_bits(dsa);
+ case QSsl::Dh: return q_DH_bits(dh);
#ifndef OPENSSL_NO_EC
case QSsl::Ec: return q_EC_GROUP_get_degree(q_EC_KEY_get0_group(ec));
#endif
@@ -215,7 +236,7 @@ QByteArray QSslKeyPrivate::toPem(const QByteArray &passPhrase) const
fail = true;
} else {
if (!q_PEM_write_bio_RSAPrivateKey(
- bio, rsa, cipher, const_cast<uchar *>((const uchar *)passPhrase.data()),
+ bio, rsa, cipher, (uchar *)passPhrase.data(),
passPhrase.size(), nullptr, nullptr)) {
fail = true;
}
@@ -226,20 +247,33 @@ QByteArray QSslKeyPrivate::toPem(const QByteArray &passPhrase) const
fail = true;
} else {
if (!q_PEM_write_bio_DSAPrivateKey(
- bio, dsa, cipher, const_cast<uchar *>((const uchar *)passPhrase.data()),
+ bio, dsa, cipher, (uchar *)passPhrase.data(),
passPhrase.size(), nullptr, nullptr)) {
fail = true;
}
}
+ } else if (algorithm == QSsl::Dh) {
+ EVP_PKEY *result = q_EVP_PKEY_new();
+ if (!result || !q_EVP_PKEY_set1_DH(result, dh)) {
+ fail = true;
+ } else if (type == QSsl::PublicKey) {
+ if (!q_PEM_write_bio_PUBKEY(bio, result))
+ fail = true;
+ } else if (!q_PEM_write_bio_PrivateKey(
+ bio, result, cipher, (uchar *)passPhrase.data(),
+ passPhrase.size(), nullptr, nullptr)) {
+ fail = true;
+ }
+ q_EVP_PKEY_free(result);
#ifndef OPENSSL_NO_EC
} else if (algorithm == QSsl::Ec) {
if (type == QSsl::PublicKey) {
if (!q_PEM_write_bio_EC_PUBKEY(bio, ec))
fail = true;
} else {
- if (!q_PEM_write_bio_ECPrivateKey(bio, ec, cipher,
- const_cast<uchar *>((const uchar *)passPhrase.data()),
- passPhrase.size(), nullptr, nullptr)) {
+ if (!q_PEM_write_bio_ECPrivateKey(
+ bio, ec, cipher, (uchar *)passPhrase.data(),
+ passPhrase.size(), nullptr, nullptr)) {
fail = true;
}
}
@@ -267,6 +301,8 @@ Qt::HANDLE QSslKeyPrivate::handle() const
return Qt::HANDLE(rsa);
case QSsl::Dsa:
return Qt::HANDLE(dsa);
+ case QSsl::Dh:
+ return Qt::HANDLE(dh);
#ifndef OPENSSL_NO_EC
case QSsl::Ec:
return Qt::HANDLE(ec);
diff --git a/src/network/ssl/qsslkey_p.cpp b/src/network/ssl/qsslkey_p.cpp
index 28e3e2efd8..b29b38beab 100644
--- a/src/network/ssl/qsslkey_p.cpp
+++ b/src/network/ssl/qsslkey_p.cpp
@@ -116,6 +116,8 @@ QByteArray QSslKeyPrivate::pemHeader() const
return QByteArrayLiteral("-----BEGIN DSA PRIVATE KEY-----");
else if (algorithm == QSsl::Ec)
return QByteArrayLiteral("-----BEGIN EC PRIVATE KEY-----");
+ else if (algorithm == QSsl::Dh)
+ return QByteArrayLiteral("-----BEGIN PRIVATE KEY-----");
Q_UNREACHABLE();
return QByteArray();
@@ -141,6 +143,8 @@ QByteArray QSslKeyPrivate::pemFooter() const
return QByteArrayLiteral("-----END DSA PRIVATE KEY-----");
else if (algorithm == QSsl::Ec)
return QByteArrayLiteral("-----END EC PRIVATE KEY-----");
+ else if (algorithm == QSsl::Dh)
+ return QByteArrayLiteral("-----END PRIVATE KEY-----");
Q_UNREACHABLE();
return QByteArray();
@@ -535,7 +539,9 @@ QDebug operator<<(QDebug debug, const QSslKey &key)
debug << "QSslKey("
<< (key.type() == QSsl::PublicKey ? "PublicKey" : "PrivateKey")
<< ", " << (key.algorithm() == QSsl::Opaque ? "OPAQUE" :
- (key.algorithm() == QSsl::Rsa ? "RSA" : ((key.algorithm() == QSsl::Dsa) ? "DSA" : "EC")))
+ (key.algorithm() == QSsl::Rsa ? "RSA" :
+ (key.algorithm() == QSsl::Dsa ? "DSA" :
+ (key.algorithm() == QSsl::Dh ? "DH" : "EC"))))
<< ", " << key.length()
<< ')';
return debug;
diff --git a/src/network/ssl/qsslkey_p.h b/src/network/ssl/qsslkey_p.h
index 7ae2cc740b..06403b5479 100644
--- a/src/network/ssl/qsslkey_p.h
+++ b/src/network/ssl/qsslkey_p.h
@@ -116,6 +116,7 @@ public:
EVP_PKEY *opaque;
RSA *rsa;
DSA *dsa;
+ DH *dh;
#ifndef OPENSSL_NO_EC
EC_KEY *ec;
#endif
@@ -129,7 +130,7 @@ public:
QAtomicInt ref;
private:
- Q_DISABLE_COPY(QSslKeyPrivate)
+ Q_DISABLE_COPY_MOVE(QSslKeyPrivate)
};
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslkey_qt.cpp b/src/network/ssl/qsslkey_qt.cpp
index a13275f3bb..5ebd8ac3bd 100644
--- a/src/network/ssl/qsslkey_qt.cpp
+++ b/src/network/ssl/qsslkey_qt.cpp
@@ -165,6 +165,7 @@ static int extractPkcs8KeyLength(const QVector<QAsn1Element> &items, QSslKeyPriv
switch (algorithm){
case QSsl::Rsa: return "RSA";
case QSsl::Dsa: return "DSA";
+ case QSsl::Dh: return "DH";
case QSsl::Ec: return "EC";
case QSsl::Opaque: return "Opaque";
}
@@ -217,6 +218,21 @@ static int extractPkcs8KeyLength(const QVector<QAsn1Element> &items, QSslKeyPriv
if (dsaInfo.size() != 3 || dsaInfo[0].type() != QAsn1Element::IntegerType)
return -1;
keyLength = numberOfBits(dsaInfo[0].value());
+ } else if (value == DH_ENCRYPTION_OID) {
+ if (Q_UNLIKELY(that->algorithm != QSsl::Dh)) {
+ // As above for RSA.
+ qWarning() << "QSslKey: Found DH when asked to use" << getName(that->algorithm)
+ << "\nLoading will fail.";
+ return -1;
+ }
+ // DH's structure is documented here:
+ // https://www.cryptsoft.com/pkcs11doc/STANDARD/v201-95.pdf in section 11.9.
+ if (pkcs8Info[1].type() != QAsn1Element::SequenceType)
+ return -1;
+ const QVector<QAsn1Element> dhInfo = pkcs8Info[1].toVector();
+ if (dhInfo.size() < 2 || dhInfo.size() > 3 || dhInfo[0].type() != QAsn1Element::IntegerType)
+ return -1;
+ keyLength = numberOfBits(dhInfo[0].value());
} else {
// in case of unexpected formats:
qWarning() << "QSslKey: Unsupported PKCS#8 key algorithm:" << value
@@ -268,6 +284,16 @@ void QSslKeyPrivate::decodeDer(const QByteArray &der, const QByteArray &passPhra
if (params.isEmpty() || params[0].type() != QAsn1Element::IntegerType)
return;
keyLength = numberOfBits(params[0].value());
+ } else if (algorithm == QSsl::Dh) {
+ if (infoItems[0].toObjectId() != DH_ENCRYPTION_OID)
+ return;
+ if (infoItems[1].type() != QAsn1Element::SequenceType)
+ return;
+ // key params
+ const QVector<QAsn1Element> params = infoItems[1].toVector();
+ if (params.isEmpty() || params[0].type() != QAsn1Element::IntegerType)
+ return;
+ keyLength = numberOfBits(params[0].value());
} else if (algorithm == QSsl::Ec) {
if (infoItems[0].toObjectId() != EC_ENCRYPTION_OID)
return;
@@ -307,6 +333,12 @@ void QSslKeyPrivate::decodeDer(const QByteArray &der, const QByteArray &passPhra
if (items.size() != 6 || items[1].type() != QAsn1Element::IntegerType)
return;
keyLength = numberOfBits(items[1].value());
+ } else if (algorithm == QSsl::Dh) {
+ if (versionHex != "00")
+ return;
+ if (items.size() < 5 || items.size() > 6 || items[1].type() != QAsn1Element::IntegerType)
+ return;
+ keyLength = numberOfBits(items[1].value());
} else if (algorithm == QSsl::Ec) {
if (versionHex != "01")
return;
diff --git a/src/network/ssl/qsslkey_schannel.cpp b/src/network/ssl/qsslkey_schannel.cpp
new file mode 100644
index 0000000000..5694068860
--- /dev/null
+++ b/src/network/ssl/qsslkey_schannel.cpp
@@ -0,0 +1,174 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qssl_p.h"
+#include "qsslkey.h"
+#include "qsslkey_p.h"
+#include "qsslcertificate_p.h"
+
+#include <QtCore/qbytearray.h>
+#include <QtCore/qscopeguard.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace {
+const wchar_t *getName(QSslKeyPrivate::Cipher cipher)
+{
+ switch (cipher) {
+ case QSslKeyPrivate::Cipher::DesCbc:
+ return BCRYPT_DES_ALGORITHM;
+ case QSslKeyPrivate::Cipher::DesEde3Cbc:
+ return BCRYPT_3DES_ALGORITHM;
+ case QSslKeyPrivate::Cipher::Rc2Cbc:
+ return BCRYPT_RC2_ALGORITHM;
+ }
+ Q_UNREACHABLE();
+}
+
+BCRYPT_ALG_HANDLE getHandle(QSslKeyPrivate::Cipher cipher)
+{
+ BCRYPT_ALG_HANDLE handle;
+ NTSTATUS status = BCryptOpenAlgorithmProvider(
+ &handle, // phAlgorithm
+ getName(cipher), // pszAlgId
+ nullptr, // pszImplementation
+ 0 // dwFlags
+ );
+ if (status < 0) {
+ qCWarning(lcSsl, "Failed to open algorithm handle (%ld)!", status);
+ return nullptr;
+ }
+
+ return handle;
+}
+
+BCRYPT_KEY_HANDLE generateSymmetricKey(BCRYPT_ALG_HANDLE handle,
+ const QByteArray &key)
+{
+ BCRYPT_KEY_HANDLE keyHandle;
+ NTSTATUS status = BCryptGenerateSymmetricKey(
+ handle, // hAlgorithm
+ &keyHandle, // phKey
+ nullptr, // pbKeyObject (can ignore)
+ 0, // cbKeyObject (also ignoring)
+ reinterpret_cast<unsigned char *>(const_cast<char *>(key.data())), // pbSecret
+ ULONG(key.length()), // cbSecret
+ 0 // dwFlags
+ );
+ if (status < 0) {
+ qCWarning(lcSsl, "Failed to generate symmetric key (%ld)!", status);
+ return nullptr;
+ }
+
+ status = BCryptSetProperty(
+ keyHandle, // hObject
+ BCRYPT_CHAINING_MODE, // pszProperty
+ reinterpret_cast<UCHAR *>(const_cast<wchar_t *>(BCRYPT_CHAIN_MODE_CBC)), // pbInput
+ ARRAYSIZE(BCRYPT_CHAIN_MODE_CBC), // cbInput
+ 0 // dwFlags
+ );
+ if (status < 0) {
+ BCryptDestroyKey(keyHandle);
+ qCWarning(lcSsl, "Failed to change the symmetric key's chaining mode (%ld)!", status);
+ return nullptr;
+ }
+ return keyHandle;
+}
+
+QByteArray doCrypt(QSslKeyPrivate::Cipher cipher, const QByteArray &data, const QByteArray &key,
+ const QByteArray &iv, bool encrypt)
+{
+ BCRYPT_ALG_HANDLE handle = getHandle(cipher);
+ if (!handle)
+ return {};
+ auto handleDealloc = qScopeGuard([&handle]() {
+ BCryptCloseAlgorithmProvider(handle, 0);
+ });
+
+ BCRYPT_KEY_HANDLE keyHandle = generateSymmetricKey(handle, key);
+ if (!keyHandle)
+ return {};
+ auto keyHandleDealloc = qScopeGuard([&keyHandle]() {
+ BCryptDestroyKey(keyHandle);
+ });
+
+ QByteArray ivCopy = iv; // This gets modified, so we take a copy
+
+ ULONG sizeNeeded = 0;
+ QVarLengthArray<unsigned char> output;
+ auto cryptFunction = encrypt ? BCryptEncrypt : BCryptDecrypt;
+ for (int i = 0; i < 2; i++) {
+ output.resize(int(sizeNeeded));
+ auto input = reinterpret_cast<unsigned char *>(const_cast<char *>(data.data()));
+ // Need to call it twice because the first iteration lets us know the size needed.
+ NTSTATUS status = cryptFunction(
+ keyHandle, // hKey
+ input, // pbInput
+ ULONG(data.length()), // cbInput
+ nullptr, // pPaddingInfo
+ reinterpret_cast<unsigned char *>(ivCopy.data()), // pbIV
+ ULONG(ivCopy.length()), // cbIV
+ sizeNeeded ? output.data() : nullptr, // pbOutput
+ ULONG(output.length()), // cbOutput
+ &sizeNeeded, // pcbResult
+ BCRYPT_BLOCK_PADDING // dwFlags
+ );
+ if (status < 0) {
+ qCWarning(lcSsl, "%s failed (%ld)!", encrypt ? "Encrypt" : "Decrypt", status);
+ return {};
+ }
+ }
+
+ return QByteArray(reinterpret_cast<const char *>(output.constData()), int(sizeNeeded));
+}
+} // anonymous namespace
+
+QByteArray QSslKeyPrivate::decrypt(Cipher cipher, const QByteArray &data, const QByteArray &key,
+ const QByteArray &iv)
+{
+ return doCrypt(cipher, data, key, iv, false);
+}
+
+QByteArray QSslKeyPrivate::encrypt(Cipher cipher, const QByteArray &data, const QByteArray &key,
+ const QByteArray &iv)
+{
+ return doCrypt(cipher, data, key, iv, true);
+}
+
+QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslpresharedkeyauthenticator.cpp b/src/network/ssl/qsslpresharedkeyauthenticator.cpp
index 3bb2719026..01e1501763 100644
--- a/src/network/ssl/qsslpresharedkeyauthenticator.cpp
+++ b/src/network/ssl/qsslpresharedkeyauthenticator.cpp
@@ -94,6 +94,8 @@ QSslPreSharedKeyAuthenticatorPrivate::QSslPreSharedKeyAuthenticatorPrivate()
\note PSK ciphersuites are supported only when using OpenSSL 1.0.1 (or
greater) as the SSL backend.
+ \note PSK is currently only supported in OpenSSL.
+
\sa QSslSocket
*/
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 4a9d054c0d..68de9dedaa 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -133,7 +133,8 @@
\list
\li The socket's cryptographic cipher suite can be customized before
- the handshake phase with setCiphers() and setDefaultCiphers().
+ the handshake phase with QSslConfiguration::setCiphers()
+ and QSslConfiguration::setDefaultCiphers().
\li The socket's local certificate and private key can be customized
before the handshake phase with setLocalCertificate() and
setPrivateKey().
@@ -202,6 +203,7 @@
does not require this certificate to be valid. This is useful when you
want to display peer certificate details to the user without affecting the
actual SSL handshake. This mode is the default for servers.
+ Note: In Schannel this value acts the same as VerifyNone.
\value VerifyPeer QSslSocket will request a certificate from the peer
during the SSL handshake phase, and requires that this certificate is
@@ -312,6 +314,7 @@
#include "qssl_p.h"
#include "qsslsocket.h"
#include "qsslcipher.h"
+#include "qocspresponse.h"
#ifndef QT_NO_OPENSSL
#include "qsslsocket_openssl_p.h"
#endif
@@ -321,6 +324,9 @@
#ifdef QT_SECURETRANSPORT
#include "qsslsocket_mac_p.h"
#endif
+#if QT_CONFIG(schannel)
+#include "qsslsocket_schannel_p.h"
+#endif
#include "qsslconfiguration_p.h"
#include <QtCore/qdebug.h>
@@ -459,6 +465,9 @@ void QSslSocket::connectToHostEncrypted(const QString &hostName, quint16 port, O
return;
}
+ if (!d->verifyProtocolSupported("QSslSocket::connectToHostEncrypted:"))
+ return;
+
d->init();
d->autoStartHandshake = true;
d->initialized = true;
@@ -906,7 +915,8 @@ void QSslSocket::abort()
time without notice.
\sa localCertificate(), peerCertificate(), peerCertificateChain(),
- sessionCipher(), privateKey(), ciphers(), caCertificates()
+ sessionCipher(), privateKey(), QSslConfiguration::ciphers(),
+ QSslConfiguration::caCertificates()
*/
QSslConfiguration QSslSocket::sslConfiguration() const
{
@@ -930,7 +940,8 @@ QSslConfiguration QSslSocket::sslConfiguration() const
It is not possible to set the SSL-state related fields.
- \sa setLocalCertificate(), setPrivateKey(), setCaCertificates(), setCiphers()
+ \sa setLocalCertificate(), setPrivateKey(), QSslConfiguration::setCaCertificates(),
+ QSslConfiguration::setCiphers()
*/
void QSslSocket::setSslConfiguration(const QSslConfiguration &configuration)
{
@@ -952,6 +963,9 @@ void QSslSocket::setSslConfiguration(const QSslConfiguration &configuration)
d->configuration.nextAllowedProtocols = configuration.allowedNextProtocols();
d->configuration.nextNegotiatedProtocol = configuration.nextNegotiatedProtocol();
d->configuration.nextProtocolNegotiationStatus = configuration.nextProtocolNegotiationStatus();
+#if QT_CONFIG(ocsp)
+ d->configuration.ocspStaplingEnabled = configuration.ocspStaplingEnabled();
+#endif
// if the CA certificates were set explicitly (either via
// QSslConfiguration::setCaCertificates() or QSslSocket::setCaCertificates(),
@@ -1113,8 +1127,10 @@ QList<QSslCertificate> QSslSocket::peerCertificateChain() const
session cipher. This ordered list must be in place before the
handshake phase begins.
- \sa ciphers(), setCiphers(), setDefaultCiphers(), defaultCiphers(),
- supportedCiphers()
+ \sa QSslConfiguration::ciphers(), QSslConfiguration::setCiphers(),
+ QSslConfiguration::setDefaultCiphers(),
+ QSslConfiguration::defaultCiphers(),
+ QSslConfiguration::supportedCiphers()
*/
QSslCipher QSslSocket::sessionCipher() const
{
@@ -1136,6 +1152,20 @@ QSsl::SslProtocol QSslSocket::sessionProtocol() const
return d->sessionProtocol();
}
+/*!
+ \since 5.13
+
+ This function returns Online Certificate Status Protocol response that
+ a server may send during a TLS handshake using OCSP stapling. If no
+ definitive or no response was received at all, the response is empty.
+
+ \sa QSslConfiguration::setOcspStaplingEnabled(), QOcspResponse::isNull()
+*/
+QOcspResponse QSslSocket::ocspResponse() const
+{
+ Q_D(const QSslSocket);
+ return d->ocspResponse;
+}
/*!
Sets the socket's private \l {QSslKey} {key} to \a key. The
@@ -1376,7 +1406,8 @@ bool QSslSocket::addCaCertificates(const QString &path, QSsl::EncodingFormat for
To add multiple certificates, use addCaCertificates().
- \sa caCertificates(), setCaCertificates()
+ \sa QSslConfiguration::caCertificates(),
+ QSslConfiguration::setCaCertificates()
*/
void QSslSocket::addCaCertificate(const QSslCertificate &certificate)
{
@@ -1391,7 +1422,7 @@ void QSslSocket::addCaCertificate(const QSslCertificate &certificate)
For more precise control, use addCaCertificate().
- \sa caCertificates(), addDefaultCaCertificate()
+ \sa QSslConfiguration::caCertificates(), addDefaultCaCertificate()
*/
void QSslSocket::addCaCertificates(const QList<QSslCertificate> &certificates)
{
@@ -1454,7 +1485,8 @@ QList<QSslCertificate> QSslSocket::caCertificates() const
Each SSL socket's CA certificate database is initialized to the
default CA certificate database.
- \sa defaultCaCertificates(), addCaCertificates(), addDefaultCaCertificate()
+ \sa QSslConfiguration::defaultCaCertificates(), addCaCertificates(),
+ addDefaultCaCertificate()
*/
bool QSslSocket::addDefaultCaCertificates(const QString &path, QSsl::EncodingFormat encoding,
QRegExp::PatternSyntax syntax)
@@ -1467,7 +1499,7 @@ bool QSslSocket::addDefaultCaCertificates(const QString &path, QSsl::EncodingFor
SSL socket's CA certificate database is initialized to the default
CA certificate database.
- \sa defaultCaCertificates(), addCaCertificates()
+ \sa QSslConfiguration::defaultCaCertificates(), addCaCertificates()
*/
void QSslSocket::addDefaultCaCertificate(const QSslCertificate &certificate)
{
@@ -1479,7 +1511,7 @@ void QSslSocket::addDefaultCaCertificate(const QSslCertificate &certificate)
SSL socket's CA certificate database is initialized to the default
CA certificate database.
- \sa defaultCaCertificates(), addCaCertificates()
+ \sa QSslConfiguration::defaultCaCertificates(), addCaCertificates()
*/
void QSslSocket::addDefaultCaCertificates(const QList<QSslCertificate> &certificates)
{
@@ -1597,6 +1629,8 @@ bool QSslSocket::waitForEncrypted(int msecs)
return false;
if (d->mode == UnencryptedMode && !d->autoStartHandshake)
return false;
+ if (!d->verifyProtocolSupported("QSslSocket::waitForEncrypted:"))
+ return false;
QElapsedTimer stopWatch;
stopWatch.start();
@@ -1846,6 +1880,10 @@ void QSslSocket::startClientEncryption()
d->setErrorAndEmit(QAbstractSocket::SslInternalError, tr("TLS initialization failed"));
return;
}
+
+ if (!d->verifyProtocolSupported("QSslSocket::startClientEncryption:"))
+ return;
+
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << "QSslSocket::startClientEncryption()";
#endif
@@ -1889,6 +1927,9 @@ void QSslSocket::startServerEncryption()
d->setErrorAndEmit(QAbstractSocket::SslInternalError, tr("TLS initialization failed"));
return;
}
+ if (!d->verifyProtocolSupported("QSslSocket::startServerEncryption"))
+ return;
+
d->mode = SslServerMode;
emit modeChanged(d->mode);
d->startServerEncryption();
@@ -1974,6 +2015,7 @@ void QSslSocket::connectToHost(const QString &hostName, quint16 port, OpenMode o
d->createPlainSocket(openMode);
}
#ifndef QT_NO_NETWORKPROXY
+ d->plainSocket->setProtocolTag(d->protocolTag);
d->plainSocket->setProxy(proxy());
#endif
QIODevice::open(openMode);
@@ -2108,6 +2150,7 @@ void QSslSocketPrivate::init()
shutdown = false;
pendingClose = false;
flushTriggered = false;
+ ocspResponse.clear();
// we don't want to clear the ignoreErrorsList, so
// that it is possible setting it before connecting
@@ -2122,6 +2165,20 @@ void QSslSocketPrivate::init()
/*!
\internal
*/
+bool QSslSocketPrivate::verifyProtocolSupported(const char *where)
+{
+ if (configuration.protocol == QSsl::SslV2 || configuration.protocol == QSsl::SslV3) {
+ qCWarning(lcSsl) << where << "Attempted to use an unsupported protocol.";
+ setErrorAndEmit(QAbstractSocket::SslInvalidUserDataError,
+ QSslSocket::tr("Attempted to use an unsupported protocol."));
+ return false;
+ }
+ return true;
+}
+
+/*!
+ \internal
+*/
QList<QSslCipher> QSslSocketPrivate::defaultCiphers()
{
QSslSocketPrivate::ensureInitialized();
@@ -2324,6 +2381,9 @@ void QSslConfigurationPrivate::deepCopyDefaultConfiguration(QSslConfigurationPri
#if QT_CONFIG(dtls)
ptr->dtlsCookieEnabled = global->dtlsCookieEnabled;
#endif
+#if QT_CONFIG(ocsp)
+ ptr->ocspStaplingEnabled = global->ocspStaplingEnabled;
+#endif
}
/*!
@@ -2822,6 +2882,19 @@ QSharedPointer<QSslContext> QSslSocketPrivate::sslContext(QSslSocket *socket)
bool QSslSocketPrivate::isMatchingHostname(const QSslCertificate &cert, const QString &peerName)
{
+ QHostAddress hostAddress(peerName);
+ if (!hostAddress.isNull()) {
+ const auto subjectAlternativeNames = cert.subjectAlternativeNames();
+ const auto ipAddresses = subjectAlternativeNames.equal_range(QSsl::AlternativeNameEntryType::IpAddressEntry);
+
+ for (auto it = ipAddresses.first; it != ipAddresses.second; it++) {
+ if (QHostAddress(*it).isEqual(hostAddress, QHostAddress::StrictConversion))
+ return true;
+ }
+
+ return false;
+ }
+
const QString lowerPeerName = QString::fromLatin1(QUrl::toAce(peerName));
const QStringList commonNames = cert.subjectInfo(QSslCertificate::CommonName);
diff --git a/src/network/ssl/qsslsocket.h b/src/network/ssl/qsslsocket.h
index c66ebdde54..8dfb9f2018 100644
--- a/src/network/ssl/qsslsocket.h
+++ b/src/network/ssl/qsslsocket.h
@@ -60,6 +60,7 @@ class QSslCertificate;
class QSslConfiguration;
class QSslEllipticCurve;
class QSslPreSharedKeyAuthenticator;
+class QOcspResponse;
class QSslSocketPrivate;
class Q_NETWORK_EXPORT QSslSocket : public QTcpSocket
@@ -142,6 +143,7 @@ public:
QList<QSslCertificate> peerCertificateChain() const;
QSslCipher sessionCipher() const;
QSsl::SslProtocol sessionProtocol() const;
+ QOcspResponse ocspResponse() const;
// Private keys, for server sockets.
void setPrivateKey(const QSslKey &key);
@@ -228,7 +230,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_flushWriteBuffer())
Q_PRIVATE_SLOT(d_func(), void _q_flushReadBuffer())
Q_PRIVATE_SLOT(d_func(), void _q_resumeImplementation())
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !QT_CONFIG(schannel)
Q_PRIVATE_SLOT(d_func(), void _q_caRootLoaded(QSslCertificate,QSslCertificate))
#endif
friend class QSslSocketBackendPrivate;
diff --git a/src/network/ssl/qsslsocket_mac.cpp b/src/network/ssl/qsslsocket_mac.cpp
index 65d98758ac..9c3c98e390 100644
--- a/src/network/ssl/qsslsocket_mac.cpp
+++ b/src/network/ssl/qsslsocket_mac.cpp
@@ -89,7 +89,7 @@ struct EphemeralSecKeychain
~EphemeralSecKeychain();
SecKeychainRef keychain = nullptr;
- Q_DISABLE_COPY(EphemeralSecKeychain)
+ Q_DISABLE_COPY_MOVE(EphemeralSecKeychain)
};
EphemeralSecKeychain::EphemeralSecKeychain()
@@ -993,9 +993,6 @@ void QSslSocketBackendPrivate::destroySslContext()
context.reset(nullptr);
}
-static QByteArray _q_makePkcs12(const QList<QSslCertificate> &certs, const QSslKey &key, const QString &passPhrase);
-
-
bool QSslSocketBackendPrivate::setSessionCertificate(QString &errorDescription, QAbstractSocket::SocketError &errorCode)
{
Q_ASSERT_X(context, Q_FUNC_INFO, "invalid SSL context (null)");
@@ -1110,6 +1107,12 @@ bool QSslSocketBackendPrivate::setSessionProtocol()
return false;
}
+ // SslV3 is unsupported.
+ if (configuration.protocol == QSsl::SslV3) {
+ qCDebug(lcSsl) << "protocol QSsl::SslV3 is disabled";
+ return false;
+ }
+
// SecureTransport has kTLSProtocol13 constant and also, kTLSProtocolMaxSupported.
// Calling SSLSetProtocolVersionMax/Min with any of these two constants results
// in errInvalidParam and a failure to set the protocol version. This means
@@ -1124,14 +1127,7 @@ bool QSslSocketBackendPrivate::setSessionProtocol()
OSStatus err = errSecSuccess;
- if (configuration.protocol == QSsl::SslV3) {
- #ifdef QSSLSOCKET_DEBUG
- qCDebug(lcSsl) << plainSocket << "requesting : SSLv3";
- #endif
- err = SSLSetProtocolVersionMin(context, kSSLProtocol3);
- if (err == errSecSuccess)
- err = SSLSetProtocolVersionMax(context, kSSLProtocol3);
- } else if (configuration.protocol == QSsl::TlsV1_0) {
+ if (configuration.protocol == QSsl::TlsV1_0) {
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1.0";
#endif
@@ -1156,17 +1152,16 @@ bool QSslSocketBackendPrivate::setSessionProtocol()
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "requesting : any";
#endif
- // kSSLProtocol3, since kSSLProtocol2 is disabled:
- err = SSLSetProtocolVersionMin(context, kSSLProtocol3);
+ err = SSLSetProtocolVersionMin(context, kTLSProtocol1);
if (err == errSecSuccess)
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
} else if (configuration.protocol == QSsl::TlsV1SslV3) {
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "requesting : SSLv3 - TLSv1.2";
#endif
- err = SSLSetProtocolVersionMin(context, kSSLProtocol3);
+ err = SSLSetProtocolVersionMin(context, kTLSProtocol1);
if (err == errSecSuccess)
- err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
+ err = SSLSetProtocolVersionMax(context, kTLSProtocol1);
} else if (configuration.protocol == QSsl::SecureProtocols) {
#ifdef QSSLSOCKET_DEBUG
qCDebug(lcSsl) << plainSocket << "requesting : TLSv1 - TLSv1.2";
@@ -1220,7 +1215,7 @@ bool QSslSocketBackendPrivate::verifySessionProtocol() const
if (configuration.protocol == QSsl::AnyProtocol)
protocolOk = true;
else if (configuration.protocol == QSsl::TlsV1SslV3)
- protocolOk = (sessionProtocol() >= QSsl::SslV3);
+ protocolOk = (sessionProtocol() == QSsl::TlsV1_0);
else if (configuration.protocol == QSsl::SecureProtocols)
protocolOk = (sessionProtocol() >= QSsl::TlsV1_0);
else if (configuration.protocol == QSsl::TlsV1_0OrLater)
@@ -1511,264 +1506,4 @@ bool QSslSocketBackendPrivate::startHandshake()
}
}
-/*
- PKCS12 helpers.
-*/
-
-static QAsn1Element wrap(quint8 type, const QAsn1Element &child)
-{
- QByteArray value;
- QDataStream stream(&value, QIODevice::WriteOnly);
- child.write(stream);
- return QAsn1Element(type, value);
-}
-
-static QAsn1Element _q_PKCS7_data(const QByteArray &data)
-{
- QVector<QAsn1Element> items;
- items << QAsn1Element::fromObjectId("1.2.840.113549.1.7.1");
- items << wrap(QAsn1Element::Context0Type,
- QAsn1Element(QAsn1Element::OctetStringType, data));
- return QAsn1Element::fromVector(items);
-}
-
-/*!
- PKCS #12 key derivation.
-
- Some test vectors:
- http://www.drh-consultancy.demon.co.uk/test.txt
-*/
-static QByteArray _q_PKCS12_keygen(char id, const QByteArray &salt, const QString &passPhrase, int n, int r)
-{
- const int u = 20;
- const int v = 64;
-
- // password formatting
- QByteArray passUnicode(passPhrase.size() * 2 + 2, '\0');
- char *p = passUnicode.data();
- for (int i = 0; i < passPhrase.size(); ++i) {
- quint16 ch = passPhrase[i].unicode();
- *(p++) = (ch & 0xff00) >> 8;
- *(p++) = (ch & 0xff);
- }
-
- // prepare I
- QByteArray D(64, id);
- QByteArray S, P;
- const int sSize = v * ((salt.size() + v - 1) / v);
- S.resize(sSize);
- for (int i = 0; i < sSize; ++i) {
- S[i] = salt[i % salt.size()];
- }
- const int pSize = v * ((passUnicode.size() + v - 1) / v);
- P.resize(pSize);
- for (int i = 0; i < pSize; ++i) {
- P[i] = passUnicode[i % passUnicode.size()];
- }
- QByteArray I = S + P;
-
- // apply hashing
- const int c = (n + u - 1) / u;
- QByteArray A;
- QByteArray B;
- B.resize(v);
- QCryptographicHash hash(QCryptographicHash::Sha1);
- for (int i = 0; i < c; ++i) {
- // hash r iterations
- QByteArray Ai = D + I;
- for (int j = 0; j < r; ++j) {
- hash.reset();
- hash.addData(Ai);
- Ai = hash.result();
- }
-
- for (int j = 0; j < v; ++j) {
- B[j] = Ai[j % u];
- }
-
- // modify I as Ij = (Ij + B + 1) modulo 2^v
- for (int p = 0; p < I.size(); p += v) {
- quint8 carry = 1;
- for (int j = v - 1; j >= 0; --j) {
- quint16 v = quint8(I[p+j]) + quint8(B[j]) + carry;
- I[p+j] = v & 0xff;
- carry = (v & 0xff00) >> 8;
- }
- }
- A += Ai;
- }
- return A.left(n);
-}
-
-static QByteArray _q_PKCS12_salt()
-{
- QByteArray salt;
- salt.resize(8);
- for (int i = 0; i < salt.size(); ++i) {
- salt[i] = (qrand() & 0xff);
- }
- return salt;
-}
-
-static QByteArray _q_PKCS12_certBag(const QSslCertificate &cert)
-{
- QVector<QAsn1Element> items;
- items << QAsn1Element::fromObjectId("1.2.840.113549.1.12.10.1.3");
-
- // certificate
- QVector<QAsn1Element> certItems;
- certItems << QAsn1Element::fromObjectId("1.2.840.113549.1.9.22.1");
- certItems << wrap(QAsn1Element::Context0Type,
- QAsn1Element(QAsn1Element::OctetStringType, cert.toDer()));
- items << wrap(QAsn1Element::Context0Type,
- QAsn1Element::fromVector(certItems));
-
- // local key id
- const QByteArray localKeyId = cert.digest(QCryptographicHash::Sha1);
- QVector<QAsn1Element> idItems;
- idItems << QAsn1Element::fromObjectId("1.2.840.113549.1.9.21");
- idItems << wrap(QAsn1Element::SetType,
- QAsn1Element(QAsn1Element::OctetStringType, localKeyId));
- items << wrap(QAsn1Element::SetType, QAsn1Element::fromVector(idItems));
-
- // dump
- QAsn1Element root = wrap(QAsn1Element::SequenceType, QAsn1Element::fromVector(items));
- QByteArray ba;
- QDataStream stream(&ba, QIODevice::WriteOnly);
- root.write(stream);
- return ba;
-}
-
-static QAsn1Element _q_PKCS12_key(const QSslKey &key)
-{
- Q_ASSERT(key.algorithm() == QSsl::Rsa || key.algorithm() == QSsl::Dsa);
-
- QVector<QAsn1Element> keyItems;
- keyItems << QAsn1Element::fromInteger(0);
- QVector<QAsn1Element> algoItems;
- if (key.algorithm() == QSsl::Rsa)
- algoItems << QAsn1Element::fromObjectId(RSA_ENCRYPTION_OID);
- else if (key.algorithm() == QSsl::Dsa)
- algoItems << QAsn1Element::fromObjectId(DSA_ENCRYPTION_OID);
- algoItems << QAsn1Element(QAsn1Element::NullType);
- keyItems << QAsn1Element::fromVector(algoItems);
- keyItems << QAsn1Element(QAsn1Element::OctetStringType, key.toDer());
- return QAsn1Element::fromVector(keyItems);
-}
-
-static QByteArray _q_PKCS12_shroudedKeyBag(const QSslKey &key, const QString &passPhrase, const QByteArray &localKeyId)
-{
- const int iterations = 2048;
- QByteArray salt = _q_PKCS12_salt();
- QByteArray cKey = _q_PKCS12_keygen(1, salt, passPhrase, 24, iterations);
- QByteArray cIv = _q_PKCS12_keygen(2, salt, passPhrase, 8, iterations);
-
- // prepare and encrypt data
- QByteArray plain;
- QDataStream plainStream(&plain, QIODevice::WriteOnly);
- _q_PKCS12_key(key).write(plainStream);
- QByteArray crypted = QSslKeyPrivate::encrypt(QSslKeyPrivate::DesEde3Cbc,
- plain, cKey, cIv);
-
- QVector<QAsn1Element> items;
- items << QAsn1Element::fromObjectId("1.2.840.113549.1.12.10.1.2");
-
- // key
- QVector<QAsn1Element> keyItems;
- QVector<QAsn1Element> algoItems;
- algoItems << QAsn1Element::fromObjectId("1.2.840.113549.1.12.1.3");
- QVector<QAsn1Element> paramItems;
- paramItems << QAsn1Element(QAsn1Element::OctetStringType, salt);
- paramItems << QAsn1Element::fromInteger(iterations);
- algoItems << QAsn1Element::fromVector(paramItems);
- keyItems << QAsn1Element::fromVector(algoItems);
- keyItems << QAsn1Element(QAsn1Element::OctetStringType, crypted);
- items << wrap(QAsn1Element::Context0Type,
- QAsn1Element::fromVector(keyItems));
-
- // local key id
- QVector<QAsn1Element> idItems;
- idItems << QAsn1Element::fromObjectId("1.2.840.113549.1.9.21");
- idItems << wrap(QAsn1Element::SetType,
- QAsn1Element(QAsn1Element::OctetStringType, localKeyId));
- items << wrap(QAsn1Element::SetType,
- QAsn1Element::fromVector(idItems));
-
- // dump
- QAsn1Element root = wrap(QAsn1Element::SequenceType, QAsn1Element::fromVector(items));
- QByteArray ba;
- QDataStream stream(&ba, QIODevice::WriteOnly);
- root.write(stream);
- return ba;
-}
-
-static QByteArray _q_PKCS12_bag(const QList<QSslCertificate> &certs, const QSslKey &key, const QString &passPhrase)
-{
- QVector<QAsn1Element> items;
-
- // certs
- for (int i = 0; i < certs.size(); ++i)
- items << _q_PKCS7_data(_q_PKCS12_certBag(certs[i]));
-
- // key
- const QByteArray localKeyId = certs.first().digest(QCryptographicHash::Sha1);
- items << _q_PKCS7_data(_q_PKCS12_shroudedKeyBag(key, passPhrase, localKeyId));
-
- // dump
- QAsn1Element root = QAsn1Element::fromVector(items);
- QByteArray ba;
- QDataStream stream(&ba, QIODevice::WriteOnly);
- root.write(stream);
- return ba;
-}
-
-static QAsn1Element _q_PKCS12_mac(const QByteArray &data, const QString &passPhrase)
-{
- const int iterations = 2048;
-
- // salt generation
- QByteArray macSalt = _q_PKCS12_salt();
- QByteArray key = _q_PKCS12_keygen(3, macSalt, passPhrase, 20, iterations);
-
- // HMAC calculation
- QMessageAuthenticationCode hmac(QCryptographicHash::Sha1, key);
- hmac.addData(data);
-
- QVector<QAsn1Element> algoItems;
- algoItems << QAsn1Element::fromObjectId("1.3.14.3.2.26");
- algoItems << QAsn1Element(QAsn1Element::NullType);
-
- QVector<QAsn1Element> digestItems;
- digestItems << QAsn1Element::fromVector(algoItems);
- digestItems << QAsn1Element(QAsn1Element::OctetStringType, hmac.result());
-
- QVector<QAsn1Element> macItems;
- macItems << QAsn1Element::fromVector(digestItems);
- macItems << QAsn1Element(QAsn1Element::OctetStringType, macSalt);
- macItems << QAsn1Element::fromInteger(iterations);
- return QAsn1Element::fromVector(macItems);
-}
-
-QByteArray _q_makePkcs12(const QList<QSslCertificate> &certs, const QSslKey &key, const QString &passPhrase)
-{
- QVector<QAsn1Element> items;
-
- // version
- items << QAsn1Element::fromInteger(3);
-
- // auth safe
- const QByteArray data = _q_PKCS12_bag(certs, key, passPhrase);
- items << _q_PKCS7_data(data);
-
- // HMAC
- items << _q_PKCS12_mac(data, passPhrase);
-
- // dump
- QAsn1Element root = QAsn1Element::fromVector(items);
- QByteArray ba;
- QDataStream stream(&ba, QIODevice::WriteOnly);
- root.write(stream);
- return ba;
-}
-
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslsocket_mac_p.h b/src/network/ssl/qsslsocket_mac_p.h
index e37171e56a..48aca964a1 100644
--- a/src/network/ssl/qsslsocket_mac_p.h
+++ b/src/network/ssl/qsslsocket_mac_p.h
@@ -75,7 +75,7 @@ public:
private:
SSLContextRef context;
- Q_DISABLE_COPY(QSecureTransportContext)
+ Q_DISABLE_COPY_MOVE(QSecureTransportContext)
};
class QSslSocketBackendPrivate : public QSslSocketPrivate
@@ -129,7 +129,7 @@ private:
QSecureTransportContext context;
bool renegotiating = false;
- Q_DISABLE_COPY(QSslSocketBackendPrivate)
+ Q_DISABLE_COPY_MOVE(QSslSocketBackendPrivate)
};
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 2c6c35ef24..a7c681920e 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -65,6 +65,7 @@
#include "qsslellipticcurve.h"
#include "qsslpresharedkeyauthenticator.h"
#include "qsslpresharedkeyauthenticator_p.h"
+#include "qocspresponse_p.h"
#ifdef Q_OS_WIN
#include "qwindowscarootfetcher_p.h"
@@ -83,16 +84,16 @@
#include <QtCore/qvarlengtharray.h>
#include <QtCore/qscopedvaluerollback.h>
+#if QT_CONFIG(ocsp)
+#include <openssl/ocsp.h>
+#endif
+
+#include <algorithm>
+
#include <string.h>
QT_BEGIN_NAMESPACE
-#if defined(Q_OS_WIN)
- PtrCertOpenSystemStoreW QSslSocketPrivate::ptrCertOpenSystemStoreW = nullptr;
- PtrCertFindCertificateInStore QSslSocketPrivate::ptrCertFindCertificateInStore = nullptr;
- PtrCertCloseStore QSslSocketPrivate::ptrCertCloseStore = nullptr;
-#endif
-
bool QSslSocketPrivate::s_libraryLoaded = false;
bool QSslSocketPrivate::s_loadedCiphersAndCerts = false;
bool QSslSocketPrivate::s_loadRootCertsOnDemand = false;
@@ -137,6 +138,37 @@ static unsigned int q_ssl_psk_server_callback(SSL *ssl,
return d->tlsPskServerCallback(identity, psk, max_psk_len);
}
#endif
+
+#if QT_CONFIG(ocsp)
+
+int qt_OCSP_status_server_callback(SSL *ssl, void *ocspRequest)
+{
+ Q_UNUSED(ocspRequest)
+ if (!ssl)
+ return SSL_TLSEXT_ERR_ALERT_FATAL;
+
+ auto d = static_cast<QSslSocketBackendPrivate *>(q_SSL_get_ex_data(ssl, QSslSocketBackendPrivate::s_indexForSSLExtraData));
+ if (!d)
+ return SSL_TLSEXT_ERR_ALERT_FATAL;
+
+ Q_ASSERT(d->mode == QSslSocket::SslServerMode);
+ const QByteArray &response = d->ocspResponseDer;
+ Q_ASSERT(response.size());
+
+ unsigned char *derCopy = static_cast<unsigned char *>(q_OPENSSL_malloc(size_t(response.size())));
+ if (!derCopy)
+ return SSL_TLSEXT_ERR_ALERT_FATAL;
+
+ std::copy(response.data(), response.data() + response.size(), derCopy);
+ // We don't check the return value: internally OpenSSL simply assignes the
+ // pointer (it assumes it now owns this memory btw!) and the length.
+ q_SSL_set_tlsext_status_ocsp_resp(ssl, derCopy, response.size());
+
+ return SSL_TLSEXT_ERR_OK;
+}
+
+#endif // ocsp
+
} // extern "C"
QSslSocketBackendPrivate::QSslSocketBackendPrivate()
@@ -204,8 +236,120 @@ QSslErrorEntry QSslErrorEntry::fromStoreContext(X509_STORE_CTX *ctx)
};
}
+#if QT_CONFIG(ocsp)
+
+QSslError qt_OCSP_response_status_to_QSslError(long code)
+{
+ switch (code) {
+ case OCSP_RESPONSE_STATUS_MALFORMEDREQUEST:
+ return QSslError::OcspMalformedRequest;
+ case OCSP_RESPONSE_STATUS_INTERNALERROR:
+ return QSslError::OcspInternalError;
+ case OCSP_RESPONSE_STATUS_TRYLATER:
+ return QSslError::OcspTryLater;
+ case OCSP_RESPONSE_STATUS_SIGREQUIRED:
+ return QSslError::OcspSigRequred;
+ case OCSP_RESPONSE_STATUS_UNAUTHORIZED:
+ return QSslError::OcspUnauthorized;
+ case OCSP_RESPONSE_STATUS_SUCCESSFUL:
+ default:
+ return {};
+ }
+ Q_UNREACHABLE();
+}
+
+OcspRevocationReason qt_OCSP_revocation_reason(int reason)
+{
+ switch (reason) {
+ case OCSP_REVOKED_STATUS_NOSTATUS:
+ return OcspRevocationReason::None;
+ case OCSP_REVOKED_STATUS_UNSPECIFIED:
+ return OcspRevocationReason::Unspecified;
+ case OCSP_REVOKED_STATUS_KEYCOMPROMISE:
+ return OcspRevocationReason::KeyCompromise;
+ case OCSP_REVOKED_STATUS_CACOMPROMISE:
+ return OcspRevocationReason::CACompromise;
+ case OCSP_REVOKED_STATUS_AFFILIATIONCHANGED:
+ return OcspRevocationReason::AffiliationChanged;
+ case OCSP_REVOKED_STATUS_SUPERSEDED:
+ return OcspRevocationReason::Superseded;
+ case OCSP_REVOKED_STATUS_CESSATIONOFOPERATION:
+ return OcspRevocationReason::CessationOfOperation;
+ case OCSP_REVOKED_STATUS_CERTIFICATEHOLD:
+ return OcspRevocationReason::CertificateHold;
+ case OCSP_REVOKED_STATUS_REMOVEFROMCRL:
+ return OcspRevocationReason::RemoveFromCRL;
+ default:
+ return OcspRevocationReason::None;
+ }
+
+ Q_UNREACHABLE();
+}
+
+bool qt_OCSP_certificate_match(OCSP_SINGLERESP *singleResponse, X509 *peerCert, X509 *issuer)
+{
+ // OCSP_basic_verify does verify that the responder is legit, the response is
+ // correctly signed, CertID is correct. But it does not know which certificate
+ // we were presented with by our peer, so it does not check if it's a response
+ // for our peer's certificate.
+ Q_ASSERT(singleResponse && peerCert && issuer);
+
+ const OCSP_CERTID *certId = q_OCSP_SINGLERESP_get0_id(singleResponse); // Does not increment refcount.
+ if (!certId) {
+ qCWarning(lcSsl, "A SingleResponse without CertID");
+ return false;
+ }
+
+ ASN1_OBJECT *md = nullptr;
+ ASN1_INTEGER *reportedSerialNumber = nullptr;
+ const int result = q_OCSP_id_get0_info(nullptr, &md, nullptr, &reportedSerialNumber, const_cast<OCSP_CERTID *>(certId));
+ if (result != 1 || !md || !reportedSerialNumber) {
+ qCWarning(lcSsl, "Failed to extract a hash and serial number from CertID structure");
+ return false;
+ }
+
+ if (!q_X509_get_serialNumber(peerCert)) {
+ // Is this possible at all? But we have to check this,
+ // ASN1_INTEGER_cmp (called from OCSP_id_cmp) dereferences
+ // without any checks at all.
+ qCWarning(lcSsl, "No serial number in peer's ceritificate");
+ return false;
+ }
+
+ const int nid = q_OBJ_obj2nid(md);
+ if (nid == NID_undef) {
+ qCWarning(lcSsl, "Unknown hash algorithm in CertID");
+ return false;
+ }
+
+ const EVP_MD *digest = q_EVP_get_digestbynid(nid); // Does not increment refcount.
+ if (!digest) {
+ qCWarning(lcSsl) << "No digest for nid" << nid;
+ return false;
+ }
+
+ OCSP_CERTID *recreatedId = q_OCSP_cert_to_id(digest, peerCert, issuer);
+ if (!recreatedId) {
+ qCWarning(lcSsl, "Failed to re-create CertID");
+ return false;
+ }
+ const QSharedPointer<OCSP_CERTID> guard(recreatedId, q_OCSP_CERTID_free);
+
+ if (q_OCSP_id_cmp(const_cast<OCSP_CERTID *>(certId), recreatedId)) {
+ qDebug(lcSsl, "Certificate ID mismatch");
+ return false;
+ }
+ // Bingo!
+ return true;
+}
+
+#endif // ocsp
+
// ### This list is shared between all threads, and protected by a
-// mutex. Investigate using thread local storage instead.
+// mutex. Investigate using thread local storage instead. Or better properly
+// use OpenSSL's ability to attach application data to an SSL/SSL_CTX
+// and extract it in a callback. See how it's done, for example, in PSK
+// callback or in DTLS verification callback.
struct QSslErrorList
{
QMutex mutex;
@@ -280,7 +424,7 @@ long QSslSocketBackendPrivate::setupOpenSslOptions(QSsl::SslProtocol protocol, Q
{
long options;
if (protocol == QSsl::TlsV1SslV3)
- options = SSL_OP_ALL|SSL_OP_NO_SSLv2;
+ options = SSL_OP_ALL|SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3;
else if (protocol == QSsl::SecureProtocols)
options = SSL_OP_ALL|SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3;
else if (protocol == QSsl::TlsV1_0OrLater)
@@ -357,7 +501,7 @@ bool QSslSocketBackendPrivate::initSslContext()
if (configuration.protocol != QSsl::SslV2 &&
configuration.protocol != QSsl::SslV3 &&
configuration.protocol != QSsl::UnknownProtocol &&
- mode == QSslSocket::SslClientMode && QSslSocket::sslLibraryVersionNumber() >= 0x00090806fL) {
+ mode == QSslSocket::SslClientMode) {
// Set server hostname on TLS extension. RFC4366 section 3.1 requires it in ACE format.
QString tlsHostName = verificationPeerName.isEmpty() ? q->peerName() : verificationPeerName;
if (tlsHostName.isEmpty())
@@ -412,6 +556,40 @@ bool QSslSocketBackendPrivate::initSslContext()
}
#endif
+#if QT_CONFIG(ocsp)
+ if (configuration.ocspStaplingEnabled) {
+ if (mode == QSslSocket::SslServerMode) {
+ setErrorAndEmit(QAbstractSocket::SslInvalidUserDataError,
+ QSslSocket::tr("Server-side QSslSocket does not support OCSP stapling"));
+ return false;
+ }
+ if (q_SSL_set_tlsext_status_type(ssl, TLSEXT_STATUSTYPE_ocsp) != 1) {
+ setErrorAndEmit(QAbstractSocket::SslInternalError,
+ QSslSocket::tr("Failed to enable OCSP stapling"));
+ return false;
+ }
+ }
+
+ ocspResponseDer.clear();
+ auto responsePos = configuration.backendConfig.find("Qt-OCSP-response");
+ if (responsePos != configuration.backendConfig.end()) {
+ // This is our private, undocumented 'API' we use for the auto-testing of
+ // OCSP-stapling. It must be a der-encoded OCSP response, presumably set
+ // by tst_QOcsp.
+ const QVariant data(responsePos.value());
+ if (data.canConvert<QByteArray>())
+ ocspResponseDer = data.toByteArray();
+ }
+
+ if (ocspResponseDer.size()) {
+ if (mode != QSslSocket::SslServerMode) {
+ setErrorAndEmit(QAbstractSocket::SslInvalidUserDataError,
+ QSslSocket::tr("Client-side sockets do not send OCSP responses"));
+ return false;
+ }
+ }
+#endif // ocsp
+
return true;
}
@@ -548,22 +726,20 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
#endif
QList<QSslCertificate> systemCerts;
#if defined(Q_OS_WIN)
- if (ptrCertOpenSystemStoreW && ptrCertFindCertificateInStore && ptrCertCloseStore) {
- HCERTSTORE hSystemStore;
- hSystemStore = ptrCertOpenSystemStoreW(0, L"ROOT");
- if (hSystemStore) {
- PCCERT_CONTEXT pc = nullptr;
- while (1) {
- pc = ptrCertFindCertificateInStore(hSystemStore, X509_ASN_ENCODING, 0, CERT_FIND_ANY, nullptr, pc);
- if (!pc)
- break;
- QByteArray der(reinterpret_cast<const char *>(pc->pbCertEncoded),
- static_cast<int>(pc->cbCertEncoded));
- QSslCertificate cert(der, QSsl::Der);
- systemCerts.append(cert);
- }
- ptrCertCloseStore(hSystemStore, 0);
+ HCERTSTORE hSystemStore;
+ hSystemStore = CertOpenSystemStoreW(0, L"ROOT");
+ if (hSystemStore) {
+ PCCERT_CONTEXT pc = nullptr;
+ while (1) {
+ pc = CertFindCertificateInStore(hSystemStore, X509_ASN_ENCODING, 0, CERT_FIND_ANY, nullptr, pc);
+ if (!pc)
+ break;
+ QByteArray der(reinterpret_cast<const char *>(pc->pbCertEncoded),
+ static_cast<int>(pc->cbCertEncoded));
+ QSslCertificate cert(der, QSsl::Der);
+ systemCerts.append(cert);
}
+ CertCloseStore(hSystemStore, 0);
}
#elif defined(Q_OS_UNIX)
QSet<QString> certFiles;
@@ -1001,9 +1177,33 @@ bool QSslSocketBackendPrivate::startHandshake()
}
}
- bool doVerifyPeer = configuration.peerVerifyMode == QSslSocket::VerifyPeer
- || (configuration.peerVerifyMode == QSslSocket::AutoVerifyPeer
- && mode == QSslSocket::SslClientMode);
+ const bool doVerifyPeer = configuration.peerVerifyMode == QSslSocket::VerifyPeer
+ || (configuration.peerVerifyMode == QSslSocket::AutoVerifyPeer
+ && mode == QSslSocket::SslClientMode);
+
+#if QT_CONFIG(ocsp)
+ // For now it's always QSslSocket::SslClientMode - initSslContext() will bail out early,
+ // if it's enabled in QSslSocket::SslServerMode. This can change.
+ if (!configuration.peerCertificate.isNull() && configuration.ocspStaplingEnabled && doVerifyPeer) {
+ if (!checkOcspStatus()) {
+ if (ocspErrors.isEmpty()) {
+ {
+ const ScopedBool bg(inSetAndEmitError, true);
+ setErrorAndEmit(QAbstractSocket::SslHandshakeFailedError, ocspErrorDescription);
+ }
+ q->abort();
+ return false;
+ }
+
+ for (const QSslError &error : ocspErrors) {
+ errors << error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+ }
+ }
+#endif // ocsp
// Check the peer certificate itself. First try the subject's common name
// (CN) as a wildcard, then try all alternate subject name DNS entries the
@@ -1250,6 +1450,193 @@ void QSslSocketBackendPrivate::_q_caRootLoaded(QSslCertificate cert, QSslCertifi
#endif
+#if QT_CONFIG(ocsp)
+
+bool QSslSocketBackendPrivate::checkOcspStatus()
+{
+ Q_ASSERT(ssl);
+ Q_ASSERT(mode == QSslSocket::SslClientMode); // See initSslContext() for SslServerMode
+ Q_ASSERT(configuration.peerVerifyMode != QSslSocket::VerifyNone);
+
+ ocspResponse.clear();
+ QOcspResponsePrivate *dResponse = ocspResponse.d.data();
+
+ ocspErrorDescription.clear();
+ ocspErrors.clear();
+
+ const unsigned char *responseData = nullptr;
+ const long responseLength = q_SSL_get_tlsext_status_ocsp_resp(ssl, &responseData);
+ if (responseLength <= 0 || !responseData) {
+ ocspErrors.push_back(QSslError::OcspNoResponseFound);
+ return false;
+ }
+
+ OCSP_RESPONSE *response = q_d2i_OCSP_RESPONSE(nullptr, &responseData, responseLength);
+ if (!response) {
+ // Treat this as a fatal SslHandshakeError.
+ ocspErrorDescription = QSslSocket::tr("Failed to decode OCSP response");
+ return false;
+ }
+ const QSharedPointer<OCSP_RESPONSE> responseGuard(response, q_OCSP_RESPONSE_free);
+
+ const int ocspStatus = q_OCSP_response_status(response);
+ if (ocspStatus != OCSP_RESPONSE_STATUS_SUCCESSFUL) {
+ // It's not a definitive response, it's an error message (not signed by the responder).
+ ocspErrors.push_back(qt_OCSP_response_status_to_QSslError(ocspStatus));
+ return false;
+ }
+
+ OCSP_BASICRESP *basicResponse = q_OCSP_response_get1_basic(response);
+ if (!basicResponse) {
+ // SslHandshakeError.
+ ocspErrorDescription = QSslSocket::tr("Failed to extract basic OCSP response");
+ return false;
+ }
+ const QSharedPointer<OCSP_BASICRESP> basicResponseGuard(basicResponse, q_OCSP_BASICRESP_free);
+
+ SSL_CTX *ctx = q_SSL_get_SSL_CTX(ssl); // Does not increment refcount.
+ Q_ASSERT(ctx);
+ X509_STORE *store = q_SSL_CTX_get_cert_store(ctx); // Does not increment refcount.
+ if (!store) {
+ // SslHandshakeError.
+ ocspErrorDescription = QSslSocket::tr("No certificate verification store, cannot verify OCSP response");
+ return false;
+ }
+
+ STACK_OF(X509) *peerChain = q_SSL_get_peer_cert_chain(ssl); // Does not increment refcount.
+ X509 *peerX509 = q_SSL_get_peer_certificate(ssl);
+ Q_ASSERT(peerChain || peerX509);
+ const QSharedPointer<X509> peerX509Guard(peerX509, q_X509_free);
+ // OCSP_basic_verify with 0 as verificationFlags:
+ //
+ // 0) Tries to find the OCSP responder's certificate in either peerChain
+ // or basicResponse->certs. If not found, verification fails.
+ // 1) It checks the signature using the responder's public key.
+ // 2) Then it tries to validate the responder's cert (building a chain
+ // etc.)
+ // 3) It checks CertID in response.
+ // 4) Ensures the responder is authorized to sign the status respond.
+ //
+ // Here it's important to notice that it calls X509_cert_verify and
+ // as a result, possibly, our verification callback. Given this callback
+ // at the moment uses a global variable, we have to lock. This will change
+ // as soon as we fix our verification procedure.
+ // Also note, OpenSSL prior to 1.0.2b would only use bs->certs to
+ // verify the responder's chain (see their commit 4ba9a4265bd).
+ // Working this around - is too much fuss for ancient versions we
+ // are dropping quite soon anyway.
+ {
+ const unsigned long verificationFlags = 0;
+ const QMutexLocker locker(&_q_sslErrorList()->mutex);
+ // Before unlocking the mutex, startHandshake() stores errors (found in SSL_connect()
+ // or SSL_accept()) into the local variable, so it's safe to clear it here - as soon
+ // as we managed to lock, whoever had the lock before, already stored their own copy
+ // of errors.
+ _q_sslErrorList()->errors.clear();
+ const int success = q_OCSP_basic_verify(basicResponse, peerChain, store, verificationFlags);
+ if (success <= 0 || _q_sslErrorList()->errors.size()) {
+ _q_sslErrorList()->errors.clear();
+ ocspErrors.push_back(QSslError::OcspResponseCannotBeTrusted);
+ }
+ }
+
+ if (q_OCSP_resp_count(basicResponse) != 1) {
+ ocspErrors.push_back(QSslError::OcspMalformedResponse);
+ return false;
+ }
+
+ OCSP_SINGLERESP *singleResponse = q_OCSP_resp_get0(basicResponse, 0);
+ if (!singleResponse) {
+ ocspErrors.clear();
+ // A fatal problem -> SslHandshakeError.
+ ocspErrorDescription = QSslSocket::tr("Failed to decode a SingleResponse from OCSP status response");
+ return false;
+ }
+
+ // Let's make sure the response is for the correct certificate - we
+ // can re-create this CertID using our peer's certificate and its
+ // issuer's public key.
+ dResponse->isNull = false;
+ bool matchFound = false;
+ if (configuration.peerCertificate.isSelfSigned()) {
+ dResponse->signerCert = configuration.peerCertificate;
+ matchFound = qt_OCSP_certificate_match(singleResponse, peerX509, peerX509);
+ } else {
+ const STACK_OF(X509) *certs = q_SSL_get_peer_cert_chain(ssl);
+ if (!certs) // Oh, what a cataclysm! Last try:
+ certs = q_OCSP_resp_get0_certs(basicResponse);
+ if (certs) {
+ // It could be the first certificate in 'certs' is our peer's
+ // certificate. Since it was not captured by the 'self-signed' branch
+ // above, the CertID will not match and we'll just iterate on to the
+ // next certificate. So we start from 0, not 1.
+ for (int i = 0, e = q_sk_X509_num(certs); i < e; ++i) {
+ X509 *issuer = q_sk_X509_value(certs, i);
+ matchFound = qt_OCSP_certificate_match(singleResponse, peerX509, issuer);
+ if (matchFound) {
+ if (q_X509_check_issued(issuer, peerX509) == X509_V_OK) {
+ dResponse->signerCert = QSslCertificatePrivate::QSslCertificate_from_X509(issuer);
+ break;
+ }
+ matchFound = false;
+ }
+ }
+ }
+ }
+
+ if (!matchFound) {
+ dResponse->signerCert.clear();
+ ocspErrors.push_back({QSslError::OcspResponseCertIdUnknown, configuration.peerCertificate});
+ }
+
+ // Check if the response is valid time-wise:
+ ASN1_GENERALIZEDTIME *revTime = nullptr;
+ ASN1_GENERALIZEDTIME *thisUpdate = nullptr;
+ ASN1_GENERALIZEDTIME *nextUpdate = nullptr;
+ int reason;
+ const int certStatus = q_OCSP_single_get0_status(singleResponse, &reason, &revTime, &thisUpdate, &nextUpdate);
+ if (!thisUpdate) {
+ // This is unexpected, treat as SslHandshakeError, OCSP_check_validity assumes this pointer
+ // to be != nullptr.
+ ocspErrors.clear();
+ ocspResponse.clear();
+ ocspErrorDescription = QSslSocket::tr("Failed to extract 'this update time' from the SingleResponse");
+ return false;
+ }
+
+ // OCSP_check_validity(this, next, nsec, maxsec) does this check:
+ // this <= now <= next. They allow some freedom to account
+ // for delays/time inaccuracy.
+ // this > now + nsec ? -> NOT_YET_VALID
+ // if maxsec >= 0:
+ // now - maxsec > this ? -> TOO_OLD
+ // now - nsec > next ? -> EXPIRED
+ // next < this ? -> NEXT_BEFORE_THIS
+ // OK.
+ if (!q_OCSP_check_validity(thisUpdate, nextUpdate, 60, -1))
+ ocspErrors.push_back({QSslError::OcspResponseExpired, configuration.peerCertificate});
+
+ // And finally, the status:
+ switch (certStatus) {
+ case V_OCSP_CERTSTATUS_GOOD:
+ // This certificate was not found among the revoked ones.
+ dResponse->certificateStatus = OcspCertificateStatus::Good;
+ break;
+ case V_OCSP_CERTSTATUS_REVOKED:
+ dResponse->certificateStatus = OcspCertificateStatus::Revoked;
+ dResponse->revocationReason = qt_OCSP_revocation_reason(reason);
+ ocspErrors.push_back({QSslError::CertificateRevoked, configuration.peerCertificate});
+ break;
+ case V_OCSP_CERTSTATUS_UNKNOWN:
+ dResponse->certificateStatus = OcspCertificateStatus::Unknown;
+ ocspErrors.push_back({QSslError::OcspStatusUnknown, configuration.peerCertificate});
+ }
+
+ return !ocspErrors.size();
+}
+
+#endif // ocsp
+
void QSslSocketBackendPrivate::disconnectFromHost()
{
if (ssl) {
diff --git a/src/network/ssl/qsslsocket_openssl11.cpp b/src/network/ssl/qsslsocket_openssl11.cpp
index 2a2667bd48..b60b8be41f 100644
--- a/src/network/ssl/qsslsocket_openssl11.cpp
+++ b/src/network/ssl/qsslsocket_openssl11.cpp
@@ -122,21 +122,7 @@ void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
#if QT_CONFIG(library)
//load symbols needed to receive certificates from system store
-#if defined(Q_OS_WIN)
- HINSTANCE hLib = LoadLibraryW(L"Crypt32");
- if (hLib) {
- ptrCertOpenSystemStoreW = reinterpret_cast<PtrCertOpenSystemStoreW>(
- reinterpret_cast<QFunctionPointer>(GetProcAddress(hLib, "CertOpenSystemStoreW")));
- ptrCertFindCertificateInStore = reinterpret_cast<PtrCertFindCertificateInStore>(
- reinterpret_cast<QFunctionPointer>(GetProcAddress(hLib, "CertFindCertificateInStore")));
- ptrCertCloseStore = reinterpret_cast<PtrCertCloseStore>(
- reinterpret_cast<QFunctionPointer>(GetProcAddress(hLib, "CertCloseStore")));
- if (!ptrCertOpenSystemStoreW || !ptrCertFindCertificateInStore || !ptrCertCloseStore)
- qCWarning(lcSsl, "could not resolve symbols in crypt32 library"); // should never happen
- } else {
- qCWarning(lcSsl, "could not load crypt32 library"); // should never happen
- }
-#elif defined(Q_OS_QNX)
+#if defined(Q_OS_QNX)
s_loadRootCertsOnDemand = true;
#elif defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN)
// check whether we can enable on-demand root-cert loading (i.e. check whether the sym links are there)
diff --git a/src/network/ssl/qsslsocket_openssl11_symbols_p.h b/src/network/ssl/qsslsocket_openssl11_symbols_p.h
index fae007e12d..a44d00a830 100644
--- a/src/network/ssl/qsslsocket_openssl11_symbols_p.h
+++ b/src/network/ssl/qsslsocket_openssl11_symbols_p.h
@@ -84,12 +84,12 @@ int q_DSA_bits(DSA *a);
int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
int q_EVP_PKEY_base_id(EVP_PKEY *a);
int q_RSA_bits(RSA *a);
-int q_OPENSSL_sk_num(OPENSSL_STACK *a);
-void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
-OPENSSL_STACK *q_OPENSSL_sk_new_null();
-void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
-void q_OPENSSL_sk_free(OPENSSL_STACK *a);
-void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
+Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a);
+Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
+Q_AUTOTEST_EXPORT OPENSSL_STACK *q_OPENSSL_sk_new_null();
+Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
+Q_AUTOTEST_EXPORT void q_OPENSSL_sk_free(OPENSSL_STACK *a);
+Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
int q_SSL_session_reused(SSL *a);
unsigned long q_SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op);
int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
@@ -102,6 +102,7 @@ const SSL_METHOD *q_TLS_server_method();
ASN1_TIME *q_X509_getm_notBefore(X509 *a);
ASN1_TIME *q_X509_getm_notAfter(X509 *a);
+Q_AUTOTEST_EXPORT void q_X509_up_ref(X509 *a);
long q_X509_get_version(X509 *a);
EVP_PKEY *q_X509_get_pubkey(X509 *a);
void q_X509_STORE_set_verify_cb(X509_STORE *ctx, X509_STORE_CTX_verify_cb verify_cb);
@@ -172,6 +173,10 @@ void q_BIO_set_init(BIO *a, int init);
int q_BIO_get_shutdown(BIO *a);
void q_BIO_set_shutdown(BIO *a, int shut);
+#if QT_CONFIG(ocsp)
+const OCSP_CERTID *q_OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *x);
+#endif // ocsp
+
#define q_SSL_CTX_set_min_proto_version(ctx, version) \
q_SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version, nullptr)
diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h
index c16b9d5f76..c23234e291 100644
--- a/src/network/ssl/qsslsocket_openssl_p.h
+++ b/src/network/ssl/qsslsocket_openssl_p.h
@@ -69,6 +69,9 @@
#include <QtNetwork/private/qtnetworkglobal_p.h>
#include "qsslsocket_p.h"
+#include <QtCore/qvector.h>
+#include <QtCore/qstring.h>
+
#ifdef Q_OS_WIN
#include <qt_windows.h>
#if defined(OCSP_RESPONSE)
@@ -152,6 +155,16 @@ public:
void _q_caRootLoaded(QSslCertificate,QSslCertificate) override;
#endif
+#if QT_CONFIG(ocsp)
+ bool checkOcspStatus();
+#endif
+
+ // This decription will go to setErrorAndEmit(SslHandshakeError, ocspErrorDescription)
+ QString ocspErrorDescription;
+ // These will go to sslErrors()
+ QVector<QSslError> ocspErrors;
+ QByteArray ocspResponseDer;
+
Q_AUTOTEST_EXPORT static long setupOpenSslOptions(QSsl::SslProtocol protocol, QSsl::SslOptions sslOptions);
static QSslCipher QSslCipher_from_SSL_CIPHER(const SSL_CIPHER *cipher);
static QList<QSslCertificate> STACKOFX509_to_QSslCertificates(STACK_OF(X509) *x509);
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index 299df6b685..aa1dc681e0 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -172,6 +172,7 @@ DEFINEFUNC2(unsigned long, SSL_set_options, SSL *ssl, ssl, unsigned long op, op,
DEFINEFUNC(const SSL_METHOD *, TLS_method, DUMMYARG, DUMMYARG, return nullptr, return)
DEFINEFUNC(const SSL_METHOD *, TLS_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
DEFINEFUNC(const SSL_METHOD *, TLS_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
+DEFINEFUNC(void, X509_up_ref, X509 *a, a, return, DUMMYARG)
DEFINEFUNC(ASN1_TIME *, X509_getm_notBefore, X509 *a, a, return nullptr, return)
DEFINEFUNC(ASN1_TIME *, X509_getm_notAfter, X509 *a, a, return nullptr, return)
DEFINEFUNC(long, X509_get_version, X509 *a, a, return -1, return)
@@ -199,6 +200,35 @@ DEFINEFUNC2(int, BIO_meth_set_create, BIO_METHOD *biom, biom, DgramCreateCallbac
DEFINEFUNC2(int, BIO_meth_set_destroy, BIO_METHOD *biom, biom, DgramDestroyCallback dtr, dtr, return 0, return)
#endif // dtls
+#if QT_CONFIG(ocsp)
+DEFINEFUNC(const OCSP_CERTID *, OCSP_SINGLERESP_get0_id, const OCSP_SINGLERESP *x, x, return nullptr, return)
+DEFINEFUNC3(OCSP_RESPONSE *, d2i_OCSP_RESPONSE, OCSP_RESPONSE **a, a, const unsigned char **in, in, long len, len, return nullptr, return)
+DEFINEFUNC(void, OCSP_RESPONSE_free, OCSP_RESPONSE *rs, rs, return, DUMMYARG)
+DEFINEFUNC(OCSP_BASICRESP *, OCSP_response_get1_basic, OCSP_RESPONSE *resp, resp, return nullptr, return)
+DEFINEFUNC(void, OCSP_BASICRESP_free, OCSP_BASICRESP *bs, bs, return, DUMMYARG)
+DEFINEFUNC(int, OCSP_response_status, OCSP_RESPONSE *resp, resp, return OCSP_RESPONSE_STATUS_INTERNALERROR, return)
+DEFINEFUNC4(int, OCSP_basic_verify, OCSP_BASICRESP *bs, bs, STACK_OF(X509) *certs, certs, X509_STORE *st, st, unsigned long flags, flags, return -1, return)
+DEFINEFUNC(int, OCSP_resp_count, OCSP_BASICRESP *bs, bs, return 0, return)
+DEFINEFUNC2(OCSP_SINGLERESP *, OCSP_resp_get0, OCSP_BASICRESP *bs, bs, int idx, idx, return nullptr, return)
+DEFINEFUNC5(int, OCSP_single_get0_status, OCSP_SINGLERESP *single, single, int *reason, reason, ASN1_GENERALIZEDTIME **revtime, revtime,
+ ASN1_GENERALIZEDTIME **thisupd, thisupd, ASN1_GENERALIZEDTIME **nextupd, nextupd, return -1, return)
+DEFINEFUNC4(int, OCSP_check_validity, ASN1_GENERALIZEDTIME *thisupd, thisupd, ASN1_GENERALIZEDTIME *nextupd, nextupd, long nsec, nsec, long maxsec, maxsec, return 0, return)
+DEFINEFUNC3(OCSP_CERTID *, OCSP_cert_to_id, const EVP_MD *dgst, dgst, X509 *subject, subject, X509 *issuer, issuer, return nullptr, return)
+DEFINEFUNC(void, OCSP_CERTID_free, OCSP_CERTID *cid, cid, return, DUMMYARG)
+DEFINEFUNC5(int, OCSP_id_get0_info, ASN1_OCTET_STRING **piNameHash, piNameHash, ASN1_OBJECT **pmd, pmd,
+ ASN1_OCTET_STRING **piKeyHash, piKeyHash, ASN1_INTEGER **pserial, pserial, OCSP_CERTID *cid, cid,
+ return 0, return)
+DEFINEFUNC2(OCSP_RESPONSE *, OCSP_response_create, int status, status, OCSP_BASICRESP *bs, bs, return nullptr, return)
+DEFINEFUNC(const STACK_OF(X509) *, OCSP_resp_get0_certs, const OCSP_BASICRESP *bs, bs, return nullptr, return)
+DEFINEFUNC2(int, OCSP_id_cmp, OCSP_CERTID *a, a, OCSP_CERTID *b, b, return -1, return)
+DEFINEFUNC7(OCSP_SINGLERESP *, OCSP_basic_add1_status, OCSP_BASICRESP *r, r, OCSP_CERTID *c, c, int s, s,
+ int re, re, ASN1_TIME *rt, rt, ASN1_TIME *t, t, ASN1_TIME *n, n, return nullptr, return)
+DEFINEFUNC(OCSP_BASICRESP *, OCSP_BASICRESP_new, DUMMYARG, DUMMYARG, return nullptr, return)
+DEFINEFUNC2(int, i2d_OCSP_RESPONSE, OCSP_RESPONSE *r, r, unsigned char **ppout, ppout, return 0, return)
+DEFINEFUNC6(int, OCSP_basic_sign, OCSP_BASICRESP *br, br, X509 *signer, signer, EVP_PKEY *key, key,
+ const EVP_MD *dg, dg, STACK_OF(X509) *cs, cs, unsigned long flags, flags, return 0, return)
+#endif // ocsp
+
DEFINEFUNC2(void, BIO_set_data, BIO *a, a, void *ptr, ptr, return, DUMMYARG)
DEFINEFUNC(void *, BIO_get_data, BIO *a, a, return nullptr, return)
DEFINEFUNC2(void, BIO_set_init, BIO *a, a, int init, init, return, DUMMYARG)
@@ -235,17 +265,10 @@ DEFINEFUNC6(void *, PEM_ASN1_write_bio, d2i_of_void *a, a, const char *b, b, BIO
DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
DEFINEFUNC(_STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
DEFINEFUNC2(void, sk_push, _STACK *a, a, void *b, b, return, DUMMYARG)
DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG)
DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return nullptr, return)
-#else
-DEFINEFUNC(STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
-DEFINEFUNC2(void, sk_push, STACK *a, a, char *b, b, return, DUMMYARG)
-DEFINEFUNC(void, sk_free, STACK *a, a, return, DUMMYARG)
-DEFINEFUNC2(char *, sk_value, STACK *a, a, int b, b, return nullptr, return)
-#endif // OPENSSL_VERSION_NUMBER >= 0x10000000L
DEFINEFUNC(int, SSL_library_init, void, DUMMYARG, return -1, return)
DEFINEFUNC(void, SSL_load_error_strings, void, DUMMYARG, return, DUMMYARG)
@@ -254,49 +277,18 @@ DEFINEFUNC(void, SSL_load_error_strings, void, DUMMYARG, return, DUMMYARG)
DEFINEFUNC5(int, SSL_get_ex_new_index, long argl, argl, void *argp, argp, CRYPTO_EX_new *new_func, new_func, CRYPTO_EX_dup *dup_func, dup_func, CRYPTO_EX_free *free_func, free_func, return -1, return)
#endif // OPENSSL_VERSION_NUMBER >= 0x10001000L
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
-#ifndef OPENSSL_NO_SSL2
-DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#endif
-#ifndef OPENSSL_NO_SSL3_METHOD
-DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#endif
DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
#if OPENSSL_VERSION_NUMBER >= 0x10001000L
DEFINEFUNC(const SSL_METHOD *, TLSv1_1_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
DEFINEFUNC(const SSL_METHOD *, TLSv1_2_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
#endif
-#ifndef OPENSSL_NO_SSL2
-DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#endif
-#ifndef OPENSSL_NO_SSL3_METHOD
-DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#endif
DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
#if OPENSSL_VERSION_NUMBER >= 0x10001000L
DEFINEFUNC(const SSL_METHOD *, TLSv1_1_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
DEFINEFUNC(const SSL_METHOD *, TLSv1_2_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
#endif
-#else
-#ifndef OPENSSL_NO_SSL2
-DEFINEFUNC(SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#endif
-#ifndef OPENSSL_NO_SSL3_METHOD
-DEFINEFUNC(SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#endif
-DEFINEFUNC(SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
-DEFINEFUNC(SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#ifndef OPENSSL_NO_SSL2
-DEFINEFUNC(SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#endif
-#ifndef OPENSSL_NO_SSL3_METHOD
-DEFINEFUNC(SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#endif
-DEFINEFUNC(SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
-DEFINEFUNC(SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return nullptr, return)
-#endif
DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get_chain, X509_STORE_CTX *a, a, return nullptr, return)
@@ -329,6 +321,7 @@ DEFINEFUNC(const char *, SSLeay_version, int a, a, return nullptr, return)
#endif // QT_CONFIG(opensslv11)
DEFINEFUNC(long, ASN1_INTEGER_get, ASN1_INTEGER *a, a, return 0, return)
+DEFINEFUNC2(int, ASN1_INTEGER_cmp, const ASN1_INTEGER *a, a, const ASN1_INTEGER *b, b, return 1, return)
DEFINEFUNC(int, ASN1_STRING_length, ASN1_STRING *a, a, return 0, return)
DEFINEFUNC2(int, ASN1_STRING_to_UTF8, unsigned char **a, a, ASN1_STRING *b, b, return 0, return)
DEFINEFUNC4(long, BIO_ctrl, BIO *a, a, int b, b, long c, c, void *d, d, return -1, return)
@@ -357,6 +350,7 @@ DEFINEFUNC5(int, EVP_CipherInit, EVP_CIPHER_CTX *ctx, ctx, const EVP_CIPHER *typ
DEFINEFUNC6(int, EVP_CipherInit_ex, EVP_CIPHER_CTX *ctx, ctx, const EVP_CIPHER *cipher, cipher, ENGINE *impl, impl, const unsigned char *key, key, const unsigned char *iv, iv, int enc, enc, return 0, return)
DEFINEFUNC5(int, EVP_CipherUpdate, EVP_CIPHER_CTX *ctx, ctx, unsigned char *out, out, int *outl, outl, const unsigned char *in, in, int inl, inl, return 0, return)
DEFINEFUNC3(int, EVP_CipherFinal, EVP_CIPHER_CTX *ctx, ctx, unsigned char *out, out, int *outl, outl, return 0, return)
+DEFINEFUNC(const EVP_MD *, EVP_get_digestbyname, const char *name, name, return nullptr, return)
#ifndef OPENSSL_NO_DES
DEFINEFUNC(const EVP_CIPHER *, EVP_des_cbc, DUMMYARG, DUMMYARG, return nullptr, return)
DEFINEFUNC(const EVP_CIPHER *, EVP_des_ede3_cbc, DUMMYARG, DUMMYARG, return nullptr, return)
@@ -368,12 +362,14 @@ DEFINEFUNC(const EVP_MD *, EVP_sha1, DUMMYARG, DUMMYARG, return nullptr, return)
DEFINEFUNC3(int, EVP_PKEY_assign, EVP_PKEY *a, a, int b, b, char *c, c, return -1, return)
DEFINEFUNC2(int, EVP_PKEY_set1_RSA, EVP_PKEY *a, a, RSA *b, b, return -1, return)
DEFINEFUNC2(int, EVP_PKEY_set1_DSA, EVP_PKEY *a, a, DSA *b, b, return -1, return)
+DEFINEFUNC2(int, EVP_PKEY_set1_DH, EVP_PKEY *a, a, DH *b, b, return -1, return)
#ifndef OPENSSL_NO_EC
DEFINEFUNC2(int, EVP_PKEY_set1_EC_KEY, EVP_PKEY *a, a, EC_KEY *b, b, return -1, return)
#endif
DEFINEFUNC(void, EVP_PKEY_free, EVP_PKEY *a, a, return, DUMMYARG)
DEFINEFUNC(DSA *, EVP_PKEY_get1_DSA, EVP_PKEY *a, a, return nullptr, return)
DEFINEFUNC(RSA *, EVP_PKEY_get1_RSA, EVP_PKEY *a, a, return nullptr, return)
+DEFINEFUNC(DH *, EVP_PKEY_get1_DH, EVP_PKEY *a, a, return nullptr, return)
#ifndef OPENSSL_NO_EC
DEFINEFUNC(EC_KEY *, EVP_PKEY_get1_EC_KEY, EVP_PKEY *a, a, return nullptr, return)
#endif
@@ -399,6 +395,7 @@ DEFINEFUNC4(EC_KEY *, PEM_read_bio_ECPrivateKey, BIO *a, a, EC_KEY **b, b, pem_p
DEFINEFUNC4(DH *, PEM_read_bio_DHparams, BIO *a, a, DH **b, b, pem_password_cb *c, c, void *d, d, return nullptr, return)
DEFINEFUNC7(int, PEM_write_bio_DSAPrivateKey, BIO *a, a, DSA *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
DEFINEFUNC7(int, PEM_write_bio_RSAPrivateKey, BIO *a, a, RSA *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
+DEFINEFUNC7(int, PEM_write_bio_PrivateKey, BIO *a, a, EVP_PKEY *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
#ifndef OPENSSL_NO_EC
DEFINEFUNC7(int, PEM_write_bio_ECPrivateKey, BIO *a, a, EC_KEY *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
#endif
@@ -411,6 +408,7 @@ DEFINEFUNC4(EC_KEY *, PEM_read_bio_EC_PUBKEY, BIO *a, a, EC_KEY **b, b, pem_pass
#endif
DEFINEFUNC2(int, PEM_write_bio_DSA_PUBKEY, BIO *a, a, DSA *b, b, return 0, return)
DEFINEFUNC2(int, PEM_write_bio_RSA_PUBKEY, BIO *a, a, RSA *b, b, return 0, return)
+DEFINEFUNC2(int, PEM_write_bio_PUBKEY, BIO *a, a, EVP_PKEY *b, b, return 0, return)
#ifndef OPENSSL_NO_EC
DEFINEFUNC2(int, PEM_write_bio_EC_PUBKEY, BIO *a, a, EC_KEY *b, b, return 0, return)
#endif
@@ -428,12 +426,9 @@ DEFINEFUNC(int, SSL_connect, SSL *a, a, return -1, return)
DEFINEFUNC(int, SSL_CTX_check_private_key, const SSL_CTX *a, a, return -1, return)
DEFINEFUNC4(long, SSL_CTX_ctrl, SSL_CTX *a, a, int b, b, long c, c, void *d, d, return -1, return)
DEFINEFUNC(void, SSL_CTX_free, SSL_CTX *a, a, return, DUMMYARG)
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
DEFINEFUNC(SSL_CTX *, SSL_CTX_new, const SSL_METHOD *a, a, return nullptr, return)
-#else
-DEFINEFUNC(SSL_CTX *, SSL_CTX_new, SSL_METHOD *a, a, return nullptr, return)
-#endif
DEFINEFUNC2(int, SSL_CTX_set_cipher_list, SSL_CTX *a, a, const char *b, b, return -1, return)
+DEFINEFUNC3(long, SSL_CTX_callback_ctrl, SSL_CTX *ctx, ctx, int dst, dst, GenericCallbackType cb, cb, return 0, return)
DEFINEFUNC(int, SSL_CTX_set_default_verify_paths, SSL_CTX *a, a, return -1, return)
DEFINEFUNC3(void, SSL_CTX_set_verify, SSL_CTX *a, a, int b, b, int (*c)(int, X509_STORE_CTX *), c, return, DUMMYARG)
DEFINEFUNC2(void, SSL_CTX_set_verify_depth, SSL_CTX *a, a, int b, b, return, DUMMYARG)
@@ -453,22 +448,14 @@ DEFINEFUNC3(int, SSL_CONF_cmd, SSL_CONF_CTX *a, a, const char *b, b, const char
#endif
DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return)
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
-#else
-DEFINEFUNC(SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
-#endif
DEFINEFUNC(int, SSL_version, const SSL *a, a, return 0, return)
DEFINEFUNC2(int, SSL_get_error, SSL *a, a, int b, b, return -1, return)
DEFINEFUNC(STACK_OF(X509) *, SSL_get_peer_cert_chain, SSL *a, a, return nullptr, return)
DEFINEFUNC(X509 *, SSL_get_peer_certificate, SSL *a, a, return nullptr, return)
-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
-// 0.9.8 broke SC and BC by changing this function's signature.
DEFINEFUNC(long, SSL_get_verify_result, const SSL *a, a, return -1, return)
-#else
-DEFINEFUNC(long, SSL_get_verify_result, SSL *a, a, return -1, return)
-#endif
DEFINEFUNC(SSL *, SSL_new, SSL_CTX *a, a, return nullptr, return)
+DEFINEFUNC(SSL_CTX *, SSL_get_SSL_CTX, SSL *a, a, return nullptr, return)
DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, void *parg, parg, return -1, return)
DEFINEFUNC3(int, SSL_read, SSL *a, a, void *b, b, int c, c, return -1, return)
DEFINEFUNC3(void, SSL_set_bio, SSL *a, a, BIO *b, b, BIO *c, c, return, DUMMYARG)
@@ -498,6 +485,9 @@ DEFINEFUNC(X509 *, X509_dup, X509 *a, a, return nullptr, return)
DEFINEFUNC2(void, X509_print, BIO *a, a, X509 *b, b, return, DUMMYARG);
DEFINEFUNC(ASN1_OBJECT *, X509_EXTENSION_get_object, X509_EXTENSION *a, a, return nullptr, return)
DEFINEFUNC(void, X509_free, X509 *a, a, return, DUMMYARG)
+//Q_AUTOTEST_EXPORT ASN1_TIME *q_X509_gmtime_adj(ASN1_TIME *s, long adj);
+DEFINEFUNC2(ASN1_TIME *, X509_gmtime_adj, ASN1_TIME *s, s, long adj, adj, return nullptr, return)
+DEFINEFUNC(void, ASN1_TIME_free, ASN1_TIME *t, t, return, DUMMYARG)
DEFINEFUNC2(X509_EXTENSION *, X509_get_ext, X509 *a, a, int b, b, return nullptr, return)
DEFINEFUNC(int, X509_get_ext_count, X509 *a, a, return 0, return)
DEFINEFUNC4(void *, X509_get_ext_d2i, X509 *a, a, int b, b, int *c, c, int *d, d, return nullptr, return)
@@ -508,11 +498,7 @@ DEFINEFUNC(ASN1_OCTET_STRING *, X509_EXTENSION_get_data, X509_EXTENSION *a, a, r
DEFINEFUNC(void, BASIC_CONSTRAINTS_free, BASIC_CONSTRAINTS *a, a, return, DUMMYARG)
DEFINEFUNC(void, AUTHORITY_KEYID_free, AUTHORITY_KEYID *a, a, return, DUMMYARG)
DEFINEFUNC(void, GENERAL_NAME_free, GENERAL_NAME *a, a, return, DUMMYARG)
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
DEFINEFUNC2(int, ASN1_STRING_print, BIO *a, a, const ASN1_STRING *b, b, return 0, return)
-#else
-DEFINEFUNC2(int, ASN1_STRING_print, BIO *a, a, ASN1_STRING *b, b, return 0, return)
-#endif
DEFINEFUNC2(int, X509_check_issued, X509 *a, a, X509 *b, b, return -1, return)
DEFINEFUNC(X509_NAME *, X509_get_issuer_name, X509 *a, a, return nullptr, return)
DEFINEFUNC(X509_NAME *, X509_get_subject_name, X509 *a, a, return nullptr, return)
@@ -577,6 +563,7 @@ DEFINEFUNC2(void, BIO_clear_flags, BIO *b, b, int flags, flags, return, DUMMYARG
DEFINEFUNC2(void *, BIO_get_ex_data, BIO *b, b, int idx, idx, return nullptr, return)
DEFINEFUNC3(int, BIO_set_ex_data, BIO *b, b, int idx, idx, void *data, data, return -1, return)
+DEFINEFUNC3(void *, CRYPTO_malloc, size_t num, num, const char *file, file, int line, line, return nullptr, return)
DEFINEFUNC(DH *, DH_new, DUMMYARG, DUMMYARG, return nullptr, return)
DEFINEFUNC(void, DH_free, DH *dh, dh, return, DUMMYARG)
DEFINEFUNC3(DH *, d2i_DHparams, DH**a, a, const unsigned char **pp, pp, long length, length, return nullptr, return)
@@ -990,6 +977,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(TLS_method)
RESOLVEFUNC(TLS_client_method)
RESOLVEFUNC(TLS_server_method)
+ RESOLVEFUNC(X509_up_ref)
RESOLVEFUNC(X509_STORE_CTX_get0_chain)
RESOLVEFUNC(X509_getm_notBefore)
RESOLVEFUNC(X509_getm_notAfter)
@@ -1025,7 +1013,30 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(BIO_meth_set_create)
RESOLVEFUNC(BIO_meth_set_destroy)
#endif // dtls
-
+#if QT_CONFIG(ocsp)
+ RESOLVEFUNC(OCSP_SINGLERESP_get0_id)
+ RESOLVEFUNC(d2i_OCSP_RESPONSE)
+ RESOLVEFUNC(OCSP_RESPONSE_free)
+ RESOLVEFUNC(OCSP_response_status)
+ RESOLVEFUNC(OCSP_response_get1_basic)
+ RESOLVEFUNC(OCSP_BASICRESP_free)
+ RESOLVEFUNC(OCSP_basic_verify)
+ RESOLVEFUNC(OCSP_resp_count)
+ RESOLVEFUNC(OCSP_resp_get0)
+ RESOLVEFUNC(OCSP_single_get0_status)
+ RESOLVEFUNC(OCSP_check_validity)
+ RESOLVEFUNC(OCSP_cert_to_id)
+ RESOLVEFUNC(OCSP_id_get0_info)
+ RESOLVEFUNC(OCSP_resp_get0_certs)
+ RESOLVEFUNC(OCSP_basic_sign)
+ RESOLVEFUNC(OCSP_response_create)
+ RESOLVEFUNC(i2d_OCSP_RESPONSE)
+ RESOLVEFUNC(OCSP_basic_add1_status)
+ RESOLVEFUNC(OCSP_BASICRESP_new)
+ RESOLVEFUNC(OCSP_CERTID_free)
+ RESOLVEFUNC(OCSP_cert_to_id)
+ RESOLVEFUNC(OCSP_id_cmp)
+#endif // ocsp
RESOLVEFUNC(BIO_set_data)
RESOLVEFUNC(BIO_get_data)
RESOLVEFUNC(BIO_set_init)
@@ -1064,24 +1075,12 @@ bool q_resolveOpenSslSymbols()
#if OPENSSL_VERSION_NUMBER >= 0x10001000L
RESOLVEFUNC(SSL_get_ex_new_index)
#endif
-#ifndef OPENSSL_NO_SSL2
- RESOLVEFUNC(SSLv2_client_method)
-#endif
-#ifndef OPENSSL_NO_SSL3_METHOD
- RESOLVEFUNC(SSLv3_client_method)
-#endif
RESOLVEFUNC(SSLv23_client_method)
RESOLVEFUNC(TLSv1_client_method)
#if OPENSSL_VERSION_NUMBER >= 0x10001000L
RESOLVEFUNC(TLSv1_1_client_method)
RESOLVEFUNC(TLSv1_2_client_method)
#endif
-#ifndef OPENSSL_NO_SSL2
- RESOLVEFUNC(SSLv2_server_method)
-#endif
-#ifndef OPENSSL_NO_SSL3_METHOD
- RESOLVEFUNC(SSLv3_server_method)
-#endif
RESOLVEFUNC(SSLv23_server_method)
RESOLVEFUNC(TLSv1_server_method)
#if OPENSSL_VERSION_NUMBER >= 0x10001000L
@@ -1132,6 +1131,7 @@ bool q_resolveOpenSslSymbols()
#endif // !opensslv11
RESOLVEFUNC(ASN1_INTEGER_get)
+ RESOLVEFUNC(ASN1_INTEGER_cmp)
RESOLVEFUNC(ASN1_STRING_length)
RESOLVEFUNC(ASN1_STRING_to_UTF8)
RESOLVEFUNC(BIO_ctrl)
@@ -1168,6 +1168,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(EVP_CipherInit_ex)
RESOLVEFUNC(EVP_CipherUpdate)
RESOLVEFUNC(EVP_CipherFinal)
+ RESOLVEFUNC(EVP_get_digestbyname)
#ifndef OPENSSL_NO_DES
RESOLVEFUNC(EVP_des_cbc)
RESOLVEFUNC(EVP_des_ede3_cbc)
@@ -1179,12 +1180,14 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(EVP_PKEY_assign)
RESOLVEFUNC(EVP_PKEY_set1_RSA)
RESOLVEFUNC(EVP_PKEY_set1_DSA)
+ RESOLVEFUNC(EVP_PKEY_set1_DH)
#ifndef OPENSSL_NO_EC
RESOLVEFUNC(EVP_PKEY_set1_EC_KEY)
#endif
RESOLVEFUNC(EVP_PKEY_free)
RESOLVEFUNC(EVP_PKEY_get1_DSA)
RESOLVEFUNC(EVP_PKEY_get1_RSA)
+ RESOLVEFUNC(EVP_PKEY_get1_DH)
#ifndef OPENSSL_NO_EC
RESOLVEFUNC(EVP_PKEY_get1_EC_KEY)
#endif
@@ -1208,6 +1211,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(PEM_read_bio_DHparams)
RESOLVEFUNC(PEM_write_bio_DSAPrivateKey)
RESOLVEFUNC(PEM_write_bio_RSAPrivateKey)
+ RESOLVEFUNC(PEM_write_bio_PrivateKey)
#ifndef OPENSSL_NO_EC
RESOLVEFUNC(PEM_write_bio_ECPrivateKey)
#endif
@@ -1221,6 +1225,7 @@ bool q_resolveOpenSslSymbols()
#endif
RESOLVEFUNC(PEM_write_bio_DSA_PUBKEY)
RESOLVEFUNC(PEM_write_bio_RSA_PUBKEY)
+ RESOLVEFUNC(PEM_write_bio_PUBKEY)
#ifndef OPENSSL_NO_EC
RESOLVEFUNC(PEM_write_bio_EC_PUBKEY)
#endif
@@ -1237,6 +1242,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(SSL_CTX_free)
RESOLVEFUNC(SSL_CTX_new)
RESOLVEFUNC(SSL_CTX_set_cipher_list)
+ RESOLVEFUNC(SSL_CTX_callback_ctrl)
RESOLVEFUNC(SSL_CTX_set_default_verify_paths)
RESOLVEFUNC(SSL_CTX_set_verify)
RESOLVEFUNC(SSL_CTX_set_verify_depth)
@@ -1266,6 +1272,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(SSL_get_peer_certificate)
RESOLVEFUNC(SSL_get_verify_result)
RESOLVEFUNC(SSL_new)
+ RESOLVEFUNC(SSL_get_SSL_CTX)
RESOLVEFUNC(SSL_ctrl)
RESOLVEFUNC(SSL_read)
RESOLVEFUNC(SSL_set_accept_state)
@@ -1313,6 +1320,8 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(X509_digest)
RESOLVEFUNC(X509_EXTENSION_get_object)
RESOLVEFUNC(X509_free)
+ RESOLVEFUNC(X509_gmtime_adj)
+ RESOLVEFUNC(ASN1_TIME_free)
RESOLVEFUNC(X509_get_ext)
RESOLVEFUNC(X509_get_ext_count)
RESOLVEFUNC(X509_get_ext_d2i)
@@ -1350,6 +1359,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(DTLS_server_method)
RESOLVEFUNC(DTLS_client_method)
#endif // dtls
+ RESOLVEFUNC(CRYPTO_malloc)
RESOLVEFUNC(DH_new)
RESOLVEFUNC(DH_free)
RESOLVEFUNC(d2i_DHparams)
diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
index bfdfbf0efc..cf426e2ed2 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
@@ -72,6 +72,10 @@
#include "qsslsocket_openssl_p.h"
#include <QtCore/qglobal.h>
+#if QT_CONFIG(ocsp)
+#include <openssl/ocsp.h>
+#endif
+
QT_BEGIN_NAMESPACE
#define DUMMYARG
@@ -224,6 +228,7 @@ QT_BEGIN_NAMESPACE
bool q_resolveOpenSslSymbols();
long q_ASN1_INTEGER_get(ASN1_INTEGER *a);
+int q_ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
int q_ASN1_STRING_length(ASN1_STRING *a);
int q_ASN1_STRING_to_UTF8(unsigned char **a, ASN1_STRING *b);
long q_BIO_ctrl(BIO *a, int b, long c, void *d);
@@ -267,6 +272,8 @@ int q_EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, const unsigned
int q_EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const unsigned char *key, const unsigned char *iv, int enc);
int q_EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl);
int q_EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
+const EVP_MD *q_EVP_get_digestbyname(const char *name);
+
#ifndef OPENSSL_NO_DES
const EVP_CIPHER *q_EVP_des_cbc();
const EVP_CIPHER *q_EVP_des_ede3_cbc();
@@ -274,16 +281,18 @@ const EVP_CIPHER *q_EVP_des_ede3_cbc();
#ifndef OPENSSL_NO_RC2
const EVP_CIPHER *q_EVP_rc2_cbc();
#endif
-const EVP_MD *q_EVP_sha1();
+Q_AUTOTEST_EXPORT const EVP_MD *q_EVP_sha1();
int q_EVP_PKEY_assign(EVP_PKEY *a, int b, char *c);
Q_AUTOTEST_EXPORT int q_EVP_PKEY_set1_RSA(EVP_PKEY *a, RSA *b);
int q_EVP_PKEY_set1_DSA(EVP_PKEY *a, DSA *b);
+int q_EVP_PKEY_set1_DH(EVP_PKEY *a, DH *b);
#ifndef OPENSSL_NO_EC
int q_EVP_PKEY_set1_EC_KEY(EVP_PKEY *a, EC_KEY *b);
#endif
-void q_EVP_PKEY_free(EVP_PKEY *a);
+Q_AUTOTEST_EXPORT void q_EVP_PKEY_free(EVP_PKEY *a);
RSA *q_EVP_PKEY_get1_RSA(EVP_PKEY *a);
DSA *q_EVP_PKEY_get1_DSA(EVP_PKEY *a);
+DH *q_EVP_PKEY_get1_DH(EVP_PKEY *a);
#ifndef OPENSSL_NO_EC
EC_KEY *q_EVP_PKEY_get1_EC_KEY(EVP_PKEY *a);
#endif
@@ -297,6 +306,7 @@ int q_OBJ_ln2nid(const char *s);
int q_i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *obj);
int q_OBJ_obj2txt(char *buf, int buf_len, ASN1_OBJECT *obj, int no_name);
int q_OBJ_obj2nid(const ASN1_OBJECT *a);
+#define q_EVP_get_digestbynid(a) q_EVP_get_digestbyname(q_OBJ_nid2sn(a))
#ifdef SSLEAY_MACROS
// ### verify
void *q_PEM_ASN1_read_bio(d2i_of_void *a, const char *b, BIO *c, void **d, pem_password_cb *e,
@@ -314,6 +324,8 @@ int q_PEM_write_bio_DSAPrivateKey(BIO *a, DSA *b, const EVP_CIPHER *c, unsigned
int e, pem_password_cb *f, void *g);
int q_PEM_write_bio_RSAPrivateKey(BIO *a, RSA *b, const EVP_CIPHER *c, unsigned char *d,
int e, pem_password_cb *f, void *g);
+int q_PEM_write_bio_PrivateKey(BIO *a, EVP_PKEY *b, const EVP_CIPHER *c, unsigned char *d,
+ int e, pem_password_cb *f, void *g);
#ifndef OPENSSL_NO_EC
int q_PEM_write_bio_ECPrivateKey(BIO *a, EC_KEY *b, const EVP_CIPHER *c, unsigned char *d,
int e, pem_password_cb *f, void *g);
@@ -327,6 +339,7 @@ EC_KEY *q_PEM_read_bio_EC_PUBKEY(BIO *a, EC_KEY **b, pem_password_cb *c, void *d
#endif
int q_PEM_write_bio_DSA_PUBKEY(BIO *a, DSA *b);
int q_PEM_write_bio_RSA_PUBKEY(BIO *a, RSA *b);
+int q_PEM_write_bio_PUBKEY(BIO *a, EVP_PKEY *b);
#ifndef OPENSSL_NO_EC
int q_PEM_write_bio_EC_PUBKEY(BIO *a, EC_KEY *b);
#endif
@@ -344,15 +357,15 @@ int q_SSL_connect(SSL *a);
int q_SSL_CTX_check_private_key(const SSL_CTX *a);
long q_SSL_CTX_ctrl(SSL_CTX *a, int b, long c, void *d);
void q_SSL_CTX_free(SSL_CTX *a);
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
SSL_CTX *q_SSL_CTX_new(const SSL_METHOD *a);
-#else
-SSL_CTX *q_SSL_CTX_new(SSL_METHOD *a);
-#endif
int q_SSL_CTX_set_cipher_list(SSL_CTX *a, const char *b);
int q_SSL_CTX_set_default_verify_paths(SSL_CTX *a);
void q_SSL_CTX_set_verify(SSL_CTX *a, int b, int (*c)(int, X509_STORE_CTX *));
void q_SSL_CTX_set_verify_depth(SSL_CTX *a, int b);
+extern "C" {
+typedef void (*GenericCallbackType)();
+}
+long q_SSL_CTX_callback_ctrl(SSL_CTX *, int, GenericCallbackType);
int q_SSL_CTX_use_certificate(SSL_CTX *a, X509 *b);
int q_SSL_CTX_use_certificate_file(SSL_CTX *a, const char *b, int c);
int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
@@ -369,17 +382,14 @@ int q_SSL_CONF_cmd(SSL_CONF_CTX *a, const char *b, const char *c);
#endif
void q_SSL_free(SSL *a);
STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
-#else
-SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
-#endif
int q_SSL_version(const SSL *a);
int q_SSL_get_error(SSL *a, int b);
STACK_OF(X509) *q_SSL_get_peer_cert_chain(SSL *a);
X509 *q_SSL_get_peer_certificate(SSL *a);
long q_SSL_get_verify_result(const SSL *a);
SSL *q_SSL_new(SSL_CTX *a);
+SSL_CTX *q_SSL_get_SSL_CTX(SSL *a);
long q_SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg);
int q_SSL_read(SSL *a, void *b, int c);
void q_SSL_set_bio(SSL *a, BIO *b, BIO *c);
@@ -414,7 +424,9 @@ X509 *q_X509_dup(X509 *a);
void q_X509_print(BIO *a, X509*b);
int q_X509_digest(const X509 *x509, const EVP_MD *type, unsigned char *md, unsigned int *len);
ASN1_OBJECT *q_X509_EXTENSION_get_object(X509_EXTENSION *a);
-void q_X509_free(X509 *a);
+Q_AUTOTEST_EXPORT void q_X509_free(X509 *a);
+Q_AUTOTEST_EXPORT ASN1_TIME *q_X509_gmtime_adj(ASN1_TIME *s, long adj);
+Q_AUTOTEST_EXPORT void q_ASN1_TIME_free(ASN1_TIME *t);
X509_EXTENSION *q_X509_get_ext(X509 *a, int b);
int q_X509_get_ext_count(X509 *a);
void *q_X509_get_ext_d2i(X509 *a, int b, int *c, int *d);
@@ -424,11 +436,7 @@ int q_X509_EXTENSION_get_critical(X509_EXTENSION *a);
ASN1_OCTET_STRING *q_X509_EXTENSION_get_data(X509_EXTENSION *a);
void q_BASIC_CONSTRAINTS_free(BASIC_CONSTRAINTS *a);
void q_AUTHORITY_KEYID_free(AUTHORITY_KEYID *a);
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
int q_ASN1_STRING_print(BIO *a, const ASN1_STRING *b);
-#else
-int q_ASN1_STRING_print(BIO *a, ASN1_STRING *b);
-#endif
int q_X509_check_issued(X509 *a, X509 *b);
X509_NAME *q_X509_get_issuer_name(X509 *a);
X509_NAME *q_X509_get_subject_name(X509 *a);
@@ -571,6 +579,57 @@ int q_BIO_set_ex_data(BIO *b, int idx, void *data);
class QDateTime;
QDateTime q_getTimeFromASN1(const ASN1_TIME *aTime);
+#ifndef OPENSSL_NO_TLSEXT
+
+#define q_SSL_set_tlsext_status_type(ssl, type) \
+ q_SSL_ctrl((ssl), SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE, (type), nullptr)
+
+#endif // OPENSSL_NO_TLSEXT
+
+#if QT_CONFIG(ocsp)
+
+OCSP_RESPONSE *q_d2i_OCSP_RESPONSE(OCSP_RESPONSE **a, const unsigned char **in, long len);
+Q_AUTOTEST_EXPORT int q_i2d_OCSP_RESPONSE(OCSP_RESPONSE *r, unsigned char **ppout);
+Q_AUTOTEST_EXPORT OCSP_RESPONSE *q_OCSP_response_create(int status, OCSP_BASICRESP *bs);
+Q_AUTOTEST_EXPORT void q_OCSP_RESPONSE_free(OCSP_RESPONSE *rs);
+int q_OCSP_response_status(OCSP_RESPONSE *resp);
+OCSP_BASICRESP *q_OCSP_response_get1_basic(OCSP_RESPONSE *resp);
+Q_AUTOTEST_EXPORT OCSP_SINGLERESP *q_OCSP_basic_add1_status(OCSP_BASICRESP *rsp, OCSP_CERTID *cid,
+ int status, int reason, ASN1_TIME *revtime,
+ ASN1_TIME *thisupd, ASN1_TIME *nextupd);
+Q_AUTOTEST_EXPORT int q_OCSP_basic_sign(OCSP_BASICRESP *brsp, X509 *signer, EVP_PKEY *key, const EVP_MD *dgst,
+ STACK_OF(X509) *certs, unsigned long flags);
+Q_AUTOTEST_EXPORT OCSP_BASICRESP *q_OCSP_BASICRESP_new();
+Q_AUTOTEST_EXPORT void q_OCSP_BASICRESP_free(OCSP_BASICRESP *bs);
+int q_OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs, X509_STORE *st, unsigned long flags);
+int q_OCSP_resp_count(OCSP_BASICRESP *bs);
+OCSP_SINGLERESP *q_OCSP_resp_get0(OCSP_BASICRESP *bs, int idx);
+int q_OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason, ASN1_GENERALIZEDTIME **revtime,
+ ASN1_GENERALIZEDTIME **thisupd, ASN1_GENERALIZEDTIME **nextupd);
+int q_OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, ASN1_GENERALIZEDTIME *nextupd, long nsec, long maxsec);
+int q_OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, ASN1_OCTET_STRING **pikeyHash,
+ ASN1_INTEGER **pserial, OCSP_CERTID *cid);
+
+const STACK_OF(X509) *q_OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
+Q_AUTOTEST_EXPORT OCSP_CERTID *q_OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer);
+Q_AUTOTEST_EXPORT void q_OCSP_CERTID_free(OCSP_CERTID *cid);
+int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
+
+#define q_SSL_get_tlsext_status_ocsp_resp(ssl, arg) \
+ q_SSL_ctrl(ssl, SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP, 0, arg)
+
+#define q_SSL_CTX_set_tlsext_status_cb(ssl, cb) \
+ q_SSL_CTX_callback_ctrl(ssl, SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB, GenericCallbackType(cb))
+
+# define q_SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \
+ q_SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP, arglen, arg)
+
+#endif // ocsp
+
+
+void *q_CRYPTO_malloc(size_t num, const char *file, int line);
+#define q_OPENSSL_malloc(num) q_CRYPTO_malloc(num, "", 0)
+
QT_END_NAMESPACE
#endif
diff --git a/src/network/ssl/qsslsocket_opensslpre11.cpp b/src/network/ssl/qsslsocket_opensslpre11.cpp
index bc4fd9dc85..f5aab821ea 100644
--- a/src/network/ssl/qsslsocket_opensslpre11.cpp
+++ b/src/network/ssl/qsslsocket_opensslpre11.cpp
@@ -251,21 +251,7 @@ void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
#if QT_CONFIG(library)
//load symbols needed to receive certificates from system store
-#if defined(Q_OS_WIN)
- HINSTANCE hLib = LoadLibraryW(L"Crypt32");
- if (hLib) {
- ptrCertOpenSystemStoreW = reinterpret_cast<PtrCertOpenSystemStoreW>(
- reinterpret_cast<QFunctionPointer>(GetProcAddress(hLib, "CertOpenSystemStoreW")));
- ptrCertFindCertificateInStore = reinterpret_cast<PtrCertFindCertificateInStore>(
- reinterpret_cast<QFunctionPointer>(GetProcAddress(hLib, "CertFindCertificateInStore")));
- ptrCertCloseStore = reinterpret_cast<PtrCertCloseStore>(
- reinterpret_cast<QFunctionPointer>(GetProcAddress(hLib, "CertCloseStore")));
- if (!ptrCertOpenSystemStoreW || !ptrCertFindCertificateInStore || !ptrCertCloseStore)
- qCWarning(lcSsl, "could not resolve symbols in crypt32 library"); // should never happen
- } else {
- qCWarning(lcSsl, "could not load crypt32 library"); // should never happen
- }
-#elif defined(Q_OS_QNX)
+#if defined(Q_OS_QNX)
s_loadRootCertsOnDemand = true;
#elif defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
// check whether we can enable on-demand root-cert loading (i.e. check whether the sym links are there)
diff --git a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h b/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
index b7bac5d2a2..46b6505346 100644
--- a/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
+++ b/src/network/ssl/qsslsocket_opensslpre11_symbols_p.h
@@ -89,9 +89,7 @@ void q_ERR_free_strings();
void q_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
void q_EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
typedef _STACK STACK;
-#endif
// The typedef we use to make our pre 1.1 code look more like 1.1 (less ifdefs).
typedef STACK OPENSSL_STACK;
@@ -111,22 +109,13 @@ void q_sk_free(STACK *a);
// address of this:
#define q_OPENSSL_sk_free q_sk_free
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
void *q_sk_value(STACK *a, int b);
void q_sk_push(STACK *st, void *data);
-#else
-char *q_sk_value(STACK *a, int b);
-void q_sk_push(STACK *st, char *data);
-#endif // OPENSSL_VERSION_NUMBER >= 0x10000000L
#define q_OPENSSL_sk_value(a, b) q_sk_value(a, b)
#define q_OPENSSL_sk_push(st, data) q_sk_push(st, data)
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
SSL_CTX *q_SSL_CTX_new(const SSL_METHOD *a);
-#else
-SSL_CTX *q_SSL_CTX_new(SSL_METHOD *a);
-#endif
int q_SSL_library_init();
void q_SSL_load_error_strings();
@@ -135,49 +124,14 @@ void q_SSL_load_error_strings();
int q_SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
#endif
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
-#ifndef OPENSSL_NO_SSL2
-const SSL_METHOD *q_SSLv2_client_method();
-#endif
-#ifndef OPENSSL_NO_SSL3_METHOD
-const SSL_METHOD *q_SSLv3_client_method();
-#endif
const SSL_METHOD *q_SSLv23_client_method();
const SSL_METHOD *q_TLSv1_client_method();
const SSL_METHOD *q_TLSv1_1_client_method();
const SSL_METHOD *q_TLSv1_2_client_method();
-#ifndef OPENSSL_NO_SSL2
-const SSL_METHOD *q_SSLv2_server_method();
-#endif
-#ifndef OPENSSL_NO_SSL3_METHOD
-const SSL_METHOD *q_SSLv3_server_method();
-#endif
const SSL_METHOD *q_SSLv23_server_method();
const SSL_METHOD *q_TLSv1_server_method();
const SSL_METHOD *q_TLSv1_1_server_method();
const SSL_METHOD *q_TLSv1_2_server_method();
-#else
-#ifndef OPENSSL_NO_SSL2
-SSL_METHOD *q_SSLv2_client_method();
-#endif
-#ifndef OPENSSL_NO_SSL3_METHOD
-SSL_METHOD *q_SSLv3_client_method();
-#endif
-SSL_METHOD *q_SSLv23_client_method();
-SSL_METHOD *q_TLSv1_client_method();
-SSL_METHOD *q_TLSv1_1_client_method();
-SSL_METHOD *q_TLSv1_2_client_method();
-#ifndef OPENSSL_NO_SSL2
-SSL_METHOD *q_SSLv2_server_method();
-#endif
-#ifndef OPENSSL_NO_SSL3_METHOD
-SSL_METHOD *q_SSLv3_server_method();
-#endif
-SSL_METHOD *q_SSLv23_server_method();
-SSL_METHOD *q_TLSv1_server_method();
-SSL_METHOD *q_TLSv1_1_server_method();
-SSL_METHOD *q_TLSv1_2_server_method();
-#endif
STACK_OF(X509) *q_X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
@@ -218,6 +172,7 @@ DSA *q_d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length);
#define q_SSL_SESSION_get_ticket_lifetime_hint(s) ((s)->tlsext_tick_lifetime_hint)
#define q_RSA_bits(rsa) q_BN_num_bits((rsa)->n)
#define q_DSA_bits(dsa) q_BN_num_bits((dsa)->p)
+#define q_DH_bits(dsa) q_BN_num_bits((dh)->p)
#define q_X509_STORE_set_verify_cb(s,c) X509_STORE_set_verify_cb_func((s),(c))
char *q_CONF_get1_default_config_file();
diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
index 6f34c6c888..31eee478ee 100644
--- a/src/network/ssl/qsslsocket_p.h
+++ b/src/network/ssl/qsslsocket_p.h
@@ -58,6 +58,7 @@
#include <private/qtcpsocket_p.h>
#include "qsslkey.h"
#include "qsslconfiguration_p.h"
+#include "qocspresponse.h"
#ifndef QT_NO_OPENSSL
#include <private/qsslcontext_openssl_p.h>
#else
@@ -89,14 +90,6 @@ QT_BEGIN_NAMESPACE
typedef OSStatus (*PtrSecTrustCopyAnchorCertificates)(CFArrayRef*);
#endif
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
- typedef HCERTSTORE (WINAPI *PtrCertOpenSystemStoreW)(HCRYPTPROV_LEGACY, LPCWSTR);
- typedef PCCERT_CONTEXT (WINAPI *PtrCertFindCertificateInStore)(HCERTSTORE, DWORD, DWORD, DWORD, const void*, PCCERT_CONTEXT);
- typedef BOOL (WINAPI *PtrCertCloseStore)(HCERTSTORE, DWORD);
-#endif // Q_OS_WIN && !Q_OS_WINRT
-
-
-
class QSslSocketPrivate : public QTcpSocketPrivate
{
Q_DECLARE_PUBLIC(QSslSocket)
@@ -105,6 +98,7 @@ public:
virtual ~QSslSocketPrivate();
void init();
+ bool verifyProtocolSupported(const char *where);
bool initialized;
QSslSocket::SslMode mode;
@@ -155,12 +149,6 @@ public:
const QString &peerName);
Q_AUTOTEST_EXPORT static bool isMatchingHostname(const QString &cn, const QString &hostname);
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
- static PtrCertOpenSystemStoreW ptrCertOpenSystemStoreW;
- static PtrCertFindCertificateInStore ptrCertFindCertificateInStore;
- static PtrCertCloseStore ptrCertCloseStore;
-#endif // Q_OS_WIN && !Q_OS_WINRT
-
// The socket itself, including private slots.
QTcpSocket *plainSocket;
void createPlainSocket(QIODevice::OpenMode openMode);
@@ -184,7 +172,7 @@ public:
void _q_flushWriteBuffer();
void _q_flushReadBuffer();
void _q_resumeImplementation();
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !QT_CONFIG(schannel)
virtual void _q_caRootLoaded(QSslCertificate,QSslCertificate) = 0;
#endif
@@ -220,8 +208,14 @@ protected:
bool verifyErrorsHaveBeenIgnored();
bool paused;
bool flushTriggered;
+ QOcspResponse ocspResponse;
};
+#if QT_CONFIG(securetransport) || QT_CONFIG(schannel)
+// Implemented in qsslsocket_qt.cpp
+QByteArray _q_makePkcs12(const QList<QSslCertificate> &certs, const QSslKey &key, const QString &passPhrase);
+#endif
+
QT_END_NAMESPACE
#endif
diff --git a/src/network/ssl/qsslsocket_qt.cpp b/src/network/ssl/qsslsocket_qt.cpp
new file mode 100644
index 0000000000..b0fb60ea76
--- /dev/null
+++ b/src/network/ssl/qsslsocket_qt.cpp
@@ -0,0 +1,307 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Jeremy Lainé <jeremy.laine@m4x.org>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtCore/qbytearray.h>
+#include <QtCore/qdatastream.h>
+#include <QtCore/qmessageauthenticationcode.h>
+
+#include "qsslsocket_p.h"
+#include "qasn1element_p.h"
+#include "qsslkey_p.h"
+
+QT_BEGIN_NAMESPACE
+
+/*
+ PKCS12 helpers.
+*/
+
+static QAsn1Element wrap(quint8 type, const QAsn1Element &child)
+{
+ QByteArray value;
+ QDataStream stream(&value, QIODevice::WriteOnly);
+ child.write(stream);
+ return QAsn1Element(type, value);
+}
+
+static QAsn1Element _q_PKCS7_data(const QByteArray &data)
+{
+ QVector<QAsn1Element> items;
+ items << QAsn1Element::fromObjectId("1.2.840.113549.1.7.1");
+ items << wrap(QAsn1Element::Context0Type,
+ QAsn1Element(QAsn1Element::OctetStringType, data));
+ return QAsn1Element::fromVector(items);
+}
+
+/*!
+ PKCS #12 key derivation.
+
+ Some test vectors:
+ http://www.drh-consultancy.demon.co.uk/test.txt
+*/
+static QByteArray _q_PKCS12_keygen(char id, const QByteArray &salt, const QString &passPhrase, int n, int r)
+{
+ const int u = 20;
+ const int v = 64;
+
+ // password formatting
+ QByteArray passUnicode(passPhrase.size() * 2 + 2, '\0');
+ char *p = passUnicode.data();
+ for (int i = 0; i < passPhrase.size(); ++i) {
+ quint16 ch = passPhrase[i].unicode();
+ *(p++) = (ch & 0xff00) >> 8;
+ *(p++) = (ch & 0xff);
+ }
+
+ // prepare I
+ QByteArray D(64, id);
+ QByteArray S, P;
+ const int sSize = v * ((salt.size() + v - 1) / v);
+ S.resize(sSize);
+ for (int i = 0; i < sSize; ++i)
+ S[i] = salt[i % salt.size()];
+ const int pSize = v * ((passUnicode.size() + v - 1) / v);
+ P.resize(pSize);
+ for (int i = 0; i < pSize; ++i)
+ P[i] = passUnicode[i % passUnicode.size()];
+ QByteArray I = S + P;
+
+ // apply hashing
+ const int c = (n + u - 1) / u;
+ QByteArray A;
+ QByteArray B;
+ B.resize(v);
+ QCryptographicHash hash(QCryptographicHash::Sha1);
+ for (int i = 0; i < c; ++i) {
+ // hash r iterations
+ QByteArray Ai = D + I;
+ for (int j = 0; j < r; ++j) {
+ hash.reset();
+ hash.addData(Ai);
+ Ai = hash.result();
+ }
+
+ for (int j = 0; j < v; ++j)
+ B[j] = Ai[j % u];
+
+ // modify I as Ij = (Ij + B + 1) modulo 2^v
+ for (int p = 0; p < I.size(); p += v) {
+ quint8 carry = 1;
+ for (int j = v - 1; j >= 0; --j) {
+ quint16 v = quint8(I[p + j]) + quint8(B[j]) + carry;
+ I[p + j] = v & 0xff;
+ carry = (v & 0xff00) >> 8;
+ }
+ }
+ A += Ai;
+ }
+ return A.left(n);
+}
+
+static QByteArray _q_PKCS12_salt()
+{
+ QByteArray salt;
+ salt.resize(8);
+ for (int i = 0; i < salt.size(); ++i)
+ salt[i] = (qrand() & 0xff);
+ return salt;
+}
+
+static QByteArray _q_PKCS12_certBag(const QSslCertificate &cert)
+{
+ QVector<QAsn1Element> items;
+ items << QAsn1Element::fromObjectId("1.2.840.113549.1.12.10.1.3");
+
+ // certificate
+ QVector<QAsn1Element> certItems;
+ certItems << QAsn1Element::fromObjectId("1.2.840.113549.1.9.22.1");
+ certItems << wrap(QAsn1Element::Context0Type,
+ QAsn1Element(QAsn1Element::OctetStringType, cert.toDer()));
+ items << wrap(QAsn1Element::Context0Type,
+ QAsn1Element::fromVector(certItems));
+
+ // local key id
+ const QByteArray localKeyId = cert.digest(QCryptographicHash::Sha1);
+ QVector<QAsn1Element> idItems;
+ idItems << QAsn1Element::fromObjectId("1.2.840.113549.1.9.21");
+ idItems << wrap(QAsn1Element::SetType,
+ QAsn1Element(QAsn1Element::OctetStringType, localKeyId));
+ items << wrap(QAsn1Element::SetType, QAsn1Element::fromVector(idItems));
+
+ // dump
+ QAsn1Element root = wrap(QAsn1Element::SequenceType, QAsn1Element::fromVector(items));
+ QByteArray ba;
+ QDataStream stream(&ba, QIODevice::WriteOnly);
+ root.write(stream);
+ return ba;
+}
+
+static QAsn1Element _q_PKCS12_key(const QSslKey &key)
+{
+ Q_ASSERT(key.algorithm() == QSsl::Rsa || key.algorithm() == QSsl::Dsa);
+
+ QVector<QAsn1Element> keyItems;
+ keyItems << QAsn1Element::fromInteger(0);
+ QVector<QAsn1Element> algoItems;
+ if (key.algorithm() == QSsl::Rsa)
+ algoItems << QAsn1Element::fromObjectId(RSA_ENCRYPTION_OID);
+ else if (key.algorithm() == QSsl::Dsa)
+ algoItems << QAsn1Element::fromObjectId(DSA_ENCRYPTION_OID);
+ algoItems << QAsn1Element(QAsn1Element::NullType);
+ keyItems << QAsn1Element::fromVector(algoItems);
+ keyItems << QAsn1Element(QAsn1Element::OctetStringType, key.toDer());
+ return QAsn1Element::fromVector(keyItems);
+}
+
+static QByteArray _q_PKCS12_shroudedKeyBag(const QSslKey &key, const QString &passPhrase, const QByteArray &localKeyId)
+{
+ const int iterations = 2048;
+ QByteArray salt = _q_PKCS12_salt();
+ QByteArray cKey = _q_PKCS12_keygen(1, salt, passPhrase, 24, iterations);
+ QByteArray cIv = _q_PKCS12_keygen(2, salt, passPhrase, 8, iterations);
+
+ // prepare and encrypt data
+ QByteArray plain;
+ QDataStream plainStream(&plain, QIODevice::WriteOnly);
+ _q_PKCS12_key(key).write(plainStream);
+ QByteArray crypted = QSslKeyPrivate::encrypt(QSslKeyPrivate::DesEde3Cbc,
+ plain, cKey, cIv);
+
+ QVector<QAsn1Element> items;
+ items << QAsn1Element::fromObjectId("1.2.840.113549.1.12.10.1.2");
+
+ // key
+ QVector<QAsn1Element> keyItems;
+ QVector<QAsn1Element> algoItems;
+ algoItems << QAsn1Element::fromObjectId("1.2.840.113549.1.12.1.3");
+ QVector<QAsn1Element> paramItems;
+ paramItems << QAsn1Element(QAsn1Element::OctetStringType, salt);
+ paramItems << QAsn1Element::fromInteger(iterations);
+ algoItems << QAsn1Element::fromVector(paramItems);
+ keyItems << QAsn1Element::fromVector(algoItems);
+ keyItems << QAsn1Element(QAsn1Element::OctetStringType, crypted);
+ items << wrap(QAsn1Element::Context0Type,
+ QAsn1Element::fromVector(keyItems));
+
+ // local key id
+ QVector<QAsn1Element> idItems;
+ idItems << QAsn1Element::fromObjectId("1.2.840.113549.1.9.21");
+ idItems << wrap(QAsn1Element::SetType,
+ QAsn1Element(QAsn1Element::OctetStringType, localKeyId));
+ items << wrap(QAsn1Element::SetType,
+ QAsn1Element::fromVector(idItems));
+
+ // dump
+ QAsn1Element root = wrap(QAsn1Element::SequenceType, QAsn1Element::fromVector(items));
+ QByteArray ba;
+ QDataStream stream(&ba, QIODevice::WriteOnly);
+ root.write(stream);
+ return ba;
+}
+
+static QByteArray _q_PKCS12_bag(const QList<QSslCertificate> &certs, const QSslKey &key, const QString &passPhrase)
+{
+ QVector<QAsn1Element> items;
+
+ // certs
+ for (int i = 0; i < certs.size(); ++i)
+ items << _q_PKCS7_data(_q_PKCS12_certBag(certs[i]));
+
+ // key
+ if (!key.isNull()) {
+ const QByteArray localKeyId = certs.first().digest(QCryptographicHash::Sha1);
+ items << _q_PKCS7_data(_q_PKCS12_shroudedKeyBag(key, passPhrase, localKeyId));
+ }
+
+ // dump
+ QAsn1Element root = QAsn1Element::fromVector(items);
+ QByteArray ba;
+ QDataStream stream(&ba, QIODevice::WriteOnly);
+ root.write(stream);
+ return ba;
+}
+
+static QAsn1Element _q_PKCS12_mac(const QByteArray &data, const QString &passPhrase)
+{
+ const int iterations = 2048;
+
+ // salt generation
+ QByteArray macSalt = _q_PKCS12_salt();
+ QByteArray key = _q_PKCS12_keygen(3, macSalt, passPhrase, 20, iterations);
+
+ // HMAC calculation
+ QMessageAuthenticationCode hmac(QCryptographicHash::Sha1, key);
+ hmac.addData(data);
+
+ QVector<QAsn1Element> algoItems;
+ algoItems << QAsn1Element::fromObjectId("1.3.14.3.2.26");
+ algoItems << QAsn1Element(QAsn1Element::NullType);
+
+ QVector<QAsn1Element> digestItems;
+ digestItems << QAsn1Element::fromVector(algoItems);
+ digestItems << QAsn1Element(QAsn1Element::OctetStringType, hmac.result());
+
+ QVector<QAsn1Element> macItems;
+ macItems << QAsn1Element::fromVector(digestItems);
+ macItems << QAsn1Element(QAsn1Element::OctetStringType, macSalt);
+ macItems << QAsn1Element::fromInteger(iterations);
+ return QAsn1Element::fromVector(macItems);
+}
+
+QByteArray _q_makePkcs12(const QList<QSslCertificate> &certs, const QSslKey &key, const QString &passPhrase)
+{
+ QVector<QAsn1Element> items;
+
+ // version
+ items << QAsn1Element::fromInteger(3);
+
+ // auth safe
+ const QByteArray data = _q_PKCS12_bag(certs, key, passPhrase);
+ items << _q_PKCS7_data(data);
+
+ // HMAC
+ items << _q_PKCS12_mac(data, passPhrase);
+
+ // dump
+ QAsn1Element root = QAsn1Element::fromVector(items);
+ QByteArray ba;
+ QDataStream stream(&ba, QIODevice::WriteOnly);
+ root.write(stream);
+ return ba;
+}
+
+QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslsocket_schannel.cpp b/src/network/ssl/qsslsocket_schannel.cpp
new file mode 100644
index 0000000000..e5f31a3fcf
--- /dev/null
+++ b/src/network/ssl/qsslsocket_schannel.cpp
@@ -0,0 +1,1912 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// #define QSSLSOCKET_DEBUG
+
+#include "qssl_p.h"
+#include "qsslsocket.h"
+#include "qsslsocket_schannel_p.h"
+#include "qsslcertificate.h"
+#include "qsslcertificateextension.h"
+#include "qsslcertificate_p.h"
+#include "qsslcipher_p.h"
+
+#include <QtCore/qscopeguard.h>
+#include <QtCore/qoperatingsystemversion.h>
+#include <QtCore/qregularexpression.h>
+#include <QtCore/qdatastream.h>
+#include <QtCore/qmutex.h>
+
+#define SECURITY_WIN32
+#include <security.h>
+#include <schnlsp.h>
+
+// Not defined in MinGW
+#ifndef SECBUFFER_ALERT
+#define SECBUFFER_ALERT 17
+#endif
+#ifndef SECPKG_ATTR_APPLICATION_PROTOCOL
+#define SECPKG_ATTR_APPLICATION_PROTOCOL 35
+#endif
+
+// Another missing MinGW define
+#ifndef SEC_E_APPLICATION_PROTOCOL_MISMATCH
+#define SEC_E_APPLICATION_PROTOCOL_MISMATCH _HRESULT_TYPEDEF_(0x80090367L)
+#endif
+
+// Also not defined in MinGW.......
+#ifndef SP_PROT_TLS1_SERVER
+#define SP_PROT_TLS1_SERVER 0x00000040
+#endif
+#ifndef SP_PROT_TLS1_CLIENT
+#define SP_PROT_TLS1_CLIENT 0x00000080
+#endif
+#ifndef SP_PROT_TLS1_0_SERVER
+#define SP_PROT_TLS1_0_SERVER SP_PROT_TLS1_SERVER
+#endif
+#ifndef SP_PROT_TLS1_0_CLIENT
+#define SP_PROT_TLS1_0_CLIENT SP_PROT_TLS1_CLIENT
+#endif
+#ifndef SP_PROT_TLS1_0
+#define SP_PROT_TLS1_0 (SP_PROT_TLS1_0_CLIENT | SP_PROT_TLS1_0_SERVER)
+#endif
+#ifndef SP_PROT_TLS1_1_SERVER
+#define SP_PROT_TLS1_1_SERVER 0x00000100
+#endif
+#ifndef SP_PROT_TLS1_1_CLIENT
+#define SP_PROT_TLS1_1_CLIENT 0x00000200
+#endif
+#ifndef SP_PROT_TLS1_1
+#define SP_PROT_TLS1_1 (SP_PROT_TLS1_1_CLIENT | SP_PROT_TLS1_1_SERVER)
+#endif
+#ifndef SP_PROT_TLS1_2_SERVER
+#define SP_PROT_TLS1_2_SERVER 0x00000400
+#endif
+#ifndef SP_PROT_TLS1_2_CLIENT
+#define SP_PROT_TLS1_2_CLIENT 0x00000800
+#endif
+#ifndef SP_PROT_TLS1_2
+#define SP_PROT_TLS1_2 (SP_PROT_TLS1_2_CLIENT | SP_PROT_TLS1_2_SERVER)
+#endif
+#ifndef SP_PROT_TLS1_3_SERVER
+#define SP_PROT_TLS1_3_SERVER 0x00001000
+#endif
+#ifndef SP_PROT_TLS1_3_CLIENT
+#define SP_PROT_TLS1_3_CLIENT 0x00002000
+#endif
+#ifndef SP_PROT_TLS1_3
+#define SP_PROT_TLS1_3 (SP_PROT_TLS1_3_CLIENT | SP_PROT_TLS1_3_SERVER)
+#endif
+
+/*
+ @future!:
+
+ - Transmitting intermediate certificates
+ - Look for a way to avoid putting intermediate certificates in the certificate store
+ - No documentation on how to send the chain
+ - A stackoverflow question on this from 3 years ago implies schannel only sends intermediate
+ certificates if it's "in the system or user certificate store".
+ - https://stackoverflow.com/q/30156584/2493610
+ - This can be done by users, but we shouldn't add any and all local intermediate
+ certs to the stores automatically.
+ - PSK support
+ - Was added in Windows 10 (it seems), documentation at time of writing is sparse/non-existent.
+ - Specifically about how to supply credentials when they're requested.
+ - Or how to recognize that they're requested in the first place.
+ - Skip certificate verification.
+ - Check if "PSK-only" is still required to do PSK _at all_ (all-around bad solution).
+ - Check if SEC_I_INCOMPLETE_CREDENTIALS is still returned for both "missing certificate" and
+ "missing PSK" when calling InitializeSecurityContext in "performHandshake".
+
+ Medium priority:
+ - Setting cipher-suites (or ALG_ID)
+ - People have survived without it in WinRT
+ - ALPN:
+ For HTTP2. Note: Windows 8.1 and up ONLY.
+
+ Low priority:
+ - Possibly make RAII wrappers for SecBuffer (which I commonly create QScopeGuards for)
+ - Perform the '@future' optimization in "transmit()"
+
+*/
+
+QT_BEGIN_NAMESPACE
+
+namespace {
+SecBuffer createSecBuffer(void *ptr, unsigned long length, unsigned long bufferType)
+{
+ return SecBuffer{ length, bufferType, ptr };
+}
+
+SecBuffer createSecBuffer(QByteArray &buffer, unsigned long bufferType)
+{
+ return createSecBuffer(buffer.data(), static_cast<unsigned long>(buffer.length()), bufferType);
+}
+
+QString schannelErrorToString(qint32 status)
+{
+ switch (status) {
+ case SEC_E_INSUFFICIENT_MEMORY:
+ return QSslSocket::tr("Insufficient memory");
+ case SEC_E_INTERNAL_ERROR:
+ return QSslSocket::tr("Internal error");
+ case SEC_E_INVALID_HANDLE:
+ return QSslSocket::tr("An internal handle was invalid");
+ case SEC_E_INVALID_TOKEN:
+ return QSslSocket::tr("An internal token was invalid");
+ case SEC_E_LOGON_DENIED:
+ // According to the link below we get this error when Schannel receives TLS1_ALERT_ACCESS_DENIED
+ // https://docs.microsoft.com/en-us/windows/desktop/secauthn/schannel-error-codes-for-tls-and-ssl-alerts
+ return QSslSocket::tr("Access denied");
+ case SEC_E_NO_AUTHENTICATING_AUTHORITY:
+ return QSslSocket::tr("No authority could be contacted for authorization");
+ case SEC_E_NO_CREDENTIALS:
+ return QSslSocket::tr("No credentials");
+ case SEC_E_TARGET_UNKNOWN:
+ return QSslSocket::tr("The target is unknown or unreachable");
+ case SEC_E_UNSUPPORTED_FUNCTION:
+ return QSslSocket::tr("An unsupported function was requested");
+ case SEC_E_WRONG_PRINCIPAL:
+ // SNI error
+ return QSslSocket::tr("The hostname provided does not match the one received from the peer");
+ case SEC_E_APPLICATION_PROTOCOL_MISMATCH:
+ return QSslSocket::tr("No common protocol exists between the client and the server");
+ case SEC_E_ILLEGAL_MESSAGE:
+ return QSslSocket::tr("Unexpected or badly-formatted message received");
+ case SEC_E_ENCRYPT_FAILURE:
+ return QSslSocket::tr("The data could not be encrypted");
+ case SEC_E_ALGORITHM_MISMATCH:
+ return QSslSocket::tr("No cipher suites in common");
+ case SEC_E_UNKNOWN_CREDENTIALS:
+ // This can mean "invalid argument" in some cases...
+ return QSslSocket::tr("The credentials were not recognized / Invalid argument");
+ case SEC_E_MESSAGE_ALTERED:
+ // According to the Internet it also triggers for messages that are out of order.
+ // https://microsoft.public.platformsdk.security.narkive.com/4JAvlMvD/help-please-schannel-security-contexts-and-decryptmessage
+ return QSslSocket::tr("The message was tampered with, damaged or out of sequence.");
+ case SEC_E_OUT_OF_SEQUENCE:
+ return QSslSocket::tr("A message was received out of sequence.");
+ case SEC_E_CONTEXT_EXPIRED:
+ return QSslSocket::tr("The TLS/SSL connection has been closed");
+ default:
+ return QSslSocket::tr("Unknown error occurred: %1").arg(status);
+ }
+}
+
+DWORD toSchannelProtocol(QSsl::SslProtocol protocol)
+{
+ DWORD protocols = SP_PROT_NONE;
+ switch (protocol) {
+ case QSsl::UnknownProtocol:
+ return DWORD(-1);
+ case QSsl::DtlsV1_0:
+ case QSsl::DtlsV1_2:
+ case QSsl::DtlsV1_0OrLater:
+ case QSsl::DtlsV1_2OrLater:
+ return DWORD(-1); // Not supported at the moment (@future)
+ case QSsl::AnyProtocol:
+ protocols = SP_PROT_TLS1_0 | SP_PROT_TLS1_1 | SP_PROT_TLS1_2;
+ // @future Add TLS 1.3 when supported by Windows!
+ break;
+ case QSsl::SslV2:
+ case QSsl::SslV3:
+ return DWORD(-1); // Not supported
+ case QSsl::TlsV1SslV3:
+ protocols = SP_PROT_TLS1_0;
+ break;
+ case QSsl::TlsV1_0:
+ protocols = SP_PROT_TLS1_0;
+ break;
+ case QSsl::TlsV1_1:
+ protocols = SP_PROT_TLS1_1;
+ break;
+ case QSsl::TlsV1_2:
+ protocols = SP_PROT_TLS1_2;
+ break;
+ case QSsl::TlsV1_3:
+ if ((false)) // @future[0/1] Replace with version check once it's supported in Windows
+ protocols = SP_PROT_TLS1_3;
+ else
+ protocols = DWORD(-1);
+ break;
+ case QSsl::SecureProtocols: // TLS v1.0 and later is currently considered secure
+ case QSsl::TlsV1_0OrLater:
+ // For the "OrLater" protocols we fall through from one to the next, adding all of them
+ // in ascending order
+ protocols = SP_PROT_TLS1_0;
+ Q_FALLTHROUGH();
+ case QSsl::TlsV1_1OrLater:
+ protocols |= SP_PROT_TLS1_1;
+ Q_FALLTHROUGH();
+ case QSsl::TlsV1_2OrLater:
+ protocols |= SP_PROT_TLS1_2;
+ Q_FALLTHROUGH();
+ case QSsl::TlsV1_3OrLater:
+ if ((false)) // @future[1/1] Also replace this with a version check
+ protocols |= SP_PROT_TLS1_3;
+ else if (protocol == QSsl::TlsV1_3OrLater)
+ protocols = DWORD(-1); // if TlsV1_3OrLater was specifically chosen we should fail
+ break;
+ }
+ return protocols;
+}
+
+/*!
+ \internal
+ Used when converting the established session's \a protocol back to
+ Qt's own SslProtocol type.
+
+ Only one protocol should be passed in at a time.
+*/
+QSsl::SslProtocol toQtSslProtocol(DWORD protocol)
+{
+#define MAP_PROTOCOL(sp_protocol, q_protocol) \
+ if (protocol & sp_protocol) { \
+ Q_ASSERT(!(protocol & ~sp_protocol)); \
+ return q_protocol; \
+ }
+
+ MAP_PROTOCOL(SP_PROT_TLS1_0, QSsl::TlsV1_0)
+ MAP_PROTOCOL(SP_PROT_TLS1_1, QSsl::TlsV1_1)
+ MAP_PROTOCOL(SP_PROT_TLS1_2, QSsl::TlsV1_2)
+ MAP_PROTOCOL(SP_PROT_TLS1_3, QSsl::TlsV1_3)
+#undef MAP_PROTOCOL
+ Q_UNREACHABLE();
+ return QSsl::UnknownProtocol;
+}
+
+/*!
+ \internal
+ Used by verifyCertContext to check if a client cert is used by a server or vice versa.
+*/
+bool netscapeWrongCertType(const QList<QSslCertificateExtension> &extensions, bool isClient)
+{
+ const auto netscapeIt = std::find_if(
+ extensions.cbegin(), extensions.cend(),
+ [](const QSslCertificateExtension &extension) {
+ const auto netscapeCertType = QStringLiteral("2.16.840.1.113730.1.1");
+ return extension.oid() == netscapeCertType;
+ });
+ if (netscapeIt != extensions.cend()) {
+ const QByteArray netscapeCertTypeByte = netscapeIt->value().toByteArray();
+ int netscapeCertType = 0;
+ QDataStream dataStream(netscapeCertTypeByte);
+ dataStream >> netscapeCertType;
+ if (dataStream.status() != QDataStream::Status::Ok)
+ return true;
+ const int expectedPeerCertType = isClient ? NETSCAPE_SSL_SERVER_AUTH_CERT_TYPE
+ : NETSCAPE_SSL_CLIENT_AUTH_CERT_TYPE;
+ if ((netscapeCertType & expectedPeerCertType) == 0)
+ return true;
+ }
+ return false;
+}
+
+/*!
+ \internal
+ Used by verifyCertContext to check the basicConstraints certificate
+ extension to see if the certificate is a certificate authority.
+ Returns false if the certificate does not have the basicConstraints
+ extension or if it is not a certificate authority.
+*/
+bool isCertificateAuthority(const QList<QSslCertificateExtension> &extensions)
+{
+ auto it = std::find_if(extensions.cbegin(), extensions.cend(),
+ [](const QSslCertificateExtension &extension) {
+ return extension.name() == QLatin1String("basicConstraints");
+ });
+ if (it != extensions.cend()) {
+ QVariantMap basicConstraints = it->value().toMap();
+ return basicConstraints.value(QLatin1String("ca"), false).toBool();
+ }
+ return false;
+}
+
+/*!
+ \internal
+ Returns true if the attributes we requested from the context/handshake have
+ been given.
+*/
+bool matchesContextRequirements(DWORD attributes, DWORD requirements,
+ QSslSocket::PeerVerifyMode verifyMode,
+ bool isClient)
+{
+#ifdef QSSLSOCKET_DEBUG
+#define DEBUG_WARN(message) qCWarning(lcSsl, message)
+#else
+#define DEBUG_WARN(message)
+#endif
+
+#define CHECK_ATTRIBUTE(attributeName) \
+ do { \
+ const DWORD req##attributeName = isClient ? ISC_REQ_##attributeName : ASC_REQ_##attributeName; \
+ const DWORD ret##attributeName = isClient ? ISC_RET_##attributeName : ASC_RET_##attributeName; \
+ if (!(requirements & req##attributeName) != !(attributes & ret##attributeName)) { \
+ DEBUG_WARN("Missing attribute \"" #attributeName "\""); \
+ return false; \
+ } \
+ } while (false)
+
+ CHECK_ATTRIBUTE(CONFIDENTIALITY);
+ CHECK_ATTRIBUTE(REPLAY_DETECT);
+ CHECK_ATTRIBUTE(SEQUENCE_DETECT);
+ CHECK_ATTRIBUTE(STREAM);
+ if (verifyMode == QSslSocket::PeerVerifyMode::VerifyPeer)
+ CHECK_ATTRIBUTE(MUTUAL_AUTH);
+
+ // This one is manual because there is no server / ASC_ version
+ if (isClient) {
+ const auto reqManualCredValidation = ISC_REQ_MANUAL_CRED_VALIDATION;
+ const auto retManualCredValidation = ISC_RET_MANUAL_CRED_VALIDATION;
+ if (!(requirements & reqManualCredValidation) != !(attributes & retManualCredValidation)) {
+ DEBUG_WARN("Missing attribute \"MANUAL_CRED_VALIDATION\"");
+ return false;
+ }
+ }
+
+ return true;
+#undef CHECK_ATTRIBUTE
+#undef DEBUG_WARN
+}
+
+template<typename Required, typename Actual>
+Required const_reinterpret_cast(Actual *p)
+{
+ return Required(p);
+}
+
+} // anonymous namespace
+
+bool QSslSocketPrivate::s_loadRootCertsOnDemand = true;
+bool QSslSocketPrivate::s_loadedCiphersAndCerts = false;
+Q_GLOBAL_STATIC_WITH_ARGS(QMutex, qt_schannel_mutex, (QMutex::Recursive))
+
+void QSslSocketPrivate::ensureInitialized()
+{
+ const QMutexLocker locker(qt_schannel_mutex);
+ if (s_loadedCiphersAndCerts)
+ return;
+ s_loadedCiphersAndCerts = true;
+
+ setDefaultCaCertificates(systemCaCertificates());
+ s_loadRootCertsOnDemand = true; // setDefaultCaCertificates sets it to false, re-enable it.
+
+ resetDefaultCiphers();
+}
+
+void QSslSocketPrivate::resetDefaultCiphers()
+{
+ setDefaultSupportedCiphers(QSslSocketBackendPrivate::defaultCiphers());
+ setDefaultCiphers(QSslSocketBackendPrivate::defaultCiphers());
+}
+
+void QSslSocketPrivate::resetDefaultEllipticCurves()
+{
+ Q_UNIMPLEMENTED();
+}
+
+bool QSslSocketPrivate::supportsSsl()
+{
+ return true;
+}
+
+QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
+{
+ // Copied from qsslsocket_openssl.cpp's systemCaCertificates function.
+ QList<QSslCertificate> systemCerts;
+ auto hSystemStore = QHCertStorePointer(CertOpenSystemStore(0, L"ROOT"));
+ if (hSystemStore) {
+ PCCERT_CONTEXT pc = nullptr;
+ while ((pc = CertFindCertificateInStore(hSystemStore.get(), X509_ASN_ENCODING, 0,
+ CERT_FIND_ANY, nullptr, pc))) {
+ systemCerts.append(QSslCertificatePrivate::QSslCertificate_from_CERT_CONTEXT(pc));
+ }
+ }
+ return systemCerts;
+}
+
+long QSslSocketPrivate::sslLibraryVersionNumber()
+{
+ const auto os = QOperatingSystemVersion::current();
+ return (os.majorVersion() << 24) | ((os.minorVersion() & 0xFF) << 16) | (os.microVersion() & 0xFFFF);
+}
+
+QString QSslSocketPrivate::sslLibraryVersionString()
+{
+ const auto os = QOperatingSystemVersion::current();
+ return QString::fromLatin1("Secure Channel, %1 %2.%3.%4")
+ .arg(os.name(),
+ QString::number(os.majorVersion()),
+ QString::number(os.minorVersion()),
+ QString::number(os.microVersion()));
+}
+
+long QSslSocketPrivate::sslLibraryBuildVersionNumber()
+{
+ // There is no separate build version
+ return sslLibraryVersionNumber();
+}
+
+QString QSslSocketPrivate::sslLibraryBuildVersionString()
+{
+ const auto os = QOperatingSystemVersion::current();
+ return QString::fromLatin1("%1.%2.%3")
+ .arg(QString::number(os.majorVersion()),
+ QString::number(os.minorVersion()),
+ QString::number(os.microVersion()));
+}
+
+QSslSocketBackendPrivate::QSslSocketBackendPrivate()
+{
+ SecInvalidateHandle(&credentialHandle);
+ SecInvalidateHandle(&contextHandle);
+ ensureInitialized();
+}
+
+QSslSocketBackendPrivate::~QSslSocketBackendPrivate()
+{
+ closeCertificateStores();
+ deallocateContext();
+ freeCredentialsHandle();
+ CertFreeCertificateContext(localCertContext);
+}
+
+bool QSslSocketBackendPrivate::sendToken(void *token, unsigned long tokenLength, bool emitError)
+{
+ if (tokenLength == 0)
+ return true;
+ const qint64 written = plainSocket->write(static_cast<const char *>(token), tokenLength);
+ if (written != qint64(tokenLength)) {
+ // Failed to write/buffer everything or an error occurred
+ if (emitError)
+ setErrorAndEmit(plainSocket->error(), plainSocket->errorString());
+ return false;
+ }
+ return true;
+}
+
+QString QSslSocketBackendPrivate::targetName() const
+{
+ // Used for SNI extension
+ return verificationPeerName.isEmpty() ? q_func()->peerName() : verificationPeerName;
+}
+
+ULONG QSslSocketBackendPrivate::getContextRequirements()
+{
+ const bool isClient = mode == QSslSocket::SslClientMode;
+ ULONG req = 0;
+
+ req |= ISC_REQ_ALLOCATE_MEMORY; // Allocate memory for buffers automatically
+ req |= ISC_REQ_CONFIDENTIALITY; // Encrypt messages
+ req |= ISC_REQ_REPLAY_DETECT; // Detect replayed messages
+ req |= ISC_REQ_SEQUENCE_DETECT; // Detect out of sequence messages
+ req |= ISC_REQ_STREAM; // Support a stream-oriented connection
+
+ if (isClient) {
+ req |= ISC_REQ_MANUAL_CRED_VALIDATION; // Manually validate certificate
+ } else {
+ switch (configuration.peerVerifyMode) {
+ case QSslSocket::PeerVerifyMode::VerifyNone:
+ // There doesn't seem to be a way to ask for an optional client cert :-(
+ case QSslSocket::PeerVerifyMode::AutoVerifyPeer:
+ case QSslSocket::PeerVerifyMode::QueryPeer:
+ break;
+ case QSslSocket::PeerVerifyMode::VerifyPeer:
+ req |= ISC_REQ_MUTUAL_AUTH;
+ break;
+ }
+ }
+
+ return req;
+}
+
+bool QSslSocketBackendPrivate::acquireCredentialsHandle()
+{
+ Q_ASSERT(schannelState == SchannelState::InitializeHandshake);
+
+ const bool isClient = mode == QSslSocket::SslClientMode;
+ const DWORD protocols = toSchannelProtocol(configuration.protocol);
+ if (protocols == DWORD(-1)) {
+ setErrorAndEmit(QAbstractSocket::SslInvalidUserDataError,
+ QSslSocket::tr("Invalid protocol chosen"));
+ return false;
+ }
+
+ const CERT_CHAIN_CONTEXT *chainContext = nullptr;
+ auto freeCertChain = qScopeGuard([&chainContext]() {
+ if (chainContext)
+ CertFreeCertificateChain(chainContext);
+ });
+
+ DWORD certsCount = 0;
+ // Set up our certificate stores before trying to use one...
+ initializeCertificateStores();
+
+ // Check if user has specified a certificate chain but it could not be loaded.
+ // This happens if there was something wrong with the certificate chain or there was no private
+ // key.
+ if (!configuration.localCertificateChain.isEmpty() && !localCertificateStore)
+ return true; // 'true' because "tst_QSslSocket::setEmptyKey" expects us to not disconnect
+
+ if (localCertificateStore != nullptr) {
+ CERT_CHAIN_FIND_BY_ISSUER_PARA findParam;
+ ZeroMemory(&findParam, sizeof(findParam));
+ findParam.cbSize = sizeof(findParam);
+ findParam.pszUsageIdentifier = isClient ? szOID_PKIX_KP_CLIENT_AUTH : szOID_PKIX_KP_SERVER_AUTH;
+
+ // There should only be one chain in our store, so.. we grab that one.
+ chainContext = CertFindChainInStore(localCertificateStore.get(),
+ X509_ASN_ENCODING,
+ 0,
+ CERT_CHAIN_FIND_BY_ISSUER,
+ &findParam,
+ nullptr);
+ if (!chainContext) {
+ setErrorAndEmit(QAbstractSocket::SocketError::SslInvalidUserDataError,
+ QSslSocket::tr("The certificate provided can not be used for a %1.")
+ .arg(isClient ? QSslSocket::tr("client")
+ : QSslSocket::tr("server")));
+ return false;
+ }
+ Q_ASSERT(chainContext->cChain == 1);
+ Q_ASSERT(chainContext->rgpChain[0]);
+ Q_ASSERT(chainContext->rgpChain[0]->cbSize >= 1);
+ Q_ASSERT(chainContext->rgpChain[0]->rgpElement[0]);
+ Q_ASSERT(!localCertContext);
+ localCertContext = CertDuplicateCertificateContext(chainContext->rgpChain[0]
+ ->rgpElement[0]
+ ->pCertContext);
+ certsCount = 1;
+ Q_ASSERT(localCertContext);
+ }
+
+ SCHANNEL_CRED cred{
+ SCHANNEL_CRED_VERSION, // dwVersion
+ certsCount, // cCreds
+ &localCertContext, // paCred (certificate(s) containing a private key for authentication)
+ nullptr, // hRootStore
+
+ 0, // cMappers (reserved)
+ nullptr, // aphMappers (reserved)
+
+ 0, // cSupportedAlgs
+ nullptr, // palgSupportedAlgs (nullptr = system default) @future: QSslCipher-related
+
+ protocols, // grbitEnabledProtocols
+ 0, // dwMinimumCipherStrength (0 = system default)
+ 0, // dwMaximumCipherStrength (0 = system default)
+ 0, // dwSessionLifespan (0 = schannel default, 10 hours)
+ SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT
+ | SCH_CRED_NO_DEFAULT_CREDS, // dwFlags
+ 0 // dwCredFormat (must be 0)
+ };
+
+ TimeStamp expiration{};
+ auto status = AcquireCredentialsHandle(nullptr, // pszPrincipal (unused)
+ const_cast<wchar_t *>(UNISP_NAME), // pszPackage
+ isClient ? SECPKG_CRED_OUTBOUND : SECPKG_CRED_INBOUND, // fCredentialUse
+ nullptr, // pvLogonID (unused)
+ &cred, // pAuthData
+ nullptr, // pGetKeyFn (unused)
+ nullptr, // pvGetKeyArgument (unused)
+ &credentialHandle, // phCredential
+ &expiration // ptsExpir
+ );
+
+ if (status != SEC_E_OK) {
+ setErrorAndEmit(QAbstractSocket::SslInternalError, schannelErrorToString(status));
+ return false;
+ }
+ return true;
+}
+
+void QSslSocketBackendPrivate::deallocateContext()
+{
+ if (SecIsValidHandle(&contextHandle)) {
+ DeleteSecurityContext(&contextHandle);
+ SecInvalidateHandle(&contextHandle);
+ }
+}
+
+void QSslSocketBackendPrivate::freeCredentialsHandle()
+{
+ if (SecIsValidHandle(&credentialHandle)) {
+ FreeCredentialsHandle(&credentialHandle);
+ SecInvalidateHandle(&credentialHandle);
+ }
+}
+
+void QSslSocketBackendPrivate::closeCertificateStores()
+{
+ localCertificateStore.reset();
+ peerCertificateStore.reset();
+ caCertificateStore.reset();
+}
+
+bool QSslSocketBackendPrivate::createContext()
+{
+ Q_ASSERT(SecIsValidHandle(&credentialHandle));
+ Q_ASSERT(schannelState == SchannelState::InitializeHandshake);
+ Q_ASSERT(mode == QSslSocket::SslClientMode);
+ ULONG contextReq = getContextRequirements();
+
+ SecBuffer outBuffers[3];
+ outBuffers[0] = createSecBuffer(nullptr, 0, SECBUFFER_TOKEN);
+ outBuffers[1] = createSecBuffer(nullptr, 0, SECBUFFER_ALERT);
+ outBuffers[2] = createSecBuffer(nullptr, 0, SECBUFFER_EMPTY);
+ auto freeBuffers = qScopeGuard([&outBuffers]() {
+ for (auto i = 0ull; i < ARRAYSIZE(outBuffers); i++) {
+ if (outBuffers[i].pvBuffer)
+ FreeContextBuffer(outBuffers[i].pvBuffer);
+ }
+ });
+ SecBufferDesc outputBufferDesc{
+ SECBUFFER_VERSION,
+ ARRAYSIZE(outBuffers),
+ outBuffers
+ };
+
+ TimeStamp expiry;
+
+ auto status = InitializeSecurityContext(&credentialHandle, // phCredential
+ nullptr, // phContext
+ const_reinterpret_cast<SEC_WCHAR *>(targetName().utf16()), // pszTargetName
+ contextReq, // fContextReq
+ 0, // Reserved1
+ 0, // TargetDataRep (unused)
+ nullptr, // pInput (no input at the moment @future: alpn)
+ 0, // Reserved2
+ &contextHandle, // phNewContext
+ &outputBufferDesc, // pOutput
+ &contextAttributes, // pfContextAttr
+ &expiry // ptsExpiry
+ );
+
+ // This is the first call to InitializeSecurityContext, so theoretically "CONTINUE_NEEDED"
+ // should be the only non-error return-code here.
+ if (status != SEC_I_CONTINUE_NEEDED) {
+ setErrorAndEmit(QAbstractSocket::SslInternalError,
+ QSslSocket::tr("Error creating SSL context (%1)").arg(schannelErrorToString(status)));
+ return false;
+ }
+
+ if (!sendToken(outBuffers[0].pvBuffer, outBuffers[0].cbBuffer))
+ return false;
+ schannelState = SchannelState::PerformHandshake;
+ return true;
+}
+
+bool QSslSocketBackendPrivate::acceptContext()
+{
+ Q_ASSERT(SecIsValidHandle(&credentialHandle));
+ Q_ASSERT(schannelState == SchannelState::InitializeHandshake);
+ Q_ASSERT(mode == QSslSocket::SslServerMode);
+ ULONG contextReq = getContextRequirements();
+
+ intermediateBuffer += plainSocket->read(16384);
+ if (intermediateBuffer.isEmpty())
+ return true; // definitely need more data..
+
+ SecBuffer inBuffers[2];
+ inBuffers[0] = createSecBuffer(intermediateBuffer, SECBUFFER_TOKEN);
+ inBuffers[1] = createSecBuffer(nullptr, 0, SECBUFFER_EMPTY);
+ SecBufferDesc inputBufferDesc{
+ SECBUFFER_VERSION,
+ ARRAYSIZE(inBuffers),
+ inBuffers
+ };
+
+ SecBuffer outBuffers[3];
+ outBuffers[0] = createSecBuffer(nullptr, 0, SECBUFFER_TOKEN);
+ outBuffers[1] = createSecBuffer(nullptr, 0, SECBUFFER_ALERT);
+ outBuffers[2] = createSecBuffer(nullptr, 0, SECBUFFER_EMPTY);
+ auto freeBuffers = qScopeGuard([&outBuffers]() {
+ for (auto i = 0ull; i < ARRAYSIZE(outBuffers); i++) {
+ if (outBuffers[i].pvBuffer)
+ FreeContextBuffer(outBuffers[i].pvBuffer);
+ }
+ });
+ SecBufferDesc outputBufferDesc{
+ SECBUFFER_VERSION,
+ ARRAYSIZE(outBuffers),
+ outBuffers
+ };
+
+ TimeStamp expiry;
+ auto status = AcceptSecurityContext(
+ &credentialHandle, // phCredential
+ nullptr, // phContext
+ &inputBufferDesc, // pInput
+ contextReq, // fContextReq
+ 0, // TargetDataRep (unused)
+ &contextHandle, // phNewContext
+ &outputBufferDesc, // pOutput
+ &contextAttributes, // pfContextAttr
+ &expiry // ptsTimeStamp
+ );
+
+ if (inBuffers[1].BufferType == SECBUFFER_EXTRA) {
+ // https://docs.microsoft.com/en-us/windows/desktop/secauthn/extra-buffers-returned-by-schannel
+ // inBuffers[1].cbBuffer indicates the amount of bytes _NOT_ processed, the rest need to
+ // be stored.
+ intermediateBuffer = intermediateBuffer.right(int(inBuffers[1].cbBuffer));
+ } else if (status != SEC_E_INCOMPLETE_MESSAGE) {
+ intermediateBuffer.clear();
+ }
+
+ if (status != SEC_I_CONTINUE_NEEDED) {
+ setErrorAndEmit(QAbstractSocket::SslHandshakeFailedError,
+ QSslSocket::tr("Error creating SSL context (%1)").arg(schannelErrorToString(status)));
+ return false;
+ }
+ if (!sendToken(outBuffers[0].pvBuffer, outBuffers[0].cbBuffer))
+ return false;
+ schannelState = SchannelState::PerformHandshake;
+ return true;
+}
+
+bool QSslSocketBackendPrivate::performHandshake()
+{
+ if (plainSocket->state() == QAbstractSocket::UnconnectedState) {
+ setErrorAndEmit(QAbstractSocket::RemoteHostClosedError,
+ QSslSocket::tr("The TLS/SSL connection has been closed"));
+ return false;
+ }
+ Q_ASSERT(SecIsValidHandle(&credentialHandle));
+ Q_ASSERT(SecIsValidHandle(&contextHandle));
+ Q_ASSERT(schannelState == SchannelState::PerformHandshake);
+
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << "Bytes available from socket:" << plainSocket->bytesAvailable();
+ qCDebug(lcSsl) << "intermediateBuffer size:" << intermediateBuffer.size();
+#endif
+
+ intermediateBuffer += plainSocket->read(16384);
+ if (intermediateBuffer.isEmpty())
+ return true; // no data, will fail
+
+ SecBuffer inputBuffers[2];
+ inputBuffers[0] = createSecBuffer(intermediateBuffer, SECBUFFER_TOKEN);
+ inputBuffers[1] = createSecBuffer(nullptr, 0, SECBUFFER_EMPTY);
+ SecBufferDesc inputBufferDesc{
+ SECBUFFER_VERSION,
+ ARRAYSIZE(inputBuffers),
+ inputBuffers
+ };
+
+ SecBuffer outBuffers[3];
+ outBuffers[0] = createSecBuffer(nullptr, 0, SECBUFFER_TOKEN);
+ outBuffers[1] = createSecBuffer(nullptr, 0, SECBUFFER_ALERT);
+ outBuffers[2] = createSecBuffer(nullptr, 0, SECBUFFER_EMPTY);
+ auto freeBuffers = qScopeGuard([&outBuffers]() {
+ for (auto i = 0ull; i < ARRAYSIZE(outBuffers); i++) {
+ if (outBuffers[i].pvBuffer)
+ FreeContextBuffer(outBuffers[i].pvBuffer);
+ }
+ });
+ SecBufferDesc outputBufferDesc{
+ SECBUFFER_VERSION,
+ ARRAYSIZE(outBuffers),
+ outBuffers
+ };
+
+ ULONG contextReq = getContextRequirements();
+ TimeStamp expiry;
+ auto status = InitializeSecurityContext(&credentialHandle, // phCredential
+ &contextHandle, // phContext
+ const_reinterpret_cast<SEC_WCHAR *>(targetName().utf16()), // pszTargetName
+ contextReq, // fContextReq
+ 0, // Reserved1
+ 0, // TargetDataRep (unused)
+ &inputBufferDesc, // pInput
+ 0, // Reserved2
+ nullptr, // phNewContext (we already have one)
+ &outputBufferDesc, // pOutput
+ &contextAttributes, // pfContextAttr
+ &expiry // ptsExpiry
+ );
+
+ if (inputBuffers[1].BufferType == SECBUFFER_EXTRA) {
+ // https://docs.microsoft.com/en-us/windows/desktop/secauthn/extra-buffers-returned-by-schannel
+ // inputBuffers[1].cbBuffer indicates the amount of bytes _NOT_ processed, the rest need to
+ // be stored.
+ intermediateBuffer = intermediateBuffer.right(int(inputBuffers[1].cbBuffer));
+ } else {
+ // Clear the buffer if we weren't asked for more data
+ if (status != SEC_E_INCOMPLETE_MESSAGE)
+ intermediateBuffer.clear();
+ }
+ switch (status) {
+ case SEC_E_OK:
+ // Need to transmit a final token in the handshake if 'cbBuffer' is non-zero.
+ if (!sendToken(outBuffers[0].pvBuffer, outBuffers[0].cbBuffer))
+ return false;
+ schannelState = SchannelState::VerifyHandshake;
+ return true;
+ case SEC_I_CONTINUE_NEEDED:
+ if (!sendToken(outBuffers[0].pvBuffer, outBuffers[0].cbBuffer))
+ return false;
+ // Must call InitializeSecurityContext again later (done through continueHandshake)
+ return true;
+ case SEC_I_INCOMPLETE_CREDENTIALS:
+ // Schannel takes care of picking certificate to send (other than the one we can specify),
+ // so if we get here then that means we don't have a certificate the server accepts.
+ setErrorAndEmit(QAbstractSocket::SslHandshakeFailedError,
+ QSslSocket::tr("Server did not accept any certificate we could present."));
+ return false;
+ case SEC_I_CONTEXT_EXPIRED:
+ // "The message sender has finished using the connection and has initiated a shutdown."
+ if (outBuffers[0].BufferType == SECBUFFER_TOKEN) {
+ if (!sendToken(outBuffers[0].pvBuffer, outBuffers[0].cbBuffer))
+ return false;
+ }
+ if (!shutdown) { // we did not initiate this
+ setErrorAndEmit(QAbstractSocket::RemoteHostClosedError,
+ QSslSocket::tr("The TLS/SSL connection has been closed"));
+ }
+ return true;
+ case SEC_E_INCOMPLETE_MESSAGE:
+ // Simply incomplete, wait for more data
+ return true;
+ case SEC_E_ALGORITHM_MISMATCH:
+ setErrorAndEmit(QAbstractSocket::SslHandshakeFailedError,
+ QSslSocket::tr("Algorithm mismatch"));
+ shutdown = true; // skip sending the "Shutdown" alert
+ return false;
+ }
+
+ // Note: We can get here if the connection is using TLS 1.2 and the server certificate uses
+ // MD5, which is not allowed in Schannel. This causes an "invalid token" error during handshake.
+ // (If you came here investigating an error: md5 is insecure, update your certificate)
+ setErrorAndEmit(QAbstractSocket::SslHandshakeFailedError,
+ QSslSocket::tr("Handshake failed: %1").arg(schannelErrorToString(status)));
+ return false;
+}
+
+bool QSslSocketBackendPrivate::verifyHandshake()
+{
+ Q_Q(QSslSocket);
+
+ const bool isClient = mode == QSslSocket::SslClientMode;
+#define CHECK_STATUS(status) \
+ if (status != SEC_E_OK) { \
+ setErrorAndEmit(QAbstractSocket::SslInternalError, \
+ QSslSocket::tr("Failed to query the TLS context: %1") \
+ .arg(schannelErrorToString(status))); \
+ return false; \
+ }
+
+ // Everything is set up, now make sure there's nothing wrong and query some attributes...
+ if (!matchesContextRequirements(contextAttributes, getContextRequirements(),
+ configuration.peerVerifyMode, isClient)) {
+ setErrorAndEmit(QAbstractSocket::SslHandshakeFailedError,
+ QSslSocket::tr("Did not get the required attributes for the connection."));
+ return false;
+ }
+
+ // Get stream sizes (to know the max size of a message and the size of the header and trailer)
+ auto status = QueryContextAttributes(&contextHandle,
+ SECPKG_ATTR_STREAM_SIZES,
+ &streamSizes);
+ CHECK_STATUS(status);
+
+ // Get session cipher info
+ status = QueryContextAttributes(&contextHandle,
+ SECPKG_ATTR_CONNECTION_INFO,
+ &connectionInfo);
+ CHECK_STATUS(status);
+#undef CHECK_STATUS
+
+ // Verify certificate
+ CERT_CONTEXT *certificateContext = nullptr;
+ auto freeCertificate = qScopeGuard([&certificateContext]() {
+ if (certificateContext)
+ CertFreeCertificateContext(certificateContext);
+ });
+ status = QueryContextAttributes(&contextHandle,
+ SECPKG_ATTR_REMOTE_CERT_CONTEXT,
+ &certificateContext);
+
+ // QueryPeer can (currently) not work in Schannel since Schannel itself doesn't have a way to
+ // ask for a certificate and then still be OK if it's not received.
+ // To work around this we don't request a certificate at all for QueryPeer.
+ // For servers AutoVerifyPeer is supposed to be treated the same as QueryPeer.
+ // This means that servers using Schannel will only request client certificate for "VerifyPeer".
+ if ((!isClient && configuration.peerVerifyMode == QSslSocket::PeerVerifyMode::VerifyPeer)
+ || (isClient && configuration.peerVerifyMode != QSslSocket::PeerVerifyMode::VerifyNone
+ && configuration.peerVerifyMode != QSslSocket::PeerVerifyMode::QueryPeer)) {
+ if (status != SEC_E_OK) {
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << "Couldn't retrieve peer certificate, status:"
+ << schannelErrorToString(status);
+#endif
+ const QSslError error{ QSslError::NoPeerCertificate };
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+ }
+
+ // verifyCertContext returns false if the user disconnected while it was checking errors.
+ if (certificateContext && sslErrors.isEmpty() && !verifyCertContext(certificateContext))
+ return false;
+
+ if (!checkSslErrors() || state != QAbstractSocket::ConnectedState) {
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << __func__ << "was unsuccessful. Paused:" << paused;
+#endif
+ // If we're paused then checkSslErrors returned false, but it's not an error
+ return paused && state == QAbstractSocket::ConnectedState;
+ }
+
+ schannelState = SchannelState::Done;
+ peerCertVerified = true;
+ return true;
+}
+
+bool QSslSocketBackendPrivate::renegotiate()
+{
+ SecBuffer outBuffers[3];
+ outBuffers[0] = createSecBuffer(nullptr, 0, SECBUFFER_TOKEN);
+ outBuffers[1] = createSecBuffer(nullptr, 0, SECBUFFER_ALERT);
+ outBuffers[2] = createSecBuffer(nullptr, 0, SECBUFFER_EMPTY);
+ auto freeBuffers = qScopeGuard([&outBuffers]() {
+ for (auto i = 0ull; i < ARRAYSIZE(outBuffers); i++) {
+ if (outBuffers[i].pvBuffer)
+ FreeContextBuffer(outBuffers[i].pvBuffer);
+ }
+ });
+ SecBufferDesc outputBufferDesc{
+ SECBUFFER_VERSION,
+ ARRAYSIZE(outBuffers),
+ outBuffers
+ };
+
+ ULONG contextReq = getContextRequirements();
+ TimeStamp expiry;
+ SECURITY_STATUS status;
+ if (mode == QSslSocket::SslClientMode) {
+ status = InitializeSecurityContext(&credentialHandle, // phCredential
+ &contextHandle, // phContext
+ const_reinterpret_cast<SEC_WCHAR *>(targetName().utf16()), // pszTargetName
+ contextReq, // fContextReq
+ 0, // Reserved1
+ 0, // TargetDataRep (unused)
+ nullptr, // pInput (nullptr for renegotiate)
+ 0, // Reserved2
+ nullptr, // phNewContext (we already have one)
+ &outputBufferDesc, // pOutput
+ &contextAttributes, // pfContextAttr
+ &expiry // ptsExpiry
+ );
+ } else {
+ status = AcceptSecurityContext(
+ &credentialHandle, // phCredential
+ &contextHandle, // phContext
+ nullptr, // pInput
+ contextReq, // fContextReq
+ 0, // TargetDataRep (unused)
+ nullptr, // phNewContext
+ &outputBufferDesc, // pOutput
+ &contextAttributes, // pfContextAttr,
+ &expiry // ptsTimeStamp
+ );
+ }
+ if (status == SEC_I_CONTINUE_NEEDED) {
+ schannelState = SchannelState::PerformHandshake;
+ return sendToken(outBuffers[0].pvBuffer, outBuffers[0].cbBuffer);
+ }
+ setErrorAndEmit(QAbstractSocket::SslHandshakeFailedError,
+ QSslSocket::tr("Renegotiation was unsuccessful: %1").arg(schannelErrorToString(status)));
+ return false;
+}
+
+/*!
+ \internal
+ reset the state in preparation for reuse of socket
+*/
+void QSslSocketBackendPrivate::reset()
+{
+ closeCertificateStores(); // certificate stores could've changed
+ deallocateContext();
+ freeCredentialsHandle(); // in case we already had one (@future: session resumption requires re-use)
+
+ connectionInfo = {};
+ streamSizes = {};
+
+ CertFreeCertificateContext(localCertContext);
+ localCertContext = nullptr;
+
+ contextAttributes = 0;
+ intermediateBuffer.clear();
+ schannelState = SchannelState::InitializeHandshake;
+
+ connectionEncrypted = false;
+ shutdown = false;
+ peerCertVerified = false;
+ renegotiating = false;
+}
+
+void QSslSocketBackendPrivate::startClientEncryption()
+{
+ if (connectionEncrypted)
+ return; // let's not mess up the connection...
+ reset();
+ continueHandshake();
+}
+
+void QSslSocketBackendPrivate::startServerEncryption()
+{
+ if (connectionEncrypted)
+ return; // let's not mess up the connection...
+ reset();
+ continueHandshake();
+}
+
+void QSslSocketBackendPrivate::transmit()
+{
+ Q_Q(QSslSocket);
+
+ // Can happen if called through QSslSocket::abort->QSslSocket::close->QSslSocket::flush->here
+ if (plainSocket->state() == QAbstractSocket::SocketState::UnconnectedState)
+ return;
+
+ if (schannelState != SchannelState::Done) {
+ continueHandshake();
+ return;
+ }
+
+ if (connectionEncrypted) { // encrypt data in writeBuffer and write it to plainSocket
+ qint64 totalBytesWritten = 0;
+ qint64 writeBufferSize;
+ while ((writeBufferSize = writeBuffer.size()) > 0) {
+ QByteArray plaintext;
+ {
+ // Try to read 'cbMaximumMessage' bytes from buffer before encrypting.
+ int size = int(std::min(writeBufferSize, qint64(streamSizes.cbMaximumMessage)));
+ plaintext.resize(size);
+ // Use peek() here instead of read() so we don't lose data if encryption fails.
+ qint64 copied = writeBuffer.peek(plaintext.data(), size);
+ Q_ASSERT(copied == size);
+ }
+ QByteArray header(int(streamSizes.cbHeader), '\0');
+ QByteArray trailer(int(streamSizes.cbTrailer), '\0');
+
+ SecBuffer inputBuffers[4]{
+ // @future[0/1]: optimize by using one container for all fields...
+ createSecBuffer(header, SECBUFFER_STREAM_HEADER),
+ createSecBuffer(plaintext, SECBUFFER_DATA),
+ createSecBuffer(trailer, SECBUFFER_STREAM_TRAILER),
+ createSecBuffer(nullptr, 0, SECBUFFER_EMPTY)
+ };
+ SecBufferDesc message{
+ SECBUFFER_VERSION,
+ ARRAYSIZE(inputBuffers),
+ inputBuffers
+ };
+ auto status = EncryptMessage(&contextHandle, 0, &message, 0);
+ if (status != SEC_E_OK) {
+ setErrorAndEmit(QAbstractSocket::SslInternalError,
+ QSslSocket::tr("Schannel failed to encrypt data: %1")
+ .arg(schannelErrorToString(status)));
+ return;
+ }
+ // Data was encrypted successfully, so we free() what we peek()ed earlier
+ writeBuffer.free(plaintext.length());
+
+ // trailer has been observed to change size, so resize them all (when needed) to be safe
+ header = header.left(int(inputBuffers[0].cbBuffer));
+ plaintext = plaintext.left(int(inputBuffers[1].cbBuffer));
+ trailer = trailer.left(int(inputBuffers[2].cbBuffer));
+ const qint64 bytesWritten = plainSocket->write(header // @future[1/1]: ...because they need to be merged
+ + plaintext
+ + trailer);
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << "Wrote" << bytesWritten << "of total"
+ << header.length() + plaintext.length() + trailer.length() << "bytes";
+#endif
+ if (bytesWritten >= 0) {
+ totalBytesWritten += bytesWritten;
+ } else {
+ setErrorAndEmit(plainSocket->error(), plainSocket->errorString());
+ return;
+ }
+ }
+
+ if (totalBytesWritten > 0) {
+ // Don't emit bytesWritten() recursively.
+ if (!emittedBytesWritten) {
+ emittedBytesWritten = true;
+ emit q->bytesWritten(totalBytesWritten);
+ emittedBytesWritten = false;
+ }
+ emit q->channelBytesWritten(0, totalBytesWritten);
+ }
+ }
+
+ if (connectionEncrypted) { // Decrypt data from remote
+ int totalRead = 0;
+ bool hadIncompleteData = false;
+ while (!readBufferMaxSize || buffer.size() < readBufferMaxSize) {
+ QByteArray ciphertext;
+ if (intermediateBuffer.length()) {
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << "Restoring data from intermediateBuffer:"
+ << intermediateBuffer.length() << "bytes";
+#endif
+ ciphertext.swap(intermediateBuffer);
+ }
+ int initialLength = ciphertext.length();
+ ciphertext += plainSocket->read(16384);
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << "Read" << ciphertext.length() - initialLength
+ << "encrypted bytes from the socket";
+#endif
+ if (ciphertext.length() == 0 || (hadIncompleteData && initialLength == ciphertext.length())) {
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << (hadIncompleteData ? "No new data received, leaving loop!"
+ : "Nothing to decrypt, leaving loop!");
+#endif
+ if (ciphertext.length()) // We have data, it came from intermediateBuffer, swap back
+ intermediateBuffer.swap(ciphertext);
+ break;
+ }
+ hadIncompleteData = false;
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << "Total amount of bytes to decrypt:" << ciphertext.length();
+#endif
+
+ SecBuffer dataBuffer[4]{
+ createSecBuffer(ciphertext, SECBUFFER_DATA),
+ createSecBuffer(nullptr, 0, SECBUFFER_EMPTY),
+ createSecBuffer(nullptr, 0, SECBUFFER_EMPTY),
+ createSecBuffer(nullptr, 0, SECBUFFER_EMPTY)
+ };
+ SecBufferDesc message{
+ SECBUFFER_VERSION,
+ ARRAYSIZE(dataBuffer),
+ dataBuffer
+ };
+ auto status = DecryptMessage(&contextHandle, &message, 0, nullptr);
+ if (status == SEC_E_OK || status == SEC_I_RENEGOTIATE || status == SEC_I_CONTEXT_EXPIRED) {
+ // There can still be 0 output even if it succeeds, this is fine
+ if (dataBuffer[1].cbBuffer > 0) {
+ // It is always decrypted in-place.
+ // But [0] is the STREAM_HEADER, [1] is the DATA and [2] is the STREAM_TRAILER.
+ // The pointers in all of those still point into the 'ciphertext' byte array.
+ buffer.append(static_cast<char *>(dataBuffer[1].pvBuffer),
+ dataBuffer[1].cbBuffer);
+ totalRead += dataBuffer[1].cbBuffer;
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << "Decrypted" << dataBuffer[1].cbBuffer
+ << "bytes. New read buffer size:" << buffer.size();
+#endif
+ }
+ if (dataBuffer[3].BufferType == SECBUFFER_EXTRA) {
+ // https://docs.microsoft.com/en-us/windows/desktop/secauthn/extra-buffers-returned-by-schannel
+ // dataBuffer[3].cbBuffer indicates the amount of bytes _NOT_ processed,
+ // the rest need to be stored.
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << "We've got excess data, moving it to the intermediate buffer:"
+ << dataBuffer[3].cbBuffer << "bytes";
+#endif
+ intermediateBuffer = ciphertext.right(int(dataBuffer[3].cbBuffer));
+ }
+ } else if (status == SEC_E_INCOMPLETE_MESSAGE) {
+ // Need more data before we can decrypt.. to the buffer it goes!
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl, "We didn't have enough data to decrypt anything, will try again!");
+#endif
+ Q_ASSERT(intermediateBuffer.isEmpty());
+ intermediateBuffer.swap(ciphertext);
+ // We try again, but if we don't get any more data then we leave
+ hadIncompleteData = true;
+ } else if (status == SEC_E_INVALID_HANDLE) {
+ // I don't think this should happen, if it does we're done...
+ qCWarning(lcSsl, "The internal SSPI handle is invalid!");
+ Q_UNREACHABLE();
+ } else if (status == SEC_E_INVALID_TOKEN) {
+ qCWarning(lcSsl, "Got SEC_E_INVALID_TOKEN!");
+ Q_UNREACHABLE(); // Happened once due to a bug, but shouldn't generally happen(?)
+ } else if (status == SEC_E_MESSAGE_ALTERED) {
+ // The message has been altered, disconnect now.
+ shutdown = true; // skips sending the shutdown alert
+ disconnectFromHost();
+ setErrorAndEmit(QAbstractSocket::SslInternalError,
+ schannelErrorToString(status));
+ break;
+ } else if (status == SEC_E_OUT_OF_SEQUENCE) {
+ // @todo: I don't know if this one is actually "fatal"..
+ // This path might never be hit as it seems this is for connection-oriented connections,
+ // while SEC_E_MESSAGE_ALTERED is for stream-oriented ones (what we use).
+ shutdown = true; // skips sending the shutdown alert
+ disconnectFromHost();
+ setErrorAndEmit(QAbstractSocket::SslInternalError,
+ schannelErrorToString(status));
+ break;
+ } else if (status == SEC_I_CONTEXT_EXPIRED) {
+ // 'remote' has initiated a shutdown
+ disconnectFromHost();
+ setErrorAndEmit(QAbstractSocket::RemoteHostClosedError,
+ schannelErrorToString(status));
+ break;
+ } else if (status == SEC_I_RENEGOTIATE) {
+ // 'remote' wants to renegotiate
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl, "The peer wants to renegotiate.");
+#endif
+ schannelState = SchannelState::Renegotiate;
+ renegotiating = true;
+ // We need to call 'continueHandshake' or else there's no guarantee it ever gets called
+ continueHandshake();
+ break;
+ }
+ }
+
+ if (totalRead) {
+ if (readyReadEmittedPointer)
+ *readyReadEmittedPointer = true;
+ emit q->readyRead();
+ emit q->channelReadyRead(0);
+ }
+ }
+}
+
+void QSslSocketBackendPrivate::sendShutdown()
+{
+ const bool isClient = mode == QSslSocket::SslClientMode;
+ DWORD shutdownToken = SCHANNEL_SHUTDOWN;
+ SecBuffer buffer = createSecBuffer(&shutdownToken, sizeof(SCHANNEL_SHUTDOWN), SECBUFFER_TOKEN);
+ SecBufferDesc token{
+ SECBUFFER_VERSION,
+ 1,
+ &buffer
+ };
+ auto status = ApplyControlToken(&contextHandle, &token);
+
+ if (status != SEC_E_OK) {
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << "Failed to apply shutdown control token:" << schannelErrorToString(status);
+#endif
+ return;
+ }
+
+ SecBuffer outBuffers[3];
+ outBuffers[0] = createSecBuffer(nullptr, 0, SECBUFFER_TOKEN);
+ outBuffers[1] = createSecBuffer(nullptr, 0, SECBUFFER_ALERT);
+ outBuffers[2] = createSecBuffer(nullptr, 0, SECBUFFER_EMPTY);
+ auto freeBuffers = qScopeGuard([&outBuffers]() {
+ for (auto i = 0ull; i < ARRAYSIZE(outBuffers); i++) {
+ if (outBuffers[i].pvBuffer)
+ FreeContextBuffer(outBuffers[i].pvBuffer);
+ }
+ });
+ SecBufferDesc outputBufferDesc{
+ SECBUFFER_VERSION,
+ ARRAYSIZE(outBuffers),
+ outBuffers
+ };
+
+ ULONG contextReq = getContextRequirements();
+ TimeStamp expiry;
+ if (isClient) {
+ status = InitializeSecurityContext(&credentialHandle, // phCredential
+ &contextHandle, // phContext
+ const_reinterpret_cast<SEC_WCHAR *>(targetName().utf16()), // pszTargetName
+ contextReq, // fContextReq
+ 0, // Reserved1
+ 0, // TargetDataRep (unused)
+ nullptr, // pInput
+ 0, // Reserved2
+ nullptr, // phNewContext (we already have one)
+ &outputBufferDesc, // pOutput
+ &contextAttributes, // pfContextAttr
+ &expiry // ptsExpiry
+ );
+ } else {
+ status = AcceptSecurityContext(
+ &credentialHandle, // phCredential
+ &contextHandle, // phContext
+ nullptr, // pInput
+ contextReq, // fContextReq
+ 0, // TargetDataRep (unused)
+ nullptr, // phNewContext
+ &outputBufferDesc, // pOutput
+ &contextAttributes, // pfContextAttr,
+ &expiry // ptsTimeStamp
+ );
+ }
+ if (status == SEC_E_OK || status == SEC_I_CONTEXT_EXPIRED) {
+ if (!sendToken(outBuffers[0].pvBuffer, outBuffers[0].cbBuffer, false)) {
+ // We failed to send the shutdown message, but it's not that important since we're
+ // shutting down anyway.
+ return;
+ }
+ } else {
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << "Failed to initialize shutdown:" << schannelErrorToString(status);
+#endif
+ }
+}
+
+void QSslSocketBackendPrivate::disconnectFromHost()
+{
+ if (SecIsValidHandle(&contextHandle)) {
+ if (!shutdown) {
+ shutdown = true;
+ if (plainSocket->state() != QAbstractSocket::UnconnectedState) {
+ if (connectionEncrypted) {
+ // Read as much as possible because this is likely our last chance
+ qint64 tempMax = readBufferMaxSize;
+ readBufferMaxSize = 0;
+ transmit();
+ readBufferMaxSize = tempMax;
+ sendShutdown();
+ }
+ }
+ }
+ }
+ if (plainSocket->state() != QAbstractSocket::UnconnectedState)
+ plainSocket->disconnectFromHost();
+}
+
+void QSslSocketBackendPrivate::disconnected()
+{
+ shutdown = true;
+ connectionEncrypted = false;
+ deallocateContext();
+ freeCredentialsHandle();
+}
+
+QSslCipher QSslSocketBackendPrivate::sessionCipher() const
+{
+ if (!connectionEncrypted)
+ return QSslCipher();
+ return QSslCipher(QStringLiteral("Schannel"), sessionProtocol());
+}
+
+QSsl::SslProtocol QSslSocketBackendPrivate::sessionProtocol() const
+{
+ if (!connectionEncrypted)
+ return QSsl::SslProtocol::UnknownProtocol;
+ return toQtSslProtocol(connectionInfo.dwProtocol);
+}
+
+void QSslSocketBackendPrivate::continueHandshake()
+{
+ Q_Q(QSslSocket);
+ const bool isServer = mode == QSslSocket::SslServerMode;
+ switch (schannelState) {
+ case SchannelState::InitializeHandshake:
+ if (!SecIsValidHandle(&credentialHandle) && !acquireCredentialsHandle()) {
+ disconnectFromHost();
+ return;
+ }
+ if (!SecIsValidHandle(&credentialHandle)) // Needed to support tst_QSslSocket::setEmptyKey
+ return;
+ if (!SecIsValidHandle(&contextHandle) && !(isServer ? acceptContext() : createContext())) {
+ disconnectFromHost();
+ return;
+ }
+ if (schannelState != SchannelState::PerformHandshake)
+ break;
+ Q_FALLTHROUGH();
+ case SchannelState::PerformHandshake:
+ if (!performHandshake()) {
+ disconnectFromHost();
+ return;
+ }
+ if (schannelState != SchannelState::VerifyHandshake)
+ break;
+ Q_FALLTHROUGH();
+ case SchannelState::VerifyHandshake:
+ // if we're in shutdown or renegotiating then we might not need to verify
+ // (since we already did)
+ if (!peerCertVerified && !verifyHandshake()) {
+ shutdown = true; // Skip sending shutdown alert
+ q->abort(); // We don't want to send buffered data
+ disconnectFromHost();
+ return;
+ }
+ if (schannelState != SchannelState::Done)
+ break;
+ Q_FALLTHROUGH();
+ case SchannelState::Done:
+ // connectionEncrypted is already true if we come here from a renegotiation
+ if (!connectionEncrypted) {
+ connectionEncrypted = true; // all is done
+ emit q->encrypted();
+ }
+ renegotiating = false;
+ if (pendingClose) {
+ pendingClose = false;
+ disconnectFromHost();
+ } else {
+ transmit();
+ }
+ break;
+ case SchannelState::Renegotiate:
+ if (!renegotiate()) {
+ disconnectFromHost();
+ return;
+ }
+ break;
+ }
+}
+
+QList<QSslCipher> QSslSocketBackendPrivate::defaultCiphers()
+{
+ QList<QSslCipher> ciphers;
+ // @temp (I hope), stolen from qsslsocket_winrt.cpp
+ const QString protocolStrings[] = { QStringLiteral("TLSv1"), QStringLiteral("TLSv1.1"),
+ QStringLiteral("TLSv1.2"), QStringLiteral("TLSv1.3") };
+ const QSsl::SslProtocol protocols[] = { QSsl::TlsV1_0, QSsl::TlsV1_1,
+ QSsl::TlsV1_2, QSsl::TlsV1_3 };
+ const int size = ARRAYSIZE(protocols);
+ Q_STATIC_ASSERT(size == ARRAYSIZE(protocolStrings));
+ ciphers.reserve(size);
+ for (int i = 0; i < size; ++i) {
+ QSslCipher cipher;
+ cipher.d->isNull = false;
+ cipher.d->name = QStringLiteral("Schannel");
+ cipher.d->protocol = protocols[i];
+ cipher.d->protocolString = protocolStrings[i];
+ ciphers.append(cipher);
+ }
+
+ return ciphers;
+}
+
+QList<QSslError> QSslSocketBackendPrivate::verify(const QList<QSslCertificate> &certificateChain,
+ const QString &hostName)
+{
+ Q_UNUSED(certificateChain);
+ Q_UNUSED(hostName);
+
+ Q_UNIMPLEMENTED();
+ return {}; // @future implement(?)
+}
+
+bool QSslSocketBackendPrivate::importPkcs12(QIODevice *device, QSslKey *key, QSslCertificate *cert,
+ QList<QSslCertificate> *caCertificates,
+ const QByteArray &passPhrase)
+{
+ Q_UNUSED(device);
+ Q_UNUSED(key);
+ Q_UNUSED(cert);
+ Q_UNUSED(caCertificates);
+ Q_UNUSED(passPhrase);
+ // @future: can load into its own certificate store (encountered problems extracting key).
+ Q_UNIMPLEMENTED();
+ return false;
+}
+
+/*
+ Copied from qsslsocket_mac.cpp, which was copied from qsslsocket_openssl.cpp
+*/
+bool QSslSocketBackendPrivate::checkSslErrors()
+{
+ if (sslErrors.isEmpty())
+ return true;
+ Q_Q(QSslSocket);
+
+ emit q->sslErrors(sslErrors);
+
+ const bool doVerifyPeer = configuration.peerVerifyMode == QSslSocket::VerifyPeer
+ || (configuration.peerVerifyMode == QSslSocket::AutoVerifyPeer
+ && mode == QSslSocket::SslClientMode);
+ const bool doEmitSslError = !verifyErrorsHaveBeenIgnored();
+ // check whether we need to emit an SSL handshake error
+ if (doVerifyPeer && doEmitSslError) {
+ if (q->pauseMode() & QAbstractSocket::PauseOnSslErrors) {
+ pauseSocketNotifiers(q);
+ paused = true;
+ } else {
+ setErrorAndEmit(QAbstractSocket::SslHandshakeFailedError,
+ sslErrors.constFirst().errorString());
+ plainSocket->disconnectFromHost();
+ }
+ return false;
+ }
+
+ return true;
+}
+
+void QSslSocketBackendPrivate::initializeCertificateStores()
+{
+ //// helper function which turns a chain into a certificate store
+ auto createStoreFromCertificateChain = [](const QList<QSslCertificate> certChain, const QSslKey &privateKey) {
+ const wchar_t *passphrase = L"";
+ // Need to embed the private key in the certificate
+ QByteArray pkcs12 = _q_makePkcs12(certChain,
+ privateKey,
+ QString::fromWCharArray(passphrase, 0));
+ CRYPT_DATA_BLOB pfxBlob;
+ pfxBlob.cbData = DWORD(pkcs12.length());
+ pfxBlob.pbData = reinterpret_cast<unsigned char *>(pkcs12.data());
+ return QHCertStorePointer(PFXImportCertStore(&pfxBlob, passphrase, 0));
+ };
+
+ if (!configuration.localCertificateChain.isEmpty()) {
+ if (configuration.privateKey.isNull()) {
+ setErrorAndEmit(QAbstractSocket::SslInvalidUserDataError,
+ QSslSocket::tr("Cannot provide a certificate with no key"));
+ return;
+ }
+ if (localCertificateStore == nullptr) {
+ localCertificateStore = createStoreFromCertificateChain(configuration.localCertificateChain,
+ configuration.privateKey);
+ if (localCertificateStore == nullptr)
+ qCWarning(lcSsl, "Failed to load certificate chain!");
+ }
+ }
+
+ if (!configuration.caCertificates.isEmpty() && !caCertificateStore) {
+ caCertificateStore = createStoreFromCertificateChain(configuration.caCertificates,
+ {}); // No private key for the CA certs
+ }
+}
+
+bool QSslSocketBackendPrivate::verifyCertContext(CERT_CONTEXT *certContext)
+{
+ Q_ASSERT(certContext);
+ Q_Q(QSslSocket);
+
+ const bool isClient = mode == QSslSocket::SslClientMode;
+
+ // Create a collection of stores so we can pass in multiple stores as additional locations to
+ // search for the certificate chain
+ auto tempCertCollection = QHCertStorePointer(CertOpenStore(CERT_STORE_PROV_COLLECTION,
+ X509_ASN_ENCODING,
+ 0,
+ CERT_STORE_CREATE_NEW_FLAG,
+ nullptr));
+ if (!tempCertCollection) {
+#ifdef QSSLSOCKET_DEBUG
+ qCWarning(lcSsl, "Failed to create certificate store collection!");
+#endif
+ return false;
+ }
+
+ if (rootCertOnDemandLoadingAllowed()) {
+ // @future(maybe): following the OpenSSL backend these certificates should be added into
+ // the Ca list, not just included during verification.
+ // That being said, it's not trivial to add the root certificates (if and only if they
+ // came from the system root store). And I don't see this mentioned in our documentation.
+ auto rootStore = QHCertStorePointer(CertOpenSystemStore(0, L"ROOT"));
+ if (!rootStore) {
+#ifdef QSSLSOCKET_DEBUG
+ qCWarning(lcSsl, "Failed to open the system root CA certificate store!");
+#endif
+ return false;
+ } else if (!CertAddStoreToCollection(tempCertCollection.get(), rootStore.get(), 0, 1)) {
+#ifdef QSSLSOCKET_DEBUG
+ qCWarning(lcSsl, "Failed to add the system root CA certificate store to the certificate store collection!");
+#endif
+ return false;
+ }
+ }
+ if (caCertificateStore) {
+ if (!CertAddStoreToCollection(tempCertCollection.get(), caCertificateStore.get(), 0, 1)) {
+#ifdef QSSLSOCKET_DEBUG
+ qCWarning(lcSsl, "Failed to add the user's CA certificate store to the certificate store collection!");
+#endif
+ return false;
+ }
+ }
+
+ if (!CertAddStoreToCollection(tempCertCollection.get(), certContext->hCertStore, 0, 0)) {
+#ifdef QSSLSOCKET_DEBUG
+ qCWarning(lcSsl, "Failed to add certificate's origin store to the certificate store collection!");
+#endif
+ return false;
+ }
+
+ CERT_CHAIN_PARA parameters;
+ ZeroMemory(&parameters, sizeof(parameters));
+ parameters.cbSize = sizeof(CERT_CHAIN_PARA);
+ parameters.RequestedUsage.dwType = USAGE_MATCH_TYPE_AND;
+ parameters.RequestedUsage.Usage.cUsageIdentifier = 1;
+ LPSTR oid = LPSTR(isClient ? szOID_PKIX_KP_SERVER_AUTH
+ : szOID_PKIX_KP_CLIENT_AUTH);
+ parameters.RequestedUsage.Usage.rgpszUsageIdentifier = &oid;
+
+ configuration.peerCertificate.clear();
+ configuration.peerCertificateChain.clear();
+ const CERT_CHAIN_CONTEXT *chainContext = nullptr;
+ auto freeCertChain = qScopeGuard([&chainContext]() {
+ if (chainContext)
+ CertFreeCertificateChain(chainContext);
+ });
+ BOOL status = CertGetCertificateChain(nullptr, // hChainEngine, default
+ certContext, // pCertContext
+ nullptr, // pTime, 'now'
+ tempCertCollection.get(), // hAdditionalStore, additional cert store
+ &parameters, // pChainPara
+ CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT, // dwFlags
+ nullptr, // reserved
+ &chainContext // ppChainContext
+ );
+ if (status == FALSE || !chainContext || chainContext->cChain == 0) {
+ QSslError error(QSslError::UnableToVerifyFirstCertificate);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ return q->state() == QAbstractSocket::ConnectedState;
+ }
+
+ // Helper-function to get a QSslCertificate given a CERT_CHAIN_ELEMENT
+ static auto getCertificateFromChainElement = [](CERT_CHAIN_ELEMENT *element) {
+ if (!element)
+ return QSslCertificate();
+
+ const CERT_CONTEXT *certContext = element->pCertContext;
+ return QSslCertificatePrivate::QSslCertificate_from_CERT_CONTEXT(certContext);
+ };
+
+ // Pick a chain to use as the certificate chain, if multiple are available:
+ // According to https://docs.microsoft.com/en-gb/windows/desktop/api/wincrypt/ns-wincrypt-_cert_chain_context
+ // this seems to be the best way to get a trusted chain.
+ CERT_SIMPLE_CHAIN *chain = chainContext->rgpChain[chainContext->cChain - 1];
+
+ if (chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_PARTIAL_CHAIN) {
+ auto error = QSslError(QSslError::SslError::UnableToGetIssuerCertificate,
+ getCertificateFromChainElement(chain->rgpElement[chain->cElement - 1]));
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+ if (chain->TrustStatus.dwErrorStatus & CERT_TRUST_INVALID_BASIC_CONSTRAINTS) {
+ // @Note: This is actually one of two errors:
+ // "either the certificate cannot be used to issue other certificates, or the chain path length has been exceeded."
+ // But here we are checking the chain's status, so we assume the "issuing" error cannot occur here.
+ auto error = QSslError(QSslError::PathLengthExceeded);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+ static const DWORD leftoverCertChainErrorMask = CERT_TRUST_IS_CYCLIC | CERT_TRUST_INVALID_EXTENSION
+ | CERT_TRUST_INVALID_POLICY_CONSTRAINTS | CERT_TRUST_INVALID_NAME_CONSTRAINTS
+ | CERT_TRUST_CTL_IS_NOT_TIME_VALID | CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID
+ | CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE;
+ if (chain->TrustStatus.dwErrorStatus & leftoverCertChainErrorMask) {
+ auto error = QSslError(QSslError::SslError::UnspecifiedError);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+
+ DWORD verifyDepth = chain->cElement;
+ if (configuration.peerVerifyDepth > 0 && DWORD(configuration.peerVerifyDepth) < verifyDepth)
+ verifyDepth = DWORD(configuration.peerVerifyDepth);
+
+ for (DWORD i = 0; i < verifyDepth; i++) {
+ CERT_CHAIN_ELEMENT *element = chain->rgpElement[i];
+ QSslCertificate certificate = getCertificateFromChainElement(element);
+ const QList<QSslCertificateExtension> extensions = certificate.extensions();
+
+#ifdef QSSLSOCKET_DEBUG
+ qCDebug(lcSsl) << "issuer:" << certificate.issuerDisplayName()
+ << "\nsubject:" << certificate.subjectDisplayName()
+ << "\nQSslCertificate info:" << certificate
+ << "\nextended error info:" << element->pwszExtendedErrorInfo
+ << "\nerror status:" << element->TrustStatus.dwErrorStatus;
+#endif
+
+ configuration.peerCertificateChain.append(certificate);
+
+ if (certificate.isBlacklisted()) {
+ const auto error = QSslError(QSslError::CertificateBlacklisted, certificate);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+
+ LONG result = CertVerifyTimeValidity(nullptr /*== now */, element->pCertContext->pCertInfo);
+ if (result != 0) {
+ auto error = QSslError(result == -1 ? QSslError::CertificateNotYetValid
+ : QSslError::CertificateExpired,
+ certificate);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+
+ //// Errors
+ if (element->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_TIME_VALID) {
+ // handled right above
+ Q_ASSERT(!sslErrors.isEmpty());
+ }
+ if (element->TrustStatus.dwErrorStatus & CERT_TRUST_IS_REVOKED) {
+ auto error = QSslError(QSslError::CertificateRevoked, certificate);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+ if (element->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_SIGNATURE_VALID) {
+ auto error = QSslError(QSslError::CertificateSignatureFailed, certificate);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+
+ // While netscape shouldn't be relevant now it defined an extension which is
+ // still in use. Schannel does not check this automatically, so we do it here.
+ // It is used to differentiate between client and server certificates.
+ if (netscapeWrongCertType(extensions, isClient))
+ element->TrustStatus.dwErrorStatus |= CERT_TRUST_IS_NOT_VALID_FOR_USAGE;
+
+ if (element->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_VALID_FOR_USAGE) {
+ auto error = QSslError(QSslError::InvalidPurpose, certificate);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+ if (element->TrustStatus.dwErrorStatus & CERT_TRUST_IS_UNTRUSTED_ROOT) {
+ // Override this error if we have the certificate inside our trusted CAs list.
+ const bool isTrustedRoot = configuration.caCertificates.contains(certificate);
+ if (!isTrustedRoot) {
+ auto error = QSslError(QSslError::CertificateUntrusted, certificate);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+ }
+ static const DWORD certRevocationCheckUnavailableError = CERT_TRUST_IS_OFFLINE_REVOCATION
+ | CERT_TRUST_REVOCATION_STATUS_UNKNOWN;
+ if (element->TrustStatus.dwErrorStatus & certRevocationCheckUnavailableError) {
+ // @future(maybe): Do something with this
+ }
+
+ // Dumping ground of errors that don't fit our specific errors
+ static const DWORD leftoverCertErrorMask = CERT_TRUST_IS_CYCLIC
+ | CERT_TRUST_INVALID_EXTENSION | CERT_TRUST_INVALID_NAME_CONSTRAINTS
+ | CERT_TRUST_INVALID_POLICY_CONSTRAINTS
+ | CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT
+ | CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT
+ | CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT
+ | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT
+ | CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT;
+ if (element->TrustStatus.dwErrorStatus & leftoverCertErrorMask) {
+ auto error = QSslError(QSslError::UnspecifiedError, certificate);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+ if (element->TrustStatus.dwErrorStatus & CERT_TRUST_INVALID_BASIC_CONSTRAINTS) {
+ auto it = std::find_if(extensions.cbegin(), extensions.cend(),
+ [](const QSslCertificateExtension &extension) {
+ return extension.name() == QLatin1String("basicConstraints");
+ });
+ if (it != extensions.cend()) {
+ // @Note: This is actually one of two errors:
+ // "either the certificate cannot be used to issue other certificates,
+ // or the chain path length has been exceeded."
+ QVariantMap basicConstraints = it->value().toMap();
+ QSslError error;
+ if (i > 0 && !basicConstraints.value(QLatin1String("ca"), false).toBool())
+ error = QSslError(QSslError::InvalidPurpose, certificate);
+ else
+ error = QSslError(QSslError::PathLengthExceeded, certificate);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+ }
+ if (element->TrustStatus.dwErrorStatus & CERT_TRUST_IS_EXPLICIT_DISTRUST) {
+ auto error = QSslError(QSslError::CertificateBlacklisted, certificate);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+
+ if (element->TrustStatus.dwInfoStatus & CERT_TRUST_IS_SELF_SIGNED) {
+ // If it's self-signed *and* a CA then we can assume it's a root CA certificate
+ // and we can ignore the "self-signed" note:
+ // We check the basicConstraints certificate extension when possible, but this didn't
+ // exist for version 1, so we can only guess in that case
+ const bool isRootCertificateAuthority = isCertificateAuthority(extensions)
+ || certificate.version() == "1";
+
+ // Root certificate tends to be signed by themselves, so ignore self-signed status.
+ if (!isRootCertificateAuthority) {
+ auto error = QSslError(QSslError::SelfSignedCertificate, certificate);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+ }
+ }
+
+ if (!configuration.peerCertificateChain.isEmpty())
+ configuration.peerCertificate = configuration.peerCertificateChain.first();
+
+ // @Note: Somewhat copied from qsslsocket_mac.cpp
+ const bool doVerifyPeer = configuration.peerVerifyMode == QSslSocket::VerifyPeer
+ || (configuration.peerVerifyMode == QSslSocket::AutoVerifyPeer
+ && mode == QSslSocket::SslClientMode);
+ // Check the peer certificate itself. First try the subject's common name
+ // (CN) as a wildcard, then try all alternate subject name DNS entries the
+ // same way.
+ if (!configuration.peerCertificate.isNull()) {
+ // but only if we're a client connecting to a server
+ // if we're the server, don't check CN
+ if (mode == QSslSocket::SslClientMode) {
+ const QString peerName(verificationPeerName.isEmpty() ? q->peerName() : verificationPeerName);
+ if (!isMatchingHostname(configuration.peerCertificate, peerName)) {
+ // No matches in common names or alternate names.
+ const QSslError error(QSslError::HostNameMismatch, configuration.peerCertificate);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+ }
+ } else if (doVerifyPeer) {
+ // No peer certificate presented. Report as error if the socket
+ // expected one.
+ const QSslError error(QSslError::NoPeerCertificate);
+ sslErrors += error;
+ emit q->peerVerifyError(error);
+ if (q->state() != QAbstractSocket::ConnectedState)
+ return false;
+ }
+
+ return true;
+}
+
+bool QSslSocketBackendPrivate::rootCertOnDemandLoadingAllowed()
+{
+ return allowRootCertOnDemandLoading && s_loadRootCertsOnDemand;
+}
+
+QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslsocket_schannel_p.h b/src/network/ssl/qsslsocket_schannel_p.h
new file mode 100644
index 0000000000..9879e2fc60
--- /dev/null
+++ b/src/network/ssl/qsslsocket_schannel_p.h
@@ -0,0 +1,155 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtNetwork module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QSSLSOCKET_SCHANNEL_P_H
+#define QSSLSOCKET_SCHANNEL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_REQUIRE_CONFIG(schannel);
+
+#include <QtNetwork/private/qtnetworkglobal_p.h>
+
+#include "qsslsocket_p.h"
+
+#define SECURITY_WIN32
+#include <security.h>
+#include <schnlsp.h>
+#undef SECURITY_WIN32
+
+#include <memory>
+
+QT_BEGIN_NAMESPACE
+
+struct QHCertStoreDeleter {
+ void operator()(HCERTSTORE store)
+ {
+ CertCloseStore(store, 0);
+ }
+};
+typedef std::unique_ptr<void, QHCertStoreDeleter> QHCertStorePointer;
+
+class QSslSocketBackendPrivate final : public QSslSocketPrivate
+{
+ Q_DISABLE_COPY_MOVE(QSslSocketBackendPrivate)
+ Q_DECLARE_PUBLIC(QSslSocket)
+public:
+ QSslSocketBackendPrivate();
+ ~QSslSocketBackendPrivate();
+
+ // Platform specific functions
+ void startClientEncryption() override;
+ void startServerEncryption() override;
+ void transmit() override;
+ void disconnectFromHost() override;
+ void disconnected() override;
+ QSslCipher sessionCipher() const override;
+ QSsl::SslProtocol sessionProtocol() const override;
+ void continueHandshake() override;
+
+ static QList<QSslCipher> defaultCiphers();
+ static QList<QSslError> verify(const QList<QSslCertificate> &certificateChain,
+ const QString &hostName);
+ static bool importPkcs12(QIODevice *device, QSslKey *key, QSslCertificate *cert,
+ QList<QSslCertificate> *caCertificates, const QByteArray &passPhrase);
+
+private:
+ enum class SchannelState {
+ InitializeHandshake, // create and transmit context (client)/accept context (server)
+ PerformHandshake, // get token back, process it
+ VerifyHandshake, // Verify that things are OK
+ Done, // Connection encrypted!
+ Renegotiate // Renegotiating!
+ } schannelState = SchannelState::InitializeHandshake;
+
+ void reset();
+ bool acquireCredentialsHandle();
+ ULONG getContextRequirements();
+ bool createContext(); // for clients
+ bool acceptContext(); // for server
+ bool performHandshake();
+ bool verifyHandshake();
+ bool renegotiate();
+
+ bool sendToken(void *token, unsigned long tokenLength, bool emitError = true);
+ QString targetName() const;
+
+ bool checkSslErrors();
+ void deallocateContext();
+ void freeCredentialsHandle();
+ void closeCertificateStores();
+ void sendShutdown();
+
+ void initializeCertificateStores();
+ bool verifyCertContext(CERT_CONTEXT *certContext);
+
+ bool rootCertOnDemandLoadingAllowed();
+
+ SecPkgContext_ConnectionInfo connectionInfo = {};
+ SecPkgContext_StreamSizes streamSizes = {};
+
+ CredHandle credentialHandle; // Initialized in ctor
+ CtxtHandle contextHandle; // Initialized in ctor
+
+ QByteArray intermediateBuffer; // data which is left-over or incomplete
+
+ QHCertStorePointer localCertificateStore = nullptr;
+ QHCertStorePointer peerCertificateStore = nullptr;
+ QHCertStorePointer caCertificateStore = nullptr;
+
+ const CERT_CONTEXT *localCertContext = nullptr;
+
+ ULONG contextAttributes = 0;
+
+ bool renegotiating = false;
+ bool peerCertVerified = false;
+};
+
+QT_END_NAMESPACE
+
+#endif // QSSLSOCKET_SCHANNEL_P_H
diff --git a/src/network/ssl/qsslsocket_winrt.cpp b/src/network/ssl/qsslsocket_winrt.cpp
index cc69b9ac96..d54ac2ad73 100644
--- a/src/network/ssl/qsslsocket_winrt.cpp
+++ b/src/network/ssl/qsslsocket_winrt.cpp
@@ -207,9 +207,9 @@ void QSslSocketPrivate::resetDefaultCiphers()
QList<QSslCipher> QSslSocketBackendPrivate::defaultCiphers()
{
QList<QSslCipher> ciphers;
- const QString protocolStrings[] = { QStringLiteral("SSLv3"), QStringLiteral("TLSv1"),
+ const QString protocolStrings[] = { QStringLiteral("TLSv1"),
QStringLiteral("TLSv1.1"), QStringLiteral("TLSv1.2") };
- const QSsl::SslProtocol protocols[] = { QSsl::SslV3, QSsl::TlsV1_0, QSsl::TlsV1_1, QSsl::TlsV1_2 };
+ const QSsl::SslProtocol protocols[] = { QSsl::TlsV1_0, QSsl::TlsV1_1, QSsl::TlsV1_2 };
const int size = static_cast<int>(ARRAYSIZE(protocols));
ciphers.reserve(size);
for (int i = 0; i < size; ++i) {
@@ -234,10 +234,14 @@ void QSslSocketBackendPrivate::startClientEncryption()
QSsl::SslProtocol protocol = q->protocol();
switch (q->protocol()) {
- case QSsl::AnyProtocol:
+ case QSsl::SslV2:
case QSsl::SslV3:
+ setErrorAndEmit(QAbstractSocket::SslInvalidUserDataError,
+ QStringLiteral("unsupported protocol"));
+ return;
+ case QSsl::AnyProtocol:
case QSsl::TlsV1SslV3:
- protectionLevel = SocketProtectionLevel_Ssl; // Only use this value if weak cipher support is required
+ protectionLevel = SocketProtectionLevel_Tls10;
break;
case QSsl::TlsV1_0:
protectionLevel = SocketProtectionLevel_Tls10;
diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri
index 6975264038..5712a26fd8 100644
--- a/src/network/ssl/ssl.pri
+++ b/src/network/ssl/ssl.pri
@@ -29,7 +29,9 @@ qtConfig(ssl) {
ssl/qsslsocket.h \
ssl/qsslsocket_p.h \
ssl/qsslpresharedkeyauthenticator.h \
- ssl/qsslpresharedkeyauthenticator_p.h
+ ssl/qsslpresharedkeyauthenticator_p.h \
+ ssl/qocspresponse.h \
+ ssl/qocspresponse_p.h
SOURCES += ssl/qsslconfiguration.cpp \
ssl/qsslcipher.cpp \
ssl/qssldiffiehellmanparameters.cpp \
@@ -37,7 +39,8 @@ qtConfig(ssl) {
ssl/qsslkey_p.cpp \
ssl/qsslerror.cpp \
ssl/qsslsocket.cpp \
- ssl/qsslpresharedkeyauthenticator.cpp
+ ssl/qsslpresharedkeyauthenticator.cpp \
+ ssl/qocspresponse.cpp
winrt {
HEADERS += ssl/qsslsocket_winrt_p.h
@@ -49,6 +52,19 @@ qtConfig(ssl) {
ssl/qsslellipticcurve_dummy.cpp
}
+ qtConfig(schannel) {
+ HEADERS += ssl/qsslsocket_schannel_p.h
+ SOURCES += ssl/qsslsocket_schannel.cpp \
+ ssl/qsslcertificate_schannel.cpp \
+ ssl/qsslkey_schannel.cpp \
+ ssl/qsslkey_qt.cpp \
+ ssl/qssldiffiehellmanparameters_dummy.cpp \
+ ssl/qsslellipticcurve_dummy.cpp \
+ ssl/qsslsocket_qt.cpp
+
+ LIBS_PRIVATE += "-lSecur32" "-lCrypt32" "-lbcrypt" "-lncrypt"
+ }
+
qtConfig(securetransport) {
HEADERS += ssl/qsslsocket_mac_p.h
SOURCES += ssl/qssldiffiehellmanparameters_dummy.cpp \
@@ -56,6 +72,7 @@ qtConfig(ssl) {
ssl/qsslkey_mac.cpp \
ssl/qsslsocket_mac_shared.cpp \
ssl/qsslsocket_mac.cpp \
+ ssl/qsslsocket_qt.cpp \
ssl/qsslellipticcurve_dummy.cpp
}
diff --git a/src/opengl/doc/qtopengl.qdocconf b/src/opengl/doc/qtopengl.qdocconf
index 6ff6cae2cb..2d38a5d2af 100644
--- a/src/opengl/doc/qtopengl.qdocconf
+++ b/src/opengl/doc/qtopengl.qdocconf
@@ -23,6 +23,8 @@ depends += qtdoc qtcore qtgui qtwidgets qmake
examplesinstallpath = opengl
+tagfile = qtopengl.tags
+
# The following parameters are for creating a qhp file, the qhelpgenerator
# program can convert the qhp file into a qch file which can be opened in
# Qt Assistant and/or Qt Creator.
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index d1ed621790..abf5b8ea48 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -160,7 +160,7 @@ public:
void setTranslateZ(GLfloat z);
private:
- Q_DISABLE_COPY(QGL2PaintEngineEx)
+ Q_DISABLE_COPY_MOVE(QGL2PaintEngineEx)
};
class QGL2PaintEngineExPrivate : public QPaintEngineExPrivate, protected QOpenGLExtensions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index ba4a1dcaa1..47252f211a 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -3880,12 +3880,9 @@ void QGLContext::doneCurrent()
*/
QGLWidget::QGLWidget(QWidget *parent, const QGLWidget* shareWidget, Qt::WindowFlags f)
- : QWidget(*(new QGLWidgetPrivate), parent, f | Qt::MSWindowsOwnDC)
+ : QWidget(*(new QGLWidgetPrivate), parent, f)
{
Q_D(QGLWidget);
- setAttribute(Qt::WA_PaintOnScreen);
- setAttribute(Qt::WA_NoSystemBackground);
- setAutoFillBackground(true); // for compatibility
d->init(new QGLContext(QGLFormat::defaultFormat(), this), shareWidget);
}
@@ -3893,12 +3890,9 @@ QGLWidget::QGLWidget(QWidget *parent, const QGLWidget* shareWidget, Qt::WindowFl
\internal
*/
QGLWidget::QGLWidget(QGLWidgetPrivate &dd, const QGLFormat &format, QWidget *parent, const QGLWidget *shareWidget, Qt::WindowFlags f)
- : QWidget(dd, parent, f | Qt::MSWindowsOwnDC)
+ : QWidget(dd, parent, f)
{
Q_D(QGLWidget);
- setAttribute(Qt::WA_PaintOnScreen);
- setAttribute(Qt::WA_NoSystemBackground);
- setAutoFillBackground(true); // for compatibility
d->init(new QGLContext(format, this), shareWidget);
}
@@ -3935,12 +3929,9 @@ QGLWidget::QGLWidget(QGLWidgetPrivate &dd, const QGLFormat &format, QWidget *par
QGLWidget::QGLWidget(const QGLFormat &format, QWidget *parent, const QGLWidget* shareWidget,
Qt::WindowFlags f)
- : QWidget(*(new QGLWidgetPrivate), parent, f | Qt::MSWindowsOwnDC)
+ : QWidget(*(new QGLWidgetPrivate), parent, f)
{
Q_D(QGLWidget);
- setAttribute(Qt::WA_PaintOnScreen);
- setAttribute(Qt::WA_NoSystemBackground);
- setAutoFillBackground(true); // for compatibility
d->init(new QGLContext(format, this), shareWidget);
}
@@ -3971,12 +3962,9 @@ QGLWidget::QGLWidget(const QGLFormat &format, QWidget *parent, const QGLWidget*
*/
QGLWidget::QGLWidget(QGLContext *context, QWidget *parent, const QGLWidget *shareWidget,
Qt::WindowFlags f)
- : QWidget(*(new QGLWidgetPrivate), parent, f | Qt::MSWindowsOwnDC)
+ : QWidget(*(new QGLWidgetPrivate), parent, f)
{
Q_D(QGLWidget);
- setAttribute(Qt::WA_PaintOnScreen);
- setAttribute(Qt::WA_NoSystemBackground);
- setAutoFillBackground(true); // for compatibility
d->init(context, shareWidget);
}
@@ -5169,6 +5157,15 @@ QPaintEngine *QGLWidget::paintEngine() const
void QGLWidgetPrivate::init(QGLContext *context, const QGLWidget *shareWidget)
{
+ Q_Q(QGLWidget);
+ q->setAttribute(Qt::WA_PaintOnScreen);
+ q->setAttribute(Qt::WA_NoSystemBackground);
+ q->setAutoFillBackground(true); // for compatibility
+
+ mustHaveWindowHandle = 1;
+ q->setAttribute(Qt::WA_NativeWindow);
+ q->setWindowFlag(Qt::MSWindowsOwnDC);
+
initContext(context, shareWidget);
}
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index a1ba0485e0..f5accbeb3c 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -51,22 +51,6 @@
#include <QtGui/QSurfaceFormat>
-#if defined(Q_CLANG_QDOC)
-#undef GLint
-typedef int GLint;
-#undef GLuint
-typedef unsigned int GLuint;
-#undef GLenum
-typedef unsigned int GLenum;
-#undef GLclampf
-typedef float GLclampf;
-#undef GLsizei
-typedef int GLsizei;
-#undef GLboolean
-typedef bool GLboolean;
-#endif
-
-
QT_BEGIN_NAMESPACE
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h
index dfdef44b54..3ce88197d2 100644
--- a/src/opengl/qglshaderprogram.h
+++ b/src/opengl/qglshaderprogram.h
@@ -46,17 +46,6 @@
#include <QtGui/qvector4d.h>
#include <QtGui/qmatrix4x4.h>
-#if defined(Q_CLANG_QDOC)
-#undef GLfloat
-typedef double GLfloat;
-#undef GLint
-typedef int GLint;
-#undef GLuint
-typedef unsigned int GLuint;
-#undef GLenum
-typedef unsigned int GLenum;
-#endif
-
QT_BEGIN_NAMESPACE
diff --git a/src/opengl/qgraphicsshadereffect_p.h b/src/opengl/qgraphicsshadereffect_p.h
index 9efcecd25f..1a32f24d70 100644
--- a/src/opengl/qgraphicsshadereffect_p.h
+++ b/src/opengl/qgraphicsshadereffect_p.h
@@ -80,7 +80,7 @@ protected:
private:
Q_DECLARE_PRIVATE(QGraphicsShaderEffect)
- Q_DISABLE_COPY(QGraphicsShaderEffect)
+ Q_DISABLE_COPY_MOVE(QGraphicsShaderEffect)
friend class QGLCustomShaderEffectStage;
};
diff --git a/src/platformheaders/doc/qtplatformheaders.qdocconf b/src/platformheaders/doc/qtplatformheaders.qdocconf
index 1ff6fe7a21..9a034e7671 100644
--- a/src/platformheaders/doc/qtplatformheaders.qdocconf
+++ b/src/platformheaders/doc/qtplatformheaders.qdocconf
@@ -35,5 +35,7 @@ sourcedirs += ..
exampledirs += snippets
imagedirs += images
+tagfile = qtplatformheaders.tags
+
navigation.landingpage = "Qt Platform Headers"
navigation.cppclassespage = "Qt Platform Headers C++ Classes"
diff --git a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
index e51c2fde67..032dcafa6e 100644
--- a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
+++ b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.h
@@ -81,6 +81,15 @@ public:
func(window, border);
}
+ typedef void (*SetHasBorderInFullScreenDefault)(bool border);
+ static const QByteArray setHasBorderInFullScreenDefaultIdentifier() { return QByteArrayLiteral("WindowsSetHasBorderInFullScreenDefault"); }
+ static void setHasBorderInFullScreenDefault(bool border)
+ {
+ auto func = reinterpret_cast<SetHasBorderInFullScreenDefault>(QGuiApplication::platformFunction(setHasBorderInFullScreenDefaultIdentifier()));
+ if (func)
+ func(border);
+ }
+
typedef void (*SetWindowActivationBehaviorType)(WindowActivationBehavior);
static const QByteArray setWindowActivationBehaviorIdentifier() { return QByteArrayLiteral("WindowsSetWindowActivationBehavior"); }
diff --git a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc
index a52bbe061b..0c52cde753 100644
--- a/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc
+++ b/src/platformheaders/windowsfunctions/qwindowswindowfunctions.qdoc
@@ -93,7 +93,40 @@
is true then it will enable the WS_BORDER flag in full screen mode to enable other top level windows
inside the application to appear on top when required.
+ \note The setting must be applied before showing the window or switching it
+ to full screen. For QML, setHasBorderInFullScreenDefault() can be used to
+ set a default value.
+
+ See also \l [QtDoc] {Fullscreen OpenGL Based Windows}
+*/
+
+/*!
+ \typedef QWindowsWindowFunctions::SetHasBorderInFullScreenDefault
+ \since 5.13
+
+ This is the typedef for the function returned by QGuiApplication::platformFunction
+ when passed setHasBorderInFullScreenDefaultIdentifier.
+*/
+
+/*!
+ \fn QByteArray QWindowsWindowFunctions::setHasBorderInFullScreenDefaultIdentifier()
+ \since 5.13
+
+ This function returns the bytearray that can be used to query
+ QGuiApplication::platformFunction to retrieve the SetHasBorderInFullScreen function.
+*/
+
+/*!
+ \fn void QWindowsWindowFunctions::setHasBorderInFullScreenDefault(bool border)
+ \since 5.13
+
+ This is a convenience function that can be used directly instead of resolving
+ the function pointer. \a border will be relayed to the function retrieved by
+ QGuiApplication. When \a border is true, the WS_BORDER flag will be set
+ in full screen mode for all windows by default.
+
See also \l [QtDoc] {Fullscreen OpenGL Based Windows}
+ \sa setHasBorderInFullScreen()
*/
/*!
diff --git a/src/platformsupport/devicediscovery/qdevicediscovery_p.h b/src/platformsupport/devicediscovery/qdevicediscovery_p.h
index e3c22b0b37..b1ce14b5c3 100644
--- a/src/platformsupport/devicediscovery/qdevicediscovery_p.h
+++ b/src/platformsupport/devicediscovery/qdevicediscovery_p.h
@@ -96,7 +96,7 @@ signals:
protected:
QDeviceDiscovery(QDeviceTypes types, QObject *parent) : QObject(parent), m_types(types) { }
- Q_DISABLE_COPY(QDeviceDiscovery)
+ Q_DISABLE_COPY_MOVE(QDeviceDiscovery)
QDeviceTypes m_types;
};
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index 9d8bf07af8..c0e528f922 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -332,14 +332,6 @@ void QEGLPlatformContext::updateFormatFromGL()
QByteArray version = QByteArray(reinterpret_cast<const char *>(s));
int major, minor;
if (QPlatformOpenGLContext::parseOpenGLVersion(version, major, minor)) {
-#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
- // Some Android 4.2.2 devices report OpenGL ES 3.0 without the functions being available.
- static int apiLevel = QtAndroidPrivate::androidSdkVersion();
- if (apiLevel <= 17 && major >= 3) {
- major = 2;
- minor = 0;
- }
-#endif
m_format.setMajorVersion(major);
m_format.setMinorVersion(minor);
}
diff --git a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
index 04a5026395..797b0b2a0b 100644
--- a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
+++ b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
@@ -1556,7 +1556,7 @@ QFontEngineFT::QGlyphSet *QFontEngineFT::loadGlyphSet(const QTransform &matrix)
gs = &transformedGlyphSets[0];
gs->clear();
gs->transformationMatrix = m;
- gs->outline_drawing = fontDef.pixelSize * fontDef.pixelSize * qAbs(matrix.det()) >= QT_MAX_CACHED_GLYPH_SIZE * QT_MAX_CACHED_GLYPH_SIZE;
+ gs->outline_drawing = fontDef.pixelSize * fontDef.pixelSize * qAbs(matrix.det()) > QT_MAX_CACHED_GLYPH_SIZE * QT_MAX_CACHED_GLYPH_SIZE;
}
Q_ASSERT(gs != 0);
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
index 40ac46df85..aa2d36423d 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp
@@ -1952,13 +1952,13 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request, const Q
} else {
HGDIOBJ oldFont = SelectObject(data->hdc, hfont);
+ const QFont::HintingPreference hintingPreference =
+ static_cast<QFont::HintingPreference>(request.hintingPreference);
+ bool useDw = useDirectWrite(hintingPreference, fam);
+
IDWriteFontFace *directWriteFontFace = NULL;
HRESULT hr = data->directWriteGdiInterop->CreateFontFaceFromHdc(data->hdc, &directWriteFontFace);
- if (FAILED(hr)) {
- const QString errorString = qt_error_string(int(hr));
- qWarning().noquote().nospace() << "DirectWrite: CreateFontFaceFromHDC() failed ("
- << errorString << ") for " << request << ' ' << lf << " dpi=" << dpi;
- } else {
+ if (SUCCEEDED(hr)) {
bool isColorFont = false;
#if defined(QT_USE_DIRECTWRITE2)
IDWriteFontFace2 *directWriteFontFace2 = nullptr;
@@ -1968,9 +1968,7 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request, const Q
isColorFont = directWriteFontFace2->GetPaletteEntryCount() > 0;
}
#endif
- const QFont::HintingPreference hintingPreference =
- static_cast<QFont::HintingPreference>(request.hintingPreference);
- const bool useDw = useDirectWrite(hintingPreference, fam, isColorFont);
+ useDw = useDw || useDirectWrite(hintingPreference, fam, isColorFont);
qCDebug(lcQpaFonts) << __FUNCTION__ << request.family << request.pointSize
<< "pt" << "hintingPreference=" << hintingPreference << "color=" << isColorFont
<< dpi << "dpi" << "useDirectWrite=" << useDw;
@@ -1992,6 +1990,10 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request, const Q
} else {
directWriteFontFace->Release();
}
+ } else if (useDw) {
+ const QString errorString = qt_error_string(int(hr));
+ qWarning().noquote().nospace() << "DirectWrite: CreateFontFaceFromHDC() failed ("
+ << errorString << ") for " << request << ' ' << lf << " dpi=" << dpi;
}
SelectObject(data->hdc, oldFont);
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h
index afba86bbe1..b85a2dceee 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_p.h
@@ -67,7 +67,7 @@ Q_DECLARE_LOGGING_CATEGORY(lcQpaFonts)
class QWindowsFontEngineData
{
- Q_DISABLE_COPY(QWindowsFontEngineData)
+ Q_DISABLE_COPY_MOVE(QWindowsFontEngineData)
public:
QWindowsFontEngineData();
~QWindowsFontEngineData();
@@ -85,7 +85,7 @@ public:
class QWindowsFontDatabase : public QPlatformFontDatabase
{
- Q_DISABLE_COPY(QWindowsFontDatabase)
+ Q_DISABLE_COPY_MOVE(QWindowsFontDatabase)
public:
enum FontOptions {
// Relevant bits from QWindowsIntegration::Options
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h b/src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h
index 2b575a9b45..b1b9d828ac 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h
@@ -66,7 +66,7 @@ class QWindowsFontEngineData;
class QWindowsFontEngine : public QFontEngine
{
- Q_DISABLE_COPY(QWindowsFontEngine)
+ Q_DISABLE_COPY_MOVE(QWindowsFontEngine)
public:
QWindowsFontEngine(const QString &name, LOGFONT lf,
const QSharedPointer<QWindowsFontEngineData> &fontEngineData);
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
index 57c41938bc..60a5896e7b 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
@@ -69,7 +69,7 @@ namespace {
class GeometrySink: public IDWriteGeometrySink
{
- Q_DISABLE_COPY(GeometrySink)
+ Q_DISABLE_COPY_MOVE(GeometrySink)
public:
GeometrySink(QPainterPath *path)
: m_refCount(0), m_path(path)
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite_p.h b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite_p.h
index 9326f5aece..3eaf8cf3d8 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite_p.h
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite_p.h
@@ -72,7 +72,7 @@ class QWindowsFontEngineData;
class QWindowsFontEngineDirectWrite : public QFontEngine
{
- Q_DISABLE_COPY(QWindowsFontEngineDirectWrite)
+ Q_DISABLE_COPY_MOVE(QWindowsFontEngineDirectWrite)
public:
explicit QWindowsFontEngineDirectWrite(IDWriteFontFace *directWriteFontFace,
qreal pixelSize,
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsnativeimage_p.h b/src/platformsupport/fontdatabases/windows/qwindowsnativeimage_p.h
index 6c47a527d2..ed68ac2644 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsnativeimage_p.h
+++ b/src/platformsupport/fontdatabases/windows/qwindowsnativeimage_p.h
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
class QWindowsNativeImage
{
- Q_DISABLE_COPY(QWindowsNativeImage)
+ Q_DISABLE_COPY_MOVE(QWindowsNativeImage)
public:
QWindowsNativeImage(int width, int height,
QImage::Format format);
diff --git a/src/platformsupport/glxconvenience/qglxconvenience.cpp b/src/platformsupport/glxconvenience/qglxconvenience.cpp
index d7cc36627a..99ae2671dd 100644
--- a/src/platformsupport/glxconvenience/qglxconvenience.cpp
+++ b/src/platformsupport/glxconvenience/qglxconvenience.cpp
@@ -223,14 +223,15 @@ GLXFBConfig qglx_findConfig(Display *display, int screen , QSurfaceFormat format
continue;
}
- QXlibPointer<XVisualInfo> visual(glXGetVisualFromFBConfig(display, candidate));
- if (visual.isNull())
- continue;
+ int actualRed;
+ int actualGreen;
+ int actualBlue;
+ int actualAlpha;
+ glXGetFBConfigAttrib(display, candidate, GLX_RED_SIZE, &actualRed);
+ glXGetFBConfigAttrib(display, candidate, GLX_GREEN_SIZE, &actualGreen);
+ glXGetFBConfigAttrib(display, candidate, GLX_BLUE_SIZE, &actualBlue);
+ glXGetFBConfigAttrib(display, candidate, GLX_ALPHA_SIZE, &actualAlpha);
- const int actualRed = qPopulationCount(visual->red_mask);
- const int actualGreen = qPopulationCount(visual->green_mask);
- const int actualBlue = qPopulationCount(visual->blue_mask);
- const int actualAlpha = visual->depth - actualRed - actualGreen - actualBlue;
if (requestedRed && actualRed < requestedRed)
continue;
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h
index 5498a3e4f0..21e6d055a0 100644
--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h
+++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h
@@ -132,7 +132,7 @@ inline QDataStream &operator<<(QDataStream &ds, const QEvdevKeyboardMap::Composi
class QFdContainer
{
int m_fd;
- Q_DISABLE_COPY(QFdContainer);
+ Q_DISABLE_COPY_MOVE(QFdContainer);
public:
explicit QFdContainer(int fd = -1) Q_DECL_NOTHROW : m_fd(fd) {}
~QFdContainer() { reset(); }
diff --git a/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp b/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp
index e81d272d4f..ca740f967e 100644
--- a/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp
+++ b/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp
@@ -52,6 +52,9 @@
#include <qdebug.h>
#include <qrect.h>
#include <qloggingcategory.h>
+#include <qstandardpaths.h>
+#include <qdir.h>
+#include <qmetaobject.h>
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformservices.h>
#include <qdbusconnectioninterface.h>
diff --git a/src/platformsupport/themes/genericunix/dbustray/qstatusnotifieritemadaptor.cpp b/src/platformsupport/themes/genericunix/dbustray/qstatusnotifieritemadaptor.cpp
index d3c5454f01..ef2d330959 100644
--- a/src/platformsupport/themes/genericunix/dbustray/qstatusnotifieritemadaptor.cpp
+++ b/src/platformsupport/themes/genericunix/dbustray/qstatusnotifieritemadaptor.cpp
@@ -52,6 +52,9 @@
#ifndef QT_NO_SYSTEMTRAYICON
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QCoreApplication>
+
#include "qdbustrayicon_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h b/src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h
index 03899723ab..352b4aa5d6 100644
--- a/src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h
+++ b/src/platformsupport/themes/genericunix/dbustray/qxdgnotificationproxy_p.h
@@ -65,6 +65,7 @@
#include <QtCore/QObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
+#include <QtCore/QLoggingCategory>
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QStringList>
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index 543e66491d..e74b1cf744 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -465,7 +465,7 @@ void QNetworkManagerEngine::newConnection(const QDBusObjectPath &path,
cpPriv->state |= QNetworkConfiguration::Active;
if (deviceType == DEVICE_TYPE_ETHERNET) {
- for (const auto *interfaceDevice : interfaceDevices) {
+ for (auto interfaceDevice : qAsConst(interfaceDevices)) {
if (interfaceDevice->deviceType() == deviceType) {
auto *wiredDevice = wiredDevices.value(interfaceDevice->path());
if (wiredDevice && wiredDevice->carrier()) {
@@ -716,7 +716,7 @@ QNetworkSession::State QNetworkManagerEngine::sessionStateForId(const QString &i
if (!ptr->isValid)
return QNetworkSession::Invalid;
- for (QNetworkManagerConnectionActive *activeConnection : activeConnectionsList) {
+ for (QNetworkManagerConnectionActive *activeConnection : qAsConst(activeConnectionsList)) {
const QString identifier = activeConnection->connection().path();
if (id == identifier) {
diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp
index 847479047f..a09ae72cb5 100644
--- a/src/plugins/bearer/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/qnetworksession_impl.cpp
@@ -82,8 +82,6 @@ Q_SIGNALS:
void forcedSessionClose(const QNetworkConfiguration &config);
};
-#include "qnetworksession_impl.moc"
-
Q_GLOBAL_STATIC(QNetworkSessionManagerPrivate, sessionManager);
void QNetworkSessionPrivateImpl::syncStateWithInterface()
@@ -432,3 +430,5 @@ void QNetworkSessionPrivateImpl::decrementTimeout()
}
QT_END_NAMESPACE
+
+#include "qnetworksession_impl.moc"
diff --git a/src/plugins/generic/tuiotouch/qtuiohandler.cpp b/src/plugins/generic/tuiotouch/qtuiohandler.cpp
index bb18ba5085..cb82672acd 100644
--- a/src/plugins/generic/tuiotouch/qtuiohandler.cpp
+++ b/src/plugins/generic/tuiotouch/qtuiohandler.cpp
@@ -169,7 +169,7 @@ void QTuioHandler::processPackets()
messages.push_back(msg);
}
- for (const QOscMessage &message : messages) {
+ for (const QOscMessage &message : qAsConst(messages)) {
if (message.addressPattern() == "/tuio/2Dcur") {
QList<QVariant> arguments = message.arguments();
if (arguments.count() == 0) {
@@ -368,12 +368,12 @@ void QTuioHandler::process2DCurFseq(const QOscMessage &message)
QList<QWindowSystemInterface::TouchPoint> tpl;
tpl.reserve(m_activeCursors.size() + m_deadCursors.size());
- for (const QTuioCursor &tc : m_activeCursors) {
+ for (const QTuioCursor &tc : qAsConst(m_activeCursors)) {
QWindowSystemInterface::TouchPoint tp = cursorToTouchPoint(tc, win);
tpl.append(tp);
}
- for (const QTuioCursor &tc : m_deadCursors) {
+ for (const QTuioCursor &tc : qAsConst(m_deadCursors)) {
QWindowSystemInterface::TouchPoint tp = cursorToTouchPoint(tc, win);
tp.state = Qt::TouchPointReleased;
tpl.append(tp);
@@ -542,12 +542,12 @@ void QTuioHandler::process2DObjFseq(const QOscMessage &message)
QList<QWindowSystemInterface::TouchPoint> tpl;
tpl.reserve(m_activeTokens.size() + m_deadTokens.size());
- for (const QTuioToken & t : m_activeTokens) {
+ for (const QTuioToken & t : qAsConst(m_activeTokens)) {
QWindowSystemInterface::TouchPoint tp = tokenToTouchPoint(t, win);
tpl.append(tp);
}
- for (const QTuioToken & t : m_deadTokens) {
+ for (const QTuioToken & t : qAsConst(m_deadTokens)) {
QWindowSystemInterface::TouchPoint tp = tokenToTouchPoint(t, win);
tp.state = Qt::TouchPointReleased;
tp.velocity = QVector2D();
diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
index 3a54f33832..c0979e7864 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
@@ -217,17 +217,14 @@ void QIBusPlatformInputContext::update(Qt::InputMethodQueries q)
&& (q.testFlag(Qt::ImSurroundingText)
|| q.testFlag(Qt::ImCursorPosition)
|| q.testFlag(Qt::ImAnchorPosition))) {
- QInputMethodQueryEvent srrndTextQuery(Qt::ImSurroundingText);
- QInputMethodQueryEvent cursorPosQuery(Qt::ImCursorPosition);
- QInputMethodQueryEvent anchorPosQuery(Qt::ImAnchorPosition);
- QCoreApplication::sendEvent(input, &srrndTextQuery);
- QCoreApplication::sendEvent(input, &cursorPosQuery);
- QCoreApplication::sendEvent(input, &anchorPosQuery);
+ QInputMethodQueryEvent query(Qt::ImSurroundingText | Qt::ImCursorPosition | Qt::ImAnchorPosition);
- QString surroundingText = srrndTextQuery.value(Qt::ImSurroundingText).toString();
- uint cursorPosition = cursorPosQuery.value(Qt::ImCursorPosition).toUInt();
- uint anchorPosition = anchorPosQuery.value(Qt::ImAnchorPosition).toUInt();
+ QCoreApplication::sendEvent(input, &query);
+
+ QString surroundingText = query.value(Qt::ImSurroundingText).toString();
+ uint cursorPosition = query.value(Qt::ImCursorPosition).toUInt();
+ uint anchorPosition = query.value(Qt::ImAnchorPosition).toUInt();
QIBusText text;
text.text = surroundingText;
diff --git a/src/plugins/platforms/android/androidjniaccessibility.cpp b/src/plugins/platforms/android/androidjniaccessibility.cpp
index 309e41bfd6..d4b7f38bf6 100644
--- a/src/plugins/platforms/android/androidjniaccessibility.cpp
+++ b/src/plugins/platforms/android/androidjniaccessibility.cpp
@@ -329,10 +329,7 @@ if (!clazz) { \
GET_AND_CHECK_STATIC_METHOD(m_setFocusedMethodID, nodeInfoClass, "setFocused", "(Z)V");
GET_AND_CHECK_STATIC_METHOD(m_setScrollableMethodID, nodeInfoClass, "setScrollable", "(Z)V");
GET_AND_CHECK_STATIC_METHOD(m_setVisibleToUserMethodID, nodeInfoClass, "setVisibleToUser", "(Z)V");
-
- if (QtAndroidPrivate::androidSdkVersion() >= 18) {
- GET_AND_CHECK_STATIC_METHOD(m_setTextSelectionMethodID, nodeInfoClass, "setTextSelection", "(II)V");
- }
+ GET_AND_CHECK_STATIC_METHOD(m_setTextSelectionMethodID, nodeInfoClass, "setTextSelection", "(II)V");
return true;
}
diff --git a/src/plugins/platforms/android/extract-dummy.cpp b/src/plugins/platforms/android/extract-dummy.cpp
index d07fbe1ba7..fdce8ec64c 100644
--- a/src/plugins/platforms/android/extract-dummy.cpp
+++ b/src/plugins/platforms/android/extract-dummy.cpp
@@ -40,16 +40,6 @@
#include <jni.h>
#include <extract.h>
-extern "C" JNIEXPORT jintArray JNICALL Java_org_qtproject_qt5_android_ExtractStyle_extractNativeChunkInfo(JNIEnv *, jobject, Res_png_9patch*)
-{
- return 0;
-}
-
-extern "C" JNIEXPORT jintArray JNICALL Java_org_qtproject_qt5_android_ExtractStyle_extractChunkInfo(JNIEnv *, jobject, jbyteArray)
-{
- return 0;
-}
-
extern "C" JNIEXPORT jintArray JNICALL Java_org_qtproject_qt5_android_ExtractStyle_extractNativeChunkInfo20(JNIEnv *, jobject, long)
{
return 0;
diff --git a/src/plugins/platforms/android/extract.cpp b/src/plugins/platforms/android/extract.cpp
index 2f2ffa7126..acffa353f1 100644
--- a/src/plugins/platforms/android/extract.cpp
+++ b/src/plugins/platforms/android/extract.cpp
@@ -48,46 +48,6 @@
#define LOG_TAG "extractSyleInfo"
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
-extern "C" JNIEXPORT jintArray JNICALL Java_org_qtproject_qt5_android_ExtractStyle_extractNativeChunkInfo(JNIEnv * env, jobject, Res_png_9patch* chunk)
-{
- Res_png_9patch::deserialize(chunk);
- //printChunkInformation(chunk);
- jintArray result;
- size_t size = 3+chunk->numXDivs+chunk->numYDivs+chunk->numColors;
- result = env->NewIntArray(size);
- if (!result)
- return 0;
-
- jint *data = (jint*)malloc(sizeof(jint)*size);
- size_t pos = 0;
- data[pos++]=chunk->numXDivs;
- data[pos++]=chunk->numYDivs;
- data[pos++]=chunk->numColors;
- for (int x = 0; x <chunk->numXDivs; x ++)
- data[pos++]=chunk->xDivs[x];
- for (int y = 0; y <chunk->numYDivs; y ++)
- data[pos++]=chunk->yDivs[y];
- for (int c = 0; c <chunk->numColors; c ++)
- data[pos++]=chunk->colors[c];
- env->SetIntArrayRegion(result, 0, size, data);
- free(data);
- return result;
-}
-
-extern "C" JNIEXPORT jintArray JNICALL Java_org_qtproject_qt5_android_ExtractStyle_extractChunkInfo(JNIEnv * env, jobject obj, jbyteArray chunkObj)
-{
- size_t chunkSize = env->GetArrayLength(chunkObj);
- void* storage = alloca(chunkSize);
- env->GetByteArrayRegion(chunkObj, 0, chunkSize,
- reinterpret_cast<jbyte*>(storage));
-
- if (!env->ExceptionCheck())
- return Java_org_qtproject_qt5_android_ExtractStyle_extractNativeChunkInfo(env, obj, static_cast<Res_png_9patch*>(storage));
- else
- env->ExceptionClear();
- return 0;
-}
-
// The following part was shamelessly stolen from ResourceTypes.cpp from Android's sources
/*
* Copyright (C) 2005 The Android Open Source Project
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
index a1176da33f..38a402fb2f 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
@@ -51,6 +51,19 @@ QT_USE_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
+/**
+ * Converts between absolute character offsets and line numbers of a
+ * QAccessibleTextInterface. Works in exactly one of two modes:
+ *
+ * - Pass *line == -1 in order to get a line containing character at the given
+ * *offset
+ * - Pass *offset == -1 in order to get the offset of first character of the
+ * given *line
+ *
+ * You can optionally also pass non-NULL `start` and `end`, which will in both
+ * modes be filled with the offset of the first and last characters of the
+ * relevant line.
+ */
static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *offset, NSUInteger *start = 0, NSUInteger *end = 0)
{
Q_ASSERT(*line == -1 || *offset == -1);
@@ -228,7 +241,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
return [attributes autorelease];
}
-- (id)parentElement {
+- (id)accessibilityParent {
QAccessibleInterface *iface = QAccessible::accessibleInterface(axid);
if (!iface || !iface->isValid())
return nil;
@@ -241,7 +254,7 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
if (QAccessibleInterface *parent = iface->parent()) {
if (parent->role() != QAccessible::Application) {
QAccessible::Id parentId = QAccessible::uniqueId(parent);
- return [QMacAccessibilityElement elementWithId: parentId];
+ return NSAccessibilityUnignoredAncestor([QMacAccessibilityElement elementWithId: parentId]);
}
}
@@ -249,12 +262,18 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
QPlatformWindow *platformWindow = window->handle();
if (platformWindow) {
QCocoaWindow *win = static_cast<QCocoaWindow*>(platformWindow);
- return qnsview_cast(win->view());
+ return NSAccessibilityUnignoredAncestor(qnsview_cast(win->view()));
}
}
return nil;
}
+- (NSRect)accessibilityFrame {
+ QAccessibleInterface *iface = QAccessible::accessibleInterface(axid);
+ if (!iface || !iface->isValid())
+ return NSZeroRect;
+ return QCocoaScreen::mapToNative(iface->rect());
+}
- (id) minValueAttribute:(QAccessibleInterface*)iface {
if (QAccessibleValueInterface *val = iface->valueInterface())
@@ -288,13 +307,13 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
id focusedElement = [NSApp accessibilityAttributeValue:NSAccessibilityFocusedUIElementAttribute];
return @([focusedElement isEqual:self]);
} else if ([attribute isEqualToString:NSAccessibilityParentAttribute]) {
- return NSAccessibilityUnignoredAncestor([self parentElement]);
+ return self.accessibilityParent;
} else if ([attribute isEqualToString:NSAccessibilityWindowAttribute]) {
// We're in the same window as our parent.
- return [[self parentElement] accessibilityAttributeValue:NSAccessibilityWindowAttribute];
+ return [[self accessibilityParent] accessibilityAttributeValue:NSAccessibilityWindowAttribute];
} else if ([attribute isEqualToString:NSAccessibilityTopLevelUIElementAttribute]) {
// We're in the same top level element as our parent.
- return [[self parentElement] accessibilityAttributeValue:NSAccessibilityTopLevelUIElementAttribute];
+ return [[self accessibilityParent] accessibilityAttributeValue:NSAccessibilityTopLevelUIElementAttribute];
} else if ([attribute isEqualToString:NSAccessibilityPositionAttribute]) {
// The position in points of the element's lower-left corner in screen-relative coordinates
QPointF qtPosition = QRectF(iface->rect()).bottomLeft();
@@ -350,12 +369,8 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
return [NSValue valueWithRange: NSMakeRange(0, iface->text(QAccessible::Name).length())];
} else if ([attribute isEqualToString:NSAccessibilityInsertionPointLineNumberAttribute]) {
if (QAccessibleTextInterface *text = iface->textInterface()) {
- int line = 0; // true for all single line edits
- if (iface->state().multiLine) {
- int position = text->cursorPosition();
- convertLineOffset(text, &line, &position);
- }
- return @(line);
+ int position = text->cursorPosition();
+ return [self accessibilityAttributeValue:NSAccessibilityLineForIndexParameterizedAttribute forParameter:@(position)];
}
return nil;
} else if ([attribute isEqualToString:NSAccessibilityMinValueAttribute]) {
@@ -411,8 +426,11 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
int index = [parameter intValue];
if (index < 0 || index > iface->textInterface()->characterCount())
return nil;
- int line = -1;
- convertLineOffset(iface->textInterface(), &line, &index);
+ int line = 0; // true for all single line edits
+ if (iface->state().multiLine) {
+ line = -1;
+ convertLineOffset(iface->textInterface(), &line, &index);
+ }
return @(line);
}
if ([attribute isEqualToString: NSAccessibilityRangeForLineParameterizedAttribute]) {
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index df1ad82592..774ccdbf4c 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -218,6 +218,7 @@ QCocoaWindow::~QCocoaWindow()
}
[m_view release];
+ [m_nsWindow close];
[m_nsWindow release];
}
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
index 24f82e7843..24051c352e 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
@@ -423,7 +423,7 @@ void QEglFSKmsGbmScreen::updateFlipStatus()
if (m_flipPending)
return;
- for (const CloneDestination &d : m_cloneDests) {
+ for (const CloneDestination &d : qAsConst(m_cloneDests)) {
if (d.cloneFlipPending)
return;
}
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
index e4843cb438..f29e11489b 100644
--- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
@@ -381,6 +381,8 @@ void QQnxScreenEventHandler::handlePointerEvent(screen_event_t event)
if (m_lastGlobalMousePoint != globalPoint ||
m_lastLocalMousePoint != localPoint ||
m_lastButtonState != buttons) {
+ if (m_lastButtonState != 0 && buttons == 0)
+ (static_cast<QQnxWindow *>(w->handle()))->handleActivationEvent();
QWindowSystemInterface::handleMouseEvent(w, localPoint, globalPoint, buttons);
qScreenEventDebug() << "Qt mouse, w=" << w << ", (" << localPoint.x() << "," << localPoint.y() << "), b=" << static_cast<int>(buttons);
}
@@ -457,6 +459,9 @@ void QQnxScreenEventHandler::handleTouchEvent(screen_event_t event, int qnxType)
m_lastMouseWindow = qnxWindow;
if (w) {
+ if (qnxType == SCREEN_EVENT_MTOUCH_RELEASE)
+ (static_cast<QQnxWindow *>(w->handle()))->handleActivationEvent();
+
// get size of screen which contains window
QPlatformScreen *platformScreen = QPlatformScreen::platformScreenForWindow(w);
QSizeF screenSize = platformScreen->geometry().size();
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index 2096bc789e..7644e28b44 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -156,7 +156,8 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootW
m_visible(false),
m_exposed(true),
m_windowState(Qt::WindowNoState),
- m_mmRendererWindow(0)
+ m_mmRendererWindow(0),
+ m_firstActivateHandled(false)
{
qWindowDebug() << "window =" << window << ", size =" << window->size();
@@ -341,6 +342,14 @@ void QQnxWindow::setVisible(bool visible)
if (visible) {
applyWindowState();
} else {
+ if (showWithoutActivating() && focusable() && m_firstActivateHandled) {
+ m_firstActivateHandled = false;
+ int val = SCREEN_SENSITIVITY_NO_FOCUS;
+ Q_SCREEN_CHECKERROR(
+ screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SENSITIVITY, &val),
+ "Failed to set window sensitivity");
+ }
+
// Flush the context, otherwise it won't disappear immediately
screen_flush_context(m_screenContext, 0);
}
@@ -618,13 +627,56 @@ void QQnxWindow::requestActivateWindow()
void QQnxWindow::setFocus(screen_window_t newFocusWindow)
{
+ screen_window_t temporaryFocusWindow = nullptr;
+
screen_group_t screenGroup = 0;
- screen_get_window_property_pv(nativeHandle(), SCREEN_PROPERTY_GROUP,
- reinterpret_cast<void**>(&screenGroup));
- if (screenGroup) {
- screen_set_group_property_pv(screenGroup, SCREEN_PROPERTY_FOCUS,
- reinterpret_cast<void**>(&newFocusWindow));
+ Q_SCREEN_CHECKERROR(screen_get_window_property_pv(nativeHandle(), SCREEN_PROPERTY_GROUP,
+ reinterpret_cast<void **>(&screenGroup)),
+ "Failed to retrieve window group");
+
+ if (showWithoutActivating() && focusable() && !m_firstActivateHandled) {
+ m_firstActivateHandled = true;
+ int val = SCREEN_SENSITIVITY_TEST;
+ Q_SCREEN_CHECKERROR(
+ screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SENSITIVITY, &val),
+ "Failed to set window sensitivity");
+
+#if _SCREEN_VERSION < _SCREEN_MAKE_VERSION(1, 0, 0)
+ // For older versions of screen, the window may still have group
+ // focus even though it was marked NO_FOCUS when it was hidden.
+ // In that situation, focus has to be given to another window
+ // so that this window can take focus back from it.
+ screen_window_t oldFocusWindow = nullptr;
+ Q_SCREEN_CHECKERROR(
+ screen_get_group_property_pv(screenGroup, SCREEN_PROPERTY_FOCUS,
+ reinterpret_cast<void **>(&oldFocusWindow)),
+ "Failed to retrieve group focus");
+ if (newFocusWindow == oldFocusWindow) {
+ char groupName[256];
+ memset(groupName, 0, sizeof(groupName));
+ Q_SCREEN_CHECKERROR(screen_get_group_property_cv(screenGroup, SCREEN_PROPERTY_NAME,
+ sizeof(groupName) - 1, groupName),
+ "Failed to retrieve group name");
+
+ Q_SCREEN_CHECKERROR(screen_create_window_type(&temporaryFocusWindow,
+ m_screenContext, SCREEN_CHILD_WINDOW),
+ "Failed to create temporary focus window");
+ Q_SCREEN_CHECKERROR(screen_join_window_group(temporaryFocusWindow, groupName),
+ "Temporary focus window failed to join window group");
+ Q_SCREEN_CHECKERROR(
+ screen_set_group_property_pv(screenGroup, SCREEN_PROPERTY_FOCUS,
+ reinterpret_cast<void **>(&temporaryFocusWindow)),
+ "Temporary focus window failed to take focus");
+ screen_flush_context(m_screenContext, 0);
+ }
+#endif
}
+
+ Q_SCREEN_CHECKERROR(screen_set_group_property_pv(screenGroup, SCREEN_PROPERTY_FOCUS,
+ reinterpret_cast<void **>(&newFocusWindow)),
+ "Failed to set group focus");
+
+ screen_destroy_window(temporaryFocusWindow);
}
void QQnxWindow::setWindowState(Qt::WindowStates state)
@@ -711,7 +763,11 @@ void QQnxWindow::initWindow()
screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SWAP_INTERVAL, &val),
"Failed to set swap interval");
- if (window()->flags() & Qt::WindowDoesNotAcceptFocus) {
+ if (showWithoutActivating() || !focusable()) {
+ // NO_FOCUS is temporary for showWithoutActivating (and pop-up) windows.
+ // Using NO_FOCUS ensures that screen doesn't activate the window because
+ // it was just created. Sensitivity will be changed to TEST when the
+ // window is clicked or touched.
val = SCREEN_SENSITIVITY_NO_FOCUS;
Q_SCREEN_CHECKERROR(
screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SENSITIVITY, &val),
@@ -825,4 +881,22 @@ bool QQnxWindow::shouldMakeFullScreen() const
&& (QQnxIntegration::instance()->options() & QQnxIntegration::FullScreenApplication));
}
+
+void QQnxWindow::handleActivationEvent()
+{
+ if (showWithoutActivating() && focusable() && !m_firstActivateHandled)
+ requestActivateWindow();
+}
+
+bool QQnxWindow::showWithoutActivating() const
+{
+ return (window()->flags() & Qt::Popup) == Qt::Popup
+ || window()->property("_q_showWithoutActivating").toBool();
+}
+
+bool QQnxWindow::focusable() const
+{
+ return (window()->flags() & Qt::WindowDoesNotAcceptFocus) != Qt::WindowDoesNotAcceptFocus;
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qnx/qqnxwindow.h b/src/plugins/platforms/qnx/qqnxwindow.h
index 2895a547b1..20c38cb4b7 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.h
+++ b/src/plugins/platforms/qnx/qqnxwindow.h
@@ -113,6 +113,7 @@ public:
bool shouldMakeFullScreen() const;
void windowPosted();
+ void handleActivationEvent();
protected:
virtual int pixelFormat() const = 0;
@@ -131,6 +132,8 @@ private:
void updateZorder(screen_window_t window, int &zOrder);
void applyWindowState();
void setFocus(screen_window_t newFocusWindow);
+ bool showWithoutActivating() const;
+ bool focusable() const;
screen_window_t m_window;
QSize m_bufferSize;
@@ -152,6 +155,7 @@ private:
QByteArray m_parentGroupName;
bool m_isTopLevel;
+ bool m_firstActivateHandled;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/vnc/qvnc.cpp b/src/plugins/platforms/vnc/qvnc.cpp
index ffe00de2b1..32114c6443 100644
--- a/src/plugins/platforms/vnc/qvnc.cpp
+++ b/src/plugins/platforms/vnc/qvnc.cpp
@@ -600,7 +600,7 @@ void QVncClientCursor::changeCursor(QCursor *widgetCursor, QWindow *window)
cursor = *platformImage.image();
hotspot = platformImage.hotspot();
}
- for (auto client : clients)
+ for (auto client : qAsConst(clients))
client->setDirtyCursor();
}
@@ -638,16 +638,14 @@ void QVncServer::init()
QVncServer::~QVncServer()
{
- for (auto client : clients) {
- delete client;
- }
+ qDeleteAll(clients);
}
void QVncServer::setDirty()
{
- for (auto client : clients) {
+ for (auto client : qAsConst(clients))
client->setDirty(qvnc_screen->dirtyRegion);
- }
+
qvnc_screen->clearDirty();
}
diff --git a/src/plugins/platforms/vnc/qvncscreen.cpp b/src/plugins/platforms/vnc/qvncscreen.cpp
index 67d33de2f0..2eca18fb4d 100644
--- a/src/plugins/platforms/vnc/qvncscreen.cpp
+++ b/src/plugins/platforms/vnc/qvncscreen.cpp
@@ -75,7 +75,7 @@ bool QVncScreen::initialize()
mDepth = 32;
mPhysicalSize = QSizeF(mGeometry.width()/96.*25.4, mGeometry.height()/96.*25.4);
- for (const QString &arg : mArgs) {
+ for (const QString &arg : qAsConst(mArgs)) {
QRegularExpressionMatch match;
if (arg.contains(mmSizeRx, &match)) {
mPhysicalSize = QSizeF(match.captured("width").toDouble(), match.captured("height").toDouble());
diff --git a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
index de11356fd4..a1ff6f1141 100644
--- a/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
+++ b/src/plugins/platforms/windows/qwindowsnativeinterface.cpp
@@ -277,6 +277,8 @@ QFunctionPointer QWindowsNativeInterface::platformFunction(const QByteArray &fun
return QFunctionPointer(QWindowsWindow::setTouchWindowTouchTypeStatic);
if (function == QWindowsWindowFunctions::setHasBorderInFullScreenIdentifier())
return QFunctionPointer(QWindowsWindow::setHasBorderInFullScreenStatic);
+ if (function == QWindowsWindowFunctions::setHasBorderInFullScreenDefaultIdentifier())
+ return QFunctionPointer(QWindowsWindow::setHasBorderInFullScreenDefault);
if (function == QWindowsWindowFunctions::setWindowActivationBehaviorIdentifier())
return QFunctionPointer(QWindowsNativeInterface::setWindowActivationBehavior);
if (function == QWindowsWindowFunctions::isTabletModeIdentifier())
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 54a4f237ff..8a6466c9cf 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1180,6 +1180,7 @@ QWindowCreationContext::QWindowCreationContext(const QWindow *w,
const char *QWindowsWindow::embeddedNativeParentHandleProperty = "_q_embedded_native_parent_handle";
const char *QWindowsWindow::hasBorderInFullScreenProperty = "_q_has_border_in_fullscreen";
+bool QWindowsWindow::m_borderInFullScreenDefault = false;
QWindowsWindow::QWindowsWindow(QWindow *aWindow, const QWindowsWindowData &data) :
QWindowsBaseWindow(aWindow),
@@ -1217,7 +1218,7 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const QWindowsWindowData &data)
if (aWindow->isTopLevel())
setWindowIcon(aWindow->icon());
- if (aWindow->property(hasBorderInFullScreenProperty).toBool())
+ if (m_borderInFullScreenDefault || aWindow->property(hasBorderInFullScreenProperty).toBool())
setFlag(HasBorderInFullScreen);
clearFlag(WithinCreate);
}
@@ -2816,6 +2817,11 @@ void QWindowsWindow::setHasBorderInFullScreenStatic(QWindow *window, bool border
window->setProperty(hasBorderInFullScreenProperty, QVariant(border));
}
+void QWindowsWindow::setHasBorderInFullScreenDefault(bool border)
+{
+ m_borderInFullScreenDefault = border;
+}
+
void QWindowsWindow::setHasBorderInFullScreen(bool border)
{
if (testFlag(HasBorderInFullScreen) == border)
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index b9b398b67b..b07bd15d2a 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -341,6 +341,7 @@ public:
static void setTouchWindowTouchTypeStatic(QWindow *window, QWindowsWindowFunctions::TouchWindowTouchTypes touchTypes);
void registerTouchWindow(QWindowsWindowFunctions::TouchWindowTouchTypes touchTypes = QWindowsWindowFunctions::NormalTouch);
static void setHasBorderInFullScreenStatic(QWindow *window, bool border);
+ static void setHasBorderInFullScreenDefault(bool border);
void setHasBorderInFullScreen(bool border);
static QString formatWindowTitle(const QString &title);
@@ -386,6 +387,7 @@ private:
// note: intentionally not using void * in order to avoid breaking x86
VkSurfaceKHR m_vkSurface = 0;
#endif
+ static bool m_borderInFullScreenDefault;
};
#ifndef QT_NO_DEBUG_STREAM
diff --git a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h
index 9b01c0a3fc..bc82351283 100644
--- a/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h
+++ b/src/plugins/platforms/xcb/nativepainting/qpaintengine_x11_p.h
@@ -116,7 +116,7 @@ protected:
friend GC qt_x11_get_brush_gc(QPainter *);
private:
- Q_DISABLE_COPY(QX11PaintEngine)
+ Q_DISABLE_COPY_MOVE(QX11PaintEngine)
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 29acf0e86d..1ff06dd39e 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -132,6 +132,12 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
if (!m_startupId.isNull())
qunsetenv("DESKTOP_STARTUP_ID");
+ m_focusInTimer.setSingleShot(true);
+ m_focusInTimer.callOnTimeout([]() {
+ // No FocusIn events for us, proceed with FocusOut normally.
+ QWindowSystemInterface::handleWindowActivated(nullptr, Qt::ActiveWindowFocusReason);
+ });
+
sync();
}
@@ -732,11 +738,6 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
m_glIntegration->handleXcbEvent(event, response_type);
}
-void QXcbConnection::addPeekFunc(PeekFunc f)
-{
- m_peekFuncs.append(f);
-}
-
void QXcbConnection::setFocusWindow(QWindow *w)
{
m_focusWindow = w ? static_cast<QXcbWindow *>(w->handle()) : nullptr;
@@ -1016,15 +1017,6 @@ void QXcbConnection::processXcbEvents(QEventLoop::ProcessEventsFlags flags)
if (compressEvent(event))
continue;
- auto isWaitingFor = [=](PeekFunc peekFunc) {
- // These callbacks return true if the event is what they were
- // waiting for, remove them from the list in that case.
- return peekFunc(this, event);
- };
- m_peekFuncs.erase(std::remove_if(m_peekFuncs.begin(), m_peekFuncs.end(),
- isWaitingFor),
- m_peekFuncs.end());
-
handleXcbEvent(event);
// The lock-based solution used to free the lock inside this loop,
@@ -1033,12 +1025,6 @@ void QXcbConnection::processXcbEvents(QEventLoop::ProcessEventsFlags flags)
m_eventQueue->flushBufferedEvents();
}
- // Indicate with a null event that the event the callbacks are waiting for
- // is not in the queue currently.
- for (PeekFunc f : qAsConst(m_peekFuncs))
- f(this, nullptr);
- m_peekFuncs.clear();
-
xcb_flush(xcb_connection());
}
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 47036ca257..d63888b48f 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -43,6 +43,7 @@
#include <xcb/xcb.h>
#include <xcb/randr.h>
+#include <QtCore/QTimer>
#include <QtGui/private/qtguiglobal_p.h>
#include "qxcbexport.h"
#include <QHash>
@@ -183,9 +184,6 @@ public:
QXcbWindowEventListener *windowEventListenerFromId(xcb_window_t id);
QXcbWindow *platformWindowFromId(xcb_window_t id);
- typedef bool (*PeekFunc)(QXcbConnection *, xcb_generic_event_t *);
- void addPeekFunc(PeekFunc f);
-
inline xcb_timestamp_t time() const { return m_time; }
inline void setTime(xcb_timestamp_t t) { if (t > m_time) m_time = t; }
@@ -247,6 +245,8 @@ public:
void flush() { xcb_flush(xcb_connection()); }
void processXcbEvents(QEventLoop::ProcessEventsFlags flags);
+ QTimer &focusInTimer() { return m_focusInTimer; };
+
protected:
bool event(QEvent *e) override;
@@ -364,8 +364,6 @@ private:
WindowMapper m_mapper;
- QVector<PeekFunc> m_peekFuncs;
-
Qt::MouseButtons m_buttonState = 0;
Qt::MouseButton m_button = Qt::NoButton;
@@ -386,6 +384,8 @@ private:
friend class QXcbEventQueue;
QByteArray m_xdgCurrentDesktop;
+ QTimer m_focusInTimer;
+
};
#if QT_CONFIG(xcb_xinput)
#if QT_CONFIG(tabletevent)
diff --git a/src/plugins/platforms/xcb/qxcbconnection_screens.cpp b/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
index 9aba996bb9..4bafe83156 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
@@ -208,7 +208,7 @@ void QXcbConnection::updateScreen(QXcbScreen *screen, const xcb_randr_output_cha
const int idx = m_screens.indexOf(screen);
if (idx > 0) {
qAsConst(m_screens).first()->setPrimary(false);
- m_screens.swap(0, idx);
+ m_screens.swapItemsAt(0, idx);
}
screen->virtualDesktop()->setPrimaryScreen(screen);
QXcbIntegration::instance()->setPrimaryScreen(screen);
@@ -260,7 +260,7 @@ void QXcbConnection::destroyScreen(QXcbScreen *screen)
newPrimary->setPrimary(true);
const int idx = m_screens.indexOf(newPrimary);
if (idx > 0)
- m_screens.swap(0, idx);
+ m_screens.swapItemsAt(0, idx);
QXcbIntegration::instance()->setPrimaryScreen(newPrimary);
}
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index 04ddd3c98c..78ef7760af 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -637,7 +637,7 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo
qreal nx = -1.0, ny = -1.0;
qreal w = 0.0, h = 0.0;
bool majorAxisIsY = touchPoint.area.height() > touchPoint.area.width();
- for (const TouchDeviceData::ValuatorClassInfo vci : dev->valuatorInfo) {
+ for (const TouchDeviceData::ValuatorClassInfo &vci : qAsConst(dev->valuatorInfo)) {
double value;
if (!xi2GetValuatorValueIfSet(xiDeviceEvent, vci.number, &value))
continue;
@@ -823,7 +823,7 @@ bool QXcbConnection::xi2SetMouseGrabEnabled(xcb_window_t w, bool grab)
| XCB_INPUT_XI_EVENT_MASK_TOUCH_UPDATE
| XCB_INPUT_XI_EVENT_MASK_TOUCH_END;
- for (int id : m_xiMasterPointerIds) {
+ for (int id : qAsConst(m_xiMasterPointerIds)) {
xcb_generic_error_t *error = nullptr;
auto cookie = xcb_input_xi_grab_device(xcb_connection(), w, XCB_CURRENT_TIME, XCB_CURSOR_NONE, id,
XCB_INPUT_GRAB_MODE_22_ASYNC, XCB_INPUT_GRAB_MODE_22_ASYNC,
@@ -841,7 +841,7 @@ bool QXcbConnection::xi2SetMouseGrabEnabled(xcb_window_t w, bool grab)
free(reply);
}
} else { // ungrab
- for (int id : m_xiMasterPointerIds) {
+ for (int id : qAsConst(m_xiMasterPointerIds)) {
auto cookie = xcb_input_xi_ungrab_device_checked(xcb_connection(), XCB_CURRENT_TIME, id);
xcb_generic_error_t *error = xcb_request_check(xcb_connection(), cookie);
if (error) {
diff --git a/src/plugins/platforms/xcb/qxcbeventqueue.cpp b/src/plugins/platforms/xcb/qxcbeventqueue.cpp
index acec0486c2..82a36c0727 100644
--- a/src/plugins/platforms/xcb/qxcbeventqueue.cpp
+++ b/src/plugins/platforms/xcb/qxcbeventqueue.cpp
@@ -262,7 +262,7 @@ qint32 QXcbEventQueue::generatePeekerId()
bool QXcbEventQueue::removePeekerId(qint32 peekerId)
{
- const auto it = m_peekerToNode.find(peekerId);
+ const auto it = m_peekerToNode.constFind(peekerId);
if (it == m_peekerToNode.constEnd()) {
qCWarning(lcQpaXcb, "failed to remove unknown peeker id: %d", peekerId);
return false;
@@ -281,7 +281,7 @@ bool QXcbEventQueue::peekEventQueue(PeekerCallback peeker, void *peekerData,
const bool peekerIdProvided = peekerId != -1;
auto peekerToNodeIt = m_peekerToNode.find(peekerId);
- if (peekerIdProvided && peekerToNodeIt == m_peekerToNode.constEnd()) {
+ if (peekerIdProvided && peekerToNodeIt == m_peekerToNode.end()) {
qCWarning(lcQpaXcb, "failed to find index for unknown peeker id: %d", peekerId);
return false;
}
@@ -341,7 +341,7 @@ bool QXcbEventQueue::peekEventQueue(PeekerCallback peeker, void *peekerData,
// Before updating, make sure that a peeker callback did not remove
// the peeker id.
peekerToNodeIt = m_peekerToNode.find(peekerId);
- if (peekerToNodeIt != m_peekerToNode.constEnd())
+ if (peekerToNodeIt != m_peekerToNode.end())
*peekerToNodeIt = node; // id still in the cache, update node
}
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index 524af5a2a7..4d526a6bda 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
@@ -304,7 +304,7 @@ QPlatformNativeInterface::NativeResourceForWindowFunction QXcbNativeInterface::n
QPlatformNativeInterface::NativeResourceForBackingStoreFunction QXcbNativeInterface::nativeResourceFunctionForBackingStore(const QByteArray &resource)
{
const QByteArray lowerCaseResource = resource.toLower();
- NativeResourceForBackingStoreFunction func = handlerNativeResourceFunctionForBackingStore(resource);
+ NativeResourceForBackingStoreFunction func = handlerNativeResourceFunctionForBackingStore(lowerCaseResource);
return func;
}
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 57dbdc9bec..0fa0e8cd7b 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -147,7 +147,7 @@ void QXcbVirtualDesktop::setPrimaryScreen(QPlatformScreen *s)
{
const int idx = m_screens.indexOf(s);
Q_ASSERT(idx > -1);
- m_screens.swap(0, idx);
+ m_screens.swapItemsAt(0, idx);
}
QXcbXSettings *QXcbVirtualDesktop::xSettings() const
diff --git a/src/plugins/platforms/xcb/qxcbsessionmanager.h b/src/plugins/platforms/xcb/qxcbsessionmanager.h
index 0ad9445361..79c587b38d 100644
--- a/src/plugins/platforms/xcb/qxcbsessionmanager.h
+++ b/src/plugins/platforms/xcb/qxcbsessionmanager.h
@@ -85,8 +85,6 @@ public:
private:
QEventLoop *m_eventLoop;
-
- Q_DISABLE_COPY(QXcbSessionManager)
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 3bfcbf2adb..9382488b74 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -843,40 +843,12 @@ void QXcbWindow::doFocusIn()
QWindowSystemInterface::handleWindowActivated(w, Qt::ActiveWindowFocusReason);
}
-static bool focusInPeeker(QXcbConnection *connection, xcb_generic_event_t *event)
-{
- if (!event) {
- // FocusIn event is not in the queue, proceed with FocusOut normally.
- QWindowSystemInterface::handleWindowActivated(nullptr, Qt::ActiveWindowFocusReason);
- return true;
- }
- uint response_type = event->response_type & ~0x80;
- if (response_type == XCB_FOCUS_IN) {
- // Ignore focus events that are being sent only because the pointer is over
- // our window, even if the input focus is in a different window.
- xcb_focus_in_event_t *e = (xcb_focus_in_event_t *) event;
- if (e->detail != XCB_NOTIFY_DETAIL_POINTER)
- return true;
- }
-
- /* We are also interested in XEMBED_FOCUS_IN events */
- if (response_type == XCB_CLIENT_MESSAGE) {
- xcb_client_message_event_t *cme = (xcb_client_message_event_t *)event;
- if (cme->type == connection->atom(QXcbAtom::_XEMBED)
- && cme->data.data32[1] == XEMBED_FOCUS_IN)
- return true;
- }
-
- return false;
-}
-
void QXcbWindow::doFocusOut()
{
connection()->setFocusWindow(nullptr);
relayFocusToModalWindow();
// Do not set the active window to nullptr if there is a FocusIn coming.
- // The FocusIn handler will update QXcbConnection::setFocusWindow() accordingly.
- connection()->addPeekFunc(focusInPeeker);
+ connection()->focusInTimer().start(400);
}
struct QtMotifWmHints {
@@ -2264,6 +2236,8 @@ void QXcbWindow::handleFocusInEvent(const xcb_focus_in_event_t *event)
// our window, even if the input focus is in a different window.
if (event->detail == XCB_NOTIFY_DETAIL_POINTER)
return;
+
+ connection()->focusInTimer().stop();
doFocusIn();
}
@@ -2491,6 +2465,7 @@ void QXcbWindow::handleXEmbedMessage(const xcb_client_message_event_t *event)
xcbScreen()->windowShown(this);
break;
case XEMBED_FOCUS_IN:
+ connection()->focusInTimer().stop();
Qt::FocusReason reason;
switch (event->data.data32[2]) {
case XEMBED_FOCUS_FIRST:
diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h
index b72e676419..2be88bb4c0 100644
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h
@@ -82,7 +82,7 @@ public:
private:
QScopedPointer<QXdgDesktopPortalThemePrivate> d_ptr;
- Q_DISABLE_COPY(QXdgDesktopPortalTheme)
+ Q_DISABLE_COPY_MOVE(QXdgDesktopPortalTheme)
};
QT_END_NAMESPACE
diff --git a/src/plugins/printsupport/cups/qcupsprintengine_p.h b/src/plugins/printsupport/cups/qcupsprintengine_p.h
index 2a1a83b9d7..c021b0c643 100644
--- a/src/plugins/printsupport/cups/qcupsprintengine_p.h
+++ b/src/plugins/printsupport/cups/qcupsprintengine_p.h
@@ -77,7 +77,7 @@ public:
// end reimplementations QPdfPrintEngine
private:
- Q_DISABLE_COPY(QCupsPrintEngine)
+ Q_DISABLE_COPY_MOVE(QCupsPrintEngine)
};
class QCupsPrintEnginePrivate : public QPdfPrintEnginePrivate
@@ -91,7 +91,7 @@ public:
void closePrintDevice() override;
private:
- Q_DISABLE_COPY(QCupsPrintEnginePrivate)
+ Q_DISABLE_COPY_MOVE(QCupsPrintEnginePrivate)
void changePrinter(const QString &newPrinter);
void setPageSize(const QPageSize &pageSize);
diff --git a/src/plugins/printsupport/windows/qwindowsprintersupport.h b/src/plugins/printsupport/windows/qwindowsprintersupport.h
index 4267701145..400701628e 100644
--- a/src/plugins/printsupport/windows/qwindowsprintersupport.h
+++ b/src/plugins/printsupport/windows/qwindowsprintersupport.h
@@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
class QWindowsPrinterSupport : public QPlatformPrinterSupport
{
- Q_DISABLE_COPY(QWindowsPrinterSupport)
+ Q_DISABLE_COPY_MOVE(QWindowsPrinterSupport)
public:
QWindowsPrinterSupport();
~QWindowsPrinterSupport() override;
diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
index f2ae3fbc47..febbe58506 100644
--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
+++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
@@ -197,6 +197,7 @@ protected:
QSqlRecord record() const override;
void virtual_hook(int id, void *data) override;
bool nextResult() override;
+ void detachFromResultSet() override;
#if MYSQL_VERSION_ID >= 40108
bool prepare(const QString &stmt) override;
@@ -804,6 +805,15 @@ int QMYSQLResult::numRowsAffected()
return d->rowsAffected;
}
+void QMYSQLResult::detachFromResultSet()
+{
+ Q_D(QMYSQLResult);
+
+ if (d->preparedQuery) {
+ mysql_stmt_free_result(d->stmt);
+ }
+}
+
QVariant QMYSQLResult::lastInsertId() const
{
Q_D(const QMYSQLResult);
@@ -1541,7 +1551,7 @@ QSqlIndex QMYSQLDriver::primaryIndex(const QString& tablename) const
QSqlQuery i(createResult());
QString stmt(QLatin1String("show index from %1;"));
QSqlRecord fil = record(tablename);
- i.exec(stmt.arg(tablename));
+ i.exec(stmt.arg(escapeIdentifier(tablename, QSqlDriver::TableName)));
while (i.isActive() && i.next()) {
if (i.value(2).toString() == QLatin1String("PRIMARY")) {
idx.append(fil.field(i.value(4).toString()));
diff --git a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
index 1fbbcd0ef1..7f98efccba 100644
--- a/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
+++ b/src/plugins/sqldrivers/odbc/qsql_odbc.cpp
@@ -345,7 +345,7 @@ static QSqlError qMakeError(const QString& err, QSqlError::ErrorType type,
{
int nativeCode = -1;
QString message = qODBCWarn(p, &nativeCode);
- return QSqlError(QLatin1String("QODBC3: ") + err, qODBCWarn(p), type,
+ return QSqlError(QLatin1String("QODBC3: ") + err, message, type,
nativeCode != -1 ? QString::number(nativeCode) : QString());
}
diff --git a/src/plugins/sqldrivers/psql/main.cpp b/src/plugins/sqldrivers/psql/main.cpp
index c5d546f6ff..a0862a238a 100644
--- a/src/plugins/sqldrivers/psql/main.cpp
+++ b/src/plugins/sqldrivers/psql/main.cpp
@@ -61,11 +61,9 @@ QPSQLDriverPlugin::QPSQLDriverPlugin()
QSqlDriver* QPSQLDriverPlugin::create(const QString &name)
{
- if (name == QLatin1String("QPSQL") || name == QLatin1String("QPSQL7")) {
- QPSQLDriver* driver = new QPSQLDriver();
- return driver;
- }
- return 0;
+ if (name == QLatin1String("QPSQL") || name == QLatin1String("QPSQL7"))
+ return new QPSQLDriver;
+ return nullptr;
}
QT_END_NAMESPACE
diff --git a/src/plugins/sqldrivers/psql/qsql_psql.cpp b/src/plugins/sqldrivers/psql/qsql_psql.cpp
index 7ad9db1ea8..49b793ce38 100644
--- a/src/plugins/sqldrivers/psql/qsql_psql.cpp
+++ b/src/plugins/sqldrivers/psql/qsql_psql.cpp
@@ -42,7 +42,7 @@
#include <qcoreapplication.h>
#include <qvariant.h>
#include <qdatetime.h>
-#include <qregexp.h>
+#include <qregularexpression.h>
#include <qsqlerror.h>
#include <qsqlfield.h>
#include <qsqlindex.h>
@@ -54,6 +54,8 @@
#include <QtSql/private/qsqlresult_p.h>
#include <QtSql/private/qsqldriver_p.h>
+#include <queue>
+
#include <libpq-fe.h>
#include <pg_config.h>
@@ -147,10 +149,10 @@ class QPSQLDriverPrivate final : public QSqlDriverPrivate
Q_DECLARE_PUBLIC(QPSQLDriver)
public:
QPSQLDriverPrivate() : QSqlDriverPrivate(),
- connection(0),
+ connection(nullptr),
isUtf8(false),
pro(QPSQLDriver::Version6),
- sn(0),
+ sn(nullptr),
pendingNotifyCheck(false),
hasBackslashEscape(false),
stmtCount(0),
@@ -187,11 +189,13 @@ public:
void QPSQLDriverPrivate::appendTables(QStringList &tl, QSqlQuery &t, QChar type)
{
- QString query = QString::fromLatin1("select pg_class.relname, pg_namespace.nspname from pg_class "
- "left join pg_namespace on (pg_class.relnamespace = pg_namespace.oid) "
- "where (pg_class.relkind = '%1') and (pg_class.relname !~ '^Inv') "
- "and (pg_class.relname !~ '^pg_') "
- "and (pg_namespace.nspname != 'information_schema')").arg(type);
+ const QString query =
+ QStringLiteral("SELECT pg_class.relname, pg_namespace.nspname FROM pg_class "
+ "LEFT JOIN pg_namespace ON (pg_class.relnamespace = pg_namespace.oid) "
+ "WHERE (pg_class.relkind = '") + type +
+ QStringLiteral("') AND (pg_class.relname !~ '^Inv') "
+ "AND (pg_class.relname !~ '^pg_') "
+ "AND (pg_namespace.nspname != 'information_schema')");
t.exec(query);
while (t.next()) {
QString schema = t.value(1).toString();
@@ -294,10 +298,10 @@ public:
Q_DECLARE_SQLDRIVER_PRIVATE(QPSQLDriver)
QPSQLResultPrivate(QPSQLResult *q, const QPSQLDriver *drv)
: QSqlResultPrivate(q, drv),
- result(0),
+ result(nullptr),
+ stmtId(InvalidStatementId),
currentSize(-1),
canFetchMoreRows(false),
- stmtId(InvalidStatementId),
preparedQueriesEnabled(false)
{ }
@@ -305,12 +309,12 @@ public:
void deallocatePreparedStmt();
PGresult *result;
- QList<PGresult*> nextResultSets;
+ std::queue<PGresult*> nextResultSets;
+ QString preparedStmtId;
+ StatementId stmtId;
int currentSize;
bool canFetchMoreRows;
- StatementId stmtId;
bool preparedQueriesEnabled;
- QString preparedStmtId;
bool processResults();
};
@@ -423,7 +427,7 @@ static QVariant::Type qDecodePSQLType(int t)
void QPSQLResultPrivate::deallocatePreparedStmt()
{
- const QString stmt = QLatin1String("DEALLOCATE ") + preparedStmtId;
+ const QString stmt = QStringLiteral("DEALLOCATE ") + preparedStmtId;
PGresult *result = drv_d_func()->exec(stmt);
if (PQresultStatus(result) != PGRES_COMMAND_OK)
@@ -460,8 +464,10 @@ void QPSQLResult::cleanup()
if (d->result)
PQclear(d->result);
d->result = nullptr;
- while (!d->nextResultSets.isEmpty())
- PQclear(d->nextResultSets.takeFirst());
+ while (!d->nextResultSets.empty()) {
+ PQclear(d->nextResultSets.front());
+ d->nextResultSets.pop();
+ }
if (d->stmtId != InvalidStatementId) {
if (d->drv_d_func())
d->drv_d_func()->finishQuery(d->stmtId);
@@ -622,7 +628,11 @@ bool QPSQLResult::nextResult()
if (d->result)
PQclear(d->result);
- d->result = d->nextResultSets.isEmpty() ? nullptr : d->nextResultSets.takeFirst();
+ d->result = nullptr;
+ if (!d->nextResultSets.empty()) {
+ d->result = d->nextResultSets.front();
+ d->nextResultSets.pop();
+ }
return d->processResults();
}
@@ -646,9 +656,9 @@ QVariant QPSQLResult::data(int i)
return d->drv_d_func()->isUtf8 ? QString::fromUtf8(val) : QString::fromLatin1(val);
case QVariant::LongLong:
if (val[0] == '-')
- return QString::fromLatin1(val).toLongLong();
+ return QByteArray::fromRawData(val, qstrlen(val)).toLongLong();
else
- return QString::fromLatin1(val).toULongLong();
+ return QByteArray::fromRawData(val, qstrlen(val)).toULongLong();
case QVariant::Int:
return atoi(val);
case QVariant::Double: {
@@ -754,7 +764,7 @@ bool QPSQLResult::reset (const QString& query)
if (!isForwardOnly()) {
// Fetch all result sets right away
while (PGresult *nextResultSet = d->drv_d_func()->getResult(d->stmtId))
- d->nextResultSets.append(nextResultSet);
+ d->nextResultSets.push(nextResultSet);
}
return d->processResults();
}
@@ -768,7 +778,8 @@ int QPSQLResult::size()
int QPSQLResult::numRowsAffected()
{
Q_D(const QPSQLResult);
- return QString::fromLatin1(PQcmdTuples(d->result)).toInt();
+ const char *tuples = PQcmdTuples(d->result);
+ return QByteArray::fromRawData(tuples, qstrlen(tuples)).toInt();
}
QVariant QPSQLResult::lastInsertId() const
@@ -777,7 +788,7 @@ QVariant QPSQLResult::lastInsertId() const
if (d->drv_d_func()->pro >= QPSQLDriver::Version8_1) {
QSqlQuery qry(driver()->createResult());
// Most recent sequence value obtained from nextval
- if (qry.exec(QLatin1String("SELECT lastval();")) && qry.next())
+ if (qry.exec(QStringLiteral("SELECT lastval();")) && qry.next())
return qry.value(0);
} else if (isActive()) {
Oid id = PQoidValue(d->result);
@@ -868,15 +879,13 @@ static QString qCreateParamString(const QVector<QVariant> &boundValues, const QS
QString params;
QSqlField f;
- for (int i = 0; i < boundValues.count(); ++i) {
- const QVariant &val = boundValues.at(i);
-
+ for (const QVariant &val : boundValues) {
f.setType(val.type());
if (val.isNull())
f.clear();
else
f.setValue(val);
- if(!params.isNull())
+ if (!params.isNull())
params.append(QLatin1String(", "));
params.append(driver->formatValue(f));
}
@@ -886,7 +895,7 @@ static QString qCreateParamString(const QVector<QVariant> &boundValues, const QS
QString qMakePreparedStmtId()
{
static QBasicAtomicInt qPreparedStmtCount = Q_BASIC_ATOMIC_INITIALIZER(0);
- QString id = QLatin1String("qpsqlpstmt_") + QString::number(qPreparedStmtCount.fetchAndAddRelaxed(1) + 1, 16);
+ QString id = QStringLiteral("qpsqlpstmt_") + QString::number(qPreparedStmtCount.fetchAndAddRelaxed(1) + 1, 16);
return id;
}
@@ -902,7 +911,7 @@ bool QPSQLResult::prepare(const QString &query)
d->deallocatePreparedStmt();
const QString stmtId = qMakePreparedStmtId();
- const QString stmt = QString::fromLatin1("PREPARE %1 AS ").arg(stmtId).append(d->positionalToNamedBinding(query));
+ const QString stmt = QStringLiteral("PREPARE %1 AS ").arg(stmtId).append(d->positionalToNamedBinding(query));
PGresult *result = d->drv_d_func()->exec(stmt);
@@ -930,9 +939,9 @@ bool QPSQLResult::exec()
QString stmt;
const QString params = qCreateParamString(boundValues(), driver());
if (params.isEmpty())
- stmt = QString::fromLatin1("EXECUTE %1").arg(d->preparedStmtId);
+ stmt = QStringLiteral("EXECUTE %1").arg(d->preparedStmtId);
else
- stmt = QString::fromLatin1("EXECUTE %1 (%2)").arg(d->preparedStmtId, params);
+ stmt = QStringLiteral("EXECUTE %1 (%2)").arg(d->preparedStmtId, params);
d->stmtId = d->drv_d_func()->sendQuery(stmt);
if (d->stmtId == InvalidStatementId) {
@@ -948,7 +957,7 @@ bool QPSQLResult::exec()
if (!isForwardOnly()) {
// Fetch all result sets right away
while (PGresult *nextResultSet = d->drv_d_func()->getResult(d->stmtId))
- d->nextResultSets.append(nextResultSet);
+ d->nextResultSets.push(nextResultSet);
}
return d->processResults();
}
@@ -994,7 +1003,7 @@ void QPSQLDriverPrivate::detectBackslashEscape()
hasBackslashEscape = true;
} else {
hasBackslashEscape = false;
- PGresult* result = exec(QLatin1String("SELECT '\\\\' x"));
+ PGresult* result = exec(QStringLiteral("SELECT '\\\\' x"));
int status = PQresultStatus(result);
if (status == PGRES_COMMAND_OK || status == PGRES_TUPLES_OK)
if (QString::fromLatin1(PQgetvalue(result, 0, 0)) == QLatin1String("\\"))
@@ -1072,20 +1081,21 @@ static QPSQLDriver::Protocol qMakePSQLVersion(int vMaj, int vMin)
static QPSQLDriver::Protocol qFindPSQLVersion(const QString &versionString)
{
- const QRegExp rx(QStringLiteral("(\\d+)(?:\\.(\\d+))?"));
- if (rx.indexIn(versionString) != -1) {
+ const QRegularExpression rx(QStringLiteral("(\\d+)(?:\\.(\\d+))?"));
+ const QRegularExpressionMatch match = rx.match(versionString);
+ if (match.hasMatch()) {
// Beginning with PostgreSQL version 10, a major release is indicated by
// increasing the first part of the version, e.g. 10 to 11.
// Before version 10, a major release was indicated by increasing either
// the first or second part of the version number, e.g. 9.5 to 9.6.
- int vMaj = rx.cap(1).toInt();
+ int vMaj = match.capturedRef(1).toInt();
int vMin;
if (vMaj >= 10) {
vMin = 0;
} else {
- if (rx.cap(2).isEmpty())
+ if (match.capturedRef(2).isEmpty())
return QPSQLDriver::VersionUnknown;
- vMin = rx.cap(2).toInt();
+ vMin = match.capturedRef(2).toInt();
}
return qMakePSQLVersion(vMaj, vMin);
}
@@ -1096,7 +1106,7 @@ static QPSQLDriver::Protocol qFindPSQLVersion(const QString &versionString)
QPSQLDriver::Protocol QPSQLDriverPrivate::getPSQLVersion()
{
QPSQLDriver::Protocol serverVersion = QPSQLDriver::Version6;
- PGresult* result = exec("select version()");
+ PGresult* result = exec("SELECT version()");
int status = PQresultStatus(result);
if (status == PGRES_COMMAND_OK || status == PGRES_TUPLES_OK) {
serverVersion = qFindPSQLVersion(
@@ -1355,8 +1365,8 @@ QStringList QPSQLDriver::tables(QSql::TableType type) const
if (type & QSql::Views)
const_cast<QPSQLDriverPrivate*>(d)->appendTables(tl, t, QLatin1Char('v'));
if (type & QSql::SystemTables) {
- t.exec(QLatin1String("select relname from pg_class where (relkind = 'r') "
- "and (relname like 'pg_%') "));
+ t.exec(QStringLiteral("SELECT relname FROM pg_class WHERE (relkind = 'r') "
+ "AND (relname LIKE 'pg_%') "));
while (t.next())
tl.append(t.value(0).toString());
}
@@ -1383,31 +1393,23 @@ QSqlIndex QPSQLDriver::primaryIndex(const QString& tablename) const
QString tbl = tablename;
QString schema;
qSplitTableName(tbl, schema);
-
- if (isIdentifierEscaped(tbl, QSqlDriver::TableName))
- tbl = stripDelimiters(tbl, QSqlDriver::TableName);
- else
- tbl = std::move(tbl).toLower();
-
- if (isIdentifierEscaped(schema, QSqlDriver::TableName))
- schema = stripDelimiters(schema, QSqlDriver::TableName);
- else
- schema = std::move(schema).toLower();
-
- QString stmt = QLatin1String("SELECT pg_attribute.attname, pg_attribute.atttypid::int, "
- "pg_class.relname "
- "FROM pg_attribute, pg_class "
- "WHERE %1 pg_class.oid IN "
- "(SELECT indexrelid FROM pg_index WHERE indisprimary = true AND indrelid IN "
- "(SELECT oid FROM pg_class WHERE relname = '%2')) "
- "AND pg_attribute.attrelid = pg_class.oid "
- "AND pg_attribute.attisdropped = false "
- "ORDER BY pg_attribute.attnum");
+ schema = stripDelimiters(schema, QSqlDriver::TableName);
+ tbl = stripDelimiters(tbl, QSqlDriver::TableName);
+
+ QString stmt = QStringLiteral("SELECT pg_attribute.attname, pg_attribute.atttypid::int, "
+ "pg_class.relname "
+ "FROM pg_attribute, pg_class "
+ "WHERE %1 pg_class.oid IN "
+ "(SELECT indexrelid FROM pg_index WHERE indisprimary = true AND indrelid IN "
+ "(SELECT oid FROM pg_class WHERE relname = '%2')) "
+ "AND pg_attribute.attrelid = pg_class.oid "
+ "AND pg_attribute.attisdropped = false "
+ "ORDER BY pg_attribute.attnum");
if (schema.isEmpty())
- stmt = stmt.arg(QLatin1String("pg_table_is_visible(pg_class.oid) AND"));
+ stmt = stmt.arg(QStringLiteral("pg_table_is_visible(pg_class.oid) AND"));
else
- stmt = stmt.arg(QString::fromLatin1("pg_class.relnamespace = (select oid from "
- "pg_namespace where pg_namespace.nspname = '%1') AND").arg(schema));
+ stmt = stmt.arg(QStringLiteral("pg_class.relnamespace = (SELECT oid FROM "
+ "pg_namespace WHERE pg_namespace.nspname = '%1') AND").arg(schema));
i.exec(stmt.arg(tbl));
while (i.isActive() && i.next()) {
@@ -1427,34 +1429,26 @@ QSqlRecord QPSQLDriver::record(const QString& tablename) const
QString tbl = tablename;
QString schema;
qSplitTableName(tbl, schema);
-
- if (isIdentifierEscaped(tbl, QSqlDriver::TableName))
- tbl = stripDelimiters(tbl, QSqlDriver::TableName);
- else
- tbl = std::move(tbl).toLower();
-
- if (isIdentifierEscaped(schema, QSqlDriver::TableName))
- schema = stripDelimiters(schema, QSqlDriver::TableName);
- else
- schema = std::move(schema).toLower();
-
- QString stmt = QLatin1String("select pg_attribute.attname, pg_attribute.atttypid::int, "
- "pg_attribute.attnotnull, pg_attribute.attlen, pg_attribute.atttypmod, "
- "pg_attrdef.adsrc "
- "from pg_class, pg_attribute "
- "left join pg_attrdef on (pg_attrdef.adrelid = "
- "pg_attribute.attrelid and pg_attrdef.adnum = pg_attribute.attnum) "
- "where %1 "
- "and pg_class.relname = '%2' "
- "and pg_attribute.attnum > 0 "
- "and pg_attribute.attrelid = pg_class.oid "
- "and pg_attribute.attisdropped = false "
- "order by pg_attribute.attnum");
+ schema = stripDelimiters(schema, QSqlDriver::TableName);
+ tbl = stripDelimiters(tbl, QSqlDriver::TableName);
+
+ QString stmt = QStringLiteral("SELECT pg_attribute.attname, pg_attribute.atttypid::int, "
+ "pg_attribute.attnotnull, pg_attribute.attlen, pg_attribute.atttypmod, "
+ "pg_attrdef.adsrc "
+ "FROM pg_class, pg_attribute "
+ "LEFT JOIN pg_attrdef ON (pg_attrdef.adrelid = "
+ "pg_attribute.attrelid AND pg_attrdef.adnum = pg_attribute.attnum) "
+ "WHERE %1 "
+ "AND pg_class.relname = '%2' "
+ "AND pg_attribute.attnum > 0 "
+ "AND pg_attribute.attrelid = pg_class.oid "
+ "AND pg_attribute.attisdropped = false "
+ "ORDER BY pg_attribute.attnum");
if (schema.isEmpty())
- stmt = stmt.arg(QLatin1String("pg_table_is_visible(pg_class.oid)"));
+ stmt = stmt.arg(QStringLiteral("pg_table_is_visible(pg_class.oid)"));
else
- stmt = stmt.arg(QString::fromLatin1("pg_class.relnamespace = (select oid from "
- "pg_namespace where pg_namespace.nspname = '%1')").arg(schema));
+ stmt = stmt.arg(QStringLiteral("pg_class.relnamespace = (SELECT oid FROM "
+ "pg_namespace WHERE pg_namespace.nspname = '%1')").arg(schema));
QSqlQuery query(createResult());
query.exec(stmt.arg(tbl));
@@ -1496,9 +1490,10 @@ inline void assignSpecialPsqlFloatValue(FloatType val, QString *target)
QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const
{
Q_D(const QPSQLDriver);
+ const auto nullStr = [](){ return QStringLiteral("NULL"); };
QString r;
if (field.isNull()) {
- r = QLatin1String("NULL");
+ r = nullStr();
} else {
switch (int(field.type())) {
case QVariant::DateTime:
@@ -1507,14 +1502,14 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const
// we force the value to be considered with a timezone information, and we force it to be UTC
// this is safe since postgresql stores only the UTC value and not the timezone offset (only used
// while parsing), so we have correct behavior in both case of with timezone and without tz
- r = QLatin1String("TIMESTAMP WITH TIME ZONE ") + QLatin1Char('\'') +
- QLocale::c().toString(field.value().toDateTime().toUTC(), QLatin1String("yyyy-MM-ddThh:mm:ss.zzz")) +
+ r = QStringLiteral("TIMESTAMP WITH TIME ZONE ") + QLatin1Char('\'') +
+ QLocale::c().toString(field.value().toDateTime().toUTC(), QStringLiteral("yyyy-MM-ddThh:mm:ss.zzz")) +
QLatin1Char('Z') + QLatin1Char('\'');
} else {
- r = QLatin1String("NULL");
+ r = nullStr();
}
#else
- r = QLatin1String("NULL");
+ r = nullStr();
#endif // datestring
break;
case QVariant::Time:
@@ -1524,19 +1519,19 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const
} else
#endif
{
- r = QLatin1String("NULL");
+ r = nullStr();
}
break;
case QVariant::String:
r = QSqlDriver::formatValue(field, trimStrings);
if (d->hasBackslashEscape)
- r.replace(QLatin1String("\\"), QLatin1String("\\\\"));
+ r.replace(QLatin1Char('\\'), QLatin1String("\\\\"));
break;
case QVariant::Bool:
if (field.value().toBool())
- r = QLatin1String("TRUE");
+ r = QStringLiteral("TRUE");
else
- r = QLatin1String("FALSE");
+ r = QStringLiteral("FALSE");
break;
case QVariant::ByteArray: {
QByteArray ba(field.value().toByteArray());
@@ -1615,7 +1610,7 @@ bool QPSQLDriver::subscribeToNotification(const QString &name)
// Add the name to the list of subscriptions here so that QSQLDriverPrivate::exec knows
// to check for notifications immediately after executing the LISTEN
d->seid << name;
- QString query = QLatin1String("LISTEN ") + escapeIdentifier(name, QSqlDriver::TableName);
+ QString query = QStringLiteral("LISTEN ") + escapeIdentifier(name, QSqlDriver::TableName);
PGresult *result = d->exec(query);
if (PQresultStatus(result) != PGRES_COMMAND_OK) {
d->seid.removeLast();
@@ -1651,7 +1646,7 @@ bool QPSQLDriver::unsubscribeFromNotification(const QString &name)
return false;
}
- QString query = QLatin1String("UNLISTEN ") + escapeIdentifier(name, QSqlDriver::TableName);
+ QString query = QStringLiteral("UNLISTEN ") + escapeIdentifier(name, QSqlDriver::TableName);
PGresult *result = d->exec(query);
if (PQresultStatus(result) != PGRES_COMMAND_OK) {
setLastError(qMakeError(tr("Unable to unsubscribe"), QSqlError::StatementError, d, result));
diff --git a/src/plugins/sqldrivers/psql/qsql_psql_p.h b/src/plugins/sqldrivers/psql/qsql_psql_p.h
index 7e1849d857..4f372346c6 100644
--- a/src/plugins/sqldrivers/psql/qsql_psql_p.h
+++ b/src/plugins/sqldrivers/psql/qsql_psql_p.h
@@ -96,8 +96,8 @@ public:
UnknownLaterVersion = 100000
};
- explicit QPSQLDriver(QObject *parent=0);
- explicit QPSQLDriver(PGconn *conn, QObject *parent=0);
+ explicit QPSQLDriver(QObject *parent = nullptr);
+ explicit QPSQLDriver(PGconn *conn, QObject *parent = nullptr);
~QPSQLDriver();
bool hasFeature(DriverFeature f) const override;
bool open(const QString & db,
diff --git a/src/plugins/styles/android/qandroidstyle_p.h b/src/plugins/styles/android/qandroidstyle_p.h
index 3faa08afb9..6cb30a2f79 100644
--- a/src/plugins/styles/android/qandroidstyle_p.h
+++ b/src/plugins/styles/android/qandroidstyle_p.h
@@ -371,7 +371,7 @@ public:
void unpolish(QWidget *widget);
private:
- Q_DISABLE_COPY(QAndroidStyle)
+ Q_DISABLE_COPY_MOVE(QAndroidStyle)
static ItemType qtControl(QStyle::ComplexControl control);
static ItemType qtControl(QStyle::ContentsType contentsType);
static ItemType qtControl(QStyle::ControlElement controlElement);
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index 2b40a9a952..a52871d302 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -3989,7 +3989,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
titleRect.width());
const auto text = p->fontMetrics().elidedText(dwOpt->title, Qt::ElideRight, titleRect.width());
- proxy()->drawItemText(p, titleRect, Qt::AlignCenter | Qt::TextShowMnemonic, dwOpt->palette,
+ proxy()->drawItemText(p, titleRect, Qt::AlignCenter, dwOpt->palette,
dwOpt->state & State_Enabled, text, QPalette::WindowText);
}
p->restore();
diff --git a/src/plugins/styles/mac/qmacstyle_mac_p.h b/src/plugins/styles/mac/qmacstyle_mac_p.h
index d6874001d3..88f104cccf 100644
--- a/src/plugins/styles/mac/qmacstyle_mac_p.h
+++ b/src/plugins/styles/mac/qmacstyle_mac_p.h
@@ -115,7 +115,7 @@ public:
const QWidget *widget = 0) const;
private:
- Q_DISABLE_COPY(QMacStyle)
+ Q_DISABLE_COPY_MOVE(QMacStyle)
Q_DECLARE_PRIVATE(QMacStyle)
};
diff --git a/src/plugins/styles/windowsvista/qwindowsvistastyle_p.h b/src/plugins/styles/windowsvista/qwindowsvistastyle_p.h
index 0ebb0eb41a..43a2a670f8 100644
--- a/src/plugins/styles/windowsvista/qwindowsvistastyle_p.h
+++ b/src/plugins/styles/windowsvista/qwindowsvistastyle_p.h
@@ -99,7 +99,7 @@ public:
QPalette standardPalette() const override;
private:
- Q_DISABLE_COPY(QWindowsVistaStyle)
+ Q_DISABLE_COPY_MOVE(QWindowsVistaStyle)
Q_DECLARE_PRIVATE(QWindowsVistaStyle)
friend class QStyleFactory;
};
diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
index 4b583e13d3..43e8b37f71 100644
--- a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
+++ b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
@@ -511,8 +511,8 @@ QRegion QWindowsXPStylePrivate::region(XPThemeData &themeData)
if (numBytes == 0)
return QRegion();
- char *buf = new char[numBytes];
- if (buf == 0)
+ char *buf = new (std::nothrow) char[numBytes];
+ if (!buf)
return QRegion();
RGNDATA *rd = reinterpret_cast<RGNDATA*>(buf);
diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle_p.h b/src/plugins/styles/windowsvista/qwindowsxpstyle_p.h
index 7e9f4ddda6..0f70105b0e 100644
--- a/src/plugins/styles/windowsvista/qwindowsxpstyle_p.h
+++ b/src/plugins/styles/windowsvista/qwindowsxpstyle_p.h
@@ -96,7 +96,7 @@ public:
const QWidget *widget = nullptr) const override;
private:
- Q_DISABLE_COPY(QWindowsXPStyle)
+ Q_DISABLE_COPY_MOVE(QWindowsXPStyle)
Q_DECLARE_PRIVATE(QWindowsXPStyle)
friend class QStyleFactory;
};
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp
index 5390a8b2f2..9fb9d6c55e 100644
--- a/src/printsupport/dialogs/qprintdialog_unix.cpp
+++ b/src/printsupport/dialogs/qprintdialog_unix.cpp
@@ -738,7 +738,7 @@ static std::vector<std::pair<int, int>> pageRangesFromString(const QString &page
{
std::vector<std::pair<int, int>> result;
const QStringList items = pagesString.split(',');
- for (const QString item : items) {
+ for (const QString &item : items) {
if (item.isEmpty())
return {};
diff --git a/src/printsupport/kernel/qplatformprintdevice.cpp b/src/printsupport/kernel/qplatformprintdevice.cpp
index 69d984cb0c..3d76cad688 100644
--- a/src/printsupport/kernel/qplatformprintdevice.cpp
+++ b/src/printsupport/kernel/qplatformprintdevice.cpp
@@ -40,10 +40,8 @@
#include "qplatformprintdevice.h"
#include "qprintdevice_p.h"
-#if QT_CONFIG(printdialog)
-#include "qprintdialog.h"
-#endif
+#include <QtCore/qcoreapplication.h>
#include <QtGui/qpagelayout.h>
QT_BEGIN_NAMESPACE
@@ -165,7 +163,7 @@ QPageSize QPlatformPrintDevice::supportedPageSize(const QPageSize &pageSize) con
// e.g. Windows defines DMPAPER_11X17 and DMPAPER_TABLOID with names "11x17" and "Tabloid", but both
// map to QPageSize::Tabloid / PPD Key "Tabloid" / ANSI B Tabloid
if (pageSize.id() != QPageSize::Custom) {
- for (const QPageSize &ps : m_pageSizes) {
+ for (const QPageSize &ps : qAsConst(m_pageSizes)) {
if (ps.id() == pageSize.id() && ps.name() == pageSize.name())
return ps;
}
@@ -173,7 +171,7 @@ QPageSize QPlatformPrintDevice::supportedPageSize(const QPageSize &pageSize) con
// Next try match on id only if not custom
if (pageSize.id() != QPageSize::Custom) {
- for (const QPageSize &ps : m_pageSizes) {
+ for (const QPageSize &ps : qAsConst(m_pageSizes)) {
if (ps.id() == pageSize.id())
return ps;
}
@@ -188,7 +186,7 @@ QPageSize QPlatformPrintDevice::supportedPageSize(QPageSize::PageSizeId pageSize
if (!m_havePageSizes)
loadPageSizes();
- for (const QPageSize &ps : m_pageSizes) {
+ for (const QPageSize &ps : qAsConst(m_pageSizes)) {
if (ps.id() == pageSizeId)
return ps;
}
@@ -202,7 +200,7 @@ QPageSize QPlatformPrintDevice::supportedPageSize(const QString &pageName) const
if (!m_havePageSizes)
loadPageSizes();
- for (const QPageSize &ps : m_pageSizes) {
+ for (const QPageSize &ps : qAsConst(m_pageSizes)) {
if (ps.name() == pageName)
return ps;
}
@@ -235,7 +233,7 @@ QPageSize QPlatformPrintDevice::supportedPageSizeMatch(const QPageSize &pageSize
return pageSize;
// Try to find a supported page size based on point size
- for (const QPageSize &ps : m_pageSizes) {
+ for (const QPageSize &ps : qAsConst(m_pageSizes)) {
if (ps.sizePoints() == pageSize.sizePoints())
return ps;
}
@@ -291,11 +289,7 @@ QPrint::InputSlot QPlatformPrintDevice::defaultInputSlot() const
{
QPrint::InputSlot input;
input.key = QByteArrayLiteral("Auto");
-#if QT_CONFIG(printdialog)
- input.name = QPrintDialog::tr("Automatic");
-#else
- input.name = QString::fromLatin1("Automatic");
-#endif
+ input.name = QCoreApplication::translate("Print Device Input Slot", "Automatic");
input.id = QPrint::Auto;
return input;
}
@@ -315,11 +309,7 @@ QPrint::OutputBin QPlatformPrintDevice::defaultOutputBin() const
{
QPrint::OutputBin output;
output.key = QByteArrayLiteral("Auto");
-#if QT_CONFIG(printdialog)
- output.name = QPrintDialog::tr("Automatic");
-#else
- output.name = QString::fromLatin1("Automatic");
-#endif
+ output.name = QCoreApplication::translate("Print Device Output Bin", "Automatic");
output.id = QPrint::AutoOutputBin;
return output;
}
diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp
index 829a13863b..ddcd8c4702 100644
--- a/src/printsupport/kernel/qprinter.cpp
+++ b/src/printsupport/kernel/qprinter.cpp
@@ -1848,7 +1848,7 @@ QList<int> QPrinter::supportedResolutions() const
= d->printEngine->property(QPrintEngine::PPK_SupportedResolutions).toList();
QList<int> intlist;
intlist.reserve(varlist.size());
- for (auto var : varlist)
+ for (const auto &var : varlist)
intlist << var.toInt();
return intlist;
}
diff --git a/src/printsupport/kernel/qprinterinfo.cpp b/src/printsupport/kernel/qprinterinfo.cpp
index 4b092dee64..167b2361ef 100644
--- a/src/printsupport/kernel/qprinterinfo.cpp
+++ b/src/printsupport/kernel/qprinterinfo.cpp
@@ -400,6 +400,35 @@ QList<QPrinter::DuplexMode> QPrinterInfo::supportedDuplexModes() const
}
/*!
+ Returns the default color mode of this printer.
+
+ \since 5.13
+*/
+
+QPrinter::ColorMode QPrinterInfo::defaultColorMode() const
+{
+ Q_D(const QPrinterInfo);
+ return QPrinter::ColorMode(d->m_printDevice.defaultColorMode());
+}
+
+/*!
+ Returns the supported color modes of this printer.
+
+ \since 5.13
+*/
+
+QList<QPrinter::ColorMode> QPrinterInfo::supportedColorModes() const
+{
+ Q_D(const QPrinterInfo);
+ QList<QPrinter::ColorMode> list;
+ const auto supportedColorModes = d->m_printDevice.supportedColorModes();
+ list.reserve(supportedColorModes.size());
+ for (QPrint::ColorMode mode : supportedColorModes)
+ list << QPrinter::ColorMode(mode);
+ return list;
+}
+
+/*!
Returns a list of all the available Printer Names on this system.
It is recommended to use this instead of availablePrinters() as
diff --git a/src/printsupport/kernel/qprinterinfo.h b/src/printsupport/kernel/qprinterinfo.h
index 8bac395ab3..7195cb76b5 100644
--- a/src/printsupport/kernel/qprinterinfo.h
+++ b/src/printsupport/kernel/qprinterinfo.h
@@ -93,6 +93,9 @@ public:
QPrinter::DuplexMode defaultDuplexMode() const;
QList<QPrinter::DuplexMode> supportedDuplexModes() const;
+ QPrinter::ColorMode defaultColorMode() const;
+ QList<QPrinter::ColorMode> supportedColorModes() const;
+
static QStringList availablePrinterNames();
static QList<QPrinterInfo> availablePrinters();
diff --git a/src/printsupport/widgets/qcupsjobwidget_p.h b/src/printsupport/widgets/qcupsjobwidget_p.h
index 4b6b047e26..42da9c7580 100644
--- a/src/printsupport/widgets/qcupsjobwidget_p.h
+++ b/src/printsupport/widgets/qcupsjobwidget_p.h
@@ -113,7 +113,7 @@ private:
int m_savedPriority;
QCUPSSupport::JobSheets m_savedJobSheets;
- Q_DISABLE_COPY(QCupsJobWidget)
+ Q_DISABLE_COPY_MOVE(QCupsJobWidget)
};
QT_END_NAMESPACE
diff --git a/src/sql/doc/snippets/code/doc_src_sql-driver.qdoc b/src/sql/doc/snippets/code/doc_src_sql-driver.qdoc
index d127bdf8a5..9709deeccb 100644
--- a/src/sql/doc/snippets/code/doc_src_sql-driver.qdoc
+++ b/src/sql/doc/snippets/code/doc_src_sql-driver.qdoc
@@ -237,3 +237,16 @@ Could not create database object
//! [38]
QPSQLDriver::getResult: Query results lost - probably discarded on executing another SQL query.
//! [38]
+
+//! [39]
+CREATE TABLE "testTable" ("id" INTEGER);
+//! [39]
+
+//! [40]
+QString tableString("testTable");
+QSqlQuery q;
+// Create table query is not quoted, therefore it is mapped to lower case
+q.exec(QString("CREATE TABLE %1 (id INTEGER)").arg(tableString));
+// Call toLower() on the string so that it can be matched
+QSqlRecord rec = database.record(tableString.toLower());
+//! [40]
diff --git a/src/sql/doc/src/sql-driver.qdoc b/src/sql/doc/src/sql-driver.qdoc
index fd95e89812..cccce48bb3 100644
--- a/src/sql/doc/src/sql-driver.qdoc
+++ b/src/sql/doc/src/sql-driver.qdoc
@@ -381,6 +381,23 @@
multibyte enabled PostgreSQL server can be found in the PostgreSQL
Administrator Guide, Chapter 5.
+ \section3 QPSQL Case Sensitivity
+
+ PostgreSQL databases will only respect case sensitivity if the table or field
+ name is quoted when the table is created. So for example, a SQL query such
+ as:
+
+ \snippet code/doc_src_sql-driver.qdoc 39
+
+ will ensure that it can be accessed with the same case that was used. If the
+ table or field name is not quoted when created, the actual table name
+ or field name will be lower-case. When QSqlDatabase::record() or
+ QSqlDatabase::primaryIndex() access a table or field that was unquoted
+ when created, the name passed to the function must be lower-case to
+ ensure it is found. For example:
+
+ \snippet code/doc_src_sql-driver.qdoc 40
+
\section3 QPSQL BLOB Support
Binary Large Objects are supported through the \c BYTEA field type in
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 2c7b4b83db..d63a9e59a8 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -1088,6 +1088,11 @@ QStringList QSqlDatabase::tables(QSql::TableType type) const
Returns the primary index for table \a tablename. If no primary
index exists, an empty QSqlIndex is returned.
+ \note Some drivers, such as the \l {QPSQL Case Sensitivity}{QPSQL}
+ driver, may may require you to pass \a tablename in lower case if
+ the table was not quoted when created. See the
+ \l{sql-driver.html}{Qt SQL driver} documentation for more information.
+
\sa tables(), record()
*/
@@ -1102,6 +1107,11 @@ QSqlIndex QSqlDatabase::primaryIndex(const QString& tablename) const
the table (or view) called \a tablename. The order in which the
fields appear in the record is undefined. If no such table (or
view) exists, an empty record is returned.
+
+ \note Some drivers, such as the \l {QPSQL Case Sensitivity}{QPSQL}
+ driver, may may require you to pass \a tablename in lower case if
+ the table was not quoted when created. See the
+ \l{sql-driver.html}{Qt SQL driver} documentation for more information.
*/
QSqlRecord QSqlDatabase::record(const QString& tablename) const
@@ -1380,6 +1390,40 @@ QSqlDatabase QSqlDatabase::cloneDatabase(const QSqlDatabase &other, const QStrin
}
/*!
+ \since 5.13
+ \overload
+
+ Clones the database connection \a other and stores it as \a
+ connectionName. All the settings from the original database, e.g.
+ databaseName(), hostName(), etc., are copied across. Does nothing
+ if \a other is an invalid database. Returns the newly created
+ database connection.
+
+ \note The new connection has not been opened. Before using the new
+ connection, you must call open().
+
+ This overload is useful when cloning the database in another thread to the
+ one that is used by the database represented by \a other.
+*/
+
+QSqlDatabase QSqlDatabase::cloneDatabase(const QString &other, const QString &connectionName)
+{
+ const QConnectionDict *dict = dbDict();
+ Q_ASSERT(dict);
+
+ dict->lock.lockForRead();
+ QSqlDatabase otherDb = dict->value(other);
+ dict->lock.unlock();
+ if (!otherDb.isValid())
+ return QSqlDatabase();
+
+ QSqlDatabase db(otherDb.driverName());
+ db.d->copy(otherDb.d);
+ QSqlDatabasePrivate::addDatabase(db, connectionName);
+ return db;
+}
+
+/*!
\since 4.4
Returns the connection name, which may be empty. \note The
diff --git a/src/sql/kernel/qsqldatabase.h b/src/sql/kernel/qsqldatabase.h
index 3aadab9b2f..f233c72c19 100644
--- a/src/sql/kernel/qsqldatabase.h
+++ b/src/sql/kernel/qsqldatabase.h
@@ -118,6 +118,7 @@ public:
static QSqlDatabase addDatabase(QSqlDriver* driver,
const QString& connectionName = QLatin1String(defaultConnection));
static QSqlDatabase cloneDatabase(const QSqlDatabase &other, const QString& connectionName);
+ static QSqlDatabase cloneDatabase(const QString &other, const QString& connectionName);
static QSqlDatabase database(const QString& connectionName = QLatin1String(defaultConnection),
bool open = true);
static void removeDatabase(const QString& connectionName);
diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp
index 8c6ae382f6..7f7b81b05b 100644
--- a/src/sql/kernel/qsqldriver.cpp
+++ b/src/sql/kernel/qsqldriver.cpp
@@ -488,6 +488,8 @@ QString QSqlDriver::stripDelimiters(const QString &identifier, IdentifierType ty
QString QSqlDriver::sqlStatement(StatementType type, const QString &tableName,
const QSqlRecord &rec, bool preparedStatement) const
{
+ const auto tableNameString = tableName.isEmpty() ? QString()
+ : prepareIdentifier(tableName, QSqlDriver::TableName, this);
int i;
QString s;
s.reserve(128);
@@ -500,13 +502,12 @@ QString QSqlDriver::sqlStatement(StatementType type, const QString &tableName,
if (s.isEmpty())
return s;
s.chop(2);
- s.prepend(QLatin1String("SELECT ")).append(QLatin1String(" FROM ")).append(tableName);
+ s = QLatin1String("SELECT ") + s + QLatin1String(" FROM ") + tableNameString;
break;
case WhereStatement:
{
- const QString tableNamePrefix = tableName.isEmpty()
- ? QString()
- : prepareIdentifier(tableName, QSqlDriver::TableName, this) + QLatin1Char('.');
+ const QString tableNamePrefix = tableNameString.isEmpty()
+ ? QString() : tableNameString + QLatin1Char('.');
for (int i = 0; i < rec.count(); ++i) {
if (!rec.isGenerated(i))
continue;
@@ -523,8 +524,7 @@ QString QSqlDriver::sqlStatement(StatementType type, const QString &tableName,
break;
}
case UpdateStatement:
- s.append(QLatin1String("UPDATE ")).append(tableName).append(
- QLatin1String(" SET "));
+ s = s + QLatin1String("UPDATE ") + tableNameString + QLatin1String(" SET ");
for (i = 0; i < rec.count(); ++i) {
if (!rec.isGenerated(i))
continue;
@@ -541,10 +541,10 @@ QString QSqlDriver::sqlStatement(StatementType type, const QString &tableName,
s.clear();
break;
case DeleteStatement:
- s.append(QLatin1String("DELETE FROM ")).append(tableName);
+ s = s + QLatin1String("DELETE FROM ") + tableNameString;
break;
case InsertStatement: {
- s.append(QLatin1String("INSERT INTO ")).append(tableName).append(QLatin1String(" ("));
+ s = s + QLatin1String("INSERT INTO ") + tableNameString + QLatin1String(" (");
QString vals;
for (i = 0; i < rec.count(); ++i) {
if (!rec.isGenerated(i))
diff --git a/src/sql/models/qsqlrelationaldelegate.h b/src/sql/models/qsqlrelationaldelegate.h
index ca5c46778f..2f16a4a54b 100644
--- a/src/sql/models/qsqlrelationaldelegate.h
+++ b/src/sql/models/qsqlrelationaldelegate.h
@@ -58,7 +58,7 @@ QT_REQUIRE_CONFIG(sqlmodel);
#include <QtCore/qmetaobject.h>
QT_BEGIN_NAMESPACE
-
+// ### Qt6: QStyledItemDelegate
class QSqlRelationalDelegate: public QItemDelegate
{
static int fieldIndex(const QSqlTableModel *const model,
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index a33f76838f..98d6ddf882 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -607,6 +607,16 @@ bool QSqlTableModel::setData(const QModelIndex &index, const QVariant &value, in
return true;
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+/*!
+ \reimp
+ */
+bool QStringListModel::clearItemData(const QModelIndex &index)
+{
+ return setData(index, QVariant(), Qt::EditRole);
+}
+#endif
+
/*!
This function simply calls QSqlQueryModel::setQuery(\a query).
You should normally not call it on a QSqlTableModel. Instead, use
diff --git a/src/sql/models/qsqltablemodel.h b/src/sql/models/qsqltablemodel.h
index 7acc7dc94d..eba27e60ec 100644
--- a/src/sql/models/qsqltablemodel.h
+++ b/src/sql/models/qsqltablemodel.h
@@ -74,6 +74,9 @@ public:
QSqlRecord record(int row) const;
QVariant data(const QModelIndex &idx, int role = Qt::DisplayRole) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ bool clearItemData(const QModelIndex &index) override;
+#endif
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
diff --git a/src/testlib/configure.json b/src/testlib/configure.json
index c464037205..df6132cdc2 100644
--- a/src/testlib/configure.json
+++ b/src/testlib/configure.json
@@ -5,6 +5,12 @@
],
"features": {
+ "testlib_selfcover": {
+ "label": "Coverage testing of testlib itself",
+ "purpose": "Gauges how thoroughly testlib's selftest exercises testlib's code",
+ "autoDetect": false,
+ "output": [ "publicFeature" ]
+ },
"itemmodeltester": {
"label": "Tester for item models",
"purpose": "Provides a utility to test item models.",
diff --git a/src/testlib/doc/qttestlib.qdocconf b/src/testlib/doc/qttestlib.qdocconf
index 93a5ab393c..5fdf6d9415 100644
--- a/src/testlib/doc/qttestlib.qdocconf
+++ b/src/testlib/doc/qttestlib.qdocconf
@@ -27,7 +27,7 @@ qhp.QtTestLib.subprojects.classes.sortPages = true
tagfile = ../../../doc/qttestlib/qttestlib.tags
-depends += qtcore qtdoc qtwidgets qtgui qmake qtquick
+depends += qtcore qtdoc qtwidgets qtgui qmake qtqmltest
headerdirs += ..
diff --git a/src/testlib/doc/src/qttest-index.qdoc b/src/testlib/doc/src/qttest-index.qdoc
index 6e4f954034..23be46b431 100644
--- a/src/testlib/doc/src/qttest-index.qdoc
+++ b/src/testlib/doc/src/qttest-index.qdoc
@@ -75,11 +75,15 @@
\section1 Reference
- These are links to the API reference materials.
+ \list
+ \li \l{Qt Test C++ Classes}
+ \endlist
+
+ The \l {Qt Quick Test} module enables unit testing Qt Quick applications.
\list
- \li \l{Qt Test C++ Classes}{C++ Classes}
- \li \l{Qt Quick Test QML Types}{QML Types}
+ \li \l{Qt Quick Test QML Types}
+ \li \l{Qt Quick Test C++ API}
\endlist
*/
diff --git a/src/testlib/qabstractitemmodeltester.h b/src/testlib/qabstractitemmodeltester.h
index 757074c6ae..57b8f283bc 100644
--- a/src/testlib/qabstractitemmodeltester.h
+++ b/src/testlib/qabstractitemmodeltester.h
@@ -123,11 +123,11 @@ do { \
MODELTESTER_VERIFY(variant.canConvert<QFont>());
// General Purpose roles that should return a QColor or a QBrush
- variant = model->data(model->index(0, 0), Qt::BackgroundColorRole);
+ variant = model->data(model->index(0, 0), Qt::BackgroundRole);
if (variant.isValid())
MODELTESTER_VERIFY(variant.canConvert<QColor>() || variant.canConvert<QBrush>());
- variant = model->data(model->index(0, 0), Qt::TextColorRole);
+ variant = model->data(model->index(0, 0), Qt::ForegroundRole);
if (variant.isValid())
MODELTESTER_VERIFY(variant.canConvert<QColor>() || variant.canConvert<QBrush>());
diff --git a/src/testlib/qtest.h b/src/testlib/qtest.h
index 28b62129b6..ebd94939ce 100644
--- a/src/testlib/qtest.h
+++ b/src/testlib/qtest.h
@@ -51,6 +51,7 @@
#include <QtCore/qstringlist.h>
#include <QtCore/qcborcommon.h>
#include <QtCore/qdatetime.h>
+#include <QtCore/qabstractitemmodel.h>
#include <QtCore/qobject.h>
#include <QtCore/qvariant.h>
#include <QtCore/qurl.h>
@@ -128,6 +129,13 @@ template<> inline char *toString(const QChar &c)
return qstrdup(qPrintable(QString::fromLatin1("QChar: '%1' (0x%2)").arg(c).arg(QString::number(static_cast<int>(c.unicode()), 16))));
}
+template<> inline char *toString(const QModelIndex &idx)
+{
+ char msg[128];
+ qsnprintf(msg, sizeof(msg), "QModelIndex(%d,%d,%p,%p)", idx.row(), idx.column(), idx.internalPointer(), idx.model());
+ return qstrdup(msg);
+}
+
template<> inline char *toString(const QPoint &p)
{
char msg[128] = {'\0'};
@@ -366,27 +374,41 @@ QT_END_NAMESPACE
# define QTEST_SET_MAIN_SOURCE_PATH QTest::setMainSourcePath(__FILE__);
#endif
+// Hooks for coverage-testing of QTestLib itself:
+#if QT_CONFIG(testlib_selfcover) && defined(__COVERAGESCANNER__)
+struct QtCoverageScanner
+{
+ QtCoverageScanner(const char *name)
+ {
+ __coveragescanner_clear();
+ __coveragescanner_testname(name);
+ }
+ ~QtCoverageScanner()
+ {
+ __coveragescanner_save();
+ __coveragescanner_testname("");
+ }
+};
+#define TESTLIB_SELFCOVERAGE_START(name) QtCoverageScanner _qtCoverageScanner(name);
+#else
+#define TESTLIB_SELFCOVERAGE_START(name)
+#endif
+
#define QTEST_APPLESS_MAIN(TestObject) \
int main(int argc, char *argv[]) \
{ \
+ TESTLIB_SELFCOVERAGE_START(TestObject) \
TestObject tc; \
QTEST_SET_MAIN_SOURCE_PATH \
return QTest::qExec(&tc, argc, argv); \
}
#include <QtTest/qtestsystem.h>
-#include <set>
-
-#ifndef QT_NO_OPENGL
-# define QTEST_ADD_GPU_BLACKLIST_SUPPORT_DEFS \
- extern Q_TESTLIB_EXPORT std::set<QByteArray> *(*qgpu_features_ptr)(const QString &); \
- extern Q_GUI_EXPORT std::set<QByteArray> *qgpu_features(const QString &);
-# define QTEST_ADD_GPU_BLACKLIST_SUPPORT \
- qgpu_features_ptr = qgpu_features;
-#else
-# define QTEST_ADD_GPU_BLACKLIST_SUPPORT_DEFS
-# define QTEST_ADD_GPU_BLACKLIST_SUPPORT
-#endif
+
+// Two backwards-compatibility defines for an obsolete feature:
+#define QTEST_ADD_GPU_BLACKLIST_SUPPORT_DEFS
+#define QTEST_ADD_GPU_BLACKLIST_SUPPORT
+// ### Qt 6: fully remove these.
#if defined(QT_NETWORK_LIB)
# include <QtTest/qtest_network.h>
@@ -403,15 +425,12 @@ int main(int argc, char *argv[]) \
#endif
#define QTEST_MAIN(TestObject) \
-QT_BEGIN_NAMESPACE \
-QTEST_ADD_GPU_BLACKLIST_SUPPORT_DEFS \
-QT_END_NAMESPACE \
int main(int argc, char *argv[]) \
{ \
+ TESTLIB_SELFCOVERAGE_START(#TestObject) \
QApplication app(argc, argv); \
app.setAttribute(Qt::AA_Use96Dpi, true); \
QTEST_DISABLE_KEYPAD_NAVIGATION \
- QTEST_ADD_GPU_BLACKLIST_SUPPORT \
TestObject tc; \
QTEST_SET_MAIN_SOURCE_PATH \
return QTest::qExec(&tc, argc, argv); \
@@ -422,14 +441,11 @@ int main(int argc, char *argv[]) \
#include <QtTest/qtest_gui.h>
#define QTEST_MAIN(TestObject) \
-QT_BEGIN_NAMESPACE \
-QTEST_ADD_GPU_BLACKLIST_SUPPORT_DEFS \
-QT_END_NAMESPACE \
int main(int argc, char *argv[]) \
{ \
+ TESTLIB_SELFCOVERAGE_START(#TestObject) \
QGuiApplication app(argc, argv); \
app.setAttribute(Qt::AA_Use96Dpi, true); \
- QTEST_ADD_GPU_BLACKLIST_SUPPORT \
TestObject tc; \
QTEST_SET_MAIN_SOURCE_PATH \
return QTest::qExec(&tc, argc, argv); \
@@ -440,6 +456,7 @@ int main(int argc, char *argv[]) \
#define QTEST_MAIN(TestObject) \
int main(int argc, char *argv[]) \
{ \
+ TESTLIB_SELFCOVERAGE_START(#TestObject) \
QCoreApplication app(argc, argv); \
app.setAttribute(Qt::AA_Use96Dpi, true); \
TestObject tc; \
@@ -452,6 +469,7 @@ int main(int argc, char *argv[]) \
#define QTEST_GUILESS_MAIN(TestObject) \
int main(int argc, char *argv[]) \
{ \
+ TESTLIB_SELFCOVERAGE_START(#TestObject) \
QCoreApplication app(argc, argv); \
app.setAttribute(Qt::AA_Use96Dpi, true); \
TestObject tc; \
diff --git a/src/testlib/qtestblacklist.cpp b/src/testlib/qtestblacklist.cpp
index f430294142..84a99c10f3 100644
--- a/src/testlib/qtestblacklist.cpp
+++ b/src/testlib/qtestblacklist.cpp
@@ -220,22 +220,6 @@ static bool checkCondition(const QByteArray &condition)
static bool ignoreAll = false;
static std::set<QByteArray> *ignoredTests = 0;
-static std::set<QByteArray> *gpuFeatures = 0;
-
-Q_TESTLIB_EXPORT std::set<QByteArray> *(*qgpu_features_ptr)(const QString &) = 0;
-
-static bool isGPUTestBlacklisted(const char *slot, const char *data = 0)
-{
- const QByteArray disableKey = QByteArrayLiteral("disable_") + QByteArray(slot);
- if (gpuFeatures->find(disableKey) != gpuFeatures->end()) {
- QByteArray msg = QByteArrayLiteral("Skipped due to GPU blacklist: ") + disableKey;
- if (data)
- msg += ':' + QByteArray(data);
- QTest::qSkip(msg.constData(), __FILE__, __LINE__);
- return true;
- }
- return false;
-}
namespace QTestPrivate {
@@ -275,17 +259,6 @@ void parseBlackList()
}
}
-void parseGpuBlackList()
-{
- if (!qgpu_features_ptr)
- return;
- QString filename = QTest::qFindTestData(QStringLiteral("GPU_BLACKLIST"));
- if (filename.isEmpty())
- return;
- if (!gpuFeatures)
- gpuFeatures = qgpu_features_ptr(filename);
-}
-
void checkBlackLists(const char *slot, const char *data)
{
bool ignore = ignoreAll;
@@ -301,21 +274,8 @@ void checkBlackLists(const char *slot, const char *data)
}
QTestResult::setBlacklistCurrentTest(ignore);
-
- // Tests blacklisted in GPU_BLACKLIST are to be skipped. Just ignoring the result is
- // not sufficient since these are expected to crash or behave in undefined ways.
- if (!ignore && gpuFeatures) {
- QByteArray s_gpu = slot;
- ignore = isGPUTestBlacklisted(s_gpu, data);
- if (!ignore && data) {
- s_gpu += ':';
- s_gpu += data;
- isGPUTestBlacklisted(s_gpu);
- }
- }
-}
-
}
+} // QTestPrivate
QT_END_NAMESPACE
diff --git a/src/testlib/qtestblacklist_p.h b/src/testlib/qtestblacklist_p.h
index 08ce052231..4522c64992 100644
--- a/src/testlib/qtestblacklist_p.h
+++ b/src/testlib/qtestblacklist_p.h
@@ -58,7 +58,6 @@ QT_BEGIN_NAMESPACE
namespace QTestPrivate {
// Export functions so they can also be used by QQuickTest
Q_TESTLIB_EXPORT void parseBlackList();
- Q_TESTLIB_EXPORT void parseGpuBlackList();
Q_TESTLIB_EXPORT void checkBlackLists(const char *slot, const char *data);
}
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 2b0ad52b2d..4263f9f049 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -52,6 +52,7 @@
#include <QtCore/qfileinfo.h>
#include <QtCore/qdir.h>
#include <QtCore/qdebug.h>
+#include <QtCore/qfloat16.h>
#include <QtCore/qlibraryinfo.h>
#include <QtCore/private/qtools_p.h>
#include <QtCore/qdiriterator.h>
@@ -245,7 +246,7 @@ static void stackTrace()
static bool installCoverageTool(const char * appname, const char * testname)
{
-#ifdef __COVERAGESCANNER__
+#if defined(__COVERAGESCANNER__) && !QT_CONFIG(testlib_selfcover)
if (!qEnvironmentVariableIsEmpty("QT_TESTCOCOON_ACTIVE"))
return false;
// Set environment variable QT_TESTCOCOON_ACTIVE to prevent an eventual subtest from
@@ -282,74 +283,75 @@ namespace QTestPrivate
namespace QTest
{
- class WatchDog;
+class WatchDog;
- static QObject *currentTestObject = 0;
- static QString mainSourcePath;
+static QObject *currentTestObject = 0;
+static QString mainSourcePath;
#if defined(Q_OS_MACOS)
- bool macNeedsActivate = false;
- IOPMAssertionID powerID;
+bool macNeedsActivate = false;
+IOPMAssertionID powerID;
#endif
- class TestMethods {
- Q_DISABLE_COPY(TestMethods)
- public:
- typedef std::vector<QMetaMethod> MetaMethods;
+class TestMethods {
+public:
+ Q_DISABLE_COPY_MOVE(TestMethods)
- explicit TestMethods(const QObject *o, const MetaMethods &m = MetaMethods());
+ typedef std::vector<QMetaMethod> MetaMethods;
- void invokeTests(QObject *testObject) const;
+ explicit TestMethods(const QObject *o, const MetaMethods &m = MetaMethods());
- static QMetaMethod findMethod(const QObject *obj, const char *signature);
+ void invokeTests(QObject *testObject) const;
- private:
- bool invokeTest(int index, const char *data, WatchDog *watchDog) const;
- void invokeTestOnData(int index) const;
+ static QMetaMethod findMethod(const QObject *obj, const char *signature);
- QMetaMethod m_initTestCaseMethod; // might not exist, check isValid().
- QMetaMethod m_initTestCaseDataMethod;
- QMetaMethod m_cleanupTestCaseMethod;
- QMetaMethod m_initMethod;
- QMetaMethod m_cleanupMethod;
+private:
+ bool invokeTest(int index, const char *data, WatchDog *watchDog) const;
+ void invokeTestOnData(int index) const;
- MetaMethods m_methods;
- };
+ QMetaMethod m_initTestCaseMethod; // might not exist, check isValid().
+ QMetaMethod m_initTestCaseDataMethod;
+ QMetaMethod m_cleanupTestCaseMethod;
+ QMetaMethod m_initMethod;
+ QMetaMethod m_cleanupMethod;
- TestMethods::TestMethods(const QObject *o, const MetaMethods &m)
- : m_initTestCaseMethod(TestMethods::findMethod(o, "initTestCase()"))
- , m_initTestCaseDataMethod(TestMethods::findMethod(o, "initTestCase_data()"))
- , m_cleanupTestCaseMethod(TestMethods::findMethod(o, "cleanupTestCase()"))
- , m_initMethod(TestMethods::findMethod(o, "init()"))
- , m_cleanupMethod(TestMethods::findMethod(o, "cleanup()"))
- , m_methods(m)
- {
- if (m.empty()) {
- const QMetaObject *metaObject = o->metaObject();
- const int count = metaObject->methodCount();
- m_methods.reserve(count);
- for (int i = 0; i < count; ++i) {
- const QMetaMethod me = metaObject->method(i);
- if (isValidSlot(me))
- m_methods.push_back(me);
- }
+ MetaMethods m_methods;
+};
+
+TestMethods::TestMethods(const QObject *o, const MetaMethods &m)
+ : m_initTestCaseMethod(TestMethods::findMethod(o, "initTestCase()"))
+ , m_initTestCaseDataMethod(TestMethods::findMethod(o, "initTestCase_data()"))
+ , m_cleanupTestCaseMethod(TestMethods::findMethod(o, "cleanupTestCase()"))
+ , m_initMethod(TestMethods::findMethod(o, "init()"))
+ , m_cleanupMethod(TestMethods::findMethod(o, "cleanup()"))
+ , m_methods(m)
+{
+ if (m.empty()) {
+ const QMetaObject *metaObject = o->metaObject();
+ const int count = metaObject->methodCount();
+ m_methods.reserve(count);
+ for (int i = 0; i < count; ++i) {
+ const QMetaMethod me = metaObject->method(i);
+ if (isValidSlot(me))
+ m_methods.push_back(me);
}
}
+}
- QMetaMethod TestMethods::findMethod(const QObject *obj, const char *signature)
- {
- const QMetaObject *metaObject = obj->metaObject();
- const int funcIndex = metaObject->indexOfMethod(signature);
- return funcIndex >= 0 ? metaObject->method(funcIndex) : QMetaMethod();
- }
+QMetaMethod TestMethods::findMethod(const QObject *obj, const char *signature)
+{
+ const QMetaObject *metaObject = obj->metaObject();
+ const int funcIndex = metaObject->indexOfMethod(signature);
+ return funcIndex >= 0 ? metaObject->method(funcIndex) : QMetaMethod();
+}
- static int keyDelay = -1;
- static int mouseDelay = -1;
- static int eventDelay = -1;
+static int keyDelay = -1;
+static int mouseDelay = -1;
+static int eventDelay = -1;
#if QT_CONFIG(thread)
- static int timeout = -1;
+static int timeout = -1;
#endif
- static bool noCrashHandler = false;
+static bool noCrashHandler = false;
/*! \internal
Invoke a method of the object without generating warning if the method does not exist
@@ -496,7 +498,7 @@ static void qPrintDataTags(FILE *stream)
}
}
-static int qToInt(char *str)
+static int qToInt(const char *str)
{
char *pEnd;
int l = (int)strtol(str, &pEnd, 10);
@@ -507,7 +509,7 @@ static int qToInt(char *str)
return l;
}
-Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
+Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, const char *const argv[], bool qml)
{
QTestLog::LogMode logFormat = QTestLog::Plain;
const char *logFilename = 0;
@@ -811,9 +813,9 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
// we load the QML files. So just store the data for now.
int colon = -1;
int offset;
- for (offset = 0; *(argv[i]+offset); ++offset) {
- if (*(argv[i]+offset) == ':') {
- if (*(argv[i]+offset+1) == ':') {
+ for (offset = 0; argv[i][offset]; ++offset) {
+ if (argv[i][offset] == ':') {
+ if (argv[i][offset + 1] == ':') {
// "::" is used as a test name separator.
// e.g. "ClickTests::test_click:row1".
++offset;
@@ -845,6 +847,11 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
QTestLog::addLogger(logFormat, logFilename);
}
+// Temporary, backwards compatibility, until qtdeclarative's use of it is converted
+Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml) {
+ qtest_qParseArgs(argc, const_cast<const char *const *>(argv), qml);
+}
+
QBenchmarkResult qMedian(const QVector<QBenchmarkResult> &container)
{
const int count = container.count();
@@ -1195,7 +1202,9 @@ char *formatString(const char *prefix, const char *suffix, size_t numArguments,
Returns a pointer to a string that is the string \a ba represented
as a space-separated sequence of hex characters. If the input is
considered too long, it is truncated. A trucation is indicated in
- the returned string as an ellipsis at the end.
+ the returned string as an ellipsis at the end. The caller has
+ ownership of the returned pointer and must ensure it is later passed
+ to operator delete[].
\a length is the length of the string \a ba.
*/
@@ -1597,7 +1606,7 @@ FatalSignalHandler::~FatalSignalHandler()
// Helper class for resolving symbol names by dynamically loading "dbghelp.dll".
class DebugSymbolResolver
{
- Q_DISABLE_COPY(DebugSymbolResolver)
+ Q_DISABLE_COPY_MOVE(DebugSymbolResolver)
public:
struct Symbol {
Symbol() : name(nullptr), address(0) {}
@@ -1813,8 +1822,6 @@ void QTest::qInit(QObject *testObject, int argc, char **argv)
#endif
QTestPrivate::parseBlackList();
- QTestPrivate::parseGpuBlackList();
-
QTestResult::reset();
QTEST_ASSERT(testObject);
@@ -2478,6 +2485,16 @@ bool QTest::compare_helper(bool success, const char *failureMsg,
return QTestResult::compare(success, failureMsg, val1, val2, actual, expected, file, line);
}
+/*! \fn bool QTest::qCompare(const qfloat16 &t1, const qfloat16 &t2, const char *actual, const char *expected, const char *file, int line)
+ \internal
+ */
+bool QTest::qCompare(qfloat16 const &t1, qfloat16 const &t2, const char *actual, const char *expected,
+ const char *file, int line)
+{
+ return compare_helper(qFuzzyCompare(t1, t2), "Compared qfloat16s are not the same (fuzzy compare)",
+ toString(t1), toString(t2), actual, expected, file, line);
+}
+
/*! \fn bool QTest::qCompare(const float &t1, const float &t2, const char *actual, const char *expected, const char *file, int line)
\internal
*/
@@ -2551,6 +2568,13 @@ TO_STRING_IMPL(unsigned char, %hhu)
TO_STRING_IMPL(float, %g)
TO_STRING_IMPL(double, %lg)
+template <> Q_TESTLIB_EXPORT char *QTest::toString<qfloat16>(const qfloat16 &t)
+{
+ char *msg = new char[16];
+ qsnprintf(msg, 16, "%.3g", static_cast<float>(t));
+ return msg;
+}
+
template <> Q_TESTLIB_EXPORT char *QTest::toString<char>(const char &t)
{
unsigned char c = static_cast<unsigned char>(t);
diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h
index 5fed9d6bcc..5d566b835e 100644
--- a/src/testlib/qtestcase.h
+++ b/src/testlib/qtestcase.h
@@ -57,6 +57,7 @@
QT_BEGIN_NAMESPACE
+class qfloat16;
class QRegularExpression;
#define QVERIFY(statement) \
@@ -67,17 +68,17 @@ do {\
#define QFAIL(message) \
do {\
- QTest::qFail(message, __FILE__, __LINE__);\
+ QTest::qFail(static_cast<const char *>(message), __FILE__, __LINE__);\
return;\
} while (false)
#define QVERIFY2(statement, description) \
do {\
if (statement) {\
- if (!QTest::qVerify(true, #statement, (description), __FILE__, __LINE__))\
+ if (!QTest::qVerify(true, #statement, static_cast<const char *>(description), __FILE__, __LINE__))\
return;\
} else {\
- if (!QTest::qVerify(false, #statement, (description), __FILE__, __LINE__))\
+ if (!QTest::qVerify(false, #statement, static_cast<const char *>(description), __FILE__, __LINE__))\
return;\
}\
} while (false)
@@ -184,7 +185,7 @@ do { \
#define QSKIP_INTERNAL(statement) \
do {\
- QTest::qSkip(statement, __FILE__, __LINE__);\
+ QTest::qSkip(static_cast<const char *>(statement), __FILE__, __LINE__);\
return;\
} while (false)
@@ -200,7 +201,7 @@ do {\
#define QEXPECT_FAIL(dataIndex, comment, mode)\
do {\
- if (!QTest::qExpectFail(dataIndex, comment, QTest::mode, __FILE__, __LINE__))\
+ if (!QTest::qExpectFail(dataIndex, static_cast<const char *>(comment), QTest::mode, __FILE__, __LINE__))\
return;\
} while (false)
@@ -217,7 +218,7 @@ do {\
} while (false)
#define QWARN(msg)\
- QTest::qWarn(msg, __FILE__, __LINE__)
+ QTest::qWarn(static_cast<const char *>(msg), __FILE__, __LINE__)
#ifdef QT_TESTCASE_BUILDDIR
# define QFINDTESTDATA(basepath)\
@@ -361,6 +362,9 @@ namespace QTest
}
#endif
+ Q_TESTLIB_EXPORT bool qCompare(qfloat16 const &t1, qfloat16 const &t2,
+ const char *actual, const char *expected, const char *file, int line);
+
Q_TESTLIB_EXPORT bool qCompare(float const &t1, float const &t2,
const char *actual, const char *expected, const char *file, int line);
@@ -405,6 +409,7 @@ namespace QTest
QTEST_COMPARE_DECL(float)
QTEST_COMPARE_DECL(double)
+ QTEST_COMPARE_DECL(qfloat16)
QTEST_COMPARE_DECL(char)
QTEST_COMPARE_DECL(signed char)
QTEST_COMPARE_DECL(unsigned char)
diff --git a/src/testlib/qtestcorelist_p.h b/src/testlib/qtestcorelist_p.h
index 5943695876..4d080f6758 100644
--- a/src/testlib/qtestcorelist_p.h
+++ b/src/testlib/qtestcorelist_p.h
@@ -66,9 +66,6 @@ class QTestCoreList
void addToList(T **list);
T *nextElement();
T *previousElement();
- int count(T *list);
- int count();
-
private:
T *next;
T *prev;
@@ -121,20 +118,6 @@ T *QTestCoreList<T>::previousElement()
return prev;
}
-template <class T>
-int QTestCoreList<T>::count()
-{
- int numOfElements = 0;
- T *it = next;
-
- while (it) {
- ++numOfElements;
- it = it->nextElement();
- }
-
- return numOfElements;
-}
-
QT_END_NAMESPACE
#endif
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index 1268730cc6..e7150260e5 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -73,6 +73,10 @@ QT_BEGIN_NAMESPACE
static void saveCoverageTool(const char * appname, bool testfailed, bool installedTestCoverage)
{
#ifdef __COVERAGESCANNER__
+# if QT_CONFIG(testlib_selfcover)
+ __coveragescanner_teststate(QTestLog::failCount() > 0 ? "FAILED" :
+ QTestLog::passCount() > 0 ? "PASSED" : "SKIPPED");
+# else
if (!installedTestCoverage)
return;
// install again to make sure the filename is correct.
@@ -83,6 +87,7 @@ static void saveCoverageTool(const char * appname, bool testfailed, bool install
__coveragescanner_testname("");
__coveragescanner_clear();
unsetenv("QT_TESTCOCOON_ACTIVE");
+# endif // testlib_selfcover
#else
Q_UNUSED(appname);
Q_UNUSED(testfailed);
diff --git a/src/testlib/selfcover.pri b/src/testlib/selfcover.pri
new file mode 100644
index 0000000000..7de50ba6e6
--- /dev/null
+++ b/src/testlib/selfcover.pri
@@ -0,0 +1,28 @@
+# Configuration for testlib and its tests, to instrument with
+# FrogLogic's Squish CoCo (cf. testcocoon.prf, which handles similar
+# for general code; but testlib needs special handling).
+
+# Only for use when feature testlib_selfcover is enabled:
+!qtConfig(testlib_selfcover): return()
+
+# This enables verification that testlib itself is adequately tested,
+# as a grounds for trusting that testing with it is useful.
+# Exclude all non-testlib source from coverage instrumentation:
+COVERAGE_OPTIONS = --cs-exclude-file-abs-wildcard=$$QT_SOURCE_TREE/*
+COVERAGE_OPTIONS += --cs-include-file-abs-wildcard=*/src/testlib/*
+COVERAGE_OPTIONS += --cs-mcc # enable Multiple Condition Coverage
+COVERAGE_OPTIONS += --cs-mcdc # enable Multiple Condition / Decision Coverage
+# (recommended for ISO 26262 ASIL A, B and C -- highly recommended for ASIL D)
+# https://doc.froglogic.com/squish-coco/4.1/codecoverage.html#sec%3Amcdc
+
+QMAKE_CFLAGS += $$COVERAGE_OPTIONS
+QMAKE_CXXFLAGS += $$COVERAGE_OPTIONS
+QMAKE_LFLAGS += $$COVERAGE_OPTIONS
+
+# FIXME: relies on QMAKE_* being just the command-names, with no path prefix
+QMAKE_CC = cs$$QMAKE_CC
+QMAKE_CXX = cs$$QMAKE_CXX
+QMAKE_LINK = cs$$QMAKE_LINK
+QMAKE_LINK_SHLIB = cs$$QMAKE_LINK_SHLIB
+QMAKE_AR = cs$$QMAKE_AR
+QMAKE_LIB = cs$$QMAKE_LIB
diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro
index 34bb581e02..f52a913a08 100644
--- a/src/testlib/testlib.pro
+++ b/src/testlib/testlib.pro
@@ -146,4 +146,5 @@ mac {
!qtHaveModule(network): HEADERSCLEAN_EXCLUDE += qtest_network.h
+include(selfcover.pri)
load(qt_module)
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
index af3a3ae39a..5db8b6e2f6 100644
--- a/src/tools/androiddeployqt/main.cpp
+++ b/src/tools/androiddeployqt/main.cpp
@@ -1369,8 +1369,8 @@ bool updateAndroidManifest(Options &options)
options.packageName = reader.attributes().value(QLatin1String("package")).toString();
} else if (reader.name() == QLatin1String("uses-sdk")) {
if (reader.attributes().hasAttribute(QLatin1String("android:minSdkVersion")))
- if (reader.attributes().value(QLatin1String("android:minSdkVersion")).toInt() < 16) {
- fprintf(stderr, "Invalid minSdkVersion version, minSdkVersion must be >= 16\n");
+ if (reader.attributes().value(QLatin1String("android:minSdkVersion")).toInt() < 21) {
+ fprintf(stderr, "Invalid minSdkVersion version, minSdkVersion must be >= 21\n");
return false;
}
} else if ((reader.name() == QLatin1String("application") ||
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index fd76646f4c..02c1fbd394 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -619,7 +619,7 @@ void Generator::generateCode()
fprintf(out, "// a) You are using a NOTIFY signal that does not exist. Fix it.\n");
fprintf(out, "// b) You are using a NOTIFY signal that does exist (in a parent class) but has a non-empty parameter list. This is a moc limitation.\n");
fprintf(out, "Q_DECL_UNUSED static void checkNotifySignalValidity_%s(%s *t) {\n", qualifiedClassNameIdentifier.constData(), cdef->qualified.constData());
- for (const QByteArray &nonClassSignal : cdef->nonClassSignalList)
+ for (const QByteArray &nonClassSignal : qAsConst(cdef->nonClassSignalList))
fprintf(out, " t->%s();\n", nonClassSignal.constData());
fprintf(out, "}\n");
}
@@ -1549,16 +1549,16 @@ void Generator::generateSignal(FunctionDef *def,int index)
fprintf(out, "nullptr");
} else {
if (def->returnTypeIsVolatile)
- fprintf(out, "const_cast<void*>(reinterpret_cast<const volatile void*>(&_t0))");
+ fprintf(out, "const_cast<void*>(reinterpret_cast<const volatile void*>(std::addressof(_t0)))");
else
- fprintf(out, "const_cast<void*>(reinterpret_cast<const void*>(&_t0))");
+ fprintf(out, "const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t0)))");
}
int i;
for (i = 1; i < offset; ++i)
if (i <= def->arguments.count() && def->arguments.at(i - 1).type.isVolatile)
- fprintf(out, ", const_cast<void*>(reinterpret_cast<const volatile void*>(&_t%d))", i);
+ fprintf(out, ", const_cast<void*>(reinterpret_cast<const volatile void*>(std::addressof(_t%d)))", i);
else
- fprintf(out, ", const_cast<void*>(reinterpret_cast<const void*>(&_t%d))", i);
+ fprintf(out, ", const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t%d)))", i);
fprintf(out, " };\n");
fprintf(out, " QMetaObject::activate(%s, &staticMetaObject, %d, _a);\n", thisPtr.constData(), index);
if (def->normalizedType != "void")
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index 7272df4265..5d777ece2e 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -992,7 +992,7 @@ void Moc::generate(FILE *out)
fprintf(out, "** WARNING! All changes made in this file will be lost!\n"
"*****************************************************************************/\n\n");
-
+ fprintf(out, "#include <memory>\n"); // For std::addressof
if (!noInclude) {
if (includePath.size() && !includePath.endsWith('/'))
includePath += '/';
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index d98c73e1a0..d6482f4e44 100644
--- a/src/tools/moc/moc.h
+++ b/src/tools/moc/moc.h
@@ -83,57 +83,53 @@ Q_DECLARE_TYPEINFO(ArgumentDef, Q_MOVABLE_TYPE);
struct FunctionDef
{
- FunctionDef(): returnTypeIsVolatile(false), access(Private), isConst(false), isVirtual(false), isStatic(false),
- inlineCode(false), wasCloned(false), isCompat(false), isInvokable(false),
- isScriptable(false), isSlot(false), isSignal(false), isPrivateSignal(false),
- isConstructor(false), isDestructor(false), isAbstract(false), revision(0) {}
Type type;
+ QVector<ArgumentDef> arguments;
QByteArray normalizedType;
QByteArray tag;
QByteArray name;
- bool returnTypeIsVolatile;
-
- QVector<ArgumentDef> arguments;
+ QByteArray inPrivateClass;
enum Access { Private, Protected, Public };
- Access access;
- bool isConst;
- bool isVirtual;
- bool isStatic;
- bool inlineCode;
- bool wasCloned;
-
- QByteArray inPrivateClass;
- bool isCompat;
- bool isInvokable;
- bool isScriptable;
- bool isSlot;
- bool isSignal;
- bool isPrivateSignal;
- bool isConstructor;
- bool isDestructor;
- bool isAbstract;
-
- int revision;
+ Access access = Private;
+ int revision = 0;
+
+ bool isConst = false;
+ bool isVirtual = false;
+ bool isStatic = false;
+ bool inlineCode = false;
+ bool wasCloned = false;
+
+ bool returnTypeIsVolatile = false;
+
+ bool isCompat = false;
+ bool isInvokable = false;
+ bool isScriptable = false;
+ bool isSlot = false;
+ bool isSignal = false;
+ bool isPrivateSignal = false;
+ bool isConstructor = false;
+ bool isDestructor = false;
+ bool isAbstract = false;
};
Q_DECLARE_TYPEINFO(FunctionDef, Q_MOVABLE_TYPE);
struct PropertyDef
{
- PropertyDef():notifyId(-1), constant(false), final(false), gspec(ValueSpec), revision(0){}
- QByteArray name, type, member, read, write, reset, designable, scriptable, editable, stored, user, notify, inPrivateClass;
- int notifyId; // -1 means no notifyId, >= 0 means signal defined in this class, < -1 means signal not defined in this class
- bool constant;
- bool final;
- enum Specification { ValueSpec, ReferenceSpec, PointerSpec };
- Specification gspec;
bool stdCppSet() const {
QByteArray s("set");
s += toupper(name[0]);
s += name.mid(1);
return (s == write);
}
- int revision;
+
+ QByteArray name, type, member, read, write, reset, designable, scriptable, editable, stored, user, notify, inPrivateClass;
+ int notifyId = -1; // -1 means no notifyId, >= 0 means signal defined in this class, < -1 means signal not defined in this class
+ enum Specification { ValueSpec, ReferenceSpec, PointerSpec };
+ Specification gspec = ValueSpec;
+ int revision = 0;
+ bool constant = false;
+ bool final = false;
};
Q_DECLARE_TYPEINFO(PropertyDef, Q_MOVABLE_TYPE);
@@ -169,9 +165,6 @@ struct ClassDef : BaseDef {
};
QVector<QVector<Interface> >interfaceList;
- bool hasQObject = false;
- bool hasQGadget = false;
-
struct PluginData {
QByteArray iid;
QMap<QString, QJsonArray> metaArgs;
@@ -181,11 +174,14 @@ struct ClassDef : BaseDef {
QVector<FunctionDef> constructorList;
QVector<FunctionDef> signalList, slotList, methodList, publicList;
QVector<QByteArray> nonClassSignalList;
- int notifyableProperties = 0;
QVector<PropertyDef> propertyList;
+ int notifyableProperties = 0;
int revisionedMethods = 0;
int revisionedProperties = 0;
+ bool hasQObject = false;
+ bool hasQGadget = false;
+
};
Q_DECLARE_TYPEINFO(ClassDef, Q_MOVABLE_TYPE);
Q_DECLARE_TYPEINFO(ClassDef::Interface, Q_MOVABLE_TYPE);
diff --git a/src/tools/moc/util/generate.sh b/src/tools/moc/util/generate.sh
index 3894be1309..5460d28924 100755
--- a/src/tools/moc/util/generate.sh
+++ b/src/tools/moc/util/generate.sh
@@ -27,6 +27,8 @@
##
#############################################################################
+set -ex
+
qmake
make
cat licenseheader.txt > ../keywords.cpp
diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
index ab7726a01f..ea410cd257 100644
--- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
+++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
@@ -326,7 +326,6 @@ static void writeArgList(QTextStream &ts, const QStringList &argNames,
// yes, starting from 1
for (int i = 1; i < outputArgs.count(); ++i) {
const QDBusIntrospection::Argument &arg = outputArgs.at(i);
- QString name = arg.name;
if (!first)
ts << ", ";
@@ -531,8 +530,6 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
// properties:
for (const QDBusIntrospection::Property &property : interface->properties) {
QByteArray type = qtTypeName(property.type, property.annotations);
- QString templateType = templateArg(type);
- QString constRefType = constRefArg(type);
QString getter = propertyGetter(property);
QString setter = propertySetter(property);
diff --git a/src/tools/qfloat16-tables/gen_qfloat16_tables.cpp b/src/tools/qfloat16-tables/gen_qfloat16_tables.cpp
index f5051e25fc..a9bf7e86e4 100644
--- a/src/tools/qfloat16-tables/gen_qfloat16_tables.cpp
+++ b/src/tools/qfloat16-tables/gen_qfloat16_tables.cpp
@@ -68,7 +68,7 @@ qint32 main(qint32 argc, char **argv)
return -1;
}
- QFile fid(argv[1]);
+ QFile fid(QFile::decodeName(argv[1]));
if (!fid.open(QIODevice::WriteOnly | QIODevice::Text)) {
qWarning() << "Abort: Failed to open/create file" << fid.fileName();
return -1;
diff --git a/src/tools/qlalr/cppgenerator.cpp b/src/tools/qlalr/cppgenerator.cpp
index b14c73a8fe..508db696b1 100644
--- a/src/tools/qlalr/cppgenerator.cpp
+++ b/src/tools/qlalr/cppgenerator.cpp
@@ -460,7 +460,7 @@ void CppGenerator::generateDecl (QTextStream &out)
<< "public:" << endl
<< " enum VariousConstants {" << endl;
- for (Name t : qAsConst(grammar.terminals))
+ for (const Name &t : qAsConst(grammar.terminals))
{
QString name = *t;
int value = std::distance (grammar.names.begin (), t);
diff --git a/src/tools/qlalr/lalr.h b/src/tools/qlalr/lalr.h
index 6a2baaa462..8eadee400d 100644
--- a/src/tools/qlalr/lalr.h
+++ b/src/tools/qlalr/lalr.h
@@ -61,6 +61,8 @@ public:
public:
const_iterator () {}
+ const_iterator (const typename _Base::iterator &it):
+ _M_iterator (typename _Base::const_iterator(it)) {}
const_iterator (const typename _Base::const_iterator &it):
_M_iterator (it) {}
diff --git a/src/tools/rcc/main.cpp b/src/tools/rcc/main.cpp
index 12f986b1e2..6e8c13be15 100644
--- a/src/tools/rcc/main.cpp
+++ b/src/tools/rcc/main.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
@@ -127,10 +128,25 @@ int runRcc(int argc, char *argv[])
QCommandLineOption rootOption(QStringLiteral("root"), QStringLiteral("Prefix resource access path with root path."), QStringLiteral("path"));
parser.addOption(rootOption);
+#if QT_CONFIG(zstd) && !defined(QT_NO_COMPRESS)
+# define ALGOS "[zstd], zlib, none"
+#elif QT_CONFIG(zstd)
+# define ALGOS "[zstd], none"
+#elif !defined(QT_NO_COMPRESS)
+# define ALGOS "[zlib], none"
+#else
+# define ALGOS "[none]"
+#endif
+ const QString &algoDescription =
+ QStringLiteral("Compress input files using algorithm <algo> (" ALGOS ").");
+ QCommandLineOption compressionAlgoOption(QStringLiteral("compress-algo"), algoDescription, QStringLiteral("algo"));
+ parser.addOption(compressionAlgoOption);
+#undef ALGOS
+
QCommandLineOption compressOption(QStringLiteral("compress"), QStringLiteral("Compress input files by <level>."), QStringLiteral("level"));
parser.addOption(compressOption);
- QCommandLineOption nocompressOption(QStringLiteral("no-compress"), QStringLiteral("Disable all compression."));
+ QCommandLineOption nocompressOption(QStringLiteral("no-compress"), QStringLiteral("Disable all compression. Same as --compress-algo=none."));
parser.addOption(nocompressOption);
QCommandLineOption thresholdOption(QStringLiteral("threshold"), QStringLiteral("Threshold to consider compressing files."), QStringLiteral("level"));
@@ -169,13 +185,13 @@ int runRcc(int argc, char *argv[])
QString errorMsg;
- quint8 formatVersion = 2;
+ quint8 formatVersion = 3;
if (parser.isSet(formatVersionOption)) {
bool ok = false;
formatVersion = parser.value(formatVersionOption).toUInt(&ok);
if (!ok) {
errorMsg = QLatin1String("Invalid format version specified");
- } else if (formatVersion != 1 && formatVersion != 2) {
+ } else if (formatVersion < 1 || formatVersion > 3) {
errorMsg = QLatin1String("Unsupported format version specified");
}
}
@@ -189,10 +205,17 @@ int runRcc(int argc, char *argv[])
|| library.resourceRoot().at(0) != QLatin1Char('/'))
errorMsg = QLatin1String("Root must start with a /");
}
- if (parser.isSet(compressOption))
- library.setCompressLevel(parser.value(compressOption).toInt());
+
+ if (parser.isSet(compressionAlgoOption))
+ library.setCompressionAlgorithm(RCCResourceLibrary::parseCompressionAlgorithm(parser.value(compressionAlgoOption), &errorMsg));
+ if (formatVersion < 3 && library.compressionAlgorithm() == RCCResourceLibrary::CompressionAlgorithm::Zstd)
+ errorMsg = QLatin1String("Zstandard compression requires format version 3 or higher");
if (parser.isSet(nocompressOption))
- library.setCompressLevel(-2);
+ library.setCompressionAlgorithm(RCCResourceLibrary::CompressionAlgorithm::None);
+ if (parser.isSet(compressOption) && errorMsg.isEmpty()) {
+ int level = library.parseCompressionLevel(library.compressionAlgorithm(), parser.value(compressOption), &errorMsg);
+ library.setCompressLevel(level);
+ }
if (parser.isSet(thresholdOption))
library.setCompressThreshold(parser.value(thresholdOption).toInt());
if (parser.isSet(binaryOption))
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp
index 1a7cab01df..862e574f2d 100644
--- a/src/tools/rcc/rcc.cpp
+++ b/src/tools/rcc/rcc.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
@@ -41,6 +42,10 @@
#include <algorithm>
+#if QT_CONFIG(zstd)
+# include <zstd.h>
+#endif
+
// Note: A copy of this file is used in Qt Designer (qttools/src/designer/src/lib/shared/rcc.cpp)
QT_BEGIN_NAMESPACE
@@ -48,9 +53,18 @@ QT_BEGIN_NAMESPACE
enum {
CONSTANT_USENAMESPACE = 1,
CONSTANT_COMPRESSLEVEL_DEFAULT = -1,
+ CONSTANT_ZSTDCOMPRESSLEVEL_CHECK = 1, // Zstd level to check if compressing is a good idea
+ CONSTANT_ZSTDCOMPRESSLEVEL_STORE = 14, // Zstd level to actually store the data
CONSTANT_COMPRESSTHRESHOLD_DEFAULT = 70
};
+#if QT_CONFIG(zstd)
+# define CONSTANT_COMPRESSALGO_DEFAULT RCCResourceLibrary::CompressionAlgorithm::Zstd
+#elif !defined(QT_NO_COMPRESS)
+# define CONSTANT_COMPRESSALGO_DEFAULT RCCResourceLibrary::CompressionAlgorithm::Zlib
+#else
+# define CONSTANT_COMPRESSALGO_DEFAULT RCCResourceLibrary::CompressionAlgorithm::None
+#endif
#define writeString(s) write(s, sizeof(s))
@@ -88,15 +102,18 @@ class RCCFileInfo
public:
enum Flags
{
+ // must match qresource.cpp
NoFlags = 0x00,
Compressed = 0x01,
- Directory = 0x02
+ Directory = 0x02,
+ CompressedZstd = 0x04
};
RCCFileInfo(const QString &name = QString(), const QFileInfo &fileInfo = QFileInfo(),
QLocale::Language language = QLocale::C,
QLocale::Country country = QLocale::AnyCountry,
uint flags = NoFlags,
+ RCCResourceLibrary::CompressionAlgorithm compressAlgo = CONSTANT_COMPRESSALGO_DEFAULT,
int compressLevel = CONSTANT_COMPRESSLEVEL_DEFAULT,
int compressThreshold = CONSTANT_COMPRESSTHRESHOLD_DEFAULT);
~RCCFileInfo();
@@ -115,6 +132,7 @@ public:
QFileInfo m_fileInfo;
RCCFileInfo *m_parent;
QHash<QString, RCCFileInfo*> m_children;
+ RCCResourceLibrary::CompressionAlgorithm m_compressAlgo;
int m_compressLevel;
int m_compressThreshold;
@@ -125,7 +143,7 @@ public:
RCCFileInfo::RCCFileInfo(const QString &name, const QFileInfo &fileInfo,
QLocale::Language language, QLocale::Country country, uint flags,
- int compressLevel, int compressThreshold)
+ RCCResourceLibrary::CompressionAlgorithm compressAlgo, int compressLevel, int compressThreshold)
{
m_name = name;
m_fileInfo = fileInfo;
@@ -136,6 +154,7 @@ RCCFileInfo::RCCFileInfo(const QString &name, const QFileInfo &fileInfo,
m_nameOffset = 0;
m_dataOffset = 0;
m_childOffset = 0;
+ m_compressAlgo = compressAlgo;
m_compressLevel = compressLevel;
m_compressThreshold = compressThreshold;
}
@@ -211,6 +230,9 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib)
static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong();
if (sourceDate != 0)
lastmod = sourceDate;
+ static const quint64 sourceDate2 = 1000 * qgetenv("SOURCE_DATE_EPOCH").toULongLong();
+ if (sourceDate2 != 0)
+ lastmod = sourceDate2;
lib.writeNumber8(lastmod);
if (text || pass1)
lib.writeChar('\n');
@@ -236,19 +258,82 @@ qint64 RCCFileInfo::writeDataBlob(RCCResourceLibrary &lib, qint64 offset,
}
QByteArray data = file.readAll();
-#ifndef QT_NO_COMPRESS
// Check if compression is useful for this file
- if (m_compressLevel != 0 && data.size() != 0) {
- QByteArray compressed =
- qCompress(reinterpret_cast<uchar *>(data.data()), data.size(), m_compressLevel);
-
- int compressRatio = int(100.0 * (data.size() - compressed.size()) / data.size());
- if (compressRatio >= m_compressThreshold) {
- data = compressed;
- m_flags |= Compressed;
+ if (data.size() != 0) {
+#if QT_CONFIG(zstd)
+ if (m_compressAlgo == RCCResourceLibrary::CompressionAlgorithm::Best) {
+ m_compressAlgo = RCCResourceLibrary::CompressionAlgorithm::Zstd;
+ m_compressLevel = 19; // not ZSTD_maxCLevel(), as 20+ are experimental
+ }
+ if (m_compressAlgo == RCCResourceLibrary::CompressionAlgorithm::Zstd) {
+ if (lib.m_zstdCCtx == nullptr)
+ lib.m_zstdCCtx = ZSTD_createCCtx();
+ qsizetype size = data.size();
+ size = ZSTD_COMPRESSBOUND(size);
+
+ int compressLevel = m_compressLevel;
+ if (compressLevel < 0)
+ compressLevel = CONSTANT_ZSTDCOMPRESSLEVEL_CHECK;
+
+ QByteArray compressed(size, Qt::Uninitialized);
+ char *dst = const_cast<char *>(compressed.constData());
+ size_t n = ZSTD_compressCCtx(lib.m_zstdCCtx, dst, size,
+ data.constData(), data.size(),
+ compressLevel);
+ if (n * 100.0 < data.size() * 1.0 * (100 - m_compressThreshold) ) {
+ // compressing is worth it
+ if (m_compressLevel < 0) {
+ // heuristic compression, so recompress
+ n = ZSTD_compressCCtx(lib.m_zstdCCtx, dst, size,
+ data.constData(), data.size(),
+ CONSTANT_ZSTDCOMPRESSLEVEL_STORE);
+ }
+ if (ZSTD_isError(n)) {
+ QString msg = QString::fromLatin1("%1: error: compression with zstd failed: %2\n")
+ .arg(m_name, QString::fromUtf8(ZSTD_getErrorName(n)));
+ lib.m_errorDevice->write(msg.toUtf8());
+ } else if (lib.verbose()) {
+ QString msg = QString::fromLatin1("%1: note: compressed using zstd (%2 -> %3)\n")
+ .arg(m_name).arg(data.size()).arg(n);
+ lib.m_errorDevice->write(msg.toUtf8());
+ }
+
+ lib.m_overallFlags |= CompressedZstd;
+ m_flags |= CompressedZstd;
+ data = std::move(compressed);
+ data.truncate(n);
+ } else if (lib.verbose()) {
+ QString msg = QString::fromLatin1("%1: note: not compressed\n").arg(m_name);
+ lib.m_errorDevice->write(msg.toUtf8());
+ }
+ }
+#endif
+#ifndef QT_NO_COMPRESS
+ if (m_compressAlgo == RCCResourceLibrary::CompressionAlgorithm::Best) {
+ m_compressAlgo = RCCResourceLibrary::CompressionAlgorithm::Zlib;
+ m_compressLevel = 9;
+ }
+ if (m_compressAlgo == RCCResourceLibrary::CompressionAlgorithm::Zlib) {
+ QByteArray compressed =
+ qCompress(reinterpret_cast<uchar *>(data.data()), data.size(), m_compressLevel);
+
+ int compressRatio = int(100.0 * (data.size() - compressed.size()) / data.size());
+ if (compressRatio >= m_compressThreshold) {
+ if (lib.verbose()) {
+ QString msg = QString::fromLatin1("%1: note: compressed using zlib (%2 -> %3)\n")
+ .arg(m_name).arg(data.size()).arg(compressed.size());
+ lib.m_errorDevice->write(msg.toUtf8());
+ }
+ data = compressed;
+ lib.m_overallFlags |= Compressed;
+ m_flags |= Compressed;
+ } else if (lib.verbose()) {
+ QString msg = QString::fromLatin1("%1: note: not compressed\n").arg(m_name);
+ lib.m_errorDevice->write(msg.toUtf8());
+ }
}
- }
#endif // QT_NO_COMPRESS
+ }
// some info
if (text || pass1) {
@@ -343,7 +428,8 @@ RCCResourceLibrary::Strings::Strings() :
ATTRIBUTE_PREFIX(QLatin1String("prefix")),
ATTRIBUTE_ALIAS(QLatin1String("alias")),
ATTRIBUTE_THRESHOLD(QLatin1String("threshold")),
- ATTRIBUTE_COMPRESS(QLatin1String("compress"))
+ ATTRIBUTE_COMPRESS(QLatin1String("compress")),
+ ATTRIBUTE_COMPRESSALGO(QStringLiteral("compression-algorithm"))
{
}
@@ -351,22 +437,30 @@ RCCResourceLibrary::RCCResourceLibrary(quint8 formatVersion)
: m_root(0),
m_format(C_Code),
m_verbose(false),
+ m_compressionAlgo(CONSTANT_COMPRESSALGO_DEFAULT),
m_compressLevel(CONSTANT_COMPRESSLEVEL_DEFAULT),
m_compressThreshold(CONSTANT_COMPRESSTHRESHOLD_DEFAULT),
m_treeOffset(0),
m_namesOffset(0),
m_dataOffset(0),
+ m_overallFlags(0),
m_useNameSpace(CONSTANT_USENAMESPACE),
m_errorDevice(0),
m_outDevice(0),
m_formatVersion(formatVersion)
{
m_out.reserve(30 * 1000 * 1000);
+#if QT_CONFIG(zstd)
+ m_zstdCCtx = nullptr;
+#endif
}
RCCResourceLibrary::~RCCResourceLibrary()
{
delete m_root;
+#if QT_CONFIG(zstd)
+ ZSTD_freeCCtx(m_zstdCCtx);
+#endif
}
enum RCCXmlTag {
@@ -391,6 +485,7 @@ bool RCCResourceLibrary::interpretResourceFile(QIODevice *inputDevice,
QLocale::Language language = QLocale::c().language();
QLocale::Country country = QLocale::c().country();
QString alias;
+ auto compressAlgo = m_compressionAlgo;
int compressLevel = m_compressLevel;
int compressThreshold = m_compressThreshold;
@@ -444,17 +539,27 @@ bool RCCResourceLibrary::interpretResourceFile(QIODevice *inputDevice,
if (attributes.hasAttribute(m_strings.ATTRIBUTE_ALIAS))
alias = attributes.value(m_strings.ATTRIBUTE_ALIAS).toString();
+ compressAlgo = m_compressionAlgo;
compressLevel = m_compressLevel;
- if (attributes.hasAttribute(m_strings.ATTRIBUTE_COMPRESS))
- compressLevel = attributes.value(m_strings.ATTRIBUTE_COMPRESS).toString().toInt();
-
compressThreshold = m_compressThreshold;
+
+ QString errorString;
+ if (attributes.hasAttribute(m_strings.ATTRIBUTE_COMPRESSALGO))
+ compressAlgo = parseCompressionAlgorithm(attributes.value(m_strings.ATTRIBUTE_COMPRESSALGO), &errorString);
+ if (errorString.isEmpty() && attributes.hasAttribute(m_strings.ATTRIBUTE_COMPRESS)) {
+ QString value = attributes.value(m_strings.ATTRIBUTE_COMPRESS).toString();
+ compressLevel = parseCompressionLevel(compressAlgo, value, &errorString);
+ }
+
+ // Special case for -no-compress
+ if (m_compressLevel == -2)
+ compressAlgo = CompressionAlgorithm::None;
+
if (attributes.hasAttribute(m_strings.ATTRIBUTE_THRESHOLD))
compressThreshold = attributes.value(m_strings.ATTRIBUTE_THRESHOLD).toString().toInt();
- // Special case for -no-compress. Overrides all other settings.
- if (m_compressLevel == -2)
- compressLevel = 0;
+ if (!errorString.isEmpty())
+ reader.raiseError(errorString);
}
} else {
reader.raiseError(QString(QLatin1String("unexpected tag: %1")).arg(reader.name().toString()));
@@ -520,6 +625,7 @@ bool RCCResourceLibrary::interpretResourceFile(QIODevice *inputDevice,
language,
country,
child.isDir() ? RCCFileInfo::Directory : RCCFileInfo::NoFlags,
+ compressAlgo,
compressLevel,
compressThreshold)
);
@@ -535,6 +641,7 @@ bool RCCResourceLibrary::interpretResourceFile(QIODevice *inputDevice,
language,
country,
RCCFileInfo::NoFlags,
+ compressAlgo,
compressLevel,
compressThreshold)
);
@@ -729,6 +836,55 @@ RCCResourceLibrary::ResourceDataFileMap RCCResourceLibrary::resourceDataFileMap(
return rc;
}
+RCCResourceLibrary::CompressionAlgorithm RCCResourceLibrary::parseCompressionAlgorithm(QStringView value, QString *errorMsg)
+{
+ if (value == QLatin1String("best"))
+ return CompressionAlgorithm::Best;
+ if (value == QLatin1String("zlib")) {
+#ifdef QT_NO_COMPRESS
+ *errorMsg = QLatin1String("zlib support not compiled in");
+#else
+ return CompressionAlgorithm::Zlib;
+#endif
+ } else if (value == QLatin1String("zstd")) {
+#if QT_CONFIG(zstd)
+ return CompressionAlgorithm::Zstd;
+#else
+ *errorMsg = QLatin1String("Zstandard support not compiled in");
+#endif
+ } else if (value != QLatin1String("none")) {
+ *errorMsg = QString::fromLatin1("Unknown compression algorithm '%1'").arg(value);
+ }
+
+ return CompressionAlgorithm::None;
+}
+
+int RCCResourceLibrary::parseCompressionLevel(CompressionAlgorithm algo, const QString &level, QString *errorMsg)
+{
+ bool ok;
+ int c = level.toInt(&ok);
+ if (ok) {
+ switch (algo) {
+ case CompressionAlgorithm::None:
+ case CompressionAlgorithm::Best:
+ return 0;
+ case CompressionAlgorithm::Zlib:
+ if (c >= 1 && c <= 9)
+ return c;
+ break;
+ case CompressionAlgorithm::Zstd:
+#if QT_CONFIG(zstd)
+ if (c >= 0 && c <= ZSTD_maxCLevel())
+ return c;
+#endif
+ break;
+ }
+ }
+
+ *errorMsg = QString::fromLatin1("invalid compression level '%1'").arg(level);
+ return 0;
+}
+
bool RCCResourceLibrary::output(QIODevice &outDevice, QIODevice &tempDevice, QIODevice &errorDevice)
{
m_errorDevice = &errorDevice;
@@ -795,6 +951,14 @@ bool RCCResourceLibrary::output(QIODevice &outDevice, QIODevice &tempDevice, QIO
return true;
}
+void RCCResourceLibrary::writeDecimal(int value)
+{
+ Q_ASSERT(m_format != RCCResourceLibrary::Binary);
+ char buf[std::numeric_limits<int>::digits10 + 2];
+ int n = snprintf(buf, sizeof(buf), "%d", value);
+ write(buf, n + 1); // write() takes a size including terminating NUL
+}
+
void RCCResourceLibrary::writeHex(quint8 tmp)
{
const char digits[] = "0123456789abcdef";
@@ -889,6 +1053,8 @@ bool RCCResourceLibrary::writeHeader()
writeNumber4(0);
writeNumber4(0);
writeNumber4(0);
+ if (m_formatVersion >= 3)
+ writeNumber4(m_overallFlags);
}
return true;
}
@@ -1091,10 +1257,35 @@ bool RCCResourceLibrary::writeInitializer()
if (m_root) {
writeString("bool qRegisterResourceData"
"(int, const unsigned char *, "
- "const unsigned char *, const unsigned char *);\n\n");
+ "const unsigned char *, const unsigned char *);\n");
writeString("bool qUnregisterResourceData"
"(int, const unsigned char *, "
"const unsigned char *, const unsigned char *);\n\n");
+
+ if (m_overallFlags & (RCCFileInfo::Compressed | RCCFileInfo::CompressedZstd)) {
+ // use variable relocations with ELF and Mach-O
+ writeString("#if defined(__ELF__) || defined(__APPLE__)\n");
+ if (m_overallFlags & RCCFileInfo::Compressed) {
+ writeString("static inline unsigned char qResourceFeatureZlib()\n"
+ "{\n"
+ " extern const unsigned char qt_resourceFeatureZlib;\n"
+ " return qt_resourceFeatureZlib;\n"
+ "}\n");
+ }
+ if (m_overallFlags & RCCFileInfo::CompressedZstd) {
+ writeString("static inline unsigned char qResourceFeatureZstd()\n"
+ "{\n"
+ " extern const unsigned char qt_resourceFeatureZstd;\n"
+ " return qt_resourceFeatureZstd;\n"
+ "}\n");
+ }
+ writeString("#else\n");
+ if (m_overallFlags & RCCFileInfo::Compressed)
+ writeString("unsigned char qResourceFeatureZlib();\n");
+ if (m_overallFlags & RCCFileInfo::CompressedZstd)
+ writeString("unsigned char qResourceFeatureZstd();\n");
+ writeString("#endif\n\n");
+ }
}
if (m_useNameSpace)
@@ -1113,12 +1304,12 @@ bool RCCResourceLibrary::writeInitializer()
writeString("()\n{\n");
if (m_root) {
- writeString(" ");
+ writeString(" int version = ");
+ writeDecimal(m_formatVersion);
+ writeString(";\n ");
writeAddNamespaceFunction("qRegisterResourceData");
- writeString("\n (");
- writeHex(m_formatVersion);
- writeString(" qt_resource_struct, "
- "qt_resource_name, qt_resource_data);\n");
+ writeString("\n (version, qt_resource_struct, "
+ "qt_resource_name, qt_resource_data);\n");
}
writeString(" return 1;\n");
writeString("}\n\n");
@@ -1136,11 +1327,24 @@ bool RCCResourceLibrary::writeInitializer()
writeMangleNamespaceFunction(cleanResources);
writeString("()\n{\n");
if (m_root) {
- writeString(" ");
+ writeString(" int version = ");
+ writeDecimal(m_formatVersion);
+ writeString(";\n ");
+
+ // ODR-use certain symbols from QtCore if we require optional features
+ if (m_overallFlags & RCCFileInfo::Compressed) {
+ writeString("version += ");
+ writeAddNamespaceFunction("qResourceFeatureZlib()");
+ writeString(";\n ");
+ }
+ if (m_overallFlags & RCCFileInfo::CompressedZstd) {
+ writeString("version += ");
+ writeAddNamespaceFunction("qResourceFeatureZstd()");
+ writeString(";\n ");
+ }
+
writeAddNamespaceFunction("qUnregisterResourceData");
- writeString("\n (");
- writeHex(m_formatVersion);
- writeString(" qt_resource_struct, "
+ writeString("\n (version, qt_resource_struct, "
"qt_resource_name, qt_resource_data);\n");
}
writeString(" return 1;\n");
@@ -1176,6 +1380,13 @@ bool RCCResourceLibrary::writeInitializer()
p[i++] = (m_namesOffset >> 16) & 0xff;
p[i++] = (m_namesOffset >> 8) & 0xff;
p[i++] = (m_namesOffset >> 0) & 0xff;
+
+ if (m_formatVersion >= 3) {
+ p[i++] = (m_overallFlags >> 24) & 0xff;
+ p[i++] = (m_overallFlags >> 16) & 0xff;
+ p[i++] = (m_overallFlags >> 8) & 0xff;
+ p[i++] = (m_overallFlags >> 0) & 0xff;
+ }
}
return true;
}
diff --git a/src/tools/rcc/rcc.h b/src/tools/rcc/rcc.h
index 36984cf38a..ad1c5cd166 100644
--- a/src/tools/rcc/rcc.h
+++ b/src/tools/rcc/rcc.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the tools applications of the Qt Toolkit.
@@ -35,6 +36,8 @@
#include <qhash.h>
#include <qstring.h>
+typedef struct ZSTD_CCtx_s ZSTD_CCtx;
+
QT_BEGIN_NAMESPACE
class RCCFileInfo;
@@ -77,6 +80,19 @@ public:
void setOutputName(const QString &name) { m_outputName = name; }
QString outputName() const { return m_outputName; }
+ enum class CompressionAlgorithm {
+ Zlib,
+ Zstd,
+
+ Best = 99,
+ None = -1
+ };
+
+ static CompressionAlgorithm parseCompressionAlgorithm(QStringView algo, QString *errorMsg);
+ void setCompressionAlgorithm(CompressionAlgorithm algo) { m_compressionAlgo = algo; }
+ CompressionAlgorithm compressionAlgorithm() const { return m_compressionAlgo; }
+
+ static int parseCompressionLevel(CompressionAlgorithm algo, const QString &level, QString *errorMsg);
void setCompressLevel(int c) { m_compressLevel = c; }
int compressLevel() const { return m_compressLevel; }
@@ -104,6 +120,7 @@ private:
const QString ATTRIBUTE_ALIAS;
const QString ATTRIBUTE_THRESHOLD;
const QString ATTRIBUTE_COMPRESS;
+ const QString ATTRIBUTE_COMPRESSALGO;
};
friend class RCCFileInfo;
void reset();
@@ -117,6 +134,7 @@ private:
bool writeInitializer();
void writeMangleNamespaceFunction(const QByteArray &name);
void writeAddNamespaceFunction(const QByteArray &name);
+ void writeDecimal(int value);
void writeHex(quint8 number);
void writeNumber2(quint16 number);
void writeNumber4(quint32 number);
@@ -125,6 +143,10 @@ private:
void writeByteArray(const QByteArray &);
void write(const char *, int len);
+#if QT_CONFIG(zstd)
+ ZSTD_CCtx *m_zstdCCtx;
+#endif
+
const Strings m_strings;
RCCFileInfo *m_root;
QStringList m_fileNames;
@@ -133,11 +155,13 @@ private:
QString m_outputName;
Format m_format;
bool m_verbose;
+ CompressionAlgorithm m_compressionAlgo;
int m_compressLevel;
int m_compressThreshold;
int m_treeOffset;
int m_namesOffset;
int m_dataOffset;
+ quint32 m_overallFlags;
bool m_useNameSpace;
QStringList m_failedResources;
QIODevice *m_errorDevice;
diff --git a/src/tools/rcc/rcc.pro b/src/tools/rcc/rcc.pro
index 208ec54a73..ae55b5d8af 100644
--- a/src/tools/rcc/rcc.pro
+++ b/src/tools/rcc/rcc.pro
@@ -8,3 +8,14 @@ SOURCES += main.cpp
QMAKE_TARGET_DESCRIPTION = "Qt Resource Compiler"
load(qt_tool)
+
+# RCC is a bootstrapped tool, so qglobal.h #includes qconfig-bootstrapped.h
+# and that has a #define saying zstd isn't present (for qresource.cpp, which is
+# part of the bootstrap lib). So we inform the presence of the feature in the
+# command-line.
+qtConfig(zstd):!cross_compile {
+ DEFINES += QT_FEATURE_zstd=1
+ QMAKE_USE_PRIVATE += zstd
+} else {
+ DEFINES += QT_FEATURE_zstd=-1
+}
diff --git a/src/tools/tracegen/helpers.cpp b/src/tools/tracegen/helpers.cpp
index f0ac7ed47f..a5526065d6 100644
--- a/src/tools/tracegen/helpers.cpp
+++ b/src/tools/tracegen/helpers.cpp
@@ -46,7 +46,7 @@ QString includeGuard(const QString &filename)
for (int i = 0; i < guard.size(); ++i) {
if (!guard.at(i).isLetterOrNumber())
- guard[i] = QChar('_');
+ guard[i] = QLatin1Char('_');
}
return guard;
diff --git a/src/tools/uic/cpp/cppwriteincludes.cpp b/src/tools/uic/cpp/cppwriteincludes.cpp
index d51fddffea..0ba49627c0 100644
--- a/src/tools/uic/cpp/cppwriteincludes.cpp
+++ b/src/tools/uic/cpp/cppwriteincludes.cpp
@@ -119,7 +119,7 @@ void WriteIncludes::acceptUI(DomUI *node)
writeHeaders(m_globalIncludes, true);
writeHeaders(m_localIncludes, false);
- m_output << QLatin1Char('\n');
+ m_output << '\n';
}
void WriteIncludes::acceptWidget(DomWidget *node)
@@ -214,14 +214,14 @@ void WriteIncludes::add(const QString &className, bool determineHeader, const QS
m_knownClasses.insert(className);
const CustomWidgetsInfo *cwi = m_uic->customWidgetsInfo();
- if (cwi->extends(className, QLatin1String("QTreeView"))
- || cwi->extends(className, QLatin1String("QTreeWidget"))
- || cwi->extends(className, QLatin1String("QTableView"))
- || cwi->extends(className, QLatin1String("QTableWidget"))) {
+ static const QStringList treeViewsWithHeaders = {
+ QLatin1String("QTreeView"), QLatin1String("QTreeWidget"),
+ QLatin1String("QTableView"), QLatin1String("QTableWidget")
+ };
+ if (cwi->extendsOneOf(className, treeViewsWithHeaders))
add(QLatin1String("QHeaderView"));
- }
- if (!m_laidOut && m_uic->customWidgetsInfo()->extends(className, QLatin1String("QToolBox")))
+ if (!m_laidOut && cwi->extends(className, QLatin1String("QToolBox")))
add(QLatin1String("QLayout")); // spacing property of QToolBox)
if (className == QLatin1String("Line")) { // ### hmm, deprecate me!
@@ -314,7 +314,7 @@ void WriteIncludes::writeHeaders(const OrderedSet &headers, bool global)
const QString value = m_oldHeaderToNewHeader.value(header, header);
const auto trimmed = QStringRef(&value).trimmed();
if (!trimmed.isEmpty())
- m_output << "#include " << openingQuote << trimmed << closingQuote << QLatin1Char('\n');
+ m_output << "#include " << openingQuote << trimmed << closingQuote << '\n';
}
}
diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp
index 7ab6c31cb2..35d77f0827 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.cpp
+++ b/src/tools/uic/cpp/cppwriteinitialization.cpp
@@ -32,7 +32,8 @@
#include "utils.h"
#include "uic.h"
#include "databaseinfo.h"
-#include "globaldefs.h"
+
+#include <language.h>
#include <qtextstream.h>
#include <qversionnumber.h>
@@ -45,35 +46,26 @@
QT_BEGIN_NAMESPACE
namespace {
- // Fixup an enumeration name from class Qt.
- // They are currently stored as "BottomToolBarArea" instead of "Qt::BottomToolBarArea".
- // due to MO issues. This might be fixed in the future.
- QLatin1String qtEnumerationPrefix(const QString &name) {
- static const QLatin1String prefix("Qt::");
- if (name.indexOf(prefix) != 0)
- return prefix;
- return QLatin1String();
- }
// figure out the toolbar area of a DOM attrib list.
// By legacy, it is stored as an integer. As of 4.3.0, it is the enumeration value.
QString toolBarAreaStringFromDOMAttributes(const CPP::WriteInitialization::DomPropertyMap &attributes) {
const DomProperty *pstyle = attributes.value(QLatin1String("toolBarArea"));
+ QString result;
if (!pstyle)
- return QString();
-
+ return result;
switch (pstyle->kind()) {
- case DomProperty::Number: {
- return QLatin1String("static_cast<Qt::ToolBarArea>(")
- + QString::number(pstyle->elementNumber()) + QLatin1String("), ");
- }
- case DomProperty::Enum: {
- const QString area = pstyle->elementEnum();
- return qtEnumerationPrefix(area) + area + QLatin1String(", ");
- }
+ case DomProperty::Number:
+ result = QLatin1String(language::toolbarArea(pstyle->elementNumber()));
+ break;
+ case DomProperty::Enum:
+ result = pstyle->elementEnum();
+ break;
default:
break;
}
- return QString();
+ if (!result.startsWith(QLatin1String("Qt::")))
+ result.prepend(QLatin1String("Qt::"));
+ return result + QLatin1String(", ");
}
// Write a statement to create a spacer item.
@@ -173,17 +165,16 @@ namespace {
}
return true;
}
-
- inline void openIfndef(QTextStream &str, const QString &symbol) { if (!symbol.isEmpty()) str << QLatin1String("#ifndef ") << symbol << endl; }
- inline void closeIfndef(QTextStream &str, const QString &symbol) { if (!symbol.isEmpty()) str << QLatin1String("#endif // ") << symbol << endl; }
-
- const char *accessibilityDefineC = "QT_NO_ACCESSIBILITY";
- const char *toolTipDefineC = "QT_NO_TOOLTIP";
- const char *whatsThisDefineC = "QT_NO_WHATSTHIS";
- const char *statusTipDefineC = "QT_NO_STATUSTIP";
- const char *shortcutDefineC = "QT_NO_SHORTCUT";
}
+// QtGui
+static inline QString accessibilityConfigKey() { return QStringLiteral("accessibility"); }
+static inline QString shortcutConfigKey() { return QStringLiteral("shortcut"); }
+static inline QString whatsThisConfigKey() { return QStringLiteral("whatsthis"); }
+// QtWidgets
+static inline QString statusTipConfigKey() { return QStringLiteral("statustip"); }
+static inline QString toolTipConfigKey() { return QStringLiteral("tooltip"); }
+
namespace CPP {
FontHandle::FontHandle(const DomFont *domFont) :
@@ -521,14 +512,15 @@ void WriteInitialization::acceptUI(DomUI *node)
acceptWidget(node->elementWidget());
if (!m_buddies.empty())
- openIfndef(m_output, QLatin1String(shortcutDefineC));
+ m_output << language::openQtConfig(shortcutConfigKey());
for (const Buddy &b : qAsConst(m_buddies)) {
if (!m_registeredWidgets.contains(b.objName)) {
fprintf(stderr, "%s: Warning: Buddy assignment: '%s' is not a valid widget.\n",
qPrintable(m_option.messagePrefix()),
b.objName.toLatin1().data());
continue;
- } else if (!m_registeredWidgets.contains(b.buddy)) {
+ }
+ if (!m_registeredWidgets.contains(b.buddy)) {
fprintf(stderr, "%s: Warning: Buddy assignment: '%s' is not a valid widget.\n",
qPrintable(m_option.messagePrefix()),
b.buddy.toLatin1().data());
@@ -538,12 +530,12 @@ void WriteInitialization::acceptUI(DomUI *node)
m_output << m_indent << b.objName << "->setBuddy(" << b.buddy << ");\n";
}
if (!m_buddies.empty())
- closeIfndef(m_output, QLatin1String(shortcutDefineC));
+ m_output << language::closeQtConfig(shortcutConfigKey());
if (node->elementTabStops())
acceptTabStops(node->elementTabStops());
- if (m_delayedActionInitialization.size())
+ if (!m_delayedActionInitialization.isEmpty())
m_output << "\n" << m_delayedActionInitialization;
m_output << "\n" << m_indent << "retranslateUi(" << varName << ");\n";
@@ -616,18 +608,23 @@ void WriteInitialization::acceptWidget(DomWidget *node)
if (m_uic->isContainer(parentClass))
parentWidget.clear();
- if (m_widgetChain.size() != 1)
- m_output << m_indent << varName << " = new " << m_uic->customWidgetsInfo()->realClassName(className) << '(' << parentWidget << ");\n";
+ const auto *cwi = m_uic->customWidgetsInfo();
+
+ if (m_widgetChain.size() != 1) {
+ m_output << m_indent << varName << " = new " << cwi->realClassName(className)
+ << '(' << parentWidget << ");\n";
+ }
parentWidget = savedParentWidget;
- if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QComboBox"))) {
+
+ if (cwi->extends(className, QLatin1String("QComboBox"))) {
initializeComboBox(node);
- } else if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QListWidget"))) {
+ } else if (cwi->extends(className, QLatin1String("QListWidget"))) {
initializeListWidget(node);
- } else if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QTreeWidget"))) {
+ } else if (cwi->extends(className, QLatin1String("QTreeWidget"))) {
initializeTreeWidget(node);
- } else if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QTableWidget"))) {
+ } else if (cwi->extends(className, QLatin1String("QTableWidget"))) {
initializeTableWidget(node);
}
@@ -636,7 +633,8 @@ void WriteInitialization::acceptWidget(DomWidget *node)
writeProperties(varName, className, node->elementProperty());
- if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QMenu")) && parentWidget.size()) {
+ if (!parentWidget.isEmpty()
+ && cwi->extends(className, QLatin1String("QMenu"))) {
initializeMenu(node, parentWidget);
}
@@ -648,7 +646,7 @@ void WriteInitialization::acceptWidget(DomWidget *node)
if (const DomWidget* parentWidget = m_widgetChain.top()) {
const QString parentClass = parentWidget->attributeClass();
if (parentClass != QLatin1String("QMainWindow")
- && !m_uic->isCustomWidgetContainer(parentClass)
+ && !m_uic->customWidgetsInfo()->isCustomWidgetContainer(parentClass)
&& !m_uic->isContainer(parentClass))
m_layoutWidget = true;
}
@@ -664,10 +662,10 @@ void WriteInitialization::acceptWidget(DomWidget *node)
const QString pageDefaultString = QLatin1String("Page");
- if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QMainWindow"))) {
- if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QMenuBar"))) {
+ if (cwi->extends(parentClass, QLatin1String("QMainWindow"))) {
+ if (cwi->extends(className, QLatin1String("QMenuBar"))) {
m_output << m_indent << parentWidget << "->setMenuBar(" << varName <<");\n";
- } else if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QToolBar"))) {
+ } else if (cwi->extends(className, QLatin1String("QToolBar"))) {
m_output << m_indent << parentWidget << "->addToolBar("
<< toolBarAreaStringFromDOMAttributes(attributes) << varName << ");\n";
@@ -677,15 +675,11 @@ void WriteInitialization::acceptWidget(DomWidget *node)
}
}
- } else if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QDockWidget"))) {
- QString area;
- if (DomProperty *pstyle = attributes.value(QLatin1String("dockWidgetArea"))) {
- area += QLatin1String("static_cast<Qt::DockWidgetArea>(");
- area += QString::number(pstyle->elementNumber());
- area += QLatin1String("), ");
- }
-
- m_output << m_indent << parentWidget << "->addDockWidget(" << area << varName << ");\n";
+ } else if (cwi->extends(className, QLatin1String("QDockWidget"))) {
+ m_output << m_indent << parentWidget << "->addDockWidget(";
+ if (DomProperty *pstyle = attributes.value(QLatin1String("dockWidgetArea")))
+ m_output << "Qt::" << language::dockWidgetArea(pstyle->elementNumber()) << ", ";
+ m_output << varName << ");\n";
} else if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QStatusBar"))) {
m_output << m_indent << parentWidget << "->setStatusBar(" << varName << ");\n";
} else {
@@ -694,71 +688,62 @@ void WriteInitialization::acceptWidget(DomWidget *node)
}
// Check for addPageMethod of a custom plugin first
- const QString addPageMethod = m_uic->customWidgetsInfo()->customWidgetAddPageMethod(parentClass);
+ QString addPageMethod = cwi->customWidgetAddPageMethod(parentClass);
+ if (addPageMethod.isEmpty())
+ addPageMethod = cwi->simpleContainerAddPageMethod(parentClass);
if (!addPageMethod.isEmpty()) {
m_output << m_indent << parentWidget << "->" << addPageMethod << '(' << varName << ");\n";
- } else if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QStackedWidget"))) {
- m_output << m_indent << parentWidget << "->addWidget(" << varName << ");\n";
- } else if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QToolBar"))) {
- m_output << m_indent << parentWidget << "->addWidget(" << varName << ");\n";
- } else if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QDockWidget"))) {
- m_output << m_indent << parentWidget << "->setWidget(" << varName << ");\n";
- } else if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QScrollArea"))) {
- m_output << m_indent << parentWidget << "->setWidget(" << varName << ");\n";
- } else if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QSplitter"))) {
- m_output << m_indent << parentWidget << "->addWidget(" << varName << ");\n";
- } else if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QMdiArea"))) {
- m_output << m_indent << parentWidget << "->addSubWindow(" << varName << ");\n";
} else if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QWizard"))) {
addWizardPage(varName, node, parentWidget);
} else if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QToolBox"))) {
- QString icon;
- if (const DomProperty *picon = attributes.value(QLatin1String("icon"))) {
- icon += QLatin1String(", ") ;
- icon += iconCall(picon);
- }
-
const DomProperty *plabel = attributes.value(QLatin1String("label"));
DomString *plabelString = plabel ? plabel->elementString() : 0;
+ QString icon;
+ if (const DomProperty *picon = attributes.value(QLatin1String("icon")))
+ icon = QLatin1String(", ") + iconCall(picon); // Side effect: Writes icon definition
- m_output << m_indent << parentWidget << "->addItem(" << varName << icon << ", " << noTrCall(plabelString, pageDefaultString) << ");\n";
+ m_output << m_indent << parentWidget << "->addItem(" << varName << icon
+ << ", " << noTrCall(plabelString, pageDefaultString) << ");\n";
autoTrOutput(plabelString, pageDefaultString) << m_indent << parentWidget << "->setItemText("
<< parentWidget << "->indexOf(" << varName << "), " << autoTrCall(plabelString, pageDefaultString) << ");\n";
-#ifndef QT_NO_TOOLTIP
if (DomProperty *ptoolTip = attributes.value(QLatin1String("toolTip"))) {
- autoTrOutput(ptoolTip->elementString()) << m_indent << parentWidget << "->setItemToolTip("
- << parentWidget << "->indexOf(" << varName << "), " << autoTrCall(ptoolTip->elementString()) << ");\n";
+ autoTrOutput(ptoolTip->elementString())
+ << language::openQtConfig(toolTipConfigKey())
+ << m_indent << parentWidget << "->setItemToolTip(" << parentWidget
+ << "->indexOf(" << varName << "), "
+ << autoTrCall(ptoolTip->elementString()) << ");\n"
+ << language::closeQtConfig(toolTipConfigKey());
}
-#endif // QT_NO_TOOLTIP
} else if (m_uic->customWidgetsInfo()->extends(parentClass, QLatin1String("QTabWidget"))) {
- QString icon;
- if (const DomProperty *picon = attributes.value(QLatin1String("icon"))) {
- icon += QLatin1String(", ");
- icon += iconCall(picon);
- }
-
const DomProperty *ptitle = attributes.value(QLatin1String("title"));
DomString *ptitleString = ptitle ? ptitle->elementString() : 0;
-
- m_output << m_indent << parentWidget << "->addTab(" << varName << icon << ", " << "QString());\n";
+ QString icon;
+ if (const DomProperty *picon = attributes.value(QLatin1String("icon")))
+ icon = QLatin1String(", ") + iconCall(picon); // Side effect: Writes icon definition
+ m_output << m_indent << parentWidget << "->addTab(" << varName << icon
+ << ", " << "QString());\n";
autoTrOutput(ptitleString, pageDefaultString) << m_indent << parentWidget << "->setTabText("
<< parentWidget << "->indexOf(" << varName << "), " << autoTrCall(ptitleString, pageDefaultString) << ");\n";
-#ifndef QT_NO_TOOLTIP
if (const DomProperty *ptoolTip = attributes.value(QLatin1String("toolTip"))) {
- autoTrOutput(ptoolTip->elementString()) << m_indent << parentWidget << "->setTabToolTip("
- << parentWidget << "->indexOf(" << varName << "), " << autoTrCall(ptoolTip->elementString()) << ");\n";
+ autoTrOutput(ptoolTip->elementString())
+ << language::openQtConfig(toolTipConfigKey())
+ << m_indent << parentWidget << "->setTabToolTip(" << parentWidget
+ << "->indexOf(" << varName << "), "
+ << autoTrCall(ptoolTip->elementString()) << ");\n"
+ << language::closeQtConfig(toolTipConfigKey());
}
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_WHATSTHIS
if (const DomProperty *pwhatsThis = attributes.value(QLatin1String("whatsThis"))) {
- autoTrOutput(pwhatsThis->elementString()) << m_indent << parentWidget << "->setTabWhatsThis("
- << parentWidget << "->indexOf(" << varName << "), " << autoTrCall(pwhatsThis->elementString()) << ");\n";
+ autoTrOutput(pwhatsThis->elementString())
+ << language::openQtConfig(whatsThisConfigKey())
+ << m_indent << parentWidget << "->setTabWhatsThis(" << parentWidget
+ << "->indexOf(" << varName << "), "
+ << autoTrCall(pwhatsThis->elementString()) << ");\n"
+ << language::closeQtConfig(whatsThisConfigKey());
}
-#endif // QT_NO_WHATSTHIS
}
//
@@ -774,8 +759,14 @@ void WriteInitialization::acceptWidget(DomWidget *node)
QLatin1String("stretchLastSection"),
};
- if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QTreeView"))
- || m_uic->customWidgetsInfo()->extends(className, QLatin1String("QTreeWidget"))) {
+ static const QStringList trees = {
+ QLatin1String("QTreeView"), QLatin1String("QTreeWidget")
+ };
+ static const QStringList tables = {
+ QLatin1String("QTableView"), QLatin1String("QTableWidget")
+ };
+
+ if (cwi->extendsOneOf(className, trees)) {
DomPropertyList headerProperties;
for (auto realPropertyName : realPropertyNames) {
const QString fakePropertyName = QLatin1String("header")
@@ -788,9 +779,7 @@ void WriteInitialization::acceptWidget(DomWidget *node)
writeProperties(varName + QLatin1String("->header()"), QLatin1String("QHeaderView"),
headerProperties, WritePropertyIgnoreObjectName);
- } else if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QTableView"))
- || m_uic->customWidgetsInfo()->extends(className, QLatin1String("QTableWidget"))) {
-
+ } else if (cwi->extendsOneOf(className, tables)) {
static const QLatin1String headerPrefixes[] = {
QLatin1String("horizontalHeader"),
QLatin1String("verticalHeader"),
@@ -984,6 +973,24 @@ static inline QString formLayoutRole(int column, int colspan)
return column == 0 ? QLatin1String("QFormLayout::LabelRole") : QLatin1String("QFormLayout::FieldRole");
}
+static QString layoutAddMethod(DomLayoutItem::Kind kind, const QString &layoutClass)
+{
+ const QString methodPrefix = layoutClass == QLatin1String("QFormLayout")
+ ? QLatin1String("set") : QLatin1String("add");
+ switch (kind) {
+ case DomLayoutItem::Widget:
+ return methodPrefix + QLatin1String("Widget");
+ case DomLayoutItem::Layout:
+ return methodPrefix + QLatin1String("Layout");
+ case DomLayoutItem::Spacer:
+ return methodPrefix + QLatin1String("Item");
+ case DomLayoutItem::Unknown:
+ Q_ASSERT( false );
+ break;
+ }
+ Q_UNREACHABLE();
+}
+
void WriteInitialization::acceptLayoutItem(DomLayoutItem *node)
{
TreeWalker::acceptLayoutItem(node);
@@ -996,47 +1003,27 @@ void WriteInitialization::acceptLayoutItem(DomLayoutItem *node)
const QString layoutName = m_driver->findOrInsertLayout(layout);
const QString itemName = m_driver->findOrInsertLayoutItem(node);
- QString addArgs;
- QString methodPrefix = QLatin1String("add"); //Consistent API-design galore!
+ m_output << "\n" << m_indent << layoutName << "->"
+ << layoutAddMethod(node->kind(), layout->attributeClass()) << '(';
+
if (layout->attributeClass() == QLatin1String("QGridLayout")) {
const int row = node->attributeRow();
const int col = node->attributeColumn();
const int rowSpan = node->hasAttributeRowSpan() ? node->attributeRowSpan() : 1;
const int colSpan = node->hasAttributeColSpan() ? node->attributeColSpan() : 1;
-
- addArgs = QString::fromLatin1("%1, %2, %3, %4, %5").arg(itemName).arg(row).arg(col).arg(rowSpan).arg(colSpan);
+ m_output << itemName << ", " << row << ", " << col << ", " << rowSpan << ", " << colSpan;
if (!node->attributeAlignment().isEmpty())
- addArgs += QLatin1String(", ") + node->attributeAlignment();
+ m_output << ", " << node->attributeAlignment();
+ } else if (layout->attributeClass() == QLatin1String("QFormLayout")) {
+ const int row = node->attributeRow();
+ const int colSpan = node->hasAttributeColSpan() ? node->attributeColSpan() : 1;
+ const QString role = formLayoutRole(node->attributeColumn(), colSpan);
+ m_output << row << ", " << role << ", " << itemName;
} else {
- if (layout->attributeClass() == QLatin1String("QFormLayout")) {
- methodPrefix = QLatin1String("set");
- const int row = node->attributeRow();
- const int colSpan = node->hasAttributeColSpan() ? node->attributeColSpan() : 1;
- const QString role = formLayoutRole(node->attributeColumn(), colSpan);
- addArgs = QString::fromLatin1("%1, %2, %3").arg(row).arg(role, itemName);
- } else {
- addArgs = itemName;
- if (layout->attributeClass().contains(QLatin1String("Box")) && !node->attributeAlignment().isEmpty())
- addArgs += QLatin1String(", 0, ") + node->attributeAlignment();
- }
- }
-
- // figure out "add" method
- m_output << "\n" << m_indent << layoutName << "->";
- switch (node->kind()) {
- case DomLayoutItem::Widget:
- m_output << methodPrefix << "Widget(" << addArgs;
- break;
- case DomLayoutItem::Layout:
- m_output << methodPrefix << "Layout(" << addArgs;
- break;
- case DomLayoutItem::Spacer:
- m_output << methodPrefix << "Item(" << addArgs;
- break;
- case DomLayoutItem::Unknown:
- Q_ASSERT( 0 );
- break;
+ m_output << itemName;
+ if (layout->attributeClass().contains(QLatin1String("Box")) && !node->attributeAlignment().isEmpty())
+ m_output << ", 0, " << node->attributeAlignment();
}
m_output << ");\n\n";
}
@@ -1076,16 +1063,16 @@ void WriteInitialization::acceptAction(DomAction *node)
void WriteInitialization::acceptActionRef(DomActionRef *node)
{
QString actionName = node->attributeName();
+ if (actionName.isEmpty() || !m_widgetChain.top()
+ || m_driver->actionGroupByName(actionName)) {
+ return;
+ }
+
+ const QString varName = m_driver->findOrInsertWidget(m_widgetChain.top());
const bool isSeparator = actionName == QLatin1String("separator");
bool isMenu = false;
- QString varName = m_driver->findOrInsertWidget(m_widgetChain.top());
-
- if (actionName.isEmpty() || !m_widgetChain.top()) {
- return;
- } else if (m_driver->actionGroupByName(actionName)) {
- return;
- } else if (const DomWidget *w = m_driver->widgetByName(actionName)) {
+ if (const DomWidget *w = m_driver->widgetByName(actionName)) {
isMenu = m_uic->isMenu(w->attributeClass());
} else if (!(m_driver->actionByName(actionName) || isSeparator)) {
fprintf(stderr, "%s: Warning: action `%s' not declared\n",
@@ -1125,6 +1112,23 @@ QString WriteInitialization::writeStringListProperty(const DomStringList *list)
return propertyValue;
}
+static QString configKeyForProperty(const QString &propertyName)
+{
+ if (propertyName == QLatin1String("toolTip"))
+ return toolTipConfigKey();
+ if (propertyName == QLatin1String("whatsThis"))
+ return whatsThisConfigKey();
+ if (propertyName == QLatin1String("statusTip"))
+ return statusTipConfigKey();
+ if (propertyName == QLatin1String("shortcut"))
+ return shortcutConfigKey();
+ if (propertyName == QLatin1String("accessibleName")
+ || propertyName == QLatin1String("accessibleDescription")) {
+ return accessibilityConfigKey();
+ }
+ return QString();
+}
+
void WriteInitialization::writeProperties(const QString &varName,
const QString &className,
const DomPropertyList &lst,
@@ -1172,11 +1176,12 @@ void WriteInitialization::writeProperties(const QString &varName,
<< p->elementNumber() << ");\n";
continue;
}
+ static const QStringList currentIndexWidgets = {
+ QLatin1String("QComboBox"), QLatin1String("QStackedWidget"),
+ QLatin1String("QTabWidget"), QLatin1String("QToolBox")
+ };
if (propertyName == QLatin1String("currentIndex") // set currentIndex later
- && (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QComboBox"))
- || m_uic->customWidgetsInfo()->extends(className, QLatin1String("QStackedWidget"))
- || m_uic->customWidgetsInfo()->extends(className, QLatin1String("QTabWidget"))
- || m_uic->customWidgetsInfo()->extends(className, QLatin1String("QToolBox")))) {
+ && (m_uic->customWidgetsInfo()->extendsOneOf(className, currentIndexWidgets))) {
m_delayedOut << m_indent << varName << "->setCurrentIndex("
<< p->elementNumber() << ");\n";
continue;
@@ -1461,29 +1466,19 @@ void WriteInitialization::writeProperties(const QString &varName,
break;
}
- if (propertyValue.size()) {
- const char* defineC = 0;
- if (propertyName == QLatin1String("toolTip"))
- defineC = toolTipDefineC;
- else if (propertyName == QLatin1String("whatsThis"))
- defineC = whatsThisDefineC;
- else if (propertyName == QLatin1String("statusTip"))
- defineC = statusTipDefineC;
- else if (propertyName == QLatin1String("shortcut"))
- defineC = shortcutDefineC;
- else if (propertyName == QLatin1String("accessibleName") || propertyName == QLatin1String("accessibleDescription"))
- defineC = accessibilityDefineC;
+ if (!propertyValue.isEmpty()) {
+ const QString configKey = configKeyForProperty(propertyName);
QTextStream &o = delayProperty ? m_delayedOut : autoTrOutput(p);
- if (defineC)
- openIfndef(o, QLatin1String(defineC));
+ if (!configKey.isEmpty())
+ o << language::openQtConfig(configKey);
o << m_indent << varNewName << setFunction << propertyValue;
if (!stdset)
o << ')';
o << ");\n";
- if (defineC)
- closeIfndef(o, QLatin1String(defineC));
+ if (!configKey.isEmpty())
+ o << language::closeQtConfig(configKey);
if (varName == m_mainFormVarName && &o == &m_refreshOut) {
// this is the only place (currently) where we output mainForm name to the retranslateUi().
@@ -1493,11 +1488,9 @@ void WriteInitialization::writeProperties(const QString &varName,
}
}
if (leftMargin != -1 || topMargin != -1 || rightMargin != -1 || bottomMargin != -1) {
- m_output << m_indent << varName << QLatin1String("->setContentsMargins(")
- << leftMargin << QLatin1String(", ")
- << topMargin << QLatin1String(", ")
- << rightMargin << QLatin1String(", ")
- << bottomMargin << QLatin1String(");\n");
+ m_output << m_indent << varName << "->setContentsMargins("
+ << leftMargin << ", " << topMargin << ", "
+ << rightMargin << ", " << bottomMargin << ");\n";
}
}
@@ -1519,8 +1512,8 @@ QString WriteInitialization::writeSizePolicy(const DomSizePolicy *sp)
m_output << m_indent << "QSizePolicy " << spName;
do {
if (sp->hasElementHSizeType() && sp->hasElementVSizeType()) {
- m_output << "(static_cast<QSizePolicy::Policy>(" << sp->elementHSizeType()
- << "), static_cast<QSizePolicy::Policy>(" << sp->elementVSizeType() << "));\n";
+ m_output << "(QSizePolicy::" << language::sizePolicy(sp->elementHSizeType())
+ << ", QSizePolicy::" << language::sizePolicy(sp->elementVSizeType()) << ");\n";
break;
}
if (sp->hasAttributeHSizeType() && sp->hasAttributeVSizeType()) {
@@ -1784,7 +1777,7 @@ void WriteInitialization::writeColorGroup(DomColorGroup *colorGroup, const QStri
const DomColor *color = colors.at(i);
m_output << m_indent << paletteName << ".setColor(" << group
- << ", " << "static_cast<QPalette::ColorRole>(" << QString::number(i) << ')'
+ << ", QPalette::" << language::paletteColorRole(i)
<< ", " << domColor2QString(color)
<< ");\n";
}
@@ -2059,10 +2052,15 @@ void WriteInitialization::enableSorting(DomWidget *w, const QString &varName, co
void WriteInitialization::addInitializer(Item *item,
const QString &name, int column, const QString &value, const QString &directive, bool translatable) const
{
- if (!value.isEmpty())
- item->addSetter(QLatin1String("->set") + name.at(0).toUpper() + name.midRef(1) +
- QLatin1Char('(') + (column < 0 ? QString() : QString::number(column) +
- QLatin1String(", ")) + value + QLatin1String(");"), directive, translatable);
+ if (!value.isEmpty()) {
+ QString setter;
+ QTextStream str(&setter);
+ str << "->set" << name.at(0).toUpper() << name.midRef(1) << '(';
+ if (column >= 0)
+ str << column << ", ";
+ str << value << ");";
+ item->addSetter(setter, directive, translatable);
+ }
}
/*!
@@ -2144,9 +2142,12 @@ void WriteInitialization::addCommonInitializers(Item *item,
addQtFlagsInitializer(item, properties, QLatin1String("textAlignment"), column);
addQtEnumInitializer(item, properties, QLatin1String("checkState"), column);
addStringInitializer(item, properties, QLatin1String("text"), column);
- addStringInitializer(item, properties, QLatin1String("toolTip"), column, QLatin1String(toolTipDefineC));
- addStringInitializer(item, properties, QLatin1String("whatsThis"), column, QLatin1String(whatsThisDefineC));
- addStringInitializer(item, properties, QLatin1String("statusTip"), column, QLatin1String(statusTipDefineC));
+ addStringInitializer(item, properties, QLatin1String("toolTip"), column,
+ toolTipConfigKey());
+ addStringInitializer(item, properties, QLatin1String("whatsThis"), column,
+ whatsThisConfigKey());
+ addStringInitializer(item, properties, QLatin1String("statusTip"), column,
+ statusTipConfigKey());
}
void WriteInitialization::initializeListWidget(DomWidget *w)
@@ -2286,7 +2287,7 @@ void WriteInitialization::initializeTableWidget(DomWidget *w)
QString itemName = item.writeSetupUi(QString(), Item::ConstructItemAndVariable);
item.writeRetranslateUi(varName + QLatin1String("->horizontalHeaderItem(") + QString::number(i) + QLatin1Char(')'));
- m_output << m_indent << varName << "->setHorizontalHeaderItem(" << QString::number(i) << ", " << itemName << ");\n";
+ m_output << m_indent << varName << "->setHorizontalHeaderItem(" << i << ", " << itemName << ");\n";
}
}
@@ -2308,7 +2309,7 @@ void WriteInitialization::initializeTableWidget(DomWidget *w)
QString itemName = item.writeSetupUi(QString(), Item::ConstructItemAndVariable);
item.writeRetranslateUi(varName + QLatin1String("->verticalHeaderItem(") + QString::number(i) + QLatin1Char(')'));
- m_output << m_indent << varName << "->setVerticalHeaderItem(" << QString::number(i) << ", " << itemName << ");\n";
+ m_output << m_indent << varName << "->setVerticalHeaderItem(" << i << ", " << itemName << ");\n";
}
}
@@ -2329,7 +2330,7 @@ void WriteInitialization::initializeTableWidget(DomWidget *w)
QString itemName = item.writeSetupUi(QString(), Item::ConstructItemAndVariable);
item.writeRetranslateUi(varName + QLatin1String("->item(") + QString::number(r) + QLatin1String(", ") + QString::number(c) + QLatin1Char(')'));
- m_output << m_indent << varName << "->setItem(" << QString::number(r) << ", " << QString::number(c) << ", " << itemName << ");\n";
+ m_output << m_indent << varName << "->setItem(" << r << ", " << c << ", " << itemName << ");\n";
}
}
enableSorting(w, varName, tempName);
@@ -2348,7 +2349,7 @@ QString WriteInitialization::trCall(const QString &str, const QString &commentHi
if (idBasedTranslations || m_option.idBased) {
result += QLatin1String("qtTrId(");
} else {
- result += QLatin1String("QApplication::translate(\"")
+ result += QLatin1String("QCoreApplication::translate(\"")
+ m_generatedClass
+ QLatin1String("\", ");
}
@@ -2427,19 +2428,13 @@ QTextStream &WriteInitialization::autoTrOutput(const DomString *str, const QStri
return m_output;
}
-bool WriteInitialization::isValidObject(const QString &name) const
-{
- return m_registeredWidgets.contains(name)
- || m_registeredActions.contains(name);
-}
-
QString WriteInitialization::findDeclaration(const QString &name)
{
const QString normalized = Driver::normalizedName(name);
- if (DomWidget *widget = m_driver->widgetByName(normalized))
+ if (const DomWidget *widget = m_driver->widgetByName(normalized))
return m_driver->findOrInsertWidget(widget);
- if (DomAction *action = m_driver->actionByName(normalized))
+ if (const DomAction *action = m_driver->actionByName(normalized))
return m_driver->findOrInsertAction(action);
if (const DomButtonGroup *group = m_driver->findButtonGroup(normalized))
return m_driver->findOrInsertButtonGroup(group);
@@ -2465,25 +2460,13 @@ void WriteInitialization::acceptConnection(DomConnection *connection)
<< ");\n";
}
-DomWidget *WriteInitialization::findWidget(QLatin1String widgetClass)
-{
- for (int i = m_widgetChain.count() - 1; i >= 0; --i) {
- DomWidget *widget = m_widgetChain.at(i);
-
- if (widget && m_uic->customWidgetsInfo()->extends(widget->attributeClass(), widgetClass))
- return widget;
- }
-
- return 0;
-}
-
static void generateMultiDirectiveBegin(QTextStream &outputStream, const QSet<QString> &directives)
{
if (directives.isEmpty())
return;
if (directives.size() == 1) {
- outputStream << "#ifndef " << *directives.cbegin() << endl;
+ outputStream << language::openQtConfig(*directives.cbegin());
return;
}
@@ -2491,7 +2474,10 @@ static void generateMultiDirectiveBegin(QTextStream &outputStream, const QSet<QS
// sort (always generate in the same order):
std::sort(list.begin(), list.end());
- outputStream << "#if !defined(" << list.join(QLatin1String(") || !defined(")) << ')' << endl;
+ outputStream << "#if " << language::qtConfig(list.constFirst());
+ for (int i = 1, size = list.size(); i < size; ++i)
+ outputStream << " || " << language::qtConfig(list.at(i));
+ outputStream << endl;
}
static void generateMultiDirectiveEnd(QTextStream &outputStream, const QSet<QString> &directives)
@@ -2548,9 +2534,11 @@ QString WriteInitialization::Item::writeSetupUi(const QString &parent, Item::Emp
QMultiMap<QString, QString>::ConstIterator it = m_setupUiData.setters.constBegin();
while (it != m_setupUiData.setters.constEnd()) {
- openIfndef(m_setupUiStream, it.key());
+ if (!it.key().isEmpty())
+ m_setupUiStream << language::openQtConfig(it.key());
m_setupUiStream << m_indent << uniqueName << it.value() << endl;
- closeIfndef(m_setupUiStream, it.key());
+ if (!it.key().isEmpty())
+ m_setupUiStream << language::closeQtConfig(it.key());
++it;
}
for (Item *child : qAsConst(m_children))
@@ -2577,14 +2565,17 @@ void WriteInitialization::Item::writeRetranslateUi(const QString &parentPath)
while (it != m_retranslateUiData.setters.constEnd()) {
const QString newDirective = it.key();
if (oldDirective != newDirective) {
- closeIfndef(m_retranslateUiStream, oldDirective);
- openIfndef(m_retranslateUiStream, newDirective);
+ if (!oldDirective.isEmpty())
+ m_retranslateUiStream << language::closeQtConfig(oldDirective);
+ if (!newDirective.isEmpty())
+ m_retranslateUiStream << language::openQtConfig(newDirective);
oldDirective = newDirective;
}
m_retranslateUiStream << m_indent << uniqueName << it.value() << endl;
++it;
}
- closeIfndef(m_retranslateUiStream, oldDirective);
+ if (!oldDirective.isEmpty())
+ m_retranslateUiStream << language::closeQtConfig(oldDirective);
for (int i = 0; i < m_children.size(); i++)
m_children[i]->writeRetranslateUi(uniqueName + QLatin1String("->child(") + QString::number(i) + QLatin1Char(')'));
diff --git a/src/tools/uic/cpp/cppwriteinitialization.h b/src/tools/uic/cpp/cppwriteinitialization.h
index cce83bd677..c408c44b40 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.h
+++ b/src/tools/uic/cpp/cppwriteinitialization.h
@@ -174,8 +174,6 @@ private:
void writeRetranslateUi(const QString &parentPath);
void addSetter(const QString &setter, const QString &directive = QString(), bool translatable = false); // don't call it if you already added *this as a child of another Item
void addChild(Item *child); // all setters should already been added
- int setupUiCount() const { return m_setupUiData.setters.count(); }
- int retranslateUiCount() const { return m_retranslateUiData.setters.count(); }
private:
struct ItemData
{
@@ -223,9 +221,6 @@ private:
void enableSorting(DomWidget *w, const QString &varName, const QString &tempName);
QString findDeclaration(const QString &name);
- DomWidget *findWidget(QLatin1String widgetClass);
-
- bool isValidObject(const QString &name) const;
private:
QString writeFontProperties(const DomFont *f);
diff --git a/src/tools/uic/customwidgetsinfo.cpp b/src/tools/uic/customwidgetsinfo.cpp
index 0ac0c2b6a3..d6a409152b 100644
--- a/src/tools/uic/customwidgetsinfo.cpp
+++ b/src/tools/uic/customwidgetsinfo.cpp
@@ -31,6 +31,8 @@
#include "ui4.h"
#include "utils.h"
+#include <utility>
+
QT_BEGIN_NAMESPACE
CustomWidgetsInfo::CustomWidgetsInfo() = default;
@@ -73,6 +75,24 @@ bool CustomWidgetsInfo::extends(const QString &classNameIn, QLatin1String baseCl
return false;
}
+bool CustomWidgetsInfo::extendsOneOf(const QString &classNameIn,
+ const QStringList &baseClassNames) const
+{
+ if (baseClassNames.contains(classNameIn))
+ return true;
+
+ QString className = classNameIn;
+ while (const DomCustomWidget *c = customWidget(className)) {
+ const QString extends = c->elementExtends();
+ if (className == extends) // Faulty legacy custom widget entries exist.
+ return false;
+ if (baseClassNames.contains(extends))
+ return true;
+ className = extends;
+ }
+ return false;
+}
+
bool CustomWidgetsInfo::isCustomWidgetContainer(const QString &className) const
{
if (const DomCustomWidget *dcw = m_customWidgets.value(className, 0))
@@ -96,5 +116,24 @@ QString CustomWidgetsInfo::customWidgetAddPageMethod(const QString &name) const
return QString();
}
+// add page methods for simple containers taking only the widget parameter
+QString CustomWidgetsInfo::simpleContainerAddPageMethod(const QString &name) const
+{
+ using AddPageMethod = std::pair<const char *, const char *>;
+
+ static AddPageMethod addPageMethods[] = {
+ {"QStackedWidget", "addWidget"},
+ {"QToolBar", "addWidget"},
+ {"QDockWidget", "setWidget"},
+ {"QScrollArea", "setWidget"},
+ {"QSplitter", "addWidget"},
+ {"QMdiArea", "addSubWindow"}
+ };
+ for (const auto &m : addPageMethods) {
+ if (extends(name, QLatin1String(m.first)))
+ return QLatin1String(m.second);
+ }
+ return QString();
+}
QT_END_NAMESPACE
diff --git a/src/tools/uic/customwidgetsinfo.h b/src/tools/uic/customwidgetsinfo.h
index 944ed59215..8a10999027 100644
--- a/src/tools/uic/customwidgetsinfo.h
+++ b/src/tools/uic/customwidgetsinfo.h
@@ -48,20 +48,16 @@ public:
void acceptCustomWidgets(DomCustomWidgets *node) override;
void acceptCustomWidget(DomCustomWidget *node) override;
- inline QStringList customWidgets() const
- { return m_customWidgets.keys(); }
-
- inline bool hasCustomWidget(const QString &name) const
- { return m_customWidgets.contains(name); }
-
inline DomCustomWidget *customWidget(const QString &name) const
{ return m_customWidgets.value(name); }
QString customWidgetAddPageMethod(const QString &name) const;
+ QString simpleContainerAddPageMethod(const QString &name) const;
QString realClassName(const QString &className) const;
bool extends(const QString &className, QLatin1String baseClassName) const;
+ bool extendsOneOf(const QString &className, const QStringList &baseClassNames) const;
bool isCustomWidgetContainer(const QString &className) const;
diff --git a/src/tools/uic/databaseinfo.h b/src/tools/uic/databaseinfo.h
index bebf139c5a..4015e39dbc 100644
--- a/src/tools/uic/databaseinfo.h
+++ b/src/tools/uic/databaseinfo.h
@@ -48,12 +48,6 @@ public:
inline QStringList connections() const
{ return m_connections; }
- inline QStringList cursors(const QString &connection) const
- { return m_cursors.value(connection); }
-
- inline QStringList fields(const QString &connection) const
- { return m_fields.value(connection); }
-
private:
QStringList m_connections;
QMap<QString, QStringList> m_cursors;
diff --git a/src/tools/uic/driver.cpp b/src/tools/uic/driver.cpp
index 91a48815fd..03fa1e17cf 100644
--- a/src/tools/uic/driver.cpp
+++ b/src/tools/uic/driver.cpp
@@ -33,6 +33,8 @@
#include <qfileinfo.h>
#include <qdebug.h>
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
Driver::Driver()
@@ -43,39 +45,37 @@ Driver::Driver()
Driver::~Driver() = default;
-QString Driver::findOrInsertWidget(DomWidget *ui_widget)
-{
- if (!m_widgets.contains(ui_widget))
- m_widgets.insert(ui_widget, unique(ui_widget->attributeName(), ui_widget->attributeClass()));
+static inline QString spacerItemClass() { return QStringLiteral("QSpacerItem"); }
+static inline QString actionGroupClass() { return QStringLiteral("QActionGroup"); }
+static inline QString actionClass() { return QStringLiteral("QAction"); }
+static inline QString buttonGroupClass() { return QStringLiteral("QButtonGroup"); }
- return m_widgets.value(ui_widget);
+template <class DomClass>
+QString Driver::findOrInsert(DomObjectHash<DomClass> *domHash, const DomClass *dom,
+ const QString &className)
+{
+ auto it = domHash->find(dom);
+ if (it == domHash->end())
+ it = domHash->insert(dom, this->unique(dom->attributeName(), className));
+ return it.value();
}
-QString Driver::findOrInsertSpacer(DomSpacer *ui_spacer)
+QString Driver::findOrInsertWidget(const DomWidget *ui_widget)
{
- if (!m_spacers.contains(ui_spacer)) {
- QString name;
- if (ui_spacer->hasAttributeName())
- name = ui_spacer->attributeName();
- m_spacers.insert(ui_spacer, unique(name, QLatin1String("QSpacerItem")));
- }
-
- return m_spacers.value(ui_spacer);
+ return findOrInsert(&m_widgets, ui_widget, ui_widget->attributeClass());
}
-QString Driver::findOrInsertLayout(DomLayout *ui_layout)
+QString Driver::findOrInsertSpacer(const DomSpacer *ui_spacer)
{
- if (!m_layouts.contains(ui_layout)) {
- QString name;
- if (ui_layout->hasAttributeName())
- name = ui_layout->attributeName();
- m_layouts.insert(ui_layout, unique(name, ui_layout->attributeClass()));
- }
+ return findOrInsert(&m_spacers, ui_spacer, spacerItemClass());
+}
- return m_layouts.value(ui_layout);
+QString Driver::findOrInsertLayout(const DomLayout *ui_layout)
+{
+ return findOrInsert(&m_layouts, ui_layout, ui_layout->attributeClass());
}
-QString Driver::findOrInsertLayoutItem(DomLayoutItem *ui_layoutItem)
+QString Driver::findOrInsertLayoutItem(const DomLayoutItem *ui_layoutItem)
{
switch (ui_layoutItem->kind()) {
case DomLayoutItem::Widget:
@@ -93,38 +93,29 @@ QString Driver::findOrInsertLayoutItem(DomLayoutItem *ui_layoutItem)
return QString();
}
-QString Driver::findOrInsertActionGroup(DomActionGroup *ui_group)
+QString Driver::findOrInsertActionGroup(const DomActionGroup *ui_group)
{
- if (!m_actionGroups.contains(ui_group))
- m_actionGroups.insert(ui_group, unique(ui_group->attributeName(), QLatin1String("QActionGroup")));
-
- return m_actionGroups.value(ui_group);
+ return findOrInsert(&m_actionGroups, ui_group, actionGroupClass());
}
-QString Driver::findOrInsertAction(DomAction *ui_action)
+QString Driver::findOrInsertAction(const DomAction *ui_action)
{
- if (!m_actions.contains(ui_action))
- m_actions.insert(ui_action, unique(ui_action->attributeName(), QLatin1String("QAction")));
-
- return m_actions.value(ui_action);
+ return findOrInsert(&m_actions, ui_action, actionClass());
}
QString Driver::findOrInsertButtonGroup(const DomButtonGroup *ui_group)
{
- ButtonGroupNameHash::iterator it = m_buttonGroups.find(ui_group);
- if (it == m_buttonGroups.end())
- it = m_buttonGroups.insert(ui_group, unique(ui_group->attributeName(), QLatin1String("QButtonGroup")));
- return it.value();
+ return findOrInsert(&m_buttonGroups, ui_group, buttonGroupClass());
}
// Find a group by its non-uniqified name
const DomButtonGroup *Driver::findButtonGroup(const QString &attributeName) const
{
- const ButtonGroupNameHash::const_iterator cend = m_buttonGroups.constEnd();
- for (ButtonGroupNameHash::const_iterator it = m_buttonGroups.constBegin(); it != cend; ++it)
+ for (auto it = m_buttonGroups.cbegin(), end = m_buttonGroups.cend(); it != end; ++it) {
if (it.key()->attributeName() == attributeName)
return it.key();
- return 0;
+ }
+ return nullptr;
}
@@ -136,11 +127,9 @@ QString Driver::findOrInsertName(const QString &name)
QString Driver::normalizedName(const QString &name)
{
QString result = name;
- QChar *data = result.data();
- for (int i = name.size(); --i >= 0; ++data) {
- if (!data->isLetterOrNumber())
- *data = QLatin1Char('_');
- }
+ std::replace_if(result.begin(), result.end(),
+ [] (QChar c) { return !c.isLetterOrNumber(); },
+ QLatin1Char('_'));
return result;
}
@@ -149,23 +138,21 @@ QString Driver::unique(const QString &instanceName, const QString &className)
QString name;
bool alreadyUsed = false;
- if (instanceName.size()) {
- int id = 1;
- name = instanceName;
- name = normalizedName(name);
+ if (!instanceName.isEmpty()) {
+ name = normalizedName(instanceName);
QString base = name;
- while (m_nameRepository.contains(name)) {
+ for (int id = 1; m_nameRepository.contains(name); ++id) {
alreadyUsed = true;
- name = base + QString::number(id++);
+ name = base + QString::number(id);
}
- } else if (className.size()) {
+ } else if (!className.isEmpty()) {
name = unique(qtify(className));
} else {
name = unique(QLatin1String("var"));
}
- if (alreadyUsed && className.size()) {
+ if (alreadyUsed && !className.isEmpty()) {
fprintf(stderr, "%s: Warning: The name '%s' (%s) is already in use, defaulting to '%s'.\n",
qPrintable(m_option.messagePrefix()),
qPrintable(instanceName), qPrintable(className),
@@ -181,17 +168,10 @@ QString Driver::qtify(const QString &name)
QString qname = name;
if (qname.at(0) == QLatin1Char('Q') || qname.at(0) == QLatin1Char('K'))
- qname = qname.mid(1);
+ qname.remove(0, 1);
- int i=0;
- while (i < qname.length()) {
- if (qname.at(i).toLower() != qname.at(i))
- qname[i] = qname.at(i).toLower();
- else
- break;
-
- ++i;
- }
+ for (int i = 0, size = qname.size(); i < size && qname.at(i).isUpper(); ++i)
+ qname[i] = qname.at(i).toLower();
return qname;
}
@@ -306,56 +286,17 @@ bool Driver::uic(const QString &fileName, QTextStream *out)
return rtn;
}
-void Driver::reset()
-{
- Q_ASSERT( m_output == 0 );
-
- m_option = Option();
- m_output = 0;
- m_problems.clear();
-
- QStringList m_problems;
-
- m_widgets.clear();
- m_spacers.clear();
- m_layouts.clear();
- m_actionGroups.clear();
- m_actions.clear();
- m_nameRepository.clear();
- m_pixmaps.clear();
-}
-
-void Driver::insertPixmap(const QString &pixmap)
-{
- m_pixmaps.insert(pixmap, true);
-}
-
-bool Driver::containsPixmap(const QString &pixmap) const
-{
- return m_pixmaps.contains(pixmap);
-}
-
-DomWidget *Driver::widgetByName(const QString &name) const
+const DomWidget *Driver::widgetByName(const QString &name) const
{
return m_widgets.key(name);
}
-DomSpacer *Driver::spacerByName(const QString &name) const
-{
- return m_spacers.key(name);
-}
-
-DomLayout *Driver::layoutByName(const QString &name) const
-{
- return m_layouts.key(name);
-}
-
-DomActionGroup *Driver::actionGroupByName(const QString &name) const
+const DomActionGroup *Driver::actionGroupByName(const QString &name) const
{
return m_actionGroups.key(name);
}
-DomAction *Driver::actionByName(const QString &name) const
+const DomAction *Driver::actionByName(const QString &name) const
{
return m_actions.key(name);
}
diff --git a/src/tools/uic/driver.h b/src/tools/uic/driver.h
index 1563bdbd83..1303d0bf8a 100644
--- a/src/tools/uic/driver.h
+++ b/src/tools/uic/driver.h
@@ -49,7 +49,7 @@ class DomButtonGroup;
class Driver
{
- Q_DISABLE_COPY(Driver)
+ Q_DISABLE_COPY_MOVE(Driver)
public:
Driver();
virtual ~Driver();
@@ -63,13 +63,6 @@ public:
inline QTextStream &output() const { return *m_output; }
inline Option &option() { return m_option; }
- // initialization
- void reset();
-
- // error
- inline QStringList problems() { return m_problems; }
- inline void addProblem(const QString &problem) { m_problems.append(problem); }
-
// utils
static QString headerFileName(const QString &fileName);
QString headerFileName() const;
@@ -80,50 +73,42 @@ public:
const QString &className=QString());
// symbol table
- QString findOrInsertWidget(DomWidget *ui_widget);
- QString findOrInsertSpacer(DomSpacer *ui_spacer);
- QString findOrInsertLayout(DomLayout *ui_layout);
- QString findOrInsertLayoutItem(DomLayoutItem *ui_layoutItem);
+ QString findOrInsertWidget(const DomWidget *ui_widget);
+ QString findOrInsertSpacer(const DomSpacer *ui_spacer);
+ QString findOrInsertLayout(const DomLayout *ui_layout);
+ QString findOrInsertLayoutItem(const DomLayoutItem *ui_layoutItem);
QString findOrInsertName(const QString &name);
- QString findOrInsertActionGroup(DomActionGroup *ui_group);
- QString findOrInsertAction(DomAction *ui_action);
+ QString findOrInsertActionGroup(const DomActionGroup *ui_group);
+ QString findOrInsertAction(const DomAction *ui_action);
QString findOrInsertButtonGroup(const DomButtonGroup *ui_group);
// Find a group by its non-uniqified name
const DomButtonGroup *findButtonGroup(const QString &attributeName) const;
- inline bool hasName(const QString &name) const
- { return m_nameRepository.contains(name); }
-
- DomWidget *widgetByName(const QString &name) const;
- DomSpacer *spacerByName(const QString &name) const;
- DomLayout *layoutByName(const QString &name) const;
- DomActionGroup *actionGroupByName(const QString &name) const;
- DomAction *actionByName(const QString &name) const;
-
- // pixmap
- void insertPixmap(const QString &pixmap);
- bool containsPixmap(const QString &pixmap) const;
+ const DomWidget *widgetByName(const QString &name) const;
+ const DomActionGroup *actionGroupByName(const QString &name) const;
+ const DomAction *actionByName(const QString &name) const;
bool useIdBasedTranslations() const { return m_idBasedTranslations; }
void setUseIdBasedTranslations(bool u) { m_idBasedTranslations = u; }
private:
+ template <class DomClass> using DomObjectHash = QHash<const DomClass *, QString>;
+
+ template <class DomClass>
+ QString findOrInsert(DomObjectHash<DomClass> *domHash, const DomClass *dom, const QString &className);
+
Option m_option;
QTextStream m_stdout;
QTextStream *m_output;
- QStringList m_problems;
-
// symbol tables
- QHash<DomWidget*, QString> m_widgets;
- QHash<DomSpacer*, QString> m_spacers;
- QHash<DomLayout*, QString> m_layouts;
- QHash<DomActionGroup*, QString> m_actionGroups;
- typedef QHash<const DomButtonGroup*, QString> ButtonGroupNameHash;
- ButtonGroupNameHash m_buttonGroups;
- QHash<DomAction*, QString> m_actions;
+ DomObjectHash<DomWidget> m_widgets;
+ DomObjectHash<DomSpacer> m_spacers;
+ DomObjectHash<DomLayout> m_layouts;
+ DomObjectHash<DomActionGroup> m_actionGroups;
+ DomObjectHash<DomButtonGroup> m_buttonGroups;
+ DomObjectHash<DomAction> m_actions;
QHash<QString, bool> m_nameRepository;
- QHash<QString, bool> m_pixmaps;
bool m_idBasedTranslations = false;
};
diff --git a/src/tools/uic/main.cpp b/src/tools/uic/main.cpp
index 41bd62bbf4..0516b854ff 100644
--- a/src/tools/uic/main.cpp
+++ b/src/tools/uic/main.cpp
@@ -131,7 +131,7 @@ int runUic(int argc, char *argv[])
QTextStream *out = 0;
QFile f;
- if (driver.option().outputFile.size()) {
+ if (!driver.option().outputFile.isEmpty()) {
f.setFileName(driver.option().outputFile);
if (!f.open(QIODevice::WriteOnly | QFile::Text)) {
fprintf(stderr, "Could not create output file\n");
diff --git a/src/tools/uic/shared/language.cpp b/src/tools/uic/shared/language.cpp
new file mode 100644
index 0000000000..730e1562bc
--- /dev/null
+++ b/src/tools/uic/shared/language.cpp
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "language.h"
+
+#include <QtCore/qtextstream.h>
+
+namespace language {
+
+QTextStream &operator<<(QTextStream &str, const qtConfig &c)
+{
+ str << "QT_CONFIG(" << c.parameter() << ')';
+ return str;
+}
+
+QTextStream &operator<<(QTextStream &str, const openQtConfig &c)
+{
+ str << "#if " << qtConfig(c.parameter()) << '\n';
+ return str;
+}
+
+QTextStream &operator<<(QTextStream &str, const closeQtConfig &c)
+{
+ str << "#endif // " << qtConfig(c.parameter()) << '\n';
+ return str;
+}
+
+struct EnumLookup
+{
+ int value;
+ const char *valueString;
+};
+
+template <int N>
+const char *lookupEnum(const EnumLookup(&array)[N], int value, int defaultIndex = 0)
+{
+ for (int i = 0; i < N; ++i) {
+ if (value == array[i].value)
+ return array[i].valueString;
+ }
+ const char *defaultValue = array[defaultIndex].valueString;
+ qWarning("uic: Warning: Invalid enumeration value %d, defaulting to %s",
+ value, defaultValue);
+ return defaultValue;
+}
+
+const char *toolbarArea(int v)
+{
+ static const EnumLookup toolBarAreas[] =
+ {
+ {0, "NoToolBarArea"},
+ {0x1, "LeftToolBarArea"},
+ {0x2, "RightToolBarArea"},
+ {0x4, "TopToolBarArea"},
+ {0x8, "BottomToolBarArea"},
+ {0xf, "AllToolBarAreas"}
+ };
+ return lookupEnum(toolBarAreas, v);
+}
+
+const char *sizePolicy(int v)
+{
+ static const EnumLookup sizePolicies[] =
+ {
+ {0, "Fixed"},
+ {0x1, "Minimum"},
+ {0x4, "Maximum"},
+ {0x5, "Preferred"},
+ {0x3, "MinimumExpanding"},
+ {0x7, "Expanding"},
+ {0xD, "Ignored"}
+ };
+ return lookupEnum(sizePolicies, v, 3);
+}
+
+const char *dockWidgetArea(int v)
+{
+ static const EnumLookup dockWidgetAreas[] =
+ {
+ {0, "NoDockWidgetArea"},
+ {0x1, "LeftDockWidgetArea"},
+ {0x2, "RightDockWidgetArea"},
+ {0x4, "TopDockWidgetArea"},
+ {0x8, "BottomDockWidgetArea"},
+ {0xf, "AllDockWidgetAreas"}
+ };
+ return lookupEnum(dockWidgetAreas, v);
+}
+
+const char *paletteColorRole(int v)
+{
+ static const EnumLookup colorRoles[] =
+ {
+ {0, "WindowText"},
+ {1, "Button"},
+ {2, "Light"},
+ {3, "Midlight"},
+ {4, "Dark"},
+ {5, "Mid"},
+ {6, "Text"},
+ {7, "BrightText"},
+ {8, "ButtonText"},
+ {9, "Base"},
+ {10, "Window"},
+ {11, "Shadow"},
+ {12, "Highlight"},
+ {13, "HighlightedText"},
+ {14, "Link"},
+ {15, "LinkVisited"},
+ {16, "AlternateBase"},
+ {17, "NoRole"},
+ {18, "ToolTipBase"},
+ {19, "ToolTipText"},
+ {20, "PlaceholderText"},
+ };
+ return lookupEnum(colorRoles, v);
+}
+
+} // namespace language
diff --git a/src/tools/uic/shared/language.h b/src/tools/uic/shared/language.h
new file mode 100644
index 0000000000..e7201b6529
--- /dev/null
+++ b/src/tools/uic/shared/language.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LANGUAGE_H
+#define LANGUAGE_H
+
+#include <QtCore/qstringview.h>
+
+QT_FORWARD_DECLARE_CLASS(QTextStream)
+
+namespace language {
+
+// Base class for streamable objects with one QStringView parameter
+class StringViewStreamable
+{
+public:
+ StringViewStreamable(QStringView parameter) : m_parameter(parameter) {}
+
+ QStringView parameter() const { return m_parameter; }
+
+private:
+ QStringView m_parameter;
+};
+
+class qtConfig : public StringViewStreamable
+{
+public:
+ qtConfig(QStringView name) : StringViewStreamable(name) {}
+};
+
+QTextStream &operator<<(QTextStream &str, const qtConfig &c);
+
+class openQtConfig : public StringViewStreamable
+{
+public:
+ openQtConfig(QStringView name) : StringViewStreamable(name) {}
+};
+
+QTextStream &operator<<(QTextStream &str, const openQtConfig &c);
+
+class closeQtConfig : public StringViewStreamable
+{
+public:
+ closeQtConfig(QStringView name) : StringViewStreamable(name) {}
+};
+
+QTextStream &operator<<(QTextStream &, const closeQtConfig &c);
+
+const char *toolbarArea(int v);
+const char *sizePolicy(int v);
+const char *dockWidgetArea(int v);
+const char *paletteColorRole(int v);
+
+} // namespace language
+
+#endif // LANGUAGE_H
diff --git a/src/tools/uic/shared/shared.pri b/src/tools/uic/shared/shared.pri
new file mode 100644
index 0000000000..dce2af8bf1
--- /dev/null
+++ b/src/tools/uic/shared/shared.pri
@@ -0,0 +1,5 @@
+INCLUDEPATH += $$PWD
+
+HEADERS += $$PWD/language.h
+
+SOURCES += $$PWD/language.cpp
diff --git a/src/tools/uic/treewalker.h b/src/tools/uic/treewalker.h
index 43d4633d83..7e8eda57d9 100644
--- a/src/tools/uic/treewalker.h
+++ b/src/tools/uic/treewalker.h
@@ -101,7 +101,6 @@ struct TreeWalker
virtual void acceptTime(DomTime *time);
virtual void acceptDateTime(DomDateTime *dateTime);
virtual void acceptProperty(DomProperty *property);
- typedef QVector<DomScript *> DomScripts;
typedef QVector<DomWidget *> DomWidgets;
virtual void acceptIncludes(DomIncludes *includes);
virtual void acceptInclude(DomInclude *incl);
diff --git a/src/tools/uic/uic.cpp b/src/tools/uic/uic.cpp
index a5b331192f..225dc6aeb2 100644
--- a/src/tools/uic/uic.cpp
+++ b/src/tools/uic/uic.cpp
@@ -106,13 +106,13 @@ bool Uic::printDependencies()
void Uic::writeCopyrightHeader(DomUI *ui)
{
QString comment = ui->elementComment();
- if (comment.size())
+ if (!comment.isEmpty())
out << "/*\n" << comment << "\n*/\n\n";
out << "/********************************************************************************\n";
out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n";
out << "**\n";
- out << "** Created by: Qt User Interface Compiler version " << QLatin1String(QT_VERSION_STR) << "\n";
+ out << "** Created by: Qt User Interface Compiler version " << QT_VERSION_STR << "\n";
out << "**\n";
out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n";
out << "********************************************************************************/\n\n";
@@ -243,55 +243,34 @@ void Uic::writeHeaderProtectionEnd()
out << "#endif // " << h << "\n";
}
-bool Uic::isMainWindow(const QString &className) const
-{
- return customWidgetsInfo()->extends(className, QLatin1String("QMainWindow"));
-}
-
-bool Uic::isToolBar(const QString &className) const
-{
- return customWidgetsInfo()->extends(className, QLatin1String("QToolBar"));
-}
-
bool Uic::isButton(const QString &className) const
{
- return customWidgetsInfo()->extends(className, QLatin1String("QRadioButton"))
- || customWidgetsInfo()->extends(className, QLatin1String("QToolButton"))
- || customWidgetsInfo()->extends(className, QLatin1String("QCheckBox"))
- || customWidgetsInfo()->extends(className, QLatin1String("QPushButton"))
- || customWidgetsInfo()->extends(className, QLatin1String("QCommandLinkButton"));
+ static const QStringList buttons = {
+ QLatin1String("QRadioButton"), QLatin1String("QToolButton"),
+ QLatin1String("QCheckBox"), QLatin1String("QPushButton"),
+ QLatin1String("QCommandLinkButton")
+ };
+ return customWidgetsInfo()->extendsOneOf(className, buttons);
}
bool Uic::isContainer(const QString &className) const
{
- return customWidgetsInfo()->extends(className, QLatin1String("QStackedWidget"))
- || customWidgetsInfo()->extends(className, QLatin1String("QToolBox"))
- || customWidgetsInfo()->extends(className, QLatin1String("QTabWidget"))
- || customWidgetsInfo()->extends(className, QLatin1String("QScrollArea"))
- || customWidgetsInfo()->extends(className, QLatin1String("QMdiArea"))
- || customWidgetsInfo()->extends(className, QLatin1String("QWizard"))
- || customWidgetsInfo()->extends(className, QLatin1String("QDockWidget"));
-}
-
-bool Uic::isCustomWidgetContainer(const QString &className) const
-{
- return customWidgetsInfo()->isCustomWidgetContainer(className);
-}
-
-bool Uic::isStatusBar(const QString &className) const
-{
- return customWidgetsInfo()->extends(className, QLatin1String("QStatusBar"));
-}
-
-bool Uic::isMenuBar(const QString &className) const
-{
- return customWidgetsInfo()->extends(className, QLatin1String("QMenuBar"));
+ static const QStringList containers = {
+ QLatin1String("QStackedWidget"), QLatin1String("QToolBox"),
+ QLatin1String("QTabWidget"), QLatin1String("QScrollArea"),
+ QLatin1String("QMdiArea"), QLatin1String("QWizard"),
+ QLatin1String("QDockWidget")
+ };
+
+ return customWidgetsInfo()->extendsOneOf(className, containers);
}
bool Uic::isMenu(const QString &className) const
{
- return customWidgetsInfo()->extends(className, QLatin1String("QMenu"))
- || customWidgetsInfo()->extends(className, QLatin1String("QPopupMenu"));
+ static const QStringList menus = {
+ QLatin1String("QMenu"), QLatin1String("QPopupMenu")
+ };
+ return customWidgetsInfo()->extendsOneOf(className, menus);
}
QT_END_NAMESPACE
diff --git a/src/tools/uic/uic.h b/src/tools/uic/uic.h
index 4c961aa0a5..af5f42c6db 100644
--- a/src/tools/uic/uic.h
+++ b/src/tools/uic/uic.h
@@ -53,7 +53,7 @@ struct Option;
class Uic
{
- Q_DISABLE_COPY(Uic)
+ Q_DISABLE_COPY_MOVE(Uic)
public:
Uic(Driver *driver);
~Uic();
@@ -85,13 +85,8 @@ public:
bool write(DomUI *ui);
- bool isMainWindow(const QString &className) const;
- bool isToolBar(const QString &className) const;
- bool isStatusBar(const QString &className) const;
bool isButton(const QString &className) const;
bool isContainer(const QString &className) const;
- bool isCustomWidgetContainer(const QString &className) const;
- bool isMenuBar(const QString &className) const;
bool isMenu(const QString &className) const;
private:
diff --git a/src/tools/uic/uic.pri b/src/tools/uic/uic.pri
index 3f0bab05dd..1c9098dcf9 100644
--- a/src/tools/uic/uic.pri
+++ b/src/tools/uic/uic.pri
@@ -5,7 +5,6 @@ HEADERS += \
$$PWD/customwidgetsinfo.h \
$$PWD/databaseinfo.h \
$$PWD/driver.h \
- $$PWD/globaldefs.h \
$$PWD/option.h \
$$PWD/treewalker.h \
$$PWD/utils.h \
diff --git a/src/tools/uic/uic.pro b/src/tools/uic/uic.pro
index 18511395d9..4469ce50e5 100644
--- a/src/tools/uic/uic.pro
+++ b/src/tools/uic/uic.pro
@@ -5,6 +5,7 @@ option(host_build)
DEFINES += QT_UIC QT_NO_CAST_FROM_ASCII QT_NO_FOREACH
include(uic.pri)
+include(shared/shared.pri)
include(cpp/cpp.pri)
HEADERS += uic.h
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index 93e49466cb..92ab846a41 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -646,7 +646,7 @@ void QColorWell::mouseMoveEvent(QMouseEvent *e)
drg->setMimeData(mime);
drg->setPixmap(pix);
mousePressed = false;
- drg->start();
+ drg->exec(Qt::CopyAction);
}
#endif
}
@@ -842,8 +842,8 @@ void QColorLuminancePicker::paintEvent(QPaintEvent *)
p.drawPixmap(1, coff, *pix);
const QPalette &g = palette();
qDrawShadePanel(&p, r, g, true);
- p.setPen(g.foreground().color());
- p.setBrush(g.foreground());
+ p.setPen(g.windowText().color());
+ p.setBrush(g.windowText());
QPolygon a;
int y = val2y(val);
a.setPoints(3, w, y, w+5, y+5, w+5, y-5);
@@ -1131,7 +1131,7 @@ void QColorShowLabel::mouseMoveEvent(QMouseEvent *e)
drg->setMimeData(mime);
drg->setPixmap(pix);
mousePressed = false;
- drg->start();
+ drg->exec(Qt::CopyAction);
}
#endif
}
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index c9093095a7..ebbd2fa9ea 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -760,6 +760,20 @@ void QDialog::setVisible(bool visible)
if (!testAttribute(Qt::WA_DontShowOnScreen) && d->canBeNativeDialog() && d->setNativeDialogVisible(visible))
return;
+ // We should not block windows by the invisible modal dialog
+ // if a platform-specific dialog is implemented as an in-process
+ // Qt window, because in this case it will also be blocked.
+ const bool dontBlockWindows = testAttribute(Qt::WA_DontShowOnScreen)
+ && d->styleHint(QPlatformDialogHelper::DialogIsQtWindow).toBool();
+ Qt::WindowModality oldModality;
+ bool wasModalitySet;
+
+ if (dontBlockWindows) {
+ oldModality = windowModality();
+ wasModalitySet = testAttribute(Qt::WA_SetWindowModality);
+ setWindowModality(Qt::NonModal);
+ }
+
if (visible) {
if (testAttribute(Qt::WA_WState_ExplicitShowHide) && !testAttribute(Qt::WA_WState_Hidden))
return;
@@ -826,6 +840,11 @@ void QDialog::setVisible(bool visible)
d->eventLoop->exit();
}
+ if (dontBlockWindows) {
+ setWindowModality(oldModality);
+ setAttribute(Qt::WA_SetWindowModality, wasModalitySet);
+ }
+
#if QT_CONFIG(pushbutton)
const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme();
if (d->mainDef && isActiveWindow()
diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h
index 2e49696b77..96d0c1190e 100644
--- a/src/widgets/dialogs/qfiledialog_p.h
+++ b/src/widgets/dialogs/qfiledialog_p.h
@@ -290,7 +290,7 @@ private:
virtual void helperPrepareShow(QPlatformDialogHelper *) override;
virtual void helperDone(QDialog::DialogCode, QPlatformDialogHelper *) override;
- Q_DISABLE_COPY(QFileDialogPrivate)
+ Q_DISABLE_COPY_MOVE(QFileDialogPrivate)
};
class QFileDialogLineEdit : public QLineEdit
diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp
index 477c6bd540..2b81180ecb 100644
--- a/src/widgets/dialogs/qfontdialog.cpp
+++ b/src/widgets/dialogs/qfontdialog.cpp
@@ -534,7 +534,7 @@ void QFontDialogPrivate::updateFamilies()
//and try some fall backs
match_t type = MATCH_NONE;
- if (bestFamilyType <= MATCH_NONE && familyName2 == f.lastResortFamily())
+ if (bestFamilyType <= MATCH_NONE && familyName2 == QStringLiteral("helvetica"))
type = MATCH_LAST_RESORT;
if (bestFamilyType <= MATCH_LAST_RESORT && familyName2 == f.family())
type = MATCH_APP;
diff --git a/src/widgets/dialogs/qmessagebox.h b/src/widgets/dialogs/qmessagebox.h
index 4b993a9e65..0a2edb1eee 100644
--- a/src/widgets/dialogs/qmessagebox.h
+++ b/src/widgets/dialogs/qmessagebox.h
@@ -284,9 +284,9 @@ public:
Q_SIGNALS:
void buttonClicked(QAbstractButton *button);
-#ifdef Q_QDOC
+#ifdef Q_CLANG_QDOC
public Q_SLOTS:
- int exec();
+ int exec() override;
#endif
protected:
diff --git a/src/widgets/dialogs/qprogressdialog.cpp b/src/widgets/dialogs/qprogressdialog.cpp
index e1fb1055ae..078dd6463b 100644
--- a/src/widgets/dialogs/qprogressdialog.cpp
+++ b/src/widgets/dialogs/qprogressdialog.cpp
@@ -47,7 +47,6 @@
#include "qapplication.h"
#include "qstyle.h"
#include "qpushbutton.h"
-#include "qcursor.h"
#include "qtimer.h"
#include "qelapsedtimer.h"
#include <private/qdialog_p.h>
@@ -94,9 +93,6 @@ public:
bool cancellation_flag;
bool setValue_called;
QElapsedTimer starttime;
-#ifndef QT_NO_CURSOR
- QCursor parentCursor;
-#endif
int showTime;
bool autoClose;
bool autoReset;
@@ -597,12 +593,6 @@ void QProgressDialog::setRange(int minimum, int maximum)
void QProgressDialog::reset()
{
Q_D(QProgressDialog);
-#ifndef QT_NO_CURSOR
- if (value() >= 0) {
- if (parentWidget())
- parentWidget()->setCursor(d->parentCursor);
- }
-#endif
if (d->autoClose || d->forceHide)
hide();
d->bar->reset();
diff --git a/src/widgets/dialogs/qsidebar.cpp b/src/widgets/dialogs/qsidebar.cpp
index d52f18b406..2c8c66e1e2 100644
--- a/src/widgets/dialogs/qsidebar.cpp
+++ b/src/widgets/dialogs/qsidebar.cpp
@@ -381,8 +381,6 @@ QSidebar::QSidebar(QWidget *parent) : QListView(parent)
void QSidebar::setModelAndUrls(QFileSystemModel *model, const QList<QUrl> &newUrls)
{
- // ### TODO make icon size dynamic
- setIconSize(QSize(24,24));
setUniformItemSizes(true);
urlModel = new QUrlModel(this);
urlModel->setFileSystemModel(model);
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp
index 3876cf16c6..59168ba14d 100644
--- a/src/widgets/dialogs/qwizard.cpp
+++ b/src/widgets/dialogs/qwizard.cpp
@@ -769,7 +769,7 @@ void QWizardPrivate::reset()
for (int i = history.count() - 1; i >= 0; --i)
q->cleanupPage(history.at(i));
history.clear();
- for (QWizardPage *page : pageMap)
+ for (QWizardPage *page : qAsConst(pageMap))
page->d_func()->initialized = false;
current = -1;
diff --git a/src/widgets/dialogs/qwizard_win_p.h b/src/widgets/dialogs/qwizard_win_p.h
index d302dedaa3..02c5e52c2c 100644
--- a/src/widgets/dialogs/qwizard_win_p.h
+++ b/src/widgets/dialogs/qwizard_win_p.h
@@ -84,7 +84,7 @@ class QWizard;
class QVistaHelper : public QObject
{
- Q_DISABLE_COPY(QVistaHelper)
+ Q_DISABLE_COPY_MOVE(QVistaHelper)
public:
QVistaHelper(QWizard *wizard);
~QVistaHelper() override;
diff --git a/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc b/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc
index 9af04f6b4c..098eaf4717 100644
--- a/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc
+++ b/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc
@@ -514,13 +514,15 @@ QLabel { border-width: 1px 2px 3px 4px } /* 1px 2px 3px 4px */
//! [84]
-QLabel { border-color: red } /* opaque red */
-QLabel { border-color: #FF0000 } /* opaque red */
-QLabel { border-color: rgba(255, 0, 0, 75%) } /* 75% opaque red */
-QLabel { border-color: rgb(255, 0, 0) } /* opaque red */
-QLabel { border-color: rgb(100%, 0%, 0%) } /* opaque red */
-QLabel { border-color: hsv(60, 255, 255) } /* opaque yellow */
-QLabel { border-color: hsva(240, 255, 255, 75%) } /* 75% blue */
+QLabel { border-color: red } /* opaque red */
+QLabel { border-color: #FF0000 } /* opaque red */
+QLabel { border-color: rgba(255, 0, 0, 75%) } /* 75% opaque red */
+QLabel { border-color: rgb(255, 0, 0) } /* opaque red */
+QLabel { border-color: rgb(100%, 0%, 0%) } /* opaque red */
+QLabel { border-color: hsv(60, 100%, 100%) } /* opaque yellow */
+QLabel { border-color: hsva(240, 255, 255, 75%) } /* 75% blue */
+QLabel { border-color: hsl(60, 100%, 50%) } /* opaque yellow */
+QLabel { border-color: hsla(240, 255, 50%, 75%) } /* 75% blue */
//! [84]
diff --git a/src/widgets/doc/snippets/qtreewidget-using/mainwindow.cpp b/src/widgets/doc/snippets/qtreewidget-using/mainwindow.cpp
index ee7e028a13..7c8d3f936e 100644
--- a/src/widgets/doc/snippets/qtreewidget-using/mainwindow.cpp
+++ b/src/widgets/doc/snippets/qtreewidget-using/mainwindow.cpp
@@ -154,14 +154,14 @@ void MainWindow::findItems()
QTreeWidgetItem *item;
//! [6]
foreach (item, treeWidget->selectedItems())
- treeWidget->setItemSelected(item, false);
+ item->setSelected(false);
//! [7]
QList<QTreeWidgetItem *> found = treeWidget->findItems(
itemText, Qt::MatchWildcard);
foreach (item, found) {
- treeWidget->setItemSelected(item, true);
+ item->setSelected(true);
// Show the item->text(0) for each item.
}
//! [7]
diff --git a/src/widgets/doc/src/model-view-programming.qdoc b/src/widgets/doc/src/model-view-programming.qdoc
index f6b7c80656..83397c90b6 100644
--- a/src/widgets/doc/src/model-view-programming.qdoc
+++ b/src/widgets/doc/src/model-view-programming.qdoc
@@ -693,9 +693,9 @@
\l QAbstractItemDelegate class.
Delegates are expected to be able to render their contents themselves
- by implementing the \l{QItemDelegate::paint()}{paint()}
- and \l{QItemDelegate::sizeHint()}{sizeHint()} functions.
- However, simple widget-based delegates can subclass \l QItemDelegate
+ by implementing the \l{QStyledItemDelegate::paint()}{paint()}
+ and \l{QStyledItemDelegate::sizeHint()}{sizeHint()} functions.
+ However, simple widget-based delegates can subclass \l QStyledItemDelegate
instead of \l QAbstractItemDelegate, and take advantage of the default
implementations of these functions.
@@ -709,14 +709,14 @@
\section2 Using an existing delegate
- The standard views provided with Qt use instances of \l QItemDelegate
+ The standard views provided with Qt use instances of \l QStyledItemDelegate
to provide editing facilities. This default implementation of the
delegate interface renders items in the usual style for each of the
standard views: \l QListView, \l QTableView, and \l QTreeView.
All the standard roles are handled by the default delegate used by
the standard views. The way these are interpreted is described in the
- QItemDelegate documentation.
+ QStyledItemDelegate documentation.
The delegate used by a view is returned by the
\l{QAbstractItemView::itemDelegate()}{itemDelegate()} function.
@@ -799,7 +799,7 @@
In this case, we ensure that the spin box is up-to-date, and update
the model with the value it contains using the index specified.
- The standard \l QItemDelegate class informs the view when it has
+ The standard \l QStyledItemDelegate class informs the view when it has
finished editing by emitting the
\l{QAbstractItemDelegate::closeEditor()}{closeEditor()} signal.
The view ensures that the editor widget is closed and destroyed. In
@@ -838,11 +838,11 @@
assist any subsequent editing operations. This is achieved by
emitting the \l{QAbstractItemDelegate::closeEditor()}{closeEditor()}
signal with a suitable hint. This is taken care of by the default
- QItemDelegate event filter which we installed on the spin box when
+ QStyledItemDelegate event filter which we installed on the spin box when
it was constructed.
The behavior of the spin box could be adjusted to make it more user
- friendly. In the default event filter supplied by QItemDelegate, if
+ friendly. In the default event filter supplied by QStyledItemDelegate, if
the user hits \uicontrol Return to confirm their choice in the spin box,
the delegate commits the value to the model and closes the spin box.
We can change this behavior by installing our own event filter on the
diff --git a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
index 43f9dda49a..00323eace6 100644
--- a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc
@@ -2881,14 +2881,20 @@
| \tt{rgba(\e{r}, \e{g}, \e{b}, \e{a})} \br
| \tt{hsv(\e{h}, \e{s}, \e{v})} \br
| \tt{hsva(\e{h}, \e{s}, \e{v}, \e{a})} \br
+ | \tt{hsl(\e{h}, \e{s}, \e{l})} \br
+ | \tt{hsla(\e{h}, \e{s}, \e{l}, \e{a})} \br
| \tt{#\e{rrggbb}} \br
| \l{QColor::setNamedColor()}{Color Name} \br
- \li Specifies a color as RGB (red, green, blue) or RGBA
- (red, green, blue, alpha) or HSV (hue, saturation, value) or HSVA
- (hue, saturation, value, alpha) or a named color. The \c rgb() or \c rgba()
- syntax can be used with integer values between 0 and 255, or with
- percentages. The value of s, v, and a in \c hsv() or \c hsva() must all
- be in the range 0-255; the value of h must be in the range 0-359.
+ \li Specifies a color as RGB (red, green, blue), RGBA (red,
+ green, blue, alpha), HSV (hue, saturation, value), HSVA
+ (hue, saturation, value, alpha), HSL (hue, saturation,
+ lightness), HSLA (hue, saturation, lightness, alpha) or a
+ named color. The \c rgb() or \c rgba() syntax can be used
+ with integer values between 0 and 255, or with percentages.
+ The value of s, v, l and a in \c hsv(), \c hsva() \c hsl()
+ or \c hsla() must all be in the range 0-255 or with
+ percentages, the value of h must be in the range 0-359.
+ The support for HSL(A) is available since 5.13.
Examples:
diff --git a/src/widgets/effects/qgraphicseffect_p.h b/src/widgets/effects/qgraphicseffect_p.h
index c5c7ff5900..2f3bd2f7fd 100644
--- a/src/widgets/effects/qgraphicseffect_p.h
+++ b/src/widgets/effects/qgraphicseffect_p.h
@@ -88,7 +88,7 @@ protected:
private:
Q_DECLARE_PRIVATE(QGraphicsEffectSource)
- Q_DISABLE_COPY(QGraphicsEffectSource)
+ Q_DISABLE_COPY_MOVE(QGraphicsEffectSource)
friend class QGraphicsEffect;
friend class QGraphicsEffectPrivate;
friend class QGraphicsScenePrivate;
diff --git a/src/widgets/effects/qpixmapfilter.cpp b/src/widgets/effects/qpixmapfilter.cpp
index 60edd01d00..e1e8175423 100644
--- a/src/widgets/effects/qpixmapfilter.cpp
+++ b/src/widgets/effects/qpixmapfilter.cpp
@@ -54,6 +54,8 @@
#include "private/qmemrotate_p.h"
#include "private/qdrawhelper_p.h"
+#include <memory>
+
QT_BEGIN_NAMESPACE
class QPixmapFilterPrivate : public QObjectPrivate
@@ -319,7 +321,7 @@ static void convolute(
const QImage processImage = (srcImage.format() != QImage::Format_ARGB32_Premultiplied ) ? srcImage.convertToFormat(QImage::Format_ARGB32_Premultiplied) : srcImage;
// TODO: support also other formats directly without copying
- int *fixedKernel = new int[kernelWidth*kernelHeight];
+ std::unique_ptr<int[]> fixedKernel(new int[kernelWidth * kernelHeight]);
for(int i = 0; i < kernelWidth*kernelHeight; i++)
{
fixedKernel[i] = (int)(65536 * kernel[i]);
@@ -403,7 +405,6 @@ static void convolute(
}
yk++;
}
- delete[] fixedKernel;
}
/*!
diff --git a/src/widgets/graphicsview/qgraphicsitem.h b/src/widgets/graphicsview/qgraphicsitem.h
index c228e765d8..729176530d 100644
--- a/src/widgets/graphicsview/qgraphicsitem.h
+++ b/src/widgets/graphicsview/qgraphicsitem.h
@@ -487,7 +487,9 @@ private:
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
+#ifndef Q_CLANG_QDOC
Q_DECLARE_INTERFACE(QGraphicsItem, "org.qt-project.Qt.QGraphicsItem")
+#endif
inline void QGraphicsItem::setPos(qreal ax, qreal ay)
{ setPos(QPointF(ax, ay)); }
diff --git a/src/widgets/graphicsview/qgraphicslayout.h b/src/widgets/graphicsview/qgraphicslayout.h
index 28b335ceaa..efcafa5e6a 100644
--- a/src/widgets/graphicsview/qgraphicslayout.h
+++ b/src/widgets/graphicsview/qgraphicslayout.h
@@ -83,7 +83,9 @@ private:
friend class QGraphicsWidget;
};
+#ifndef Q_CLANG_QDOC
Q_DECLARE_INTERFACE(QGraphicsLayout, "org.qt-project.Qt.QGraphicsLayout")
+#endif
QT_END_NAMESPACE
diff --git a/src/widgets/graphicsview/qgraphicslayoutitem.h b/src/widgets/graphicsview/qgraphicslayoutitem.h
index 44f430034b..86a0a87361 100644
--- a/src/widgets/graphicsview/qgraphicslayoutitem.h
+++ b/src/widgets/graphicsview/qgraphicslayoutitem.h
@@ -116,7 +116,9 @@ private:
friend class QGraphicsLayout;
};
+#ifndef Q_CLANG_QDOC
Q_DECLARE_INTERFACE(QGraphicsLayoutItem, "org.qt-project.Qt.QGraphicsLayoutItem")
+#endif
inline void QGraphicsLayoutItem::setMinimumSize(qreal aw, qreal ah)
{ setMinimumSize(QSizeF(aw, ah)); }
diff --git a/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp b/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp
index af969b346d..da2510a8cb 100644
--- a/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp
+++ b/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp
@@ -50,15 +50,13 @@ QT_BEGIN_NAMESPACE
QGraphicsLayoutStyleInfo::QGraphicsLayoutStyleInfo(const QGraphicsLayoutPrivate *layout)
: m_layout(layout), m_style(0)
{
- m_widget = new QWidget; // pixelMetric might need a widget ptr
- if (m_widget)
- m_styleOption.initFrom(m_widget);
+ m_widget.reset(new QWidget); // pixelMetric might need a widget ptr
+ m_styleOption.initFrom(m_widget.get());
m_isWindow = m_styleOption.state & QStyle::State_Window;
}
QGraphicsLayoutStyleInfo::~QGraphicsLayoutStyleInfo()
{
- delete m_widget;
}
qreal QGraphicsLayoutStyleInfo::combinedLayoutSpacing(QLayoutPolicy::ControlTypes controls1,
@@ -93,7 +91,7 @@ qreal QGraphicsLayoutStyleInfo::windowMargin(Qt::Orientation orientation) const
const_cast<QStyleOption*>(&m_styleOption), widget());
}
-QWidget *QGraphicsLayoutStyleInfo::widget() const { return m_widget; }
+QWidget *QGraphicsLayoutStyleInfo::widget() const { return m_widget.get(); }
QStyle *QGraphicsLayoutStyleInfo::style() const
{
diff --git a/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h b/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h
index 7886de432c..c3af9f4554 100644
--- a/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h
+++ b/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h
@@ -54,6 +54,8 @@
#include <QtGui/private/qabstractlayoutstyleinfo_p.h>
#include <QtWidgets/qstyleoption.h>
+#include <memory>
+
QT_REQUIRE_CONFIG(graphicsview);
QT_BEGIN_NAMESPACE
@@ -93,7 +95,7 @@ private:
const QGraphicsLayoutPrivate *m_layout;
mutable QStyle *m_style;
QStyleOption m_styleOption;
- QWidget *m_widget;
+ std::unique_ptr<QWidget> m_widget;
};
QT_END_NAMESPACE
diff --git a/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
index b6387a2c56..eb6bbbf49b 100644
--- a/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
+++ b/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
@@ -99,7 +99,7 @@ protected:
private :
Q_DECLARE_PRIVATE(QGraphicsSceneBspTreeIndex)
- Q_DISABLE_COPY(QGraphicsSceneBspTreeIndex)
+ Q_DISABLE_COPY_MOVE(QGraphicsSceneBspTreeIndex)
Q_PRIVATE_SLOT(d_func(), void _q_updateSortCache())
Q_PRIVATE_SLOT(d_func(), void _q_updateIndex())
diff --git a/src/widgets/graphicsview/qgraphicssceneindex_p.h b/src/widgets/graphicsview/qgraphicssceneindex_p.h
index bdc57bd9ea..86637e836b 100644
--- a/src/widgets/graphicsview/qgraphicssceneindex_p.h
+++ b/src/widgets/graphicsview/qgraphicssceneindex_p.h
@@ -115,7 +115,7 @@ protected:
friend class QGraphicsItemPrivate;
friend class QGraphicsSceneBspTreeIndex;
private:
- Q_DISABLE_COPY(QGraphicsSceneIndex)
+ Q_DISABLE_COPY_MOVE(QGraphicsSceneIndex)
Q_DECLARE_PRIVATE(QGraphicsSceneIndex)
};
@@ -151,7 +151,7 @@ inline void QGraphicsSceneIndexPrivate::items_helper(const QRectF &rect, QGraphi
if (order == Qt::DescendingOrder) {
const int n = items->size();
for (int i = 0; i < n / 2; ++i)
- items->swap(i, n - i - 1);
+ items->swapItemsAt(i, n - i - 1);
}
}
diff --git a/src/widgets/graphicsview/qsimplex_p.h b/src/widgets/graphicsview/qsimplex_p.h
index 2342da2437..369f2f5f82 100644
--- a/src/widgets/graphicsview/qsimplex_p.h
+++ b/src/widgets/graphicsview/qsimplex_p.h
@@ -150,7 +150,7 @@ struct QSimplexConstraint
class QSimplex
{
- Q_DISABLE_COPY(QSimplex)
+ Q_DISABLE_COPY_MOVE(QSimplex)
public:
QSimplex();
~QSimplex();
diff --git a/src/widgets/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp
index 9508aed3d3..4bdc318566 100644
--- a/src/widgets/itemviews/qabstractitemdelegate.cpp
+++ b/src/widgets/itemviews/qabstractitemdelegate.cpp
@@ -88,7 +88,7 @@ QT_BEGIN_NAMESPACE
and is part of Qt's \l{Model/View Programming}{model/view framework}.
To render an item in a custom way, you must implement paint() and
- sizeHint(). The QItemDelegate class provides default implementations for
+ sizeHint(). The QStyledItemDelegate class provides default implementations for
these functions; if you do not need custom rendering, subclass that
class instead.
@@ -115,7 +115,7 @@ QT_BEGIN_NAMESPACE
The second approach is to handle user events directly by reimplementing
editorEvent().
- \sa {model-view-programming}{Model/View Programming}, QItemDelegate,
+ \sa {model-view-programming}{Model/View Programming}, QStyledItemDelegate,
{Pixelator Example}, QStyledItemDelegate, QStyle
*/
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index 02eae33a12..1151379e17 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -2438,8 +2438,14 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event)
break;
case Qt::Key_Space:
case Qt::Key_Select:
- if (!edit(currentIndex(), AnyKeyPressed, event) && d->selectionModel)
- d->selectionModel->select(currentIndex(), selectionCommand(currentIndex(), event));
+ if (!edit(currentIndex(), AnyKeyPressed, event)) {
+ if (d->selectionModel)
+ d->selectionModel->select(currentIndex(), selectionCommand(currentIndex(), event));
+ if (event->key() == Qt::Key_Space) {
+ keyboardSearch(event->text());
+ event->accept();
+ }
+ }
#ifdef QT_KEYPAD_NAVIGATION
if ( event->key()==Qt::Key_Select ) {
// Also do Key_Enter action.
@@ -3205,7 +3211,7 @@ bool QAbstractItemView::isPersistentEditorOpen(const QModelIndex &index) const
This function should only be used to display static content within the
visible area corresponding to an item of data. If you want to display
custom dynamic content or implement a custom editor widget, subclass
- QItemDelegate instead.
+ QStyledItemDelegate instead.
\sa {Delegate Classes}
*/
diff --git a/src/widgets/itemviews/qcolumnview_p.h b/src/widgets/itemviews/qcolumnview_p.h
index 9f0d2a40dc..7b36b1f3da 100644
--- a/src/widgets/itemviews/qcolumnview_p.h
+++ b/src/widgets/itemviews/qcolumnview_p.h
@@ -181,6 +181,7 @@ public:
/*!
* This is a delegate that will paint the triangle
*/
+// ### Qt6: QStyledItemDelegate
class QColumnViewDelegate : public QItemDelegate
{
diff --git a/src/widgets/itemviews/qcolumnviewgrip_p.h b/src/widgets/itemviews/qcolumnviewgrip_p.h
index 7e2793074b..5eb8012204 100644
--- a/src/widgets/itemviews/qcolumnviewgrip_p.h
+++ b/src/widgets/itemviews/qcolumnviewgrip_p.h
@@ -82,7 +82,7 @@ protected:
private:
Q_DECLARE_PRIVATE(QColumnViewGrip)
- Q_DISABLE_COPY(QColumnViewGrip)
+ Q_DISABLE_COPY_MOVE(QColumnViewGrip)
};
class QColumnViewGripPrivate : public QWidgetPrivate
diff --git a/src/widgets/itemviews/qdatawidgetmapper.cpp b/src/widgets/itemviews/qdatawidgetmapper.cpp
index 1f0dbff7a9..125ee73194 100644
--- a/src/widgets/itemviews/qdatawidgetmapper.cpp
+++ b/src/widgets/itemviews/qdatawidgetmapper.cpp
@@ -324,6 +324,7 @@ void QDataWidgetMapperPrivate::_q_modelDestroyed()
QDataWidgetMapper::QDataWidgetMapper(QObject *parent)
: QObject(*new QDataWidgetMapperPrivate, parent)
{
+ // ### Qt6: QStyledItemDelegate
setItemDelegate(new QItemDelegate(this));
}
diff --git a/src/widgets/itemviews/qdirmodel.cpp b/src/widgets/itemviews/qdirmodel.cpp
index 78fc623fb5..b94c31fb42 100644
--- a/src/widgets/itemviews/qdirmodel.cpp
+++ b/src/widgets/itemviews/qdirmodel.cpp
@@ -1252,11 +1252,10 @@ void QDirModelPrivate::restorePersistentIndexes()
for (const SavedPersistent &sp : qAsConst(savedPersistent)) {
QPersistentModelIndexData *data = sp.data;
QModelIndex idx = q->index(sp.path, sp.column);
- if (idx != data->index || data->model == 0) {
+ if (idx != data->index || data->index.model() == nullptr) {
//data->model may be equal to 0 if the model is getting destroyed
persistent.indexes.remove(data->index);
data->index = idx;
- data->model = q;
if (idx.isValid())
persistent.indexes.insert(idx, data);
}
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index 7bfa51337d..62abf56751 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -2321,9 +2321,10 @@ void QHeaderView::initializeSections()
if (stretchLastSection()) // we've already gotten the size hint
d->maybeRestorePrevLastSectionAndStretchLast();
- //make sure we update the hidden sections
+ // make sure we update the hidden sections
+ // simulate remove from newCount to oldCount
if (newCount < oldCount)
- d->updateHiddenSections(0, newCount-1);
+ d->updateHiddenSections(newCount, oldCount);
}
}
@@ -3116,9 +3117,25 @@ void QHeaderView::scrollContentsBy(int dx, int dy)
\reimp
\internal
*/
-void QHeaderView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &)
+void QHeaderView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles)
{
Q_D(QHeaderView);
+ if (!roles.isEmpty()) {
+ const auto doesRoleAffectSize = [](int role) -> bool {
+ switch (role) {
+ case Qt::DisplayRole:
+ case Qt::DecorationRole:
+ case Qt::SizeHintRole:
+ case Qt::FontRole:
+ return true;
+ default:
+ // who knows what a subclass or custom style might do
+ return role >= Qt::UserRole;
+ }
+ };
+ if (std::none_of(roles.begin(), roles.end(), doesRoleAffectSize))
+ return;
+ }
d->invalidateCachedSizeHint();
if (d->hasAutoResizeSections()) {
bool resizeRequired = d->globalResizeMode == ResizeToContents;
@@ -3874,9 +3891,9 @@ void QHeaderViewPrivate::updateDefaultSectionSizeFromStyle()
void QHeaderViewPrivate::recalcSectionStartPos() const // linear (but fast)
{
int pixelpos = 0;
- for (QVector<SectionItem>::const_iterator i = sectionItems.constBegin(); i != sectionItems.constEnd(); ++i) {
- i->calculated_startpos = pixelpos; // write into const mutable
- pixelpos += i->size;
+ for (const SectionItem &i : sectionItems) {
+ i.calculated_startpos = pixelpos; // write into const mutable
+ pixelpos += i.size;
}
sectionStartposRecalc = false;
}
diff --git a/src/widgets/itemviews/qitemdelegate.cpp b/src/widgets/itemviews/qitemdelegate.cpp
index dff4cc4593..16d4a21f50 100644
--- a/src/widgets/itemviews/qitemdelegate.cpp
+++ b/src/widgets/itemviews/qitemdelegate.cpp
@@ -266,7 +266,7 @@ QSizeF QItemDelegatePrivate::doTextLayout(int lineWidth) const
\row \li \l Qt::AccessibleDescriptionRole \li QString
\row \li \l Qt::AccessibleTextRole \li QString
\endomit
- \row \li \l Qt::BackgroundRole \li QBrush
+ \row \li \l Qt::BackgroundRole \li QBrush (\since 4.2)
\row \li \l Qt::BackgroundColorRole \li QColor (obsolete; use Qt::BackgroundRole instead)
\row \li \l Qt::CheckStateRole \li Qt::CheckState
\row \li \l Qt::DecorationRole \li QIcon, QPixmap and QColor
@@ -278,7 +278,7 @@ QSizeF QItemDelegatePrivate::doTextLayout(int lineWidth) const
\row \li \l Qt::StatusTipRole \li
\endomit
\row \li \l Qt::TextAlignmentRole \li Qt::Alignment
- \row \li \l Qt::ForegroundRole \li QBrush
+ \row \li \l Qt::ForegroundRole \li QBrush (\since 4.2)
\row \li \l Qt::TextColorRole \li QColor (obsolete; use Qt::ForegroundRole instead)
\omit
\row \li \l Qt::ToolTipRole
@@ -1089,7 +1089,7 @@ QRect QItemDelegate::doCheck(const QStyleOptionViewItem &option,
opt.rect = bounding;
const QWidget *widget = d->widget(option); // cast
QStyle *style = widget ? widget->style() : QApplication::style();
- return style->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, widget);
+ return style->subElementRect(QStyle::SE_ItemViewItemCheckIndicator, &opt, widget);
}
return QRect();
}
diff --git a/src/widgets/itemviews/qitemeditorfactory.cpp b/src/widgets/itemviews/qitemeditorfactory.cpp
index 0986da9707..43dd004530 100644
--- a/src/widgets/itemviews/qitemeditorfactory.cpp
+++ b/src/widgets/itemviews/qitemeditorfactory.cpp
@@ -122,7 +122,7 @@ Q_SIGNALS:
\inmodule QtWidgets
When editing data in an item view, editors are created and
- displayed by a delegate. QItemDelegate, which is the delegate by
+ displayed by a delegate. QStyledItemDelegate, which is the delegate by
default installed on Qt's item views, uses a QItemEditorFactory to
create editors for it. A default unique instance provided by
QItemEditorFactory is used by all item delegates. If you set a
@@ -156,7 +156,7 @@ Q_SIGNALS:
Additional editors can be registered with the registerEditor() function.
- \sa QItemDelegate, {Model/View Programming}, {Color Editor Factory Example}
+ \sa QStyledItemDelegate, {Model/View Programming}, {Color Editor Factory Example}
*/
/*!
@@ -375,7 +375,7 @@ void QItemEditorFactory::setDefaultFactory(QItemEditorFactory *factory)
QItemEditorCreatorBase objects are specialized widget factories that
provide editor widgets for one particular QVariant data type. They
are used by QItemEditorFactory to create editors for
- \l{QItemDelegate}s. Creator bases must be registered with
+ \l{QStyledItemDelegate}s. Creator bases must be registered with
QItemEditorFactory::registerEditor().
An editor should provide a user property for the data it edits.
@@ -457,7 +457,7 @@ QItemEditorCreatorBase::~QItemEditorCreatorBase()
\snippet code/src_gui_itemviews_qitemeditorfactory.cpp 1
The constructor takes the name of the property that contains the
- editing data. QItemDelegate can then access the property by name
+ editing data. QStyledItemDelegate can then access the property by name
when it sets and retrieves editing data. Only use this class if
your editor does not define a user property (using the USER
keyword in the Q_PROPERTY macro). If the widget has a user
@@ -472,7 +472,7 @@ QItemEditorCreatorBase::~QItemEditorCreatorBase()
Constructs an editor creator object using \a valuePropertyName
as the name of the property to be used for editing. The
- property name is used by QItemDelegate when setting and
+ property name is used by QStyledItemDelegate when setting and
getting editor data.
Note that the \a valuePropertyName is only used if the editor
@@ -508,11 +508,11 @@ QItemEditorCreatorBase::~QItemEditorCreatorBase()
\snippet code/src_gui_itemviews_qitemeditorfactory.cpp 2
Setting the \c editorFactory created above in an item delegate via
- QItemDelegate::setItemEditorFactory() makes sure that all values of type
+ QStyledItemDelegate::setItemEditorFactory() makes sure that all values of type
QVariant::DateTime will be edited in \c{MyFancyDateTimeEdit}.
The editor must provide a user property that will contain the
- editing data. The property is used by \l{QItemDelegate}s to set
+ editing data. The property is used by \l{QStyledItemDelegate}s to set
and retrieve the data (using Qt's \l{Meta-Object
System}{meta-object system}). You set the user property with
the USER keyword:
@@ -520,7 +520,7 @@ QItemEditorCreatorBase::~QItemEditorCreatorBase()
\snippet code/src_gui_itemviews_qitemeditorfactory.cpp 3
\sa QItemEditorCreatorBase, QItemEditorCreator,
- QItemEditorFactory, QItemDelegate, {Color Editor Factory Example}
+ QItemEditorFactory, QStyledItemDelegate, {Color Editor Factory Example}
*/
/*!
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
index 1248e91c8c..143b243091 100644
--- a/src/widgets/itemviews/qlistview.cpp
+++ b/src/widgets/itemviews/qlistview.cpp
@@ -2237,8 +2237,8 @@ int QListModeViewBase::verticalScrollToValue(int index, QListView::ScrollHint hi
} else {
int scrollBarValue = verticalScrollBar()->value();
int numHidden = 0;
- for (int i = 0; i < flowPositions.count() - 1 && i <= scrollBarValue; ++i)
- if (isHidden(i))
+ for (const auto &idx : qAsConst(dd->hiddenRows))
+ if (idx.row() <= scrollBarValue)
++numHidden;
value = qBound(0, scrollValueMap.at(verticalScrollBar()->value()) - numHidden, flowPositions.count() - 1);
}
@@ -2678,21 +2678,24 @@ int QListModeViewBase::perItemScrollToValue(int index, int scrollValue, int view
return scrollValue;
itemExtent += spacing();
- QVector<int> visibleFlowPositions;
- visibleFlowPositions.reserve(flowPositions.count() - 1);
- for (int i = 0; i < flowPositions.count() - 1; i++) { // flowPositions count is +1 larger than actual row count
- if (!isHidden(i))
- visibleFlowPositions.append(flowPositions.at(i));
- }
-
+ QVector<int> hiddenRows = dd->hiddenRowIds();
+ std::sort(hiddenRows.begin(), hiddenRows.end());
+ int hiddenRowsBefore = 0;
+ for (int i = 0; i < hiddenRows.size() - 1; ++i)
+ if (hiddenRows.at(i) > index + hiddenRowsBefore)
+ break;
+ else
+ ++hiddenRowsBefore;
if (!wrap) {
int topIndex = index;
const int bottomIndex = topIndex;
- const int bottomCoordinate = visibleFlowPositions.at(index);
-
+ const int bottomCoordinate = flowPositions.at(index + hiddenRowsBefore);
while (topIndex > 0 &&
- (bottomCoordinate - visibleFlowPositions.at(topIndex - 1) + itemExtent) <= (viewportSize)) {
+ (bottomCoordinate - flowPositions.at(topIndex + hiddenRowsBefore - 1) + itemExtent) <= (viewportSize)) {
topIndex--;
+ // will the next one be a hidden row -> skip
+ while (hiddenRowsBefore > 0 && hiddenRows.at(hiddenRowsBefore - 1) >= topIndex + hiddenRowsBefore - 1)
+ hiddenRowsBefore--;
}
const int itemCount = bottomIndex - topIndex + 1;
@@ -2711,7 +2714,7 @@ int QListModeViewBase::perItemScrollToValue(int index, int scrollValue, int view
? Qt::Horizontal : Qt::Vertical);
if (flowOrientation == orientation) { // scrolling in the "flow" direction
// ### wrapped scrolling in the flow direction
- return visibleFlowPositions.at(index); // ### always pixel based for now
+ return flowPositions.at(index + hiddenRowsBefore); // ### always pixel based for now
} else if (!segmentStartRows.isEmpty()) { // we are scrolling in the "segment" direction
int segment = qBinarySearch<int>(segmentStartRows, index, 0, segmentStartRows.count() - 1);
int leftSegment = segment;
@@ -3345,9 +3348,9 @@ int QListView::visualIndex(const QModelIndex &index) const
d->executePostedLayout();
QListViewItem itm = d->indexToListViewItem(index);
int visualIndex = d->commonListView->itemIndex(itm);
- for (int row = 0; row <= index.row() && visualIndex >= 0; row++) {
- if (d->isHidden(row))
- visualIndex--;
+ for (const auto &idx : qAsConst(d->hiddenRows)) {
+ if (idx.row() <= index.row())
+ --visualIndex;
}
return visualIndex;
}
diff --git a/src/widgets/itemviews/qlistview_p.h b/src/widgets/itemviews/qlistview_p.h
index 181386d4d0..3f997ef7e3 100644
--- a/src/widgets/itemviews/qlistview_p.h
+++ b/src/widgets/itemviews/qlistview_p.h
@@ -377,6 +377,14 @@ public:
QModelIndex idx = model->index(row, 0, root);
return isPersistent(idx) && hiddenRows.contains(idx);
}
+ // helper to avoid checking for isPersistent and creating persistent indexes as above in isHidden
+ QVector<int> hiddenRowIds() const {
+ QVector<int> rowIds;
+ rowIds.reserve(hiddenRows.size());
+ for (const auto &idx : hiddenRows)
+ rowIds += idx.row();
+ return rowIds;
+ }
inline bool isHiddenOrDisabled(int row) const { return isHidden(row) || !isIndexEnabled(modelIndex(row)); }
void removeCurrentAndDisabled(QVector<QModelIndex> *indexes, const QModelIndex &current) const;
diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp
index b9c0e0a4b7..a9899983c2 100644
--- a/src/widgets/itemviews/qlistwidget.cpp
+++ b/src/widgets/itemviews/qlistwidget.cpp
@@ -227,6 +227,22 @@ bool QListModel::setData(const QModelIndex &index, const QVariant &value, int ro
return true;
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+bool QListModel::clearItemData(const QModelIndex &index)
+{
+ if (!checkIndex(index, CheckIndexOption::IndexIsValid))
+ return false;
+ QListWidgetItem *item = items.at(index.row());
+ const auto beginIter = item->d->values.cbegin();
+ const auto endIter = item->d->values.cend();
+ if (std::all_of(beginIter, endIter, [](const QWidgetItemData& data) -> bool { return !data.value.isValid(); }))
+ return true; //it's already cleared
+ item->d->values.clear();
+ emit dataChanged(index, index, QVector<int>{});
+ return true;
+}
+#endif
+
QMap<int, QVariant> QListModel::itemData(const QModelIndex &index) const
{
QMap<int, QVariant> roles;
@@ -277,6 +293,30 @@ bool QListModel::removeRows(int row, int count, const QModelIndex &parent)
return true;
}
+/*!
+ \since 5.13
+ \reimp
+*/
+bool QListModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)
+{
+ if (sourceRow < 0
+ || sourceRow + count - 1 >= rowCount(sourceParent)
+ || destinationChild <= 0
+ || destinationChild > rowCount(destinationParent)
+ || sourceRow == destinationChild - 1
+ || count <= 0) {
+ return false;
+ }
+ if (!beginMoveRows(QModelIndex(), sourceRow, sourceRow + count - 1, QModelIndex(), destinationChild))
+ return false;
+ destinationChild--;
+ const int fromRow = destinationChild < sourceRow ? (sourceRow + count - 1) : sourceRow;
+ while (count--)
+ items.move(fromRow, destinationChild);
+ endMoveRows();
+ return true;
+}
+
Qt::ItemFlags QListModel::flags(const QModelIndex &index) const
{
if (!index.isValid() || index.row() >= items.count() || index.model() != this)
@@ -289,7 +329,7 @@ void QListModel::sort(int column, Qt::SortOrder order)
if (column != 0)
return;
- emit layoutAboutToBeChanged();
+ emit layoutAboutToBeChanged({}, QAbstractItemModel::VerticalSortHint);
QVector < QPair<QListWidgetItem*,int> > sorting(items.count());
for (int i = 0; i < items.count(); ++i) {
@@ -313,7 +353,7 @@ void QListModel::sort(int column, Qt::SortOrder order)
}
changePersistentIndexList(fromIndexes, toIndexes);
- emit layoutChanged();
+ emit layoutChanged({}, QAbstractItemModel::VerticalSortHint);
}
/**
@@ -543,24 +583,6 @@ Qt::DropActions QListModel::supportedDropActions() const
*/
/*!
- \fn void QListWidgetItem::setSelected(bool select)
- \since 4.2
-
- Sets the selected state of the item to \a select.
-
- \sa isSelected()
-*/
-
-/*!
- \fn bool QListWidgetItem::isSelected() const
- \since 4.2
-
- Returns \c true if the item is selected; otherwise returns \c false.
-
- \sa setSelected()
-*/
-
-/*!
\fn void QListWidgetItem::setHidden(bool hide)
\since 4.2
@@ -594,14 +616,14 @@ Qt::DropActions QListModel::supportedDropActions() const
\sa type()
*/
-QListWidgetItem::QListWidgetItem(QListWidget *view, int type)
- : rtti(type), view(view), d(new QListWidgetItemPrivate(this)),
+QListWidgetItem::QListWidgetItem(QListWidget *listview, int type)
+ : rtti(type), view(listview), d(new QListWidgetItemPrivate(this)),
itemFlags(Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
|Qt::ItemIsEnabled
|Qt::ItemIsDragEnabled)
{
- if (QListModel *model = (view ? qobject_cast<QListModel*>(view->model()) : 0))
+ if (QListModel *model = listModel())
model->insert(model->rowCount(), this);
}
@@ -621,16 +643,18 @@ QListWidgetItem::QListWidgetItem(QListWidget *view, int type)
\sa type()
*/
-QListWidgetItem::QListWidgetItem(const QString &text, QListWidget *view, int type)
- : rtti(type), view(0), d(new QListWidgetItemPrivate(this)),
+QListWidgetItem::QListWidgetItem(const QString &text, QListWidget *listview, int type)
+ : rtti(type), view(listview), d(new QListWidgetItemPrivate(this)),
itemFlags(Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
|Qt::ItemIsEnabled
|Qt::ItemIsDragEnabled)
{
- setData(Qt::DisplayRole, text);
- this->view = view;
- if (QListModel *model = (view ? qobject_cast<QListModel*>(view->model()) : 0))
+ {
+ QSignalBlocker b(view);
+ setData(Qt::DisplayRole, text);
+ }
+ if (QListModel *model = listModel())
model->insert(model->rowCount(), this);
}
@@ -652,17 +676,19 @@ QListWidgetItem::QListWidgetItem(const QString &text, QListWidget *view, int typ
\sa type()
*/
QListWidgetItem::QListWidgetItem(const QIcon &icon,const QString &text,
- QListWidget *view, int type)
- : rtti(type), view(0), d(new QListWidgetItemPrivate(this)),
+ QListWidget *listview, int type)
+ : rtti(type), view(listview), d(new QListWidgetItemPrivate(this)),
itemFlags(Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
|Qt::ItemIsEnabled
|Qt::ItemIsDragEnabled)
{
- setData(Qt::DisplayRole, text);
- setData(Qt::DecorationRole, icon);
- this->view = view;
- if (QListModel *model = (view ? qobject_cast<QListModel*>(view->model()) : 0))
+ {
+ QSignalBlocker b(view);
+ setData(Qt::DisplayRole, text);
+ setData(Qt::DecorationRole, icon);
+ }
+ if (QListModel *model = listModel())
model->insert(model->rowCount(), this);
}
@@ -671,7 +697,7 @@ QListWidgetItem::QListWidgetItem(const QIcon &icon,const QString &text,
*/
QListWidgetItem::~QListWidgetItem()
{
- if (QListModel *model = (view ? qobject_cast<QListModel*>(view->model()) : 0))
+ if (QListModel *model = listModel())
model->remove(this);
delete d;
}
@@ -708,7 +734,7 @@ void QListWidgetItem::setData(int role, const QVariant &value)
}
if (!found)
d->values.append(QWidgetItemData(role, value));
- if (QListModel *model = (view ? qobject_cast<QListModel*>(view->model()) : nullptr)) {
+ if (QListModel *model = listModel()) {
const QVector<int> roles((role == Qt::DisplayRole) ?
QVector<int>({Qt::DisplayRole, Qt::EditRole}) :
QVector<int>({role}));
@@ -775,7 +801,7 @@ void QListWidgetItem::write(QDataStream &out) const
\sa data(), flags()
*/
QListWidgetItem::QListWidgetItem(const QListWidgetItem &other)
- : rtti(Type), view(0),
+ : rtti(Type), view(nullptr),
d(new QListWidgetItemPrivate(this)),
itemFlags(other.itemFlags)
{
@@ -797,6 +823,15 @@ QListWidgetItem &QListWidgetItem::operator=(const QListWidgetItem &other)
return *this;
}
+/*!
+ \internal
+ returns the QListModel if a view is set
+ */
+QListModel *QListWidgetItem::listModel() const
+{
+ return (view ? qobject_cast<QListModel*>(view->model()) : nullptr);
+}
+
#ifndef QT_NO_DATASTREAM
/*!
@@ -949,6 +984,50 @@ QDataStream &operator>>(QDataStream &in, QListWidgetItem &item)
*/
/*!
+ \fn void QListWidgetItem::setSelected(bool select)
+ \since 4.2
+
+ Sets the selected state of the item to \a select.
+
+ \sa isSelected()
+*/
+void QListWidgetItem::setSelected(bool select)
+{
+ const QListModel *model = listModel();
+ if (!model || !view->selectionModel())
+ return;
+ const QAbstractItemView::SelectionMode selectionMode = view->selectionMode();
+ if (selectionMode == QAbstractItemView::NoSelection)
+ return;
+ const QModelIndex index = model->index(this);
+ if (selectionMode == QAbstractItemView::SingleSelection)
+ view->selectionModel()->select(index, select
+ ? QItemSelectionModel::ClearAndSelect
+ : QItemSelectionModel::Deselect);
+ else
+ view->selectionModel()->select(index, select
+ ? QItemSelectionModel::Select
+ : QItemSelectionModel::Deselect);
+}
+
+/*!
+ \fn bool QListWidgetItem::isSelected() const
+ \since 4.2
+
+ Returns \c true if the item is selected; otherwise returns \c false.
+
+ \sa setSelected()
+*/
+bool QListWidgetItem::isSelected() const
+{
+ const QListModel *model = listModel();
+ if (!model || !view->selectionModel())
+ return false;
+ const QModelIndex index = model->index(this);
+ return view->selectionModel()->isSelected(index);
+}
+
+/*!
\fn void QListWidgetItem::setFlags(Qt::ItemFlags flags)
Sets the item flags for the list item to \a flags.
@@ -958,7 +1037,7 @@ QDataStream &operator>>(QDataStream &in, QListWidgetItem &item)
void QListWidgetItem::setFlags(Qt::ItemFlags aflags)
{
itemFlags = aflags;
- if (QListModel *model = (view ? qobject_cast<QListModel*>(view->model()) : 0))
+ if (QListModel *model = listModel())
model->itemChanged(this);
}
@@ -1678,7 +1757,7 @@ QWidget *QListWidget::itemWidget(QListWidgetItem *item) const
This function should only be used to display static content in the place of
a list widget item. If you want to display custom dynamic content or
- implement a custom editor widget, use QListView and subclass QItemDelegate
+ implement a custom editor widget, use QListView and subclass QStyledItemDelegate
instead.
\sa itemWidget(), removeItemWidget(), {Delegate Classes}
@@ -1690,6 +1769,7 @@ void QListWidget::setItemWidget(QListWidgetItem *item, QWidget *widget)
QAbstractItemView::setIndexWidget(index, widget);
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
Returns \c true if \a item is selected; otherwise returns \c false.
@@ -1699,9 +1779,7 @@ void QListWidget::setItemWidget(QListWidgetItem *item, QWidget *widget)
*/
bool QListWidget::isItemSelected(const QListWidgetItem *item) const
{
- Q_D(const QListWidget);
- QModelIndex index = d->listModel()->index(const_cast<QListWidgetItem*>(item));
- return selectionModel()->isSelected(index);
+ return ((item && item->listWidget() == this) ? item->isSelected() : false);
}
/*!
@@ -1714,20 +1792,10 @@ bool QListWidget::isItemSelected(const QListWidgetItem *item) const
*/
void QListWidget::setItemSelected(const QListWidgetItem *item, bool select)
{
- Q_D(QListWidget);
- QModelIndex index = d->listModel()->index(const_cast<QListWidgetItem*>(item));
-
- if (d->selectionMode == SingleSelection) {
- selectionModel()->select(index, select
- ? QItemSelectionModel::ClearAndSelect
- : QItemSelectionModel::Deselect);
- } else if (d->selectionMode != NoSelection) {
- selectionModel()->select(index, select
- ? QItemSelectionModel::Select
- : QItemSelectionModel::Deselect);
- }
-
+ if (item && item->listWidget() == this)
+ const_cast<QListWidgetItem*>(item)->setSelected(select);
}
+#endif
/*!
Returns a list of all selected items in the list widget.
@@ -1763,6 +1831,7 @@ QList<QListWidgetItem*> QListWidget::findItems(const QString &text, Qt::MatchFla
return items;
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
Returns \c true if the \a item is explicitly hidden; otherwise returns \c false.
@@ -1786,6 +1855,7 @@ void QListWidget::setItemHidden(const QListWidgetItem *item, bool hide)
{
setRowHidden(row(item), hide);
}
+#endif
/*!
Scrolls the view if necessary to ensure that the \a item is visible.
diff --git a/src/widgets/itemviews/qlistwidget.h b/src/widgets/itemviews/qlistwidget.h
index 947fdb1a2f..c093d13e6d 100644
--- a/src/widgets/itemviews/qlistwidget.h
+++ b/src/widgets/itemviews/qlistwidget.h
@@ -61,10 +61,10 @@ class Q_WIDGETS_EXPORT QListWidgetItem
friend class QListWidget;
public:
enum ItemType { Type = 0, UserType = 1000 };
- explicit QListWidgetItem(QListWidget *view = nullptr, int type = Type);
- explicit QListWidgetItem(const QString &text, QListWidget *view = nullptr, int type = Type);
+ explicit QListWidgetItem(QListWidget *listview = nullptr, int type = Type);
+ explicit QListWidgetItem(const QString &text, QListWidget *listview = nullptr, int type = Type);
explicit QListWidgetItem(const QIcon &icon, const QString &text,
- QListWidget *view = nullptr, int type = Type);
+ QListWidget *listview = nullptr, int type = Type);
QListWidgetItem(const QListWidgetItem &other);
virtual ~QListWidgetItem();
@@ -72,8 +72,8 @@ public:
inline QListWidget *listWidget() const { return view; }
- inline void setSelected(bool select);
- inline bool isSelected() const;
+ void setSelected(bool select);
+ bool isSelected() const;
inline void setHidden(bool hide);
inline bool isHidden() const;
@@ -114,20 +114,28 @@ public:
inline void setTextAlignment(int alignment)
{ setData(Qt::TextAlignmentRole, alignment); }
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use QListWidgetItem::background() instead")
inline QColor backgroundColor() const
- { return qvariant_cast<QColor>(data(Qt::BackgroundColorRole)); }
+ { return qvariant_cast<QColor>(data(Qt::BackgroundRole)); }
+ QT_DEPRECATED_X ("Use QListWidgetItem::setBackground() instead")
virtual void setBackgroundColor(const QColor &color)
- { setData(Qt::BackgroundColorRole, color); }
+ { setData(Qt::BackgroundRole, color); }
+#endif
inline QBrush background() const
{ return qvariant_cast<QBrush>(data(Qt::BackgroundRole)); }
inline void setBackground(const QBrush &brush)
{ setData(Qt::BackgroundRole, brush); }
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use QListWidgetItem::foreground() instead")
inline QColor textColor() const
- { return qvariant_cast<QColor>(data(Qt::TextColorRole)); }
+ { return qvariant_cast<QColor>(data(Qt::ForegroundRole)); }
+ QT_DEPRECATED_X ("Use QListWidgetItem::setForeground() instead")
inline void setTextColor(const QColor &color)
- { setData(Qt::TextColorRole, color); }
+ { setData(Qt::ForegroundRole, color); }
+#endif
inline QBrush foreground() const
{ return qvariant_cast<QBrush>(data(Qt::ForegroundRole)); }
@@ -158,6 +166,7 @@ public:
inline int type() const { return rtti; }
private:
+ QListModel *listModel() const;
int rtti;
QVector<void *> dummy;
QListWidget *view;
@@ -246,13 +255,21 @@ public:
void setItemWidget(QListWidgetItem *item, QWidget *widget);
inline void removeItemWidget(QListWidgetItem *item);
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use QListWidgetItem::isSelected() instead")
bool isItemSelected(const QListWidgetItem *item) const;
+ QT_DEPRECATED_X ("Use QListWidgetItem::setSelected() instead")
void setItemSelected(const QListWidgetItem *item, bool select);
+#endif
QList<QListWidgetItem*> selectedItems() const;
QList<QListWidgetItem*> findItems(const QString &text, Qt::MatchFlags flags) const;
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use QListWidgetItem::isHidden() instead")
bool isItemHidden(const QListWidgetItem *item) const;
+ QT_DEPRECATED_X ("Use QListWidgetItem::setHidden() instead")
void setItemHidden(const QListWidgetItem *item, bool hide);
+#endif
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
protected:
#endif
@@ -331,17 +348,11 @@ inline void QListWidget::addItem(QListWidgetItem *aitem)
inline QListWidgetItem *QListWidget::itemAt(int ax, int ay) const
{ return itemAt(QPoint(ax, ay)); }
-inline void QListWidgetItem::setSelected(bool aselect)
-{ if (view) view->setItemSelected(this, aselect); }
-
-inline bool QListWidgetItem::isSelected() const
-{ return (view ? view->isItemSelected(this) : false); }
-
inline void QListWidgetItem::setHidden(bool ahide)
-{ if (view) view->setItemHidden(this, ahide); }
+{ if (view) view->setRowHidden(view->row(this), ahide); }
inline bool QListWidgetItem::isHidden() const
-{ return (view ? view->isItemHidden(this) : false); }
+{ return (view ? view->isRowHidden(view->row(this)) : false); }
QT_END_NAMESPACE
diff --git a/src/widgets/itemviews/qlistwidget_p.h b/src/widgets/itemviews/qlistwidget_p.h
index 9cb3d5966b..65a7124322 100644
--- a/src/widgets/itemviews/qlistwidget_p.h
+++ b/src/widgets/itemviews/qlistwidget_p.h
@@ -100,11 +100,15 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ bool clearItemData(const QModelIndex &index) override;
+#endif
QMap<int, QVariant> itemData(const QModelIndex &index) const override;
bool insertRows(int row, int count = 1, const QModelIndex &parent = QModelIndex()) override;
bool removeRows(int row, int count = 1, const QModelIndex &parent = QModelIndex()) override;
+ bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp
index 0f7566e8ec..22067851cb 100644
--- a/src/widgets/itemviews/qstyleditemdelegate.cpp
+++ b/src/widgets/itemviews/qstyleditemdelegate.cpp
@@ -139,7 +139,7 @@ public:
\row \li \l Qt::AccessibleDescriptionRole \li QString
\row \li \l Qt::AccessibleTextRole \li QString
\endomit
- \row \li \l Qt::BackgroundRole \li QBrush
+ \row \li \l Qt::BackgroundRole \li QBrush (\since 4.2)
\row \li \l Qt::BackgroundColorRole \li QColor (obsolete; use Qt::BackgroundRole instead)
\row \li \l Qt::CheckStateRole \li Qt::CheckState
\row \li \l Qt::DecorationRole \li QIcon, QPixmap, QImage and QColor
@@ -151,7 +151,7 @@ public:
\row \li \l Qt::StatusTipRole \li
\endomit
\row \li \l Qt::TextAlignmentRole \li Qt::Alignment
- \row \li \l Qt::ForegroundRole \li QBrush
+ \row \li \l Qt::ForegroundRole \li QBrush (\since 4.2)
\row \li \l Qt::TextColorRole \li QColor (obsolete; use Qt::ForegroundRole instead)
\omit
\row \li \l Qt::ToolTipRole
diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp
index 9c509583e6..a7d144672c 100644
--- a/src/widgets/itemviews/qtableview.cpp
+++ b/src/widgets/itemviews/qtableview.cpp
@@ -964,6 +964,15 @@ void QTableViewPrivate::_q_updateSpanRemovedColumns(const QModelIndex &parent, i
/*!
\internal
+ Sort the model when the header sort indicator changed
+*/
+void QTableViewPrivate::_q_sortIndicatorChanged(int column, Qt::SortOrder order)
+{
+ model->sort(column, order);
+}
+
+/*!
+ \internal
Draws a table cell.
*/
void QTableViewPrivate::drawCell(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index)
@@ -1099,7 +1108,7 @@ int QTableViewPrivate::heightHintForIndex(const QModelIndex &index, int hint, QS
\l showGrid property.
The items shown in a table view, like those in the other item views, are
- rendered and edited using standard \l{QItemDelegate}{delegates}. However,
+ rendered and edited using standard \l{QStyledItemDelegate}{delegates}. However,
for some tasks it is sometimes useful to be able to insert widgets in a
table instead. Widgets are set for particular indexes with the
\l{QAbstractItemView::}{setIndexWidget()} function, and
@@ -1171,8 +1180,6 @@ QSize QTableView::viewportSizeHint() const
Q_D(const QTableView);
QSize result( (d->verticalHeader->isHidden() ? 0 : d->verticalHeader->width()) + d->horizontalHeader->length(),
(d->horizontalHeader->isHidden() ? 0 : d->horizontalHeader->height()) + d->verticalHeader->length());
- result += QSize(verticalScrollBar()->isVisible() ? verticalScrollBar()->width() : 0,
- horizontalScrollBar()->isVisible() ? horizontalScrollBar()->height() : 0);
return result;
}
@@ -1443,12 +1450,12 @@ void QTableView::paintEvent(QPaintEvent *event)
//firstVisualRow is the visual index of the first visible row. lastVisualRow is the visual index of the last visible Row.
//same goes for ...VisualColumn
int firstVisualRow = qMax(verticalHeader->visualIndexAt(0),0);
- int lastVisualRow = verticalHeader->visualIndexAt(verticalHeader->viewport()->height());
+ int lastVisualRow = verticalHeader->visualIndexAt(verticalHeader->height());
if (lastVisualRow == -1)
lastVisualRow = d->model->rowCount(d->root) - 1;
int firstVisualColumn = horizontalHeader->visualIndexAt(0);
- int lastVisualColumn = horizontalHeader->visualIndexAt(horizontalHeader->viewport()->width());
+ int lastVisualColumn = horizontalHeader->visualIndexAt(horizontalHeader->width());
if (rightToLeft)
qSwap(firstVisualColumn, lastVisualColumn);
if (firstVisualColumn == -1)
@@ -2634,25 +2641,27 @@ void QTableView::setColumnHidden(int column, bool hide)
void QTableView::setSortingEnabled(bool enable)
{
Q_D(QTableView);
- d->sortingEnabled = enable;
horizontalHeader()->setSortIndicatorShown(enable);
if (enable) {
disconnect(d->horizontalHeader, SIGNAL(sectionEntered(int)),
this, SLOT(_q_selectColumn(int)));
disconnect(horizontalHeader(), SIGNAL(sectionPressed(int)),
this, SLOT(selectColumn(int)));
- connect(horizontalHeader(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)),
- this, SLOT(sortByColumn(int)), Qt::UniqueConnection);
+ //sortByColumn has to be called before we connect or set the sortingEnabled flag
+ // because otherwise it will not call sort on the model.
sortByColumn(horizontalHeader()->sortIndicatorSection(),
horizontalHeader()->sortIndicatorOrder());
+ connect(horizontalHeader(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)),
+ this, SLOT(_q_sortIndicatorChanged(int,Qt::SortOrder)), Qt::UniqueConnection);
} else {
connect(d->horizontalHeader, SIGNAL(sectionEntered(int)),
this, SLOT(_q_selectColumn(int)), Qt::UniqueConnection);
connect(horizontalHeader(), SIGNAL(sectionPressed(int)),
this, SLOT(selectColumn(int)), Qt::UniqueConnection);
disconnect(horizontalHeader(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)),
- this, SLOT(sortByColumn(int)));
+ this, SLOT(_q_sortIndicatorChanged(int,Qt::SortOrder)));
}
+ d->sortingEnabled = enable;
}
bool QTableView::isSortingEnabled() const
@@ -3181,19 +3190,21 @@ void QTableView::resizeColumnsToContents()
d->horizontalHeader->resizeSections(QHeaderView::ResizeToContents);
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
\overload
+ This function is deprecated. Use
+ sortByColumn(int column, Qt::SortOrder order) instead.
Sorts the model by the values in the given \a column.
*/
void QTableView::sortByColumn(int column)
{
Q_D(QTableView);
- if (column == -1)
- return;
- d->model->sort(column, d->horizontalHeader->sortIndicatorOrder());
+ sortByColumn(column, d->horizontalHeader->sortIndicatorOrder());
}
+#endif
/*!
\since 4.2
@@ -3205,8 +3216,14 @@ void QTableView::sortByColumn(int column)
void QTableView::sortByColumn(int column, Qt::SortOrder order)
{
Q_D(QTableView);
+ if (column < 0)
+ return;
+ // If sorting is enabled it will emit a signal connected to
+ // _q_sortIndicatorChanged, which then actually sorts
d->horizontalHeader->setSortIndicator(column, order);
- sortByColumn(column);
+ // If sorting is not enabled, force to sort now
+ if (!d->sortingEnabled)
+ d->model->sort(column, order);
}
/*!
diff --git a/src/widgets/itemviews/qtableview.h b/src/widgets/itemviews/qtableview.h
index 60c2f34103..3275c09f88 100644
--- a/src/widgets/itemviews/qtableview.h
+++ b/src/widgets/itemviews/qtableview.h
@@ -118,7 +118,6 @@ public:
int columnSpan(int row, int column) const;
void clearSpans();
- void sortByColumn(int column, Qt::SortOrder order);
public Q_SLOTS:
void selectRow(int row);
@@ -131,7 +130,11 @@ public Q_SLOTS:
void resizeRowsToContents();
void resizeColumnToContents(int column);
void resizeColumnsToContents();
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use QTableView::sortByColumn(int column, Qt::SortOrder order) instead")
void sortByColumn(int column);
+#endif
+ void sortByColumn(int column, Qt::SortOrder order);
void setShowGrid(bool show);
protected Q_SLOTS:
@@ -188,6 +191,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_updateSpanInsertedColumns(QModelIndex,int,int))
Q_PRIVATE_SLOT(d_func(), void _q_updateSpanRemovedRows(QModelIndex,int,int))
Q_PRIVATE_SLOT(d_func(), void _q_updateSpanRemovedColumns(QModelIndex,int,int))
+ Q_PRIVATE_SLOT(d_func(), void _q_sortIndicatorChanged(int column, Qt::SortOrder order))
};
QT_END_NAMESPACE
diff --git a/src/widgets/itemviews/qtableview_p.h b/src/widgets/itemviews/qtableview_p.h
index a50e6b6410..d55462c28b 100644
--- a/src/widgets/itemviews/qtableview_p.h
+++ b/src/widgets/itemviews/qtableview_p.h
@@ -257,6 +257,7 @@ public:
void _q_updateSpanInsertedColumns(const QModelIndex &parent, int start, int end);
void _q_updateSpanRemovedRows(const QModelIndex &parent, int start, int end);
void _q_updateSpanRemovedColumns(const QModelIndex &parent, int start, int end);
+ void _q_sortIndicatorChanged(int column, Qt::SortOrder order);
};
QT_END_NAMESPACE
diff --git a/src/widgets/itemviews/qtablewidget.cpp b/src/widgets/itemviews/qtablewidget.cpp
index eee3e91ac3..f99d69d37c 100644
--- a/src/widgets/itemviews/qtablewidget.cpp
+++ b/src/widgets/itemviews/qtablewidget.cpp
@@ -189,7 +189,7 @@ void QTableModel::setItem(int row, int column, QTableWidgetItem *item)
sortedRow = qMax((int)(it - colItems.begin()), 0);
}
if (sortedRow != row) {
- emit layoutAboutToBeChanged();
+ emit layoutAboutToBeChanged({}, QAbstractItemModel::VerticalSortHint);
// move the items @ row to sortedRow
int cc = columnCount();
QVector<QTableWidgetItem*> rowItems(cc);
@@ -209,7 +209,7 @@ void QTableModel::setItem(int row, int column, QTableWidgetItem *item)
changePersistentIndexList(oldPersistentIndexes,
newPersistentIndexes);
- emit layoutChanged();
+ emit layoutChanged({}, QAbstractItemModel::VerticalSortHint);
return;
}
}
@@ -480,6 +480,24 @@ bool QTableModel::setItemData(const QModelIndex &index, const QMap<int, QVariant
return true;
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+bool QTableModel::clearItemData(const QModelIndex &index)
+{
+ if (!checkIndex(index, CheckIndexOption::IndexIsValid))
+ return false;
+ QTableWidgetItem *itm = item(index);
+ if (!itm)
+ return false;
+ const auto beginIter = itm->values.cbegin();
+ const auto endIter = itm->values.cend();
+ if (std::all_of(beginIter, endIter, [](const QWidgetItemData& data) -> bool { return !data.value.isValid(); }))
+ return true; //it's already cleared
+ itm->values.clear();
+ emit dataChanged(index, index, QVector<int>{});
+ return true;
+}
+#endif
+
Qt::ItemFlags QTableModel::flags(const QModelIndex &index) const
{
if (!index.isValid())
@@ -530,12 +548,12 @@ void QTableModel::sort(int column, Qt::SortOrder order)
}
}
- emit layoutAboutToBeChanged();
+ emit layoutAboutToBeChanged({}, QAbstractItemModel::VerticalSortHint);
tableItems = sorted_table;
changePersistentIndexList(from, to); // ### slow
- emit layoutChanged();
+ emit layoutChanged({}, QAbstractItemModel::VerticalSortHint);
}
/*
@@ -580,7 +598,7 @@ void QTableModel::ensureSorted(int column, Qt::SortOrder order,
vit = colItems.insert(vit, item);
if (newRow != oldRow) {
if (!changed) {
- emit layoutAboutToBeChanged();
+ emit layoutAboutToBeChanged({}, QAbstractItemModel::VerticalSortHint);
oldPersistentIndexes = persistentIndexList();
newPersistentIndexes = oldPersistentIndexes;
changed = true;
@@ -615,7 +633,7 @@ void QTableModel::ensureSorted(int column, Qt::SortOrder order,
verticalHeaderItems = newVertical;
changePersistentIndexList(oldPersistentIndexes,
newPersistentIndexes);
- emit layoutChanged();
+ emit layoutChanged({}, QAbstractItemModel::VerticalSortHint);
}
}
@@ -1037,24 +1055,6 @@ QTableWidgetSelectionRange::~QTableWidgetSelectionRange()
*/
/*!
- \fn void QTableWidgetItem::setSelected(bool select)
- \since 4.2
-
- Sets the selected state of the item to \a select.
-
- \sa isSelected()
-*/
-
-/*!
- \fn bool QTableWidgetItem::isSelected() const
- \since 4.2
-
- Returns \c true if the item is selected, otherwise returns \c false.
-
- \sa setSelected()
-*/
-
-/*!
\fn QSize QTableWidgetItem::sizeHint() const
\since 4.1
@@ -1091,6 +1091,44 @@ QTableWidgetSelectionRange::~QTableWidgetSelectionRange()
*/
/*!
+ \fn bool QTableWidgetItem::isSelected() const
+ \since 4.2
+
+ Returns \c true if the item is selected, otherwise returns \c false.
+
+ \sa setSelected()
+*/
+bool QTableWidgetItem::isSelected() const
+{
+ if (!view || !view->selectionModel())
+ return false;
+ const QTableModel *model = qobject_cast<const QTableModel*>(view->model());
+ if (!model)
+ return false;
+ const QModelIndex index = model->index(this);
+ return view->selectionModel()->isSelected(index);
+}
+
+/*!
+ \fn void QTableWidgetItem::setSelected(bool select)
+ \since 4.2
+
+ Sets the selected state of the item to \a select.
+
+ \sa isSelected()
+*/
+void QTableWidgetItem::setSelected(bool select)
+{
+ if (!view || !view->selectionModel())
+ return;
+ const QTableModel *model = qobject_cast<const QTableModel*>(view->model());
+ if (!model)
+ return;
+ const QModelIndex index = model->index(this);
+ view->selectionModel()->select(index, select ? QItemSelectionModel::Select : QItemSelectionModel::Deselect);
+}
+
+/*!
\fn Qt::ItemFlags QTableWidgetItem::flags() const
Returns the flags used to describe the item. These determine whether
@@ -1110,7 +1148,7 @@ QTableWidgetSelectionRange::~QTableWidgetSelectionRange()
void QTableWidgetItem::setFlags(Qt::ItemFlags aflags)
{
itemFlags = aflags;
- if (QTableModel *model = (view ? qobject_cast<QTableModel*>(view->model()) : 0))
+ if (QTableModel *model = tableModel())
model->itemChanged(this);
}
@@ -1301,7 +1339,7 @@ void QTableWidgetItem::setFlags(Qt::ItemFlags aflags)
\sa type()
*/
QTableWidgetItem::QTableWidgetItem(int type)
- : rtti(type), view(0), d(new QTableWidgetItemPrivate(this)),
+ : rtti(type), view(nullptr), d(new QTableWidgetItemPrivate(this)),
itemFlags(Qt::ItemIsEditable
|Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
@@ -1317,7 +1355,7 @@ QTableWidgetItem::QTableWidgetItem(int type)
\sa type()
*/
QTableWidgetItem::QTableWidgetItem(const QString &text, int type)
- : rtti(type), view(0), d(new QTableWidgetItemPrivate(this)),
+ : rtti(type), view(nullptr), d(new QTableWidgetItemPrivate(this)),
itemFlags(Qt::ItemIsEditable
|Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
@@ -1334,7 +1372,7 @@ QTableWidgetItem::QTableWidgetItem(const QString &text, int type)
\sa type()
*/
QTableWidgetItem::QTableWidgetItem(const QIcon &icon, const QString &text, int type)
- : rtti(type), view(0), d(new QTableWidgetItemPrivate(this)),
+ : rtti(type), view(nullptr), d(new QTableWidgetItemPrivate(this)),
itemFlags(Qt::ItemIsEditable
|Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
@@ -1351,9 +1389,8 @@ QTableWidgetItem::QTableWidgetItem(const QIcon &icon, const QString &text, int t
*/
QTableWidgetItem::~QTableWidgetItem()
{
- if (QTableModel *model = (view ? qobject_cast<QTableModel*>(view->model()) : 0))
+ if (QTableModel *model = tableModel())
model->removeItem(this);
- view = 0;
delete d;
}
@@ -1389,7 +1426,7 @@ void QTableWidgetItem::setData(int role, const QVariant &value)
}
if (!found)
values.append(QWidgetItemData(role, value));
- if (QTableModel *model = (view ? qobject_cast<QTableModel*>(view->model()) : nullptr))
+ if (QTableModel *model = tableModel())
{
const QVector<int> roles((role == Qt::DisplayRole) ?
QVector<int>({Qt::DisplayRole, Qt::EditRole}) :
@@ -1444,6 +1481,16 @@ void QTableWidgetItem::write(QDataStream &out) const
}
/*!
+ \internal
+ returns the QTableModel if a view is set
+*/
+QTableModel *QTableWidgetItem::tableModel() const
+{
+ return (view ? qobject_cast<QTableModel*>(view->model()) : nullptr);
+}
+
+
+/*!
\relates QTableWidgetItem
Reads a table widget item from stream \a in into \a item.
@@ -1486,7 +1533,7 @@ QDataStream &operator<<(QDataStream &out, const QTableWidgetItem &item)
\sa data(), flags()
*/
QTableWidgetItem::QTableWidgetItem(const QTableWidgetItem &other)
- : rtti(Type), values(other.values), view(0),
+ : rtti(Type), values(other.values), view(nullptr),
d(new QTableWidgetItemPrivate(this)),
itemFlags(other.itemFlags)
{
@@ -2305,6 +2352,7 @@ void QTableWidget::setCellWidget(int row, int column, QWidget *widget)
QAbstractItemView::setIndexWidget(index, widget);
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
Returns \c true if the \a item is selected, otherwise returns \c false.
@@ -2315,9 +2363,7 @@ void QTableWidget::setCellWidget(int row, int column, QWidget *widget)
bool QTableWidget::isItemSelected(const QTableWidgetItem *item) const
{
- Q_D(const QTableWidget);
- QModelIndex index = d->tableModel()->index(item);
- return selectionModel()->isSelected(index);
+ return ((item && item->tableWidget() == this) ? item->isSelected() : false);
}
/*!
@@ -2329,10 +2375,10 @@ bool QTableWidget::isItemSelected(const QTableWidgetItem *item) const
*/
void QTableWidget::setItemSelected(const QTableWidgetItem *item, bool select)
{
- Q_D(QTableWidget);
- QModelIndex index = d->tableModel()->index(item);
- selectionModel()->select(index, select ? QItemSelectionModel::Select : QItemSelectionModel::Deselect);
+ if (item && item->tableWidget() == this)
+ const_cast<QTableWidgetItem*>(item)->setSelected(select);
}
+#endif
/*!
Selects or deselects the \a range depending on \a select.
diff --git a/src/widgets/itemviews/qtablewidget.h b/src/widgets/itemviews/qtablewidget.h
index 9de27d164f..d93032f3f0 100644
--- a/src/widgets/itemviews/qtablewidget.h
+++ b/src/widgets/itemviews/qtablewidget.h
@@ -92,8 +92,8 @@ public:
inline int row() const;
inline int column() const;
- inline void setSelected(bool select);
- inline bool isSelected() const;
+ void setSelected(bool select);
+ bool isSelected() const;
inline Qt::ItemFlags flags() const { return itemFlags; }
void setFlags(Qt::ItemFlags flags);
@@ -131,20 +131,28 @@ public:
inline void setTextAlignment(int alignment)
{ setData(Qt::TextAlignmentRole, alignment); }
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use QTableWidgetItem::background() instead")
inline QColor backgroundColor() const
- { return qvariant_cast<QColor>(data(Qt::BackgroundColorRole)); }
+ { return qvariant_cast<QColor>(data(Qt::BackgroundRole)); }
+ QT_DEPRECATED_X ("Use QTableWidgetItem::setBackground() instead")
inline void setBackgroundColor(const QColor &color)
- { setData(Qt::BackgroundColorRole, color); }
+ { setData(Qt::BackgroundRole, color); }
+#endif
inline QBrush background() const
{ return qvariant_cast<QBrush>(data(Qt::BackgroundRole)); }
inline void setBackground(const QBrush &brush)
{ setData(Qt::BackgroundRole, brush); }
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use QTableWidgetItem::foreground() instead")
inline QColor textColor() const
- { return qvariant_cast<QColor>(data(Qt::TextColorRole)); }
+ { return qvariant_cast<QColor>(data(Qt::ForegroundRole)); }
+ QT_DEPRECATED_X ("Use QTableWidgetItem::setForeground() instead")
inline void setTextColor(const QColor &color)
- { setData(Qt::TextColorRole, color); }
+ { setData(Qt::ForegroundRole, color); }
+#endif
inline QBrush foreground() const
{ return qvariant_cast<QBrush>(data(Qt::ForegroundRole)); }
@@ -175,6 +183,9 @@ public:
inline int type() const { return rtti; }
private:
+ QTableModel *tableModel() const;
+
+private:
int rtti;
QVector<QWidgetItemData> values;
QTableWidget *view;
@@ -268,8 +279,12 @@ public:
void setCellWidget(int row, int column, QWidget *widget);
inline void removeCellWidget(int row, int column);
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use QTableWidgetItem::isSelected() instead")
bool isItemSelected(const QTableWidgetItem *item) const;
+ QT_DEPRECATED_X ("Use QTableWidgetItem::setSelected() instead")
void setItemSelected(const QTableWidgetItem *item, bool select);
+#endif
void setRangeSelected(const QTableWidgetSelectionRange &range, bool select);
QList<QTableWidgetSelectionRange> selectedRanges() const;
@@ -375,12 +390,6 @@ inline int QTableWidgetItem::row() const
inline int QTableWidgetItem::column() const
{ return (view ? view->column(this) : -1); }
-inline void QTableWidgetItem::setSelected(bool aselect)
-{ if (view) view->setItemSelected(this, aselect); }
-
-inline bool QTableWidgetItem::isSelected() const
-{ return (view ? view->isItemSelected(this) : false); }
-
QT_END_NAMESPACE
#endif // QTABLEWIDGET_H
diff --git a/src/widgets/itemviews/qtablewidget_p.h b/src/widgets/itemviews/qtablewidget_p.h
index 9899272fce..d88326f129 100644
--- a/src/widgets/itemviews/qtablewidget_p.h
+++ b/src/widgets/itemviews/qtablewidget_p.h
@@ -129,6 +129,9 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles) override;
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ bool clearItemData(const QModelIndex &index) override;
+#endif
QMap<int, QVariant> itemData(const QModelIndex &index) const override;
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index f3647f656a..3fad6ca3df 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -1089,15 +1089,8 @@ void QTreeView::keyboardSearch(const QString &search)
if (start.column() > 0)
index = index.sibling(index.row(), start.column());
- if (index.isValid()) {
- QItemSelectionModel::SelectionFlags flags = (d->selectionMode == SingleSelection
- ? QItemSelectionModel::SelectionFlags(
- QItemSelectionModel::ClearAndSelect
- |d->selectionBehaviorFlags())
- : QItemSelectionModel::SelectionFlags(
- QItemSelectionModel::NoUpdate));
- selectionModel()->setCurrentIndex(index, flags);
- }
+ if (index.isValid())
+ setCurrentIndex(index);
}
/*!
@@ -1773,7 +1766,7 @@ void QTreeView::drawRow(QPainter *painter, const QStyleOptionViewItem &option,
QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled)
? QPalette::Normal : QPalette::Disabled;
o.backgroundColor = option.palette.color(cg, d->selectionModel->isSelected(index)
- ? QPalette::Highlight : QPalette::Background);
+ ? QPalette::Highlight : QPalette::Window);
int x = 0;
if (!option.showDecorationSelected)
x = header->sectionPosition(0) + d->indentationForItem(d->current);
@@ -1992,21 +1985,7 @@ void QTreeView::keyPressEvent(QKeyEvent *event)
if (d->isIndexValid(current) && d->model && d->itemsExpandable) {
switch (event->key()) {
case Qt::Key_Asterisk: {
- // do layouting only once after expanding is done
- d->doDelayedItemsLayout();
- QStack<QModelIndex> parents;
- parents.push(current);
- while (!parents.isEmpty()) {
- QModelIndex parent = parents.pop();
- for (int row = 0; row < d->model->rowCount(parent); ++row) {
- QModelIndex child = d->model->index(row, 0, parent);
- if (!d->isIndexValid(child))
- break;
- parents.push(child);
- expand(child);
- }
- }
- expand(current);
+ expandRecursively(current);
break; }
case Qt::Key_Plus:
expand(current);
@@ -2160,12 +2139,10 @@ int QTreeView::verticalOffset() const
// ### find a faster way to do this
d->executePostedLayout();
int offset = 0;
- for (int i = 0; i < d->viewItems.count(); ++i) {
- if (i == verticalScrollBar()->value())
- return offset;
+ const int cnt = std::min(d->viewItems.count(), verticalScrollBar()->value());
+ for (int i = 0; i < cnt; ++i)
offset += d->itemHeight(i);
- }
- return 0;
+ return offset;
}
// scroll per pixel
return verticalScrollBar()->value();
@@ -2324,9 +2301,9 @@ QModelIndex QTreeView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie
case MovePageDown:
return d->modelIndex(d->pageDown(vi), current.column());
case MoveHome:
- return d->model->index(0, current.column(), d->root);
+ return d->modelIndex(d->itemForKeyHome(), current.column());
case MoveEnd:
- return d->modelIndex(d->viewItems.count() - 1, current.column());
+ return d->modelIndex(d->itemForKeyEnd(), current.column());
}
return current;
}
@@ -2621,10 +2598,13 @@ void QTreeView::resizeColumnToContents(int column)
d->header->resizeSection(column, qMax(contents, header));
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
\overload
+ This function is deprecated. Use
+ sortByColumn(int column, Qt::SortOrder order) instead.
Sorts the model by the values in the given \a column.
*/
void QTreeView::sortByColumn(int column)
@@ -2632,6 +2612,7 @@ void QTreeView::sortByColumn(int column)
Q_D(QTreeView);
sortByColumn(column, d->header->sortIndicatorOrder());
}
+#endif
/*!
\since 4.2
@@ -2647,10 +2628,12 @@ void QTreeView::sortByColumn(int column)
void QTreeView::sortByColumn(int column, Qt::SortOrder order)
{
Q_D(QTreeView);
-
- //If sorting is enabled will emit a signal connected to _q_sortIndicatorChanged, which then actually sorts
+ if (column < 0)
+ return;
+ // If sorting is enabled it will emit a signal connected to
+ // _q_sortIndicatorChanged, which then actually sorts
d->header->setSortIndicator(column, order);
- //If sorting is not enabled, force to sort now.
+ // If sorting is not enabled, force to sort now
if (!d->sortingEnabled)
d->model->sort(column, order);
}
@@ -2694,11 +2677,7 @@ QSize QTreeView::viewportSizeHint() const
QSize result = QSize(d->header->length(), deepestRect.bottom() + 1);
// add size for header
- result += QSize(0, d->header->isVisible() ? d->header->height() : 0);
-
- // add size for scrollbars
- result += QSize(verticalScrollBar()->isVisible() ? verticalScrollBar()->width() : 0,
- horizontalScrollBar()->isVisible() ? horizontalScrollBar()->height() : 0);
+ result += QSize(0, d->header->isHidden() ? 0 : d->header->height());
return result;
}
@@ -2707,7 +2686,7 @@ QSize QTreeView::viewportSizeHint() const
\since 4.2
Expands all expandable items.
- Warning: if the model contains a large number of items,
+ \warning: if the model contains a large number of items,
this function will take some time to execute.
\sa collapseAll(), expand(), collapse(), setExpanded()
@@ -2723,6 +2702,50 @@ void QTreeView::expandAll()
}
/*!
+ \since 5.13
+ Expands the item at the given \a index and all its children to the
+ given \a depth. The \a depth is relative to the given \a index.
+ A \a depth of -1 will expand all children, a \a depth of 0 will
+ only expand the given \a index.
+
+ \warning: if the model contains a large number of items,
+ this function will take some time to execute.
+
+ \sa expandAll()
+*/
+void QTreeView::expandRecursively(const QModelIndex &index, int depth)
+{
+ Q_D(QTreeView);
+
+ if (depth < -1)
+ return;
+ // do layouting only once after expanding is done
+ d->doDelayedItemsLayout();
+ expand(index);
+ if (depth == 0)
+ return;
+ QStack<QPair<QModelIndex, int>> parents;
+ parents.push({index, 0});
+ while (!parents.isEmpty()) {
+ const QPair<QModelIndex, int> elem = parents.pop();
+ const QModelIndex &parent = elem.first;
+ const int curDepth = elem.second;
+ const int rowCount = d->model->rowCount(parent);
+ for (int row = 0; row < rowCount; ++row) {
+ const QModelIndex child = d->model->index(row, 0, parent);
+ if (!d->isIndexValid(child))
+ break;
+ if (depth == -1 || curDepth + 1 < depth)
+ parents.push({child, curDepth + 1});
+ if (d->isIndexExpanded(child))
+ continue;
+ if (d->storeExpanded(child))
+ emit expanded(child);
+ }
+ }
+}
+
+/*!
\since 4.2
Collapses all expanded items.
@@ -3399,7 +3422,11 @@ int QTreeViewPrivate::pageUp(int i) const
int index = itemAtCoordinate(coordinateForItem(i) - viewport->height());
while (isItemHiddenOrDisabled(index))
index--;
- return index == -1 ? 0 : index;
+ if (index == -1)
+ index = 0;
+ while (isItemHiddenOrDisabled(index))
+ index++;
+ return index >= viewItems.count() ? 0 : index;
}
int QTreeViewPrivate::pageDown(int i) const
@@ -3407,6 +3434,26 @@ int QTreeViewPrivate::pageDown(int i) const
int index = itemAtCoordinate(coordinateForItem(i) + viewport->height());
while (isItemHiddenOrDisabled(index))
index++;
+ if (index == -1 || index >= viewItems.count())
+ index = viewItems.count() - 1;
+ while (isItemHiddenOrDisabled(index))
+ index--;
+ return index == -1 ? viewItems.count() - 1 : index;
+}
+
+int QTreeViewPrivate::itemForKeyHome() const
+{
+ int index = 0;
+ while (isItemHiddenOrDisabled(index))
+ index++;
+ return index >= viewItems.count() ? 0 : index;
+}
+
+int QTreeViewPrivate::itemForKeyEnd() const
+{
+ int index = viewItems.count() - 1;
+ while (isItemHiddenOrDisabled(index))
+ index--;
return index == -1 ? viewItems.count() - 1 : index;
}
diff --git a/src/widgets/itemviews/qtreeview.h b/src/widgets/itemviews/qtreeview.h
index 33dbf1c1ce..e9cc1beedb 100644
--- a/src/widgets/itemviews/qtreeview.h
+++ b/src/widgets/itemviews/qtreeview.h
@@ -143,7 +143,6 @@ public:
void doItemsLayout() override;
void reset() override;
- void sortByColumn(int column, Qt::SortOrder order);
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int>()) override;
void selectAll() override;
@@ -158,8 +157,13 @@ public Q_SLOTS:
void expand(const QModelIndex &index);
void collapse(const QModelIndex &index);
void resizeColumnToContents(int column);
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use QTreeeView::sortByColumn(int column, Qt::SortOrder order) instead")
void sortByColumn(int column);
+#endif
+ void sortByColumn(int column, Qt::SortOrder order);
void expandAll();
+ void expandRecursively(const QModelIndex &index, int depth = -1);
void collapseAll();
void expandToDepth(int depth);
diff --git a/src/widgets/itemviews/qtreeview_p.h b/src/widgets/itemviews/qtreeview_p.h
index 0a0e7aae87..9666a9f8c2 100644
--- a/src/widgets/itemviews/qtreeview_p.h
+++ b/src/widgets/itemviews/qtreeview_p.h
@@ -140,6 +140,8 @@ public:
int pageUp(int item) const;
int pageDown(int item) const;
+ int itemForKeyHome() const;
+ int itemForKeyEnd() const;
int itemHeight(int item) const;
int indentationForItem(int item) const;
diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp
index 9fbfb50029..6050bcd616 100644
--- a/src/widgets/itemviews/qtreewidget.cpp
+++ b/src/widgets/itemviews/qtreewidget.cpp
@@ -390,6 +390,27 @@ bool QTreeModel::setData(const QModelIndex &index, const QVariant &value, int ro
return false;
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+bool QTreeModel::clearItemData(const QModelIndex &index)
+{
+ if (!checkIndex(index, CheckIndexOption::IndexIsValid))
+ return false;
+ QTreeWidgetItem *itm = item(index);
+ if (!itm)
+ return false;
+ const auto beginIter = itm->values.at(index.column()).cbegin();
+ const auto endIter = itm->values.at(index.column()).cend();
+ if (std::all_of(beginIter, endIter, [](const QWidgetItemData& data) -> bool { return !data.value.isValid(); })
+ && !itm->d->display.at(index.column()).isValid()) {
+ return true; //it's already cleared
+ }
+ itm->d->display[index.column()] = QVariant();
+ itm->values[index.column()].clear();
+ emit dataChanged(index, index, QVector<int>{});
+ return true;
+}
+#endif
+
QMap<int, QVariant> QTreeModel::itemData(const QModelIndex &index) const
{
QMap<int, QVariant> roles;
@@ -635,7 +656,7 @@ void QTreeModel::ensureSorted(int column, Qt::SortOrder order,
// we are going to change the persistent indexes, so we need to prepare
if (!changed) { // this will only happen once
changed = true;
- emit layoutAboutToBeChanged(); // the selection model needs to know
+ emit layoutAboutToBeChanged({parent}, QAbstractItemModel::VerticalSortHint); // the selection model needs to know
oldPersistentIndexes = persistentIndexList();
newPersistentIndexes = oldPersistentIndexes;
}
@@ -668,7 +689,7 @@ void QTreeModel::ensureSorted(int column, Qt::SortOrder order,
if (changed) {
itm->children = lst;
changePersistentIndexList(oldPersistentIndexes, newPersistentIndexes);
- emit layoutChanged();
+ emit layoutChanged({parent}, QAbstractItemModel::VerticalSortHint);
}
}
@@ -988,8 +1009,18 @@ void QTreeModel::timerEvent(QTimerEvent *ev)
Sets the selected state of the item to \a select.
\sa isSelected()
-
*/
+void QTreeWidgetItem::setSelected(bool select)
+{
+ const QTreeModel *model = treeModel();
+ if (!model || !view->selectionModel())
+ return;
+ const QModelIndex index = model->index(this, 0);
+ view->selectionModel()->select(index, (select ? QItemSelectionModel::Select
+ : QItemSelectionModel::Deselect)
+ | QItemSelectionModel::Rows);
+ d->selected = select;
+}
/*!
\fn bool QTreeWidgetItem::isSelected() const
@@ -999,6 +1030,10 @@ void QTreeModel::timerEvent(QTimerEvent *ev)
\sa setSelected()
*/
+bool QTreeWidgetItem::isSelected() const
+{
+ return d->selected;
+}
/*!
\fn void QTreeWidgetItem::setHidden(bool hide)
@@ -1012,12 +1047,18 @@ void QTreeModel::timerEvent(QTimerEvent *ev)
\sa isHidden()
*/
-void QTreeWidgetItem::setHidden(bool ahide)
+void QTreeWidgetItem::setHidden(bool hide)
{
- if (view) {
- view->setItemHidden(this, ahide);
- d->hidden = ahide;
+ const QTreeModel *model = treeModel();
+ if (!model)
+ return;
+ if (this == model->headerItem) {
+ view->header()->setHidden(hide);
+ } else {
+ const QModelIndex index = view->d_func()->index(this);
+ view->setRowHidden(index.row(), index.parent(), hide);
}
+ d->hidden = hide;
}
/*!
@@ -1031,7 +1072,15 @@ void QTreeWidgetItem::setHidden(bool ahide)
bool QTreeWidgetItem::isHidden() const
{
- return (view ? d->hidden : false);
+ const QTreeModel *model = treeModel();
+ if (!model)
+ return false;
+ if (this == model->headerItem)
+ return view->header()->isHidden();
+ if (view->d_func()->hiddenIndexes.isEmpty())
+ return false;
+ QTreeModel::SkipSorting skipSorting(model);
+ return view->d_func()->isRowHidden(view->d_func()->index(this));
}
/*!
@@ -1043,6 +1092,14 @@ bool QTreeWidgetItem::isHidden() const
\sa isExpanded()
*/
+void QTreeWidgetItem::setExpanded(bool expand)
+{
+ const QTreeModel *model = treeModel();
+ if (!model)
+ return;
+ QTreeModel::SkipSorting skipSorting(model);
+ view->setExpanded(view->d_func()->index(this), expand);
+}
/*!
\fn bool QTreeWidgetItem::isExpanded() const
@@ -1052,6 +1109,14 @@ bool QTreeWidgetItem::isHidden() const
\sa setExpanded()
*/
+bool QTreeWidgetItem::isExpanded() const
+{
+ const QTreeModel *model = treeModel();
+ if (!model)
+ return false;
+ QTreeModel::SkipSorting skipSorting(model);
+ return view->isExpanded(view->d_func()->index(this));
+}
/*!
\fn void QTreeWidgetItem::setFirstColumnSpanned(bool span)
@@ -1062,6 +1127,14 @@ bool QTreeWidgetItem::isHidden() const
\sa isFirstColumnSpanned()
*/
+void QTreeWidgetItem::setFirstColumnSpanned(bool span)
+{
+ const QTreeModel *model = treeModel();
+ if (!model || this == model->headerItem)
+ return; // We can't set the header items to spanning
+ const QModelIndex index = model->index(this, 0);
+ view->setFirstColumnSpanned(index.row(), index.parent(), span);
+}
/*!
\fn bool QTreeWidgetItem::isFirstColumnSpanned() const
@@ -1071,6 +1144,14 @@ bool QTreeWidgetItem::isHidden() const
\sa setFirstColumnSpanned()
*/
+bool QTreeWidgetItem::isFirstColumnSpanned() const
+{
+ const QTreeModel *model = treeModel();
+ if (!model || this == model->headerItem)
+ return false;
+ const QModelIndex index = model->index(this, 0);
+ return view->isFirstColumnSpanned(index.row(), index.parent());
+}
/*!
\fn QString QTreeWidgetItem::text(int column) const
@@ -1325,7 +1406,7 @@ bool QTreeWidgetItem::isHidden() const
\sa type()
*/
QTreeWidgetItem::QTreeWidgetItem(int type)
- : rtti(type), view(0), d(new QTreeWidgetItemPrivate(this)), par(0),
+ : rtti(type), view(nullptr), d(new QTreeWidgetItemPrivate(this)), par(nullptr),
itemFlags(Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
|Qt::ItemIsEnabled
@@ -1344,7 +1425,7 @@ QTreeWidgetItem::QTreeWidgetItem(int type)
\sa type()
*/
QTreeWidgetItem::QTreeWidgetItem(const QStringList &strings, int type)
- : rtti(type), view(0), d(new QTreeWidgetItemPrivate(this)), par(0),
+ : rtti(type), view(nullptr), d(new QTreeWidgetItemPrivate(this)), par(nullptr),
itemFlags(Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
|Qt::ItemIsEnabled
@@ -1364,16 +1445,16 @@ QTreeWidgetItem::QTreeWidgetItem(const QStringList &strings, int type)
\sa type()
*/
-QTreeWidgetItem::QTreeWidgetItem(QTreeWidget *view, int type)
- : rtti(type), view(0), d(new QTreeWidgetItemPrivate(this)), par(0),
+QTreeWidgetItem::QTreeWidgetItem(QTreeWidget *treeview, int type)
+ : rtti(type), view(nullptr), d(new QTreeWidgetItemPrivate(this)), par(nullptr),
itemFlags(Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
|Qt::ItemIsEnabled
|Qt::ItemIsDragEnabled
|Qt::ItemIsDropEnabled)
{
- if (view && view->model()) {
- QTreeModel *model = qobject_cast<QTreeModel*>(view->model());
+ // do not set this->view here otherwise insertChild() will fail
+ if (QTreeModel *model = treeModel(treeview)) {
model->rootItem->addChild(this);
values.reserve(model->headerItem->columnCount());
}
@@ -1389,8 +1470,8 @@ QTreeWidgetItem::QTreeWidgetItem(QTreeWidget *view, int type)
\sa type()
*/
-QTreeWidgetItem::QTreeWidgetItem(QTreeWidget *view, const QStringList &strings, int type)
- : rtti(type), view(0), d(new QTreeWidgetItemPrivate(this)), par(0),
+QTreeWidgetItem::QTreeWidgetItem(QTreeWidget *treeview, const QStringList &strings, int type)
+ : rtti(type), view(nullptr), d(new QTreeWidgetItemPrivate(this)), par(nullptr),
itemFlags(Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
|Qt::ItemIsEnabled
@@ -1399,8 +1480,8 @@ QTreeWidgetItem::QTreeWidgetItem(QTreeWidget *view, const QStringList &strings,
{
for (int i = 0; i < strings.count(); ++i)
setText(i, strings.at(i));
- if (view && view->model()) {
- QTreeModel *model = qobject_cast<QTreeModel*>(view->model());
+ // do not set this->view here otherwise insertChild() will fail
+ if (QTreeModel *model = treeModel(treeview)) {
model->rootItem->addChild(this);
values.reserve(model->headerItem->columnCount());
}
@@ -1414,21 +1495,19 @@ QTreeWidgetItem::QTreeWidgetItem(QTreeWidget *view, const QStringList &strings,
\sa type()
*/
-QTreeWidgetItem::QTreeWidgetItem(QTreeWidget *view, QTreeWidgetItem *after, int type)
- : rtti(type), view(0), d(new QTreeWidgetItemPrivate(this)), par(0),
+QTreeWidgetItem::QTreeWidgetItem(QTreeWidget *treeview, QTreeWidgetItem *after, int type)
+ : rtti(type), view(nullptr), d(new QTreeWidgetItemPrivate(this)), par(nullptr),
itemFlags(Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
|Qt::ItemIsEnabled
|Qt::ItemIsDragEnabled
|Qt::ItemIsDropEnabled)
{
- if (view) {
- QTreeModel *model = qobject_cast<QTreeModel*>(view->model());
- if (model) {
- int i = model->rootItem->children.indexOf(after) + 1;
- model->rootItem->insertChild(i, this);
- values.reserve(model->headerItem->columnCount());
- }
+ // do not set this->view here otherwise insertChild() will fail
+ if (QTreeModel *model = treeModel(treeview)) {
+ int i = model->rootItem->children.indexOf(after) + 1;
+ model->rootItem->insertChild(i, this);
+ values.reserve(model->headerItem->columnCount());
}
}
@@ -1438,7 +1517,7 @@ QTreeWidgetItem::QTreeWidgetItem(QTreeWidget *view, QTreeWidgetItem *after, int
\sa type()
*/
QTreeWidgetItem::QTreeWidgetItem(QTreeWidgetItem *parent, int type)
- : rtti(type), view(0), d(new QTreeWidgetItemPrivate(this)), par(0),
+ : rtti(type), view(nullptr), d(new QTreeWidgetItemPrivate(this)), par(nullptr),
itemFlags(Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
|Qt::ItemIsEnabled
@@ -1456,7 +1535,7 @@ QTreeWidgetItem::QTreeWidgetItem(QTreeWidgetItem *parent, int type)
\sa type()
*/
QTreeWidgetItem::QTreeWidgetItem(QTreeWidgetItem *parent, const QStringList &strings, int type)
- : rtti(type), view(0), d(new QTreeWidgetItemPrivate(this)), par(0),
+ : rtti(type), view(nullptr), d(new QTreeWidgetItemPrivate(this)), par(nullptr),
itemFlags(Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
|Qt::ItemIsEnabled
@@ -1478,7 +1557,7 @@ QTreeWidgetItem::QTreeWidgetItem(QTreeWidgetItem *parent, const QStringList &str
\sa type()
*/
QTreeWidgetItem::QTreeWidgetItem(QTreeWidgetItem *parent, QTreeWidgetItem *after, int type)
- : rtti(type), view(0), d(new QTreeWidgetItemPrivate(this)), par(0),
+ : rtti(type), view(nullptr), d(new QTreeWidgetItemPrivate(this)), par(nullptr),
itemFlags(Qt::ItemIsSelectable
|Qt::ItemIsUserCheckable
|Qt::ItemIsEnabled
@@ -1501,7 +1580,7 @@ QTreeWidgetItem::QTreeWidgetItem(QTreeWidgetItem *parent, QTreeWidgetItem *after
QTreeWidgetItem::~QTreeWidgetItem()
{
- QTreeModel *model = (view ? qobject_cast<QTreeModel*>(view->model()) : 0);
+ QTreeModel *model = treeModel();
bool wasSkipSort = false;
if (model) {
wasSkipSort = model->skipPendingSort;
@@ -1663,16 +1742,17 @@ void QTreeWidgetItem::setFlags(Qt::ItemFlags flags)
void QTreeWidgetItemPrivate::updateHiddenStatus(QTreeWidgetItem *item, bool inserting)
{
- QTreeModel *model = (item->view ? qobject_cast<QTreeModel*>(item->view->model()) : 0);
+ QTreeModel *model = item->treeModel();
if (!model)
return;
QStack<QTreeWidgetItem *> parents;
parents.push(item);
while (!parents.isEmpty()) {
QTreeWidgetItem *parent = parents.pop();
- QModelIndex index = model->index(parent, 0);
- if (parent->d->hidden)
+ if (parent->d->hidden) {
+ const QModelIndex index = model->index(parent, 0);
item->view->setRowHidden(index.row(), index.parent(), inserting);
+ }
for (int i = 0; i < parent->children.count(); ++i) {
QTreeWidgetItem *child = parent->children.at(i);
parents.push(child);
@@ -1737,7 +1817,7 @@ void QTreeWidgetItem::setData(int column, int role, const QVariant &value)
if (column < 0)
return;
- QTreeModel *model = (view ? qobject_cast<QTreeModel*>(view->model()) : 0);
+ QTreeModel *model = treeModel();
switch (role) {
case Qt::EditRole:
case Qt::DisplayRole: {
@@ -1945,7 +2025,7 @@ void QTreeWidgetItem::insertChild(int index, QTreeWidgetItem *child)
if (index < 0 || index > children.count() || child == 0 || child->view != 0 || child->par != 0)
return;
- if (QTreeModel *model = (view ? qobject_cast<QTreeModel*>(view->model()) : 0)) {
+ if (QTreeModel *model = treeModel()) {
const bool wasSkipSort = model->skipPendingSort;
model->skipPendingSort = true;
if (model->rootItem == this)
@@ -1996,7 +2076,7 @@ QTreeWidgetItem *QTreeWidgetItem::takeChild(int index)
{
// we move this outside the check of the index to allow executing
// pending sorts from inline functions, using this function (hack)
- QTreeModel *model = (view ? qobject_cast<QTreeModel*>(view->model()) : 0);
+ QTreeModel *model = treeModel();
if (model) {
// This will trigger a layoutChanged signal, thus we might want to optimize
// this function by not emitting the rowsRemoved signal etc to the view.
@@ -2054,7 +2134,7 @@ void QTreeWidgetItem::insertChildren(int index, const QList<QTreeWidgetItem*> &c
insertChild(index, children.at(n));
return;
}
- QTreeModel *model = (view ? qobject_cast<QTreeModel*>(view->model()) : 0);
+ QTreeModel *model = treeModel();
QStack<QTreeWidgetItem*> stack;
QList<QTreeWidgetItem*> itemsToInsert;
for (int n = 0; n < children.count(); ++n) {
@@ -2101,7 +2181,7 @@ QList<QTreeWidgetItem*> QTreeWidgetItem::takeChildren()
{
QList<QTreeWidgetItem*> removed;
if (children.count() > 0) {
- QTreeModel *model = (view ? qobject_cast<QTreeModel*>(view->model()) : 0);
+ QTreeModel *model = treeModel();
if (model) {
// This will trigger a layoutChanged signal, thus we might want to optimize
// this function by not emitting the rowsRemoved signal etc to the view.
@@ -2133,7 +2213,7 @@ QList<QTreeWidgetItem*> QTreeWidgetItem::takeChildren()
void QTreeWidgetItemPrivate::sortChildren(int column, Qt::SortOrder order, bool climb)
{
- QTreeModel *model = (q->view ? qobject_cast<QTreeModel*>(q->view->model()) : 0);
+ QTreeModel *model = q->treeModel();
if (!model)
return;
model->sortItems(&q->children, column, order);
@@ -2156,7 +2236,7 @@ void QTreeWidgetItemPrivate::sortChildren(int column, Qt::SortOrder order, bool
*/
void QTreeWidgetItem::sortChildren(int column, Qt::SortOrder order, bool climb)
{
- QTreeModel *model = (view ? qobject_cast<QTreeModel*>(view->model()) : 0);
+ QTreeModel *model = treeModel();
if (!model)
return;
if (model->isChanging())
@@ -2164,9 +2244,9 @@ void QTreeWidgetItem::sortChildren(int column, Qt::SortOrder order, bool climb)
QTreeModel::SkipSorting skipSorting(model);
int oldSortColumn = view->d_func()->explicitSortColumn;
view->d_func()->explicitSortColumn = column;
- emit model->layoutAboutToBeChanged();
+ emit model->layoutAboutToBeChanged({}, QAbstractItemModel::VerticalSortHint);
d->sortChildren(column, order, climb);
- emit model->layoutChanged();
+ emit model->layoutChanged({}, QAbstractItemModel::VerticalSortHint);
view->d_func()->explicitSortColumn = oldSortColumn;
}
@@ -2236,7 +2316,7 @@ void QTreeWidgetItem::emitDataChanged()
*/
void QTreeWidgetItem::itemChanged()
{
- if (QTreeModel *model = (view ? qobject_cast<QTreeModel*>(view->model()) : 0))
+ if (QTreeModel *model = treeModel())
model->itemChanged(this);
}
@@ -2245,10 +2325,21 @@ void QTreeWidgetItem::itemChanged()
*/
void QTreeWidgetItem::executePendingSort() const
{
- if (QTreeModel *model = (view ? qobject_cast<QTreeModel*>(view->model()) : 0))
+ if (QTreeModel *model = treeModel())
model->executePendingSort();
}
+/*!
+ \internal
+ returns the QTreeModel if a view is set
+*/
+QTreeModel *QTreeWidgetItem::treeModel(QTreeWidget *v) const
+{
+ if (!v)
+ v = view;
+ return (v ? qobject_cast<QTreeModel*>(v->model()) : nullptr);
+}
+
#ifndef QT_NO_DATASTREAM
/*!
@@ -3010,7 +3101,7 @@ QWidget *QTreeWidget::itemWidget(QTreeWidgetItem *item, int column) const
This function should only be used to display static content in the place of
a tree widget item. If you want to display custom dynamic content or
- implement a custom editor widget, use QTreeView and subclass QItemDelegate
+ implement a custom editor widget, use QTreeView and subclass QStyledItemDelegate
instead.
This function cannot be called before the item hierarchy has been set up,
@@ -3027,6 +3118,7 @@ void QTreeWidget::setItemWidget(QTreeWidgetItem *item, int column, QWidget *widg
QAbstractItemView::setIndexWidget(d->index(item, column), widget);
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
Returns \c true if the \a item is selected; otherwise returns \c false.
@@ -3038,9 +3130,7 @@ void QTreeWidget::setItemWidget(QTreeWidgetItem *item, int column, QWidget *widg
*/
bool QTreeWidget::isItemSelected(const QTreeWidgetItem *item) const
{
- if (!item)
- return false;
- return item->d->selected;
+ return ((item && item->treeWidget() == this) ? item->isSelected() : false);
}
/*!
@@ -3055,16 +3145,10 @@ bool QTreeWidget::isItemSelected(const QTreeWidgetItem *item) const
*/
void QTreeWidget::setItemSelected(const QTreeWidgetItem *item, bool select)
{
- Q_D(QTreeWidget);
-
- if (!item)
- return;
-
- selectionModel()->select(d->index(item), (select ? QItemSelectionModel::Select
- : QItemSelectionModel::Deselect)
- |QItemSelectionModel::Rows);
- item->d->selected = select;
+ if (item && item->treeWidget() == this)
+ const_cast<QTreeWidgetItem*>(item)->setSelected(select);
}
+#endif
/*!
Returns a list of all selected non-hidden items.
@@ -3081,7 +3165,7 @@ QList<QTreeWidgetItem*> QTreeWidget::selectedItems() const
seen.reserve(indexes.count());
for (const auto &index : indexes) {
QTreeWidgetItem *item = d->item(index);
- if (isItemHidden(item) || seen.contains(item))
+ if (item->isHidden() || seen.contains(item))
continue;
seen.insert(item);
items.append(item);
@@ -3105,6 +3189,7 @@ QList<QTreeWidgetItem*> QTreeWidget::findItems(const QString &text, Qt::MatchFla
return items;
}
+#if QT_DEPRECATED_SINCE(5, 13)
/*!
Returns \c true if the \a item is explicitly hidden, otherwise returns \c false.
@@ -3114,13 +3199,7 @@ QList<QTreeWidgetItem*> QTreeWidget::findItems(const QString &text, Qt::MatchFla
*/
bool QTreeWidget::isItemHidden(const QTreeWidgetItem *item) const
{
- Q_D(const QTreeWidget);
- if (item == d->treeModel()->headerItem)
- return header()->isHidden();
- if (d->hiddenIndexes.isEmpty())
- return false;
- QTreeModel::SkipSorting skipSorting(d->treeModel());
- return d->isRowHidden(d->index(item));
+ return ((item && item->treeWidget() == this) ? item->isHidden() : false);
}
/*!
@@ -3134,16 +3213,8 @@ bool QTreeWidget::isItemHidden(const QTreeWidgetItem *item) const
*/
void QTreeWidget::setItemHidden(const QTreeWidgetItem *item, bool hide)
{
- if (!item)
- return;
- Q_D(QTreeWidget);
- if (item == d->treeModel()->headerItem) {
- header()->setHidden(hide);
- } else {
- const QModelIndex index = d->index(item);
- setRowHidden(index.row(), index.parent(), hide);
- }
- item->d->hidden = hide;
+ if (item && item->treeWidget() == this)
+ const_cast<QTreeWidgetItem*>(item)->setHidden(hide);
}
/*!
@@ -3157,9 +3228,7 @@ void QTreeWidget::setItemHidden(const QTreeWidgetItem *item, bool hide)
*/
bool QTreeWidget::isItemExpanded(const QTreeWidgetItem *item) const
{
- Q_D(const QTreeWidget);
- QTreeModel::SkipSorting skipSorting(d->treeModel());
- return isExpanded(d->index(item));
+ return ((item && item->treeWidget() == this) ? item->isExpanded() : false);
}
/*!
@@ -3174,9 +3243,8 @@ bool QTreeWidget::isItemExpanded(const QTreeWidgetItem *item) const
*/
void QTreeWidget::setItemExpanded(const QTreeWidgetItem *item, bool expand)
{
- Q_D(QTreeWidget);
- QTreeModel::SkipSorting skipSorting(d->treeModel());
- setExpanded(d->index(item), expand);
+ if (item && item->treeWidget() == this)
+ const_cast<QTreeWidgetItem*>(item)->setExpanded(expand);
}
/*!
@@ -3186,14 +3254,14 @@ void QTreeWidget::setItemExpanded(const QTreeWidgetItem *item, bool expand)
otherwise returns \c false.
\sa setFirstItemColumnSpanned()
+
+ \obsolete
+
+ This function is deprecated. Use \l{QTreeWidgetItem::isFirstColumnSpanned()} instead.
*/
bool QTreeWidget::isFirstItemColumnSpanned(const QTreeWidgetItem *item) const
{
- Q_D(const QTreeWidget);
- if (item == d->treeModel()->headerItem)
- return false; // We can't set the header items to spanning
- const QModelIndex index = d->index(item);
- return isFirstColumnSpanned(index.row(), index.parent());
+ return ((item && item->treeWidget() == this) ? item->isFirstColumnSpanned() : false);
}
/*!
@@ -3203,15 +3271,17 @@ bool QTreeWidget::isFirstItemColumnSpanned(const QTreeWidgetItem *item) const
otherwise the item will show one section per column.
\sa isFirstItemColumnSpanned()
+
+ \obsolete
+
+ This function is deprecated. Use \l{QTreeWidgetItem::setFirstColumnSpanned()} instead.
*/
void QTreeWidget::setFirstItemColumnSpanned(const QTreeWidgetItem *item, bool span)
{
- Q_D(QTreeWidget);
- if (item == d->treeModel()->headerItem)
- return; // We can't set header items to spanning
- const QModelIndex index = d->index(item);
- setFirstColumnSpanned(index.row(), index.parent(), span);
+ if (item && item->treeWidget() == this)
+ const_cast<QTreeWidgetItem*>(item)->setFirstColumnSpanned(span);
}
+#endif
/*!
\since 4.3
diff --git a/src/widgets/itemviews/qtreewidget.h b/src/widgets/itemviews/qtreewidget.h
index 975f208702..bed77b336d 100644
--- a/src/widgets/itemviews/qtreewidget.h
+++ b/src/widgets/itemviews/qtreewidget.h
@@ -66,9 +66,9 @@ public:
enum ItemType { Type = 0, UserType = 1000 };
explicit QTreeWidgetItem(int type = Type);
explicit QTreeWidgetItem(const QStringList &strings, int type = Type);
- explicit QTreeWidgetItem(QTreeWidget *view, int type = Type);
- QTreeWidgetItem(QTreeWidget *view, const QStringList &strings, int type = Type);
- QTreeWidgetItem(QTreeWidget *view, QTreeWidgetItem *after, int type = Type);
+ explicit QTreeWidgetItem(QTreeWidget *treeview, int type = Type);
+ QTreeWidgetItem(QTreeWidget *treeview, const QStringList &strings, int type = Type);
+ QTreeWidgetItem(QTreeWidget *treeview, QTreeWidgetItem *after, int type = Type);
explicit QTreeWidgetItem(QTreeWidgetItem *parent, int type = Type);
QTreeWidgetItem(QTreeWidgetItem *parent, const QStringList &strings, int type = Type);
QTreeWidgetItem(QTreeWidgetItem *parent, QTreeWidgetItem *after, int type = Type);
@@ -79,17 +79,17 @@ public:
inline QTreeWidget *treeWidget() const { return view; }
- inline void setSelected(bool select);
- inline bool isSelected() const;
+ void setSelected(bool select);
+ bool isSelected() const;
void setHidden(bool hide);
bool isHidden() const;
- inline void setExpanded(bool expand);
- inline bool isExpanded() const;
+ void setExpanded(bool expand);
+ bool isExpanded() const;
- inline void setFirstColumnSpanned(bool span);
- inline bool isFirstColumnSpanned() const;
+ void setFirstColumnSpanned(bool span);
+ bool isFirstColumnSpanned() const;
inline void setDisabled(bool disabled);
inline bool isDisabled() const;
@@ -134,20 +134,28 @@ public:
inline void setTextAlignment(int column, int alignment)
{ setData(column, Qt::TextAlignmentRole, alignment); }
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use QTreeWidgetItem::background() instead")
inline QColor backgroundColor(int column) const
- { return qvariant_cast<QColor>(data(column, Qt::BackgroundColorRole)); }
+ { return qvariant_cast<QColor>(data(column, Qt::BackgroundRole)); }
+ QT_DEPRECATED_X ("Use QTreeWidgetItem::setBackground() instead")
inline void setBackgroundColor(int column, const QColor &color)
- { setData(column, Qt::BackgroundColorRole, color); }
+ { setData(column, Qt::BackgroundRole, color); }
+#endif
inline QBrush background(int column) const
{ return qvariant_cast<QBrush>(data(column, Qt::BackgroundRole)); }
inline void setBackground(int column, const QBrush &brush)
{ setData(column, Qt::BackgroundRole, brush); }
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use QTreeWidgetItem::foreground() instead")
inline QColor textColor(int column) const
- { return qvariant_cast<QColor>(data(column, Qt::TextColorRole)); }
+ { return qvariant_cast<QColor>(data(column, Qt::ForegroundRole)); }
+ QT_DEPRECATED_X ("Use QTreeWidgetItem::setForeground() instead")
inline void setTextColor(int column, const QColor &color)
- { setData(column, Qt::TextColorRole, color); }
+ { setData(column, Qt::ForegroundRole, color); }
+#endif
inline QBrush foreground(int column) const
{ return qvariant_cast<QBrush>(data(column, Qt::ForegroundRole)); }
@@ -207,6 +215,7 @@ private:
QVariant childrenCheckState(int column) const;
void itemChanged();
void executePendingSort() const;
+ QTreeModel *treeModel(QTreeWidget *v = nullptr) const;
int rtti;
// One item has a vector of column entries. Each column has a vector of (role, value) pairs.
@@ -306,20 +315,32 @@ public:
void setItemWidget(QTreeWidgetItem *item, int column, QWidget *widget);
inline void removeItemWidget(QTreeWidgetItem *item, int column);
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use QTreeWidgetItem::isSelected() instead")
bool isItemSelected(const QTreeWidgetItem *item) const;
+ QT_DEPRECATED_X ("Use QTreeWidgetItem::setSelected() instead")
void setItemSelected(const QTreeWidgetItem *item, bool select);
+#endif
QList<QTreeWidgetItem*> selectedItems() const;
QList<QTreeWidgetItem*> findItems(const QString &text, Qt::MatchFlags flags,
int column = 0) const;
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use QTreeWidgetItem::isHidden() instead")
bool isItemHidden(const QTreeWidgetItem *item) const;
+ QT_DEPRECATED_X ("Use QTreeWidgetItem::setHidden() instead")
void setItemHidden(const QTreeWidgetItem *item, bool hide);
+ QT_DEPRECATED_X ("Use QTreeWidgetItem::isExpanded() instead")
bool isItemExpanded(const QTreeWidgetItem *item) const;
+ QT_DEPRECATED_X ("Use QTreeWidgetItem::setExpanded() instead")
void setItemExpanded(const QTreeWidgetItem *item, bool expand);
+ QT_DEPRECATED_X ("Use QTreeWidgetItem::isFirstColumnSpanned() instead")
bool isFirstItemColumnSpanned(const QTreeWidgetItem *item) const;
+ QT_DEPRECATED_X ("Use QTreeWidgetItem::setFirstColumnSpanned() instead")
void setFirstItemColumnSpanned(const QTreeWidgetItem *item, bool span);
+#endif
QTreeWidgetItem *itemAbove(const QTreeWidgetItem *item) const;
QTreeWidgetItem *itemBelow(const QTreeWidgetItem *item) const;
@@ -404,24 +425,6 @@ inline QTreeWidgetItem *QTreeWidget::itemAt(int ax, int ay) const
inline void QTreeWidget::setHeaderLabel(const QString &alabel)
{ setHeaderLabels(QStringList(alabel)); }
-inline void QTreeWidgetItem::setSelected(bool aselect)
-{ if (view) view->setItemSelected(this, aselect); }
-
-inline bool QTreeWidgetItem::isSelected() const
-{ return (view ? view->isItemSelected(this) : false); }
-
-inline void QTreeWidgetItem::setExpanded(bool aexpand)
-{ if (view) view->setItemExpanded(this, aexpand); }
-
-inline bool QTreeWidgetItem::isExpanded() const
-{ return (view ? view->isItemExpanded(this) : false); }
-
-inline void QTreeWidgetItem::setFirstColumnSpanned(bool aspan)
-{ if (view) view->setFirstItemColumnSpanned(this, aspan); }
-
-inline bool QTreeWidgetItem::isFirstColumnSpanned() const
-{ return (view ? view->isFirstItemColumnSpanned(this) : false); }
-
inline void QTreeWidgetItem::setDisabled(bool disabled)
{ setFlags(disabled ? (flags() & ~Qt::ItemIsEnabled) : flags() | Qt::ItemIsEnabled); }
diff --git a/src/widgets/itemviews/qtreewidget_p.h b/src/widgets/itemviews/qtreewidget_p.h
index adc2c2c421..ee4a633468 100644
--- a/src/widgets/itemviews/qtreewidget_p.h
+++ b/src/widgets/itemviews/qtreewidget_p.h
@@ -99,7 +99,9 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
-
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ bool clearItemData(const QModelIndex &index) override;
+#endif
QMap<int, QVariant> itemData(const QModelIndex &index) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index ebab87b193..53e1d13455 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -1428,6 +1428,7 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char*
else
*QApplicationPrivate::set_pal = palette;
QCoreApplication::setAttribute(Qt::AA_SetPalette);
+ emit qGuiApp->paletteChanged(*QGuiApplicationPrivate::app_pal);
}
}
@@ -3891,6 +3892,7 @@ Qt::NavigationMode QApplication::navigationMode()
return QApplicationPrivate::navigationMode;
}
+# if QT_DEPRECATED_SINCE(5, 13)
/*!
Sets whether Qt should use focus navigation suitable for use with a
minimal keypad.
@@ -3933,6 +3935,7 @@ bool QApplication::keypadNavigationEnabled()
return QApplicationPrivate::navigationMode == Qt::NavigationModeKeypadTabOrder ||
QApplicationPrivate::navigationMode == Qt::NavigationModeKeypadDirectional;
}
+# endif
#endif
/*!
diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h
index 7a5d7ba1a9..27e743a28d 100644
--- a/src/widgets/kernel/qapplication.h
+++ b/src/widgets/kernel/qapplication.h
@@ -180,8 +180,12 @@ public:
bool notify(QObject *, QEvent *) override;
#ifdef QT_KEYPAD_NAVIGATION
- static Q_DECL_DEPRECATED void setKeypadNavigationEnabled(bool);
- static bool keypadNavigationEnabled();
+# if QT_DEPRECATED_SINCE(5, 13)
+ static QT_DEPRECATED_X ("Use QApplication::setNavigationMode() instead")
+ void setKeypadNavigationEnabled(bool);
+ static QT_DEPRECATED_X ("Use QApplication::navigationMode() instead")
+ bool keypadNavigationEnabled();
+# endif
static void setNavigationMode(Qt::NavigationMode mode);
static Qt::NavigationMode navigationMode();
#endif
diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp
index 600934b8a1..bd0ea2598a 100644
--- a/src/widgets/kernel/qformlayout.cpp
+++ b/src/widgets/kernel/qformlayout.cpp
@@ -419,13 +419,15 @@ void QFormLayoutPrivate::updateSizes()
if (label) {
maxMinLblWidth = qMax(maxMinLblWidth, label->minSize.width());
maxShLblWidth = qMax(maxShLblWidth, label->sizeHint.width());
- if (field) {
+ }
+ if (field) {
+ if (field->fullRow) {
+ maxMinIfldWidth = qMax(maxMinIfldWidth, field->minSize.width());
+ maxShIfldWidth = qMax(maxShIfldWidth, field->sizeHint.width());
+ } else {
maxMinFldWidth = qMax(maxMinFldWidth, field->minSize.width() + field->sbsHSpace);
maxShFldWidth = qMax(maxShFldWidth, field->sizeHint.width() + field->sbsHSpace);
}
- } else if (field) {
- maxMinIfldWidth = qMax(maxMinIfldWidth, field->minSize.width());
- maxShIfldWidth = qMax(maxShIfldWidth, field->sizeHint.width());
}
prevLbl = label;
@@ -2207,8 +2209,11 @@ void QFormLayoutPrivate::arrangeWidgets(const QVector<QLayoutStruct>& layouts, Q
QSize sz(qMin(label->layoutWidth, label->sizeHint.width()), height);
int x = leftOffset + rect.x() + label->layoutPos;
- if (fixedAlignment(q->labelAlignment(), layoutDirection) & Qt::AlignRight)
+ const auto fAlign = fixedAlignment(q->labelAlignment(), layoutDirection);
+ if (fAlign & Qt::AlignRight)
x += label->layoutWidth - sz.width();
+ else if (fAlign & Qt::AlignHCenter)
+ x += label->layoutWidth / 2 - sz.width() / 2;
QPoint p(x, layouts.at(label->vLayoutIndex).pos);
// ### expansion & sizepolicy stuff
diff --git a/src/widgets/kernel/qgesturemanager.cpp b/src/widgets/kernel/qgesturemanager.cpp
index c4188044cf..57d6994c88 100644
--- a/src/widgets/kernel/qgesturemanager.cpp
+++ b/src/widgets/kernel/qgesturemanager.cpp
@@ -136,7 +136,7 @@ Qt::GestureType QGestureManager::registerGestureRecognizer(QGestureRecognizer *r
++m_lastCustomGestureId;
type = Qt::GestureType(m_lastCustomGestureId);
}
- m_recognizers.insertMulti(type, recognizer);
+ m_recognizers.insert(type, recognizer);
return type;
}
@@ -522,7 +522,7 @@ bool QGestureManager::filterEvent(QWidget *receiver, QEvent *event)
for(ContextIterator it = w->d_func()->gestureContext.constBegin(),
e = w->d_func()->gestureContext.constEnd(); it != e; ++it) {
types.insert(it.key(), 0);
- contexts.insertMulti(w, it.key());
+ contexts.insert(w, it.key());
}
}
// find all gesture contexts for the widget tree
@@ -534,7 +534,7 @@ bool QGestureManager::filterEvent(QWidget *receiver, QEvent *event)
if (!(it.value() & Qt::DontStartGestureOnChildren)) {
if (!types.contains(it.key())) {
types.insert(it.key(), 0);
- contexts.insertMulti(w, it.key());
+ contexts.insert(w, it.key());
}
}
}
@@ -556,7 +556,7 @@ bool QGestureManager::filterEvent(QGraphicsObject *receiver, QEvent *event)
for(ContextIterator it = item->QGraphicsItem::d_func()->gestureContext.constBegin(),
e = item->QGraphicsItem::d_func()->gestureContext.constEnd(); it != e; ++it) {
types.insert(it.key(), 0);
- contexts.insertMulti(item, it.key());
+ contexts.insert(item, it.key());
}
}
// find all gesture contexts for the graphics object tree
@@ -569,7 +569,7 @@ bool QGestureManager::filterEvent(QGraphicsObject *receiver, QEvent *event)
if (!(it.value() & Qt::DontStartGestureOnChildren)) {
if (!types.contains(it.key())) {
types.insert(it.key(), 0);
- contexts.insertMulti(item, it.key());
+ contexts.insert(item, it.key());
}
}
}
diff --git a/src/widgets/kernel/qwhatsthis.cpp b/src/widgets/kernel/qwhatsthis.cpp
index 1fa83d3238..4a798a7490 100644
--- a/src/widgets/kernel/qwhatsthis.cpp
+++ b/src/widgets/kernel/qwhatsthis.cpp
@@ -398,10 +398,10 @@ QWhatsThisPrivate::QWhatsThisPrivate()
#ifdef QT_NO_CURSOR
Q_UNUSED(sentEvent);
#else
- QApplication::setOverrideCursor((!sentEvent || !e.isAccepted())?
+ QGuiApplication::setOverrideCursor((!sentEvent || !e.isAccepted())?
Qt::ForbiddenCursor:Qt::WhatsThisCursor);
} else {
- QApplication::setOverrideCursor(Qt::WhatsThisCursor);
+ QGuiApplication::setOverrideCursor(Qt::WhatsThisCursor);
#endif
}
#ifndef QT_NO_ACCESSIBILITY
@@ -417,7 +417,7 @@ QWhatsThisPrivate::~QWhatsThisPrivate()
action->setChecked(false);
#endif // QT_CONFIG(action)
#ifndef QT_NO_CURSOR
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
#ifndef QT_NO_ACCESSIBILITY
QAccessibleEvent event(this, QAccessible::ContextHelpEnd);
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index c66fc098a1..c0430bec23 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -2413,29 +2413,34 @@ static inline void fillRegion(QPainter *painter, const QRegion &rgn, const QBrus
}
}
-void QWidgetPrivate::paintBackground(QPainter *painter, const QRegion &rgn, int flags) const
+bool QWidgetPrivate::updateBrushOrigin(QPainter *painter, const QBrush &brush) const
{
- Q_Q(const QWidget);
-
#if QT_CONFIG(scrollarea)
- bool resetBrushOrigin = false;
- QPointF oldBrushOrigin;
+ Q_Q(const QWidget);
//If we are painting the viewport of a scrollarea, we must apply an offset to the brush in case we are drawing a texture
+ if (brush.style() == Qt::NoBrush || brush.style() == Qt::SolidPattern)
+ return false;
QAbstractScrollArea *scrollArea = qobject_cast<QAbstractScrollArea *>(parent);
if (scrollArea && scrollArea->viewport() == q) {
QObjectData *scrollPrivate = static_cast<QWidget *>(scrollArea)->d_ptr.data();
QAbstractScrollAreaPrivate *priv = static_cast<QAbstractScrollAreaPrivate *>(scrollPrivate);
- oldBrushOrigin = painter->brushOrigin();
- resetBrushOrigin = true;
painter->setBrushOrigin(-priv->contentsOffset());
-
}
#endif // QT_CONFIG(scrollarea)
+ return true;
+}
+void QWidgetPrivate::paintBackground(QPainter *painter, const QRegion &rgn, int flags) const
+{
+ Q_Q(const QWidget);
+
+ bool brushOriginSet = false;
const QBrush autoFillBrush = q->palette().brush(q->backgroundRole());
if ((flags & DrawAsRoot) && !(q->autoFillBackground() && autoFillBrush.isOpaque())) {
const QBrush bg = q->palette().brush(QPalette::Window);
+ if (!brushOriginSet)
+ brushOriginSet = updateBrushOrigin(painter, bg);
if (!(flags & DontSetCompositionMode)) {
//copy alpha straight in
QPainter::CompositionMode oldMode = painter->compositionMode();
@@ -2447,8 +2452,11 @@ void QWidgetPrivate::paintBackground(QPainter *painter, const QRegion &rgn, int
}
}
- if (q->autoFillBackground())
+ if (q->autoFillBackground()) {
+ if (!brushOriginSet)
+ brushOriginSet = updateBrushOrigin(painter, autoFillBrush);
fillRegion(painter, rgn, autoFillBrush);
+ }
if (q->testAttribute(Qt::WA_StyledBackground)) {
painter->setClipRegion(rgn);
@@ -2456,11 +2464,6 @@ void QWidgetPrivate::paintBackground(QPainter *painter, const QRegion &rgn, int
opt.initFrom(q);
q->style()->drawPrimitive(QStyle::PE_Widget, &opt, painter, q);
}
-
-#if QT_CONFIG(scrollarea)
- if (resetBrushOrigin)
- painter->setBrushOrigin(oldBrushOrigin);
-#endif // QT_CONFIG(scrollarea)
}
/*
@@ -4955,9 +4958,9 @@ void QWidget::unsetLayoutDirection()
Some underlying window implementations will reset the cursor if it
leaves a widget even if the mouse is grabbed. If you want to have
a cursor set for all widgets, even when outside the window, consider
- QApplication::setOverrideCursor().
+ QGuiApplication::setOverrideCursor().
- \sa QApplication::setOverrideCursor()
+ \sa QGuiApplication::setOverrideCursor()
*/
#ifndef QT_NO_CURSOR
diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h
index 9d5fe89c70..4e5ef5a111 100644
--- a/src/widgets/kernel/qwidget.h
+++ b/src/widgets/kernel/qwidget.h
@@ -235,7 +235,10 @@ public:
bool isEnabled() const;
bool isEnabledTo(const QWidget *) const;
+#if QT_DEPRECATED_SINCE(5, 13)
+ QT_DEPRECATED_X ("Use isEnabled() instead")
bool isEnabledToTLW() const;
+#endif
public Q_SLOTS:
void setEnabled(bool);
@@ -769,8 +772,10 @@ inline bool QWidget::isEnabled() const
inline bool QWidget::isModal() const
{ return data->window_modality != Qt::NonModal; }
+#if QT_DEPRECATED_SINCE(5, 13)
inline bool QWidget::isEnabledToTLW() const
{ return isEnabled(); }
+#endif
inline int QWidget::minimumWidth() const
{ return minimumSize().width(); }
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h
index 0d7e9e26ba..ab5dc6bfba 100644
--- a/src/widgets/kernel/qwidget_p.h
+++ b/src/widgets/kernel/qwidget_p.h
@@ -150,7 +150,7 @@ public:
}
private:
- Q_DISABLE_COPY(QWidgetBackingStoreTracker)
+ Q_DISABLE_COPY_MOVE(QWidgetBackingStoreTracker)
private:
QWidgetBackingStore* m_ptr;
@@ -402,6 +402,7 @@ public:
void setUpdatesEnabled_helper(bool );
+ bool updateBrushOrigin(QPainter *, const QBrush &brush) const;
void paintBackground(QPainter *, const QRegion &, int flags = DrawAsRoot) const;
bool isAboutToShow() const;
QRegion prepareToRender(const QRegion &region, QWidget::RenderFlags renderFlags);
diff --git a/src/widgets/kernel/qwidgetbackingstore_p.h b/src/widgets/kernel/qwidgetbackingstore_p.h
index 53ccda850a..41469a04bb 100644
--- a/src/widgets/kernel/qwidgetbackingstore_p.h
+++ b/src/widgets/kernel/qwidgetbackingstore_p.h
@@ -305,7 +305,7 @@ private:
friend class QWidget;
friend class QBackingStore;
- Q_DISABLE_COPY(QWidgetBackingStore)
+ Q_DISABLE_COPY_MOVE(QWidgetBackingStore)
};
QT_END_NAMESPACE
diff --git a/src/widgets/statemachine/qbasickeyeventtransition_p.h b/src/widgets/statemachine/qbasickeyeventtransition_p.h
index 5007b79739..7e1b978bba 100644
--- a/src/widgets/statemachine/qbasickeyeventtransition_p.h
+++ b/src/widgets/statemachine/qbasickeyeventtransition_p.h
@@ -84,7 +84,7 @@ protected:
void onTransition(QEvent *) override;
private:
- Q_DISABLE_COPY(QBasicKeyEventTransition)
+ Q_DISABLE_COPY_MOVE(QBasicKeyEventTransition)
Q_DECLARE_PRIVATE(QBasicKeyEventTransition)
};
diff --git a/src/widgets/statemachine/qbasicmouseeventtransition_p.h b/src/widgets/statemachine/qbasicmouseeventtransition_p.h
index 93d2a5ec61..132e223535 100644
--- a/src/widgets/statemachine/qbasicmouseeventtransition_p.h
+++ b/src/widgets/statemachine/qbasicmouseeventtransition_p.h
@@ -87,7 +87,7 @@ protected:
void onTransition(QEvent *) override;
private:
- Q_DISABLE_COPY(QBasicMouseEventTransition)
+ Q_DISABLE_COPY_MOVE(QBasicMouseEventTransition)
Q_DECLARE_PRIVATE(QBasicMouseEventTransition)
};
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 3d626a57fa..2bfc1acc26 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -100,6 +100,9 @@
#if QT_CONFIG(wizard)
#include <qwizard.h>
#endif
+#if QT_CONFIG(filedialog)
+#include <qsidebar_p.h>
+#endif
#include <qfileinfo.h>
#include <qdir.h>
#if QT_CONFIG(settings)
@@ -196,7 +199,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
break;
case PE_IndicatorCheckBox:
if (opt->state & State_NoChange) {
- p->setPen(opt->palette.foreground().color());
+ p->setPen(opt->palette.windowText().color());
p->fillRect(opt->rect, opt->palette.brush(QPalette::Button));
p->drawRect(opt->rect);
p->drawLine(opt->rect.topLeft(), opt->rect.bottomRight());
@@ -212,7 +215,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
p->drawArc(opt->rect, 0, 5760);
if (opt->state & (State_Sunken | State_On)) {
ir.adjust(2, 2, -2, -2);
- p->setBrush(opt->palette.foreground());
+ p->setBrush(opt->palette.windowText());
bool oldQt4CompatiblePainting = p->testRenderHint(QPainter::Qt4CompatiblePainting);
p->setRenderHint(QPainter::Qt4CompatiblePainting);
p->drawEllipse(ir);
@@ -231,7 +234,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
else
p->setPen(Qt::white);
} else {
- p->setPen(opt->palette.foreground().color());
+ p->setPen(opt->palette.windowText().color());
}
QRect focusRect = opt->rect.adjusted(1, 1, -1, -1);
p->drawRect(focusRect.adjusted(0, 0, -1, -1)); //draw pen inclusive
@@ -278,7 +281,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
qDrawShadePanel(p, frame->rect, frame->palette, frame->state & State_Sunken,
frame->lineWidth);
} else {
- qDrawPlainRect(p, frame->rect, frame->palette.foreground().color(), frame->lineWidth);
+ qDrawPlainRect(p, frame->rect, frame->palette.windowText().color(), frame->lineWidth);
}
}
break;
@@ -615,7 +618,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
}
p->setPen(QPen(tab->palette.dark(), qreal(.8)));
- p->setBrush(tab->palette.background());
+ p->setBrush(tab->palette.window());
p->setRenderHint(QPainter::Antialiasing);
p->drawPath(path);
}
@@ -1193,8 +1196,9 @@ void QCommonStylePrivate::tabLayout(const QStyleOptionTab *opt, const QWidget *w
// High-dpi icons do not need adjustment; make sure tabIconSize is not larger than iconSize
tabIconSize = QSize(qMin(tabIconSize.width(), iconSize.width()), qMin(tabIconSize.height(), iconSize.height()));
- *iconRect = QRect(tr.left(), tr.center().y() - tabIconSize.height() / 2,
- tabIconSize.width(), tabIconSize.height());
+ const int offsetX = (iconSize.width() - tabIconSize.width()) / 2;
+ *iconRect = QRect(tr.left() + offsetX, tr.center().y() - tabIconSize.height() / 2,
+ tabIconSize.width(), tabIconSize.height());
if (!verticalTabs)
*iconRect = proxyStyle->visualRect(opt->direction, opt->rect, *iconRect);
tr.setLeft(tr.left() + tabIconSize.width() + 4);
@@ -1509,7 +1513,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
QPalette pal2 = pb->palette;
// Correct the highlight color if it is the same as the background
- if (pal2.highlight() == pal2.background())
+ if (pal2.highlight() == pal2.window())
pal2.setColor(QPalette::Highlight, pb->palette.color(QPalette::Active,
QPalette::Highlight));
bool reverse = ((!vertical && (pb->direction == Qt::RightToLeft)) || vertical);
@@ -1798,14 +1802,14 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
}
}
- p->setPen(QPen(tab->palette.foreground(), 0));
+ p->setPen(QPen(tab->palette.windowText(), 0));
if (selected) {
p->setBrush(tab->palette.base());
} else {
if (widget && widget->parentWidget())
- p->setBrush(widget->parentWidget()->palette().background());
+ p->setBrush(widget->parentWidget()->palette().window());
else
- p->setBrush(tab->palette.background());
+ p->setBrush(tab->palette.window());
}
int y;
@@ -2102,7 +2106,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
const int indent = p->fontMetrics().descent();
proxy()->drawItemText(p, r.adjusted(indent + 1, 1, -indent - 1, -1),
- Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic, dwOpt->palette,
+ Qt::AlignLeft | Qt::AlignVCenter, dwOpt->palette,
dwOpt->state & State_Enabled, dwOpt->title,
QPalette::WindowText);
@@ -2129,7 +2133,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
}
break;
case CE_FocusFrame:
- p->fillRect(opt->rect, opt->palette.foreground());
+ p->fillRect(opt->rect, opt->palette.windowText());
break;
case CE_HeaderSection:
qDrawShadePanel(p, opt->rect, opt->palette,
@@ -2137,7 +2141,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
&opt->palette.brush(QPalette::Button));
break;
case CE_HeaderEmptyArea:
- p->fillRect(opt->rect, opt->palette.background());
+ p->fillRect(opt->rect, opt->palette.window());
break;
#if QT_CONFIG(combobox)
case CE_ComboBoxLabel:
@@ -3082,7 +3086,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
}
d->cachedOption = new QStyleOptionViewItem(*vopt);
}
- if (sr == SE_ViewItemCheckIndicator)
+ if (sr == SE_ItemViewItemCheckIndicator)
r = d->checkRect;
else if (sr == SE_ItemViewItemDecoration)
r = d->decorationRect;
@@ -3201,7 +3205,7 @@ void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCompl
// Since there is no subrect for tickmarks do a translation here.
p->save();
p->translate(slider->rect.x(), slider->rect.y());
- p->setPen(slider->palette.foreground().color());
+ p->setPen(slider->palette.windowText().color());
int v = slider->minimum;
while (v <= slider->maximum + 1) {
if (v == slider->maximum + 1 && interval == 1)
@@ -3647,7 +3651,7 @@ void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCompl
QPalette pal = opt->palette;
// draw notches
if (dial->subControls & QStyle::SC_DialTickmarks) {
- p->setPen(pal.foreground().color());
+ p->setPen(pal.windowText().color());
p->drawLines(QStyleHelper::calcLines(dial));
}
@@ -4304,8 +4308,10 @@ QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex
int topMargin = 0;
int topHeight = 0;
int verticalAlignment = proxy()->styleHint(SH_GroupBox_TextLabelVerticalAlignment, groupBox, widget);
- if (groupBox->text.size() || (groupBox->subControls & QStyle::SC_GroupBoxCheckBox)) {
- topHeight = groupBox->fontMetrics.height();
+ bool hasCheckBox = groupBox->subControls & QStyle::SC_GroupBoxCheckBox;
+ if (groupBox->text.size() || hasCheckBox) {
+ int checkBoxHeight = hasCheckBox ? proxy()->pixelMetric(PM_IndicatorHeight, groupBox, widget) : 0;
+ topHeight = qMax(groupBox->fontMetrics.height(), checkBoxHeight);
if (verticalAlignment & Qt::AlignVCenter)
topMargin = topHeight / 2;
else if (verticalAlignment & Qt::AlignTop)
@@ -4330,20 +4336,24 @@ QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex
case SC_GroupBoxCheckBox:
case SC_GroupBoxLabel: {
QFontMetrics fontMetrics = groupBox->fontMetrics;
- int h = fontMetrics.height();
+ int th = fontMetrics.height();
int tw = fontMetrics.size(Qt::TextShowMnemonic, groupBox->text + QLatin1Char(' ')).width();
int marg = (groupBox->features & QStyleOptionFrame::Flat) ? 0 : 8;
ret = groupBox->rect.adjusted(marg, 0, -marg, 0);
- ret.setHeight(h);
int indicatorWidth = proxy()->pixelMetric(PM_IndicatorWidth, opt, widget);
+ int indicatorHeight = proxy()->pixelMetric(PM_IndicatorHeight, opt, widget);
int indicatorSpace = proxy()->pixelMetric(PM_CheckBoxLabelSpacing, opt, widget) - 1;
bool hasCheckBox = groupBox->subControls & QStyle::SC_GroupBoxCheckBox;
- int checkBoxSize = hasCheckBox ? (indicatorWidth + indicatorSpace) : 0;
+ int checkBoxWidth = hasCheckBox ? (indicatorWidth + indicatorSpace) : 0;
+ int checkBoxHeight = hasCheckBox ? indicatorHeight : 0;
+
+ int h = qMax(th, checkBoxHeight);
+ ret.setHeight(h);
// Adjusted rect for label + indicatorWidth + indicatorSpace
QRect totalRect = alignedRect(groupBox->direction, groupBox->textAlignment,
- QSize(tw + checkBoxSize, h), ret);
+ QSize(tw + checkBoxWidth, h), ret);
// Adjust totalRect if checkbox is set
if (hasCheckBox) {
@@ -4351,15 +4361,14 @@ QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex
int left = 0;
// Adjust for check box
if (sc == SC_GroupBoxCheckBox) {
- int indicatorHeight = proxy()->pixelMetric(PM_IndicatorHeight, opt, widget);
left = ltr ? totalRect.left() : (totalRect.right() - indicatorWidth);
- int top = totalRect.top() + qMax(0, fontMetrics.height() - indicatorHeight) / 2;
+ int top = totalRect.top() + (h - checkBoxHeight) / 2;
totalRect.setRect(left, top, indicatorWidth, indicatorHeight);
// Adjust for label
} else {
- left = ltr ? (totalRect.left() + checkBoxSize - 2) : totalRect.left();
- totalRect.setRect(left, totalRect.top(),
- totalRect.width() - checkBoxSize, totalRect.height());
+ left = ltr ? (totalRect.left() + checkBoxWidth - 2) : totalRect.left();
+ int top = totalRect.top() + (h - th) / 2;
+ totalRect.setRect(left, top, totalRect.width() - checkBoxWidth, th);
}
}
ret = totalRect;
@@ -4735,9 +4744,16 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
break;
case PM_TabBarIconSize:
- case PM_ListViewIconSize:
ret = proxy()->pixelMetric(PM_SmallIconSize, opt, widget);
break;
+ case PM_ListViewIconSize:
+#if QT_CONFIG(filedialog)
+ if (qobject_cast<const QSidebar *>(widget))
+ ret = int(QStyleHelper::dpiScaled(24.));
+ else
+#endif
+ ret = proxy()->pixelMetric(PM_SmallIconSize, opt, widget);
+ break;
case PM_ButtonIconSize:
case PM_SmallIconSize:
@@ -4917,8 +4933,8 @@ QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
break;
#if QT_CONFIG(groupbox)
case CT_GroupBox:
- if (const QGroupBox *grb = static_cast<const QGroupBox *>(widget))
- sz += QSize(!grb->isFlat() ? 16 : 0, 0);
+ if (const QStyleOptionGroupBox *styleOpt = qstyleoption_cast<const QStyleOptionGroupBox *>(opt))
+ sz += QSize(styleOpt->features.testFlag(QStyleOptionFrame::Flat) ? 0 : 16, 0);
break;
#endif // QT_CONFIG(groupbox)
case CT_MdiControls:
diff --git a/src/widgets/styles/qdrawutil.cpp b/src/widgets/styles/qdrawutil.cpp
index 299dbb9f82..d30b43a679 100644
--- a/src/widgets/styles/qdrawutil.cpp
+++ b/src/widgets/styles/qdrawutil.cpp
@@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
namespace {
class PainterStateGuard {
- Q_DISABLE_COPY(PainterStateGuard)
+ Q_DISABLE_COPY_MOVE(PainterStateGuard)
public:
explicit PainterStateGuard(QPainter *p) : m_painter(p) {}
~PainterStateGuard()
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index c565932889..7c58adeb85 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -539,7 +539,7 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
{
if (option->rect.width() <= 1 || option->rect.height() <= 1)
break;
- QColor arrowColor = option->palette.foreground().color();
+ QColor arrowColor = option->palette.windowText().color();
arrowColor.setAlpha(160);
Qt::ArrowType arrow = Qt::UpArrow;
switch (elem) {
@@ -569,7 +569,7 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
case PE_IndicatorHeaderArrow:
if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
QRect r = header->rect;
- QColor arrowColor = header->palette.foreground().color();
+ QColor arrowColor = header->palette.windowText().color();
arrowColor.setAlpha(180);
QPoint offset = QPoint(0, -2);
@@ -598,24 +598,24 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
const int margin = 6;
if (option->state & State_Horizontal) {
const int offset = rect.width()/2;
- painter->setPen(QPen(option->palette.background().color().darker(110)));
+ painter->setPen(QPen(option->palette.window().color().darker(110)));
painter->drawLine(rect.bottomLeft().x() + offset,
rect.bottomLeft().y() - margin,
rect.topLeft().x() + offset,
rect.topLeft().y() + margin);
- painter->setPen(QPen(option->palette.background().color().lighter(110)));
+ painter->setPen(QPen(option->palette.window().color().lighter(110)));
painter->drawLine(rect.bottomLeft().x() + offset + 1,
rect.bottomLeft().y() - margin,
rect.topLeft().x() + offset + 1,
rect.topLeft().y() + margin);
} else { //Draw vertical separator
const int offset = rect.height()/2;
- painter->setPen(QPen(option->palette.background().color().darker(110)));
+ painter->setPen(QPen(option->palette.window().color().darker(110)));
painter->drawLine(rect.topLeft().x() + margin ,
rect.topLeft().y() + offset,
rect.topRight().x() - margin,
rect.topRight().y() + offset);
- painter->setPen(QPen(option->palette.background().color().lighter(110)));
+ painter->setPen(QPen(option->palette.window().color().lighter(110)));
painter->drawLine(rect.topLeft().x() + margin ,
rect.topLeft().y() + offset + 1,
rect.topRight().x() - margin,
@@ -642,8 +642,8 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
{
painter->setPen(QPen(outline));
painter->drawRect(option->rect.adjusted(0, 0, -1, -1));
- QColor frameLight = option->palette.background().color().lighter(160);
- QColor frameShadow = option->palette.background().color().darker(110);
+ QColor frameLight = option->palette.window().color().lighter(160);
+ QColor frameShadow = option->palette.window().color().darker(110);
//paint beveleffect
QRect frame = option->rect.adjusted(1, 1, -1, -1);
@@ -661,14 +661,14 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
painter->save();
{
- QColor softshadow = option->palette.background().color().darker(120);
+ QColor softshadow = option->palette.window().color().darker(120);
QRect rect= option->rect;
painter->setPen(softshadow);
painter->drawRect(option->rect.adjusted(0, 0, -1, -1));
painter->setPen(QPen(option->palette.light(), 1));
painter->drawLine(QPoint(rect.left() + 1, rect.top() + 1), QPoint(rect.left() + 1, rect.bottom() - 1));
- painter->setPen(QPen(option->palette.background().color().darker(120)));
+ painter->setPen(QPen(option->palette.window().color().darker(120)));
painter->drawLine(QPoint(rect.left() + 1, rect.bottom() - 1), QPoint(rect.right() - 2, rect.bottom() - 1));
painter->drawLine(QPoint(rect.right() - 1, rect.top() + 1), QPoint(rect.right() - 1, rect.bottom() - 1));
@@ -704,7 +704,7 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
painter->setPen(QPen(option->palette.light(), 1));
painter->drawLine(QPoint(rect.left() + 1, rect.top() + 1),
QPoint(rect.left() + 1, rect.bottom() - 1));
- painter->setPen(QPen(option->palette.background().color().darker(120)));
+ painter->setPen(QPen(option->palette.window().color().darker(120)));
painter->drawLine(QPoint(rect.left() + 1, rect.bottom() - 1),
QPoint(rect.right() - 2, rect.bottom() - 1));
painter->drawLine(QPoint(rect.right() - 1, rect.top() + 1),
@@ -748,7 +748,7 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
painter->translate(0.5, 0.5);
rect = rect.adjusted(0, 0, -1, -1);
- QColor pressedColor = mergedColors(option->palette.base().color(), option->palette.foreground().color(), 85);
+ QColor pressedColor = mergedColors(option->palette.base().color(), option->palette.windowText().color(), 85);
painter->setBrush(Qt::NoBrush);
// Gradient fill
@@ -802,14 +802,14 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
case PE_IndicatorRadioButton:
painter->save();
{
- QColor pressedColor = mergedColors(option->palette.base().color(), option->palette.foreground().color(), 85);
+ QColor pressedColor = mergedColors(option->palette.base().color(), option->palette.windowText().color(), 85);
painter->setBrush((state & State_Sunken) ? pressedColor : option->palette.base().color());
painter->setRenderHint(QPainter::Antialiasing, true);
QPainterPath circle;
const QPointF circleCenter = rect.center() + QPoint(1, 1);
const qreal outlineRadius = (rect.width() + (rect.width() + 1) % 2) / 2.0 - 1;
circle.addEllipse(circleCenter, outlineRadius, outlineRadius);
- painter->setPen(QPen(option->palette.background().color().darker(150)));
+ painter->setPen(QPen(option->palette.window().color().darker(150)));
if (option->state & State_HasFocus && option->state & State_KeyboardFocusChange)
painter->setPen(QPen(highlightedOutline));
painter->drawPath(circle);
@@ -991,7 +991,7 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
case PE_PanelMenu: {
painter->save();
const QBrush menuBackground = option->palette.base().color().lighter(108);
- QColor borderColor = option->palette.background().color().darker(160);
+ QColor borderColor = option->palette.window().color().darker(160);
qDrawPlainRect(painter, option->rect, borderColor, 1, &menuBackground);
painter->restore();
}
@@ -1256,7 +1256,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
Qt::ElideRight, titleRect.width());
proxy()->drawItemText(painter,
titleRect,
- Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic, dwOpt->palette,
+ Qt::AlignLeft | Qt::AlignVCenter, dwOpt->palette,
dwOpt->state & State_Enabled, titleText,
QPalette::WindowText);
}
@@ -1283,8 +1283,8 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
gradientStopColor = buttonColor.darker(102);
QLinearGradient gradient(pixmapRect.topLeft(), pixmapRect.bottomLeft());
- if (option->palette.background().gradient()) {
- gradient.setStops(option->palette.background().gradient()->stops());
+ if (option->palette.window().gradient()) {
+ gradient.setStops(option->palette.window().gradient()->stops());
} else {
QColor midColor1 = mergedColors(gradientStartColor, gradientStopColor, 60);
QColor midColor2 = mergedColors(gradientStartColor, gradientStopColor, 40);
@@ -1519,7 +1519,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
proxy()->drawItemText(painter, item.rect, alignment, mbi->palette, mbi->state & State_Enabled, mbi->text, textRole);
} else {
- QColor shadow = mergedColors(option->palette.background().color().darker(120),
+ QColor shadow = mergedColors(option->palette.window().color().darker(120),
outline.lighter(140), 60);
painter->setPen(QPen(shadow));
painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight());
@@ -1649,7 +1649,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
if (!ignoreCheckMark && checkable && checked) {
QStyleOption opt = *option;
if (act) {
- QColor activeColor = mergedColors(option->palette.background().color(),
+ QColor activeColor = mergedColors(option->palette.window().color(),
option->palette.highlight().color());
opt.palette.setBrush(QPalette::Button, activeColor);
}
@@ -1731,7 +1731,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
newMI.rect = vSubMenuRect;
newMI.state = !enabled ? State_None : State_Enabled;
if (selected)
- newMI.palette.setColor(QPalette::Foreground,
+ newMI.palette.setColor(QPalette::WindowText,
newMI.palette.highlightedText().color());
proxy()->drawPrimitive(arrow, &newMI, painter, widget);
}
@@ -1812,7 +1812,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
painter->save();
{
painter->fillRect(rect, option->palette.window());
- QColor shadow = mergedColors(option->palette.background().color().darker(120),
+ QColor shadow = mergedColors(option->palette.window().color().darker(120),
outline.lighter(140), 60);
painter->setPen(QPen(shadow));
painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight());
@@ -1975,7 +1975,7 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
// ### backgroundrole/foregroundrole should be part of the style option
alphaCornerColor = mergedColors(option->palette.color(widget->backgroundRole()), outline);
} else {
- alphaCornerColor = mergedColors(option->palette.background().color(), outline);
+ alphaCornerColor = mergedColors(option->palette.window().color(), outline);
}
switch (control) {
@@ -2039,7 +2039,7 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
QRect rect = pixmapRect;
QRect r = rect.adjusted(0, 1, 0, -1);
QPainter cachePainter(&cache);
- QColor arrowColor = spinBox->palette.foreground().color();
+ QColor arrowColor = spinBox->palette.windowText().color();
arrowColor.setAlpha(160);
bool isEnabled = (spinBox->state & State_Enabled);
@@ -2174,13 +2174,13 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
QColor highlight = option->palette.highlight().color();
QColor titleBarFrameBorder(active ? highlight.darker(180): outline.darker(110));
- QColor titleBarHighlight(active ? highlight.lighter(120): palette.background().color().lighter(120));
+ QColor titleBarHighlight(active ? highlight.lighter(120): palette.window().color().lighter(120));
QColor textColor(active ? 0xffffff : 0xff000000);
QColor textAlphaColor(active ? 0xffffff : 0xff000000 );
{
// Fill title bar gradient
- QColor titlebarColor = QColor(active ? highlight: palette.background().color());
+ QColor titlebarColor = QColor(active ? highlight: palette.window().color());
QLinearGradient gradient(option->rect.center().x(), option->rect.top(),
option->rect.center().x(), option->rect.bottom());
@@ -2531,7 +2531,7 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
QColor alphaOutline = outline;
alphaOutline.setAlpha(180);
- QColor arrowColor = option->palette.foreground().color();
+ QColor arrowColor = option->palette.windowText().color();
arrowColor.setAlpha(160);
const QColor bgColor = QStyleHelper::backgroundColor(option->palette, widget);
@@ -3225,7 +3225,7 @@ QSize QFusionStyle::sizeFromContents(ContentsType type, const QStyleOption *opti
QFont fontBold = menuItem->font;
fontBold.setBold(true);
QFontMetrics fmBold(fontBold);
- w += fmBold.width(menuItem->text) - fm.horizontalAdvance(menuItem->text);
+ w += fmBold.horizontalAdvance(menuItem->text) - fm.horizontalAdvance(menuItem->text);
}
const int checkcol = qMax<int>(maxpmw, QStyleHelper::dpiScaled(QFusionStylePrivate::menuCheckMarkWidth)); // Windows always shows a check column
w += checkcol;
@@ -3705,7 +3705,7 @@ int QFusionStyle::styleHint(StyleHint hint, const QStyleOption *option, const QW
return 0;
case SH_Table_GridLineColor:
- return option ? option->palette.background().color().darker(120).rgb() : 0;
+ return option ? option->palette.window().color().darker(120).rgb() : 0;
case SH_MessageBox_TextInteractionFlags:
return Qt::TextSelectableByMouse | Qt::LinksAccessibleByMouse;
diff --git a/src/widgets/styles/qfusionstyle_p_p.h b/src/widgets/styles/qfusionstyle_p_p.h
index 169fd9a407..a92041fcfe 100644
--- a/src/widgets/styles/qfusionstyle_p_p.h
+++ b/src/widgets/styles/qfusionstyle_p_p.h
@@ -113,7 +113,7 @@ public:
QColor outline(const QPalette &pal) const {
if (pal.window().style() == Qt::TexturePattern)
return QColor(0, 0, 0, 160);
- return pal.background().color().darker(140);
+ return pal.window().color().darker(140);
}
QColor highlightedOutline(const QPalette &pal) const {
diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h
index 9192dae864..8256f908db 100644
--- a/src/widgets/styles/qstyle.h
+++ b/src/widgets/styles/qstyle.h
@@ -308,8 +308,8 @@ public:
SE_TabWidgetLeftCorner,
SE_TabWidgetRightCorner,
- SE_ViewItemCheckIndicator, // ### Qt 6: remove
- SE_ItemViewItemCheckIndicator = SE_ViewItemCheckIndicator,
+ SE_ItemViewItemCheckIndicator,
+ SE_ViewItemCheckIndicator = SE_ItemViewItemCheckIndicator, // ### Qt 6: remove
SE_TabBarTearIndicator,
SE_TabBarTearIndicatorLeft = SE_TabBarTearIndicator,
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 7c1c0ca3d8..e73d019408 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -44,6 +44,7 @@
#include "private/qcssutil_p.h"
#include <qdebug.h>
+#include <qdir.h>
#include <qapplication.h>
#if QT_CONFIG(menu)
#include <qmenu.h>
@@ -957,8 +958,10 @@ QRenderRule::QRenderRule(const QVector<Declaration> &declarations, const QObject
origin = Origin_Padding;
Origin clip = Origin_Border;
if (v.extractBackground(&brush, &uri, &repeat, &alignment, &origin, &attachment, &clip)) {
- bg = new QStyleSheetBackgroundData(brush, QStyleSheetStyle::loadPixmap(uri, object),
- repeat, alignment, origin, attachment, clip);
+ QPixmap pixmap = QStyleSheetStyle::loadPixmap(uri, object);
+ if (!uri.isEmpty() && pixmap.isNull())
+ qWarning("Could not create pixmap from %s", qPrintable(QDir::toNativeSeparators(uri)));
+ bg = new QStyleSheetBackgroundData(brush, pixmap, repeat, alignment, origin, attachment, clip);
}
QBrush sfg, fg;
@@ -3243,8 +3246,8 @@ void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionC
#if QT_CONFIG(scrollbar)
case CC_ScrollBar:
if (const QStyleOptionSlider *sb = qstyleoption_cast<const QStyleOptionSlider *>(opt)) {
- QStyleOptionSlider sbOpt(*sb);
if (!rule.hasDrawable()) {
+ QStyleOptionSlider sbOpt(*sb);
sbOpt.rect = rule.borderRect(opt->rect);
rule.drawBackgroundImage(p, opt->rect);
baseStyle()->drawComplexControl(cc, &sbOpt, p, w);
@@ -4221,7 +4224,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
QString titleText = p->fontMetrics().elidedText(dwOpt->title, Qt::ElideRight, r.width());
drawItemText(p, r,
- alignment | Qt::TextShowMnemonic, dwOpt->palette,
+ alignment, dwOpt->palette,
dwOpt->state & State_Enabled, titleText,
QPalette::WindowText);
@@ -5079,21 +5082,27 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
QRenderRule subRule = renderRule(w, opt, pe);
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();
+ }
+ if ((pe == PseudoElement_Item) && (subRule.hasBox() || subRule.hasBorder() || subRule.hasFont)) {
+ QSize sz(csz);
if (mi->text.contains(QLatin1Char('\t')))
- width += 12; //as in QCommonStyle
+ sz.rwidth() += 12; //as in QCommonStyle
bool checkable = mi->checkType != QStyleOptionMenuItem::NotCheckable;
if (checkable) {
QRenderRule subSubRule = renderRule(w, opt, PseudoElement_MenuCheckMark);
QRect checkmarkRect = positionRect(w, subRule, subSubRule, PseudoElement_MenuCheckMark, opt->rect, opt->direction);
- width += checkmarkRect.width();
+ sz.rwidth() += checkmarkRect.width();
}
if (!mi->icon.isNull()) {
QPixmap pixmap = mi->icon.pixmap(pixelMetric(PM_SmallIconSize));
- width += pixmap.width();
+ sz.rwidth() += pixmap.width();
+ }
+ if (subRule.hasFont) {
+ QFontMetrics fm(subRule.font);
+ const QRect r = fm.boundingRect(QRect(), Qt::TextSingleLine | Qt::TextShowMnemonic, mi->text);
+ sz = sz.expandedTo(r.size());
}
- return subRule.boxSize(subRule.adjustSize(QSize(width, csz.height())));
+ return subRule.boxSize(subRule.adjustSize(sz));
}
}
break;
@@ -5764,11 +5773,10 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c
case SE_PushButtonContents:
case SE_PushButtonFocusRect:
if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) {
- QStyleOptionButton btnOpt(*btn);
if (rule.hasBox() || !rule.hasNativeBorder())
return visualRect(opt->direction, opt->rect, rule.contentsRect(opt->rect));
- return rule.baseStyleCanDraw() ? baseStyle()->subElementRect(se, &btnOpt, w)
- : QWindowsStyle::subElementRect(se, &btnOpt, w);
+ return rule.baseStyleCanDraw() ? baseStyle()->subElementRect(se, btn, w)
+ : QWindowsStyle::subElementRect(se, btn, w);
}
break;
@@ -5823,7 +5831,7 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c
return ParentStyle::subElementRect(se, opt, w);
#if QT_CONFIG(itemviews)
- case SE_ViewItemCheckIndicator:
+ case SE_ItemViewItemCheckIndicator:
if (!qstyleoption_cast<const QStyleOptionViewItem *>(opt)) {
return subElementRect(SE_CheckBoxIndicator, opt, w);
}
diff --git a/src/widgets/styles/qstylesheetstyle_p.h b/src/widgets/styles/qstylesheetstyle_p.h
index d4edb83525..9c4b87fc32 100644
--- a/src/widgets/styles/qstylesheetstyle_p.h
+++ b/src/widgets/styles/qstylesheetstyle_p.h
@@ -173,7 +173,7 @@ public:
static int numinstances;
private:
- Q_DISABLE_COPY(QStyleSheetStyle)
+ Q_DISABLE_COPY_MOVE(QStyleSheetStyle)
Q_DECLARE_PRIVATE(QStyleSheetStyle)
};
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp
index 12ca5201c1..c0a8228e42 100644
--- a/src/widgets/styles/qwindowsstyle.cpp
+++ b/src/widgets/styles/qwindowsstyle.cpp
@@ -248,7 +248,7 @@ void QWindowsStyle::polish(QApplication *app)
d->activeGradientCaptionColor = app->palette().highlight() .color();
d->inactiveCaptionColor = app->palette().dark().color();
d->inactiveGradientCaptionColor = app->palette().dark().color();
- d->inactiveCaptionText = app->palette().background().color();
+ d->inactiveCaptionText = app->palette().window().color();
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) //fetch native title bar colors
if(app->desktopSettingsAware()){
@@ -817,7 +817,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
else if (opt->state & State_Enabled)
fill = opt->palette.base();
else
- fill = opt->palette.background();
+ fill = opt->palette.window();
p->save();
doRestore = true;
qDrawWinPanel(p, opt->rect, opt->palette, true, &fill);
@@ -951,14 +951,14 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
if (frame->lineWidth == 2 || pe == PE_Frame) {
QPalette popupPal = frame->palette;
if (pe == PE_FrameMenu) {
- popupPal.setColor(QPalette::Light, frame->palette.background().color());
+ popupPal.setColor(QPalette::Light, frame->palette.window().color());
popupPal.setColor(QPalette::Midlight, frame->palette.light().color());
}
if (pe == PE_Frame && (frame->state & State_Raised))
qDrawWinButton(p, frame->rect, popupPal, frame->state & State_Sunken);
else if (pe == PE_Frame && (frame->state & State_Sunken))
{
- popupPal.setColor(QPalette::Midlight, frame->palette.background().color());
+ popupPal.setColor(QPalette::Midlight, frame->palette.window().color());
qDrawWinPanel(p, frame->rect, popupPal, frame->state & State_Sunken);
}
else
@@ -968,7 +968,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
}
} else {
QPalette popupPal = opt->palette;
- popupPal.setColor(QPalette::Light, opt->palette.background().color());
+ popupPal.setColor(QPalette::Light, opt->palette.window().color());
popupPal.setColor(QPalette::Midlight, opt->palette.light().color());
qDrawWinPanel(p, opt->rect, popupPal, opt->state & State_Sunken);
}
@@ -996,7 +996,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
break; }
case PE_FrameWindow: {
QPalette popupPal = opt->palette;
- popupPal.setColor(QPalette::Light, opt->palette.background().color());
+ popupPal.setColor(QPalette::Light, opt->palette.window().color());
popupPal.setColor(QPalette::Midlight, opt->palette.light().color());
qDrawWinPanel(p, opt->rect, popupPal, opt->state & State_Sunken);
break; }
@@ -1315,12 +1315,12 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
x2 -= onlyOne || lastTab ? borderThinkness : 0;
}
- p->fillRect(QRect(x1 + 1, y1 + 1, (x2 - x1) - 1, (y2 - y1) - 2), tab->palette.background());
+ p->fillRect(QRect(x1 + 1, y1 + 1, (x2 - x1) - 1, (y2 - y1) - 2), tab->palette.window());
// Delete border
if (selected) {
- p->fillRect(QRect(x1,y2-1,x2-x1,1), tab->palette.background());
- p->fillRect(QRect(x1,y2,x2-x1,1), tab->palette.background());
+ p->fillRect(QRect(x1,y2-1,x2-x1,1), tab->palette.window());
+ p->fillRect(QRect(x1,y2,x2-x1,1), tab->palette.window());
}
// Left
if (firstTab || selected || onlyOne || !previousSelected) {
@@ -1351,12 +1351,12 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
x2 -= lastTab ? borderThinkness : 0;
}
- p->fillRect(QRect(x1 + 1, y1 + 2, (x2 - x1) - 1, (y2 - y1) - 1), tab->palette.background());
+ p->fillRect(QRect(x1 + 1, y1 + 2, (x2 - x1) - 1, (y2 - y1) - 1), tab->palette.window());
// Delete border
if (selected) {
- p->fillRect(QRect(x1, y1 + 1, (x2 - 1)-x1, 1), tab->palette.background());
- p->fillRect(QRect(x1, y1, (x2 - 1)-x1, 1), tab->palette.background());
+ p->fillRect(QRect(x1, y1 + 1, (x2 - 1)-x1, 1), tab->palette.window());
+ p->fillRect(QRect(x1, y1, (x2 - 1)-x1, 1), tab->palette.window());
}
// Left
if (firstTab || selected || onlyOne || !previousSelected) {
@@ -1389,12 +1389,12 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
y2 -= lastTab ? borderThinkness : 0;
}
- p->fillRect(QRect(x1 + 1, y1 + 1, (x2 - x1) - 2, (y2 - y1) - 1), tab->palette.background());
+ p->fillRect(QRect(x1 + 1, y1 + 1, (x2 - x1) - 2, (y2 - y1) - 1), tab->palette.window());
// Delete border
if (selected) {
- p->fillRect(QRect(x2 - 1, y1, 1, y2-y1), tab->palette.background());
- p->fillRect(QRect(x2, y1, 1, y2-y1), tab->palette.background());
+ p->fillRect(QRect(x2 - 1, y1, 1, y2-y1), tab->palette.window());
+ p->fillRect(QRect(x2, y1, 1, y2-y1), tab->palette.window());
}
// Top
if (firstTab || selected || onlyOne || !previousSelected) {
@@ -1427,12 +1427,12 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
y2 -= lastTab ? borderThinkness : 0;
}
- p->fillRect(QRect(x1 + 2, y1 + 1, (x2 - x1) - 1, (y2 - y1) - 1), tab->palette.background());
+ p->fillRect(QRect(x1 + 2, y1 + 1, (x2 - x1) - 1, (y2 - y1) - 1), tab->palette.window());
// Delete border
if (selected) {
- p->fillRect(QRect(x1 + 1, y1, 1, (y2 - 1)-y1),tab->palette.background());
- p->fillRect(QRect(x1, y1, 1, (y2-1)-y1), tab->palette.background());
+ p->fillRect(QRect(x1 + 1, y1, 1, (y2 - 1)-y1),tab->palette.window());
+ p->fillRect(QRect(x1, y1, 1, (y2-1)-y1), tab->palette.window());
}
// Top
if (firstTab || selected || onlyOne || !previousSelected) {
@@ -1526,7 +1526,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
br = QBrush(paletteBrush.textureImage());
} else
br = QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
- p->setBackground(opt->palette.background().color());
+ p->setBackground(opt->palette.window().color());
p->setBrush(br);
}
p->drawRect(opt->rect);
@@ -1693,7 +1693,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
}
QPalette pal2 = pb->palette;
// Correct the highlight color if it is the same as the background
- if (pal2.highlight() == pal2.background())
+ if (pal2.highlight() == pal2.window())
pal2.setColor(QPalette::Highlight, pb->palette.color(QPalette::Active,
QPalette::Highlight));
bool reverse = ((!vertical && (pb->direction == Qt::RightToLeft)) || vertical);
@@ -1825,7 +1825,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
titleRect.height(), titleRect.width());
}
proxy()->drawItemText(p, titleRect,
- Qt::AlignLeft | Qt::AlignVCenter | Qt::TextShowMnemonic, palette,
+ Qt::AlignLeft | Qt::AlignVCenter, palette,
dwOpt->state & State_Enabled, dwOpt->title,
floating ? (active ? QPalette::BrightText : QPalette::Window) : QPalette::WindowText);
p->setFont(oldFont);
@@ -1843,7 +1843,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
p->setBackground(cb->palette.highlight());
} else {
p->setPen(cb->palette.text().color());
- p->setBackground(cb->palette.background());
+ p->setBackground(cb->palette.window());
}
}
QCommonStyle::drawControl(ce, opt, p, widget);
@@ -2185,7 +2185,7 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp
} else {
p->setPen(cmb->palette.text().color());
- p->setBackground(cmb->palette.background());
+ p->setBackground(cmb->palette.window());
}
if (cmb->state & State_HasFocus && !cmb->editable) {
diff --git a/src/widgets/styles/qwindowsstyle_p.h b/src/widgets/styles/qwindowsstyle_p.h
index 7993b9f1c6..47816ff651 100644
--- a/src/widgets/styles/qwindowsstyle_p.h
+++ b/src/widgets/styles/qwindowsstyle_p.h
@@ -102,7 +102,7 @@ protected:
QWindowsStyle(QWindowsStylePrivate &dd);
private:
- Q_DISABLE_COPY(QWindowsStyle)
+ Q_DISABLE_COPY_MOVE(QWindowsStyle)
Q_DECLARE_PRIVATE(QWindowsStyle)
};
diff --git a/src/widgets/util/qcompleter_p.h b/src/widgets/util/qcompleter_p.h
index 765363744b..21dddf446e 100644
--- a/src/widgets/util/qcompleter_p.h
+++ b/src/widgets/util/qcompleter_p.h
@@ -194,6 +194,7 @@ private:
const QIndexMapper& iv, QMatchData* m);
};
+// ### Qt6: QStyledItemDelegate
class QCompleterItemDelegate : public QItemDelegate
{
public:
diff --git a/src/widgets/util/qflickgesture.cpp b/src/widgets/util/qflickgesture.cpp
index b59fe0d504..a8b2a00a80 100644
--- a/src/widgets/util/qflickgesture.cpp
+++ b/src/widgets/util/qflickgesture.cpp
@@ -130,8 +130,6 @@ private:
, mouseEventSource(Qt::MouseEventNotSynthesized)
{ }
- static PressDelayHandler *inst;
-
public:
enum {
UngrabMouseBefore = 1,
diff --git a/src/widgets/util/qflickgesture_p.h b/src/widgets/util/qflickgesture_p.h
index 74a0f2a0f3..d5ace887ae 100644
--- a/src/widgets/util/qflickgesture_p.h
+++ b/src/widgets/util/qflickgesture_p.h
@@ -77,8 +77,6 @@ public:
friend class QFlickGestureRecognizer;
};
-class PressDelayHandler;
-
class QFlickGesturePrivate : public QGesturePrivate
{
Q_DECLARE_PUBLIC(QFlickGesture)
@@ -89,7 +87,6 @@ public:
QScroller *receiverScroller;
Qt::MouseButton button; // NoButton == Touch
bool macIgnoreWheel;
- static PressDelayHandler *pressDelayHandler;
};
class QFlickGestureRecognizer : public QGestureRecognizer
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp
index 598d173144..fd5d7d8069 100644
--- a/src/widgets/widgets/qabstractscrollarea.cpp
+++ b/src/widgets/widgets/qabstractscrollarea.cpp
@@ -1604,8 +1604,10 @@ QSize QAbstractScrollArea::sizeHint() const
if (!d->sizeHint.isValid() || d->sizeAdjustPolicy == QAbstractScrollArea::AdjustToContents) {
const int f = 2 * d->frameWidth;
const QSize frame( f, f );
- const QSize scrollbars(d->vbarpolicy == Qt::ScrollBarAlwaysOn ? d->vbar->sizeHint().width() : 0,
- d->hbarpolicy == Qt::ScrollBarAlwaysOn ? d->hbar->sizeHint().height() : 0);
+ const bool vbarHidden = d->vbar->isHidden() || d->vbarpolicy == Qt::ScrollBarAlwaysOff;
+ const bool hbarHidden = d->hbar->isHidden() || d->hbarpolicy == Qt::ScrollBarAlwaysOff;
+ const QSize scrollbars(vbarHidden ? 0 : d->vbar->sizeHint().width(),
+ hbarHidden ? 0 : d->hbar->sizeHint().height());
d->sizeHint = frame + scrollbars + viewportSizeHint();
}
return d->sizeHint;
diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp
index 4946969360..5649243d1d 100644
--- a/src/widgets/widgets/qcalendarwidget.cpp
+++ b/src/widgets/widgets/qcalendarwidget.cpp
@@ -1178,9 +1178,9 @@ QVariant QCalendarModel::data(const QModelIndex &index, int role) const
}
QTextCharFormat fmt = formatForCell(row, column);
- if (role == Qt::BackgroundColorRole)
+ if (role == Qt::BackgroundRole)
return fmt.background().color();
- if (role == Qt::TextColorRole)
+ if (role == Qt::ForegroundRole)
return fmt.foreground().color();
if (role == Qt::FontRole)
return fmt.font();
@@ -1555,6 +1555,7 @@ void QCalendarView::mouseReleaseEvent(QMouseEvent *event)
}
}
+// ### Qt6: QStyledItemDelegate
class QCalendarDelegate : public QItemDelegate
{
Q_OBJECT
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index e20a0892b4..bb09b984a6 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -166,7 +166,7 @@ QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewIt
break;
}
if (index.data(Qt::BackgroundRole).canConvert<QBrush>()) {
- menuOption.palette.setBrush(QPalette::All, QPalette::Background,
+ menuOption.palette.setBrush(QPalette::All, QPalette::Window,
qvariant_cast<QBrush>(index.data(Qt::BackgroundRole)));
}
menuOption.text = index.model()->data(index, Qt::DisplayRole).toString()
@@ -1941,12 +1941,15 @@ const QValidator *QComboBox::validator() const
performs case insensitive inline completion is automatically created.
\note The completer is removed when the \l editable property becomes \c false.
+ Setting a completer on a QComboBox that is not editable will be ignored.
*/
void QComboBox::setCompleter(QCompleter *c)
{
Q_D(QComboBox);
- if (!d->lineEdit)
+ if (!d->lineEdit) {
+ qWarning("Setting a QCompleter on non-editable QComboBox is not allowed.");
return;
+ }
d->lineEdit->setCompleter(c);
if (c) {
connect(c, SIGNAL(activated(QModelIndex)), this, SLOT(_q_completerActivated(QModelIndex)));
diff --git a/src/widgets/widgets/qcombobox_p.h b/src/widgets/widgets/qcombobox_p.h
index 3f75a357e4..71404964da 100644
--- a/src/widgets/widgets/qcombobox_p.h
+++ b/src/widgets/widgets/qcombobox_p.h
@@ -277,7 +277,7 @@ protected:
const QStyleOptionViewItem &option,
const QModelIndex &index) const override {
QStyleOptionMenuItem opt = getStyleOption(option, index);
- painter->fillRect(option.rect, opt.palette.background());
+ painter->fillRect(option.rect, opt.palette.window());
mCombo->style()->drawControl(QStyle::CE_MenuItem, &opt, painter, mCombo);
}
QSize sizeHint(const QStyleOptionViewItem &option,
@@ -293,6 +293,7 @@ private:
QComboBox *mCombo;
};
+// ### Qt6: QStyledItemDelegate ?
// Note that this class is intentionally not using QStyledItemDelegate
// Vista does not use the new theme for combo boxes and there might
// be other side effects from using the new class
diff --git a/src/widgets/widgets/qcommandlinkbutton.h b/src/widgets/widgets/qcommandlinkbutton.h
index 2d01d63df8..3d2dd5784d 100644
--- a/src/widgets/widgets/qcommandlinkbutton.h
+++ b/src/widgets/widgets/qcommandlinkbutton.h
@@ -66,10 +66,16 @@ public:
QString description() const;
void setDescription(const QString &description);
+ // QTBUG-68722
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
protected:
+#else
+public:
+#endif
QSize sizeHint() const override;
int heightForWidth(int) const override;
QSize minimumSizeHint() const override;
+protected:
bool event(QEvent *e) override;
void paintEvent(QPaintEvent *) override;
diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp
index 6c871aae2c..cd3accefff 100644
--- a/src/widgets/widgets/qdockwidget.cpp
+++ b/src/widgets/widgets/qdockwidget.cpp
@@ -55,6 +55,7 @@
#include <private/qwidgetresizehandler_p.h>
#include <private/qstylesheetstyle_p.h>
+#include <qpa/qplatformtheme.h>
#include "qdockwidget_p.h"
#include "qmainwindowlayout_p.h"
@@ -922,7 +923,8 @@ bool QDockWidgetPrivate::mousePressEvent(QMouseEvent *event)
initDrag(event->pos(), false);
if (state)
- state->ctrlDrag = hasFeature(this, QDockWidget::DockWidgetFloatable) && event->modifiers() & Qt::ControlModifier;
+ state->ctrlDrag = (hasFeature(this, QDockWidget::DockWidgetFloatable) && event->modifiers() & Qt::ControlModifier) ||
+ (!hasFeature(this, QDockWidget::DockWidgetMovable) && q->isFloating());
return true;
}
@@ -1044,7 +1046,8 @@ void QDockWidgetPrivate::nonClientAreaMouseEvent(QMouseEvent *event)
initDrag(event->pos(), true);
if (state == 0)
break;
- state->ctrlDrag = event->modifiers() & Qt::ControlModifier;
+ state->ctrlDrag = (event->modifiers() & Qt::ControlModifier) ||
+ (!hasFeature(this, QDockWidget::DockWidgetMovable) && q->isFloating());
startDrag();
break;
case QEvent::NonClientAreaMouseMove:
diff --git a/src/widgets/widgets/qdockwidget_p.h b/src/widgets/widgets/qdockwidget_p.h
index 766e4ed161..14d73e815f 100644
--- a/src/widgets/widgets/qdockwidget_p.h
+++ b/src/widgets/widgets/qdockwidget_p.h
@@ -108,6 +108,7 @@ public:
// QMainWindow *findMainWindow(QWidget *widget) const;
QRect undockedGeometry;
QString fixedWindowTitle;
+ QString dockedWindowTitle;
bool mousePressEvent(QMouseEvent *event);
bool mouseDoubleClickEvent(QMouseEvent *event);
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index 60f88df9af..a840bf4ee6 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -1098,7 +1098,7 @@ void QLabel::paintEvent(QPaintEvent *)
QImage scaledImage =
d->cachedimage->scaled(scaledSize,
Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
- d->scaledpixmap = new QPixmap(QPixmap::fromImage(scaledImage));
+ d->scaledpixmap = new QPixmap(QPixmap::fromImage(std::move(scaledImage)));
d->scaledpixmap->setDevicePixelRatio(devicePixelRatioF());
}
pix = *d->scaledpixmap;
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp
index 6dcb2dd693..2a5a0c34dc 100644
--- a/src/widgets/widgets/qlineedit_p.cpp
+++ b/src/widgets/widgets/qlineedit_p.cpp
@@ -324,7 +324,7 @@ void QLineEditPrivate::drag()
data->setText(control->selectedText());
QDrag *drag = new QDrag(q);
drag->setMimeData(data);
- Qt::DropAction action = drag->start();
+ Qt::DropAction action = drag->exec(Qt::CopyAction);
if (action == Qt::MoveAction && !control->isReadOnly() && drag->target() != q)
control->removeSelection();
}
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index 411b482c11..fae3aebba4 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -851,7 +851,11 @@ void QMainWindow::removeToolBar(QToolBar *toolbar)
\sa addToolBar(), addToolBarBreak(), Qt::ToolBarArea
*/
-Qt::ToolBarArea QMainWindow::toolBarArea(QToolBar *toolbar) const
+Qt::ToolBarArea QMainWindow::toolBarArea(
+#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
+ const
+#endif
+ QToolBar *toolbar) const
{ return d_func()->layout->toolBarArea(toolbar); }
/*!
diff --git a/src/widgets/widgets/qmainwindow.h b/src/widgets/widgets/qmainwindow.h
index 8f2a192446..85e3f87d77 100644
--- a/src/widgets/widgets/qmainwindow.h
+++ b/src/widgets/widgets/qmainwindow.h
@@ -158,7 +158,11 @@ public:
bool unifiedTitleAndToolBarOnMac() const;
- Qt::ToolBarArea toolBarArea(QToolBar *toolbar) const;
+ Qt::ToolBarArea toolBarArea(
+#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
+ const
+#endif
+ QToolBar *toolbar) const;
bool toolBarBreak(QToolBar *toolbar) const;
#endif
#if QT_CONFIG(dockwidget)
diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp
index 053bfbf024..ed054c7e9a 100644
--- a/src/widgets/widgets/qmainwindowlayout.cpp
+++ b/src/widgets/widgets/qmainwindowlayout.cpp
@@ -1388,7 +1388,7 @@ void QMainWindowLayout::insertToolBar(QToolBar *before, QToolBar *toolbar)
invalidate();
}
-Qt::ToolBarArea QMainWindowLayout::toolBarArea(QToolBar *toolbar) const
+Qt::ToolBarArea QMainWindowLayout::toolBarArea(const QToolBar *toolbar) const
{
QInternal::DockPosition pos = layoutState.toolBarAreaLayout.findToolBar(toolbar);
switch (pos) {
diff --git a/src/widgets/widgets/qmainwindowlayout_p.h b/src/widgets/widgets/qmainwindowlayout_p.h
index 72cbec2350..a375d856bb 100644
--- a/src/widgets/widgets/qmainwindowlayout_p.h
+++ b/src/widgets/widgets/qmainwindowlayout_p.h
@@ -475,7 +475,7 @@ public:
void addToolBar(Qt::ToolBarArea area, QToolBar *toolbar, bool needAddChildWidget = true);
void insertToolBar(QToolBar *before, QToolBar *toolbar);
- Qt::ToolBarArea toolBarArea(QToolBar *toolbar) const;
+ Qt::ToolBarArea toolBarArea(const QToolBar *toolbar) const;
bool toolBarBreak(QToolBar *toolBar) const;
void getStyleOptionInfo(QStyleOptionToolBar *option, QToolBar *toolBar) const;
void removeToolBar(QToolBar *toolbar);
diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp
index f32cd26478..104cbdbcda 100644
--- a/src/widgets/widgets/qmdiarea.cpp
+++ b/src/widgets/widgets/qmdiarea.cpp
@@ -954,14 +954,6 @@ void QMdiAreaPrivate::rearrange(Rearranger *rearranger)
}
}
- if (active && rearranger->type() == Rearranger::RegularTiler && !tileCalledFromResizeEvent) {
- // Move active window in front if necessary. That's the case if we
- // have any windows with staysOnTopHint set.
- int indexToActive = widgets.indexOf((QWidget *)active);
- if (indexToActive > 0)
- widgets.move(indexToActive, 0);
- }
-
QRect domain = viewport->rect();
if (rearranger->type() == Rearranger::RegularTiler && !widgets.isEmpty())
domain = resizeToMinimumTileSize(minSubWindowSize, widgets.count());
@@ -1296,7 +1288,11 @@ QRect QMdiAreaPrivate::resizeToMinimumTileSize(const QSize &minSubWindowSize, in
minAreaHeight += 2 * frame;
}
const QSize diff = QSize(minAreaWidth, minAreaHeight).expandedTo(q->size()) - q->size();
- topLevel->resize(topLevel->size() + diff);
+ // Only resize topLevel widget if scroll bars are disabled.
+ if (hbarpolicy == Qt::ScrollBarAlwaysOff)
+ topLevel->resize(topLevel->size().width() + diff.width(), topLevel->size().height());
+ if (vbarpolicy == Qt::ScrollBarAlwaysOff)
+ topLevel->resize(topLevel->size().width(), topLevel->size().height() + diff.height());
}
QRect domain = viewport->rect();
@@ -2640,7 +2636,11 @@ bool QMdiArea::eventFilter(QObject *object, QEvent *event)
#endif // QT_CONFIG(tabbar)
Q_FALLTHROUGH();
case QEvent::Hide:
- d->isSubWindowsTiled = false;
+ // Do not reset the isSubWindowsTiled flag if the event is a spontaneous system window event.
+ // This ensures that tiling will be performed during the resizeEvent after an application
+ // window minimize (hide) and then restore (show).
+ if (!event->spontaneous())
+ d->isSubWindowsTiled = false;
break;
#if QT_CONFIG(rubberband)
case QEvent::Close:
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 48253b52b0..9b30ec4619 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -1783,21 +1783,6 @@ QAction *QMenu::addAction(const QString &text, const QObject *receiver, const ch
return action;
}
-/*!\fn template<typename PointerToMemberFunction> QAction *QMenu::addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &shortcut = 0)
-
- \since 5.6
-
- \overload
-
- This convenience function creates a new action with the text \a
- text and an optional shortcut \a shortcut. The action's
- \l{QAction::triggered()}{triggered()} signal is connected to the
- \a method of the \a receiver. The function adds the newly created
- action to the menu's list of actions and returns it.
-
- QMenu takes ownership of the returned QAction.
-*/
-
/*!\fn template<typename Functor> QAction *QMenu::addAction(const QString &text, Functor functor, const QKeySequence &shortcut = 0)
\since 5.6
@@ -1822,25 +1807,11 @@ QAction *QMenu::addAction(const QString &text, const QObject *receiver, const ch
This convenience function creates a new action with the text \a
text and an optional shortcut \a shortcut. The action's
\l{QAction::triggered()}{triggered()} signal is connected to the
- \a functor. The function adds the newly created
- action to the menu's list of actions and returns it.
+ \a functor. The functor can be a pointer to a member function of
+ the \a context object. The newly created action is added to the
+ menu's list of actions and a pointer to it is returned.
- If \a context is destroyed, the functor will not be called.
-
- QMenu takes ownership of the returned QAction.
-*/
-
-/*!\fn template<typename PointerToMemberFunction> QAction *QMenu::addAction(const QIcon &icon, const QString &text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &shortcut = 0)
-
- \since 5.6
-
- \overload
-
- This convenience function creates a new action with an \a icon
- and some \a text and an optional shortcut \a shortcut. The action's
- \l{QAction::triggered()}{triggered()} signal is connected to the
- \a method of the \a receiver. The function adds the newly created
- action to the menu's list of actions and returns it.
+ If the \a context object is destroyed, the functor will not be called.
QMenu takes ownership of the returned QAction.
*/
@@ -1869,8 +1840,9 @@ QAction *QMenu::addAction(const QString &text, const QObject *receiver, const ch
This convenience function creates a new action with an \a icon
and some \a text and an optional shortcut \a shortcut. The action's
\l{QAction::triggered()}{triggered()} signal is connected to the
- \a functor. The function adds the newly created
- action to the menu's list of actions and returns it.
+ \a functor. The \a functor can be a pointer to a member function
+ of the \a context object. The newly created action is added to the
+ menu's list of actions and a pointer to it is returned.
If \a context is destroyed, the functor will not be called.
diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h
index 628f818b5e..84ab9e027a 100644
--- a/src/widgets/widgets/qmenu.h
+++ b/src/widgets/widgets/qmenu.h
@@ -82,14 +82,10 @@ public:
QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, const char* member, const QKeySequence &shortcut = 0);
#ifdef Q_CLANG_QDOC
- template<typename PointerToMemberFunction>
- QAction *addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &shortcut = 0);
template<typename Functor>
QAction *addAction(const QString &text, Functor functor, const QKeySequence &shortcut = 0);
template<typename Functor>
QAction *addAction(const QString &text, const QObject *context, Functor functor, const QKeySequence &shortcut = 0);
- template<typename PointerToMemberFunction>
- QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &shortcut = 0);
template<typename Functor>
QAction *addAction(const QIcon &icon, const QString &text, Functor functor, const QKeySequence &shortcut = 0);
template<typename Functor>
diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h
index f740919dc7..3e1aa2f738 100644
--- a/src/widgets/widgets/qmenu_p.h
+++ b/src/widgets/widgets/qmenu_p.h
@@ -115,7 +115,7 @@ private:
class QMenuSloppyState
{
- Q_DISABLE_COPY(QMenuSloppyState)
+ Q_DISABLE_COPY_MOVE(QMenuSloppyState)
public:
QMenuSloppyState()
: m_enabled(false)
diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp
index d6f6a364a8..0b79a990a9 100644
--- a/src/widgets/widgets/qplaintextedit.cpp
+++ b/src/widgets/widgets/qplaintextedit.cpp
@@ -1614,7 +1614,7 @@ void QPlainTextEdit::timerEvent(QTimerEvent *e)
const QPoint globalPos = QCursor::pos();
pos = d->viewport->mapFromGlobal(globalPos);
QMouseEvent ev(QEvent::MouseMove, pos, d->viewport->mapTo(d->viewport->topLevelWidget(), pos), globalPos,
- Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
+ Qt::LeftButton, Qt::LeftButton, QGuiApplication::keyboardModifiers());
mouseMoveEvent(&ev);
}
int deltaY = qMax(pos.y() - visible.top(), visible.bottom() - pos.y()) - visible.height();
@@ -2038,7 +2038,7 @@ void QPlainTextEdit::paintEvent(QPaintEvent *e)
if (backgroundVisible() && !block.isValid() && offset.y() <= er.bottom()
&& (centerOnScroll() || verticalScrollBar()->maximum() == verticalScrollBar()->minimum())) {
- painter.fillRect(QRect(QPoint((int)er.left(), (int)offset.y()), er.bottomRight()), palette().background());
+ painter.fillRect(QRect(QPoint((int)er.left(), (int)offset.y()), er.bottomRight()), palette().window());
}
}
@@ -2891,6 +2891,7 @@ void QPlainTextEdit::setCenterOnScroll(bool enabled)
if (enabled == d->centerOnScroll)
return;
d->centerOnScroll = enabled;
+ d->_q_adjustScrollbars();
}
@@ -2928,6 +2929,27 @@ bool QPlainTextEdit::find(const QRegExp &exp, QTextDocument::FindFlags options)
#endif
/*!
+ \fn bool QTextEdit::find(const QRegularExpression &exp, QTextDocument::FindFlags options)
+
+ \since 5.13
+ \overload
+
+ Finds the next occurrence, matching the regular expression, \a exp, using the given
+ \a options. The QTextDocument::FindCaseSensitively option is ignored for this overload,
+ use QRegularExpression::CaseInsensitiveOption instead.
+
+ Returns \c true if a match was found and changes the cursor to select the match;
+ otherwise returns \c false.
+*/
+#if QT_CONFIG(regularexpression)
+bool QPlainTextEdit::find(const QRegularExpression &exp, QTextDocument::FindFlags options)
+{
+ Q_D(QPlainTextEdit);
+ return d->control->find(exp, options);
+}
+#endif
+
+/*!
\fn void QPlainTextEdit::copyAvailable(bool yes)
This signal is emitted when text is selected or de-selected in the
diff --git a/src/widgets/widgets/qplaintextedit.h b/src/widgets/widgets/qplaintextedit.h
index e5ac4c82b8..a5945d649a 100644
--- a/src/widgets/widgets/qplaintextedit.h
+++ b/src/widgets/widgets/qplaintextedit.h
@@ -60,6 +60,7 @@ class QMenu;
class QPlainTextEditPrivate;
class QMimeData;
class QPagedPaintDevice;
+class QRegularExpression;
class Q_WIDGETS_EXPORT QPlainTextEdit : public QAbstractScrollArea
{
@@ -149,6 +150,9 @@ public:
#ifndef QT_NO_REGEXP
bool find(const QRegExp &exp, QTextDocument::FindFlags options = QTextDocument::FindFlags());
#endif
+#if QT_CONFIG(regularexpression)
+ bool find(const QRegularExpression &exp, QTextDocument::FindFlags options = QTextDocument::FindFlags());
+#endif
inline QString toPlainText() const
{ return document()->toPlainText(); }
diff --git a/src/widgets/widgets/qstatusbar.cpp b/src/widgets/widgets/qstatusbar.cpp
index ef98bb6950..ae67cbd890 100644
--- a/src/widgets/widgets/qstatusbar.cpp
+++ b/src/widgets/widgets/qstatusbar.cpp
@@ -689,7 +689,7 @@ void QStatusBar::paintEvent(QPaintEvent *event)
}
}
if (haveMessage) {
- p.setPen(palette().foreground().color());
+ p.setPen(palette().windowText().color());
p.drawText(d->messageRect(), Qt::AlignLeading | Qt::AlignVCenter | Qt::TextSingleLine, d->tempItem);
}
}
diff --git a/src/widgets/widgets/qtextbrowser.cpp b/src/widgets/widgets/qtextbrowser.cpp
index 09541bb53b..bb9a4fed91 100644
--- a/src/widgets/widgets/qtextbrowser.cpp
+++ b/src/widgets/widgets/qtextbrowser.cpp
@@ -276,7 +276,7 @@ void QTextBrowserPrivate::setSource(const QUrl &url)
Q_Q(QTextBrowser);
#ifndef QT_NO_CURSOR
if (q->isVisible())
- QApplication::setOverrideCursor(Qt::WaitCursor);
+ QGuiApplication::setOverrideCursor(Qt::WaitCursor);
#endif
textOrSourceChanged = true;
@@ -310,7 +310,7 @@ void QTextBrowserPrivate::setSource(const QUrl &url)
const QStringRef firstTag = txt.leftRef(txt.indexOf(QLatin1Char('>')) + 1);
if (firstTag.startsWith(QLatin1String("<qt")) && firstTag.contains(QLatin1String("type")) && firstTag.contains(QLatin1String("detail"))) {
#ifndef QT_NO_CURSOR
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
#if QT_CONFIG(whatsthis)
QWhatsThis::showText(QCursor::pos(), txt, q);
@@ -355,7 +355,7 @@ void QTextBrowserPrivate::setSource(const QUrl &url)
#ifndef QT_NO_CURSOR
if (q->isVisible())
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
emit q->sourceChanged(url);
}
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp
index e3a45680ef..920133d493 100644
--- a/src/widgets/widgets/qtextedit.cpp
+++ b/src/widgets/widgets/qtextedit.cpp
@@ -105,6 +105,14 @@ public:
else
ed->insertFromMimeData(source);
}
+ QVariant loadResource(int type, const QUrl &name) override {
+ auto *ed = qobject_cast<QTextEdit *>(parent());
+ if (!ed)
+ return QWidgetTextControl::loadResource(type, name);
+
+ QUrl resolvedName = ed->d_func()->resolveUrl(name);
+ return ed->loadResource(type, resolvedName);
+ }
};
QTextEditPrivate::QTextEditPrivate()
@@ -2534,6 +2542,27 @@ bool QTextEdit::find(const QRegExp &exp, QTextDocument::FindFlags options)
#endif
/*!
+ \fn bool QTextEdit::find(const QRegularExpression &exp, QTextDocument::FindFlags options)
+
+ \since 5.13
+ \overload
+
+ Finds the next occurrence, matching the regular expression, \a exp, using the given
+ \a options. The QTextDocument::FindCaseSensitively option is ignored for this overload,
+ use QRegularExpression::CaseInsensitiveOption instead.
+
+ Returns \c true if a match was found and changes the cursor to select the match;
+ otherwise returns \c false.
+*/
+#if QT_CONFIG(regularexpression)
+bool QTextEdit::find(const QRegularExpression &exp, QTextDocument::FindFlags options)
+{
+ Q_D(QTextEdit);
+ return d->control->find(exp, options);
+}
+#endif
+
+/*!
\fn void QTextEdit::copyAvailable(bool yes)
This signal is emitted when text is selected or de-selected in the
diff --git a/src/widgets/widgets/qtextedit.h b/src/widgets/widgets/qtextedit.h
index 51d6c2ccba..3aa23aaace 100644
--- a/src/widgets/widgets/qtextedit.h
+++ b/src/widgets/widgets/qtextedit.h
@@ -57,6 +57,7 @@ class QMenu;
class QTextEditPrivate;
class QMimeData;
class QPagedPaintDevice;
+class QRegularExpression;
class Q_WIDGETS_EXPORT QTextEdit : public QAbstractScrollArea
{
@@ -165,6 +166,9 @@ public:
#ifndef QT_NO_REGEXP
bool find(const QRegExp &exp, QTextDocument::FindFlags options = QTextDocument::FindFlags());
#endif
+#if QT_CONFIG(regularexpression)
+ bool find(const QRegularExpression &exp, QTextDocument::FindFlags options = QTextDocument::FindFlags());
+#endif
QString toPlainText() const;
#ifndef QT_NO_TEXTHTMLPARSER
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp
index 4af71c126e..bcf5a40ae3 100644
--- a/src/widgets/widgets/qtoolbar.cpp
+++ b/src/widgets/widgets/qtoolbar.cpp
@@ -799,18 +799,6 @@ QAction *QToolBar::addAction(const QIcon &icon, const QString &text,
return action;
}
-/*!\fn template<typename PointerToMemberFunction> QAction *QToolBar::addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method)
-
- \since 5.6
-
- \overload
-
- Creates a new action with the given \a text. This action is added to
- the end of the toolbar. The action's
- \l{QAction::triggered()}{triggered()} signal is connected to the
- \a method of the \a receiver.
-*/
-
/*!\fn template<typename Functor> QAction *QToolBar::addAction(const QString &text, Functor functor)
\since 5.6
@@ -829,24 +817,13 @@ QAction *QToolBar::addAction(const QIcon &icon, const QString &text,
\overload
- Creates a new action with the given \a text. This action is added to
- the end of the toolbar. The action's
+ Creates a new action with the given \a text. This action is added
+ to the end of the toolbar. The action's
\l{QAction::triggered()}{triggered()} signal is connected to the
- \a functor.
-
- If \a context is destroyed, the functor will not be called.
-*/
-
-/*!\fn template<typename PointerToMemberFunction> QAction *QToolBar::addAction(const QIcon &icon, const QString &text, const QObject *receiver, PointerToMemberFunction method)
-
- \since 5.6
+ \a functor. The \a functor can be a pointer to a member function
+ in the \a context object.
- \overload
-
- Creates a new action with the given \a icon and \a text. This
- action is added to the end of the toolbar. The action's
- \l{QAction::triggered()}{triggered()} signal is connected to the
- \a method of the \a receiver.
+ If the \a context object is destroyed, the \a functor will not be called.
*/
/*!\fn template<typename Functor> QAction *QToolBar::addAction(const QIcon &icon, const QString &text, Functor functor)
@@ -870,9 +847,10 @@ QAction *QToolBar::addAction(const QIcon &icon, const QString &text,
Creates a new action with the given \a icon and \a text. This
action is added to the end of the toolbar. The action's
\l{QAction::triggered()}{triggered()} signal is connected to the
- \a functor.
+ \a functor. The \a functor can be a pointer to a member function
+ of the \a context object.
- If \a context is destroyed, the functor will not be called.
+ If the \a context object is destroyed, the \a functor will not be called.
*/
/*!
@@ -1067,7 +1045,7 @@ void QToolBar::paintEvent(QPaintEvent *)
if (d->layout->expanded || d->layout->animating || isWindow()) {
//if the toolbar is expended, we need to fill the background with the window color
//because some styles may expects that.
- p.fillRect(opt.rect, palette().background());
+ p.fillRect(opt.rect, palette().window());
style->drawControl(QStyle::CE_ToolBar, &opt, &p, this);
style->drawPrimitive(QStyle::PE_FrameMenu, &opt, &p, this);
} else {
diff --git a/src/widgets/widgets/qtoolbar.h b/src/widgets/widgets/qtoolbar.h
index 4ae83190d1..0c434e8d1d 100644
--- a/src/widgets/widgets/qtoolbar.h
+++ b/src/widgets/widgets/qtoolbar.h
@@ -99,15 +99,11 @@ public:
QAction *addAction(const QString &text, const QObject *receiver, const char* member);
QAction *addAction(const QIcon &icon, const QString &text,
const QObject *receiver, const char* member);
-#ifdef Q_QDOC
- template<typename PointerToMemberFunction>
- QAction *addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method);
+#ifdef Q_CLANG_QDOC
template<typename Functor>
QAction *addAction(const QString &text, Functor functor);
template<typename Functor>
QAction *addAction(const QString &text, const QObject *context, Functor functor);
- template<typename PointerToMemberFunction>
- QAction *addAction(const QIcon &icon, const QString &text, const QObject *receiver, PointerToMemberFunction method);
template<typename Functor>
QAction *addAction(const QIcon &icon, const QString &text, Functor functor);
template<typename Functor>
@@ -149,7 +145,7 @@ public:
connect(result, &QAction::triggered, slot);
return result;
}
-#endif // !Q_QDOC
+#endif // !Q_CLANG_QDOC
QAction *addSeparator();
QAction *insertSeparator(QAction *before);
diff --git a/src/widgets/widgets/qtoolbararealayout.cpp b/src/widgets/widgets/qtoolbararealayout.cpp
index edf497111b..884eface3c 100644
--- a/src/widgets/widgets/qtoolbararealayout.cpp
+++ b/src/widgets/widgets/qtoolbararealayout.cpp
@@ -789,7 +789,7 @@ void QToolBarAreaLayout::deleteAllLayoutItems()
}
}
-QInternal::DockPosition QToolBarAreaLayout::findToolBar(QToolBar *toolBar) const
+QInternal::DockPosition QToolBarAreaLayout::findToolBar(const QToolBar *toolBar) const
{
for (int i = 0; i < QInternal::DockCount; ++i) {
const QToolBarAreaLayoutInfo &dock = docks[i];
diff --git a/src/widgets/widgets/qtoolbararealayout_p.h b/src/widgets/widgets/qtoolbararealayout_p.h
index dffbab1f21..17747ef29b 100644
--- a/src/widgets/widgets/qtoolbararealayout_p.h
+++ b/src/widgets/widgets/qtoolbararealayout_p.h
@@ -196,7 +196,7 @@ public:
void insertItem(QInternal::DockPosition pos, QLayoutItem *item);
void insertItem(QToolBar *before, QLayoutItem *item);
- QInternal::DockPosition findToolBar(QToolBar *toolBar) const;
+ QInternal::DockPosition findToolBar(const QToolBar *toolBar) const;
bool toolBarBreak(QToolBar *toolBar) const;
void getStyleOptionInfo(QStyleOptionToolBar *option, QToolBar *toolBar) const;
diff --git a/src/widgets/widgets/qwidgetresizehandler_p.h b/src/widgets/widgets/qwidgetresizehandler_p.h
index b87bbd6229..89bc759cc2 100644
--- a/src/widgets/widgets/qwidgetresizehandler_p.h
+++ b/src/widgets/widgets/qwidgetresizehandler_p.h
@@ -100,7 +100,7 @@ protected:
void keyPressEvent(QKeyEvent *e);
private:
- Q_DISABLE_COPY(QWidgetResizeHandler)
+ Q_DISABLE_COPY_MOVE(QWidgetResizeHandler)
enum MousePosition {
Nowhere,
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index e179ea3b40..711c4bfd2a 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -57,9 +57,6 @@
#include <qtimer.h>
#include "private/qtextdocumentlayout_p.h"
#include "private/qabstracttextdocumentlayout_p.h"
-#if QT_CONFIG(textedit)
-#include "private/qtextedit_p.h"
-#endif
#include "qtextdocument.h"
#include "private/qtextdocument_p.h"
#include "qtextlist.h"
@@ -218,6 +215,14 @@ bool QWidgetTextControlPrivate::cursorMoveKeyEvent(QKeyEvent *e)
else if (e == QKeySequence::SelectPreviousLine) {
op = QTextCursor::Up;
mode = QTextCursor::KeepAnchor;
+ {
+ QTextBlock block = cursor.block();
+ QTextLine line = currentTextLine(cursor);
+ if (!block.previous().isValid()
+ && line.isValid()
+ && line.lineNumber() == 0)
+ op = QTextCursor::Start;
+ }
}
else if (e == QKeySequence::SelectNextLine) {
op = QTextCursor::Down;
@@ -1357,15 +1362,8 @@ process:
QVariant QWidgetTextControl::loadResource(int type, const QUrl &name)
{
-#if !QT_CONFIG(textedit)
Q_UNUSED(type);
Q_UNUSED(name);
-#else
- if (QTextEdit *textEdit = qobject_cast<QTextEdit *>(parent())) {
- QUrl resolvedName = textEdit->d_func()->resolveUrl(name);
- return textEdit->loadResource(type, resolvedName);
- }
-#endif
return QVariant();
}
@@ -3094,6 +3092,19 @@ bool QWidgetTextControl::find(const QRegExp &exp, QTextDocument::FindFlags optio
}
#endif
+#if QT_CONFIG(regularexpression)
+bool QWidgetTextControl::find(const QRegularExpression &exp, QTextDocument::FindFlags options)
+{
+ Q_D(QWidgetTextControl);
+ QTextCursor search = d->doc->find(exp, d->cursor, options);
+ if (search.isNull())
+ return false;
+
+ setTextCursor(search);
+ return true;
+}
+#endif
+
QString QWidgetTextControl::toPlainText() const
{
return document()->toPlainText();
diff --git a/src/widgets/widgets/qwidgettextcontrol_p.h b/src/widgets/widgets/qwidgettextcontrol_p.h
index 4b2acbd934..202ba36454 100644
--- a/src/widgets/widgets/qwidgettextcontrol_p.h
+++ b/src/widgets/widgets/qwidgettextcontrol_p.h
@@ -80,6 +80,7 @@ class QMenu;
class QWidgetTextControlPrivate;
class QAbstractScrollArea;
class QEvent;
+class QRegularExpression;
class QTimerEvent;
class Q_WIDGETS_EXPORT QWidgetTextControl : public QInputControl
@@ -119,6 +120,9 @@ public:
#ifndef QT_NO_REGEXP
bool find(const QRegExp &exp, QTextDocument::FindFlags options = 0);
#endif
+#if QT_CONFIG(regularexpression)
+ bool find(const QRegularExpression &exp, QTextDocument::FindFlags options = 0);
+#endif
QString toPlainText() const;
#ifndef QT_NO_TEXTHTMLPARSER
@@ -263,7 +267,7 @@ protected:
virtual bool event(QEvent *e) override;
private:
- Q_DISABLE_COPY(QWidgetTextControl)
+ Q_DISABLE_COPY_MOVE(QWidgetTextControl)
Q_PRIVATE_SLOT(d_func(), void _q_updateCurrentCharFormatAndSelection())
Q_PRIVATE_SLOT(d_func(), void _q_emitCursorPosChanged(const QTextCursor &))
Q_PRIVATE_SLOT(d_func(), void _q_deleteSelected())
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index 5893d8448e..a1f4d57da6 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -48,7 +48,9 @@
#include <qhash.h>
#include <qiodevice.h>
#include <qlist.h>
-#include <qregexp.h>
+#if QT_CONFIG(regularexpression)
+#include <qregularexpression.h>
+#endif
#if QT_CONFIG(textcodec)
#include <qtextcodec.h>
#endif
@@ -6430,7 +6432,7 @@ void QDomDocumentPrivate::saveDocument(QTextStream& s, const int indent, QDomNod
const QDomNodePrivate* n = first;
if(encUsed == QDomNode::EncodingFromDocument) {
-#if QT_CONFIG(textcodec)
+#if QT_CONFIG(textcodec) && QT_CONFIG(regularexpression)
const QDomNodePrivate* n = first;
QTextCodec *codec = 0;
@@ -6438,11 +6440,11 @@ void QDomDocumentPrivate::saveDocument(QTextStream& s, const int indent, QDomNod
if (n && n->isProcessingInstruction() && n->nodeName() == QLatin1String("xml")) {
// we have an XML declaration
QString data = n->nodeValue();
- QRegExp encoding(QString::fromLatin1("encoding\\s*=\\s*((\"([^\"]*)\")|('([^']*)'))"));
- encoding.indexIn(data);
- QString enc = encoding.cap(3);
+ QRegularExpression encoding(QString::fromLatin1("encoding\\s*=\\s*((\"([^\"]*)\")|('([^']*)'))"));
+ auto match = encoding.match(data);
+ QString enc = match.captured(3);
if (enc.isEmpty())
- enc = encoding.cap(5);
+ enc = match.captured(5);
if (!enc.isEmpty())
codec = QTextCodec::codecForName(std::move(enc).toLatin1());
}
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index 7b6669b057..fa31e71cc1 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -43,7 +43,9 @@
#include "qtextcodec.h"
#endif
#include "qbuffer.h"
-#include "qregexp.h"
+#if QT_CONFIG(regularexpression)
+#include "qregularexpression.h"
+#endif
#include "qmap.h"
#include "qhash.h"
#include "qstack.h"
@@ -193,19 +195,23 @@ static const signed char charLookupTable[256]={
*/
static bool stripTextDecl(QString& str)
{
- QString textDeclStart(QLatin1String("<?xml"));
+ QLatin1String textDeclStart("<?xml");
if (str.startsWith(textDeclStart)) {
- QRegExp textDecl(QString::fromLatin1(
+#if QT_CONFIG(regularexpression)
+ QRegularExpression textDecl(QString::fromLatin1(
"^<\\?xml\\s+"
"(version\\s*=\\s*((['\"])[-a-zA-Z0-9_.:]+\\3))?"
"\\s*"
"(encoding\\s*=\\s*((['\"])[A-Za-z][-a-zA-Z0-9_.]*\\6))?"
"\\s*\\?>"
- ));
+ ));
QString strTmp = str.replace(textDecl, QLatin1String(""));
if (strTmp.length() != str.length())
return false; // external entity has wrong TextDecl
str = strTmp;
+#else
+ return false;
+#endif
}
return true;
}
diff --git a/tests/auto/corelib/global/qglobal/qglobal.pro b/tests/auto/corelib/global/qglobal/qglobal.pro
index a40cb9a288..b105769430 100644
--- a/tests/auto/corelib/global/qglobal/qglobal.pro
+++ b/tests/auto/corelib/global/qglobal/qglobal.pro
@@ -2,3 +2,4 @@ CONFIG += testcase
TARGET = tst_qglobal
QT = core testlib
SOURCES = tst_qglobal.cpp qglobal.c
+contains(QT_CONFIG, c++1z): CONFIG += c++1z
diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
index 78b954f373..56da047147 100644
--- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
+++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
@@ -126,6 +126,46 @@ void tst_QGlobal::for_each()
QCOMPARE(i, counter++);
}
QCOMPARE(counter, list.count());
+
+ // Should also work with an existing variable
+ int local;
+ counter = 0;
+ foreach (local, list) {
+ QCOMPARE(local, counter++);
+ }
+ QCOMPARE(counter, list.count());
+ QCOMPARE(local, counter - 1);
+
+ // Test the macro does not mess if/else conditions
+ counter = 0;
+ if (true)
+ foreach (int i, list)
+ QCOMPARE(i, counter++);
+ else
+ QFAIL("If/Else mismatch");
+ QCOMPARE(counter, list.count());
+
+ counter = 0;
+ if (false)
+ foreach (int i, list)
+ if (i) QFAIL("If/Else mismatch");
+ else QFAIL("If/Else mismatch");
+ else
+ foreach (int i, list)
+ if (false) { }
+ else QCOMPARE(i, counter++);
+ QCOMPARE(counter, list.count());
+
+ // break and continue
+ counter = 0;
+ foreach (int i, list) {
+ if (i == 0)
+ continue;
+ QCOMPARE(i, (counter++) + 1);
+ if (i == 3)
+ break;
+ }
+ QCOMPARE(counter, 3);
}
void tst_QGlobal::qassert()
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 017eebe153..714c96b5e5 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -95,6 +95,38 @@ inline bool qIsLikelyToBeNfs(const QString &path)
#endif
}
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+# ifndef SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE // MinGW
+# define SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE (0x2)
+# endif
+
+static DWORD createSymbolicLink(const QString &symLinkName, const QString &target,
+ QString *errorMessage)
+{
+ DWORD result = ERROR_SUCCESS;
+ const QString nativeSymLinkName = QDir::toNativeSeparators(symLinkName);
+ const QString nativeTarget = QDir::toNativeSeparators(target);
+ DWORD flags = 0;
+ if (QOperatingSystemVersion::current() >= QOperatingSystemVersion(QOperatingSystemVersion::Windows, 10, 0, 14972))
+ flags |= SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;
+ if (QFileInfo(target).isDir())
+ flags |= SYMBOLIC_LINK_FLAG_DIRECTORY;
+ if (CreateSymbolicLink(reinterpret_cast<const wchar_t*>(nativeSymLinkName.utf16()),
+ reinterpret_cast<const wchar_t*>(nativeTarget.utf16()), flags) == FALSE) {
+ result = GetLastError();
+ QTextStream(errorMessage) << "CreateSymbolicLink(" << nativeSymLinkName << ", "
+ << nativeTarget << ", 0x" << hex << flags << dec << ") failed with error " << result
+ << ": " << qt_error_string(int(result));
+ }
+ return result;
+}
+
+static QByteArray msgInsufficientPrivileges(const QString &errorMessage)
+{
+ return "Insufficient privileges (" + errorMessage.toLocal8Bit() + ')';
+}
+#endif // Q_OS_WIN && !Q_OS_WINRT
+
static QString seedAndTemplate()
{
QString base;
@@ -704,19 +736,14 @@ void tst_QFileInfo::canonicalFilePath()
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
{
- // CreateSymbolicLink can return TRUE & still fail to create the link,
- // the error code in that case is ERROR_PRIVILEGE_NOT_HELD (1314)
- SetLastError(0);
+ QString errorMessage;
const QString linkTarget = QStringLiteral("res");
- BOOL ret = CreateSymbolicLink((wchar_t*)linkTarget.utf16(), (wchar_t*)m_resourcesDir.utf16(), 1);
- DWORD dwErr = GetLastError();
- if (!ret)
- QSKIP("Symbolic links aren't supported by FS");
+ const DWORD dwErr = createSymbolicLink(linkTarget, m_resourcesDir, &errorMessage);
+ if (dwErr == ERROR_PRIVILEGE_NOT_HELD)
+ QSKIP(msgInsufficientPrivileges(errorMessage));
+ QVERIFY2(dwErr == ERROR_SUCCESS, qPrintable(errorMessage));
QString currentPath = QDir::currentPath();
- bool is_res_Current = QDir::setCurrent(linkTarget);
- if (!is_res_Current && dwErr == 1314)
- QSKIP("Not enough privilages to create Symbolic links");
- QCOMPARE(is_res_Current, true);
+ QVERIFY(QDir::setCurrent(linkTarget));
const QString actualCanonicalPath = QFileInfo("file1").canonicalFilePath();
QVERIFY(QDir::setCurrent(currentPath));
QCOMPARE(actualCanonicalPath, m_resourcesDir + QStringLiteral("/file1"));
@@ -1455,8 +1482,24 @@ void tst_QFileInfo::refresh()
}
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
+
+struct NtfsTestResource {
+
+ enum Type { None, SymLink, Junction };
+
+ explicit NtfsTestResource(Type tp = None, const QString &s = QString(), const QString &t = QString())
+ : source(s), target(t), type(tp) {}
+
+ QString source;
+ QString target;
+ Type type;
+};
+
+Q_DECLARE_METATYPE(NtfsTestResource)
+
void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
{
+ QTest::addColumn<NtfsTestResource>("resource");
QTest::addColumn<QString>("path");
QTest::addColumn<bool>("isSymLink");
QTest::addColumn<QString>("linkTarget");
@@ -1479,32 +1522,20 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
QString fileInSymlink(absSymlink);
fileInSymlink.append("\\file");
QFile file(fileInTarget);
- file.open(QIODevice::ReadWrite);
+ QVERIFY2(file.open(QIODevice::ReadWrite), qPrintable(file.errorString()));
file.close();
- DWORD err = ERROR_SUCCESS ;
- if (!pwd.exists("abs_symlink"))
- if (!CreateSymbolicLink((wchar_t*)absSymlink.utf16(),(wchar_t*)absTarget.utf16(),0x1))
- err = GetLastError();
- if (err == ERROR_SUCCESS && !pwd.exists(relSymlink))
- if (!CreateSymbolicLink((wchar_t*)relSymlink.utf16(),(wchar_t*)relTarget.utf16(),0x1))
- err = GetLastError();
- if (err != ERROR_SUCCESS) {
- wchar_t errstr[0x100];
- DWORD count = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM,
- 0, err, 0, errstr, 0x100, 0);
- QString error(QString::fromWCharArray(errstr, count));
- qWarning() << error;
- //we need at least one data set for the test not to assert fail when skipping _data function
- QDir target("target");
- QTest::newRow("dummy") << target.path() << false << "" << target.canonicalPath();
- QSKIP("link not supported by FS or insufficient privilege");
- }
QVERIFY2(file.exists(), msgDoesNotExist(file.fileName()).constData());
- QTest::newRow("absolute dir symlink") << absSymlink << true << QDir::fromNativeSeparators(absTarget) << target.canonicalPath();
- QTest::newRow("relative dir symlink") << relSymlink << true << QDir::fromNativeSeparators(absTarget) << target.canonicalPath();
- QTest::newRow("file in symlink dir") << fileInSymlink << false << "" << target.canonicalPath().append("/file");
+ QTest::newRow("absolute dir symlink")
+ << NtfsTestResource(NtfsTestResource::SymLink, absSymlink, absTarget)
+ << absSymlink << true << QDir::fromNativeSeparators(absTarget) << target.canonicalPath();
+ QTest::newRow("relative dir symlink")
+ << NtfsTestResource(NtfsTestResource::SymLink, relSymlink, relTarget)
+ << relSymlink << true << QDir::fromNativeSeparators(absTarget) << target.canonicalPath();
+ QTest::newRow("file in symlink dir")
+ << NtfsTestResource()
+ << fileInSymlink << false << "" << target.canonicalPath().append("/file");
}
{
//File symlinks
@@ -1517,33 +1548,41 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
QString relSymlink = "rel_symlink.cpp";
QString relToRelTarget = QDir::toNativeSeparators(relativeDir.relativeFilePath(target.absoluteFilePath()));
QString relToRelSymlink = "relative/rel_symlink";
- QVERIFY(pwd.exists("abs_symlink.cpp") || CreateSymbolicLink((wchar_t*)absSymlink.utf16(),(wchar_t*)absTarget.utf16(),0x0));
- QVERIFY(pwd.exists(relSymlink) || CreateSymbolicLink((wchar_t*)relSymlink.utf16(),(wchar_t*)relTarget.utf16(),0x0));
- QVERIFY(pwd.exists(relToRelSymlink) || CreateSymbolicLink((wchar_t*)relToRelSymlink.utf16(), (wchar_t*)relToRelTarget.utf16(),0x0));
- QTest::newRow("absolute file symlink") << absSymlink << true << QDir::fromNativeSeparators(absTarget) << target.canonicalFilePath();
- QTest::newRow("relative file symlink") << relSymlink << true << QDir::fromNativeSeparators(absTarget) << target.canonicalFilePath();
- QTest::newRow("relative to relative file symlink") << relToRelSymlink << true << QDir::fromNativeSeparators(absTarget) << target.canonicalFilePath();
+
+ QTest::newRow("absolute file symlink")
+ << NtfsTestResource(NtfsTestResource::SymLink, absSymlink, absTarget)
+ << absSymlink << true << QDir::fromNativeSeparators(absTarget) << target.canonicalFilePath();
+ QTest::newRow("relative file symlink")
+ << NtfsTestResource(NtfsTestResource::SymLink, relSymlink, relTarget)
+ << relSymlink << true << QDir::fromNativeSeparators(absTarget) << target.canonicalFilePath();
+ QTest::newRow("relative to relative file symlink")
+ << NtfsTestResource(NtfsTestResource::SymLink, relToRelSymlink, relToRelTarget)
+ << relToRelSymlink << true << QDir::fromNativeSeparators(absTarget) << target.canonicalFilePath();
}
//Junctions
QString target = "target";
QString junction = "junction_pwd";
- FileSystem::createNtfsJunction(target, junction);
QFileInfo targetInfo(target);
- QTest::newRow("junction_pwd") << junction << false << QString() << QString();
+ QTest::newRow("junction_pwd")
+ << NtfsTestResource(NtfsTestResource::Junction, junction, target)
+ << junction << false << QString() << QString();
QFileInfo fileInJunction(targetInfo.absoluteFilePath().append("/file"));
QFile file(fileInJunction.absoluteFilePath());
- file.open(QIODevice::ReadWrite);
+ QVERIFY2(file.open(QIODevice::ReadWrite), qPrintable(file.errorString()));
file.close();
QVERIFY2(file.exists(), msgDoesNotExist(file.fileName()).constData());
- QTest::newRow("file in junction") << fileInJunction.absoluteFilePath() << false << "" << fileInJunction.canonicalFilePath();
+ QTest::newRow("file in junction")
+ << NtfsTestResource()
+ << fileInJunction.absoluteFilePath() << false << QString() << fileInJunction.canonicalFilePath();
target = QDir::rootPath();
junction = "junction_root";
- FileSystem::createNtfsJunction(target, junction);
targetInfo.setFile(target);
- QTest::newRow("junction_root") << junction << false << QString() << QString();
+ QTest::newRow("junction_root")
+ << NtfsTestResource(NtfsTestResource::Junction, junction, target)
+ << junction << false << QString() << QString();
//Mountpoint
wchar_t buffer[MAX_PATH];
@@ -1552,17 +1591,38 @@ void tst_QFileInfo::ntfsJunctionPointsAndSymlinks_data()
QString rootVolume = QString::fromWCharArray(buffer);
junction = "mountpoint";
rootVolume.replace("\\\\?\\","\\??\\");
- FileSystem::createNtfsJunction(rootVolume, junction);
- QTest::newRow("mountpoint") << junction << false << QString() << QString();
+ QTest::newRow("mountpoint")
+ << NtfsTestResource(NtfsTestResource::Junction, junction, rootVolume)
+ << junction << false << QString() << QString();
}
void tst_QFileInfo::ntfsJunctionPointsAndSymlinks()
{
+ QFETCH(NtfsTestResource, resource);
QFETCH(QString, path);
QFETCH(bool, isSymLink);
QFETCH(QString, linkTarget);
QFETCH(QString, canonicalFilePath);
+ QString errorMessage;
+ DWORD creationResult = ERROR_SUCCESS;
+ switch (resource.type) {
+ case NtfsTestResource::None:
+ break;
+ case NtfsTestResource::SymLink:
+ creationResult = createSymbolicLink(resource.source, resource.target, &errorMessage);
+ break;
+ case NtfsTestResource::Junction:
+ creationResult = FileSystem::createNtfsJunction(resource.target, resource.source, &errorMessage);
+ if (creationResult == ERROR_NOT_SUPPORTED) // Special value indicating non-NTFS drive
+ QSKIP(qPrintable(errorMessage));
+ break;
+ }
+
+ if (creationResult == ERROR_PRIVILEGE_NOT_HELD)
+ QSKIP(msgInsufficientPrivileges(errorMessage));
+ QVERIFY2(creationResult == ERROR_SUCCESS, qPrintable(errorMessage));
+
QFileInfo fi(path);
const bool actualIsSymLink = fi.isSymLink();
const QString actualSymLinkTarget = isSymLink ? fi.symLinkTarget() : QString();
@@ -1962,7 +2022,7 @@ static void stateCheck(const QFileInfo &info, const QString &dirname, const QStr
QVERIFY(!info.isRoot());
QCOMPARE(info.isNativePath(), !filename.isEmpty());
- QCOMPARE(info.readLink(), QString());
+ QCOMPARE(info.symLinkTarget(), QString());
QCOMPARE(info.ownerId(), uint(-2));
QCOMPARE(info.groupId(), uint(-2));
QCOMPARE(info.owner(), QString());
diff --git a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
index e0aa577154..c51994c1c1 100644
--- a/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
+++ b/tests/auto/corelib/io/qprocess/tst_qprocess.cpp
@@ -185,12 +185,12 @@ void tst_QProcess::getSetCheck()
{
QProcess obj1;
// ProcessChannelMode QProcess::readChannelMode()
- // void QProcess::setReadChannelMode(ProcessChannelMode)
- obj1.setReadChannelMode(QProcess::ProcessChannelMode(QProcess::SeparateChannels));
+ // void QProcess::setProcessChannelMode(ProcessChannelMode)
+ obj1.setProcessChannelMode(QProcess::ProcessChannelMode(QProcess::SeparateChannels));
QCOMPARE(QProcess::ProcessChannelMode(QProcess::SeparateChannels), obj1.readChannelMode());
- obj1.setReadChannelMode(QProcess::ProcessChannelMode(QProcess::MergedChannels));
+ obj1.setProcessChannelMode(QProcess::ProcessChannelMode(QProcess::MergedChannels));
QCOMPARE(QProcess::ProcessChannelMode(QProcess::MergedChannels), obj1.readChannelMode());
- obj1.setReadChannelMode(QProcess::ProcessChannelMode(QProcess::ForwardedChannels));
+ obj1.setProcessChannelMode(QProcess::ProcessChannelMode(QProcess::ForwardedChannels));
QCOMPARE(QProcess::ProcessChannelMode(QProcess::ForwardedChannels), obj1.readChannelMode());
// ProcessChannel QProcess::readChannel()
@@ -913,7 +913,7 @@ public:
switch (n) {
case 0:
- setReadChannelMode(QProcess::MergedChannels);
+ setProcessChannelMode(QProcess::MergedChannels);
connect(this, &QIODevice::readyRead, this, &SoftExitProcess::terminateSlot);
break;
case 1:
@@ -929,7 +929,7 @@ public:
this, &SoftExitProcess::terminateSlot);
break;
case 4:
- setReadChannelMode(QProcess::MergedChannels);
+ setProcessChannelMode(QProcess::MergedChannels);
connect(this, SIGNAL(channelReadyRead(int)), this, SLOT(terminateSlot()));
break;
default:
@@ -1025,7 +1025,7 @@ void tst_QProcess::softExitInSlots()
void tst_QProcess::mergedChannels()
{
QProcess process;
- process.setReadChannelMode(QProcess::MergedChannels);
+ process.setProcessChannelMode(QProcess::MergedChannels);
QCOMPARE(process.readChannelMode(), QProcess::MergedChannels);
process.start("testProcessEcho2/testProcessEcho2");
@@ -1951,7 +1951,7 @@ void tst_QProcess::setStandardOutputFile()
// run the process
QProcess process;
- process.setReadChannelMode(channelMode);
+ process.setProcessChannelMode(channelMode);
if (channelToTest == QProcess::StandardOutput)
process.setStandardOutputFile(file.fileName(), mode);
else
@@ -2037,7 +2037,7 @@ void tst_QProcess::setStandardOutputProcess()
QFETCH(bool, merged);
QFETCH(bool, waitForBytesWritten);
- source.setReadChannelMode(merged ? QProcess::MergedChannels : QProcess::SeparateChannels);
+ source.setProcessChannelMode(merged ? QProcess::MergedChannels : QProcess::SeparateChannels);
source.setStandardOutputProcess(&sink);
source.start("testProcessEcho2/testProcessEcho2");
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
index dbc3d68e93..cf4ab4902d 100644
--- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -376,7 +376,7 @@ void tst_QTemporaryFile::io()
before.setSecsSinceEpoch(before.toSecsSinceEpoch());
QVERIFY(file.open());
- QVERIFY(file.readLink().isEmpty()); // it's not a link!
+ QVERIFY(file.symLinkTarget().isEmpty()); // it's not a link!
QFile::Permissions perm = file.permissions();
QVERIFY(perm & QFile::ReadOwner);
QVERIFY(file.setPermissions(perm));
diff --git a/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp b/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
index d839141091..25d392b37e 100644
--- a/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
+++ b/tests/auto/corelib/io/qurlquery/tst_qurlquery.cpp
@@ -233,6 +233,14 @@ void tst_QUrlQuery::constructing()
query += qMakePair(QString("prosent"), QString("%"));
copy.setQueryItems(query);
QVERIFY(!copy.isEmpty());
+
+ QUrlQuery fromList = {
+ {QString("type"), QString("login")},
+ {QString("name"), QString::fromUtf8("åge nissemannsen")},
+ {QString("ole&du"), QString::fromUtf8("anne+jørgen=sant")},
+ {QString("prosent"), QString("%")}
+ };
+ QCOMPARE(fromList, copy);
}
void tst_QUrlQuery::addRemove()
diff --git a/tests/auto/corelib/itemmodels/itemmodels.pro b/tests/auto/corelib/itemmodels/itemmodels.pro
index cca350ad43..ffbda6ec40 100644
--- a/tests/auto/corelib/itemmodels/itemmodels.pro
+++ b/tests/auto/corelib/itemmodels/itemmodels.pro
@@ -5,9 +5,11 @@ SUBDIRS = qstringlistmodel
qtHaveModule(gui): SUBDIRS += \
qabstractitemmodel \
qabstractproxymodel \
+ qconcatenatetablesproxymodel \
qidentityproxymodel \
qitemselectionmodel \
qsortfilterproxymodel_recursive \
+ qtransposeproxymodel \
qtHaveModule(widgets) {
SUBDIRS += \
diff --git a/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/qconcatenatetablesproxymodel.pro b/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/qconcatenatetablesproxymodel.pro
new file mode 100644
index 0000000000..ee4ea28b5b
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/qconcatenatetablesproxymodel.pro
@@ -0,0 +1,5 @@
+CONFIG += testcase
+TARGET = tst_qconcatenatetablesproxymodel
+QT = core gui testlib
+
+SOURCES = tst_qconcatenatetablesproxymodel.cpp
diff --git a/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp b/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp
new file mode 100644
index 0000000000..40617c1f7d
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp
@@ -0,0 +1,823 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QSignalSpy>
+#include <QSortFilterProxyModel>
+#include <QTest>
+#include <QStandardItemModel>
+#include <QIdentityProxyModel>
+#include <QItemSelectionModel>
+#include <QMimeData>
+#include <QStringListModel>
+#include <QAbstractItemModelTester>
+
+#include <qconcatenatetablesproxymodel.h>
+
+Q_DECLARE_METATYPE(QModelIndex)
+
+// Extracts a full row from a model as a string
+// Works best if every cell contains only one character
+static QString extractRowTexts(QAbstractItemModel *model, int row, const QModelIndex &parent = QModelIndex())
+{
+ QString result;
+ const int colCount = model->columnCount();
+ for (int col = 0; col < colCount; ++col) {
+ const QString txt = model->index(row, col, parent).data().toString();
+ result += txt.isEmpty() ? QStringLiteral(" ") : txt;
+ }
+ return result;
+}
+
+// Extracts a full column from a model as a string
+// Works best if every cell contains only one character
+static QString extractColumnTexts(QAbstractItemModel *model, int column, const QModelIndex &parent = QModelIndex())
+{
+ QString result;
+ const int rowCount = model->rowCount();
+ for (int row = 0; row < rowCount; ++row) {
+ const QString txt = model->index(row, column, parent).data().toString();
+ result += txt.isEmpty() ? QStringLiteral(" ") : txt;
+ }
+ return result;
+}
+
+static QString rowSpyToText(const QSignalSpy &spy)
+{
+ if (!spy.isValid())
+ return QStringLiteral("THE SIGNALSPY IS INVALID!");
+ QString str;
+ for (int i = 0; i < spy.count(); ++i) {
+ str += spy.at(i).at(1).toString() + QLatin1Char(',') + spy.at(i).at(2).toString();
+ if (i + 1 < spy.count())
+ str += QLatin1Char(';');
+ }
+ return str;
+}
+
+class tst_QConcatenateTablesProxyModel : public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void init();
+ void shouldAggregateTwoModelsCorrectly();
+ void shouldAggregateThenRemoveTwoEmptyModelsCorrectly();
+ void shouldAggregateTwoEmptyModelsWhichThenGetFilled();
+ void shouldHandleDataChanged();
+ void shouldHandleSetData();
+ void shouldHandleSetItemData();
+ void shouldHandleRowInsertionAndRemoval();
+ void shouldAggregateAnotherModelThenRemoveModels();
+ void shouldUseSmallestColumnCount();
+ void shouldIncreaseColumnCountWhenRemovingFirstModel();
+ void shouldHandleColumnInsertionAndRemoval();
+ void shouldPropagateLayoutChanged();
+ void shouldReactToModelReset();
+ void shouldUpdateColumnsOnModelReset();
+ void shouldPropagateDropOnItem_data();
+ void shouldPropagateDropOnItem();
+ void shouldPropagateDropBetweenItems();
+ void shouldPropagateDropBetweenItemsAtModelBoundary();
+ void shouldPropagateDropAfterLastRow_data();
+ void shouldPropagateDropAfterLastRow();
+
+private:
+ QStandardItemModel mod;
+ QStandardItemModel mod2;
+ QStandardItemModel mod3;
+};
+
+void tst_QConcatenateTablesProxyModel::init()
+{
+ // Prepare some source models to use later on
+ mod.clear();
+ mod.appendRow({ new QStandardItem(QStringLiteral("A")), new QStandardItem(QStringLiteral("B")), new QStandardItem(QStringLiteral("C")) });
+ mod.setHorizontalHeaderLabels(QStringList() << QStringLiteral("H1") << QStringLiteral("H2") << QStringLiteral("H3"));
+ mod.setVerticalHeaderLabels(QStringList() << QStringLiteral("One"));
+
+ mod2.clear();
+ mod2.appendRow({ new QStandardItem(QStringLiteral("D")), new QStandardItem(QStringLiteral("E")), new QStandardItem(QStringLiteral("F")) });
+ mod2.setHorizontalHeaderLabels(QStringList() << QStringLiteral("H1") << QStringLiteral("H2") << QStringLiteral("H3"));
+ mod2.setVerticalHeaderLabels(QStringList() << QStringLiteral("Two"));
+
+ mod3.clear();
+ mod3.appendRow({ new QStandardItem(QStringLiteral("1")), new QStandardItem(QStringLiteral("2")), new QStandardItem(QStringLiteral("3")) });
+ mod3.appendRow({ new QStandardItem(QStringLiteral("4")), new QStandardItem(QStringLiteral("5")), new QStandardItem(QStringLiteral("6")) });
+}
+
+void tst_QConcatenateTablesProxyModel::shouldAggregateTwoModelsCorrectly()
+{
+ // Given a combining proxy
+ QConcatenateTablesProxyModel pm;
+
+ // When adding two source models
+ pm.addSourceModel(&mod);
+ pm.addSourceModel(&mod2);
+ QAbstractItemModelTester modelTest(&pm, this);
+
+ // Then the proxy should show 2 rows
+ QCOMPARE(pm.rowCount(), 2);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF"));
+
+ // ... and correct headers
+ QCOMPARE(pm.headerData(0, Qt::Horizontal).toString(), QStringLiteral("H1"));
+ QCOMPARE(pm.headerData(1, Qt::Horizontal).toString(), QStringLiteral("H2"));
+ QCOMPARE(pm.headerData(2, Qt::Horizontal).toString(), QStringLiteral("H3"));
+ QCOMPARE(pm.headerData(0, Qt::Vertical).toString(), QStringLiteral("One"));
+ QCOMPARE(pm.headerData(1, Qt::Vertical).toString(), QStringLiteral("Two"));
+
+ QVERIFY(!pm.canFetchMore(QModelIndex()));
+}
+
+void tst_QConcatenateTablesProxyModel::shouldAggregateThenRemoveTwoEmptyModelsCorrectly()
+{
+ // Given a combining proxy
+ QConcatenateTablesProxyModel pm;
+
+ // When adding two empty models
+ QSignalSpy rowATBISpy(&pm, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)));
+ QSignalSpy rowInsertedSpy(&pm, SIGNAL(rowsInserted(QModelIndex,int,int)));
+ QSignalSpy rowATBRSpy(&pm, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)));
+ QSignalSpy rowRemovedSpy(&pm, SIGNAL(rowsRemoved(QModelIndex,int,int)));
+ QIdentityProxyModel i1, i2;
+ pm.addSourceModel(&i1);
+ pm.addSourceModel(&i2);
+
+ // Then the proxy should still be empty (and no signals emitted)
+ QCOMPARE(pm.rowCount(), 0);
+ QCOMPARE(pm.columnCount(), 0);
+ QCOMPARE(rowATBISpy.count(), 0);
+ QCOMPARE(rowInsertedSpy.count(), 0);
+
+ // When removing the empty models
+ pm.removeSourceModel(&i1);
+ pm.removeSourceModel(&i2);
+
+ // Then the proxy should still be empty (and no signals emitted)
+ QCOMPARE(pm.rowCount(), 0);
+ QCOMPARE(pm.columnCount(), 0);
+ QCOMPARE(rowATBRSpy.count(), 0);
+ QCOMPARE(rowRemovedSpy.count(), 0);
+}
+
+void tst_QConcatenateTablesProxyModel::shouldAggregateTwoEmptyModelsWhichThenGetFilled()
+{
+ // Given a combining proxy with two empty models
+ QConcatenateTablesProxyModel pm;
+ QIdentityProxyModel i1, i2;
+ pm.addSourceModel(&i1);
+ pm.addSourceModel(&i2);
+
+ // When filling them afterwards
+ i1.setSourceModel(&mod);
+ i2.setSourceModel(&mod2);
+ QAbstractItemModelTester modelTest(&pm, this);
+
+ // Then the proxy should show 2 rows
+ QCOMPARE(pm.rowCount(), 2);
+ QCOMPARE(pm.columnCount(), 3);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF"));
+
+ // ... and correct headers
+ QCOMPARE(pm.headerData(0, Qt::Horizontal).toString(), QStringLiteral("H1"));
+ QCOMPARE(pm.headerData(1, Qt::Horizontal).toString(), QStringLiteral("H2"));
+ QCOMPARE(pm.headerData(2, Qt::Horizontal).toString(), QStringLiteral("H3"));
+ QCOMPARE(pm.headerData(0, Qt::Vertical).toString(), QStringLiteral("One"));
+ QCOMPARE(pm.headerData(1, Qt::Vertical).toString(), QStringLiteral("Two"));
+
+ QVERIFY(!pm.canFetchMore(QModelIndex()));
+}
+
+void tst_QConcatenateTablesProxyModel::shouldHandleDataChanged()
+{
+ // Given two models combined
+ QConcatenateTablesProxyModel pm;
+ pm.addSourceModel(&mod);
+ pm.addSourceModel(&mod2);
+ QAbstractItemModelTester modelTest(&pm, this);
+ QSignalSpy dataChangedSpy(&pm, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
+
+ // When a cell in a source model changes
+ mod.item(0, 0)->setData("a", Qt::EditRole);
+
+ // Then the change should be notified to the proxy
+ QCOMPARE(dataChangedSpy.count(), 1);
+ QCOMPARE(dataChangedSpy.at(0).at(0).toModelIndex(), pm.index(0, 0));
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("aBC"));
+
+ // Same test with the other model
+ mod2.item(0, 2)->setData("f", Qt::EditRole);
+
+ QCOMPARE(dataChangedSpy.count(), 2);
+ QCOMPARE(dataChangedSpy.at(1).at(0).toModelIndex(), pm.index(1, 2));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEf"));
+}
+
+void tst_QConcatenateTablesProxyModel::shouldHandleSetData()
+{
+ // Given two models combined
+ QConcatenateTablesProxyModel pm;
+ pm.addSourceModel(&mod);
+ pm.addSourceModel(&mod2);
+ QAbstractItemModelTester modelTest(&pm, this);
+ QSignalSpy dataChangedSpy(&pm, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
+
+ // When changing a cell using setData
+ pm.setData(pm.index(0, 0), "a");
+
+ // Then the change should be notified to the proxy
+ QCOMPARE(dataChangedSpy.count(), 1);
+ QCOMPARE(dataChangedSpy.at(0).at(0).toModelIndex(), pm.index(0, 0));
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("aBC"));
+
+ // Same test with the other model
+ pm.setData(pm.index(1, 2), "f");
+
+ QCOMPARE(dataChangedSpy.count(), 2);
+ QCOMPARE(dataChangedSpy.at(1).at(0).toModelIndex(), pm.index(1, 2));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEf"));
+}
+
+void tst_QConcatenateTablesProxyModel::shouldHandleSetItemData()
+{
+ // Given two models combined
+ QConcatenateTablesProxyModel pm;
+ pm.addSourceModel(&mod);
+ pm.addSourceModel(&mod2);
+ QAbstractItemModelTester modelTest(&pm, this);
+ QSignalSpy dataChangedSpy(&pm, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
+
+ // When changing a cell using setData
+ pm.setItemData(pm.index(0, 0), QMap<int, QVariant>{ std::make_pair<int, QVariant>(Qt::DisplayRole, QStringLiteral("X")),
+ std::make_pair<int, QVariant>(Qt::UserRole, 88) });
+
+ // Then the change should be notified to the proxy
+ QCOMPARE(dataChangedSpy.count(), 1);
+ QCOMPARE(dataChangedSpy.at(0).at(0).toModelIndex(), pm.index(0, 0));
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("XBC"));
+ QCOMPARE(pm.index(0, 0).data(Qt::UserRole).toInt(), 88);
+
+ // Same test with the other model
+ pm.setItemData(pm.index(1, 2), QMap<int, QVariant>{ std::make_pair<int, QVariant>(Qt::DisplayRole, QStringLiteral("Y")),
+ std::make_pair<int, QVariant>(Qt::UserRole, 89) });
+
+ QCOMPARE(dataChangedSpy.count(), 2);
+ QCOMPARE(dataChangedSpy.at(1).at(0).toModelIndex(), pm.index(1, 2));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEY"));
+ QCOMPARE(pm.index(1, 2).data(Qt::UserRole).toInt(), 89);
+}
+
+void tst_QConcatenateTablesProxyModel::shouldHandleRowInsertionAndRemoval()
+{
+ // Given two models combined
+ QConcatenateTablesProxyModel pm;
+ pm.addSourceModel(&mod);
+ pm.addSourceModel(&mod2);
+ QAbstractItemModelTester modelTest(&pm, this);
+ QSignalSpy rowATBISpy(&pm, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)));
+ QSignalSpy rowInsertedSpy(&pm, SIGNAL(rowsInserted(QModelIndex,int,int)));
+
+ // When a source model inserts a new row
+ QList<QStandardItem *> row;
+ row.append(new QStandardItem(QStringLiteral("1")));
+ row.append(new QStandardItem(QStringLiteral("2")));
+ row.append(new QStandardItem(QStringLiteral("3")));
+ mod2.insertRow(0, row);
+
+ // Then the proxy should notify its users and show changes
+ QCOMPARE(rowSpyToText(rowATBISpy), QStringLiteral("1,1"));
+ QCOMPARE(rowSpyToText(rowInsertedSpy), QStringLiteral("1,1"));
+ QCOMPARE(pm.rowCount(), 3);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("123"));
+ QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("DEF"));
+
+ // When removing that row
+ QSignalSpy rowATBRSpy(&pm, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)));
+ QSignalSpy rowRemovedSpy(&pm, SIGNAL(rowsRemoved(QModelIndex,int,int)));
+ mod2.removeRow(0);
+
+ // Then the proxy should notify its users and show changes
+ QCOMPARE(rowATBRSpy.count(), 1);
+ QCOMPARE(rowATBRSpy.at(0).at(1).toInt(), 1);
+ QCOMPARE(rowATBRSpy.at(0).at(2).toInt(), 1);
+ QCOMPARE(rowRemovedSpy.count(), 1);
+ QCOMPARE(rowRemovedSpy.at(0).at(1).toInt(), 1);
+ QCOMPARE(rowRemovedSpy.at(0).at(2).toInt(), 1);
+ QCOMPARE(pm.rowCount(), 2);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF"));
+
+ // When removing the last row from mod2
+ rowATBRSpy.clear();
+ rowRemovedSpy.clear();
+ mod2.removeRow(0);
+
+ // Then the proxy should notify its users and show changes
+ QCOMPARE(rowATBRSpy.count(), 1);
+ QCOMPARE(rowATBRSpy.at(0).at(1).toInt(), 1);
+ QCOMPARE(rowATBRSpy.at(0).at(2).toInt(), 1);
+ QCOMPARE(rowRemovedSpy.count(), 1);
+ QCOMPARE(rowRemovedSpy.at(0).at(1).toInt(), 1);
+ QCOMPARE(rowRemovedSpy.at(0).at(2).toInt(), 1);
+ QCOMPARE(pm.rowCount(), 1);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC"));
+}
+
+void tst_QConcatenateTablesProxyModel::shouldAggregateAnotherModelThenRemoveModels()
+{
+ // Given two models combined, and a third model
+ QConcatenateTablesProxyModel pm;
+ pm.addSourceModel(&mod);
+ pm.addSourceModel(&mod2);
+ QAbstractItemModelTester modelTest(&pm, this);
+
+ QSignalSpy rowATBISpy(&pm, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)));
+ QSignalSpy rowInsertedSpy(&pm, SIGNAL(rowsInserted(QModelIndex,int,int)));
+
+ // When adding the new source model
+ pm.addSourceModel(&mod3);
+
+ // Then the proxy should notify its users about the two rows inserted
+ QCOMPARE(rowSpyToText(rowATBISpy), QStringLiteral("2,3"));
+ QCOMPARE(rowSpyToText(rowInsertedSpy), QStringLiteral("2,3"));
+ QCOMPARE(pm.rowCount(), 4);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF"));
+ QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("123"));
+ QCOMPARE(extractRowTexts(&pm, 3), QStringLiteral("456"));
+
+ // When removing that source model again
+ QSignalSpy rowATBRSpy(&pm, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)));
+ QSignalSpy rowRemovedSpy(&pm, SIGNAL(rowsRemoved(QModelIndex,int,int)));
+ pm.removeSourceModel(&mod3);
+
+ // Then the proxy should notify its users about the row removed
+ QCOMPARE(rowATBRSpy.count(), 1);
+ QCOMPARE(rowATBRSpy.at(0).at(1).toInt(), 2);
+ QCOMPARE(rowATBRSpy.at(0).at(2).toInt(), 3);
+ QCOMPARE(rowRemovedSpy.count(), 1);
+ QCOMPARE(rowRemovedSpy.at(0).at(1).toInt(), 2);
+ QCOMPARE(rowRemovedSpy.at(0).at(2).toInt(), 3);
+ QCOMPARE(pm.rowCount(), 2);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF"));
+
+ // When removing model 2
+ rowATBRSpy.clear();
+ rowRemovedSpy.clear();
+ pm.removeSourceModel(&mod2);
+ QCOMPARE(rowATBRSpy.count(), 1);
+ QCOMPARE(rowATBRSpy.at(0).at(1).toInt(), 1);
+ QCOMPARE(rowATBRSpy.at(0).at(2).toInt(), 1);
+ QCOMPARE(rowRemovedSpy.count(), 1);
+ QCOMPARE(rowRemovedSpy.at(0).at(1).toInt(), 1);
+ QCOMPARE(rowRemovedSpy.at(0).at(2).toInt(), 1);
+ QCOMPARE(pm.rowCount(), 1);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC"));
+
+ // When removing model 1
+ rowATBRSpy.clear();
+ rowRemovedSpy.clear();
+ pm.removeSourceModel(&mod);
+ QCOMPARE(rowATBRSpy.count(), 1);
+ QCOMPARE(rowATBRSpy.at(0).at(1).toInt(), 0);
+ QCOMPARE(rowATBRSpy.at(0).at(2).toInt(), 0);
+ QCOMPARE(rowRemovedSpy.count(), 1);
+ QCOMPARE(rowRemovedSpy.at(0).at(1).toInt(), 0);
+ QCOMPARE(rowRemovedSpy.at(0).at(2).toInt(), 0);
+ QCOMPARE(pm.rowCount(), 0);
+}
+
+void tst_QConcatenateTablesProxyModel::shouldUseSmallestColumnCount()
+{
+ QConcatenateTablesProxyModel pm;
+ pm.addSourceModel(&mod);
+ pm.addSourceModel(&mod2);
+ mod2.setColumnCount(1);
+ pm.addSourceModel(&mod3);
+ QAbstractItemModelTester modelTest(&pm, this);
+
+ QCOMPARE(pm.rowCount(), 4);
+ QCOMPARE(pm.columnCount(), 1);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("A"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("D"));
+ QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("1"));
+ QCOMPARE(extractRowTexts(&pm, 3), QStringLiteral("4"));
+
+ const QModelIndex indexA = pm.mapFromSource(mod.index(0, 0));
+ QVERIFY(indexA.isValid());
+ QCOMPARE(indexA, pm.index(0, 0));
+
+ const QModelIndex indexB = pm.mapFromSource(mod.index(0, 1));
+ QVERIFY(!indexB.isValid());
+
+ const QModelIndex indexD = pm.mapFromSource(mod2.index(0, 0));
+ QVERIFY(indexD.isValid());
+ QCOMPARE(indexD, pm.index(1, 0));
+}
+
+void tst_QConcatenateTablesProxyModel::shouldIncreaseColumnCountWhenRemovingFirstModel()
+{
+ // Given a model with 2 columns and one with 3 columns
+ QConcatenateTablesProxyModel pm;
+ pm.addSourceModel(&mod);
+ QAbstractItemModelTester modelTest(&pm, this);
+ mod.setColumnCount(2);
+ pm.addSourceModel(&mod2);
+ QCOMPARE(pm.rowCount(), 2);
+ QCOMPARE(pm.columnCount(), 2);
+
+ QSignalSpy colATBISpy(&pm, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)));
+ QSignalSpy colInsertedSpy(&pm, SIGNAL(columnsInserted(QModelIndex,int,int)));
+ QSignalSpy rowATBRSpy(&pm, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)));
+ QSignalSpy rowRemovedSpy(&pm, SIGNAL(rowsRemoved(QModelIndex,int,int)));
+
+ // When removing the first source model
+ pm.removeSourceModel(&mod);
+
+ // Then the proxy should notify its users about the row removed, and the column added
+ QCOMPARE(pm.rowCount(), 1);
+ QCOMPARE(pm.columnCount(), 3);
+ QCOMPARE(rowSpyToText(rowATBRSpy), QStringLiteral("0,0"));
+ QCOMPARE(rowSpyToText(rowRemovedSpy), QStringLiteral("0,0"));
+ QCOMPARE(rowSpyToText(colATBISpy), QStringLiteral("2,2"));
+ QCOMPARE(rowSpyToText(colInsertedSpy), QStringLiteral("2,2"));
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("DEF"));
+}
+
+void tst_QConcatenateTablesProxyModel::shouldHandleColumnInsertionAndRemoval()
+{
+ // Given two models combined, one with 2 columns and one with 3
+ QConcatenateTablesProxyModel pm;
+ pm.addSourceModel(&mod);
+ QAbstractItemModelTester modelTest(&pm, this);
+ mod.setColumnCount(2);
+ pm.addSourceModel(&mod2);
+ QSignalSpy colATBISpy(&pm, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)));
+ QSignalSpy colInsertedSpy(&pm, SIGNAL(columnsInserted(QModelIndex,int,int)));
+ QSignalSpy colATBRSpy(&pm, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)));
+ QSignalSpy colRemovedSpy(&pm, SIGNAL(columnsRemoved(QModelIndex,int,int)));
+
+ // When the first source model inserts a new column
+ QCOMPARE(mod.columnCount(), 2);
+ mod.setColumnCount(3);
+
+ // Then the proxy should notify its users and show changes
+ QCOMPARE(rowSpyToText(colATBISpy), QStringLiteral("2,2"));
+ QCOMPARE(rowSpyToText(colInsertedSpy), QStringLiteral("2,2"));
+ QCOMPARE(pm.rowCount(), 2);
+ QCOMPARE(pm.columnCount(), 3);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("AB "));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF"));
+
+ // And when removing two columns
+ mod.setColumnCount(1);
+
+ // Then the proxy should notify its users and show changes
+ QCOMPARE(rowSpyToText(colATBRSpy), QStringLiteral("1,2"));
+ QCOMPARE(rowSpyToText(colRemovedSpy), QStringLiteral("1,2"));
+ QCOMPARE(pm.rowCount(), 2);
+ QCOMPARE(pm.columnCount(), 1);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("A"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("D"));
+}
+
+void tst_QConcatenateTablesProxyModel::shouldPropagateLayoutChanged()
+{
+ // Given two source models, the second one being a QSFPM
+ QConcatenateTablesProxyModel pm;
+ pm.addSourceModel(&mod);
+ QAbstractItemModelTester modelTest(&pm, this);
+
+ QSortFilterProxyModel qsfpm;
+ qsfpm.setSourceModel(&mod3);
+ pm.addSourceModel(&qsfpm);
+
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("123"));
+ QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("456"));
+
+ // And a selection (row 1)
+ QItemSelectionModel selection(&pm);
+ selection.select(pm.index(1, 0), QItemSelectionModel::Select | QItemSelectionModel::Rows);
+ const QModelIndexList lst = selection.selectedIndexes();
+ QCOMPARE(lst.count(), 3);
+ for (int col = 0; col < lst.count(); ++col) {
+ QCOMPARE(lst.at(col).row(), 1);
+ QCOMPARE(lst.at(col).column(), col);
+ }
+
+ QSignalSpy layoutATBCSpy(&pm, SIGNAL(layoutAboutToBeChanged()));
+ QSignalSpy layoutChangedSpy(&pm, SIGNAL(layoutChanged()));
+
+ // When changing the sorting in the QSFPM
+ qsfpm.sort(0, Qt::DescendingOrder);
+
+ // Then the proxy should emit the layoutChanged signals, and show re-sorted data
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("456"));
+ QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("123"));
+ QCOMPARE(layoutATBCSpy.count(), 1);
+ QCOMPARE(layoutChangedSpy.count(), 1);
+
+ // And the selection should be updated accordingly (it became row 2)
+ const QModelIndexList lstAfter = selection.selectedIndexes();
+ QCOMPARE(lstAfter.count(), 3);
+ for (int col = 0; col < lstAfter.count(); ++col) {
+ QCOMPARE(lstAfter.at(col).row(), 2);
+ QCOMPARE(lstAfter.at(col).column(), col);
+ }
+}
+
+void tst_QConcatenateTablesProxyModel::shouldReactToModelReset()
+{
+ // Given two source models, the second one being a QSFPM
+ QConcatenateTablesProxyModel pm;
+ pm.addSourceModel(&mod);
+ QAbstractItemModelTester modelTest(&pm, this);
+
+ QSortFilterProxyModel qsfpm;
+ qsfpm.setSourceModel(&mod3);
+ pm.addSourceModel(&qsfpm);
+
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("123"));
+ QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("456"));
+ QSignalSpy rowATBRSpy(&pm, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)));
+ QSignalSpy rowRemovedSpy(&pm, SIGNAL(rowsRemoved(QModelIndex,int,int)));
+ QSignalSpy rowATBISpy(&pm, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)));
+ QSignalSpy rowInsertedSpy(&pm, SIGNAL(rowsInserted(QModelIndex,int,int)));
+ QSignalSpy colATBRSpy(&pm, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)));
+ QSignalSpy colRemovedSpy(&pm, SIGNAL(columnsRemoved(QModelIndex,int,int)));
+ QSignalSpy modelATBResetSpy(&pm, SIGNAL(modelAboutToBeReset()));
+ QSignalSpy modelResetSpy(&pm, SIGNAL(modelReset()));
+
+ // When changing the source model of the QSFPM
+ qsfpm.setSourceModel(&mod2);
+
+ // Then the proxy should emit the reset signals, and show the new data
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF"));
+ QCOMPARE(rowATBRSpy.count(), 0);
+ QCOMPARE(rowRemovedSpy.count(), 0);
+ QCOMPARE(rowATBISpy.count(), 0);
+ QCOMPARE(rowInsertedSpy.count(), 0);
+ QCOMPARE(colATBRSpy.count(), 0);
+ QCOMPARE(colRemovedSpy.count(), 0);
+ QCOMPARE(modelATBResetSpy.count(), 1);
+ QCOMPARE(modelResetSpy.count(), 1);
+}
+
+void tst_QConcatenateTablesProxyModel::shouldUpdateColumnsOnModelReset()
+{
+ // Given two source models, the first one being a QSFPM
+ QConcatenateTablesProxyModel pm;
+
+ QSortFilterProxyModel qsfpm;
+ qsfpm.setSourceModel(&mod3);
+ pm.addSourceModel(&qsfpm);
+ pm.addSourceModel(&mod);
+ QAbstractItemModelTester modelTest(&pm, this);
+
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("123"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("456"));
+ QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("ABC"));
+
+ // ... and a model with only 2 columns
+ QStandardItemModel mod2Columns;
+ mod2Columns.appendRow({ new QStandardItem(QStringLiteral("W")), new QStandardItem(QStringLiteral("X")) });
+
+ QSignalSpy rowATBRSpy(&pm, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)));
+ QSignalSpy rowRemovedSpy(&pm, SIGNAL(rowsRemoved(QModelIndex,int,int)));
+ QSignalSpy rowATBISpy(&pm, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)));
+ QSignalSpy rowInsertedSpy(&pm, SIGNAL(rowsInserted(QModelIndex,int,int)));
+ QSignalSpy colATBRSpy(&pm, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)));
+ QSignalSpy colRemovedSpy(&pm, SIGNAL(columnsRemoved(QModelIndex,int,int)));
+ QSignalSpy modelATBResetSpy(&pm, SIGNAL(modelAboutToBeReset()));
+ QSignalSpy modelResetSpy(&pm, SIGNAL(modelReset()));
+
+ // When changing the source model of the QSFPM
+ qsfpm.setSourceModel(&mod2Columns);
+
+ // Then the proxy should reset, and show the new data
+ QCOMPARE(modelATBResetSpy.count(), 1);
+ QCOMPARE(modelResetSpy.count(), 1);
+ QCOMPARE(rowATBRSpy.count(), 0);
+ QCOMPARE(rowRemovedSpy.count(), 0);
+ QCOMPARE(rowATBISpy.count(), 0);
+ QCOMPARE(rowInsertedSpy.count(), 0);
+ QCOMPARE(colATBRSpy.count(), 0);
+ QCOMPARE(colRemovedSpy.count(), 0);
+
+ QCOMPARE(pm.rowCount(), 2);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("WX"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("AB"));
+}
+
+void tst_QConcatenateTablesProxyModel::shouldPropagateDropOnItem_data()
+{
+ QTest::addColumn<int>("sourceRow");
+ QTest::addColumn<int>("destRow");
+ QTest::addColumn<QString>("expectedResult");
+
+ QTest::newRow("0-3") << 0 << 3 << QStringLiteral("ABCA");
+ QTest::newRow("1-2") << 1 << 2 << QStringLiteral("ABBD");
+ QTest::newRow("2-1") << 2 << 1 << QStringLiteral("ACCD");
+ QTest::newRow("3-0") << 3 << 0 << QStringLiteral("DBCD");
+
+}
+
+void tst_QConcatenateTablesProxyModel::shouldPropagateDropOnItem()
+{
+ // Given two source models who handle drops
+
+ // Note: QStandardItemModel handles drop onto items by inserting child rows,
+ // which is good for QTreeView but not for QTableView or QConcatenateTablesProxyModel.
+ // So we use QStringListModel here instead.
+ QConcatenateTablesProxyModel pm;
+ QStringListModel model1({QStringLiteral("A"), QStringLiteral("B")});
+ QStringListModel model2({QStringLiteral("C"), QStringLiteral("D")});
+ pm.addSourceModel(&model1);
+ pm.addSourceModel(&model2);
+ QAbstractItemModelTester modelTest(&pm, this);
+ QCOMPARE(extractColumnTexts(&pm, 0), QStringLiteral("ABCD"));
+
+ // When dragging one item
+ QFETCH(int, sourceRow);
+ QMimeData* mimeData = pm.mimeData({pm.index(sourceRow, 0)});
+ QVERIFY(mimeData);
+
+ // and dropping onto another item
+ QFETCH(int, destRow);
+ QVERIFY(pm.canDropMimeData(mimeData, Qt::CopyAction, -1, -1, pm.index(destRow, 0)));
+ QVERIFY(pm.dropMimeData(mimeData, Qt::CopyAction, -1, -1, pm.index(destRow, 0)));
+ delete mimeData;
+
+ // Then the result should be as expected
+ QFETCH(QString, expectedResult);
+ QCOMPARE(extractColumnTexts(&pm, 0), expectedResult);
+}
+
+void tst_QConcatenateTablesProxyModel::shouldPropagateDropBetweenItems()
+{
+ // Given two models combined
+ QConcatenateTablesProxyModel pm;
+ pm.addSourceModel(&mod3);
+ pm.addSourceModel(&mod2);
+ QAbstractItemModelTester modelTest(&pm, this);
+ QCOMPARE(pm.rowCount(), 3);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("123"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("456"));
+ QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("DEF"));
+
+ // When dragging the last row
+ QModelIndexList indexes;
+ indexes.reserve(pm.columnCount());
+ for (int col = 0; col < pm.columnCount(); ++col) {
+ indexes.append(pm.index(2, col));
+ }
+ QMimeData* mimeData = pm.mimeData(indexes);
+ QVERIFY(mimeData);
+
+ // and dropping it before row 1
+ const int destRow = 1;
+ QVERIFY(pm.canDropMimeData(mimeData, Qt::CopyAction, destRow, 0, QModelIndex()));
+ QVERIFY(pm.dropMimeData(mimeData, Qt::CopyAction, destRow, 0, QModelIndex()));
+ delete mimeData;
+
+ // Then a new row should be inserted
+ QCOMPARE(pm.rowCount(), 4);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("123"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF"));
+ QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("456"));
+ QCOMPARE(extractRowTexts(&pm, 3), QStringLiteral("DEF"));
+}
+
+void tst_QConcatenateTablesProxyModel::shouldPropagateDropBetweenItemsAtModelBoundary()
+{
+ // Given two models combined
+ QConcatenateTablesProxyModel pm;
+ pm.addSourceModel(&mod3);
+ pm.addSourceModel(&mod2);
+ QAbstractItemModelTester modelTest(&pm, this);
+ QCOMPARE(pm.rowCount(), 3);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("123"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("456"));
+ QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("DEF"));
+
+ // When dragging the first row
+ QModelIndexList indexes;
+ indexes.reserve(pm.columnCount());
+ for (int col = 0; col < pm.columnCount(); ++col) {
+ indexes.append(pm.index(0, col));
+ }
+ QMimeData* mimeData = pm.mimeData(indexes);
+ QVERIFY(mimeData);
+
+ // and dropping it before row 2
+ const int destRow = 2;
+ QVERIFY(pm.canDropMimeData(mimeData, Qt::CopyAction, destRow, 0, QModelIndex()));
+ QVERIFY(pm.dropMimeData(mimeData, Qt::CopyAction, destRow, 0, QModelIndex()));
+ delete mimeData;
+
+ // Then a new row should be inserted
+ QCOMPARE(pm.rowCount(), 4);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("123"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("456"));
+ QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("123"));
+ QCOMPARE(extractRowTexts(&pm, 3), QStringLiteral("DEF"));
+
+ // and it should be part of the second model
+ QCOMPARE(mod2.rowCount(), 2);
+}
+
+void tst_QConcatenateTablesProxyModel::shouldPropagateDropAfterLastRow_data()
+{
+ QTest::addColumn<int>("destRow");
+
+ // Dropping after the last row is documented to be done with destRow == -1.
+ QTest::newRow("-1") << -1;
+ // However, sometimes QTreeView calls dropMimeData with destRow == rowCount...
+ // Not sure if that's a bug or not, but let's support it in the model, just in case.
+ QTest::newRow("3") << 3;
+}
+
+void tst_QConcatenateTablesProxyModel::shouldPropagateDropAfterLastRow()
+{
+ QFETCH(int, destRow);
+
+ // Given two models combined
+ QConcatenateTablesProxyModel pm;
+ pm.addSourceModel(&mod3);
+ pm.addSourceModel(&mod2);
+ QAbstractItemModelTester modelTest(&pm, this);
+ QCOMPARE(pm.rowCount(), 3);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("123"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("456"));
+ QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("DEF"));
+
+ // When dragging the second row
+ QModelIndexList indexes;
+ indexes.reserve(pm.columnCount());
+ for (int col = 0; col < pm.columnCount(); ++col) {
+ indexes.append(pm.index(1, col));
+ }
+ QMimeData* mimeData = pm.mimeData(indexes);
+ QVERIFY(mimeData);
+
+ // and dropping it after the last row
+ QVERIFY(pm.canDropMimeData(mimeData, Qt::CopyAction, destRow, 0, QModelIndex()));
+ QVERIFY(pm.dropMimeData(mimeData, Qt::CopyAction, destRow, 0, QModelIndex()));
+ delete mimeData;
+
+ // Then a new row should be inserted at the end
+ QCOMPARE(pm.rowCount(), 4);
+ QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("123"));
+ QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("456"));
+ QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("DEF"));
+ QCOMPARE(extractRowTexts(&pm, 3), QStringLiteral("456"));
+
+}
+
+QTEST_GUILESS_MAIN(tst_QConcatenateTablesProxyModel)
+
+#include "tst_qconcatenatetablesproxymodel.moc"
diff --git a/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp b/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
index 6ea7a38137..dbc7173028 100644
--- a/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
+++ b/tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
@@ -251,7 +251,7 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
QString val = xval + QString::number(y) + QString::number(i);
QModelIndex index = model->index(x, y, parent);
model->setData(index, val);
- model->setData(index, blue, Qt::TextColorRole);
+ model->setData(index, blue, Qt::ForegroundRole);
}
}
*/
@@ -276,7 +276,7 @@ QModelIndex ModelsToTest::populateTestArea(QAbstractItemModel *model)
QString val = xval + QString::number(y) + QString::number(i);
QModelIndex index = realModel->index(x, y, parent);
realModel->setData(index, val);
- realModel->setData(index, blue, Qt::TextColorRole);
+ realModel->setData(index, blue, Qt::ForegroundRole);
}
}
*/
diff --git a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp
index 7cd220e684..da13b9f33f 100644
--- a/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qitemmodel/tst_qitemmodel.cpp
@@ -576,12 +576,12 @@ void tst_QItemModel::data()
alignment == Qt::AlignJustify);
}
- QVariant colorVariant = currentModel->data(currentModel->index(0,0), Qt::BackgroundColorRole);
+ QVariant colorVariant = currentModel->data(currentModel->index(0,0), Qt::BackgroundRole);
if (colorVariant.isValid()) {
QVERIFY(colorVariant.canConvert<QColor>());
}
- colorVariant = currentModel->data(currentModel->index(0,0), Qt::TextColorRole);
+ colorVariant = currentModel->data(currentModel->index(0,0), Qt::ForegroundRole);
if (colorVariant.isValid()) {
QVERIFY(colorVariant.canConvert<QColor>());
}
diff --git a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
index 1b40e77648..0b8686560c 100644
--- a/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
@@ -84,8 +84,116 @@ private slots:
void setData_emits_on_change_only();
void supportedDragDropActions();
+
+ void moveRows_data();
+ void moveRows();
+ void moveRowsInvalid_data();
+ void moveRowsInvalid();
+
+ void itemData();
+ void setItemData();
};
+void tst_QStringListModel::moveRowsInvalid_data()
+{
+ QTest::addColumn<QStringListModel*>("baseModel");
+ QTest::addColumn<QModelIndex>("startParent");
+ QTest::addColumn<int>("startRow");
+ QTest::addColumn<int>("count");
+ QTest::addColumn<QModelIndex>("destinationParent");
+ QTest::addColumn<int>("destination");
+
+ QStringListModel* tempModel = new QStringListModel(QStringList{"A", "B", "C", "D", "E", "F"}, this);
+ QTest::addRow("destination_equal_source") << tempModel << QModelIndex() << 0 << 1 << QModelIndex() << 1;
+ tempModel = new QStringListModel(QStringList{"A", "B", "C", "D", "E", "F"}, this);
+ QTest::addRow("count_equal_0") << tempModel << QModelIndex() << 0 << 0 << QModelIndex() << 2;
+ tempModel = new QStringListModel(QStringList{"A", "B", "C", "D", "E", "F"}, this);
+ QTest::addRow("move_child") << tempModel << tempModel->index(0, 0) << 0 << 1 << QModelIndex() << 2;
+ tempModel = new QStringListModel(QStringList{"A", "B", "C", "D", "E", "F"}, this);
+ QTest::addRow("move_to_child") << tempModel << QModelIndex() << 0 << 1 << tempModel->index(0, 0) << 2;
+ tempModel = new QStringListModel(QStringList{"A", "B", "C", "D", "E", "F"}, this);
+ QTest::addRow("negative_count") << tempModel << QModelIndex() << 0 << -1 << QModelIndex() << 2;
+ tempModel = new QStringListModel(QStringList{"A", "B", "C", "D", "E", "F"}, this);
+ QTest::addRow("negative_source_row") << tempModel << QModelIndex() << -1 << 1 << QModelIndex() << 2;
+ tempModel = new QStringListModel(QStringList{"A", "B", "C", "D", "E", "F"}, this);
+ QTest::addRow("negative_destination_row") << tempModel << QModelIndex() << 0 << 1 << QModelIndex() << -1;
+ tempModel = new QStringListModel(QStringList{"A", "B", "C", "D", "E", "F"}, this);
+ QTest::addRow("source_row_equal_rowCount") << tempModel << QModelIndex() << tempModel->rowCount() << 1 << QModelIndex() << 1;
+ tempModel = new QStringListModel(QStringList{"A", "B", "C", "D", "E", "F"}, this);
+ QTest::addRow("destination_row_greater_rowCount") << tempModel << QModelIndex() << 0 << 1 << QModelIndex() << tempModel->rowCount() + 1;
+ tempModel = new QStringListModel(QStringList{"A", "B", "C", "D", "E", "F"}, this);
+ QTest::addRow("move_row_within_source_range") << tempModel << QModelIndex() << 0 << 3 << QModelIndex() << 2;
+ tempModel = new QStringListModel(QStringList{"A", "B", "C", "D", "E", "F"}, this);
+ QTest::addRow("destination_row_before_0") << tempModel << QModelIndex() << 1 << 1 << QModelIndex() << 0;
+}
+
+void tst_QStringListModel::moveRowsInvalid()
+{
+ QFETCH(QStringListModel* const, baseModel);
+ QFETCH(const QModelIndex, startParent);
+ QFETCH(const int, startRow);
+ QFETCH(const int, count);
+ QFETCH(const QModelIndex, destinationParent);
+ QFETCH(const int, destination);
+
+ QSignalSpy rowMovedSpy(baseModel, &QAbstractItemModel::rowsMoved);
+ QSignalSpy rowAboutMovedSpy(baseModel, &QAbstractItemModel::rowsAboutToBeMoved);
+ QVERIFY(rowMovedSpy.isValid());
+ QVERIFY(rowAboutMovedSpy.isValid());
+ QVERIFY(!baseModel->moveRows(startParent, startRow, count, destinationParent, destination));
+ QCOMPARE(rowMovedSpy.size(), 0);
+ QCOMPARE(rowAboutMovedSpy.size(), 0);
+ delete baseModel;
+}
+
+void tst_QStringListModel::moveRows_data()
+{
+ QTest::addColumn<int>("startRow");
+ QTest::addColumn<int>("count");
+ QTest::addColumn<int>("destination");
+ QTest::addColumn<QStringList>("expected");
+
+ QTest::newRow("1_Item_from_top_to_middle") << 0 << 1 << 3 << QStringList{"B", "C", "A", "D", "E", "F"};
+ QTest::newRow("1_Item_from_top_to_bottom") << 0 << 1 << 6 << QStringList{"B", "C", "D", "E", "F", "A"};
+ QTest::newRow("1_Item_from_middle_to_top") << 2 << 1 << 1 << QStringList{"C", "A", "B", "D", "E", "F"};
+ QTest::newRow("1_Item_from_bottom_to_middle") << 5 << 1 << 3 << QStringList{"A", "B", "F", "C", "D", "E"};
+ QTest::newRow("1_Item_from_bottom to_top") << 5 << 1 << 1 << QStringList{"F", "A", "B", "C", "D", "E"};
+ QTest::newRow("1_Item_from_middle_to_bottom") << 2 << 1 << 6 << QStringList{"A", "B", "D", "E", "F", "C"};
+ QTest::newRow("1_Item_from_middle_to_middle_before") << 2 << 1 << 1 << QStringList{"C", "A", "B", "D", "E", "F"};
+ QTest::newRow("1_Item_from_middle_to_middle_after") << 2 << 1 << 4 << QStringList{"A", "B", "D", "C", "E", "F"};
+
+ QTest::newRow("2_Items_from_top_to_middle") << 0 << 2 << 3 << QStringList{"C", "A", "B", "D", "E", "F"};
+ QTest::newRow("2_Items_from_top_to_bottom") << 0 << 2 << 6 << QStringList{"C", "D", "E", "F", "A", "B"};
+ QTest::newRow("2_Items_from_middle_to_top") << 2 << 2 << 1 << QStringList{"C", "D", "A", "B", "E", "F"};
+ QTest::newRow("2_Items_from_bottom_to_middle") << 4 << 2 << 3 << QStringList{"A", "B", "E", "F", "C", "D"};
+ QTest::newRow("2_Items_from_bottom_to_top") << 4 << 2 << 1 << QStringList{"E", "F", "A", "B", "C", "D"};
+ QTest::newRow("2_Items_from_middle_to_bottom") << 2 << 2 << 6 << QStringList{"A", "B", "E", "F", "C", "D"};
+ QTest::newRow("2_Items_from_middle_to_middle_before") << 3 << 2 << 2 << QStringList{"A", "D", "E", "B", "C", "F"};
+ QTest::newRow("2_Items_from_middle_to_middle_after") << 1 << 2 << 5 << QStringList{"A", "D", "E", "B", "C", "F"};
+}
+
+void tst_QStringListModel::moveRows()
+{
+ QFETCH(const int, startRow);
+ QFETCH(const int, count);
+ QFETCH(const int, destination);
+ QFETCH(const QStringList, expected);
+ QStringListModel baseModel(QStringList{"A", "B", "C", "D", "E", "F"});
+ QSignalSpy rowMovedSpy(&baseModel, &QAbstractItemModel::rowsMoved);
+ QSignalSpy rowAboutMovedSpy(&baseModel, &QAbstractItemModel::rowsAboutToBeMoved);
+ QVERIFY(baseModel.moveRows(QModelIndex(), startRow, count, QModelIndex(), destination));
+ QCOMPARE(baseModel.stringList(), expected);
+ QCOMPARE(rowMovedSpy.size(), 1);
+ QCOMPARE(rowAboutMovedSpy.size(), 1);
+ for (const QList<QVariant> &signalArgs : {rowMovedSpy.first(), rowAboutMovedSpy.first()}){
+ QVERIFY(!signalArgs.at(0).value<QModelIndex>().isValid());
+ QCOMPARE(signalArgs.at(1).toInt(), startRow);
+ QCOMPARE(signalArgs.at(2).toInt(), startRow + count - 1);
+ QVERIFY(!signalArgs.at(3).value<QModelIndex>().isValid());
+ QCOMPARE(signalArgs.at(4).toInt(), destination);
+ }
+}
+
void tst_QStringListModel::rowsAboutToBeRemoved_rowsRemoved_data()
{
QTest::addColumn<QStringList>("input");
@@ -248,6 +356,74 @@ void tst_QStringListModel::setData_emits_both_roles()
expected);
}
+void tst_QStringListModel::itemData()
+{
+ QStringListModel testModel{ QStringList {
+ QStringLiteral("One"),
+ QStringLiteral("Two"),
+ QStringLiteral("Three"),
+ QStringLiteral("Four"),
+ QStringLiteral("Five")
+ }};
+ QMap<int, QVariant> compareMap;
+ QCOMPARE(testModel.itemData(QModelIndex()), compareMap);
+ compareMap.insert(Qt::DisplayRole, QStringLiteral("Two"));
+ compareMap.insert(Qt::EditRole, QStringLiteral("Two"));
+ QCOMPARE(testModel.itemData(testModel.index(1, 0)), compareMap);
+}
+
+void tst_QStringListModel::setItemData()
+{
+ QStringListModel testModel{ QStringList {
+ QStringLiteral("One"),
+ QStringLiteral("Two"),
+ QStringLiteral("Three"),
+ QStringLiteral("Four"),
+ QStringLiteral("Five")
+ }};
+ QSignalSpy dataChangedSpy(&testModel, &QAbstractItemModel::dataChanged);
+ QModelIndex changeIndex = testModel.index(1, 0);
+ const QVector<int> changeRoles{Qt::DisplayRole, Qt::EditRole};
+ const QString changedString("Changed");
+ QMap<int, QVariant> newItemData{std::make_pair<int>(Qt::DisplayRole, changedString)};
+ // invalid index does nothing and returns false
+ QVERIFY(!testModel.setItemData(QModelIndex(), newItemData));
+ // valid data is set, return value is true and dataChanged is emitted once
+ QVERIFY(testModel.setItemData(changeIndex, newItemData));
+ QCOMPARE(changeIndex.data(Qt::DisplayRole).toString(), changedString);
+ QCOMPARE(changeIndex.data(Qt::EditRole).toString(), changedString);
+ QCOMPARE(dataChangedSpy.size(), 1);
+ QVariantList dataChangedArguments = dataChangedSpy.takeFirst();
+ QCOMPARE(dataChangedArguments.at(0).value<QModelIndex>(), changeIndex);
+ QCOMPARE(dataChangedArguments.at(1).value<QModelIndex>(), changeIndex);
+ QCOMPARE(dataChangedArguments.at(2).value<QVector<int> >(), changeRoles);
+ // Unsupported roles do nothing return false
+ newItemData.clear();
+ newItemData.insert(Qt::UserRole, changedString);
+ QVERIFY(!testModel.setItemData(changeIndex, newItemData));
+ QCOMPARE(dataChangedSpy.size(), 0);
+ // If some but not all the roles are supported it returns false and does nothing
+ newItemData.insert(Qt::EditRole, changedString);
+ changeIndex = testModel.index(2, 0);
+ QVERIFY(!testModel.setItemData(changeIndex, newItemData));
+ QCOMPARE(changeIndex.data(Qt::DisplayRole).toString(), QStringLiteral("Three"));
+ QCOMPARE(changeIndex.data(Qt::EditRole).toString(), QStringLiteral("Three"));
+ QCOMPARE(dataChangedSpy.size(), 0);
+ // Qt::EditRole and Qt::DisplayRole are both set, Qt::EditRole takes precedence
+ newItemData.clear();
+ newItemData.insert(Qt::EditRole, changedString);
+ newItemData.insert(Qt::DisplayRole, QStringLiteral("Ignored"));
+ changeIndex = testModel.index(3, 0);
+ QVERIFY(testModel.setItemData(changeIndex, newItemData));
+ QCOMPARE(changeIndex.data(Qt::DisplayRole).toString(), changedString);
+ QCOMPARE(changeIndex.data(Qt::EditRole).toString(), changedString);
+ QCOMPARE(dataChangedSpy.size(), 1);
+ dataChangedArguments = dataChangedSpy.takeFirst();
+ QCOMPARE(dataChangedArguments.at(0).value<QModelIndex>(), changeIndex);
+ QCOMPARE(dataChangedArguments.at(1).value<QModelIndex>(), changeIndex);
+ QCOMPARE(dataChangedArguments.at(2).value<QVector<int> >(), changeRoles);
+}
+
void tst_QStringListModel::setData_emits_on_change_only()
{
QStringListModel model(QStringList{QStringLiteral("one"), QStringLiteral("two")});
diff --git a/tests/auto/corelib/itemmodels/qtransposeproxymodel/qtransposeproxymodel.pro b/tests/auto/corelib/itemmodels/qtransposeproxymodel/qtransposeproxymodel.pro
new file mode 100644
index 0000000000..3834add115
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qtransposeproxymodel/qtransposeproxymodel.pro
@@ -0,0 +1,6 @@
+CONFIG += testcase
+TARGET = tst_qtransposeproxymodel
+QT = core gui testlib
+
+SOURCES = tst_qtransposeproxymodel.cpp
+
diff --git a/tests/auto/corelib/itemmodels/qtransposeproxymodel/tst_qtransposeproxymodel.cpp b/tests/auto/corelib/itemmodels/qtransposeproxymodel/tst_qtransposeproxymodel.cpp
new file mode 100644
index 0000000000..a30ac46571
--- /dev/null
+++ b/tests/auto/corelib/itemmodels/qtransposeproxymodel/tst_qtransposeproxymodel.cpp
@@ -0,0 +1,915 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Luca Beldi <v.ronin@yahoo.it>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QTest>
+#include <QSignalSpy>
+#include <QStandardItemModel>
+#include <QStringListModel>
+#include <QAbstractItemModelTester>
+#include <random>
+
+#include <qtransposeproxymodel.h>
+
+class tst_QTransposeProxyModel : public QObject
+{
+ Q_OBJECT
+private Q_SLOTS:
+ void initTestCase();
+ void index();
+ void data();
+ void setData_data();
+ void setData();
+ void parent();
+ void mapToSource();
+ void mapFromSource();
+ void basicTest_data();
+ void basicTest();
+ void sort();
+ void insertRowBase_data();
+ void insertRowBase();
+ void insertColumnBase_data();
+ void insertColumnBase();
+ void insertColumnProxy_data();
+ void insertColumnProxy();
+ void insertRowProxy_data();
+ void insertRowProxy();
+ void removeRowBase_data();
+ void removeRowBase();
+ void removeColumnBase_data();
+ void removeColumnBase();
+ void removeColumnProxy_data();
+ void removeColumnProxy();
+ void removeRowProxy_data();
+ void removeRowProxy();
+ void headerData();
+ void setHeaderData();
+ void span();
+ void itemData();
+ void setItemData();
+ void moveRowsBase();
+ void moveColumnsProxy();
+private:
+ void testTransposed(
+ const QAbstractItemModel *const baseModel,
+ const QAbstractItemModel *const transposed,
+ const QModelIndex &baseParent = QModelIndex(),
+ const QModelIndex &transposedParent = QModelIndex()
+ );
+ QAbstractItemModel *createListModel(QObject *parent);
+ QAbstractItemModel *createTableModel(QObject *parent);
+ QAbstractItemModel *createTreeModel(QObject *parent);
+};
+
+QAbstractItemModel *tst_QTransposeProxyModel::createListModel(QObject *parent)
+{
+ QStringList sequence;
+ sequence.reserve(10);
+ for (int i = 0; i < 10; ++i)
+ sequence.append(QString::number(i));
+ return new QStringListModel(sequence, parent);
+}
+
+QAbstractItemModel *tst_QTransposeProxyModel::createTableModel(QObject *parent)
+{
+ QAbstractItemModel *model = new QStandardItemModel(parent);
+ model->insertRows(0, 5);
+ model->insertColumns(0, 4);
+ for (int i = 0; i < model->rowCount(); ++i) {
+ for (int j = 0; j < model->columnCount(); ++j) {
+ model->setData(model->index(i, j), QStringLiteral("%1,%2").arg(i).arg(j), Qt::EditRole);
+ model->setData(model->index(i, j), i, Qt::UserRole);
+ model->setData(model->index(i, j), j, Qt::UserRole + 1);
+ }
+ }
+ return model;
+}
+
+QAbstractItemModel *tst_QTransposeProxyModel::createTreeModel(QObject *parent)
+{
+ QAbstractItemModel *model = new QStandardItemModel(parent);
+ model->insertRows(0, 5);
+ model->insertColumns(0, 4);
+ for (int i = 0; i < model->rowCount(); ++i) {
+ for (int j = 0; j < model->columnCount(); ++j) {
+ const QModelIndex parIdx = model->index(i, j);
+ model->setData(parIdx, QStringLiteral("%1,%2").arg(i).arg(j), Qt::EditRole);
+ model->setData(parIdx, i, Qt::UserRole);
+ model->setData(parIdx, j, Qt::UserRole + 1);
+ model->insertRows(0, 3, parIdx);
+ model->insertColumns(0, 2, parIdx);
+ for (int h = 0; h < model->rowCount(parIdx); ++h) {
+ for (int k = 0; k < model->columnCount(parIdx); ++k) {
+ const QModelIndex childIdx = model->index(h, k, parIdx);
+ model->setData(childIdx, QStringLiteral("%1,%2,%3,%4").arg(i).arg(j).arg(h).arg(k), Qt::EditRole);
+ model->setData(childIdx, i, Qt::UserRole);
+ model->setData(childIdx, j, Qt::UserRole + 1);
+ model->setData(childIdx, h, Qt::UserRole + 2);
+ model->setData(childIdx, k, Qt::UserRole + 3);
+ }
+ }
+ }
+ }
+ return model;
+}
+
+void tst_QTransposeProxyModel::testTransposed(
+ const QAbstractItemModel *const baseModel,
+ const QAbstractItemModel *const transposed,
+ const QModelIndex &baseParent,
+ const QModelIndex &transposedParent
+)
+{
+ QCOMPARE(transposed->hasChildren(transposedParent), baseModel->hasChildren(baseParent));
+ QCOMPARE(transposed->columnCount(transposedParent), baseModel->rowCount(baseParent));
+ QCOMPARE(transposed->rowCount(transposedParent), baseModel->columnCount(baseParent));
+ for (int i = 0, maxRow = baseModel->rowCount(baseParent); i < maxRow; ++i) {
+ for (int j = 0, maxCol = baseModel->columnCount(baseParent); j < maxCol; ++j) {
+ const QModelIndex baseIdx = baseModel->index(i, j, baseParent);
+ const QModelIndex transIdx = transposed->index(j, i, transposedParent);
+ QCOMPARE(transIdx.data(), baseIdx.data());
+ QCOMPARE(transIdx.data(Qt::UserRole), baseIdx.data(Qt::UserRole));
+ QCOMPARE(transIdx.data(Qt::UserRole + 1), baseIdx.data(Qt::UserRole + 1));
+ QCOMPARE(transIdx.data(Qt::UserRole + 2), baseIdx.data(Qt::UserRole + 2));
+ QCOMPARE(transIdx.data(Qt::UserRole + 3), baseIdx.data(Qt::UserRole + 3));
+ if (baseModel->hasChildren(baseIdx)) {
+ testTransposed(baseModel, transposed, baseIdx, transIdx);
+ }
+ }
+ }
+}
+
+void tst_QTransposeProxyModel::initTestCase()
+{
+ qRegisterMetaType<QList<QPersistentModelIndex> >();
+ qRegisterMetaType<QAbstractItemModel::LayoutChangeHint>();
+}
+
+void tst_QTransposeProxyModel::index()
+{
+ QAbstractItemModel *model = createTreeModel(this);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(model);
+ QVERIFY(!proxy.index(0, -1).isValid());
+ QVERIFY(!proxy.index(0, -1).isValid());
+ QVERIFY(!proxy.index(-1, -1).isValid());
+ QVERIFY(!proxy.index(0, proxy.columnCount()).isValid());
+ QVERIFY(!proxy.index(proxy.rowCount(), 0).isValid());
+ QVERIFY(!proxy.index(proxy.rowCount(), proxy.columnCount()).isValid());
+ QModelIndex tempIdx = proxy.index(0, 1);
+ QVERIFY(tempIdx.isValid());
+ QCOMPARE(tempIdx.row(), 0);
+ QCOMPARE(tempIdx.column(), 1);
+ tempIdx = proxy.index(0, 1, tempIdx);
+ QVERIFY(tempIdx.isValid());
+ QCOMPARE(tempIdx.row(), 0);
+ QCOMPARE(tempIdx.column(), 1);
+ delete model;
+}
+
+void tst_QTransposeProxyModel::data()
+{
+ QStringListModel model{QStringList{"A", "B"}};
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(&model);
+ QCOMPARE(proxy.index(0, 1).data().toString(), QStringLiteral("B"));
+}
+
+void tst_QTransposeProxyModel::parent()
+{
+ QAbstractItemModel *model = createTreeModel(this);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(model);
+ const QModelIndex parentIdx = proxy.index(0, 0);
+ const QModelIndex childIdx = proxy.index(0, 0, parentIdx);
+ QVERIFY(parentIdx.isValid());
+ QVERIFY(childIdx.isValid());
+ QCOMPARE(childIdx.parent(), parentIdx);
+ delete model;
+}
+
+void tst_QTransposeProxyModel::mapToSource()
+{
+ QAbstractItemModel *model = createTreeModel(this);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(model);
+ QVERIFY(!proxy.mapToSource(QModelIndex()).isValid());
+ QCOMPARE(proxy.mapToSource(proxy.index(0, 0)), model->index(0, 0));
+ QCOMPARE(proxy.mapToSource(proxy.index(1, 0)), model->index(0, 1));
+ QCOMPARE(proxy.mapToSource(proxy.index(0, 1)), model->index(1, 0));
+ const QModelIndex proxyParent = proxy.index(1, 0);
+ const QModelIndex sourceParent = model->index(0, 1);
+ QCOMPARE(proxy.mapToSource(proxy.index(0, 0, proxyParent)), model->index(0, 0, sourceParent));
+ QCOMPARE(proxy.mapToSource(proxy.index(1, 0, proxyParent)), model->index(0, 1, sourceParent));
+ QCOMPARE(proxy.mapToSource(proxy.index(0, 1, proxyParent)), model->index(1, 0, sourceParent));
+ delete model;
+}
+
+void tst_QTransposeProxyModel::mapFromSource()
+{
+ QAbstractItemModel *model = createTreeModel(this);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(model);
+ QVERIFY(!proxy.mapFromSource(QModelIndex()).isValid());
+ QCOMPARE(proxy.mapFromSource(model->index(0, 0)), proxy.index(0, 0));
+ QCOMPARE(proxy.mapFromSource(model->index(0, 1)), proxy.index(1, 0));
+ QCOMPARE(proxy.mapFromSource(model->index(1, 0)), proxy.index(0, 1));
+ const QModelIndex proxyParent = proxy.index(1, 0);
+ const QModelIndex sourceParent = model->index(0, 1);
+ QCOMPARE(proxy.mapToSource(proxy.index(0, 0, proxyParent)), model->index(0, 0, sourceParent));
+ QCOMPARE(proxy.mapFromSource(model->index(1, 0, sourceParent)), proxy.index(0, 1, proxyParent));
+ QCOMPARE(proxy.mapFromSource(model->index(0, 1, sourceParent)), proxy.index(1, 0, proxyParent));
+ delete model;
+}
+
+void tst_QTransposeProxyModel::basicTest_data()
+{
+ QTest::addColumn<QAbstractItemModel *>("model");
+ QTest::newRow("List") << createListModel(this);
+ QTest::newRow("Table") << createTableModel(this);
+ QTest::newRow("Tree") << createTreeModel(this);
+}
+
+void tst_QTransposeProxyModel::basicTest()
+{
+ QFETCH(QAbstractItemModel *, model);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(model);
+ testTransposed(model, &proxy);
+ delete model;
+}
+
+void tst_QTransposeProxyModel::sort()
+{
+ QStringList sequence;
+ sequence.reserve(100);
+ for (int i = 0; i < 100; ++i)
+ sequence.append(QStringLiteral("%1").arg(i, 3, 10, QLatin1Char('0')));
+ std::shuffle(sequence.begin(), sequence.end(), std::mt19937(88));
+ const QString firstItemBeforeSort = sequence.first();
+ QStringListModel baseModel(sequence);
+ QTransposeProxyModel proxyModel;
+ new QAbstractItemModelTester(&proxyModel, &proxyModel);
+ proxyModel.setSourceModel(&baseModel);
+ QSignalSpy layoutChangedSpy(&proxyModel, &QAbstractItemModel::layoutChanged);
+ QVERIFY(layoutChangedSpy.isValid());
+ QSignalSpy layoutAboutToBeChangedSpy(&proxyModel, &QAbstractItemModel::layoutAboutToBeChanged);
+ QVERIFY(layoutAboutToBeChangedSpy.isValid());
+ QPersistentModelIndex firstIndexBeforeSort = proxyModel.index(0, 0);
+ baseModel.sort(0, Qt::AscendingOrder);
+ QCOMPARE(layoutChangedSpy.count(), 1);
+ QCOMPARE(layoutAboutToBeChangedSpy.count(), 1);
+ QCOMPARE(layoutChangedSpy.takeFirst().at(1).toInt(), int(QAbstractItemModel::HorizontalSortHint));
+ QCOMPARE(firstIndexBeforeSort.data().toString(), firstItemBeforeSort);
+ for (int i = 0; i < 100; ++i)
+ QCOMPARE(proxyModel.index(0, i).data().toInt(), i);
+}
+
+void tst_QTransposeProxyModel::removeColumnBase_data()
+{
+ QTest::addColumn<QAbstractItemModel *>("model");
+ QTest::addColumn<QModelIndex>("parent");
+ QTest::newRow("Table") << createTableModel(this) << QModelIndex();
+ QTest::newRow("Tree_Root_Item") << createTreeModel(this) << QModelIndex();
+ QAbstractItemModel *model = createTreeModel(this);
+ QTest::newRow("Tree_Child_Item") << model << model->index(0, 0);
+}
+
+void tst_QTransposeProxyModel::removeColumnBase()
+{
+ QFETCH(QAbstractItemModel * const, model);
+ QFETCH(const QModelIndex, parent);
+ QTransposeProxyModel proxy;
+ QSignalSpy rowRemoveSpy(&proxy, &QAbstractItemModel::rowsRemoved);
+ QVERIFY(rowRemoveSpy.isValid());
+ QSignalSpy rowAboutToBeRemoveSpy(&proxy, &QAbstractItemModel::rowsAboutToBeRemoved);
+ QVERIFY(rowAboutToBeRemoveSpy.isValid());
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(model);
+ const int oldRowCount = proxy.rowCount(proxy.mapFromSource(parent));
+ const QVariant expectedNewVal = model->index(0, 2, parent).data();
+ QVERIFY(model->removeColumn(1, parent));
+ QCOMPARE(proxy.rowCount(proxy.mapFromSource(parent)), oldRowCount - 1);
+ QCOMPARE(proxy.index(1, 0, proxy.mapFromSource(parent)).data(), expectedNewVal);
+ QCOMPARE(rowRemoveSpy.count(), 1);
+ QCOMPARE(rowAboutToBeRemoveSpy.count(), 1);
+ for (const auto &spyArgs : {rowRemoveSpy.takeFirst(),
+ rowAboutToBeRemoveSpy.takeFirst()}) {
+ QCOMPARE(spyArgs.at(0).value<QModelIndex>(), proxy.mapFromSource(parent));
+ QCOMPARE(spyArgs.at(1).toInt(), 1);
+ QCOMPARE(spyArgs.at(2).toInt(), 1);
+ }
+ delete model;
+}
+
+void tst_QTransposeProxyModel::insertColumnBase_data()
+{
+ QTest::addColumn<QAbstractItemModel *>("model");
+ QTest::addColumn<QModelIndex>("parent");
+ QTest::newRow("Table") << createTableModel(this) << QModelIndex();
+ QTest::newRow("Tree_Root_Item") << createTreeModel(this) << QModelIndex();
+ QAbstractItemModel *model = createTreeModel(this);
+ QTest::newRow("Tree_Child_Item") << model << model->index(0, 0);
+}
+
+void tst_QTransposeProxyModel::insertColumnBase()
+{
+ QFETCH(QAbstractItemModel * const, model);
+ QFETCH(const QModelIndex, parent);
+ QTransposeProxyModel proxy;
+ QSignalSpy rowInsertSpy(&proxy, &QAbstractItemModel::rowsInserted);
+ QVERIFY(rowInsertSpy.isValid());
+ QSignalSpy rowAboutToBeInsertSpy(&proxy, &QAbstractItemModel::rowsAboutToBeInserted);
+ QVERIFY(rowAboutToBeInsertSpy.isValid());
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(model);
+ const int oldRowCount = proxy.rowCount(proxy.mapFromSource(parent));
+ QVERIFY(model->insertColumn(1, parent));
+ QCOMPARE(proxy.rowCount(proxy.mapFromSource(parent)), oldRowCount + 1);
+ QVERIFY(!proxy.index(1, 0, proxy.mapFromSource(parent)).data().isValid());
+ QCOMPARE(rowInsertSpy.count(), 1);
+ QCOMPARE(rowAboutToBeInsertSpy.count(), 1);
+ for (const auto &spyArgs : {rowInsertSpy.takeFirst(),
+ rowAboutToBeInsertSpy.takeFirst()}) {
+ QCOMPARE(spyArgs.at(0).value<QModelIndex>(), proxy.mapFromSource(parent));
+ QCOMPARE(spyArgs.at(1).toInt(), 1);
+ QCOMPARE(spyArgs.at(2).toInt(), 1);
+ }
+ delete model;
+}
+
+void tst_QTransposeProxyModel::removeRowBase_data()
+{
+ QTest::addColumn<QAbstractItemModel *>("model");
+ QTest::addColumn<QModelIndex>("parent");
+ QTest::newRow("List") << createListModel(this) << QModelIndex();
+ QTest::newRow("Table") << createTableModel(this) << QModelIndex();
+ QTest::newRow("Tree_Root_Item") << createTreeModel(this) << QModelIndex();
+ QAbstractItemModel *model = createTreeModel(this);
+ QTest::newRow("Tree_Child_Item") << model << model->index(0, 0);
+}
+
+void tst_QTransposeProxyModel::removeRowBase()
+{
+ QFETCH(QAbstractItemModel * const, model);
+ QFETCH(const QModelIndex, parent);
+ QTransposeProxyModel proxy;
+ QSignalSpy columnsRemoveSpy(&proxy, &QAbstractItemModel::columnsRemoved);
+ QVERIFY(columnsRemoveSpy.isValid());
+ QSignalSpy columnsAboutToBeRemoveSpy(&proxy, &QAbstractItemModel::columnsAboutToBeRemoved);
+ QVERIFY(columnsAboutToBeRemoveSpy.isValid());
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(model);
+ const int oldColCount = proxy.columnCount(proxy.mapFromSource(parent));
+ const QVariant expectedNewVal = model->index(2, 0, parent).data();
+ QVERIFY(model->removeRow(1, parent));
+ QCOMPARE(proxy.columnCount(proxy.mapFromSource(parent)), oldColCount - 1);
+ QCOMPARE(proxy.index(0, 1, proxy.mapFromSource(parent)).data(), expectedNewVal);
+ QCOMPARE(columnsRemoveSpy.count(), 1);
+ QCOMPARE(columnsAboutToBeRemoveSpy.count(), 1);
+ for (const auto &spyArgs : {columnsRemoveSpy.takeFirst(),
+ columnsAboutToBeRemoveSpy.takeFirst()}) {
+ QCOMPARE(spyArgs.at(0).value<QModelIndex>(), proxy.mapFromSource(parent));
+ QCOMPARE(spyArgs.at(1).toInt(), 1);
+ QCOMPARE(spyArgs.at(2).toInt(), 1);
+ }
+ delete model;
+}
+
+void tst_QTransposeProxyModel::insertRowBase_data()
+{
+ QTest::addColumn<QAbstractItemModel *>("model");
+ QTest::addColumn<QModelIndex>("parent");
+ QTest::newRow("List") << createListModel(this) << QModelIndex();
+ QTest::newRow("Table") << createTableModel(this) << QModelIndex();
+ QTest::newRow("Tree_Root_Item") << createTreeModel(this) << QModelIndex();
+ QAbstractItemModel *model = createTreeModel(this);
+ QTest::newRow("Tree_Child_Item") << model << model->index(0, 0);
+}
+
+void tst_QTransposeProxyModel::insertRowBase()
+{
+ QFETCH(QAbstractItemModel * const, model);
+ QFETCH(const QModelIndex, parent);
+ QTransposeProxyModel proxy;
+ QSignalSpy columnsInsertSpy(&proxy, &QAbstractItemModel::columnsInserted);
+ QVERIFY(columnsInsertSpy.isValid());
+ QSignalSpy columnsAboutToBeInsertSpy(&proxy, &QAbstractItemModel::columnsAboutToBeInserted);
+ QVERIFY(columnsAboutToBeInsertSpy.isValid());
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(model);
+ const int oldColCount = proxy.columnCount(proxy.mapFromSource(parent));
+ QVERIFY(model->insertRow(1, parent));
+ QCOMPARE(proxy.columnCount(proxy.mapFromSource(parent)), oldColCount + 1);
+ QVERIFY(proxy.index(0, 1, proxy.mapFromSource(parent)).data().isNull());
+ QCOMPARE(columnsInsertSpy.count(), 1);
+ QCOMPARE(columnsAboutToBeInsertSpy.count(), 1);
+ for (const auto &spyArgs : {columnsInsertSpy.takeFirst(),
+ columnsAboutToBeInsertSpy.takeFirst()}) {
+ QCOMPARE(spyArgs.at(0).value<QModelIndex>(), proxy.mapFromSource(parent));
+ QCOMPARE(spyArgs.at(1).toInt(), 1);
+ QCOMPARE(spyArgs.at(2).toInt(), 1);
+ }
+ delete model;
+}
+
+void tst_QTransposeProxyModel::removeColumnProxy_data()
+{
+ QTest::addColumn<QAbstractItemModel *>("model");
+ QTest::addColumn<bool>("rootItem");
+ QTest::newRow("List") << createListModel(this) << true;
+ QTest::newRow("Table") << createTableModel(this) << true;
+ QTest::newRow("Tree_Root_Item") << createTreeModel(this) << true;
+ QTest::newRow("Tree_Child_Item") << createTreeModel(this) << false;
+}
+
+void tst_QTransposeProxyModel::removeColumnProxy()
+{
+ QFETCH(QAbstractItemModel *, model);
+ QFETCH(bool, rootItem);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ QSignalSpy columnsRemoveSpy(&proxy, &QAbstractItemModel::columnsRemoved);
+ QVERIFY(columnsRemoveSpy.isValid());
+ QSignalSpy columnsAboutToBeRemoveSpy(&proxy, &QAbstractItemModel::columnsAboutToBeRemoved);
+ QVERIFY(columnsAboutToBeRemoveSpy.isValid());
+ QSignalSpy rowsRemoveSpy(model, &QAbstractItemModel::rowsRemoved);
+ QVERIFY(rowsRemoveSpy.isValid());
+ QSignalSpy rowsAboutToBeRemoveSpy(model, &QAbstractItemModel::rowsAboutToBeRemoved);
+ QVERIFY(rowsAboutToBeRemoveSpy.isValid());
+ proxy.setSourceModel(model);
+ const QModelIndex proxyParent = rootItem ? QModelIndex() : proxy.index(0, 1);
+ const QModelIndex sourceParent = proxy.mapToSource(proxyParent);
+ const int oldColCount = proxy.columnCount(proxyParent);
+ const int oldRowCount = model->rowCount(sourceParent);
+ const QVariant expectedNewVal = proxy.index(0, 2, proxyParent).data();
+ QVERIFY(proxy.removeColumn(1, proxyParent));
+ QCOMPARE(proxy.columnCount(proxyParent), oldColCount - 1);
+ QCOMPARE(model->rowCount(sourceParent), oldRowCount - 1);
+ QCOMPARE(proxy.index(0, 1, proxyParent).data(), expectedNewVal);
+ QCOMPARE(model->index(1, 0, sourceParent).data(), expectedNewVal);
+ QCOMPARE(columnsRemoveSpy.count(), 1);
+ QCOMPARE(columnsAboutToBeRemoveSpy.count(), 1);
+ QCOMPARE(rowsRemoveSpy.count(), 1);
+ QCOMPARE(rowsAboutToBeRemoveSpy.count(), 1);
+ for (const auto &spyArgs : {columnsRemoveSpy.takeFirst(),
+ columnsAboutToBeRemoveSpy.takeFirst()}) {
+ QCOMPARE(spyArgs.at(0).value<QModelIndex>(), proxyParent);
+ QCOMPARE(spyArgs.at(1).toInt(), 1);
+ QCOMPARE(spyArgs.at(2).toInt(), 1);
+ }
+ for (const auto &spyArgs : {rowsRemoveSpy.takeFirst(),
+ rowsAboutToBeRemoveSpy.takeFirst()}) {
+ QCOMPARE(spyArgs.at(0).value<QModelIndex>(), sourceParent);
+ QCOMPARE(spyArgs.at(1).toInt(), 1);
+ QCOMPARE(spyArgs.at(2).toInt(), 1);
+ }
+ delete model;
+}
+
+void tst_QTransposeProxyModel::insertColumnProxy_data()
+{
+ QTest::addColumn<QAbstractItemModel *>("model");
+ QTest::addColumn<bool>("rootItem");
+ QTest::newRow("List") << createListModel(this) << true;
+ QTest::newRow("Table") << createTableModel(this) << true;
+ QTest::newRow("Tree_Root_Item") << createTreeModel(this) << true;
+ QTest::newRow("Tree_Child_Item") << createTreeModel(this) << false;
+}
+
+void tst_QTransposeProxyModel::insertColumnProxy()
+{
+ QFETCH(QAbstractItemModel *, model);
+ QFETCH(bool, rootItem);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ QSignalSpy columnsInsertSpy(&proxy, &QAbstractItemModel::columnsInserted);
+ QVERIFY(columnsInsertSpy.isValid());
+ QSignalSpy columnsAboutToBeInsertSpy(&proxy, &QAbstractItemModel::columnsAboutToBeInserted);
+ QVERIFY(columnsAboutToBeInsertSpy.isValid());
+ QSignalSpy rowsInsertSpy(model, &QAbstractItemModel::rowsInserted);
+ QVERIFY(rowsInsertSpy.isValid());
+ QSignalSpy rowsAboutToBeInsertSpy(model, &QAbstractItemModel::rowsAboutToBeInserted);
+ QVERIFY(rowsAboutToBeInsertSpy.isValid());
+ proxy.setSourceModel(model);
+ const QModelIndex proxyParent = rootItem ? QModelIndex() : proxy.index(0, 1);
+ const QModelIndex sourceParent = proxy.mapToSource(proxyParent);
+ const int oldColCount = proxy.columnCount(proxyParent);
+ const int oldRowCount = model->rowCount(sourceParent);
+ QVERIFY(proxy.insertColumn(1, proxyParent));
+ QCOMPARE(proxy.columnCount(proxyParent), oldColCount + 1);
+ QCOMPARE(model->rowCount(sourceParent), oldRowCount + 1);
+ QVERIFY(proxy.index(0, 1, proxyParent).data().isNull());
+ QVERIFY(model->index(1, 0, sourceParent).data().isNull());
+ QCOMPARE(columnsInsertSpy.count(), 1);
+ QCOMPARE(columnsAboutToBeInsertSpy.count(), 1);
+ QCOMPARE(rowsInsertSpy.count(), 1);
+ QCOMPARE(rowsAboutToBeInsertSpy.count(), 1);
+ for (const auto &spyArgs : {columnsInsertSpy.takeFirst(),
+ columnsAboutToBeInsertSpy.takeFirst()}) {
+ QCOMPARE(spyArgs.at(0).value<QModelIndex>(), proxyParent);
+ QCOMPARE(spyArgs.at(1).toInt(), 1);
+ QCOMPARE(spyArgs.at(2).toInt(), 1);
+ }
+ for (const auto &spyArgs : {rowsInsertSpy.takeFirst(),
+ rowsAboutToBeInsertSpy.takeFirst()}) {
+ QCOMPARE(spyArgs.at(0).value<QModelIndex>(), sourceParent);
+ QCOMPARE(spyArgs.at(1).toInt(), 1);
+ QCOMPARE(spyArgs.at(2).toInt(), 1);
+ }
+ delete model;
+}
+
+void tst_QTransposeProxyModel::removeRowProxy_data()
+{
+ QTest::addColumn<QAbstractItemModel *>("model");
+ QTest::addColumn<bool>("rootItem");
+ QTest::newRow("Table") << createTableModel(this) << true;
+ QTest::newRow("Tree_Root_Item") << createTreeModel(this) << true;
+ QTest::newRow("Tree_Child_Item") << createTreeModel(this) << false;
+}
+
+void tst_QTransposeProxyModel::removeRowProxy()
+{
+ QFETCH(QAbstractItemModel *, model);
+ QFETCH(bool, rootItem);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ QSignalSpy rowsRemoveSpy(&proxy, &QAbstractItemModel::rowsRemoved);
+ QVERIFY(rowsRemoveSpy.isValid());
+ QSignalSpy rowsAboutToBeRemoveSpy(&proxy, &QAbstractItemModel::rowsAboutToBeRemoved);
+ QVERIFY(rowsAboutToBeRemoveSpy.isValid());
+ QSignalSpy columnsRemoveSpy(model, &QAbstractItemModel::columnsRemoved);
+ QVERIFY(columnsRemoveSpy.isValid());
+ QSignalSpy columnsAboutToBeRemoveSpy(model, &QAbstractItemModel::columnsAboutToBeRemoved);
+ QVERIFY(columnsAboutToBeRemoveSpy.isValid());
+ proxy.setSourceModel(model);
+ const QModelIndex proxyParent = rootItem ? QModelIndex() : proxy.index(0, 1);
+ const QModelIndex sourceParent = proxy.mapToSource(proxyParent);
+ const int oldRowCount = proxy.rowCount(proxyParent);
+ const int oldColCount = model->columnCount(sourceParent);
+ const QVariant expectedNewVal = proxy.index(2, 0, proxyParent).data();
+ QVERIFY(proxy.removeRow(1, proxyParent));
+ QCOMPARE(proxy.rowCount(proxyParent), oldRowCount - 1);
+ QCOMPARE(model->columnCount(sourceParent), oldColCount - 1);
+ QCOMPARE(proxy.index(1, 0, proxyParent).data(), expectedNewVal);
+ QCOMPARE(model->index(0, 1, sourceParent).data(), expectedNewVal);
+ QCOMPARE(columnsRemoveSpy.count(), 1);
+ QCOMPARE(columnsAboutToBeRemoveSpy.count(), 1);
+ QCOMPARE(rowsRemoveSpy.count(), 1);
+ QCOMPARE(rowsAboutToBeRemoveSpy.count(), 1);
+ for (const auto &spyArgs : {columnsRemoveSpy.takeFirst(),
+ columnsAboutToBeRemoveSpy.takeFirst()}) {
+ QCOMPARE(spyArgs.at(0).value<QModelIndex>(), sourceParent);
+ QCOMPARE(spyArgs.at(1).toInt(), 1);
+ QCOMPARE(spyArgs.at(2).toInt(), 1);
+ }
+ for (const auto &spyArgs : {rowsRemoveSpy.takeFirst(),
+ rowsAboutToBeRemoveSpy.takeFirst()}) {
+ QCOMPARE(spyArgs.at(0).value<QModelIndex>(), proxyParent);
+ QCOMPARE(spyArgs.at(1).toInt(), 1);
+ QCOMPARE(spyArgs.at(2).toInt(), 1);
+ }
+ delete model;
+}
+
+void tst_QTransposeProxyModel::insertRowProxy_data()
+{
+ QTest::addColumn<QAbstractItemModel *>("model");
+ QTest::addColumn<bool>("rootItem");
+ QTest::newRow("Table") << createTableModel(this) << true;
+ QTest::newRow("Tree_Root_Item") << createTreeModel(this) << true;
+ QTest::newRow("Tree_Child_Item") << createTreeModel(this) << false;
+}
+
+void tst_QTransposeProxyModel::insertRowProxy()
+{
+ QFETCH(QAbstractItemModel *, model);
+ QFETCH(bool, rootItem);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ QSignalSpy rowsInsertSpy(&proxy, &QAbstractItemModel::rowsInserted);
+ QVERIFY(rowsInsertSpy.isValid());
+ QSignalSpy rowsAboutToBeInsertSpy(&proxy, &QAbstractItemModel::rowsAboutToBeInserted);
+ QVERIFY(rowsAboutToBeInsertSpy.isValid());
+ QSignalSpy columnsInsertSpy(model, &QAbstractItemModel::columnsInserted);
+ QVERIFY(columnsInsertSpy.isValid());
+ QSignalSpy columnsAboutToBeInsertSpy(model, &QAbstractItemModel::columnsAboutToBeInserted);
+ QVERIFY(columnsAboutToBeInsertSpy.isValid());
+ proxy.setSourceModel(model);
+ const QModelIndex proxyParent = rootItem ? QModelIndex() : proxy.index(0, 1);
+ const QModelIndex sourceParent = proxy.mapToSource(proxyParent);
+ const int oldRowCount = proxy.rowCount(proxyParent);
+ const int oldColCount = model->columnCount(sourceParent);
+ QVERIFY(proxy.insertRow(1, proxyParent));
+ QCOMPARE(proxy.rowCount(proxyParent), oldRowCount + 1);
+ QCOMPARE(model->columnCount(sourceParent), oldColCount + 1);
+ QVERIFY(proxy.index(1, 0, proxyParent).data().isNull());
+ QVERIFY(model->index(0, 1, sourceParent).data().isNull());
+ QCOMPARE(columnsInsertSpy.count(), 1);
+ QCOMPARE(columnsAboutToBeInsertSpy.count(), 1);
+ QCOMPARE(rowsInsertSpy.count(), 1);
+ QCOMPARE(rowsAboutToBeInsertSpy.count(), 1);
+ for (const auto &spyArgs : {columnsInsertSpy.takeFirst(),
+ columnsAboutToBeInsertSpy.takeFirst()}) {
+ QCOMPARE(spyArgs.at(0).value<QModelIndex>(), sourceParent);
+ QCOMPARE(spyArgs.at(1).toInt(), 1);
+ QCOMPARE(spyArgs.at(2).toInt(), 1);
+ }
+ for (const auto &spyArgs : {rowsInsertSpy.takeFirst(),
+ rowsAboutToBeInsertSpy.takeFirst()}) {
+ QCOMPARE(spyArgs.at(0).value<QModelIndex>(), proxyParent);
+ QCOMPARE(spyArgs.at(1).toInt(), 1);
+ QCOMPARE(spyArgs.at(2).toInt(), 1);
+ }
+ delete model;
+}
+
+void tst_QTransposeProxyModel::headerData()
+{
+ QStandardItemModel model;
+ model.insertRows(0, 3);
+ model.insertColumns(0, 5);
+ for (int i = 0; i < model.rowCount(); ++i)
+ model.setHeaderData(i, Qt::Horizontal, QChar('A' + i));
+ for (int i = 1; i <= model.columnCount(); ++i)
+ model.setHeaderData(i, Qt::Vertical, i);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(&model);
+ for (int i = 0; i < model.rowCount(); ++i)
+ QCOMPARE(model.headerData(i, Qt::Horizontal), proxy.headerData(i, Qt::Vertical));
+ for (int i = 0; i < model.columnCount(); ++i)
+ QCOMPARE(model.headerData(i, Qt::Vertical), proxy.headerData(i, Qt::Horizontal));
+}
+
+void tst_QTransposeProxyModel::setHeaderData()
+{
+ QStandardItemModel model;
+ model.insertRows(0, 3);
+ model.insertColumns(0, 5);
+ for (int i = 0; i < model.rowCount(); ++i)
+ model.setHeaderData(i, Qt::Horizontal, QChar('A' + i));
+ for (int i = 1; i <= model.columnCount(); ++i)
+ model.setHeaderData(i, Qt::Vertical, i);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(&model);
+ QVERIFY(proxy.setHeaderData(1, Qt::Horizontal, 99));
+ QCOMPARE(model.headerData(1, Qt::Vertical).toInt(), 99);
+ QVERIFY(proxy.setHeaderData(1, Qt::Vertical, QChar('Z')));
+ QCOMPARE(model.headerData(1, Qt::Horizontal).toChar(), QChar('Z'));
+}
+
+void tst_QTransposeProxyModel::span()
+{
+ class SpanModel : public QStandardItemModel
+ {
+ Q_DISABLE_COPY(SpanModel)
+ public:
+ SpanModel(int rows, int columns, QObject *parent = nullptr)
+ : QStandardItemModel(rows, columns, parent)
+ {}
+ QSize span(const QModelIndex &index) const override
+ {
+ Q_UNUSED(index)
+ return QSize(2, 1);
+ }
+ };
+ SpanModel model(3, 5);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(&model);
+ QCOMPARE(proxy.span(proxy.index(0, 0)), QSize(1, 2));
+}
+
+void tst_QTransposeProxyModel::itemData()
+{
+ QAbstractItemModel *model = createTreeModel(this);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(model);
+ QMap<int, QVariant> itmData = proxy.itemData(proxy.index(0, 1));
+ QCOMPARE(itmData.value(Qt::DisplayRole).toString(), QStringLiteral("1,0"));
+ QCOMPARE(itmData.value(Qt::UserRole).toInt(), 1);
+ QCOMPARE(itmData.value(Qt::UserRole + 1).toInt(), 0);
+ itmData = proxy.itemData(proxy.index(1, 2, proxy.index(0, 1)));
+ QCOMPARE(itmData.value(Qt::DisplayRole).toString(), QStringLiteral("1,0,2,1"));
+ QCOMPARE(itmData.value(Qt::UserRole).toInt(), 1);
+ QCOMPARE(itmData.value(Qt::UserRole + 1).toInt(), 0);
+ QCOMPARE(itmData.value(Qt::UserRole + 2).toInt(), 2);
+ QCOMPARE(itmData.value(Qt::UserRole + 3).toInt(), 1);
+ QVERIFY(proxy.itemData(QModelIndex()).isEmpty());
+ delete model;
+}
+
+void tst_QTransposeProxyModel::setItemData()
+{
+ QAbstractItemModel *model = createTreeModel(this);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(model);
+ QSignalSpy sourceDataChangeSpy(model, &QAbstractItemModel::dataChanged);
+ QVERIFY(sourceDataChangeSpy.isValid());
+ QSignalSpy proxyDataChangeSpy(&proxy, &QAbstractItemModel::dataChanged);
+ QVERIFY(proxyDataChangeSpy.isValid());
+ const QMap<int, QVariant> itmData = {
+ std::make_pair<int, QVariant>(Qt::DisplayRole, QStringLiteral("Test")),
+ std::make_pair<int, QVariant>(Qt::UserRole, 88),
+ std::make_pair<int, QVariant>(Qt::UserRole + 1, 99),
+ };
+ QModelIndex idx = proxy.index(0, 1);
+ QVERIFY(proxy.setItemData(idx, itmData));
+ QCOMPARE(idx.data(Qt::DisplayRole).toString(), QStringLiteral("Test"));
+ QCOMPARE(idx.data(Qt::UserRole).toInt(), 88);
+ QCOMPARE(idx.data(Qt::UserRole + 1).toInt(), 99);
+ QCOMPARE(sourceDataChangeSpy.size(), 1);
+ QCOMPARE(proxyDataChangeSpy.size(), 1);
+ auto signalData = proxyDataChangeSpy.takeFirst();
+ QCOMPARE(signalData.at(0).value<QModelIndex>(), idx);
+ QCOMPARE(signalData.at(1).value<QModelIndex>(), idx);
+ const QVector<int> expectedRoles{Qt::DisplayRole, Qt::UserRole, Qt::EditRole, Qt::UserRole + 1};
+ QVector<int> receivedRoles = signalData.at(2).value<QVector<int> >();
+ QCOMPARE(receivedRoles.size(), expectedRoles.size());
+ for (int role : expectedRoles)
+ QVERIFY(receivedRoles.contains(role));
+ signalData = sourceDataChangeSpy.takeFirst();
+ QCOMPARE(signalData.at(0).value<QModelIndex>(), proxy.mapToSource(idx));
+ QCOMPARE(signalData.at(1).value<QModelIndex>(), proxy.mapToSource(idx));
+ receivedRoles = signalData.at(2).value<QVector<int> >();
+ QCOMPARE(receivedRoles.size(), expectedRoles.size());
+ for (int role : expectedRoles)
+ QVERIFY(receivedRoles.contains(role));
+ idx = proxy.index(1, 2, proxy.index(0, 1));
+ QVERIFY(proxy.setItemData(idx, itmData));
+ QCOMPARE(idx.data(Qt::DisplayRole).toString(), QStringLiteral("Test"));
+ QCOMPARE(idx.data(Qt::UserRole).toInt(), 88);
+ QCOMPARE(idx.data(Qt::UserRole + 1).toInt(), 99);
+ QCOMPARE(idx.data(Qt::UserRole + 2).toInt(), 2);
+ QCOMPARE(idx.data(Qt::UserRole + 3).toInt(), 1);
+ QCOMPARE(sourceDataChangeSpy.size(), 1);
+ QCOMPARE(proxyDataChangeSpy.size(), 1);
+ signalData = proxyDataChangeSpy.takeFirst();
+ QCOMPARE(signalData.at(0).value<QModelIndex>(), idx);
+ QCOMPARE(signalData.at(1).value<QModelIndex>(), idx);
+ receivedRoles = signalData.at(2).value<QVector<int> >();
+ QCOMPARE(receivedRoles.size(), expectedRoles.size());
+ for (int role : expectedRoles)
+ QVERIFY(receivedRoles.contains(role));
+ signalData = sourceDataChangeSpy.takeFirst();
+ QCOMPARE(signalData.at(0).value<QModelIndex>(), proxy.mapToSource(idx));
+ QCOMPARE(signalData.at(1).value<QModelIndex>(), proxy.mapToSource(idx));
+ receivedRoles = signalData.at(2).value<QVector<int> >();
+ QCOMPARE(receivedRoles.size(), expectedRoles.size());
+ for (int role : expectedRoles)
+ QVERIFY(receivedRoles.contains(role));
+ QVERIFY(!proxy.setItemData(QModelIndex(), itmData));
+ delete model;
+}
+
+void tst_QTransposeProxyModel::moveRowsBase()
+{
+ QStringListModel model{QStringList{"A", "B", "C", "D"}};
+ QTransposeProxyModel proxy;
+ QSignalSpy columnsMoveSpy(&proxy, &QAbstractItemModel::columnsMoved);
+ QVERIFY(columnsMoveSpy.isValid());
+ QSignalSpy columnsAboutToBeMoveSpy(&proxy, &QAbstractItemModel::columnsAboutToBeMoved);
+ QVERIFY(columnsAboutToBeMoveSpy.isValid());
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(&model);
+ const QStringList expectedNewVal = {"B", "A", "C", "D"};
+ QVERIFY(model.moveRows(QModelIndex(), 0, 1, QModelIndex(), 2));
+ for (int i = 0; i < expectedNewVal.size(); ++i)
+ QCOMPARE(proxy.index(0, i).data(), expectedNewVal.at(i));
+ QCOMPARE(columnsMoveSpy.count(), 1);
+ QCOMPARE(columnsAboutToBeMoveSpy.count(), 1);
+ for (const auto &spyArgs : {columnsMoveSpy.takeFirst(),
+ columnsAboutToBeMoveSpy.takeFirst()}) {
+ QVERIFY(!spyArgs.at(0).value<QModelIndex>().isValid());
+ QCOMPARE(spyArgs.at(1).toInt(), 0);
+ QCOMPARE(spyArgs.at(2).toInt(), 0);
+ QVERIFY(!spyArgs.at(3).value<QModelIndex>().isValid());
+ QCOMPARE(spyArgs.at(4).toInt(), 2);
+ }
+}
+
+void tst_QTransposeProxyModel::moveColumnsProxy()
+{
+ QStringListModel model{QStringList{"A", "B", "C", "D"}};
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ QSignalSpy columnsMoveSpy(&proxy, &QAbstractItemModel::columnsMoved);
+ QVERIFY(columnsMoveSpy.isValid());
+ QSignalSpy columnsAboutToBeMoveSpy(&proxy, &QAbstractItemModel::columnsAboutToBeMoved);
+ QVERIFY(columnsAboutToBeMoveSpy.isValid());
+ QSignalSpy rowsMoveSpy(&model, &QAbstractItemModel::rowsMoved);
+ QVERIFY(rowsMoveSpy.isValid());
+ QSignalSpy rowsAboutToBeMoveSpy(&model, &QAbstractItemModel::rowsAboutToBeMoved);
+ QVERIFY(rowsAboutToBeMoveSpy.isValid());
+ proxy.setSourceModel(&model);
+ const QStringList expectedNewVal = {"B", "A", "C", "D"};
+ QVERIFY(proxy.moveColumns(QModelIndex(), 0, 1, QModelIndex(), 2));
+ for (int i = 0; i < expectedNewVal.size(); ++i)
+ QCOMPARE(proxy.index(0, i).data(), expectedNewVal.at(i));
+ for (int i = 0; i < expectedNewVal.size(); ++i)
+ QCOMPARE(model.index(i, 0).data(), expectedNewVal.at(i));
+ QCOMPARE(columnsMoveSpy.count(), 1);
+ QCOMPARE(columnsAboutToBeMoveSpy.count(), 1);
+ QCOMPARE(rowsMoveSpy.count(), 1);
+ QCOMPARE(rowsAboutToBeMoveSpy.count(), 1);
+ for (const auto &spyArgs : {columnsMoveSpy.takeFirst(),
+ columnsAboutToBeMoveSpy.takeFirst(),
+ rowsMoveSpy.takeFirst(),rowsAboutToBeMoveSpy.takeFirst()}) {
+ QVERIFY(!spyArgs.at(0).value<QModelIndex>().isValid());
+ QCOMPARE(spyArgs.at(1).toInt(), 0);
+ QCOMPARE(spyArgs.at(2).toInt(), 0);
+ QVERIFY(!spyArgs.at(3).value<QModelIndex>().isValid());
+ }
+}
+
+void tst_QTransposeProxyModel::setData_data()
+{
+ QTest::addColumn<QAbstractItemModel *>("model");
+ QTest::addColumn<bool>("rootItem");
+ QTest::addColumn<bool>("viaProxy");
+ QTest::newRow("List_via_Base") << createListModel(this) << true << false;
+ QTest::newRow("Table_via_Base") << createTableModel(this) << true << false;
+ QTest::newRow("Tree_via_Base_Root_Item") << createTreeModel(this) << true << false;
+ QTest::newRow("Tree_via_Base_Child_Item") << createTreeModel(this) << false << false;
+ QTest::newRow("List_via_Proxy") << createListModel(this) << true << true;
+ QTest::newRow("Table_via_Proxy") << createTableModel(this) << true << true;
+ QTest::newRow("Tree_via_Proxy_Root_Item") << createTreeModel(this) << true << true;
+ QTest::newRow("Tree_via_Proxy_Child_Item") << createTreeModel(this) << false << true;
+}
+
+void tst_QTransposeProxyModel::setData()
+{
+ QFETCH(QAbstractItemModel *, model);
+ QFETCH(bool, rootItem);
+ QFETCH(bool, viaProxy);
+ QTransposeProxyModel proxy;
+ new QAbstractItemModelTester(&proxy, &proxy);
+ proxy.setSourceModel(model);
+ QSignalSpy sourceDataChangeSpy(model, &QAbstractItemModel::dataChanged);
+ QVERIFY(sourceDataChangeSpy.isValid());
+ QSignalSpy proxyDataChangeSpy(&proxy, &QAbstractItemModel::dataChanged);
+ QVERIFY(proxyDataChangeSpy.isValid());
+ const QString testData = QStringLiteral("TestingSetData");
+ if (viaProxy) {
+ const QModelIndex parIdx = rootItem ? QModelIndex() : proxy.index(0, 1);
+ QVERIFY(proxy.setData(proxy.index(0, 1, parIdx), testData));
+ QCOMPARE(model->index(1, 0, proxy.mapToSource(parIdx)).data().toString(), testData);
+ } else {
+ const QModelIndex parIdx = rootItem ? QModelIndex() : model->index(1, 0);
+ QVERIFY(model->setData(model->index(1, 0, parIdx), testData));
+ QCOMPARE(proxy.index(0, 1, proxy.mapFromSource(parIdx)).data().toString(), testData);
+ }
+ QCOMPARE(sourceDataChangeSpy.size(), 1);
+ QCOMPARE(proxyDataChangeSpy.size(), 1);
+ delete model;
+}
+
+QTEST_GUILESS_MAIN(tst_QTransposeProxyModel)
+
+#include "tst_qtransposeproxymodel.moc"
diff --git a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
index 9855bec520..467d299526 100644
--- a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
+++ b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp
@@ -324,6 +324,7 @@ private slots:
void signal();
void signalIndex_data();
void signalIndex();
+ void enumDebugStream_data();
void enumDebugStream();
void inherits_data();
@@ -1741,37 +1742,104 @@ void tst_QMetaObject::signalIndex()
SignalTestHelper::signalIndex(mm));
}
+void tst_QMetaObject::enumDebugStream_data()
+{
+ QTest::addColumn<int>("verbosity");
+ QTest::addColumn<QString>("normalEnumMsg");
+ QTest::addColumn<QString>("scopedEnumMsg");
+ QTest::addColumn<QString>("globalEnumMsg");
+ QTest::addColumn<QString>("normalFlagMsg");
+ QTest::addColumn<QString>("normalFlagsMsg");
+ QTest::addColumn<QString>("scopedFlagMsg");
+ QTest::addColumn<QString>("scopedFlagsMsg");
+ QTest::addColumn<QString>("flagAsEnumMsg");
+
+ QTest::newRow("verbosity=0") << 0
+ << "hello MyEnum2 world"
+ << "hello MyScopedEnum::Enum3 scoped world"
+ << "WindowTitleHint Window Desktop WindowSystemMenuHint"
+ << "hello MyFlag1 world"
+ << "MyFlag1 MyFlag2|MyFlag3"
+ << "MyScopedFlag(MyFlag2)"
+ << "MyScopedFlag(MyFlag2|MyFlag3)"
+ << "MyFlag1";
+
+ QTest::newRow("verbosity=1") << 1
+ << "hello MyEnum::MyEnum2 world"
+ << "hello MyScopedEnum::Enum3 scoped world"
+ << "WindowType::WindowTitleHint WindowType::Window WindowType::Desktop WindowType::WindowSystemMenuHint"
+ << "hello MyFlag(MyFlag1) world"
+ << "MyFlag(MyFlag1) MyFlag(MyFlag2|MyFlag3)"
+ << "MyScopedFlag(MyFlag2)"
+ << "MyScopedFlag(MyFlag2|MyFlag3)"
+ << "MyFlag::MyFlag1";
+
+ QTest::newRow("verbosity=2") << 2
+ << "hello MyNamespace::MyClass::MyEnum2 world"
+ << "hello MyNamespace::MyClass::MyScopedEnum::Enum3 scoped world"
+ << "Qt::WindowTitleHint Qt::Window Qt::Desktop Qt::WindowSystemMenuHint"
+ << "hello QFlags<MyNamespace::MyClass::MyFlag>(MyFlag1) world"
+ << "QFlags<MyNamespace::MyClass::MyFlag>(MyFlag1) QFlags<MyNamespace::MyClass::MyFlag>(MyFlag2|MyFlag3)"
+ << "QFlags<MyNamespace::MyClass::MyScopedFlag>(MyFlag2)"
+ << "QFlags<MyNamespace::MyClass::MyScopedFlag>(MyFlag2|MyFlag3)"
+ << "MyNamespace::MyClass::MyFlag1";
+
+ QTest::newRow("verbosity=3") << 3
+ << "hello MyNamespace::MyClass::MyEnum::MyEnum2 world"
+ << "hello MyNamespace::MyClass::MyScopedEnum::Enum3 scoped world"
+ << "Qt::WindowType::WindowTitleHint Qt::WindowType::Window Qt::WindowType::Desktop Qt::WindowType::WindowSystemMenuHint"
+ << "hello QFlags<MyNamespace::MyClass::MyFlag>(MyFlag1) world"
+ << "QFlags<MyNamespace::MyClass::MyFlag>(MyFlag1) QFlags<MyNamespace::MyClass::MyFlag>(MyFlag2|MyFlag3)"
+ << "QFlags<MyNamespace::MyClass::MyScopedFlag>(MyFlag2)"
+ << "QFlags<MyNamespace::MyClass::MyScopedFlag>(MyFlag2|MyFlag3)"
+ << "MyNamespace::MyClass::MyFlag::MyFlag1";
+}
+
void tst_QMetaObject::enumDebugStream()
{
- QTest::ignoreMessage(QtDebugMsg, "hello MyNamespace::MyClass::MyEnum2 world ");
- qDebug() << "hello" << MyNamespace::MyClass::MyEnum2 << "world";
+ QFETCH(int, verbosity);
+
+ QFETCH(QString, normalEnumMsg);
+ QFETCH(QString, scopedEnumMsg);
+ QFETCH(QString, globalEnumMsg);
+
+ QFETCH(QString, normalFlagMsg);
+ QFETCH(QString, normalFlagsMsg);
+ QFETCH(QString, scopedFlagMsg);
+ QFETCH(QString, scopedFlagsMsg);
+ QFETCH(QString, flagAsEnumMsg);
+
+ // Enums
+ QTest::ignoreMessage(QtDebugMsg, qPrintable(normalEnumMsg));
+ qDebug().verbosity(verbosity) << "hello" << MyNamespace::MyClass::MyEnum2 << "world";
- QTest::ignoreMessage(QtDebugMsg, "hello MyNamespace::MyClass::MyScopedEnum::Enum3 scoped world ");
- qDebug() << "hello" << MyNamespace::MyClass::MyScopedEnum::Enum3 << "scoped world";
+ QTest::ignoreMessage(QtDebugMsg, qPrintable(scopedEnumMsg));
+ qDebug().verbosity(verbosity) << "hello" << MyNamespace::MyClass::MyScopedEnum::Enum3 << "scoped world";
- QTest::ignoreMessage(QtDebugMsg, "Qt::WindowTitleHint Qt::Window Qt::Desktop Qt::WindowSystemMenuHint");
- qDebug() << Qt::WindowTitleHint << Qt::Window << Qt::Desktop << Qt::WindowSystemMenuHint;
+ QTest::ignoreMessage(QtDebugMsg, qPrintable(globalEnumMsg));
+ qDebug().verbosity(verbosity) << Qt::WindowTitleHint << Qt::Window << Qt::Desktop << Qt::WindowSystemMenuHint;
- QTest::ignoreMessage(QtDebugMsg, "hello QFlags<MyNamespace::MyClass::MyFlag>(MyFlag1) world");
+ // Flags
+ QTest::ignoreMessage(QtDebugMsg, qPrintable(normalFlagMsg));
MyNamespace::MyClass::MyFlags f1 = MyNamespace::MyClass::MyFlag1;
- qDebug() << "hello" << f1 << "world";
+ qDebug().verbosity(verbosity) << "hello" << f1 << "world";
MyNamespace::MyClass::MyFlags f2 = MyNamespace::MyClass::MyFlag2 | MyNamespace::MyClass::MyFlag3;
- QTest::ignoreMessage(QtDebugMsg, "QFlags<MyNamespace::MyClass::MyFlag>(MyFlag1) QFlags<MyNamespace::MyClass::MyFlag>(MyFlag2|MyFlag3)");
- qDebug() << f1 << f2;
+ QTest::ignoreMessage(QtDebugMsg, qPrintable(normalFlagsMsg));
+ qDebug().verbosity(verbosity) << f1 << f2;
- QTest::ignoreMessage(QtDebugMsg, "QFlags<MyNamespace::MyClass::MyScopedFlag>(MyFlag2)");
+ QTest::ignoreMessage(QtDebugMsg, qPrintable(scopedFlagMsg));
MyNamespace::MyClass::MyScopedFlags f3 = MyNamespace::MyClass::MyScopedFlag::MyFlag2;
- qDebug() << f3;
+ qDebug().verbosity(verbosity) << f3;
- QTest::ignoreMessage(QtDebugMsg, "QFlags<MyNamespace::MyClass::MyScopedFlag>(MyFlag2|MyFlag3)");
+ QTest::ignoreMessage(QtDebugMsg, qPrintable(scopedFlagsMsg));
f3 |= MyNamespace::MyClass::MyScopedFlag::MyFlag3;
- qDebug() << f3;
+ qDebug().verbosity(verbosity) << f3;
// Single flag recognized as enum:
- QTest::ignoreMessage(QtDebugMsg, "MyNamespace::MyClass::MyFlag1");
+ QTest::ignoreMessage(QtDebugMsg, qPrintable(flagAsEnumMsg));
MyNamespace::MyClass::MyFlag f4 = MyNamespace::MyClass::MyFlag1;
- qDebug() << f4;
+ qDebug().verbosity(verbosity) << f4;
}
void tst_QMetaObject::inherits_data()
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index e6fac74ccc..e2bb7dab2a 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -73,6 +73,7 @@ private slots:
void defined();
void threadSafety();
void namespaces();
+ void id();
void qMetaTypeId();
void properties();
void normalizedTypes();
@@ -342,6 +343,7 @@ struct Bar
++failureCount;
}
}
+ ~Bar() {}
public:
static int failureCount;
@@ -458,7 +460,7 @@ void tst_QMetaType::threadSafety()
namespace TestSpace
{
- struct Foo { double d; };
+ struct Foo { double d; public: ~Foo() {} };
struct QungTfu {};
}
Q_DECLARE_METATYPE(TestSpace::Foo)
@@ -476,6 +478,12 @@ void tst_QMetaType::namespaces()
QCOMPARE(QMetaType::typeName(qungTfuId), "TestSpace::QungTfu");
}
+void tst_QMetaType::id()
+{
+ QCOMPARE(QMetaType(QMetaType::QString).id(), QMetaType::QString);
+ QCOMPARE(QMetaType(::qMetaTypeId<TestSpace::Foo>()).id(), ::qMetaTypeId<TestSpace::Foo>());
+}
+
void tst_QMetaType::qMetaTypeId()
{
QCOMPARE(::qMetaTypeId<QString>(), int(QMetaType::QString));
@@ -509,11 +517,17 @@ void tst_QMetaType::properties()
}
template <typename T>
-struct Whity { T t; };
+struct Whity { T t; Whity() {} };
Q_DECLARE_METATYPE( Whity < int > )
Q_DECLARE_METATYPE(Whity<double>)
+#if !defined(Q_CC_CLANG) && defined(Q_CC_GNU) && Q_CC_GNU < 501
+QT_BEGIN_NAMESPACE
+Q_DECLARE_TYPEINFO(Whity<double>, Q_MOVABLE_TYPE);
+QT_END_NAMESPACE
+#endif
+
void tst_QMetaType::normalizedTypes()
{
int WhityIntId = ::qMetaTypeId<Whity<int> >();
@@ -812,10 +826,13 @@ void tst_QMetaType::sizeOfStaticLess()
QCOMPARE(size_t(QMetaType(type).sizeOf()), size);
}
-struct CustomMovable {};
+struct CustomMovable { CustomMovable() {} };
+#if !defined(Q_CC_CLANG) && defined(Q_CC_GNU) && Q_CC_GNU < 501
QT_BEGIN_NAMESPACE
Q_DECLARE_TYPEINFO(CustomMovable, Q_MOVABLE_TYPE);
QT_END_NAMESPACE
+#endif
+
Q_DECLARE_METATYPE(CustomMovable);
class CustomObject : public QObject
@@ -844,13 +861,15 @@ public:
};
Q_DECLARE_METATYPE(CustomMultiInheritanceObject*);
-class C { char _[4]; };
-class M { char _[4]; };
+class C { char _[4]; public: C() = default; C(const C&) {} };
+class M { char _[4]; public: M() {} };
class P { char _[4]; };
QT_BEGIN_NAMESPACE
+#if defined(Q_CC_GNU) && Q_CC_GNU < 501
Q_DECLARE_TYPEINFO(M, Q_MOVABLE_TYPE);
Q_DECLARE_TYPEINFO(P, Q_PRIMITIVE_TYPE);
+#endif
QT_END_NAMESPACE
// avoid the comma:
@@ -896,7 +915,7 @@ QT_FOR_EACH_STATIC_PRIMITIVE_POINTER(ADD_METATYPE_TEST_ROW)
QT_FOR_EACH_STATIC_CORE_POINTER(ADD_METATYPE_TEST_ROW)
#undef ADD_METATYPE_TEST_ROW
QTest::newRow("TestSpace::Foo") << ::qMetaTypeId<TestSpace::Foo>() << false << true << false << false;
- QTest::newRow("Whity<double>") << ::qMetaTypeId<Whity<double> >() << false << true << false << false;
+ QTest::newRow("Whity<double>") << ::qMetaTypeId<Whity<double> >() << true << true << false << false;
QTest::newRow("CustomMovable") << ::qMetaTypeId<CustomMovable>() << true << true << false << false;
QTest::newRow("CustomObject*") << ::qMetaTypeId<CustomObject*>() << true << false << true << false;
QTest::newRow("CustomMultiInheritanceObject*") << ::qMetaTypeId<CustomMultiInheritanceObject*>() << true << false << true << false;
@@ -1815,13 +1834,6 @@ DECLARE_NONSTREAMABLE(void)
DECLARE_NONSTREAMABLE(void*)
DECLARE_NONSTREAMABLE(QModelIndex)
DECLARE_NONSTREAMABLE(QPersistentModelIndex)
-DECLARE_NONSTREAMABLE(QJsonValue)
-DECLARE_NONSTREAMABLE(QJsonObject)
-DECLARE_NONSTREAMABLE(QJsonArray)
-DECLARE_NONSTREAMABLE(QJsonDocument)
-DECLARE_NONSTREAMABLE(QCborValue)
-DECLARE_NONSTREAMABLE(QCborArray)
-DECLARE_NONSTREAMABLE(QCborMap)
DECLARE_NONSTREAMABLE(QObject*)
DECLARE_NONSTREAMABLE(QWidget*)
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index 06254091cd..31268c5cf3 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -41,6 +41,7 @@
#include <QThread>
#include <QMutex>
#include <QWaitCondition>
+#include <QScopedPointer>
#if QT_CONFIG(process)
# include <QProcess>
#endif
@@ -285,104 +286,100 @@ static void playWithObjects()
void tst_QObject::disconnect()
{
- SenderObject *s = new SenderObject;
- ReceiverObject *r1 = new ReceiverObject;
- ReceiverObject *r2 = new ReceiverObject;
+ SenderObject s;
+ ReceiverObject r1;
+ ReceiverObject r2;
- connect( s, SIGNAL(signal1()), r1, SLOT(slot1()) );
+ connect(&s, SIGNAL(signal1()), &r1, SLOT(slot1()));
- connect( s, SIGNAL(signal2()), r1, SLOT(slot2()) );
- connect( s, SIGNAL(signal3()), r1, SLOT(slot3()) );
- connect( s, SIGNAL(signal4()), r1, SLOT(slot4()) );
+ connect(&s, SIGNAL(signal2()), &r1, SLOT(slot2()));
+ connect(&s, SIGNAL(signal3()), &r1, SLOT(slot3()));
+ connect(&s, SIGNAL(signal4()), &r1, SLOT(slot4()));
- s->emitSignal1();
- s->emitSignal2();
- s->emitSignal3();
- s->emitSignal4();
+ s.emitSignal1();
+ s.emitSignal2();
+ s.emitSignal3();
+ s.emitSignal4();
- QVERIFY(r1->called(1));
- QVERIFY(r1->called(2));
- QVERIFY(r1->called(3));
- QVERIFY(r1->called(4));
- r1->reset();
+ QVERIFY(r1.called(1));
+ QVERIFY(r1.called(2));
+ QVERIFY(r1.called(3));
+ QVERIFY(r1.called(4));
+ r1.reset();
// usual disconnect with all parameters given
- bool ret = QObject::disconnect( s, SIGNAL(signal1()), r1, SLOT(slot1()) );
+ bool ret = QObject::disconnect(&s, SIGNAL(signal1()), &r1, SLOT(slot1()));
- s->emitSignal1();
+ s.emitSignal1();
- QVERIFY(!r1->called(1));
- r1->reset();
+ QVERIFY(!r1.called(1));
+ r1.reset();
QVERIFY(ret);
- ret = QObject::disconnect( s, SIGNAL(signal1()), r1, SLOT(slot1()) );
+ ret = QObject::disconnect(&s, SIGNAL(signal1()), &r1, SLOT(slot1()));
QVERIFY(!ret);
// disconnect all signals from s from all slots from r1
- QObject::disconnect( s, 0, r1, 0 );
+ QObject::disconnect(&s, 0, &r1, 0);
- s->emitSignal2();
- s->emitSignal3();
- s->emitSignal4();
+ s.emitSignal2();
+ s.emitSignal3();
+ s.emitSignal4();
- QVERIFY(!r1->called(2));
- QVERIFY(!r1->called(3));
- QVERIFY(!r1->called(4));
- r1->reset();
+ QVERIFY(!r1.called(2));
+ QVERIFY(!r1.called(3));
+ QVERIFY(!r1.called(4));
+ r1.reset();
- connect( s, SIGNAL(signal1()), r1, SLOT(slot1()) );
- connect( s, SIGNAL(signal1()), r1, SLOT(slot2()) );
- connect( s, SIGNAL(signal1()), r1, SLOT(slot3()) );
- connect( s, SIGNAL(signal2()), r1, SLOT(slot4()) );
+ connect(&s, SIGNAL(signal1()), &r1, SLOT(slot1()));
+ connect(&s, SIGNAL(signal1()), &r1, SLOT(slot2()));
+ connect(&s, SIGNAL(signal1()), &r1, SLOT(slot3()));
+ connect(&s, SIGNAL(signal2()), &r1, SLOT(slot4()));
// disconnect s's signal1() from all slots of r1
- QObject::disconnect( s, SIGNAL(signal1()), r1, 0 );
+ QObject::disconnect(&s, SIGNAL(signal1()), &r1, 0);
- s->emitSignal1();
- s->emitSignal2();
+ s.emitSignal1();
+ s.emitSignal2();
- QVERIFY(!r1->called(1));
- QVERIFY(!r1->called(2));
- QVERIFY(!r1->called(3));
- QVERIFY(r1->called(4));
- r1->reset();
+ QVERIFY(!r1.called(1));
+ QVERIFY(!r1.called(2));
+ QVERIFY(!r1.called(3));
+ QVERIFY(r1.called(4));
+ r1.reset();
// make sure all is disconnected again
- QObject::disconnect( s, 0, r1, 0 );
+ QObject::disconnect(&s, 0, &r1, 0);
- connect( s, SIGNAL(signal1()), r1, SLOT(slot1()) );
- connect( s, SIGNAL(signal1()), r2, SLOT(slot1()) );
- connect( s, SIGNAL(signal2()), r1, SLOT(slot2()) );
- connect( s, SIGNAL(signal2()), r2, SLOT(slot2()) );
- connect( s, SIGNAL(signal3()), r1, SLOT(slot3()) );
- connect( s, SIGNAL(signal3()), r2, SLOT(slot3()) );
+ connect(&s, SIGNAL(signal1()), &r1, SLOT(slot1()));
+ connect(&s, SIGNAL(signal1()), &r2, SLOT(slot1()));
+ connect(&s, SIGNAL(signal2()), &r1, SLOT(slot2()));
+ connect(&s, SIGNAL(signal2()), &r2, SLOT(slot2()));
+ connect(&s, SIGNAL(signal3()), &r1, SLOT(slot3()));
+ connect(&s, SIGNAL(signal3()), &r2, SLOT(slot3()));
// disconnect signal1() from all receivers
- QObject::disconnect( s, SIGNAL(signal1()), 0, 0 );
- s->emitSignal1();
- s->emitSignal2();
- s->emitSignal3();
+ QObject::disconnect(&s, SIGNAL(signal1()), 0, 0);
+ s.emitSignal1();
+ s.emitSignal2();
+ s.emitSignal3();
- QVERIFY(!r1->called(1));
- QVERIFY(!r2->called(1));
- QVERIFY(r1->called(2));
- QVERIFY(r2->called(2));
- QVERIFY(r1->called(2));
- QVERIFY(r2->called(2));
+ QVERIFY(!r1.called(1));
+ QVERIFY(!r2.called(1));
+ QVERIFY(r1.called(2));
+ QVERIFY(r2.called(2));
+ QVERIFY(r1.called(2));
+ QVERIFY(r2.called(2));
- r1->reset();
- r2->reset();
+ r1.reset();
+ r2.reset();
// disconnect all signals of s from all receivers
- QObject::disconnect( s, 0, 0, 0 );
+ QObject::disconnect(&s, 0, 0, 0);
- QVERIFY(!r1->called(2));
- QVERIFY(!r2->called(2));
- QVERIFY(!r1->called(2));
- QVERIFY(!r2->called(2));
-
- delete r2;
- delete r1;
- delete s;
+ QVERIFY(!r1.called(2));
+ QVERIFY(!r2.called(2));
+ QVERIFY(!r1.called(2));
+ QVERIFY(!r2.called(2));
}
class AutoConnectSender : public QObject
@@ -504,14 +501,13 @@ void tst_QObject::connectSlotsByName()
void tst_QObject::qobject_castTemplate()
{
- QObject *o = 0;
- QVERIFY( !::qobject_cast<QObject*>(o) );
+ QScopedPointer<QObject> o;
+ QVERIFY(!::qobject_cast<QObject*>(o.data()));
- o = new SenderObject;
- QVERIFY( ::qobject_cast<SenderObject*>(o) );
- QVERIFY( ::qobject_cast<QObject*>(o) );
- QVERIFY( !::qobject_cast<ReceiverObject*>(o) );
- delete o;
+ o.reset(new SenderObject);
+ QVERIFY(::qobject_cast<SenderObject*>(o.data()));
+ QVERIFY(::qobject_cast<QObject*>(o.data()));
+ QVERIFY(!::qobject_cast<ReceiverObject*>(o.data()));
}
void tst_QObject::findChildren()
@@ -798,192 +794,197 @@ void tst_QObject::connectDisconnectNotify_data()
void tst_QObject::connectDisconnectNotify()
{
- NotifyObject *s = new NotifyObject;
- NotifyObject *r = new NotifyObject;
+ NotifyObject s;
+ NotifyObject r;
QFETCH(QString, a_signal);
QFETCH(QString, a_slot);
// Obtaining meta methods
- int signalIndx = ((SenderObject*)s)->metaObject()->indexOfSignal(
+ int signalIndx = ((SenderObject &)s).metaObject()->indexOfSignal(
QMetaObject::normalizedSignature(a_signal.toLatin1().constData()+1).constData());
- int methodIndx = ((ReceiverObject*)r)->metaObject()->indexOfMethod(
+ int methodIndx = ((ReceiverObject &)r).metaObject()->indexOfMethod(
QMetaObject::normalizedSignature(a_slot.toLatin1().constData()+1).constData());
- QMetaMethod signal = ((SenderObject*)s)->metaObject()->method(signalIndx);
- QMetaMethod method = ((ReceiverObject*)r)->metaObject()->method(methodIndx);
+ QMetaMethod signal = ((SenderObject &)s).metaObject()->method(signalIndx);
+ QMetaMethod method = ((ReceiverObject &)r).metaObject()->method(methodIndx);
QVERIFY(signal.isValid());
QVERIFY(method.isValid());
// Test connectNotify
- QVERIFY(QObject::connect((SenderObject*)s, a_signal.toLatin1(), (ReceiverObject*)r, a_slot.toLatin1()));
- QCOMPARE(s->connectedSignals.size(), 1);
- QCOMPARE(s->connectedSignals.at(0), signal);
- QVERIFY(s->disconnectedSignals.isEmpty());
+ QVERIFY(QObject::connect((SenderObject *)&s, a_signal.toLatin1(),
+ (ReceiverObject *)&r, a_slot.toLatin1()));
+ QCOMPARE(s.connectedSignals.size(), 1);
+ QCOMPARE(s.connectedSignals.at(0), signal);
+ QVERIFY(s.disconnectedSignals.isEmpty());
// Test disconnectNotify
- QVERIFY(QObject::disconnect((SenderObject*)s, a_signal.toLatin1(), (ReceiverObject*)r, a_slot.toLatin1()));
- QCOMPARE(s->disconnectedSignals.size(), 1);
- QCOMPARE(s->disconnectedSignals.at(0), signal);
- QCOMPARE(s->connectedSignals.size(), 1);
+ QVERIFY(QObject::disconnect((SenderObject *)&s, a_signal.toLatin1(),
+ (ReceiverObject *)&r, a_slot.toLatin1()));
+ QCOMPARE(s.disconnectedSignals.size(), 1);
+ QCOMPARE(s.disconnectedSignals.at(0), signal);
+ QCOMPARE(s.connectedSignals.size(), 1);
// Reconnect
- s->clearNotifications();
- QVERIFY(QObject::connect((SenderObject*)s, a_signal.toLatin1(), (ReceiverObject*)r, a_slot.toLatin1()));
- QCOMPARE(s->connectedSignals.size(), 1);
- QCOMPARE(s->connectedSignals.at(0), signal);
- QVERIFY(s->disconnectedSignals.isEmpty());
+ s.clearNotifications();
+ QVERIFY(QObject::connect((SenderObject *)&s, a_signal.toLatin1(),
+ (ReceiverObject *)&r, a_slot.toLatin1()));
+ QCOMPARE(s.connectedSignals.size(), 1);
+ QCOMPARE(s.connectedSignals.at(0), signal);
+ QVERIFY(s.disconnectedSignals.isEmpty());
// Test disconnectNotify for a complete disconnect
- QVERIFY(((SenderObject*)s)->disconnect((ReceiverObject*)r));
- QCOMPARE(s->disconnectedSignals.size(), 1);
- QCOMPARE(s->disconnectedSignals.at(0), QMetaMethod());
- QCOMPARE(s->connectedSignals.size(), 1);
+ QVERIFY(((SenderObject *)&s)->disconnect((ReceiverObject *)&r));
+ QCOMPARE(s.disconnectedSignals.size(), 1);
+ QCOMPARE(s.disconnectedSignals.at(0), QMetaMethod());
+ QCOMPARE(s.connectedSignals.size(), 1);
// Test connectNotify when connecting by QMetaMethod
- s->clearNotifications();
- QVERIFY(QObject::connect((SenderObject*)s, signal, (ReceiverObject*)r, method));
- QCOMPARE(s->connectedSignals.size(), 1);
- QCOMPARE(s->connectedSignals.at(0), signal);
- QVERIFY(s->disconnectedSignals.isEmpty());
+ s.clearNotifications();
+ QVERIFY(QObject::connect((SenderObject *)&s, signal, (ReceiverObject *)&r, method));
+ QCOMPARE(s.connectedSignals.size(), 1);
+ QCOMPARE(s.connectedSignals.at(0), signal);
+ QVERIFY(s.disconnectedSignals.isEmpty());
// Test disconnectNotify when disconnecting by QMetaMethod
- QVERIFY(QObject::disconnect((SenderObject*)s, signal, (ReceiverObject*)r, method));
- QCOMPARE(s->disconnectedSignals.size(), 1);
- QCOMPARE(s->disconnectedSignals.at(0), signal);
- QCOMPARE(s->connectedSignals.size(), 1);
+ QVERIFY(QObject::disconnect((SenderObject *)&s, signal, (ReceiverObject *)&r, method));
+ QCOMPARE(s.disconnectedSignals.size(), 1);
+ QCOMPARE(s.disconnectedSignals.at(0), signal);
+ QCOMPARE(s.connectedSignals.size(), 1);
// Reconnect
- s->clearNotifications();
- QVERIFY(QObject::connect((SenderObject*)s, a_signal.toLatin1(), (ReceiverObject*)r, a_slot.toLatin1()));
+ s.clearNotifications();
+ QVERIFY(QObject::connect((SenderObject *)&s, a_signal.toLatin1(),
+ (ReceiverObject *)&r, a_slot.toLatin1()));
// Test disconnectNotify for a complete disconnect by QMetaMethod
- QVERIFY(QObject::disconnect((SenderObject*)s, QMetaMethod(), 0, QMetaMethod()));
- QCOMPARE(s->disconnectedSignals.size(), 1);
- QCOMPARE(s->disconnectedSignals.at(0), QMetaMethod());
- QCOMPARE(s->connectedSignals.size(), 1);
+ QVERIFY(QObject::disconnect((SenderObject *)&s, QMetaMethod(), 0, QMetaMethod()));
+ QCOMPARE(s.disconnectedSignals.size(), 1);
+ QCOMPARE(s.disconnectedSignals.at(0), QMetaMethod());
+ QCOMPARE(s.connectedSignals.size(), 1);
// Test connectNotify when connecting by index
- s->clearNotifications();
- QVERIFY(QMetaObject::connect((SenderObject*)s, signalIndx, (ReceiverObject*)r, methodIndx));
- QCOMPARE(s->connectedSignals.size(), 1);
- QCOMPARE(s->connectedSignals.at(0), signal);
- QVERIFY(s->disconnectedSignals.isEmpty());
+ s.clearNotifications();
+ QVERIFY(QMetaObject::connect((SenderObject *)&s, signalIndx, (ReceiverObject *)&r, methodIndx));
+ QCOMPARE(s.connectedSignals.size(), 1);
+ QCOMPARE(s.connectedSignals.at(0), signal);
+ QVERIFY(s.disconnectedSignals.isEmpty());
// Test disconnectNotify when disconnecting by index
- QVERIFY(QMetaObject::disconnect((SenderObject*)s, signalIndx, (ReceiverObject*)r, methodIndx));
- QCOMPARE(s->disconnectedSignals.size(), 1);
- QCOMPARE(s->disconnectedSignals.at(0), signal);
- QCOMPARE(s->connectedSignals.size(), 1);
-
- delete s;
- delete r;
+ QVERIFY(QMetaObject::disconnect((SenderObject *)&s, signalIndx,
+ (ReceiverObject *)&r, methodIndx));
+ QCOMPARE(s.disconnectedSignals.size(), 1);
+ QCOMPARE(s.disconnectedSignals.at(0), signal);
+ QCOMPARE(s.connectedSignals.size(), 1);
}
static void connectDisconnectNotifyTestSlot() {}
void tst_QObject::connectDisconnectNotifyPMF()
{
- NotifyObject *s = new NotifyObject;
- NotifyObject *r = new NotifyObject;
+ NotifyObject s;
+ NotifyObject r;
QMetaMethod signal = QMetaMethod::fromSignal(&SenderObject::signal1);
// Test connectNotify
- QVERIFY(QObject::connect((SenderObject*)s, &SenderObject::signal1, (ReceiverObject*)r, &ReceiverObject::slot1));
- QCOMPARE(s->connectedSignals.size(), 1);
- QCOMPARE(s->connectedSignals.at(0), signal);
- QVERIFY(s->disconnectedSignals.isEmpty());
+ QVERIFY(QObject::connect((SenderObject *)&s, &SenderObject::signal1,
+ (ReceiverObject *)&r, &ReceiverObject::slot1));
+ QCOMPARE(s.connectedSignals.size(), 1);
+ QCOMPARE(s.connectedSignals.at(0), signal);
+ QVERIFY(s.disconnectedSignals.isEmpty());
// Test disconnectNotify
- QVERIFY(QObject::disconnect((SenderObject*)s, &SenderObject::signal1, (ReceiverObject*)r, &ReceiverObject::slot1));
- QCOMPARE(s->disconnectedSignals.size(), 1);
- QCOMPARE(s->disconnectedSignals.at(0), signal);
- QCOMPARE(s->connectedSignals.size(), 1);
+ QVERIFY(QObject::disconnect((SenderObject *)&s, &SenderObject::signal1,
+ (ReceiverObject *)&r, &ReceiverObject::slot1));
+ QCOMPARE(s.disconnectedSignals.size(), 1);
+ QCOMPARE(s.disconnectedSignals.at(0), signal);
+ QCOMPARE(s.connectedSignals.size(), 1);
// Reconnect
- s->clearNotifications();
- QVERIFY(QObject::connect((SenderObject*)s, &SenderObject::signal1, (ReceiverObject*)r, &ReceiverObject::slot1));
- QCOMPARE(s->connectedSignals.size(), 1);
- QCOMPARE(s->connectedSignals.at(0), signal);
- QVERIFY(s->disconnectedSignals.isEmpty());
+ s.clearNotifications();
+ QVERIFY(QObject::connect((SenderObject *)&s, &SenderObject::signal1,
+ (ReceiverObject *)&r, &ReceiverObject::slot1));
+ QCOMPARE(s.connectedSignals.size(), 1);
+ QCOMPARE(s.connectedSignals.at(0), signal);
+ QVERIFY(s.disconnectedSignals.isEmpty());
// Test disconnectNotify with wildcard slot
- QVERIFY(QObject::disconnect((SenderObject*)s, &SenderObject::signal1, (ReceiverObject*)r, 0));
- QCOMPARE(s->disconnectedSignals.size(), 1);
- QCOMPARE(s->disconnectedSignals.at(0), signal);
- QCOMPARE(s->connectedSignals.size(), 1);
+ QVERIFY(QObject::disconnect((SenderObject *)&s, &SenderObject::signal1,
+ (ReceiverObject *)&r, 0));
+ QCOMPARE(s.disconnectedSignals.size(), 1);
+ QCOMPARE(s.disconnectedSignals.at(0), signal);
+ QCOMPARE(s.connectedSignals.size(), 1);
// Reconnect
- s->clearNotifications();
- QMetaObject::Connection conn = connect((SenderObject*)s, &SenderObject::signal1,
- (ReceiverObject*)r, &ReceiverObject::slot1);
+ s.clearNotifications();
+ QMetaObject::Connection conn = connect((SenderObject *)&s, &SenderObject::signal1,
+ (ReceiverObject *)&r, &ReceiverObject::slot1);
QVERIFY(conn);
// Test disconnectNotify when disconnecting by QMetaObject::Connection
QVERIFY(QObject::disconnect(conn));
- QVERIFY(!s->disconnectedSignals.isEmpty());
+ QVERIFY(!s.disconnectedSignals.isEmpty());
// Test connectNotify when connecting by function pointer
- s->clearNotifications();
- QVERIFY(QObject::connect((SenderObject*)s, &SenderObject::signal1, connectDisconnectNotifyTestSlot));
- QCOMPARE(s->connectedSignals.size(), 1);
- QCOMPARE(s->connectedSignals.at(0), signal);
- QVERIFY(s->disconnectedSignals.isEmpty());
-
- delete s;
- delete r;
+ s.clearNotifications();
+ QVERIFY(QObject::connect((SenderObject *)&s, &SenderObject::signal1,
+ connectDisconnectNotifyTestSlot));
+ QCOMPARE(s.connectedSignals.size(), 1);
+ QCOMPARE(s.connectedSignals.at(0), signal);
+ QVERIFY(s.disconnectedSignals.isEmpty());
}
void tst_QObject::disconnectNotify_receiverDestroyed()
{
- NotifyObject *s = new NotifyObject;
- NotifyObject *r = new NotifyObject;
-
- QVERIFY(QObject::connect((SenderObject*)s, SIGNAL(signal1()), (ReceiverObject*)r, SLOT(slot1())));
-
- delete r;
- QCOMPARE(s->disconnectedSignals.count(), 1);
- QCOMPARE(s->disconnectedSignals.at(0), QMetaMethod::fromSignal(&SenderObject::signal1));
+ NotifyObject s;
- s->disconnectedSignals.clear();
- r = new NotifyObject;
+ {
+ NotifyObject r;
+ QVERIFY(QObject::connect((SenderObject *)&s, SIGNAL(signal1()),
+ (ReceiverObject *)&r, SLOT(slot1())));
+ }
+ QCOMPARE(s.disconnectedSignals.count(), 1);
+ QCOMPARE(s.disconnectedSignals.at(0), QMetaMethod::fromSignal(&SenderObject::signal1));
- QVERIFY(QObject::connect((SenderObject*)s, SIGNAL(signal3()), (ReceiverObject*)r, SLOT(slot3())));
+ s.disconnectedSignals.clear();
- delete r;
- QCOMPARE(s->disconnectedSignals.count(), 1);
- QCOMPARE(s->disconnectedSignals.at(0), QMetaMethod::fromSignal(&SenderObject::signal3));
+ {
+ NotifyObject r;
+ QVERIFY(QObject::connect((SenderObject *)&s, SIGNAL(signal3()),
+ (ReceiverObject *)&r, SLOT(slot3())));
+ }
- s->disconnectedSignals.clear();
- r = new NotifyObject;
+ QCOMPARE(s.disconnectedSignals.count(), 1);
+ QCOMPARE(s.disconnectedSignals.at(0), QMetaMethod::fromSignal(&SenderObject::signal3));
- QVERIFY(QObject::connect((SenderObject*)s, SIGNAL(destroyed()), (ReceiverObject*)r, SLOT(slot3())));
+ s.disconnectedSignals.clear();
- delete r;
- QCOMPARE(s->disconnectedSignals.count(), 1);
- QCOMPARE(s->disconnectedSignals.at(0), QMetaMethod::fromSignal(&QObject::destroyed));
+ {
+ NotifyObject r;
+ QVERIFY(QObject::connect((SenderObject *)&s, SIGNAL(destroyed()), (ReceiverObject *)&r, SLOT(slot3())));
+ }
- delete s;
+ QCOMPARE(s.disconnectedSignals.count(), 1);
+ QCOMPARE(s.disconnectedSignals.at(0), QMetaMethod::fromSignal(&QObject::destroyed));
}
void tst_QObject::disconnectNotify_metaObjConnection()
{
- NotifyObject *s = new NotifyObject;
- NotifyObject *r = new NotifyObject;
-
- QMetaObject::Connection c = QObject::connect((SenderObject*)s, SIGNAL(signal1()),
- (ReceiverObject*)r, SLOT(slot1()));
- QVERIFY(c);
- QVERIFY(QObject::disconnect(c));
+ NotifyObject s;
+ {
+ NotifyObject r;
- QCOMPARE(s->disconnectedSignals.count(), 1);
- QCOMPARE(s->disconnectedSignals.at(0), QMetaMethod::fromSignal(&SenderObject::signal1));
+ QMetaObject::Connection c = QObject::connect((SenderObject *)&s, SIGNAL(signal1()),
+ (ReceiverObject *)&r, SLOT(slot1()));
+ QVERIFY(c);
+ QVERIFY(QObject::disconnect(c));
- delete r;
- QCOMPARE(s->disconnectedSignals.count(), 1);
+ QCOMPARE(s.disconnectedSignals.count(), 1);
+ QCOMPARE(s.disconnectedSignals.at(0), QMetaMethod::fromSignal(&SenderObject::signal1));
- delete s;
+ QCOMPARE(s.disconnectedSignals.count(), 1);
+ }
}
class ConnectByNameNotifySenderObject : public QObject
@@ -3463,130 +3464,131 @@ void tst_QObject::qobjectConstCast()
void tst_QObject::uniqConnection()
{
- SenderObject *s = new SenderObject;
- ReceiverObject *r1 = new ReceiverObject;
- ReceiverObject *r2 = new ReceiverObject;
- r1->reset();
- r2->reset();
+ SenderObject s;
+ ReceiverObject r1;
+ ReceiverObject r2;
+ r1.reset();
+ r2.reset();
ReceiverObject::sequence = 0;
- QVERIFY( connect( s, SIGNAL(signal1()), r1, SLOT(slot1()) , Qt::UniqueConnection) );
- QVERIFY( connect( s, SIGNAL(signal1()), r2, SLOT(slot1()) , Qt::UniqueConnection) );
- QVERIFY( connect( s, SIGNAL(signal1()), r1, SLOT(slot3()) , Qt::UniqueConnection) );
- QVERIFY( connect( s, SIGNAL(signal3()), r1, SLOT(slot3()) , Qt::UniqueConnection) );
+ QVERIFY(connect(&s, SIGNAL(signal1()), &r1, SLOT(slot1()) , Qt::UniqueConnection) );
+ QVERIFY(connect(&s, SIGNAL(signal1()), &r2, SLOT(slot1()) , Qt::UniqueConnection) );
+ QVERIFY(connect(&s, SIGNAL(signal1()), &r1, SLOT(slot3()) , Qt::UniqueConnection) );
+ QVERIFY(connect(&s, SIGNAL(signal3()), &r1, SLOT(slot3()) , Qt::UniqueConnection) );
- s->emitSignal1();
- s->emitSignal2();
- s->emitSignal3();
- s->emitSignal4();
-
- QCOMPARE( r1->count_slot1, 1 );
- QCOMPARE( r1->count_slot2, 0 );
- QCOMPARE( r1->count_slot3, 2 );
- QCOMPARE( r1->count_slot4, 0 );
- QCOMPARE( r2->count_slot1, 1 );
- QCOMPARE( r2->count_slot2, 0 );
- QCOMPARE( r2->count_slot3, 0 );
- QCOMPARE( r2->count_slot4, 0 );
- QCOMPARE( r1->sequence_slot1, 1 );
- QCOMPARE( r2->sequence_slot1, 2 );
- QCOMPARE( r1->sequence_slot3, 4 );
-
- r1->reset();
- r2->reset();
+ s.emitSignal1();
+ s.emitSignal2();
+ s.emitSignal3();
+ s.emitSignal4();
+
+ QCOMPARE(r1.count_slot1, 1);
+ QCOMPARE(r1.count_slot2, 0);
+ QCOMPARE(r1.count_slot3, 2);
+ QCOMPARE(r1.count_slot4, 0);
+ QCOMPARE(r2.count_slot1, 1);
+ QCOMPARE(r2.count_slot2, 0);
+ QCOMPARE(r2.count_slot3, 0);
+ QCOMPARE(r2.count_slot4, 0);
+ QCOMPARE(r1.sequence_slot1, 1);
+ QCOMPARE(r2.sequence_slot1, 2);
+ QCOMPARE(r1.sequence_slot3, 4);
+
+ r1.reset();
+ r2.reset();
ReceiverObject::sequence = 0;
- QVERIFY( connect( s, SIGNAL(signal4()), r1, SLOT(slot4()) , Qt::UniqueConnection) );
- QVERIFY( connect( s, SIGNAL(signal4()), r2, SLOT(slot4()) , Qt::UniqueConnection) );
- QVERIFY(!connect( s, SIGNAL(signal4()), r2, SLOT(slot4()) , Qt::UniqueConnection) );
- QVERIFY( connect( s, SIGNAL(signal1()), r2, SLOT(slot4()) , Qt::UniqueConnection) );
- QVERIFY(!connect( s, SIGNAL(signal4()), r1, SLOT(slot4()) , Qt::UniqueConnection) );
+ QVERIFY( connect(&s, SIGNAL(signal4()), &r1, SLOT(slot4()) , Qt::UniqueConnection));
+ QVERIFY( connect(&s, SIGNAL(signal4()), &r2, SLOT(slot4()) , Qt::UniqueConnection));
+ QVERIFY(!connect(&s, SIGNAL(signal4()), &r2, SLOT(slot4()) , Qt::UniqueConnection));
+ QVERIFY( connect(&s, SIGNAL(signal1()), &r2, SLOT(slot4()) , Qt::UniqueConnection));
+ QVERIFY(!connect(&s, SIGNAL(signal4()), &r1, SLOT(slot4()) , Qt::UniqueConnection));
- s->emitSignal4();
- QCOMPARE( r1->count_slot4, 1 );
- QCOMPARE( r2->count_slot4, 1 );
- QCOMPARE( r1->sequence_slot4, 1 );
- QCOMPARE( r2->sequence_slot4, 2 );
+ s.emitSignal4();
+ QCOMPARE(r1.count_slot4, 1);
+ QCOMPARE(r2.count_slot4, 1);
+ QCOMPARE(r1.sequence_slot4, 1);
+ QCOMPARE(r2.sequence_slot4, 2);
- r1->reset();
- r2->reset();
+ r1.reset();
+ r2.reset();
ReceiverObject::sequence = 0;
- connect( s, SIGNAL(signal4()), r1, SLOT(slot4()) );
-
- s->emitSignal4();
- QCOMPARE( r1->count_slot4, 2 );
- QCOMPARE( r2->count_slot4, 1 );
- QCOMPARE( r1->sequence_slot4, 3 );
- QCOMPARE( r2->sequence_slot4, 2 );
+ connect(&s, SIGNAL(signal4()), &r1, SLOT(slot4()));
- delete s;
- delete r1;
- delete r2;
+ s.emitSignal4();
+ QCOMPARE(r1.count_slot4, 2);
+ QCOMPARE(r2.count_slot4, 1);
+ QCOMPARE(r1.sequence_slot4, 3);
+ QCOMPARE(r2.sequence_slot4, 2);
}
void tst_QObject::uniqConnectionPtr()
{
- SenderObject *s = new SenderObject;
- ReceiverObject *r1 = new ReceiverObject;
- ReceiverObject *r2 = new ReceiverObject;
- r1->reset();
- r2->reset();
+ SenderObject s;
+ ReceiverObject r1;
+ ReceiverObject r2;
+ r1.reset();
+ r2.reset();
ReceiverObject::sequence = 0;
- QVERIFY( connect( s, &SenderObject::signal1, r1, &ReceiverObject::slot1 , Qt::UniqueConnection) );
- QVERIFY( connect( s, &SenderObject::signal1, r2, &ReceiverObject::slot1 , Qt::UniqueConnection) );
- QVERIFY( connect( s, &SenderObject::signal1, r1, &ReceiverObject::slot3 , Qt::UniqueConnection) );
- QVERIFY( connect( s, &SenderObject::signal3, r1, &ReceiverObject::slot3 , Qt::UniqueConnection) );
+ QVERIFY(connect(&s, &SenderObject::signal1, &r1, &ReceiverObject::slot1 ,
+ Qt::UniqueConnection));
+ QVERIFY(connect(&s, &SenderObject::signal1, &r2, &ReceiverObject::slot1 ,
+ Qt::UniqueConnection));
+ QVERIFY(connect(&s, &SenderObject::signal1, &r1, &ReceiverObject::slot3 ,
+ Qt::UniqueConnection));
+ QVERIFY(connect(&s, &SenderObject::signal3, &r1, &ReceiverObject::slot3 ,
+ Qt::UniqueConnection));
- s->emitSignal1();
- s->emitSignal2();
- s->emitSignal3();
- s->emitSignal4();
-
- QCOMPARE( r1->count_slot1, 1 );
- QCOMPARE( r1->count_slot2, 0 );
- QCOMPARE( r1->count_slot3, 2 );
- QCOMPARE( r1->count_slot4, 0 );
- QCOMPARE( r2->count_slot1, 1 );
- QCOMPARE( r2->count_slot2, 0 );
- QCOMPARE( r2->count_slot3, 0 );
- QCOMPARE( r2->count_slot4, 0 );
- QCOMPARE( r1->sequence_slot1, 1 );
- QCOMPARE( r2->sequence_slot1, 2 );
- QCOMPARE( r1->sequence_slot3, 4 );
-
- r1->reset();
- r2->reset();
+ s.emitSignal1();
+ s.emitSignal2();
+ s.emitSignal3();
+ s.emitSignal4();
+
+ QCOMPARE(r1.count_slot1, 1);
+ QCOMPARE(r1.count_slot2, 0);
+ QCOMPARE(r1.count_slot3, 2);
+ QCOMPARE(r1.count_slot4, 0);
+ QCOMPARE(r2.count_slot1, 1);
+ QCOMPARE(r2.count_slot2, 0);
+ QCOMPARE(r2.count_slot3, 0);
+ QCOMPARE(r2.count_slot4, 0);
+ QCOMPARE(r1.sequence_slot1, 1);
+ QCOMPARE(r2.sequence_slot1, 2);
+ QCOMPARE(r1.sequence_slot3, 4);
+
+ r1.reset();
+ r2.reset();
ReceiverObject::sequence = 0;
- QVERIFY( connect( s, &SenderObject::signal4, r1, &ReceiverObject::slot4 , Qt::UniqueConnection) );
- QVERIFY( connect( s, &SenderObject::signal4, r2, &ReceiverObject::slot4 , Qt::UniqueConnection) );
- QVERIFY(!connect( s, &SenderObject::signal4, r2, &ReceiverObject::slot4 , Qt::UniqueConnection) );
- QVERIFY( connect( s, &SenderObject::signal1, r2, &ReceiverObject::slot4 , Qt::UniqueConnection) );
- QVERIFY(!connect( s, &SenderObject::signal4, r1, &ReceiverObject::slot4 , Qt::UniqueConnection) );
+ QVERIFY( connect(&s, &SenderObject::signal4, &r1, &ReceiverObject::slot4 ,
+ Qt::UniqueConnection));
+ QVERIFY( connect(&s, &SenderObject::signal4, &r2, &ReceiverObject::slot4 ,
+ Qt::UniqueConnection));
+ QVERIFY(!connect(&s, &SenderObject::signal4, &r2, &ReceiverObject::slot4 ,
+ Qt::UniqueConnection));
+ QVERIFY( connect(&s, &SenderObject::signal1, &r2, &ReceiverObject::slot4 ,
+ Qt::UniqueConnection));
+ QVERIFY(!connect(&s, &SenderObject::signal4, &r1, &ReceiverObject::slot4 ,
+ Qt::UniqueConnection));
- s->emitSignal4();
- QCOMPARE( r1->count_slot4, 1 );
- QCOMPARE( r2->count_slot4, 1 );
- QCOMPARE( r1->sequence_slot4, 1 );
- QCOMPARE( r2->sequence_slot4, 2 );
+ s.emitSignal4();
+ QCOMPARE(r1.count_slot4, 1);
+ QCOMPARE(r2.count_slot4, 1);
+ QCOMPARE(r1.sequence_slot4, 1);
+ QCOMPARE(r2.sequence_slot4, 2);
- r1->reset();
- r2->reset();
+ r1.reset();
+ r2.reset();
ReceiverObject::sequence = 0;
- connect( s, &SenderObject::signal4, r1, &ReceiverObject::slot4 );
+ connect(&s, &SenderObject::signal4, &r1, &ReceiverObject::slot4);
- s->emitSignal4();
- QCOMPARE( r1->count_slot4, 2 );
- QCOMPARE( r2->count_slot4, 1 );
- QCOMPARE( r1->sequence_slot4, 3 );
- QCOMPARE( r2->sequence_slot4, 2 );
-
- delete s;
- delete r1;
- delete r2;
+ s.emitSignal4();
+ QCOMPARE(r1.count_slot4, 2);
+ QCOMPARE(r2.count_slot4, 1);
+ QCOMPARE(r1.sequence_slot4, 3);
+ QCOMPARE(r2.sequence_slot4, 2);
}
void tst_QObject::interfaceIid()
@@ -3890,217 +3892,214 @@ void tst_QObject::isSignalConnectedAfterDisconnection()
void tst_QObject::qMetaObjectConnect()
{
- SenderObject *s = new SenderObject;
- ReceiverObject *r1 = new ReceiverObject;
- ReceiverObject *r2 = new ReceiverObject;
- r1->reset();
- r2->reset();
- ReceiverObject::sequence = 0;
-
- int signal1Index = s->metaObject()->indexOfSignal("signal1()");
- int signal3Index = s->metaObject()->indexOfSignal("signal3()");
- int slot1Index = r1->metaObject()->indexOfSlot("slot1()");
- int slot2Index = r1->metaObject()->indexOfSlot("slot2()");
- int slot3Index = r1->metaObject()->indexOfSlot("slot3()");
-
- QVERIFY(slot1Index > 0);
- QVERIFY(slot2Index > 0);
- QVERIFY(slot3Index > 0);
-
- QVERIFY( QMetaObject::connect( s, signal1Index, r1, slot1Index) );
- QVERIFY( QMetaObject::connect( s, signal3Index, r2, slot3Index) );
- QVERIFY( QMetaObject::connect( s, -1, r2, slot2Index) );
-
- QCOMPARE( r1->count_slot1, 0 );
- QCOMPARE( r1->count_slot2, 0 );
- QCOMPARE( r1->count_slot3, 0 );
- QCOMPARE( r2->count_slot1, 0 );
- QCOMPARE( r2->count_slot2, 0 );
- QCOMPARE( r2->count_slot3, 0 );
-
- s->emitSignal1();
-
- QCOMPARE( r1->count_slot1, 1 );
- QCOMPARE( r1->count_slot2, 0 );
- QCOMPARE( r1->count_slot3, 0 );
- QCOMPARE( r2->count_slot1, 0 );
- QCOMPARE( r2->count_slot2, 1 );
- QCOMPARE( r2->count_slot3, 0 );
-
- s->emitSignal2();
- s->emitSignal3();
- s->emitSignal4();
-
- QCOMPARE( r1->count_slot1, 1 );
- QCOMPARE( r1->count_slot2, 0 );
- QCOMPARE( r1->count_slot3, 0 );
- QCOMPARE( r2->count_slot1, 0 );
- QCOMPARE( r2->count_slot2, 4 );
- QCOMPARE( r2->count_slot3, 1 );
-
- QVERIFY( QMetaObject::disconnect( s, signal1Index, r1, slot1Index) );
- QVERIFY( QMetaObject::disconnect( s, signal3Index, r2, slot3Index) );
- QVERIFY( QMetaObject::disconnect( s, -1, r2, slot2Index) );
-
- s->emitSignal1();
- s->emitSignal2();
- s->emitSignal3();
- s->emitSignal4();
-
- QCOMPARE( r1->count_slot1, 1 );
- QCOMPARE( r1->count_slot2, 0 );
- QCOMPARE( r1->count_slot3, 0 );
- QCOMPARE( r2->count_slot1, 0 );
- QCOMPARE( r2->count_slot2, 4 );
- QCOMPARE( r2->count_slot3, 1 );
-
- //some "dynamic" signal
- QVERIFY( QMetaObject::connect( s, s->metaObject()->methodOffset() + 20, r1, slot3Index) );
- QVERIFY( QMetaObject::connect( s, s->metaObject()->methodOffset() + 35, r2, slot1Index) );
- QVERIFY( QMetaObject::connect( s, -1, r1, slot2Index) );
-
- r1->reset();
- r2->reset();
-
- void *args[] = { 0 , 0 };
- QMetaObject::activate(s, s->metaObject()->methodOffset() + 20, args);
- QMetaObject::activate(s, s->metaObject()->methodOffset() + 48, args);
- QCOMPARE( r1->count_slot1, 0 );
- QCOMPARE( r1->count_slot2, 2 );
- QCOMPARE( r1->count_slot3, 1 );
- QCOMPARE( r2->count_slot1, 0 );
- QCOMPARE( r2->count_slot2, 0 );
- QCOMPARE( r2->count_slot3, 0 );
-
- QMetaObject::activate(s, s->metaObject()->methodOffset() + 35, args);
- s->emitSignal1();
- s->emitSignal2();
-
- QCOMPARE( r1->count_slot1, 0 );
- QCOMPARE( r1->count_slot2, 5 );
- QCOMPARE( r1->count_slot3, 1 );
- QCOMPARE( r2->count_slot1, 1 );
- QCOMPARE( r2->count_slot2, 0 );
- QCOMPARE( r2->count_slot3, 0 );
+ ReceiverObject r1;
+ ReceiverObject r2;
+ int slot1Index, slot2Index, slot3Index;
+ {
+ SenderObject s;
+ r1.reset();
+ r2.reset();
+ ReceiverObject::sequence = 0;
+
+ int signal1Index = s.metaObject()->indexOfSignal("signal1()");
+ int signal3Index = s.metaObject()->indexOfSignal("signal3()");
+ slot1Index = r1.metaObject()->indexOfSlot("slot1()");
+ slot2Index = r1.metaObject()->indexOfSlot("slot2()");
+ slot3Index = r1.metaObject()->indexOfSlot("slot3()");
+
+ QVERIFY(slot1Index > 0);
+ QVERIFY(slot2Index > 0);
+ QVERIFY(slot3Index > 0);
+
+ QVERIFY(QMetaObject::connect(&s, signal1Index, &r1, slot1Index));
+ QVERIFY(QMetaObject::connect(&s, signal3Index, &r2, slot3Index));
+ QVERIFY(QMetaObject::connect(&s, -1, &r2, slot2Index));
+
+ QCOMPARE(r1.count_slot1, 0);
+ QCOMPARE(r1.count_slot2, 0);
+ QCOMPARE(r1.count_slot3, 0);
+ QCOMPARE(r2.count_slot1, 0);
+ QCOMPARE(r2.count_slot2, 0);
+ QCOMPARE(r2.count_slot3, 0);
+
+ s.emitSignal1();
+
+ QCOMPARE(r1.count_slot1, 1);
+ QCOMPARE(r1.count_slot2, 0);
+ QCOMPARE(r1.count_slot3, 0);
+ QCOMPARE(r2.count_slot1, 0);
+ QCOMPARE(r2.count_slot2, 1);
+ QCOMPARE(r2.count_slot3, 0);
+
+ s.emitSignal2();
+ s.emitSignal3();
+ s.emitSignal4();
+
+ QCOMPARE(r1.count_slot1, 1);
+ QCOMPARE(r1.count_slot2, 0);
+ QCOMPARE(r1.count_slot3, 0);
+ QCOMPARE(r2.count_slot1, 0);
+ QCOMPARE(r2.count_slot2, 4);
+ QCOMPARE(r2.count_slot3, 1);
+
+ QVERIFY(QMetaObject::disconnect(&s, signal1Index, &r1, slot1Index));
+ QVERIFY(QMetaObject::disconnect(&s, signal3Index, &r2, slot3Index));
+ QVERIFY(QMetaObject::disconnect(&s, -1, &r2, slot2Index));
+
+ s.emitSignal1();
+ s.emitSignal2();
+ s.emitSignal3();
+ s.emitSignal4();
+
+ QCOMPARE(r1.count_slot1, 1);
+ QCOMPARE(r1.count_slot2, 0);
+ QCOMPARE(r1.count_slot3, 0);
+ QCOMPARE(r2.count_slot1, 0);
+ QCOMPARE(r2.count_slot2, 4);
+ QCOMPARE(r2.count_slot3, 1);
+
+ //some "dynamic" signal
+ QVERIFY(QMetaObject::connect(&s, s.metaObject()->methodOffset() + 20, &r1, slot3Index));
+ QVERIFY(QMetaObject::connect(&s, s.metaObject()->methodOffset() + 35, &r2, slot1Index));
+ QVERIFY(QMetaObject::connect(&s, -1, &r1, slot2Index));
+
+ r1.reset();
+ r2.reset();
+
+ void *args[] = { 0 , 0 };
+ QMetaObject::activate(&s, s.metaObject()->methodOffset() + 20, args);
+ QMetaObject::activate(&s, s.metaObject()->methodOffset() + 48, args);
+ QCOMPARE(r1.count_slot1, 0);
+ QCOMPARE(r1.count_slot2, 2);
+ QCOMPARE(r1.count_slot3, 1);
+ QCOMPARE(r2.count_slot1, 0);
+ QCOMPARE(r2.count_slot2, 0);
+ QCOMPARE(r2.count_slot3, 0);
+
+ QMetaObject::activate(&s, s.metaObject()->methodOffset() + 35, args);
+ s.emitSignal1();
+ s.emitSignal2();
+
+ QCOMPARE(r1.count_slot1, 0);
+ QCOMPARE(r1.count_slot2, 5);
+ QCOMPARE(r1.count_slot3, 1);
+ QCOMPARE(r2.count_slot1, 1);
+ QCOMPARE(r2.count_slot2, 0);
+ QCOMPARE(r2.count_slot3, 0);
+ }
- delete s;
- r1->reset();
- r2->reset();
+ r1.reset();
+ r2.reset();
#define SIGNAL_INDEX(S) obj1.metaObject()->indexOfSignal(QMetaObject::normalizedSignature(#S))
OverloadObject obj1;
QObject obj2, obj3;
- QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(int)) , r1, slot1Index);
- QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(QObject *, QObject *, QObject *)) , r2, slot1Index);
+ QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(int)) , &r1, slot1Index);
+ QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(QObject *, QObject *, QObject *)) ,
+ &r2, slot1Index);
- QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(QObject *, QObject *, QObject *, QObject *)) , r1, slot2Index);
- QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(QObject *)) , r2, slot2Index);
- QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(int, int)) , r1, slot3Index);
+ QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(QObject *, QObject *, QObject *, QObject *)) ,
+ &r1, slot2Index);
+ QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(QObject *)) , &r2, slot2Index);
+ QMetaObject::connect(&obj1, SIGNAL_INDEX(sig(int, int)) , &r1, slot3Index);
emit obj1.sig(0.5); //connected to nothing
emit obj1.sig(1, 'a'); //connected to nothing
- QCOMPARE( r1->count_slot1, 0 );
- QCOMPARE( r1->count_slot2, 0 );
- QCOMPARE( r1->count_slot3, 0 );
- QCOMPARE( r2->count_slot1, 0 );
- QCOMPARE( r2->count_slot2, 0 );
- QCOMPARE( r2->count_slot3, 0 );
+ QCOMPARE(r1.count_slot1, 0);
+ QCOMPARE(r1.count_slot2, 0);
+ QCOMPARE(r1.count_slot3, 0);
+ QCOMPARE(r2.count_slot1, 0);
+ QCOMPARE(r2.count_slot2, 0);
+ QCOMPARE(r2.count_slot3, 0);
emit obj1.sig(1); //this signal is connected
emit obj1.sig(&obj2);
- QCOMPARE( r1->count_slot1, 1 );
- QCOMPARE( r1->count_slot2, 0 );
- QCOMPARE( r1->count_slot3, 1 );
- QCOMPARE( r2->count_slot1, 0 );
- QCOMPARE( r2->count_slot2, 1 );
- QCOMPARE( r2->count_slot3, 0 );
+ QCOMPARE(r1.count_slot1, 1);
+ QCOMPARE(r1.count_slot2, 0);
+ QCOMPARE(r1.count_slot3, 1);
+ QCOMPARE(r2.count_slot1, 0);
+ QCOMPARE(r2.count_slot2, 1);
+ QCOMPARE(r2.count_slot3, 0);
emit obj1.sig(&obj2, &obj3); //this signal is connected
- QCOMPARE( r1->count_slot1, 1 );
- QCOMPARE( r1->count_slot2, 1 );
- QCOMPARE( r1->count_slot3, 1 );
- QCOMPARE( r2->count_slot1, 1 );
- QCOMPARE( r2->count_slot2, 1 );
- QCOMPARE( r2->count_slot3, 0 );
-
- delete r1;
- delete r2;
-
+ QCOMPARE(r1.count_slot1, 1);
+ QCOMPARE(r1.count_slot2, 1);
+ QCOMPARE(r1.count_slot3, 1);
+ QCOMPARE(r2.count_slot1, 1);
+ QCOMPARE(r2.count_slot2, 1);
+ QCOMPARE(r2.count_slot3, 0);
}
void tst_QObject::qMetaObjectDisconnectOne()
{
- SenderObject *s = new SenderObject;
- ReceiverObject *r1 = new ReceiverObject;
+ SenderObject s;
+ ReceiverObject r1;
- int signal1Index = s->metaObject()->indexOfSignal("signal1()");
- int signal3Index = s->metaObject()->indexOfSignal("signal3()");
- int slot1Index = r1->metaObject()->indexOfSlot("slot1()");
- int slot2Index = r1->metaObject()->indexOfSlot("slot2()");
+ int signal1Index = s.metaObject()->indexOfSignal("signal1()");
+ int signal3Index = s.metaObject()->indexOfSignal("signal3()");
+ int slot1Index = r1.metaObject()->indexOfSlot("slot1()");
+ int slot2Index = r1.metaObject()->indexOfSlot("slot2()");
QVERIFY(signal1Index > 0);
QVERIFY(signal3Index > 0);
QVERIFY(slot1Index > 0);
QVERIFY(slot2Index > 0);
- QVERIFY( QMetaObject::connect(s, signal1Index, r1, slot1Index) );
- QVERIFY( QMetaObject::connect(s, signal3Index, r1, slot2Index) );
- QVERIFY( QMetaObject::connect(s, signal3Index, r1, slot2Index) );
- QVERIFY( QMetaObject::connect(s, signal3Index, r1, slot2Index) );
-
- r1->reset();
- QCOMPARE( r1->count_slot1, 0 );
- QCOMPARE( r1->count_slot2, 0 );
+ QVERIFY(QMetaObject::connect(&s, signal1Index, &r1, slot1Index));
+ QVERIFY(QMetaObject::connect(&s, signal3Index, &r1, slot2Index));
+ QVERIFY(QMetaObject::connect(&s, signal3Index, &r1, slot2Index));
+ QVERIFY(QMetaObject::connect(&s, signal3Index, &r1, slot2Index));
- s->emitSignal1();
- QCOMPARE( r1->count_slot1, 1 );
- QCOMPARE( r1->count_slot2, 0 );
+ r1.reset();
+ QCOMPARE(r1.count_slot1, 0);
+ QCOMPARE(r1.count_slot2, 0);
- s->emitSignal3();
- QCOMPARE( r1->count_slot1, 1 );
- QCOMPARE( r1->count_slot2, 3 );
+ s.emitSignal1();
+ QCOMPARE(r1.count_slot1, 1);
+ QCOMPARE(r1.count_slot2, 0);
- r1->reset();
- QVERIFY( QMetaObject::disconnectOne(s, signal1Index, r1, slot1Index) );
- QVERIFY( QMetaObject::disconnectOne(s, signal3Index, r1, slot2Index) );
+ s.emitSignal3();
+ QCOMPARE(r1.count_slot1, 1);
+ QCOMPARE(r1.count_slot2, 3);
- s->emitSignal1();
- QCOMPARE( r1->count_slot1, 0 );
- QCOMPARE( r1->count_slot2, 0 );
+ r1.reset();
+ QVERIFY(QMetaObject::disconnectOne(&s, signal1Index, &r1, slot1Index));
+ QVERIFY(QMetaObject::disconnectOne(&s, signal3Index, &r1, slot2Index));
- s->emitSignal3();
- QCOMPARE( r1->count_slot1, 0 );
- QCOMPARE( r1->count_slot2, 2 );
+ s.emitSignal1();
+ QCOMPARE(r1.count_slot1, 0);
+ QCOMPARE(r1.count_slot2, 0);
- r1->reset();
- QVERIFY( false == QMetaObject::disconnectOne(s, signal1Index, r1, slot1Index) );
- QVERIFY( QMetaObject::disconnectOne(s, signal3Index, r1, slot2Index) );
+ s.emitSignal3();
+ QCOMPARE(r1.count_slot1, 0);
+ QCOMPARE(r1.count_slot2, 2);
- s->emitSignal1();
- QCOMPARE( r1->count_slot1, 0 );
- QCOMPARE( r1->count_slot2, 0 );
+ r1.reset();
+ QVERIFY(!QMetaObject::disconnectOne(&s, signal1Index, &r1, slot1Index));
+ QVERIFY( QMetaObject::disconnectOne(&s, signal3Index, &r1, slot2Index));
- s->emitSignal3();
- QCOMPARE( r1->count_slot1, 0 );
- QCOMPARE( r1->count_slot2, 1 );
+ s.emitSignal1();
+ QCOMPARE(r1.count_slot1, 0);
+ QCOMPARE(r1.count_slot2, 0);
- r1->reset();
- QVERIFY( false == QMetaObject::disconnectOne(s, signal1Index, r1, slot1Index) );
- QVERIFY( QMetaObject::disconnectOne(s, signal3Index, r1, slot2Index) );
+ s.emitSignal3();
+ QCOMPARE(r1.count_slot1, 0);
+ QCOMPARE(r1.count_slot2, 1);
- s->emitSignal1();
- QCOMPARE( r1->count_slot1, 0 );
- QCOMPARE( r1->count_slot2, 0 );
+ r1.reset();
+ QVERIFY(!QMetaObject::disconnectOne(&s, signal1Index, &r1, slot1Index));
+ QVERIFY( QMetaObject::disconnectOne(&s, signal3Index, &r1, slot2Index));
- s->emitSignal3();
- QCOMPARE( r1->count_slot1, 0 );
- QCOMPARE( r1->count_slot2, 0 );
+ s.emitSignal1();
+ QCOMPARE(r1.count_slot1, 0);
+ QCOMPARE(r1.count_slot2, 0);
- delete s;
- delete r1;
+ s.emitSignal3();
+ QCOMPARE(r1.count_slot1, 0);
+ QCOMPARE(r1.count_slot2, 0);
}
class ConfusingObject : public SenderObject
@@ -4222,106 +4221,95 @@ void tst_QObject::connectConstructorByMetaMethod()
void tst_QObject::disconnectByMetaMethod()
{
- SenderObject *s = new SenderObject;
- ReceiverObject *r1 = new ReceiverObject;
- ReceiverObject *r2 = new ReceiverObject;
-
- QMetaMethod signal1 = s->metaObject()->method(
- s->metaObject()->indexOfMethod("signal1()"));
- QMetaMethod signal2 = s->metaObject()->method(
- s->metaObject()->indexOfMethod("signal2()"));
- QMetaMethod signal3 = s->metaObject()->method(
- s->metaObject()->indexOfMethod("signal3()"));
-
- QMetaMethod slot1 = r1->metaObject()->method(
- r1->metaObject()->indexOfMethod("slot1()"));
- QMetaMethod slot2 = r1->metaObject()->method(
- r1->metaObject()->indexOfMethod("slot2()"));
- QMetaMethod slot3 = r1->metaObject()->method(
- r1->metaObject()->indexOfMethod("slot3()"));
- QMetaMethod slot4 = r1->metaObject()->method(
- r1->metaObject()->indexOfMethod("slot4()"));
-
- connect(s, signal1, r1, slot1);
+ SenderObject s;
+ ReceiverObject r1;
+ ReceiverObject r2;
- s->emitSignal1();
+ QMetaMethod signal1 = s.metaObject()->method(s.metaObject()->indexOfMethod("signal1()"));
+ QMetaMethod signal2 = s.metaObject()->method(s.metaObject()->indexOfMethod("signal2()"));
+ QMetaMethod signal3 = s.metaObject()->method(s.metaObject()->indexOfMethod("signal3()"));
+
+ QMetaMethod slot1 = r1.metaObject()->method(r1.metaObject()->indexOfMethod("slot1()"));
+ QMetaMethod slot2 = r1.metaObject()->method(r1.metaObject()->indexOfMethod("slot2()"));
+ QMetaMethod slot3 = r1.metaObject()->method(r1.metaObject()->indexOfMethod("slot3()"));
+ QMetaMethod slot4 = r1.metaObject()->method(r1.metaObject()->indexOfMethod("slot4()"));
+
+ connect(&s, signal1, &r1, slot1);
- QVERIFY(r1->called(1));
- r1->reset();
+ s.emitSignal1();
+
+ QVERIFY(r1.called(1));
+ r1.reset();
// usual disconnect with all parameters given
- bool ret = QObject::disconnect(s, signal1, r1, slot1);
+ bool ret = QObject::disconnect(&s, signal1, &r1, slot1);
- s->emitSignal1();
+ s.emitSignal1();
- QVERIFY(!r1->called(1));
- r1->reset();
+ QVERIFY(!r1.called(1));
+ r1.reset();
QVERIFY(ret);
- ret = QObject::disconnect(s, signal1, r1, slot1);
+ ret = QObject::disconnect(&s, signal1, &r1, slot1);
QVERIFY(!ret);
- r1->reset();
+ r1.reset();
- connect( s, signal1, r1, slot1 );
- connect( s, signal1, r1, slot2 );
- connect( s, signal1, r1, slot3 );
- connect( s, signal2, r1, slot4 );
+ connect(&s, signal1, &r1, slot1);
+ connect(&s, signal1, &r1, slot2);
+ connect(&s, signal1, &r1, slot3);
+ connect(&s, signal2, &r1, slot4);
// disconnect s's signal1() from all slots of r1
- QObject::disconnect(s, signal1, r1, QMetaMethod());
+ QObject::disconnect(&s, signal1, &r1, QMetaMethod());
- s->emitSignal1();
- s->emitSignal2();
+ s.emitSignal1();
+ s.emitSignal2();
- QVERIFY(!r1->called(1));
- QVERIFY(!r1->called(2));
- QVERIFY(!r1->called(3));
- QVERIFY(r1->called(4));
- r1->reset();
+ QVERIFY(!r1.called(1));
+ QVERIFY(!r1.called(2));
+ QVERIFY(!r1.called(3));
+ QVERIFY(r1.called(4));
+ r1.reset();
// make sure all is disconnected again
- QObject::disconnect(s, 0, r1, 0);
+ QObject::disconnect(&s, 0, &r1, 0);
- connect(s, signal1, r1, slot1);
- connect(s, signal1, r2, slot1);
- connect(s, signal2, r1, slot2);
- connect(s, signal2, r2, slot2);
- connect(s, signal3, r1, slot3);
- connect(s, signal3, r2, slot3);
+ connect(&s, signal1, &r1, slot1);
+ connect(&s, signal1, &r2, slot1);
+ connect(&s, signal2, &r1, slot2);
+ connect(&s, signal2, &r2, slot2);
+ connect(&s, signal3, &r1, slot3);
+ connect(&s, signal3, &r2, slot3);
// disconnect signal1() from all receivers
- QObject::disconnect(s, signal1, 0, QMetaMethod());
- s->emitSignal1();
- s->emitSignal2();
- s->emitSignal3();
+ QObject::disconnect(&s, signal1, 0, QMetaMethod());
+ s.emitSignal1();
+ s.emitSignal2();
+ s.emitSignal3();
- QVERIFY(!r1->called(1));
- QVERIFY(!r2->called(1));
- QVERIFY(r1->called(2));
- QVERIFY(r2->called(2));
- QVERIFY(r1->called(2));
- QVERIFY(r2->called(2));
+ QVERIFY(!r1.called(1));
+ QVERIFY(!r2.called(1));
+ QVERIFY(r1.called(2));
+ QVERIFY(r2.called(2));
+ QVERIFY(r1.called(2));
+ QVERIFY(r2.called(2));
- r1->reset();
- r2->reset();
+ r1.reset();
+ r2.reset();
// disconnect all signals of s from all receivers
- QObject::disconnect( s, 0, 0, 0 );
+ QObject::disconnect(&s, 0, 0, 0);
- connect( s, signal1, r1, slot1 );
- connect( s, signal1, r2, slot1 );
+ connect(&s, signal1, &r1, slot1);
+ connect(&s, signal1, &r2, slot1);
// disconnect all signals from slot1 of r1
- QObject::disconnect(s, QMetaMethod(), r1, slot1);
+ QObject::disconnect(&s, QMetaMethod(), &r1, slot1);
- s->emitSignal1();
-
- QVERIFY(!r1->called(1));
- QVERIFY(r2->called(1));
+ s.emitSignal1();
- delete r2;
- delete r1;
- delete s;
+ QVERIFY(!r1.called(1));
+ QVERIFY(r2.called(1));
}
void tst_QObject::disconnectNotSignalMetaMethod()
@@ -4459,63 +4447,64 @@ void tst_QObject::baseDestroyed()
void tst_QObject::pointerConnect()
{
- SenderObject *s = new SenderObject;
- ReceiverObject *r1 = new ReceiverObject;
- ReceiverObject *r2 = new ReceiverObject;
- r1->reset();
- r2->reset();
+ SenderObject s;
+ ReceiverObject r1;
+ ReceiverObject r2;
+ r1.reset();
+ r2.reset();
ReceiverObject::sequence = 0;
QTimer timer;
- QVERIFY( connect( s, &SenderObject::signal1 , r1, &ReceiverObject::slot1 ) );
- QVERIFY( connect( s, &SenderObject::signal1 , r2, &ReceiverObject::slot1 ) );
- QVERIFY( connect( s, &SenderObject::signal1 , r1, &ReceiverObject::slot3 ) );
- QVERIFY( connect( s, &SenderObject::signal3 , r1, &ReceiverObject::slot3 ) );
- QVERIFY2( connect( &timer, &QTimer::timeout, r1, &ReceiverObject::deleteLater ),
- "Signal connection failed most likely due to failing comparison of pointers to member functions caused by problems with -reduce-relocations on this platform.");
+ QVERIFY(connect(&s, &SenderObject::signal1 , &r1, &ReceiverObject::slot1));
+ QVERIFY(connect(&s, &SenderObject::signal1 , &r2, &ReceiverObject::slot1));
+ QVERIFY(connect(&s, &SenderObject::signal1 , &r1, &ReceiverObject::slot3));
+ QVERIFY(connect(&s, &SenderObject::signal3 , &r1, &ReceiverObject::slot3));
+ QVERIFY2(connect(&timer, &QTimer::timeout, &r1, &ReceiverObject::deleteLater),
+ "Signal connection failed most likely due to failing comparison of pointers to member "
+ "functions caused by problems with -reduce-relocations on this platform.");
- s->emitSignal1();
- s->emitSignal2();
- s->emitSignal3();
- s->emitSignal4();
-
- QCOMPARE( r1->count_slot1, 1 );
- QCOMPARE( r1->count_slot2, 0 );
- QCOMPARE( r1->count_slot3, 2 );
- QCOMPARE( r1->count_slot4, 0 );
- QCOMPARE( r2->count_slot1, 1 );
- QCOMPARE( r2->count_slot2, 0 );
- QCOMPARE( r2->count_slot3, 0 );
- QCOMPARE( r2->count_slot4, 0 );
- QCOMPARE( r1->sequence_slot1, 1 );
- QCOMPARE( r2->sequence_slot1, 2 );
- QCOMPARE( r1->sequence_slot3, 4 );
-
- r1->reset();
- r2->reset();
+ s.emitSignal1();
+ s.emitSignal2();
+ s.emitSignal3();
+ s.emitSignal4();
+
+ QCOMPARE(r1.count_slot1, 1);
+ QCOMPARE(r1.count_slot2, 0);
+ QCOMPARE(r1.count_slot3, 2);
+ QCOMPARE(r1.count_slot4, 0);
+ QCOMPARE(r2.count_slot1, 1);
+ QCOMPARE(r2.count_slot2, 0);
+ QCOMPARE(r2.count_slot3, 0);
+ QCOMPARE(r2.count_slot4, 0);
+ QCOMPARE(r1.sequence_slot1, 1);
+ QCOMPARE(r2.sequence_slot1, 2);
+ QCOMPARE(r1.sequence_slot3, 4);
+
+ r1.reset();
+ r2.reset();
ReceiverObject::sequence = 0;
- QVERIFY( connect( s, &SenderObject::signal4, r1, &ReceiverObject::slot4 ) );
- QVERIFY( connect( s, &SenderObject::signal4, r2, &ReceiverObject::slot4 ) );
- QVERIFY( connect( s, &SenderObject::signal1, r2, &ReceiverObject::slot4 ) );
+ QVERIFY(connect(&s, &SenderObject::signal4, &r1, &ReceiverObject::slot4));
+ QVERIFY(connect(&s, &SenderObject::signal4, &r2, &ReceiverObject::slot4));
+ QVERIFY(connect(&s, &SenderObject::signal1, &r2, &ReceiverObject::slot4));
- s->emitSignal4();
- QCOMPARE( r1->count_slot4, 1 );
- QCOMPARE( r2->count_slot4, 1 );
- QCOMPARE( r1->sequence_slot4, 1 );
- QCOMPARE( r2->sequence_slot4, 2 );
+ s.emitSignal4();
+ QCOMPARE(r1.count_slot4, 1);
+ QCOMPARE(r2.count_slot4, 1);
+ QCOMPARE(r1.sequence_slot4, 1);
+ QCOMPARE(r2.sequence_slot4, 2);
- r1->reset();
- r2->reset();
+ r1.reset();
+ r2.reset();
ReceiverObject::sequence = 0;
- connect( s, &SenderObject::signal4 , r1, &ReceiverObject::slot4 );
+ connect(&s, &SenderObject::signal4 , &r1, &ReceiverObject::slot4);
- s->emitSignal4();
- QCOMPARE( r1->count_slot4, 2 );
- QCOMPARE( r2->count_slot4, 1 );
- QCOMPARE( r1->sequence_slot4, 3 );
- QCOMPARE( r2->sequence_slot4, 2 );
+ s.emitSignal4();
+ QCOMPARE(r1.count_slot4, 2);
+ QCOMPARE(r2.count_slot4, 1);
+ QCOMPARE(r1.sequence_slot4, 3);
+ QCOMPARE(r2.sequence_slot4, 2);
QMetaObject::Connection con;
QVERIFY(!con);
@@ -4523,116 +4512,107 @@ void tst_QObject::pointerConnect()
//connect a slot to a signal (== error)
QTest::ignoreMessage(QtWarningMsg, "QObject::connect: signal not found in ReceiverObject");
- con = connect(r1, &ReceiverObject::slot4 , s, &SenderObject::signal4 );
+ con = connect(&r1, &ReceiverObject::slot4 , &s, &SenderObject::signal4);
QVERIFY(!con);
QVERIFY(!QObject::disconnect(con));
-
- delete s;
- delete r1;
- delete r2;
}
void tst_QObject::pointerDisconnect()
{
- SenderObject *s = new SenderObject;
- ReceiverObject *r1 = new ReceiverObject;
- ReceiverObject *r2 = new ReceiverObject;
+ SenderObject s;
+ ReceiverObject r1;
+ ReceiverObject r2;
- connect( s, &SenderObject::signal1, r1, &ReceiverObject::slot1 );
+ connect(&s, &SenderObject::signal1, &r1, &ReceiverObject::slot1);
- connect( s, &SenderObject::signal2, r1, &ReceiverObject::slot2 );
- connect( s, &SenderObject::signal3, r1, &ReceiverObject::slot3 );
- connect( s, &SenderObject::signal4, r1, &ReceiverObject::slot4 );
+ connect(&s, &SenderObject::signal2, &r1, &ReceiverObject::slot2);
+ connect(&s, &SenderObject::signal3, &r1, &ReceiverObject::slot3);
+ connect(&s, &SenderObject::signal4, &r1, &ReceiverObject::slot4);
- s->emitSignal1();
- s->emitSignal2();
- s->emitSignal3();
- s->emitSignal4();
+ s.emitSignal1();
+ s.emitSignal2();
+ s.emitSignal3();
+ s.emitSignal4();
- QVERIFY(r1->called(1));
- QVERIFY(r1->called(2));
- QVERIFY(r1->called(3));
- QVERIFY(r1->called(4));
- r1->reset();
+ QVERIFY(r1.called(1));
+ QVERIFY(r1.called(2));
+ QVERIFY(r1.called(3));
+ QVERIFY(r1.called(4));
+ r1.reset();
// usual disconnect with all parameters given
- bool ret = QObject::disconnect( s, &SenderObject::signal1, r1, &ReceiverObject::slot1 );
+ bool ret = QObject::disconnect(&s, &SenderObject::signal1, &r1, &ReceiverObject::slot1);
- s->emitSignal1();
+ s.emitSignal1();
- QVERIFY(!r1->called(1));
- r1->reset();
+ QVERIFY(!r1.called(1));
+ r1.reset();
QVERIFY(ret);
- ret = QObject::disconnect( s, &SenderObject::signal1, r1, &ReceiverObject::slot1 );
+ ret = QObject::disconnect(&s, &SenderObject::signal1, &r1, &ReceiverObject::slot1);
QVERIFY(!ret);
// disconnect all signals from s from all slots from r1
- QObject::disconnect( s, 0, r1, 0 );
+ QObject::disconnect(&s, 0, &r1, 0);
- s->emitSignal2();
- s->emitSignal3();
- s->emitSignal4();
+ s.emitSignal2();
+ s.emitSignal3();
+ s.emitSignal4();
- QVERIFY(!r1->called(2));
- QVERIFY(!r1->called(3));
- QVERIFY(!r1->called(4));
- r1->reset();
+ QVERIFY(!r1.called(2));
+ QVERIFY(!r1.called(3));
+ QVERIFY(!r1.called(4));
+ r1.reset();
- connect( s, &SenderObject::signal1, r1, &ReceiverObject::slot1 );
- connect( s, &SenderObject::signal1, r1, &ReceiverObject::slot2 );
- connect( s, &SenderObject::signal1, r1, &ReceiverObject::slot3 );
- connect( s, &SenderObject::signal2, r1, &ReceiverObject::slot4 );
+ connect(&s, &SenderObject::signal1, &r1, &ReceiverObject::slot1);
+ connect(&s, &SenderObject::signal1, &r1, &ReceiverObject::slot2);
+ connect(&s, &SenderObject::signal1, &r1, &ReceiverObject::slot3);
+ connect(&s, &SenderObject::signal2, &r1, &ReceiverObject::slot4);
// disconnect s's signal1() from all slots of r1
- QObject::disconnect( s, &SenderObject::signal1, r1, 0 );
+ QObject::disconnect(&s, &SenderObject::signal1, &r1, 0);
- s->emitSignal1();
- s->emitSignal2();
+ s.emitSignal1();
+ s.emitSignal2();
- QVERIFY(!r1->called(1));
- QVERIFY(!r1->called(2));
- QVERIFY(!r1->called(3));
- QVERIFY(r1->called(4));
- r1->reset();
+ QVERIFY(!r1.called(1));
+ QVERIFY(!r1.called(2));
+ QVERIFY(!r1.called(3));
+ QVERIFY(r1.called(4));
+ r1.reset();
// make sure all is disconnected again
- QObject::disconnect( s, 0, r1, 0 );
+ QObject::disconnect(&s, 0, &r1, 0);
- connect( s, &SenderObject::signal1, r1, &ReceiverObject::slot1 );
- connect( s, &SenderObject::signal1, r2, &ReceiverObject::slot1 );
- connect( s, &SenderObject::signal2, r1, &ReceiverObject::slot2 );
- connect( s, &SenderObject::signal2, r2, &ReceiverObject::slot2 );
- connect( s, &SenderObject::signal3, r1, &ReceiverObject::slot3 );
- connect( s, &SenderObject::signal3, r2, &ReceiverObject::slot3 );
+ connect(&s, &SenderObject::signal1, &r1, &ReceiverObject::slot1);
+ connect(&s, &SenderObject::signal1, &r2, &ReceiverObject::slot1);
+ connect(&s, &SenderObject::signal2, &r1, &ReceiverObject::slot2);
+ connect(&s, &SenderObject::signal2, &r2, &ReceiverObject::slot2);
+ connect(&s, &SenderObject::signal3, &r1, &ReceiverObject::slot3);
+ connect(&s, &SenderObject::signal3, &r2, &ReceiverObject::slot3);
// disconnect signal1() from all receivers
- QObject::disconnect( s, &SenderObject::signal1, 0, 0 );
- s->emitSignal1();
- s->emitSignal2();
- s->emitSignal3();
+ QObject::disconnect(&s, &SenderObject::signal1, 0, 0);
+ s.emitSignal1();
+ s.emitSignal2();
+ s.emitSignal3();
- QVERIFY(!r1->called(1));
- QVERIFY(!r2->called(1));
- QVERIFY(r1->called(2));
- QVERIFY(r2->called(2));
- QVERIFY(r1->called(2));
- QVERIFY(r2->called(2));
+ QVERIFY(!r1.called(1));
+ QVERIFY(!r2.called(1));
+ QVERIFY(r1.called(2));
+ QVERIFY(r2.called(2));
+ QVERIFY(r1.called(2));
+ QVERIFY(r2.called(2));
- r1->reset();
- r2->reset();
+ r1.reset();
+ r2.reset();
// disconnect all signals of s from all receivers
- QObject::disconnect( s, 0, 0, 0 );
-
- QVERIFY(!r1->called(2));
- QVERIFY(!r2->called(2));
- QVERIFY(!r1->called(2));
- QVERIFY(!r2->called(2));
-
- delete r2;
- delete r1;
- delete s;
+ QObject::disconnect(&s, 0, 0, 0);
+ QVERIFY(!r1.called(2));
+ QVERIFY(!r2.called(2));
+ QVERIFY(!r1.called(2));
+ QVERIFY(!r2.called(2));
}
@@ -4756,35 +4736,32 @@ void tst_QObject::customTypesPointer()
void tst_QObject::connectCxx0x()
{
- SenderObject *s = new SenderObject;
- ReceiverObject *r1 = new ReceiverObject;
+ SenderObject s;
+ ReceiverObject r1;
- QObject::connect(s, &SenderObject::signal1, r1, &ReceiverObject::slot1);
- QObject::connect(s, &SenderObject::signal3, r1, &ReceiverObject::slot2);
- QObject::connect(s, &SenderObject::signal3, r1, &ReceiverObject::slot2);
- QObject::connect(s, &SenderObject::signal3, r1, &ReceiverObject::slot2);
+ QObject::connect(&s, &SenderObject::signal1, &r1, &ReceiverObject::slot1);
+ QObject::connect(&s, &SenderObject::signal3, &r1, &ReceiverObject::slot2);
+ QObject::connect(&s, &SenderObject::signal3, &r1, &ReceiverObject::slot2);
+ QObject::connect(&s, &SenderObject::signal3, &r1, &ReceiverObject::slot2);
- r1->reset();
- QCOMPARE( r1->count_slot1, 0 );
- QCOMPARE( r1->count_slot2, 0 );
+ r1.reset();
+ QCOMPARE(r1.count_slot1, 0);
+ QCOMPARE(r1.count_slot2, 0);
- s->emitSignal1();
- QCOMPARE( r1->count_slot1, 1 );
- QCOMPARE( r1->count_slot2, 0 );
+ s.emitSignal1();
+ QCOMPARE(r1.count_slot1, 1);
+ QCOMPARE(r1.count_slot2, 0);
- s->emitSignal3();
- QCOMPARE( r1->count_slot1, 1 );
- QCOMPARE( r1->count_slot2, 3 );
+ s.emitSignal3();
+ QCOMPARE(r1.count_slot1, 1);
+ QCOMPARE(r1.count_slot2, 3);
// connect signal to signal
- QObject::connect(s, &SenderObject::signal2, s, &SenderObject::signal1);
+ QObject::connect(&s, &SenderObject::signal2, &s, &SenderObject::signal1);
- r1->reset();
- s->emitSignal2();
- QCOMPARE( r1->count_slot1, 1 );
-
- delete s;
- delete r1;
+ r1.reset();
+ s.emitSignal2();
+ QCOMPARE(r1.count_slot1, 1);
}
int receivedCount;
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
index 9df52887f7..fd3cc18af5 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
@@ -73,12 +73,12 @@ static inline QString testSuiteWarning()
str << "\nCannot find the shared-mime-info test suite\nstarting from: "
<< QDir::toNativeSeparators(QDir::currentPath()) << "\n"
"cd " << QDir::toNativeSeparators(QStringLiteral("tests/auto/corelib/mimetypes/qmimedatabase")) << "\n"
- "wget http://cgit.freedesktop.org/xdg/shared-mime-info/snapshot/Release-1-8.zip\n"
- "unzip Release-1-8.zip\n";
+ "wget http://cgit.freedesktop.org/xdg/shared-mime-info/snapshot/Release-1-10.zip\n"
+ "unzip Release-1-10.zip\n";
#ifdef Q_OS_WIN
- str << "mkdir testfiles\nxcopy /s Release-1-8 s-m-i\n";
+ str << "mkdir testfiles\nxcopy /s Release-1-10 s-m-i\n";
#else
- str << "ln -s Release-1-8 s-m-i\n";
+ str << "ln -s Release-1-10 s-m-i\n";
#endif
return result;
}
@@ -611,7 +611,7 @@ void tst_QMimeDatabase::allMimeTypes()
QVERIFY(!lst.isEmpty());
// Hardcoding this is the only way to check both providers find the same number of mimetypes.
- QCOMPARE(lst.count(), 749);
+ QCOMPARE(lst.count(), 779);
foreach (const QMimeType &mime, lst) {
const QString name = mime.name();
@@ -640,7 +640,7 @@ void tst_QMimeDatabase::suffixes_data()
QTest::newRow("mimetype with multiple patterns") << "text/plain" << "*.asc;*.txt;*,v" << "txt";
QTest::newRow("mimetype with uncommon pattern") << "text/x-readme" << "README*" << QString();
QTest::newRow("mimetype with no patterns") << "application/x-ole-storage" << QString() << QString();
- QTest::newRow("default_mimetype") << "application/octet-stream" << "*.bin" << QString();
+ QTest::newRow("default_mimetype") << "application/octet-stream" << QString() << QString();
}
void tst_QMimeDatabase::suffixes()
diff --git a/tests/auto/corelib/plugin/qpluginloader/qpluginloader.pro b/tests/auto/corelib/plugin/qpluginloader/qpluginloader.pro
index 541e73636c..5efe68f4af 100644
--- a/tests/auto/corelib/plugin/qpluginloader/qpluginloader.pro
+++ b/tests/auto/corelib/plugin/qpluginloader/qpluginloader.pro
@@ -3,6 +3,7 @@ TEMPLATE = subdirs
tst.depends = lib theplugin
SUBDIRS = lib \
+ staticplugin \
theplugin \
tst
!android:!win32:!darwin {
diff --git a/tests/auto/corelib/plugin/qpluginloader/staticplugin/.gitignore b/tests/auto/corelib/plugin/qpluginloader/staticplugin/.gitignore
new file mode 100644
index 0000000000..26f7ecd506
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/staticplugin/.gitignore
@@ -0,0 +1,3 @@
+*staticplugin.prl
+libstaticplugin.a
+staticplugin.lib
diff --git a/src/tools/uic/globaldefs.h b/tests/auto/corelib/plugin/qpluginloader/staticplugin/main.cpp
index 5ad193c29a..d891839b1e 100644
--- a/src/tools/uic/globaldefs.h
+++ b/tests/auto/corelib/plugin/qpluginloader/staticplugin/main.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
-** This file is part of the tools applications of the Qt Toolkit.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
@@ -25,17 +25,15 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+#include <QtPlugin>
+#include <QObject>
-#ifndef GLOBALDEFS_H
-#define GLOBALDEFS_H
+class StaticPlugin : public QObject
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "SomeIID")
+public:
+ StaticPlugin() {}
+};
-#include <qglobal.h>
-
-QT_BEGIN_NAMESPACE
-
-enum { BOXLAYOUT_DEFAULT_MARGIN = 11 };
-enum { BOXLAYOUT_DEFAULT_SPACING = 6 };
-
-QT_END_NAMESPACE
-
-#endif // GLOBALDEFS_H
+#include "main.moc"
diff --git a/tests/auto/corelib/plugin/qpluginloader/staticplugin/staticplugin.pro b/tests/auto/corelib/plugin/qpluginloader/staticplugin/staticplugin.pro
new file mode 100644
index 0000000000..ff65ab728c
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/staticplugin/staticplugin.pro
@@ -0,0 +1,7 @@
+TEMPLATE = lib
+CONFIG += plugin static
+SOURCES = main.cpp
+QT = core
+
+# Add extra metadata to the plugin
+QMAKE_MOC_OPTIONS += -M ExtraMetaData=StaticPlugin -M ExtraMetaData=foo
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro b/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro
index c20e56ba4c..a3885f4134 100644
--- a/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro
+++ b/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro
@@ -8,9 +8,14 @@ HEADERS = ../theplugin/plugininterface.h
win32 {
CONFIG(debug, debug|release) {
TARGET = ../../debug/tst_qpluginloader
+ LIBS += -L../staticplugin/debug
} else {
TARGET = ../../release/tst_qpluginloader
+ LIBS += -L../staticplugin/release
}
+} else {
+ LIBS += -L../staticplugin
}
+LIBS += -lstaticplugin
TESTDATA += ../elftest ../machtest
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
index c517c0809a..4316ea14ea 100644
--- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
-** Copyright (C) 2016 Intel Corporation.
+** Copyright (C) 2018 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@@ -121,8 +121,11 @@ private slots:
void reloadPlugin();
void preloadedPlugin_data();
void preloadedPlugin();
+ void staticPlugins();
};
+Q_IMPORT_PLUGIN(StaticPlugin)
+
void tst_QPluginLoader::cleanup()
{
// check if the library/plugin was leaked
@@ -520,5 +523,37 @@ void tst_QPluginLoader::preloadedPlugin()
QVERIFY(lib.unload());
}
+void tst_QPluginLoader::staticPlugins()
+{
+ const QObjectList instances = QPluginLoader::staticInstances();
+ QVERIFY(instances.size());
+
+ bool found = false;
+ for (QObject *obj : instances) {
+ found = obj->metaObject()->className() == QLatin1String("StaticPlugin");
+ if (found)
+ break;
+ }
+ QVERIFY(found);
+
+ const auto plugins = QPluginLoader::staticPlugins();
+ QCOMPARE(plugins.size(), instances.size());
+
+ // find the metadata
+ QJsonObject metaData;
+ for (const auto &p : plugins) {
+ metaData = p.metaData();
+ found = metaData.value("className").toString() == QLatin1String("StaticPlugin");
+ if (found)
+ break;
+ }
+ QVERIFY(found);
+
+ QCOMPARE(metaData.value("version").toInt(), QT_VERSION);
+ QCOMPARE(metaData.value("IID").toString(), "SomeIID");
+ QCOMPARE(metaData.value("ExtraMetaData"), QJsonArray({ "StaticPlugin", "foo" }));
+}
+
+
QTEST_MAIN(tst_QPluginLoader)
#include "tst_qpluginloader.moc"
diff --git a/tests/auto/corelib/serialization/json/tst_qtjson.cpp b/tests/auto/corelib/serialization/json/tst_qtjson.cpp
index 4651258ef3..083e78375a 100644
--- a/tests/auto/corelib/serialization/json/tst_qtjson.cpp
+++ b/tests/auto/corelib/serialization/json/tst_qtjson.cpp
@@ -153,6 +153,17 @@ private Q_SLOTS:
void implicitValueType();
void implicitDocumentType();
+ void streamSerializationQJsonDocument_data();
+ void streamSerializationQJsonDocument();
+ void streamSerializationQJsonArray_data();
+ void streamSerializationQJsonArray();
+ void streamSerializationQJsonObject_data();
+ void streamSerializationQJsonObject();
+ void streamSerializationQJsonValue_data();
+ void streamSerializationQJsonValue();
+ void streamSerializationQJsonValueEmpty();
+ void streamVariantSerialization();
+
private:
QString testDataDir;
};
@@ -3011,5 +3022,164 @@ void tst_QtJson::implicitDocumentType()
QCOMPARE(arrayDocument[-1].toInt(123), 123);
}
+void tst_QtJson::streamSerializationQJsonDocument_data()
+{
+ QTest::addColumn<QJsonDocument>("document");
+ QTest::newRow("empty") << QJsonDocument();
+ QTest::newRow("object") << QJsonDocument(QJsonObject{{"value", 42}});
+}
+
+void tst_QtJson::streamSerializationQJsonDocument()
+{
+ // Check interface only, implementation is tested through to and from
+ // json functions.
+ QByteArray buffer;
+ QFETCH(QJsonDocument, document);
+ QJsonDocument output;
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << document;
+ QDataStream load(buffer);
+ load >> output;
+ QCOMPARE(output, document);
+}
+
+void tst_QtJson::streamSerializationQJsonArray_data()
+{
+ QTest::addColumn<QJsonArray>("array");
+ QTest::newRow("empty") << QJsonArray();
+ QTest::newRow("values") << QJsonArray{665, 666, 667};
+}
+
+void tst_QtJson::streamSerializationQJsonArray()
+{
+ // Check interface only, implementation is tested through to and from
+ // json functions.
+ QByteArray buffer;
+ QFETCH(QJsonArray, array);
+ QJsonArray output;
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << array;
+ QDataStream load(buffer);
+ load >> output;
+ QCOMPARE(output, array);
+}
+
+void tst_QtJson::streamSerializationQJsonObject_data()
+{
+ QTest::addColumn<QJsonObject>("object");
+ QTest::newRow("empty") << QJsonObject();
+ QTest::newRow("non-empty") << QJsonObject{{"foo", 665}, {"bar", 666}};
+}
+
+void tst_QtJson::streamSerializationQJsonObject()
+{
+ // Check interface only, implementation is tested through to and from
+ // json functions.
+ QByteArray buffer;
+ QFETCH(QJsonObject, object);
+ QJsonObject output;
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << object;
+ QDataStream load(buffer);
+ load >> output;
+ QCOMPARE(output, object);
+}
+
+void tst_QtJson::streamSerializationQJsonValue_data()
+{
+ QTest::addColumn<QJsonValue>("value");
+ QTest::newRow("double") << QJsonValue{665};
+ QTest::newRow("bool") << QJsonValue{true};
+ QTest::newRow("string") << QJsonValue{QStringLiteral("bum")};
+ QTest::newRow("array") << QJsonValue{QJsonArray{12,1,5,6,7}};
+ QTest::newRow("object") << QJsonValue{QJsonObject{{"foo", 665}, {"bar", 666}}};
+}
+
+void tst_QtJson::streamSerializationQJsonValue()
+{
+ QByteArray buffer;
+ QFETCH(QJsonValue, value);
+ QJsonValue output;
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << value;
+ QDataStream load(buffer);
+ load >> output;
+ QCOMPARE(output, value);
+}
+
+void tst_QtJson::streamSerializationQJsonValueEmpty()
+{
+ QByteArray buffer;
+ {
+ QJsonValue undef{QJsonValue::Undefined};
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << undef;
+ QDataStream load(buffer);
+ QJsonValue output;
+ load >> output;
+ QVERIFY(output.isUndefined());
+ }
+ {
+ QJsonValue null{QJsonValue::Null};
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << null;
+ QDataStream load(buffer);
+ QJsonValue output;
+ load >> output;
+ QVERIFY(output.isNull());
+ }
+}
+
+void tst_QtJson::streamVariantSerialization()
+{
+ // Check interface only, implementation is tested through to and from
+ // json functions.
+ QByteArray buffer;
+ {
+ QJsonDocument objectDoc(QJsonArray{665, 666, 667});
+ QVariant output;
+ QVariant variant(objectDoc);
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << variant;
+ QDataStream load(buffer);
+ load >> output;
+ QCOMPARE(output.userType(), QMetaType::QJsonDocument);
+ QCOMPARE(output.toJsonDocument(), objectDoc);
+ }
+ {
+ QJsonArray array{665, 666, 667};
+ QVariant output;
+ QVariant variant(array);
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << variant;
+ QDataStream load(buffer);
+ load >> output;
+ QCOMPARE(output.userType(), QMetaType::QJsonArray);
+ QCOMPARE(output.toJsonArray(), array);
+ }
+ {
+ QJsonObject obj{{"foo", 42}};
+ QVariant output;
+ QVariant variant(obj);
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << variant;
+ QDataStream load(buffer);
+ load >> output;
+ QCOMPARE(output.userType(), QMetaType::QJsonObject);
+ QCOMPARE(output.toJsonObject(), obj);
+ }
+ {
+ QJsonValue value{42};
+ QVariant output;
+ QVariant variant(value);
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << variant;
+ QDataStream load(buffer);
+ load >> output;
+ QCOMPARE(output.userType(), QMetaType::QJsonValue);
+ QCOMPARE(output.toJsonValue(), value);
+ }
+}
+
QTEST_MAIN(tst_QtJson)
#include "tst_qtjson.moc"
diff --git a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
index 4b753eab6b..f69ce4120d 100644
--- a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
+++ b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
@@ -97,6 +97,10 @@ private slots:
void validation();
void toDiagnosticNotation_data();
void toDiagnosticNotation();
+
+ void datastreamSerialization_data();
+ void datastreamSerialization();
+ void streamVariantSerialization();
};
// Get the validation data from TinyCBOR (see src/3rdparty/tinycbor/tests/parser/data.cpp)
@@ -380,11 +384,17 @@ void tst_QCborValue::arrayDefaultInitialization()
QVERIFY(v.isArray());
QVERIFY(!v.isMap());
QVERIFY(!v.isTag());
- QVERIFY(v[0].isUndefined());
QCborArray a2 = v.toArray();
QVERIFY(a2.isEmpty());
QCOMPARE(a2, a);
+ auto front = v[0];
+ QVERIFY(front.isUndefined());
+ front = 1;
+ QCOMPARE(v[0], 1);
+ QVERIFY(a2.isEmpty());
+ a2 = v.toArray();
+ QCOMPARE(a2.size(), 1);
}
void tst_QCborValue::mapDefaultInitialization()
@@ -421,7 +431,7 @@ void tst_QCborValue::mapDefaultInitialization()
QVERIFY(m == QCborMap{});
QVERIFY(QCborMap{} == m);
- QCborValue v(m);
+ const QCborValue v(m);
QVERIFY(v.isMap());
QVERIFY(!v.isArray());
QVERIFY(!v.isTag());
@@ -723,6 +733,31 @@ void tst_QCborValue::arrayMutation()
QCOMPARE(a.at(1), QCborValue(-1));
QCOMPARE(a2.at(1), QCborValue(nullptr));
QCOMPARE(++it, end);
+
+ // Array accessed via value:
+ QCborValue val(a);
+ val[2] = QCborArray{2, 3, 5, 7};
+ QCOMPARE(a.size(), 2); // Unchanged
+ QVERIFY(val.isArray());
+ QCOMPARE(val.toArray().size(), 3);
+ val[2][4] = 17;
+ QVERIFY(val.isArray());
+ QVERIFY(val[2].isArray());
+ QCOMPARE(val[2].toArray().size(), 5);
+ QCOMPARE(val[2][4], 17);
+ QCOMPARE(val.toArray().size(), 3);
+ val[3] = 42;
+ QVERIFY(val.isArray());
+ QCOMPARE(val.toArray().size(), 4);
+ QCOMPARE(val[3], 42);
+
+ // Coerce to map on string key:
+ const QLatin1String any("any");
+ val[any] = any;
+ QVERIFY(val.isMap());
+ QCOMPARE(val.toMap().size(), 5);
+ QVERIFY(val[2].isArray());
+ QCOMPARE(val[2].toArray().size(), 5);
}
void tst_QCborValue::mapMutation()
@@ -778,6 +813,30 @@ void tst_QCborValue::mapMutation()
QCOMPARE((m.end() - 1)->toInteger(), -1);
QVERIFY((m2.end() - 1)->isNull());
QCOMPARE(++it, end);
+
+ // Map accessed via value:
+ QCborValue val(m);
+ val[7] = QCborMap({{0, 2}, {1, 3}, {2, 5}});
+ QCOMPARE(m.size(), 2); // Unchanged
+ QVERIFY(val.isMap());
+ QCOMPARE(val.toMap().size(), 3);
+ val[7][3] = 11;
+ QVERIFY(val.isMap());
+ QVERIFY(val[7].isMap());
+ QCOMPARE(val[7].toMap().size(), 4);
+ val[14] = 42;
+ QVERIFY(val.isMap());
+ QCOMPARE(val.toMap().size(), 4);
+
+ const QLatin1String any("any");
+ const QString hello(QStringLiteral("Hello World"));
+ val[any][3][hello] = any;
+ QVERIFY(val.isMap());
+ QCOMPARE(val.toMap().size(), 5);
+ QVERIFY(val[any].isMap());
+ QCOMPARE(val[any].toMap().size(), 1);
+ QVERIFY(val[any][3].isMap());
+ QCOMPARE(val[any][3].toMap().size(), 1);
}
void tst_QCborValue::arrayPrepend()
@@ -1690,6 +1749,83 @@ void tst_QCborValue::toDiagnosticNotation()
QCOMPARE(result, expected);
}
+
+void tst_QCborValue::datastreamSerialization_data()
+{
+ addCommonCborData();
+}
+
+void tst_QCborValue::datastreamSerialization()
+{
+ QFETCH(QCborValue, v);
+ QByteArray buffer;
+ {
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << v;
+ QDataStream load(buffer);
+ QCborValue output;
+ load >> output;
+ QCOMPARE(output, v);
+ }
+ if (v.isArray()) {
+ QCborArray array = v.toArray();
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << array;
+ QDataStream load(buffer);
+ QCborValue output;
+ load >> output;
+ QCOMPARE(output, array);
+ } else if (v.isMap()) {
+ QCborMap map = v.toMap();
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << map;
+ QDataStream load(buffer);
+ QCborValue output;
+ load >> output;
+ QCOMPARE(output, map);
+ }
+}
+
+void tst_QCborValue::streamVariantSerialization()
+{
+ // Check interface only, implementation is tested through to and from
+ // cbor functions.
+ QByteArray buffer;
+ {
+ QCborArray array{665, 666, 667};
+ QVariant output;
+ QVariant variant = QVariant::fromValue(array);
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << variant;
+ QDataStream load(buffer);
+ load >> output;
+ QCOMPARE(output.userType(), QMetaType::QCborArray);
+ QCOMPARE(qvariant_cast<QCborArray>(output), array);
+ }
+ {
+ QCborMap obj{{"foo", 42}};
+ QVariant output;
+ QVariant variant = QVariant::fromValue(obj);
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << variant;
+ QDataStream load(buffer);
+ load >> output;
+ QCOMPARE(output.userType(), QMetaType::QCborMap);
+ QCOMPARE(qvariant_cast<QCborMap>(output), obj);
+ }
+ {
+ QCborValue value{42};
+ QVariant output;
+ QVariant variant = QVariant::fromValue(value);
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << variant;
+ QDataStream load(buffer);
+ load >> output;
+ QCOMPARE(output.userType(), QMetaType::QCborValue);
+ QCOMPARE(qvariant_cast<QCborValue>(output), value);
+ }
+}
+
QTEST_MAIN(tst_QCborValue)
#include "tst_qcborvalue.moc"
diff --git a/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp
index 011a0e1a85..d204727bbd 100644
--- a/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp
@@ -135,6 +135,15 @@ private slots:
void stream_QByteArray2();
+ void stream_QJsonDocument();
+ void stream_QJsonArray();
+ void stream_QJsonObject();
+ void stream_QJsonValue();
+
+ void stream_QCborArray();
+ void stream_QCborMap();
+ void stream_QCborValue();
+
void setVersion_data();
void setVersion();
@@ -2095,6 +2104,138 @@ void tst_QDataStream::stream_QByteArray2()
}
}
+void tst_QDataStream::stream_QJsonDocument()
+{
+ QByteArray buffer;
+ {
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << QByteArrayLiteral("invalidJson");
+ QDataStream load(&buffer, QIODevice::ReadOnly);
+ QJsonDocument doc;
+ load >> doc;
+ QVERIFY(doc.isEmpty());
+ QVERIFY(load.status() != QDataStream::Ok);
+ QCOMPARE(load.status(), QDataStream::ReadCorruptData);
+ }
+ {
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ QJsonDocument docSave(QJsonArray{1,2,3});
+ save << docSave;
+ QDataStream load(&buffer, QIODevice::ReadOnly);
+ QJsonDocument docLoad;
+ load >> docLoad;
+ QCOMPARE(docLoad, docSave);
+ }
+}
+
+void tst_QDataStream::stream_QJsonArray()
+{
+ QByteArray buffer;
+ {
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << QByteArrayLiteral("invalidJson");
+ QDataStream load(&buffer, QIODevice::ReadOnly);
+ QJsonArray array;
+ load >> array;
+ QVERIFY(array.isEmpty());
+ QVERIFY(load.status() != QDataStream::Ok);
+ QCOMPARE(load.status(), QDataStream::ReadCorruptData);
+ }
+ {
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ QJsonArray arraySave(QJsonArray{1,2,3});
+ save << arraySave;
+ QDataStream load(&buffer, QIODevice::ReadOnly);
+ QJsonArray arrayLoad;
+ load >> arrayLoad;
+ QCOMPARE(arrayLoad, arraySave);
+ }
+}
+
+void tst_QDataStream::stream_QJsonObject()
+{
+ QByteArray buffer;
+ {
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << QByteArrayLiteral("invalidJson");
+ QDataStream load(&buffer, QIODevice::ReadOnly);
+ QJsonObject object;
+ load >> object;
+ QVERIFY(object.isEmpty());
+ QVERIFY(load.status() != QDataStream::Ok);
+ QCOMPARE(load.status(), QDataStream::ReadCorruptData);
+ }
+ {
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ QJsonObject objSave{{"foo", 1}, {"bar", 2}};
+ save << objSave;
+ QDataStream load(&buffer, QIODevice::ReadOnly);
+ QJsonObject objLoad;
+ load >> objLoad;
+ QCOMPARE(objLoad, objSave);
+ }
+}
+
+void tst_QDataStream::stream_QJsonValue()
+{
+ QByteArray buffer;
+ {
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ save << quint8(42);
+ QDataStream load(&buffer, QIODevice::ReadOnly);
+ QJsonValue value;
+ load >> value;
+ QVERIFY(value.isUndefined());
+ QVERIFY(load.status() != QDataStream::Ok);
+ QCOMPARE(load.status(), QDataStream::ReadCorruptData);
+ }
+ {
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ QJsonValue valueSave{42};
+ save << valueSave;
+ QDataStream load(&buffer, QIODevice::ReadOnly);
+ QJsonValue valueLoad;
+ load >> valueLoad;
+ QCOMPARE(valueLoad, valueSave);
+ }
+}
+
+void tst_QDataStream::stream_QCborArray()
+{
+ QByteArray buffer;
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ QCborArray arraySave({1, 2, 3});
+ save << arraySave;
+ QDataStream load(&buffer, QIODevice::ReadOnly);
+ QCborArray arrayLoad;
+ load >> arrayLoad;
+ QCOMPARE(arrayLoad, arraySave);
+}
+
+void tst_QDataStream::stream_QCborMap()
+{
+ QByteArray buffer;
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ QCborMap objSave{{"foo", 1}, {"bar", 2}};
+ save << objSave;
+ QDataStream load(&buffer, QIODevice::ReadOnly);
+ QCborMap objLoad;
+ load >> objLoad;
+ QCOMPARE(objLoad, objSave);
+}
+
+void tst_QDataStream::stream_QCborValue()
+{
+ QByteArray buffer;
+ QDataStream save(&buffer, QIODevice::WriteOnly);
+ QCborValue valueSave{42};
+ save << valueSave;
+ QDataStream load(&buffer, QIODevice::ReadOnly);
+ QCborValue valueLoad;
+ load >> valueLoad;
+ QCOMPARE(valueLoad, valueSave);
+}
+
void tst_QDataStream::setVersion_data()
{
QTest::addColumn<int>("vers");
diff --git a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp
index 159fbd7b03..8bb35554c8 100644
--- a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp
@@ -2665,28 +2665,30 @@ void tst_QTextStream::useCase2()
// ------------------------------------------------------------------------------
void tst_QTextStream::manipulators_data()
{
- QTest::addColumn<int>("flags");
+ QTest::addColumn<int>("base");
+ QTest::addColumn<int>("alignFlag");
+ QTest::addColumn<int>("numberFlag");
QTest::addColumn<int>("width");
QTest::addColumn<double>("realNumber");
QTest::addColumn<int>("intNumber");
QTest::addColumn<QString>("textData");
QTest::addColumn<QByteArray>("result");
- QTest::newRow("no flags") << 0 << 0 << 5.0 << 5 << QString("five") << QByteArray("55five");
- QTest::newRow("rightadjust") << 0 << 10 << 5.0 << 5 << QString("five") << QByteArray(" 5 5 five");
-
- // ### FIX
-// QTest::newRow("leftadjust") << int(QTextStream::left) << 10 << 5.0 << 5 << QString("five") << QByteArray("5 5 five ");
-// QTest::newRow("showpos") << int(QTextStream::showpos) << 10 << 5.0 << 5 << QString("five") << QByteArray(" +5 +5 five");
-// QTest::newRow("showpos2") << int(QTextStream::showpos) << 5 << 3.14 << -5 << QString("five") << QByteArray("+3.14 -5 five");
-// QTest::newRow("hex") << int(QTextStream::hex | QTextStream::showbase) << 5 << 3.14 << -5 << QString("five") << QByteArray(" 3.14 -0x5 five");
-// QTest::newRow("hex uppercase") << int(QTextStream::hex | QTextStream::uppercase | QTextStream::showbase) << 5 << 3.14 << -5 << QString("five") << QByteArray(" 3.14 -0X5 five");
+ QTest::newRow("no flags") << 10 << 0 << 0 << 0 << 5.0 << 5 << QString("five") << QByteArray("55five");
+ QTest::newRow("rightadjust") << 10 << int(QTextStream::AlignRight) << 0 << 10 << 5.0 << 5 << QString("five") << QByteArray(" 5 5 five");
+ QTest::newRow("leftadjust") << 10 << int(QTextStream::AlignLeft) << 0 << 10 << 5.0 << 5 << QString("five") << QByteArray("5 5 five ");
+ QTest::newRow("showpos") << 10 << int(QTextStream::AlignRight) << int(QTextStream::ForceSign) << 10 << 5.0 << 5 << QString("five") << QByteArray(" +5 +5 five");
+ QTest::newRow("showpos2") << 10 << int(QTextStream::AlignRight) << int(QTextStream::ForceSign) << 5 << 3.14 << -5 << QString("five") << QByteArray("+3.14 -5 five");
+ QTest::newRow("hex") << 16 << int(QTextStream::AlignRight) << int(QTextStream::ShowBase) << 5 << 3.14 << -5 << QString("five") << QByteArray(" 3.14 -0x5 five");
+ QTest::newRow("hex") << 16 << int(QTextStream::AlignRight) << int(QTextStream::ShowBase | QTextStream::UppercaseBase) << 5 << 3.14 << -5 << QString("five") << QByteArray(" 3.14 -0X5 five");
}
// ------------------------------------------------------------------------------
void tst_QTextStream::manipulators()
{
-// QFETCH(int, flags);
+ QFETCH(int, base);
+ QFETCH(int, alignFlag);
+ QFETCH(int, numberFlag);
QFETCH(int, width);
QFETCH(double, realNumber);
QFETCH(int, intNumber);
@@ -2700,14 +2702,16 @@ void tst_QTextStream::manipulators()
stream.setCodec(QTextCodec::codecForName("ISO-8859-1"));
stream.setAutoDetectUnicode(true);
-// stream.setFlags(flags);
+ stream.setIntegerBase(base);
+ stream.setFieldAlignment(QTextStream::FieldAlignment(alignFlag));
+ stream.setNumberFlags(QTextStream::NumberFlag(numberFlag));
stream.setFieldWidth(width);
stream << realNumber;
stream << intNumber;
stream << textData;
stream.flush();
- QCOMPARE(buffer.data().constData(), result.constData());
+ QCOMPARE(buffer.data(), result);
}
void tst_QTextStream::generateBOM()
diff --git a/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp b/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp
index 85b4c4bfb7..2d2c536453 100644
--- a/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp
+++ b/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp
@@ -49,6 +49,9 @@ private slots:
void operator_plus() const;
void operator_plus_data() const;
+ void indexOf_data() const;
+ void indexOf() const;
+
void initializerList() const;
};
@@ -259,6 +262,29 @@ void tst_QByteArrayList::operator_plus_data() const
<< ( QByteArrayList() << "a" << "" << "c" );
}
+void tst_QByteArrayList::indexOf_data() const
+{
+ QTest::addColumn<QByteArrayList>("list");
+ QTest::addColumn<QByteArray>("item");
+ QTest::addColumn<int>("expectedResult");
+
+ QTest::newRow("empty") << QByteArrayList() << QByteArray("a") << -1;
+ QTest::newRow("found_1") << ( QByteArrayList() << "a" ) << QByteArray("a") << 0;
+ QTest::newRow("not_found_1") << ( QByteArrayList() << "a" ) << QByteArray("b") << -1;
+ QTest::newRow("found_2") << ( QByteArrayList() << "hello" << "world" ) << QByteArray("world") << 1;
+ QTest::newRow("returns_first") << ( QByteArrayList() << "hello" << "world" << "hello" << "again" ) << QByteArray("hello") << 0;
+}
+
+void tst_QByteArrayList::indexOf() const
+{
+ QFETCH(QByteArrayList, list);
+ QFETCH(QByteArray, item);
+ QFETCH(int, expectedResult);
+
+ QCOMPARE(list.indexOf(item), expectedResult);
+ QCOMPARE(list.indexOf(item.constData()), expectedResult);
+}
+
void tst_QByteArrayList::initializerList() const
{
#ifdef Q_COMPILER_INITIALIZER_LISTS
diff --git a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
index 62c29229e1..7980f1f8f4 100644
--- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
+++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp
@@ -74,6 +74,7 @@ private slots:
void testHelpOption_data();
void testHelpOption();
void testQuoteEscaping();
+ void testUnknownOption();
};
static char *empty_argv[] = { 0 };
@@ -648,6 +649,27 @@ void tst_QCommandLineParser::testQuoteEscaping()
#endif // QT_CONFIG(process)
}
+void tst_QCommandLineParser::testUnknownOption()
+{
+#if !QT_CONFIG(process)
+ QSKIP("This test requires QProcess support");
+#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)
+ QSKIP("Deploying executable applications to file system on Android not supported.");
+#else
+ QCoreApplication app(empty_argc, empty_argv);
+ QProcess process;
+ process.start("testhelper/qcommandlineparser_test_helper", QStringList() <<
+ QString::number(QCommandLineParser::ParseAsLongOptions) <<
+ "-unknown-option");
+ QVERIFY(process.waitForFinished(5000));
+ QCOMPARE(process.exitStatus(), QProcess::NormalExit);
+ process.setReadChannel(QProcess::StandardError);
+ QString output = process.readAll();
+ QVERIFY2(output.contains("qcommandlineparser_test_helper"), qPrintable(output)); // separate in case of .exe extension
+ QVERIFY2(output.contains(": Unknown option 'unknown-option'"), qPrintable(output));
+#endif // QT_CONFIG(process)
+}
+
QTEST_APPLESS_MAIN(tst_QCommandLineParser)
#include "tst_qcommandlineparser.moc"
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
index 943805e228..56792f38fb 100644
--- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
@@ -37,9 +37,6 @@
#ifdef Q_OS_WIN
# include <qt_windows.h>
-# if defined(Q_OS_WINRT)
-# define tzset()
-# endif
#endif
class tst_QDateTime : public QObject
@@ -145,9 +142,7 @@ private slots:
void isDaylightTime() const;
void daylightTransitions() const;
void timeZones() const;
-#if defined(Q_OS_UNIX)
void systemTimeZoneChange() const;
-#endif
void invalid() const;
@@ -174,7 +169,7 @@ private:
void reset(const QByteArray &zone)
{
qputenv("TZ", zone.constData());
- tzset();
+ qTzSet();
}
~TimeZoneRollback()
{
@@ -182,7 +177,7 @@ private:
qunsetenv("TZ");
else
qputenv("TZ", prior.constData());
- tzset();
+ qTzSet();
}
};
};
@@ -3412,33 +3407,10 @@ void tst_QDateTime::timeZones() const
QCOMPARE(future.offsetFromUtc(), 28800);
}
-#if defined(Q_OS_UNIX)
-// Currently disabled on Windows as adjusting the timezone
-// requires additional privileges that aren't normally
-// enabled for a process. This can be achieved by calling
-// AdjustTokenPrivileges() and then SetTimeZoneInformation(),
-// which will require linking to a different library to access that API.
-static void setTimeZone(const QByteArray &tz)
-{
- qputenv("TZ", tz);
- ::tzset();
-
-// following left for future reference, see comment above
-// #if defined(Q_OS_WIN32)
-// ::_tzset();
-// #endif
-}
-
void tst_QDateTime::systemTimeZoneChange() const
{
- struct ResetTZ {
- QByteArray original;
- ResetTZ() : original(qgetenv("TZ")) {}
- ~ResetTZ() { setTimeZone(original); }
- } scopedReset;
-
// Set the timezone to Brisbane time
- setTimeZone(QByteArray("AEST-10:00"));
+ TimeZoneRollback useZone(QByteArray("AEST-10:00"));
QDateTime localDate = QDateTime(QDate(2012, 6, 1), QTime(2, 15, 30), Qt::LocalTime);
QDateTime utcDate = QDateTime(QDate(2012, 6, 1), QTime(2, 15, 30), Qt::UTC);
@@ -3451,16 +3423,18 @@ void tst_QDateTime::systemTimeZoneChange() const
QVERIFY(tzDate.timeZone().isValid());
// Change to Indian time
- setTimeZone(QByteArray("IST-05:30"));
+ useZone.reset(QByteArray("IST-05:30"));
QCOMPARE(localDate, QDateTime(QDate(2012, 6, 1), QTime(2, 15, 30), Qt::LocalTime));
+#ifdef Q_OS_WINRT
+ QEXPECT_FAIL("", "WinRT gets this wrong, QTBUG-71185", Continue);
+#endif
QVERIFY(localMsecs != localDate.toMSecsSinceEpoch());
QCOMPARE(utcDate, QDateTime(QDate(2012, 6, 1), QTime(2, 15, 30), Qt::UTC));
QCOMPARE(utcDate.toMSecsSinceEpoch(), utcMsecs);
QCOMPARE(tzDate, QDateTime(QDate(2012, 6, 1), QTime(2, 15, 30), QTimeZone("Australia/Brisbane")));
QCOMPARE(tzDate.toMSecsSinceEpoch(), tzMsecs);
}
-#endif
void tst_QDateTime::invalid() const
{
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index 5d344834e6..9bb0c6811d 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -1989,9 +1989,11 @@ static void setWinLocaleInfo(LCTYPE type, const QString &value)
# define LOCALE_SSHORTTIME 0x00000079
#endif
-class RestoreLocaleHelper {
+class RestoreLocaleHelper
+{
public:
- RestoreLocaleHelper() {
+ RestoreLocaleHelper()
+ {
m_decimal = getWinLocaleInfo(LOCALE_SDECIMAL);
m_thousand = getWinLocaleInfo(LOCALE_STHOUSAND);
m_sdate = getWinLocaleInfo(LOCALE_SSHORTDATE);
@@ -1999,7 +2001,8 @@ public:
m_time = getWinLocaleInfo(LOCALE_SSHORTTIME);
}
- ~RestoreLocaleHelper() {
+ ~RestoreLocaleHelper()
+ {
// restore these, or the user will get a surprise
setWinLocaleInfo(LOCALE_SDECIMAL, m_decimal);
setWinLocaleInfo(LOCALE_STHOUSAND, m_thousand);
@@ -2007,12 +2010,10 @@ public:
setWinLocaleInfo(LOCALE_SLONGDATE, m_ldate);
setWinLocaleInfo(LOCALE_SSHORTTIME, m_time);
- // make sure QLocale::system() gets updated
- QLocalePrivate::updateSystemPrivate();
+ QSystemLocale dummy; // to provoke a refresh of the system locale
}
QString m_decimal, m_thousand, m_sdate, m_ldate, m_time;
-
};
void tst_QLocale::windowsDefaultLocale()
@@ -2028,8 +2029,7 @@ void tst_QLocale::windowsDefaultLocale()
const QString shortTimeFormat = QStringLiteral("h^m^s");
setWinLocaleInfo(LOCALE_SSHORTTIME, shortTimeFormat);
- // make sure QLocale::system() gets updated
- QLocalePrivate::updateSystemPrivate();
+ QSystemLocale dummy; // to provoke a refresh of the system locale
QLocale locale = QLocale::system();
// make sure we are seeing the system's format strings
@@ -2770,9 +2770,11 @@ void tst_QLocale::textDirection_data()
case QLocale::Sabaean:
case QLocale::Samaritan:
case QLocale::Sindhi:
+ case QLocale::SouthernKurdish:
case QLocale::Syriac:
case QLocale::Uighur:
case QLocale::Urdu:
+ case QLocale::WesternBalochi:
case QLocale::Yiddish:
// false if there is no locale data for language:
rightToLeft = (QLocale(QLocale::Language(language)).language()
diff --git a/tests/auto/corelib/tools/qoffsetstringarray/qoffsetstringarray.pro b/tests/auto/corelib/tools/qoffsetstringarray/qoffsetstringarray.pro
new file mode 100644
index 0000000000..c8e6a8e05a
--- /dev/null
+++ b/tests/auto/corelib/tools/qoffsetstringarray/qoffsetstringarray.pro
@@ -0,0 +1,6 @@
+CONFIG += testcase
+TARGET = tst_qoffsetstringarray
+QT = core testlib core-private
+CONFIG += c++11
+CONFIG += strict_c++
+SOURCES = $$PWD/tst_qoffsetstringarray.cpp
diff --git a/tests/auto/corelib/tools/qoffsetstringarray/tst_qoffsetstringarray.cpp b/tests/auto/corelib/tools/qoffsetstringarray/tst_qoffsetstringarray.cpp
new file mode 100644
index 0000000000..dfa0450b18
--- /dev/null
+++ b/tests/auto/corelib/tools/qoffsetstringarray/tst_qoffsetstringarray.cpp
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <private/qoffsetstringarray_p.h>
+
+
+class tst_QOffsetStringArray : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void init();
+ void access();
+};
+
+
+constexpr const auto messages = qOffsetStringArray(
+ "level - 0",
+ "level - 1",
+ "level - 2",
+ "level - 3",
+ "level - 4",
+ ""
+);
+
+constexpr const auto messages257 = qOffsetStringArray(
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "end"
+);
+
+constexpr const auto messagesBigOffsets = qOffsetStringArray(
+ " 10 20 30 40 50 60 70 80 90",
+ " 10 20 30 40 50 60 70 80 90",
+ " 10 20 30 40 50 60 70 80 90",
+ " 10 20 30 40 50 60 70 80 90"
+);
+
+void tst_QOffsetStringArray::init()
+{
+ static_assert(messages.sizeString == 51, "message.sizeString");
+ static_assert(messages.sizeOffsets == 6, "message.sizeOffsets");
+ static_assert(std::is_same<decltype(messages)::Type, quint8>::value, "messages::Type != quint8");
+
+ static_assert(messages257.sizeOffsets == 257, "messages257.sizeOffsets");
+ static_assert(messages257.sizeString == 260, "messages257.sizeString");
+ static_assert(std::is_same<decltype(messages257)::Type, quint16>::value,
+ "messages257::Type != quint16");
+
+ static_assert(messagesBigOffsets.sizeOffsets == 4, "messagesBigOffsets.sizeOffsets");
+ static_assert(messagesBigOffsets.sizeString == 364, "messagesBigOffsets.sizeString");
+ static_assert(std::is_same<decltype(messagesBigOffsets)::Type, quint16>::value,
+ "messagesBigOffsets::Type != quint16");
+}
+
+void tst_QOffsetStringArray::access()
+{
+ QCOMPARE(messages[0], "level - 0");
+ QCOMPARE(messages[1], "level - 1");
+ QCOMPARE(messages[2], "level - 2");
+ QCOMPARE(messages[3], "level - 3");
+ QCOMPARE(messages[4], "level - 4");
+ QCOMPARE(messages[5], "");
+ QCOMPARE(messages[6], "");
+}
+
+
+QTEST_APPLESS_MAIN(tst_QOffsetStringArray)
+#include "tst_qoffsetstringarray.moc"
diff --git a/tests/auto/corelib/tools/qpair/tst_qpair.cpp b/tests/auto/corelib/tools/qpair/tst_qpair.cpp
index 1d5f7536c8..dedc353e67 100644
--- a/tests/auto/corelib/tools/qpair/tst_qpair.cpp
+++ b/tests/auto/corelib/tools/qpair/tst_qpair.cpp
@@ -41,8 +41,8 @@ private Q_SLOTS:
void taskQTBUG_48780_pairContainingCArray();
};
-class C { char _[4]; };
-class M { char _[4]; };
+class C { C() {} char _[4]; };
+class M { M() {} char _[4]; };
class P { char _[4]; };
QT_BEGIN_NAMESPACE
diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
index a3aec4c299..42bdf62a93 100644
--- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
+++ b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
@@ -43,7 +43,9 @@ private slots:
void removeDuplicates();
void removeDuplicates_data();
void contains();
+ void indexOf_data();
void indexOf();
+ void lastIndexOf_data();
void lastIndexOf();
void indexOf_regExp();
@@ -141,20 +143,52 @@ void tst_QStringList::lastIndexOf_regExp()
}
+void tst_QStringList::indexOf_data()
+{
+ QTest::addColumn<QString>("search");
+ QTest::addColumn<int>("from");
+ QTest::addColumn<int>("expectedResult");
+
+ QTest::newRow("harald") << "harald" << 0 << 0;
+ QTest::newRow("trond") << "trond" << 0 << 1;
+ QTest::newRow("vohi") << "vohi" << 0 << 2;
+ QTest::newRow("harald-1") << "harald" << 1 << 3;
+
+ QTest::newRow("hans") << "hans" << 0 << -1;
+ QTest::newRow("trond-1") << "trond" << 2 << -1;
+ QTest::newRow("harald-2") << "harald" << -1 << 3;
+ QTest::newRow("vohi-1") << "vohi" << -3 << 2;
+}
+
void tst_QStringList::indexOf()
{
QStringList list;
list << "harald" << "trond" << "vohi" << "harald";
- QCOMPARE(list.indexOf("harald"), 0);
- QCOMPARE(list.indexOf("trond"), 1);
- QCOMPARE(list.indexOf("vohi"), 2);
- QCOMPARE(list.indexOf("harald", 1), 3);
+ QFETCH(QString, search);
+ QFETCH(int, from);
+ QFETCH(int, expectedResult);
- QCOMPARE(list.indexOf("hans"), -1);
- QCOMPARE(list.indexOf("trond", 2), -1);
- QCOMPARE(list.indexOf("harald", -1), 3);
- QCOMPARE(list.indexOf("vohi", -3), 2);
+ QCOMPARE(list.indexOf(search, from), expectedResult);
+ QCOMPARE(list.indexOf(QStringView(search), from), expectedResult);
+ QCOMPARE(list.indexOf(QLatin1String(search.toLatin1()), from), expectedResult);
+}
+
+void tst_QStringList::lastIndexOf_data()
+{
+ QTest::addColumn<QString>("search");
+ QTest::addColumn<int>("from");
+ QTest::addColumn<int>("expectedResult");
+
+ QTest::newRow("harald") << "harald" << -1 << 3;
+ QTest::newRow("trond") << "trond" << -1 << 1;
+ QTest::newRow("vohi") << "vohi" << -1 << 2;
+ QTest::newRow("harald-1") << "harald" << 2 << 0;
+
+ QTest::newRow("hans") << "hans" << -1 << -1;
+ QTest::newRow("vohi-1") << "vohi" << 1 << -1;
+ QTest::newRow("vohi-2") << "vohi" << -1 << 2;
+ QTest::newRow("vohi-3") << "vohi" << -3 << -1;
}
void tst_QStringList::lastIndexOf()
@@ -162,15 +196,13 @@ void tst_QStringList::lastIndexOf()
QStringList list;
list << "harald" << "trond" << "vohi" << "harald";
- QCOMPARE(list.lastIndexOf("harald"), 3);
- QCOMPARE(list.lastIndexOf("trond"), 1);
- QCOMPARE(list.lastIndexOf("vohi"), 2);
- QCOMPARE(list.lastIndexOf("harald", 2), 0);
+ QFETCH(QString, search);
+ QFETCH(int, from);
+ QFETCH(int, expectedResult);
- QCOMPARE(list.lastIndexOf("hans"), -1);
- QCOMPARE(list.lastIndexOf("vohi", 1), -1);
- QCOMPARE(list.lastIndexOf("vohi", -1), 2);
- QCOMPARE(list.lastIndexOf("vohi", -3), -1);
+ QCOMPARE(list.lastIndexOf(search, from), expectedResult);
+ QCOMPARE(list.lastIndexOf(QStringView(search), from), expectedResult);
+ QCOMPARE(list.lastIndexOf(QLatin1String(search.toLatin1()), from), expectedResult);
}
void tst_QStringList::filter()
diff --git a/tests/auto/corelib/tools/tools.pro b/tests/auto/corelib/tools/tools.pro
index f28cf21b8b..2a975e67d1 100644
--- a/tests/auto/corelib/tools/tools.pro
+++ b/tests/auto/corelib/tools/tools.pro
@@ -35,6 +35,7 @@ SUBDIRS=\
qmap_strictiterators \
qmargins \
qmessageauthenticationcode \
+ qoffsetstringarray \
qpair \
qpoint \
qpointf \
diff --git a/tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp b/tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp
index b79f3ea5e3..1ba7ee51b1 100644
--- a/tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp
+++ b/tests/auto/dbus/qdbusservicewatcher/tst_qdbusservicewatcher.cpp
@@ -34,22 +34,27 @@
class tst_QDBusServiceWatcher: public QObject
{
Q_OBJECT
- QString serviceName;
int testCounter;
public:
tst_QDBusServiceWatcher();
private slots:
void initTestCase();
- void init();
-
+ void watchForCreation_data();
void watchForCreation();
+ void watchForDisappearance_data();
void watchForDisappearance();
void watchForDisappearanceUniqueConnection();
+ void watchForOwnerChange_data();
void watchForOwnerChange();
+ void modeChange_data();
void modeChange();
void disconnectedConnection();
+ void setConnection_data();
void setConnection();
+
+private:
+ QString generateServiceName();
};
tst_QDBusServiceWatcher::tst_QDBusServiceWatcher()
@@ -63,18 +68,45 @@ void tst_QDBusServiceWatcher::initTestCase()
QVERIFY(con.isConnected());
}
-void tst_QDBusServiceWatcher::init()
+QString tst_QDBusServiceWatcher::generateServiceName() {
+ return "com.example.TestService" + QString::number(testCounter++);
+}
+
+void tst_QDBusServiceWatcher::watchForCreation_data()
{
- // change the service name from test to test
- serviceName = "com.example.TestService" + QString::number(testCounter++);
+ QTest::addColumn<QString>("watchedName");
+ QTest::addColumn<QString>("registeredName");
+
+ //com.example.TestService5 matches com.example.TestService5
+ QString name = generateServiceName();
+ QTest::newRow("normal") << name << name;
+
+ //com.example* matches com.example.TestService5
+ name = generateServiceName();
+ QTest::newRow("wildcard") << "com.example*" << name;
+
+ //com.example.TestService5* matches com.example.TestService5
+ name = generateServiceName();
+ QTest::newRow("wildcard_exact") << name+"*" << name;
+
+ //com.example.TestService5* matches com.example.TestService5.Foo
+ name = generateServiceName();
+ QTest::newRow("wildcard_subdomain") << name+"*" << name + ".Foo";
+
+ //com.example.TestService5* matches com.example.TestService5.Foo.Bar
+ name = generateServiceName();
+ QTest::newRow("wildcard_subsubdomain") << name+"*" << name + ".Foo.Bar";
}
void tst_QDBusServiceWatcher::watchForCreation()
{
+ QFETCH(QString, watchedName);
+ QFETCH(QString, registeredName);
+
QDBusConnection con = QDBusConnection::sessionBus();
QVERIFY(con.isConnected());
- QDBusServiceWatcher watcher(serviceName, con, QDBusServiceWatcher::WatchForRegistration);
+ QDBusServiceWatcher watcher(watchedName, con, QDBusServiceWatcher::WatchForRegistration);
QSignalSpy spyR(&watcher, SIGNAL(serviceRegistered(QString)));
QSignalSpy spyU(&watcher, SIGNAL(serviceUnregistered(QString)));
@@ -82,18 +114,18 @@ void tst_QDBusServiceWatcher::watchForCreation()
QTestEventLoop::instance().connect(&watcher, SIGNAL(serviceRegistered(QString)), SLOT(exitLoop()));
// register a name
- QVERIFY(con.registerService(serviceName));
+ QVERIFY(con.registerService(registeredName));
QTestEventLoop::instance().enterLoop(1);
QVERIFY(!QTestEventLoop::instance().timeout());
QCOMPARE(spyR.count(), 1);
- QCOMPARE(spyR.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyR.at(0).at(0).toString(), registeredName);
QCOMPARE(spyU.count(), 0);
QCOMPARE(spyO.count(), 1);
- QCOMPARE(spyO.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyO.at(0).at(0).toString(), registeredName);
QVERIFY(spyO.at(0).at(1).toString().isEmpty());
QCOMPARE(spyO.at(0).at(2).toString(), con.baseService());
@@ -102,31 +134,39 @@ void tst_QDBusServiceWatcher::watchForCreation()
spyO.clear();
// unregister it:
- con.unregisterService(serviceName);
+ con.unregisterService(registeredName);
// and register again
- QVERIFY(con.registerService(serviceName));
+ QVERIFY(con.registerService(registeredName));
QTestEventLoop::instance().enterLoop(1);
QVERIFY(!QTestEventLoop::instance().timeout());
QCOMPARE(spyR.count(), 1);
- QCOMPARE(spyR.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyR.at(0).at(0).toString(), registeredName);
QCOMPARE(spyU.count(), 0);
QCOMPARE(spyO.count(), 1);
- QCOMPARE(spyO.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyO.at(0).at(0).toString(), registeredName);
QVERIFY(spyO.at(0).at(1).toString().isEmpty());
QCOMPARE(spyO.at(0).at(2).toString(), con.baseService());
}
+void tst_QDBusServiceWatcher::watchForDisappearance_data()
+{
+ tst_QDBusServiceWatcher::watchForCreation_data();
+}
+
void tst_QDBusServiceWatcher::watchForDisappearance()
{
+ QFETCH(QString, watchedName);
+ QFETCH(QString, registeredName);
+
QDBusConnection con = QDBusConnection::sessionBus();
QVERIFY(con.isConnected());
- QDBusServiceWatcher watcher(serviceName, con, QDBusServiceWatcher::WatchForUnregistration);
+ QDBusServiceWatcher watcher(watchedName, con, QDBusServiceWatcher::WatchForUnregistration);
watcher.setObjectName("watcher for disappearance");
QSignalSpy spyR(&watcher, SIGNAL(serviceRegistered(QString)));
@@ -135,10 +175,10 @@ void tst_QDBusServiceWatcher::watchForDisappearance()
QTestEventLoop::instance().connect(&watcher, SIGNAL(serviceUnregistered(QString)), SLOT(exitLoop()));
// register a name
- QVERIFY(con.registerService(serviceName));
+ QVERIFY(con.registerService(registeredName));
// unregister it:
- con.unregisterService(serviceName);
+ con.unregisterService(registeredName);
QTestEventLoop::instance().enterLoop(1);
QVERIFY(!QTestEventLoop::instance().timeout());
@@ -146,10 +186,10 @@ void tst_QDBusServiceWatcher::watchForDisappearance()
QCOMPARE(spyR.count(), 0);
QCOMPARE(spyU.count(), 1);
- QCOMPARE(spyU.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyU.at(0).at(0).toString(), registeredName);
QCOMPARE(spyO.count(), 1);
- QCOMPARE(spyO.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyO.at(0).at(0).toString(), registeredName);
QCOMPARE(spyO.at(0).at(1).toString(), con.baseService());
QVERIFY(spyO.at(0).at(2).toString().isEmpty());
}
@@ -188,12 +228,20 @@ void tst_QDBusServiceWatcher::watchForDisappearanceUniqueConnection()
QVERIFY(spyO.at(0).at(2).toString().isEmpty());
}
+void tst_QDBusServiceWatcher::watchForOwnerChange_data()
+{
+ watchForCreation_data();
+}
+
void tst_QDBusServiceWatcher::watchForOwnerChange()
{
+ QFETCH(QString, watchedName);
+ QFETCH(QString, registeredName);
+
QDBusConnection con = QDBusConnection::sessionBus();
QVERIFY(con.isConnected());
- QDBusServiceWatcher watcher(serviceName, con, QDBusServiceWatcher::WatchForOwnerChange);
+ QDBusServiceWatcher watcher(watchedName, con, QDBusServiceWatcher::WatchForOwnerChange);
QSignalSpy spyR(&watcher, SIGNAL(serviceRegistered(QString)));
QSignalSpy spyU(&watcher, SIGNAL(serviceUnregistered(QString)));
@@ -201,18 +249,18 @@ void tst_QDBusServiceWatcher::watchForOwnerChange()
QTestEventLoop::instance().connect(&watcher, SIGNAL(serviceRegistered(QString)), SLOT(exitLoop()));
// register a name
- QVERIFY(con.registerService(serviceName));
+ QVERIFY(con.registerService(registeredName));
QTestEventLoop::instance().enterLoop(1);
QVERIFY(!QTestEventLoop::instance().timeout());
QCOMPARE(spyR.count(), 1);
- QCOMPARE(spyR.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyR.at(0).at(0).toString(), registeredName);
QCOMPARE(spyU.count(), 0);
QCOMPARE(spyO.count(), 1);
- QCOMPARE(spyO.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyO.at(0).at(0).toString(), registeredName);
QVERIFY(spyO.at(0).at(1).toString().isEmpty());
QCOMPARE(spyO.at(0).at(2).toString(), con.baseService());
@@ -221,35 +269,43 @@ void tst_QDBusServiceWatcher::watchForOwnerChange()
spyO.clear();
// unregister it:
- con.unregisterService(serviceName);
+ con.unregisterService(registeredName);
// and register again
- QVERIFY(con.registerService(serviceName));
+ QVERIFY(con.registerService(registeredName));
QTestEventLoop::instance().enterLoop(1);
QVERIFY(!QTestEventLoop::instance().timeout());
QCOMPARE(spyR.count(), 1);
- QCOMPARE(spyR.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyR.at(0).at(0).toString(), registeredName);
QCOMPARE(spyU.count(), 1);
- QCOMPARE(spyU.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyU.at(0).at(0).toString(), registeredName);
QCOMPARE(spyO.count(), 2);
- QCOMPARE(spyO.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyO.at(0).at(0).toString(), registeredName);
QCOMPARE(spyO.at(0).at(1).toString(), con.baseService());
QVERIFY(spyO.at(0).at(2).toString().isEmpty());
- QCOMPARE(spyO.at(1).at(0).toString(), serviceName);
+ QCOMPARE(spyO.at(1).at(0).toString(), registeredName);
QVERIFY(spyO.at(1).at(1).toString().isEmpty());
QCOMPARE(spyO.at(1).at(2).toString(), con.baseService());
}
+void tst_QDBusServiceWatcher::modeChange_data()
+{
+ watchForCreation_data();
+}
+
void tst_QDBusServiceWatcher::modeChange()
{
+ QFETCH(QString, watchedName);
+ QFETCH(QString, registeredName);
+
QDBusConnection con = QDBusConnection::sessionBus();
QVERIFY(con.isConnected());
- QDBusServiceWatcher watcher(serviceName, con, QDBusServiceWatcher::WatchForRegistration);
+ QDBusServiceWatcher watcher(watchedName, con, QDBusServiceWatcher::WatchForRegistration);
QSignalSpy spyR(&watcher, SIGNAL(serviceRegistered(QString)));
QSignalSpy spyU(&watcher, SIGNAL(serviceUnregistered(QString)));
@@ -257,18 +313,18 @@ void tst_QDBusServiceWatcher::modeChange()
QTestEventLoop::instance().connect(&watcher, SIGNAL(serviceRegistered(QString)), SLOT(exitLoop()));
// register a name
- QVERIFY(con.registerService(serviceName));
+ QVERIFY(con.registerService(registeredName));
QTestEventLoop::instance().enterLoop(1);
QVERIFY(!QTestEventLoop::instance().timeout());
QCOMPARE(spyR.count(), 1);
- QCOMPARE(spyR.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyR.at(0).at(0).toString(), registeredName);
QCOMPARE(spyU.count(), 0);
QCOMPARE(spyO.count(), 1);
- QCOMPARE(spyO.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyO.at(0).at(0).toString(), registeredName);
QVERIFY(spyO.at(0).at(1).toString().isEmpty());
QCOMPARE(spyO.at(0).at(2).toString(), con.baseService());
@@ -279,7 +335,7 @@ void tst_QDBusServiceWatcher::modeChange()
watcher.setWatchMode(QDBusServiceWatcher::WatchForUnregistration);
// unregister it:
- con.unregisterService(serviceName);
+ con.unregisterService(registeredName);
QTestEventLoop::instance().connect(&watcher, SIGNAL(serviceUnregistered(QString)), SLOT(exitLoop()));
QTestEventLoop::instance().enterLoop(1);
@@ -288,10 +344,10 @@ void tst_QDBusServiceWatcher::modeChange()
QCOMPARE(spyR.count(), 0);
QCOMPARE(spyU.count(), 1);
- QCOMPARE(spyU.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyU.at(0).at(0).toString(), registeredName);
QCOMPARE(spyO.count(), 1);
- QCOMPARE(spyO.at(0).at(0).toString(), serviceName);
+ QCOMPARE(spyO.at(0).at(0).toString(), registeredName);
QCOMPARE(spyO.at(0).at(1).toString(), con.baseService());
QVERIFY(spyO.at(0).at(2).toString().isEmpty());
}
@@ -301,7 +357,7 @@ void tst_QDBusServiceWatcher::disconnectedConnection()
QDBusConnection con("");
QVERIFY(!con.isConnected());
- QDBusServiceWatcher watcher(serviceName, con, QDBusServiceWatcher::WatchForRegistration);
+ QDBusServiceWatcher watcher(generateServiceName(), con, QDBusServiceWatcher::WatchForRegistration);
watcher.addWatchedService("com.example.somethingelse");
watcher.addWatchedService("org.freedesktop.DBus");
@@ -311,8 +367,15 @@ void tst_QDBusServiceWatcher::disconnectedConnection()
watcher.setWatchedServices(QStringList());
}
+void tst_QDBusServiceWatcher::setConnection_data()
+{
+ QTest::addColumn<QString>("serviceName");
+ QTest::newRow("normal") << generateServiceName();
+}
+
void tst_QDBusServiceWatcher::setConnection()
{
+ QFETCH(QString, serviceName);
// begin with a disconnected connection
QDBusConnection con("");
QVERIFY(!con.isConnected());
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index eded206d37..361055ce67 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -299,6 +299,8 @@ static QLatin1String formatToString(QImage::Format format)
return QLatin1String("RGBA64");
case QImage::Format_RGBA64_Premultiplied:
return QLatin1String("RGBA64pm");
+ case QImage::Format_Grayscale16:
+ return QLatin1String("Grayscale16");
default:
break;
};
@@ -2367,8 +2369,11 @@ void tst_QImage::rgbSwapped_data()
QTest::addColumn<QImage::Format>("format");
for (int i = QImage::Format_Indexed8; i < QImage::NImageFormats; ++i) {
- if (i == QImage::Format_Alpha8 || i == QImage::Format_Grayscale8)
+ if (i == QImage::Format_Alpha8
+ || i == QImage::Format_Grayscale8
+ || i == QImage::Format_Grayscale16) {
continue;
+ }
QTest::addRow("%s", formatToString(QImage::Format(i)).data()) << QImage::Format(i);
}
}
@@ -2613,8 +2618,11 @@ void tst_QImage::inplaceMirrored_data()
QTest::addColumn<bool>("swap_horizontal");
for (int i = QImage::Format_Mono; i < QImage::NImageFormats; ++i) {
- if (i == QImage::Format_Alpha8 || i == QImage::Format_Grayscale8)
+ if (i == QImage::Format_Alpha8
+ || i == QImage::Format_Grayscale8
+ || i == QImage::Format_Grayscale16) {
continue;
+ }
if (i == QImage::Format_RGB444 || i == QImage::Format_ARGB4444_Premultiplied)
continue;
const auto fmt = formatToString(QImage::Format(i));
@@ -2786,11 +2794,11 @@ void tst_QImage::genericRgbConversion_data()
QTest::addColumn<QImage::Format>("dest_format");
for (int i = QImage::Format_RGB32; i < QImage::NImageFormats; ++i) {
- if (i == QImage::Format_Alpha8 || i == QImage::Format_Grayscale8)
+ if (i == QImage::Format_Alpha8)
continue;
const QLatin1String formatI = formatToString(QImage::Format(i));
for (int j = QImage::Format_RGB32; j < QImage::NImageFormats; ++j) {
- if (j == QImage::Format_Alpha8 || j == QImage::Format_Grayscale8)
+ if (j == QImage::Format_Alpha8)
continue;
if (i == j)
continue;
@@ -2806,6 +2814,9 @@ void tst_QImage::genericRgbConversion()
QFETCH(QImage::Format, format);
QFETCH(QImage::Format, dest_format);
+ bool srcGrayscale = format == QImage::Format_Grayscale8 || format == QImage::Format_Grayscale16;
+ bool dstGrayscale = dest_format == QImage::Format_Grayscale8 || dest_format == QImage::Format_Grayscale16;
+
QImage image(16, 16, format);
for (int i = 0; i < image.height(); ++i)
@@ -2817,8 +2828,12 @@ void tst_QImage::genericRgbConversion()
for (int i = 0; i < imageConverted.height(); ++i) {
for (int j = 0; j < imageConverted.width(); ++j) {
QRgb convertedColor = imageConverted.pixel(j,i);
- QCOMPARE(qRed(convertedColor) & 0xF0, j * 16);
- QCOMPARE(qGreen(convertedColor) & 0xF0, i * 16);
+ if (srcGrayscale || dstGrayscale) {
+ QVERIFY(qAbs(qGray(convertedColor) - qGray(qRgb(j*16, i*16, 0))) < 15);
+ } else {
+ QCOMPARE(qRed(convertedColor) & 0xF0, j * 16);
+ QCOMPARE(qGreen(convertedColor) & 0xF0, i * 16);
+ }
}
}
}
@@ -2829,11 +2844,17 @@ void tst_QImage::inplaceRgbConversion_data()
QTest::addColumn<QImage::Format>("dest_format");
for (int i = QImage::Format_RGB32; i < QImage::NImageFormats; ++i) {
- if (i == QImage::Format_Alpha8 || i == QImage::Format_Grayscale8)
+ if (i == QImage::Format_Alpha8
+ || i == QImage::Format_Grayscale8
+ || i == QImage::Format_Grayscale16) {
continue;
+ }
for (int j = QImage::Format_RGB32; j < QImage::NImageFormats; ++j) {
- if (j == QImage::Format_Alpha8 || j == QImage::Format_Grayscale8)
+ if (j == QImage::Format_Alpha8
+ || j == QImage::Format_Grayscale8
+ || j == QImage::Format_Grayscale16) {
continue;
+ }
if (i == j)
continue;
QTest::addRow("%s -> %s", formatToString(QImage::Format(i)).data(), formatToString(QImage::Format(j)).data())
@@ -3003,8 +3024,11 @@ void tst_QImage::invertPixelsRGB_data()
QTest::addColumn<QImage::Format>("image_format");
for (int i = QImage::Format_RGB32; i < QImage::NImageFormats; ++i) {
- if (i == QImage::Format_Alpha8 || i == QImage::Format_Grayscale8)
+ if (i == QImage::Format_Alpha8
+ || i == QImage::Format_Grayscale8
+ || i == QImage::Format_Grayscale16) {
continue;
+ }
QTest::addRow("%s", formatToString(QImage::Format(i)).data()) << QImage::Format(i);
}
}
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
index c2ec5b8925..1cf01133b2 100644
--- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
@@ -525,7 +525,7 @@ void tst_QImageReader::imageFormat_data()
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("png-3") << QString("kollada-16bpc.png") << QByteArray("png") << QImage::Format_RGBA64;
- QTest::newRow("png-4") << QString("basn0g16.png") << QByteArray("png") << QImage::Format_RGBX64; // Grayscale16
+ QTest::newRow("png-4") << QString("basn0g16.png") << QByteArray("png") << QImage::Format_Grayscale16;
QTest::newRow("png-5") << QString("basn2c16.png") << QByteArray("png") << QImage::Format_RGBX64;
QTest::newRow("png-6") << QString("basn4a16.png") << QByteArray("png") << QImage::Format_RGBA64; // Grayscale16Alpha16
QTest::newRow("png-7") << QString("basn6a16.png") << QByteArray("png") << QImage::Format_RGBA64;
diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
index 77851cd7d0..aaa8475c74 100644
--- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
@@ -239,7 +239,7 @@ void tst_QImageWriter::writeImage2_data()
// QLatin1String("jpeg"),
};
- QImage image0(70, 70, QImage::Format_ARGB32);
+ QImage image0(70, 70, QImage::Format_RGB32);
image0.fill(QColor(Qt::red).rgb());
QImage::Format imgFormat = QImage::Format_Mono;
@@ -304,10 +304,10 @@ void tst_QImageWriter::writeImage2()
if (!equalImageContents(written, image)) {
qDebug() << "image" << image.format() << image.width()
<< image.height() << image.depth()
- << hex << image.pixel(0, 0);
+ << image.pixelColor(0, 0);
qDebug() << "written" << written.format() << written.width()
<< written.height() << written.depth()
- << hex << written.pixel(0, 0);
+ << written.pixelColor(0, 0);
}
QVERIFY(equalImageContents(written, image));
diff --git a/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp b/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp
index d19aa9b54f..2deb84fa5f 100644
--- a/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp
+++ b/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp
@@ -202,9 +202,7 @@ void tst_QStandardItem::getSetData()
QCOMPARE(qvariant_cast<QSize>(item.data(Qt::SizeHintRole)), sizeHint);
QCOMPARE(qvariant_cast<QFont>(item.data(Qt::FontRole)), font);
QCOMPARE(qvariant_cast<int>(item.data(Qt::TextAlignmentRole)), int(textAlignment));
- QCOMPARE(qvariant_cast<QBrush>(item.data(Qt::BackgroundColorRole)), QBrush(backgroundColor));
QCOMPARE(qvariant_cast<QBrush>(item.data(Qt::BackgroundRole)), QBrush(backgroundColor));
- QCOMPARE(qvariant_cast<QBrush>(item.data(Qt::TextColorRole)), QBrush(textColor));
QCOMPARE(qvariant_cast<QBrush>(item.data(Qt::ForegroundRole)), QBrush(textColor));
QCOMPARE(qvariant_cast<int>(item.data(Qt::CheckStateRole)), int(checkState));
QCOMPARE(qvariant_cast<QString>(item.data(Qt::AccessibleTextRole)), accessibleText);
@@ -236,9 +234,7 @@ void tst_QStandardItem::getSetData()
QCOMPARE(item.data(Qt::SizeHintRole), QVariant());
QCOMPARE(item.data(Qt::FontRole), QVariant());
QCOMPARE(item.data(Qt::TextAlignmentRole), QVariant());
- QCOMPARE(item.data(Qt::BackgroundColorRole), QVariant());
QCOMPARE(item.data(Qt::BackgroundRole), QVariant());
- QCOMPARE(item.data(Qt::TextColorRole), QVariant());
QCOMPARE(item.data(Qt::ForegroundRole), QVariant());
QCOMPARE(item.data(Qt::CheckStateRole), QVariant());
QCOMPARE(item.data(Qt::AccessibleTextRole), QVariant());
diff --git a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp
index e2d7a41bd1..550f70890e 100644
--- a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp
+++ b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp
@@ -1160,7 +1160,7 @@ void tst_QStandardItemModel::getSetItemData()
QColor backgroundColor(Qt::blue);
roles.insert(Qt::BackgroundRole, backgroundColor);
QColor textColor(Qt::green);
- roles.insert(Qt::TextColorRole, textColor);
+ roles.insert(Qt::ForegroundRole, textColor);
Qt::CheckState checkState(Qt::PartiallyChecked);
roles.insert(Qt::CheckStateRole, int(checkState));
QLatin1String accessibleText("accessibleText");
diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
index 993ebbaac6..bff9f7d0e0 100644
--- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
+++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
@@ -215,7 +215,7 @@ static bool runHelper(const QString &program, const QStringList &arguments, QByt
{
#if QT_CONFIG(process)
QProcess process;
- process.setReadChannelMode(QProcess::ForwardedChannels);
+ process.setProcessChannelMode(QProcess::ForwardedChannels);
process.start(program, arguments);
if (!process.waitForStarted()) {
*errorMessage = "Unable to start '" + program.toLocal8Bit() + " ': "
diff --git a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
index cca0e95c29..b2572188b9 100644
--- a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
+++ b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp
@@ -49,6 +49,8 @@ private slots:
void construct();
void constructCopy_data();
void constructCopy();
+ void saveAndLoadBuiltin_data();
+ void saveAndLoadBuiltin();
};
#define FOR_EACH_GUI_METATYPE_BASE(F) \
@@ -442,5 +444,49 @@ FOR_EACH_GUI_METATYPE(RETURN_CONSTRUCT_COPY_FUNCTION)
TypeTestFunctionGetter::get(type)();
}
+template <typename T>
+struct StreamingTraits
+{
+ // Streamable by default, as currently all gui built-in types are streamable
+ enum { isStreamable = 1 };
+};
+
+void tst_QGuiMetaType::saveAndLoadBuiltin_data()
+{
+ QTest::addColumn<int>("type");
+ QTest::addColumn<bool>("isStreamable");
+
+#define ADD_METATYPE_TEST_ROW(MetaTypeName, MetaTypeId, RealType) \
+ QTest::newRow(#RealType) << MetaTypeId << bool(StreamingTraits<RealType>::isStreamable);
+ QT_FOR_EACH_STATIC_GUI_CLASS(ADD_METATYPE_TEST_ROW)
+#undef ADD_METATYPE_TEST_ROW
+}
+
+void tst_QGuiMetaType::saveAndLoadBuiltin()
+{
+ QFETCH(int, type);
+ QFETCH(bool, isStreamable);
+
+ void *value = QMetaType::create(type);
+
+ QByteArray ba;
+ QDataStream stream(&ba, QIODevice::ReadWrite);
+ QCOMPARE(QMetaType::save(stream, type, value), isStreamable);
+ QCOMPARE(stream.status(), QDataStream::Ok);
+
+ if (isStreamable)
+ QVERIFY(QMetaType::load(stream, type, value));
+
+ stream.device()->seek(0);
+ stream.resetStatus();
+ QCOMPARE(QMetaType::load(stream, type, value), isStreamable);
+ QCOMPARE(stream.status(), QDataStream::Ok);
+
+ if (isStreamable)
+ QVERIFY(QMetaType::load(stream, type, value));
+
+ QMetaType::destroy(type, value);
+}
+
QTEST_MAIN(tst_QGuiMetaType)
#include "tst_qguimetatype.moc"
diff --git a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
index a0ac1b3631..7f29b1c24e 100644
--- a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
+++ b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
@@ -37,6 +37,7 @@ class tst_QPalette : public QObject
private Q_SLOTS:
void roleValues_data();
void roleValues();
+ void resolve();
void copySemantics();
void moveSemantics();
void setBrush();
@@ -80,6 +81,43 @@ void tst_QPalette::roleValues()
QCOMPARE(role, value);
}
+void tst_QPalette::resolve()
+{
+ QPalette p1;
+ p1.setBrush(QPalette::WindowText, Qt::green);
+ p1.setBrush(QPalette::Button, Qt::green);
+
+ QVERIFY(p1.isBrushSet(QPalette::Active, QPalette::WindowText));
+ QVERIFY(p1.isBrushSet(QPalette::Active, QPalette::Button));
+
+ QPalette p2;
+ p2.setBrush(QPalette::WindowText, Qt::red);
+
+ QVERIFY(p2.isBrushSet(QPalette::Active, QPalette::WindowText));
+ QVERIFY(!p2.isBrushSet(QPalette::Active, QPalette::Button));
+
+ QPalette p1ResolvedTo2 = p1.resolve(p2);
+ // p1ResolvedTo2 gets everything from p1 and nothing copied from p2 because
+ // it already has a WindowText. That is two brushes, and to the same value
+ // as p1.
+ QCOMPARE(p1ResolvedTo2, p1);
+ QVERIFY(p1ResolvedTo2.isBrushSet(QPalette::Active, QPalette::WindowText));
+ QCOMPARE(p1.windowText(), p1ResolvedTo2.windowText());
+ QVERIFY(p1ResolvedTo2.isBrushSet(QPalette::Active, QPalette::Button));
+ QCOMPARE(p1.button(), p1ResolvedTo2.button());
+
+ QPalette p2ResolvedTo1 = p2.resolve(p1);
+ // p2ResolvedTo1 gets the WindowText set, and to the same value as the
+ // original p2, however, Button gets set from p1.
+ QVERIFY(p2ResolvedTo1.isBrushSet(QPalette::Active, QPalette::WindowText));
+ QCOMPARE(p2.windowText(), p2ResolvedTo1.windowText());
+ QVERIFY(p2ResolvedTo1.isBrushSet(QPalette::Active, QPalette::Button));
+ QCOMPARE(p1.button(), p2ResolvedTo1.button());
+
+ QVERIFY(p2ResolvedTo1 != p1);
+ QVERIFY(p2ResolvedTo1 != p2);
+}
+
void tst_QPalette::copySemantics()
{
QPalette src(Qt::red), dst;
diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
index 16215714f3..69c961c1a1 100644
--- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
@@ -43,6 +43,8 @@ public slots:
void cleanupTestCase();
private slots:
void getSetCheck();
+ void clear();
+ void reserveAndCapacity();
void swap();
void contains_QPointF_data();
@@ -148,6 +150,47 @@ void tst_QPainterPath::swap()
QCOMPARE(p2.boundingRect().toRect(), QRect( 0, 0,10,10));
}
+void tst_QPainterPath::clear()
+{
+ QPainterPath p1;
+ QPainterPath p2;
+ p1.clear();
+ QCOMPARE(p1, p2);
+
+ p1.addRect(0, 0, 10, 10);
+ p1.clear();
+ QCOMPARE(p1, p2);
+
+ QCOMPARE(p1.fillRule(), Qt::OddEvenFill);
+ p1.setFillRule(Qt::WindingFill);
+ p1.clear();
+ QCOMPARE(p1.fillRule(), Qt::WindingFill);
+}
+
+void tst_QPainterPath::reserveAndCapacity()
+{
+ QPainterPath p;
+ QVERIFY(p.capacity() == 0);
+
+ p.addRect(0, 0, 10, 10);
+ QVERIFY(p.capacity() > 0);
+
+ p.clear();
+ QVERIFY(p.capacity() > 0);
+
+ p = QPainterPath{};
+ QVERIFY(p.capacity() == 0);
+
+ p.moveTo(100, 100);
+ QVERIFY(p.capacity() > 1);
+
+ p.reserve(1000);
+ QVERIFY(p.capacity() >= 1000);
+
+ p.reserve(0);
+ QVERIFY(p.capacity() >= 1000);
+}
+
Q_DECLARE_METATYPE(QPainterPath)
void tst_QPainterPath::currentPosition()
diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
index cfd24a8701..7dbeb13aa7 100644
--- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
@@ -835,17 +835,32 @@ void tst_QCssParser::colorValue_data()
QTest::newRow("hexcolor") << "color: #12af0e" << QColor(0x12, 0xaf, 0x0e);
QTest::newRow("functional1") << "color: rgb(21, 45, 73)" << QColor(21, 45, 73);
QTest::newRow("functional2") << "color: rgb(100%, 0%, 100%)" << QColor(0xff, 0, 0xff);
+ QTest::newRow("rgb") << "color: rgb(10, 20, 30)" << QColor(10, 20, 30);
QTest::newRow("rgba") << "color: rgba(10, 20, 30, 40)" << QColor(10, 20, 30, 40);
QTest::newRow("rgbaf") << "color: rgba(10, 20, 30, 0.5)" << QColor(10, 20, 30, 127);
- QTest::newRow("rgb") << "color: rgb(10, 20, 30, 40)" << QColor(10, 20, 30, 40);
- QTest::newRow("hsl") << "color: hsv(10, 20, 30)" << QColor::fromHsv(10, 20, 30, 255);
- QTest::newRow("hsla") << "color: hsva(10, 20, 30, 40)" << QColor::fromHsv(10, 20, 30, 40);
+ QTest::newRow("hsv") << "color: hsv(10, 20, 30)" << QColor::fromHsv(10, 20, 30);
+ QTest::newRow("hsva") << "color: hsva(10, 20, 30, 40)" << QColor::fromHsv(10, 20, 30, 40);
+ // the percent and float values are well chosen to not get in trouble due to rounding errors
+ QTest::newRow("hsva-percent") << "color: hsva(100%, 20%, 40%, 60%)" << QColor::fromHsv(359, 51, 102, 153);
+ QTest::newRow("hsva-float") << "color: hsva(180, 20%, 40%, 0.6)" << QColor::fromHsvF(0.5, 0.2, 0.4, 0.6);
+ QTest::newRow("hsl") << "color: hsl(60, 100%, 50%)" << QColor::fromHsl(60., 255, 127);
+ QTest::newRow("hsla") << "color: hsla(240, 255, 127, 192)" << QColor::fromHsl(240, 255, 127, 192);
+ QTest::newRow("hsla-percent") << "color: hsla(100%, 80%, 40%, 0%)" << QColor::fromHsl(359, 204, 102, 0);
+ QTest::newRow("hsla-float") << "color: hsla(252, 40%, 60%, 0.2)" << QColor::fromHslF(0.7, 0.4, 0.6, 0.2);
QTest::newRow("invalid1") << "color: rgb(why, does, it, always, rain, on, me)" << QColor();
QTest::newRow("invalid2") << "color: rgba(i, meant, norway)" << QColor();
QTest::newRow("invalid3") << "color: rgb(21)" << QColor();
+ QTest::newRow("invalid4") << "color: rgbx(1, 2, 3)" << QColor();
+ QTest::newRow("invalid5") << "color: rgbax(1, 2, 3, 4)" << QColor();
+ QTest::newRow("invalid6") << "color: hsv(360, 0, 0)" << QColor();
+ QTest::newRow("invalid7") << "color: hsla(1, a, 1, 21)" << QColor();
QTest::newRow("role") << "color: palette(base)" << qApp->palette().color(QPalette::Base);
QTest::newRow("role2") << "color: palette( window-text ) " << qApp->palette().color(QPalette::WindowText);
QTest::newRow("transparent") << "color: transparent" << QColor(Qt::transparent);
+
+ // ### Qt6: no longer valid
+ QTest::newRow("rgb-invalid") << "color: rgb(10, 20, 30, 40)" << QColor(10, 20, 30, 40);
+ QTest::newRow("rgba-invalid") << "color: rgba(10, 20, 30)" << QColor(10, 20, 30, 255);
}
void tst_QCssParser::colorValue()
diff --git a/tests/auto/gui/text/qfont/qfont.pro b/tests/auto/gui/text/qfont/qfont.pro
index 048d952faf..96cd4cfdab 100644
--- a/tests/auto/gui/text/qfont/qfont.pro
+++ b/tests/auto/gui/text/qfont/qfont.pro
@@ -4,3 +4,4 @@ QT += testlib
QT += core-private gui-private
qtHaveModule(widgets): QT += widgets
SOURCES += tst_qfont.cpp
+RESOURCES += testfont.qrc
diff --git a/tests/auto/gui/text/qfont/testfont.qrc b/tests/auto/gui/text/qfont/testfont.qrc
new file mode 100644
index 0000000000..cf51e4a2b4
--- /dev/null
+++ b/tests/auto/gui/text/qfont/testfont.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>weirdfont.otf</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp
index 8090f38a2c..9acf877790 100644
--- a/tests/auto/gui/text/qfont/tst_qfont.cpp
+++ b/tests/auto/gui/text/qfont/tst_qfont.cpp
@@ -66,6 +66,12 @@ private slots:
void fromStringWithoutStyleName();
void sharing();
+ void familyNameWithCommaQuote_data();
+ void familyNameWithCommaQuote();
+ void setFamilies_data();
+ void setFamilies();
+ void setFamiliesAndFamily_data();
+ void setFamiliesAndFamily();
};
// Testing get/set functions
@@ -116,6 +122,14 @@ void tst_QFont::exactMatch()
QVERIFY(!QFont("sans-serif").exactMatch());
QVERIFY(!QFont("serif").exactMatch());
QVERIFY(!QFont("monospace").exactMatch());
+
+ font.setFamilies(QStringList() << "BogusFont");
+ QVERIFY(!font.exactMatch());
+ QVERIFY(!QFont("sans").exactMatch());
+ QVERIFY(!QFont("sans-serif").exactMatch());
+ QVERIFY(!QFont("serif").exactMatch());
+ QVERIFY(!QFont("monospace").exactMatch());
+
}
void tst_QFont::italicOblique()
@@ -277,6 +291,12 @@ void tst_QFont::resolve()
QCOMPARE(f4.pointSize(), 45);
f4 = f4.resolve(f3);
QCOMPARE(f4.pointSize(), 55);
+
+ QFont font5, font6;
+ const QStringList fontFamilies = { QStringLiteral("Arial") };
+ font5.setFamilies(fontFamilies);
+ font6 = font6.resolve(font5);
+ QCOMPARE(font6.families(), fontFamilies);
}
#ifndef QT_NO_WIDGETS
@@ -624,5 +644,108 @@ void tst_QFont::sharing()
QVERIFY(QFontPrivate::get(f2)->engineData != QFontPrivate::get(f)->engineData);
}
+void tst_QFont::familyNameWithCommaQuote_data()
+{
+ QTest::addColumn<QString>("familyName");
+ QTest::addColumn<QString>("chosenFamilyName");
+
+ const QString standardFont(QFont().defaultFamily());
+ if (standardFont.isEmpty())
+ QSKIP("No default font available on the system");
+ const QString weirdFont(QLatin1String("'My, weird'' font name',"));
+ const QString commaSeparated(standardFont + QLatin1String(",Times New Roman"));
+ const QString commaSeparatedWeird(weirdFont + QLatin1String(",") + standardFont);
+ const QString commaSeparatedBogus(QLatin1String("BogusFont,") + standardFont);
+
+ QTest::newRow("standard") << standardFont << standardFont;
+ QTest::newRow("weird") << weirdFont << weirdFont;
+ QTest::newRow("commaSeparated") << commaSeparated << standardFont;
+ QTest::newRow("commaSeparatedWeird") << commaSeparatedWeird << weirdFont;
+ QTest::newRow("commaSeparatedBogus") << commaSeparatedBogus << standardFont;
+}
+
+void tst_QFont::familyNameWithCommaQuote()
+{
+ QFETCH(QString, familyName);
+ QFETCH(QString, chosenFamilyName);
+
+ const int weirdFontId = QFontDatabase::addApplicationFont(":/weirdfont.otf");
+
+ QVERIFY(weirdFontId != -1);
+ QFont f(familyName);
+ QCOMPARE(f.family(), familyName);
+ QCOMPARE(QFontInfo(f).family(), chosenFamilyName);
+
+ QFontDatabase::removeApplicationFont(weirdFontId);
+}
+
+void tst_QFont::setFamilies_data()
+{
+ QTest::addColumn<QStringList>("families");
+ QTest::addColumn<QString>("chosenFamilyName");
+
+ const QString weirdFont(QLatin1String("'My, weird'' font name',"));
+ const QString standardFont(QFont().defaultFamily());
+ if (standardFont.isEmpty())
+ QSKIP("No default font available on the system");
+
+ QTest::newRow("standard") << (QStringList() << standardFont) << standardFont;
+ QTest::newRow("weird") << (QStringList() << weirdFont) << weirdFont;
+ QTest::newRow("standard-weird") << (QStringList() << standardFont << weirdFont) << standardFont;
+ QTest::newRow("weird-standard") << (QStringList() << weirdFont << standardFont) << weirdFont;
+ QTest::newRow("nonexist-weird") << (QStringList() << "NonExistentFont" << weirdFont) << weirdFont;
+}
+
+void tst_QFont::setFamilies()
+{
+ QFETCH(QStringList, families);
+ QFETCH(QString, chosenFamilyName);
+
+ const int weirdFontId = QFontDatabase::addApplicationFont(":/weirdfont.otf");
+
+ QVERIFY(weirdFontId != -1);
+ QFont f;
+ f.setFamilies(families);
+ QCOMPARE(QFontInfo(f).family(), chosenFamilyName);
+
+ QFontDatabase::removeApplicationFont(weirdFontId);
+}
+
+void tst_QFont::setFamiliesAndFamily_data()
+{
+ QTest::addColumn<QStringList>("families");
+ QTest::addColumn<QString>("family");
+ QTest::addColumn<QString>("chosenFamilyName");
+
+ const QString weirdFont(QLatin1String("'My, weird'' font name',"));
+ const QString defaultFont(QFont().defaultFamily());
+ if (defaultFont.isEmpty())
+ QSKIP("No default font available on the system");
+
+ const QString timesFont(QLatin1String("Times"));
+ const QString nonExistFont(QLatin1String("NonExistentFont"));
+
+ QTest::newRow("firstInFamilies") << (QStringList() << defaultFont << timesFont) << weirdFont << defaultFont;
+ QTest::newRow("secondInFamilies") << (QStringList() << nonExistFont << weirdFont) << defaultFont << weirdFont;
+ QTest::newRow("family") << (QStringList() << nonExistFont) << defaultFont << defaultFont;
+}
+
+void tst_QFont::setFamiliesAndFamily()
+{
+ QFETCH(QStringList, families);
+ QFETCH(QString, family);
+ QFETCH(QString, chosenFamilyName);
+
+ const int weirdFontId = QFontDatabase::addApplicationFont(":/weirdfont.otf");
+
+ QVERIFY(weirdFontId != -1);
+ QFont f;
+ f.setFamilies(families);
+ f.setFamily(family);
+ QCOMPARE(QFontInfo(f).family(), chosenFamilyName);
+
+ QFontDatabase::removeApplicationFont(weirdFontId);
+}
+
QTEST_MAIN(tst_QFont)
#include "tst_qfont.moc"
diff --git a/tests/auto/gui/text/qfont/weirdfont.otf b/tests/auto/gui/text/qfont/weirdfont.otf
new file mode 100644
index 0000000000..b91c559f5b
--- /dev/null
+++ b/tests/auto/gui/text/qfont/weirdfont.otf
Binary files differ
diff --git a/tests/auto/gui/text/qfontcache/tst_qfontcache.cpp b/tests/auto/gui/text/qfontcache/tst_qfontcache.cpp
index fbca313ea3..785cc3fef2 100644
--- a/tests/auto/gui/text/qfontcache/tst_qfontcache.cpp
+++ b/tests/auto/gui/text/qfontcache/tst_qfontcache.cpp
@@ -45,6 +45,8 @@ public:
private slots:
void engineData_data();
void engineData();
+ void engineDataFamilies_data();
+ void engineDataFamilies();
void clear();
};
@@ -109,6 +111,49 @@ void tst_QFontCache::engineData()
QCOMPARE(engineData, QFontPrivate::get(f)->engineData);
}
+void tst_QFontCache::engineDataFamilies_data()
+{
+ QTest::addColumn<QStringList>("families");
+
+ const QStringList multiple = { QLatin1String("invalid"), QLatin1String("Times New Roman") };
+ const QStringList multipleQuotes = { QLatin1String("'invalid'"), QLatin1String("Times New Roman") };
+ const QStringList multiple2 = { QLatin1String("invalid"), QLatin1String("Times New Roman"),
+ QLatin1String("foobar"), QLatin1String("'baz'") };
+
+ QTest::newRow("unquoted-family-name") << QStringList(QLatin1String("Times New Roman"));
+ QTest::newRow("quoted-family-name") << QStringList(QLatin1String("Times New Roman"));
+ QTest::newRow("invalid") << QStringList(QLatin1String("invalid"));
+ QTest::newRow("multiple") << multiple;
+ QTest::newRow("multiple spaces quotes") << multipleQuotes;
+ QTest::newRow("multiple2") << multiple2;
+}
+
+void tst_QFontCache::engineDataFamilies()
+{
+ QFETCH(QStringList, families);
+
+ QFont f;
+ f.setFamily(QString()); // Unset the family as taken from the QGuiApplication default
+ f.setFamilies(families);
+ f.exactMatch(); // loads engine
+ QFontPrivate *d = QFontPrivate::get(f);
+
+ QFontDef req = d->request;
+ // copy-pasted from QFontDatabase::load(), to engineer the cache key
+ if (req.pixelSize == -1) {
+ req.pixelSize = std::floor(((req.pointSize * d->dpi) / 72) * 100 + 0.5) / 100;
+ req.pixelSize = qRound(req.pixelSize);
+ }
+ if (req.pointSize < 0)
+ req.pointSize = req.pixelSize*72.0/d->dpi;
+
+ req.families = families;
+
+ QFontEngineData *engineData = QFontCache::instance()->findEngineData(req);
+
+ QCOMPARE(engineData, QFontPrivate::get(f)->engineData);
+}
+
void tst_QFontCache::clear()
{
#ifdef QT_BUILD_INTERNAL
diff --git a/tests/auto/gui/text/qglyphrun/BLACKLIST b/tests/auto/gui/text/qglyphrun/BLACKLIST
index 57f32c683d..d8dbdabb4b 100644
--- a/tests/auto/gui/text/qglyphrun/BLACKLIST
+++ b/tests/auto/gui/text/qglyphrun/BLACKLIST
@@ -1,3 +1,4 @@
[mixedScripts]
ubuntu-18.04
b2qt
+windows
diff --git a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
index b7f014d0e2..1429e4cb7f 100644
--- a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
+++ b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
@@ -491,10 +491,6 @@ void tst_QGlyphRun::drawMultiScriptText2()
drawGlyphs.save("drawMultiScriptText2_drawGlyphIndexes.png");
#endif
-#ifdef Q_OS_OSX
- if (drawGlyphs.toImage() != textLayoutDraw.toImage())
- QEXPECT_FAIL("", "See QTBUG-32690", Continue);
-#endif // Q_OS_OSX
QCOMPARE(drawGlyphs, textLayoutDraw);
}
diff --git a/tests/auto/gui/text/qrawfont/BLACKLIST b/tests/auto/gui/text/qrawfont/BLACKLIST
new file mode 100644
index 0000000000..c076f11635
--- /dev/null
+++ b/tests/auto/gui/text/qrawfont/BLACKLIST
@@ -0,0 +1,3 @@
+# QTBUG-72836
+[unsupportedWritingSystem]
+windows
diff --git a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
index 3e354b7523..08f7cf4fb2 100644
--- a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
+++ b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp
@@ -159,6 +159,7 @@ private slots:
void nonZeroMarginOnImport();
void html_charFormatPropertiesUnset();
void html_headings();
+ void html_quotedFontFamily_data();
void html_quotedFontFamily();
void html_spanBackgroundColor();
void defaultFont();
@@ -2184,23 +2185,45 @@ void tst_QTextDocumentFragment::html_headings()
QCOMPARE(doc->blockCount(), 2);
}
-void tst_QTextDocumentFragment::html_quotedFontFamily()
+void tst_QTextDocumentFragment::html_quotedFontFamily_data()
{
- setHtml("<div style=\"font-family: 'Foo Bar';\">Test</div>");
- QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar"));
-
- setHtml("<div style='font-family: \"Foo Bar\";'>Test</div>");
- QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar"));
-
- setHtml("<div style='font-family: \"Foo Bar\";'>Test</div>");
- QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar"));
-
- setHtml("<div style='font-family: Foo\n Bar;'>Test</div>");
- QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar"));
+ QTest::addColumn<QString>("html");
+ QTest::addColumn<QString>("fontFamily");
+ QTest::addColumn<QStringList>("fontFamilies");
+
+ const QString fooFamily = QLatin1String("Foo Bar");
+ const QString weirdFamily = QLatin1String("'Weird, & font '' name',");
+
+ QTest::newRow("data1") << QString("<div style=\"font-family: 'Foo Bar';\">Test</div>")
+ << fooFamily << QStringList(fooFamily);
+ QTest::newRow("data2") << QString("<div style='font-family: \"Foo Bar\";'>Test</div>")
+ << QString("Foo Bar") << QStringList("Foo Bar");
+ QTest::newRow("data3") << QString("<div style='font-family: Foo\n Bar;'>Test</div>")
+ << fooFamily << QStringList(fooFamily);
+ QTest::newRow("data4") << QString("<div style='font-family: Foo\n Bar, serif, \"bar foo\";'>Test"
+ "</div>")
+ << fooFamily << (QStringList() << "Foo Bar" << "serif" << "bar foo");
+ QTest::newRow("data5") << QString("<div style='font-family: \"\\'Weird, & font \\'\\' name\\',"
+ "\";'>Test</div>")
+ << weirdFamily << QStringList(weirdFamily);
+ QTest::newRow("data6") << QString("<div style='font-family: \"\\'Weird, & font \\'\\' name\\',"
+ "\";'>Test</div>")
+ << weirdFamily << QStringList(weirdFamily);
+ QTest::newRow("data7") << QString("<div style='font-family: \"\\'Weird, & font \\'\\' name\\',\", "
+ "serif, \"bar foo\";'>Test</div>")
+ << weirdFamily
+ << (QStringList() << weirdFamily << "serif" << "bar foo");
+}
- setHtml("<div style='font-family: Foo\n Bar, serif, \"bar foo\";'>Test</div>");
- QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), QString("Foo Bar,serif,bar foo"));
+void tst_QTextDocumentFragment::html_quotedFontFamily()
+{
+ QFETCH(QString, html);
+ QFETCH(QString, fontFamily);
+ QFETCH(QStringList, fontFamilies);
+ setHtml(html);
+ QCOMPARE(doc->begin().begin().fragment().charFormat().fontFamily(), fontFamily);
+ QCOMPARE(doc->begin().begin().fragment().charFormat().font().families(), fontFamilies);
}
void tst_QTextDocumentFragment::defaultFont()
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
index a3c318420f..f162c3ae9f 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@@ -143,7 +143,7 @@ public:
return true;
}
- static bool verifyConnection(QString serverName, quint16 port, quint32 retry = 10)
+ static bool verifyConnection(QString serverName, quint16 port, quint32 retry = 60)
{
QTcpSocket socket;
for (quint32 i = 1; i < retry; i++) {
@@ -176,7 +176,7 @@ public:
static QString ftpServerName()
{
-#ifdef QT_TEST_SERVER
+#ifdef QT_TEST_SERVER_NAME
return QString("vsftpd.") % serverDomainName();
#else
return serverName();
@@ -184,7 +184,7 @@ public:
}
static QString ftpProxyServerName()
{
-#ifdef QT_TEST_SERVER
+#ifdef QT_TEST_SERVER_NAME
return QString("ftp-proxy.") % serverDomainName();
#else
return serverName();
@@ -192,7 +192,7 @@ public:
}
static QString httpServerName()
{
-#ifdef QT_TEST_SERVER
+#ifdef QT_TEST_SERVER_NAME
return QString("apache2.") % serverDomainName();
#else
return serverName();
@@ -200,7 +200,7 @@ public:
}
static QString httpProxyServerName()
{
-#ifdef QT_TEST_SERVER
+#ifdef QT_TEST_SERVER_NAME
return QString("squid.") % serverDomainName();
#else
return serverName();
@@ -208,7 +208,7 @@ public:
}
static QString socksProxyServerName()
{
-#ifdef QT_TEST_SERVER
+#ifdef QT_TEST_SERVER_NAME
return QString("danted.") % serverDomainName();
#else
return serverName();
diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
index 8b49679042..6c3443a735 100644
--- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
+++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
@@ -35,7 +35,9 @@
#include <QtNetwork/QNetworkCookieJar>
#include <QtNetwork/QNetworkCookie>
#include <QtNetwork/QNetworkRequest>
+#if QT_CONFIG(topleveldomain)
#include "private/qtldurl_p.h"
+#endif
class tst_QNetworkCookieJar: public QObject
{
@@ -47,7 +49,7 @@ private slots:
void setCookiesFromUrl();
void cookiesForUrl_data();
void cookiesForUrl();
-#ifdef QT_BUILD_INTERNAL
+#if defined(QT_BUILD_INTERNAL) && QT_CONFIG(topleveldomain)
void effectiveTLDs_data();
void effectiveTLDs();
#endif
@@ -398,7 +400,7 @@ void tst_QNetworkCookieJar::cookiesForUrl()
}
// This test requires private API.
-#ifdef QT_BUILD_INTERNAL
+#if defined(QT_BUILD_INTERNAL) && QT_CONFIG(topleveldomain)
void tst_QNetworkCookieJar::effectiveTLDs_data()
{
QTest::addColumn<QString>("domain");
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 30b41da515..61f0f70ea7 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -1809,6 +1809,11 @@ void tst_QNetworkReply::getFromFileSpecial_data()
void tst_QNetworkReply::getFromFileSpecial()
{
+#if defined(QT_TEST_SERVER) && defined(Q_OS_WIN)
+ if (qstrcmp(QTest::currentDataTag(), "smb-path") == 0)
+ QSKIP("Docker-based test server doesn't support smb protocol yet");
+#endif
+
QFETCH(QString, fileName);
QFETCH(QString, url);
@@ -3202,6 +3207,11 @@ void tst_QNetworkReply::ioGetFromFileSpecial_data()
void tst_QNetworkReply::ioGetFromFileSpecial()
{
+#if defined(QT_TEST_SERVER) && defined(Q_OS_WIN)
+ if (qstrcmp(QTest::currentDataTag(), "smb-path") == 0)
+ QSKIP("Docker-based test server doesn't support smb protocol yet");
+#endif
+
QFETCH(QString, fileName);
QFETCH(QString, url);
diff --git a/tests/auto/network/ssl/qocsp/certs/alice.crt b/tests/auto/network/ssl/qocsp/certs/alice.crt
new file mode 100644
index 0000000000..02df86a517
--- /dev/null
+++ b/tests/auto/network/ssl/qocsp/certs/alice.crt
@@ -0,0 +1,24 @@
+-----BEGIN CERTIFICATE-----
+MIIEGDCCAwCgAwIBAgIBAjANBgkqhkiG9w0BAQsFADCBjjELMAkGA1UEBhMCTk8x
+DTALBgNVBAgMBE9zbG8xEjAQBgNVBAcMCU9zbG8gQ2l0eTETMBEGA1UECgwKVGhl
+IFF0IENBMTENMAsGA1UECwwEUVRDTjERMA8GA1UEAwwIY2ExcXQuaW8xJTAjBgkq
+hkiG9w0BCQEWFnRpbXVyLnBvY2hlcHRzb3ZAcXQuaW8wHhcNMTgxMTIyMTEwNjE4
+WhcNMjgxMTE5MTEwNjE4WjCBkjELMAkGA1UEBhMCTk8xDTALBgNVBAgMBE9zbG8x
+EjAQBgNVBAcMCU9zbG8gQ2l0eTEdMBsGA1UECgwUVGhlIEZhbW91cyBBbGljZSBM
+dGQxDTALBgNVBAsMBEdPQUExEjAQBgNVBAMMCWFsaWNlLm9yZzEeMBwGCSqGSIb3
+DQEJARYPYWxpY2VAYWxpY2Uub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEAtuGDR9oIEkK57xlxq/xc3u7B1ni4pdoyhf9r+pkgmu591qp2kl3Xcq3W
+Ve5Z553orAUCAExPlKfFV+CYYAedSgsDYlKk8DN+f/n+hkG6Wl2qyFzHgl+mvPwa
+eDqdVMIcDHGhSljALi9AqsN4lbrUhSxiyuPhAwl82WB0EIucmBs1NxSSZgFPRBLG
+Uzy9WvtQFq1qtn795PVIUsNg68qZQ9BvRduOQAr3bg3anoYqytthWnzLWKri2QR4
+Z4Y0mvcbT/PZwhtcFZzDXG3Hvc7k3AroAbWoSghMEgok9TW9grKYkW2d5cpQTP+l
+ptkB6yZ06MY9/uCdYzhm8eu2RgVndwIDAQABo3sweTAJBgNVHRMEAjAAMCwGCWCG
+SAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4E
+FgQUQz2PuE4VuqHtZYTvVLr4+0IuHTUwHwYDVR0jBBgwFoAUeBcnAkU7sTqm7i2Q
+vTxwgr0nQ0QwDQYJKoZIhvcNAQELBQADggEBABGGmo1vUAXKQm9kowvUtjDpEIIY
+TpT+KqiUBOgJg5fGn6a63vBn5GMA6eT948ywi9ZU2M9dIXJCM+bdqjXeOtt4bBPZ
+xz6DcBPW9CoTR4CV1muNa95WIXzAHatq3XYG041ddMf41WG7QIdQsojBYEG0IYlv
+PQx+B+m2cu7A04aI2tCS8aUh7Xc9wRilJ+h/FlYFFQzgyEKsd7CFgkyxG/sLyFNH
+skYYk/DLlmaWa+YScHYB5kAk8StoETeMI2LLs7rgJmchi8eAxjLroYDUhQclUjqz
+vlNM+4GvcF5RluyuEXFOZVdmQahkXcyu0Q3yxvsBbnDglmbb2YHPl/blB7w=
+-----END CERTIFICATE-----
diff --git a/tests/auto/network/ssl/qocsp/certs/alice.key b/tests/auto/network/ssl/qocsp/certs/alice.key
new file mode 100644
index 0000000000..6f2666ebde
--- /dev/null
+++ b/tests/auto/network/ssl/qocsp/certs/alice.key
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC24YNH2ggSQrnv
+GXGr/Fze7sHWeLil2jKF/2v6mSCa7n3WqnaSXddyrdZV7lnnneisBQIATE+Up8VX
+4JhgB51KCwNiUqTwM35/+f6GQbpaXarIXMeCX6a8/Bp4Op1UwhwMcaFKWMAuL0Cq
+w3iVutSFLGLK4+EDCXzZYHQQi5yYGzU3FJJmAU9EEsZTPL1a+1AWrWq2fv3k9UhS
+w2DryplD0G9F245ACvduDdqehirK22FafMtYquLZBHhnhjSa9xtP89nCG1wVnMNc
+bce9zuTcCugBtahKCEwSCiT1Nb2CspiRbZ3lylBM/6Wm2QHrJnToxj3+4J1jOGbx
+67ZGBWd3AgMBAAECggEADbzU+sHDF3QRuYdExbGYXFq9DtpUrIi+gNhWCSYVj+3Y
+YBa//3CzLXcngZ78++wdvUZHBzS0SatspJRHffc0doprP6iLoUuM9hoWZ4lqcT1W
+BeUKS53ZzZp2do+Yn/RQ3RJwFkCidxWvmuRCG6VEL5jM9wa1MWA2E7IuJcwHAFny
+WIByosje5Qrd7eXDuVoqr1hjJ2UxIjIJ8Zgg3EE9wVUyJE3PU1HLz2AefonYRwbL
+XlzNgnj0c9Ti9ejfyon+jTnpslLKtPal2kxyGoKPAngadAhCzqSaCWggACm7R8Ge
+pZ0Y0pV7QReEgjfFd4D3qOqLRQZVJOMDb3vJu2/rsQKBgQDfKjfSpUweBM9li7GS
+xXbDpC3Y8zQ2VY+2SvgYoYiYU/Y6YenxhKM1XDbWZxhxS8GVfCUAESFDOTZcMvdi
+QEbG1uEmuCn1ksvrC2y54rtd8WDppcS0vJxCrU4nZG0v9IjVKp67B8EpBpAQeNb1
+tR6ByT2fLJu5+WU2S7OxqX7uLwKBgQDRyfKvrCQgdJOQlJlHOv1y1hN8WY51A8P/
+JbDXoun3PCPd+JczvFXCUh3ZLXqUEAX2qDOBD1pBM62EN6/A9ukO4mcMd8uYIet6
+nR4nVqXUjWuzXe6eo913lTDQrIOGWpViTc8fnvFlwBPfwzxbZNx38HZbw0L0nT7d
+8TE/JxLROQKBgQC4Kzo4b8vadjPGZLueGbICkQp5IXR0ZrYcRdBrW1vEAn6Q/d84
+PzMFxV1IIXrNfSx8NiC+5mQh+yQ+gJ0iC1OdoxXag1+1V3lMN3h6C4B/bcWB7Rjh
+40m9yRJXdgyZ59/Is8ydIzAosE7SGTelPNy5VR+yrfiySPxbC6x3MR8cZwKBgQCq
+PVTg1bIjXDZ7NvsDYI1XaP07BXmi30FnhXByLFPsOzNn51jbtNNq8zQhjtRP3ojY
+VjolWw4EpykBiCbpUfRiDbtN1NC0TaJHR8S2a4v6ZiCl123R8mu/pKOOUtAQcOWU
+dkvD/zkpNqtqA4axK7H06n9Bi7yDwC7J7/Xkp5KPkQKBgFDprXrXg4zvIsxbXYZ3
+2bCaxyhBXNKcGwtWbbLfJcOwHJPns/abGkYIJ0NbMZX1LwTDfQWmC+8YKKvIlbKG
+S2uk5H4qzupR4XN6YJ7SCHlGv2z0vxVjV7aWc1TME2iZQoBuO1urxPZwHd/euruo
+kluWh1KV5XnWjBSYjZpiXxWl
+-----END PRIVATE KEY-----
diff --git a/tests/auto/network/ssl/qocsp/certs/ca1.crt b/tests/auto/network/ssl/qocsp/certs/ca1.crt
new file mode 100644
index 0000000000..b5ae194fab
--- /dev/null
+++ b/tests/auto/network/ssl/qocsp/certs/ca1.crt
@@ -0,0 +1,24 @@
+-----BEGIN CERTIFICATE-----
+MIID9DCCAtygAwIBAgIJAMQbE3657KDYMA0GCSqGSIb3DQEBCwUAMIGOMQswCQYD
+VQQGEwJOTzENMAsGA1UECAwET3NsbzESMBAGA1UEBwwJT3NsbyBDaXR5MRMwEQYD
+VQQKDApUaGUgUXQgQ0ExMQ0wCwYDVQQLDARRVENOMREwDwYDVQQDDAhjYTFxdC5p
+bzElMCMGCSqGSIb3DQEJARYWdGltdXIucG9jaGVwdHNvdkBxdC5pbzAeFw0xODEx
+MjIxMDIxMTNaFw0yODExMTkxMDIxMTNaMIGOMQswCQYDVQQGEwJOTzENMAsGA1UE
+CAwET3NsbzESMBAGA1UEBwwJT3NsbyBDaXR5MRMwEQYDVQQKDApUaGUgUXQgQ0Ex
+MQ0wCwYDVQQLDARRVENOMREwDwYDVQQDDAhjYTFxdC5pbzElMCMGCSqGSIb3DQEJ
+ARYWdGltdXIucG9jaGVwdHNvdkBxdC5pbzCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBAOCs3AV7sDKHJUJcm7a0OqnShIvoB1qv6UcOmlBmUzGl5GzX90Jz
+7jYJoOPjxjNyRxMOsOReB1ZcSuIAjkdAEfFMaVe6j7qKTJ5ycTVY/fVoxyxsSNuI
+xOJ6RCEjLHcxONEbkN/xI8LMdVko3m4P10r5GxwrgyPvpa87Yq5+XJ1BPWJyKbD7
+Tqpn3dvZUj0/POsMUTT7Q7VXOfDlZj58XWAC6ECTqJauhGFMhiwgqOn2Qo1W0QjV
+DkGqRTdgIAM6Rv2cSRxgnflwW5QZ8kWUV81h/yx4cck/D9TcVxjr3Pvy6aJ/U41u
+d4XJQgwCj4LJi4msw1S0CvZWmz+2BKxcbRsCAwEAAaNTMFEwHQYDVR0OBBYEFHgX
+JwJFO7E6pu4tkL08cIK9J0NEMB8GA1UdIwQYMBaAFHgXJwJFO7E6pu4tkL08cIK9
+J0NEMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBADp1kqDRcyVG
+BdMge+Il10IjbpzzSjAoZiqiw69V99LiHW9ePbxG4AmliE6Za60GE5PCXOLjJh/5
+efgnIbybbyIOIT9iK4TXWLw2XW+rMY51c0RAxp2h/sc+5CZ0F0I811F5VUHXg2qR
+U7C2zbzqAimN8TBm6FRe7NFQfqLCrsuFJjSc3obrqKQcpvRwxMk6NpkdoemzqLmY
+lrBrTaeVbZ4ix3srVPvXRm9TdiC+JuuFmvulMfe+/wwnhb+dwT3JUC+EIq/Uf5Wb
+g8lvB4ntitL8NLQ2hFGqYuoFNIGs6tRN71ohk+/ONqe9wJhcI9QAruPOvsg+8J0H
+uGooX7PUNHg=
+-----END CERTIFICATE-----
diff --git a/tests/auto/network/ssl/qocsp/certs/ca1.key b/tests/auto/network/ssl/qocsp/certs/ca1.key
new file mode 100644
index 0000000000..4ee080f706
--- /dev/null
+++ b/tests/auto/network/ssl/qocsp/certs/ca1.key
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDgrNwFe7AyhyVC
+XJu2tDqp0oSL6Adar+lHDppQZlMxpeRs1/dCc+42CaDj48YzckcTDrDkXgdWXEri
+AI5HQBHxTGlXuo+6ikyecnE1WP31aMcsbEjbiMTiekQhIyx3MTjRG5Df8SPCzHVZ
+KN5uD9dK+RscK4Mj76WvO2KuflydQT1icimw+06qZ93b2VI9PzzrDFE0+0O1Vznw
+5WY+fF1gAuhAk6iWroRhTIYsIKjp9kKNVtEI1Q5BqkU3YCADOkb9nEkcYJ35cFuU
+GfJFlFfNYf8seHHJPw/U3FcY69z78umif1ONbneFyUIMAo+CyYuJrMNUtAr2Vps/
+tgSsXG0bAgMBAAECggEBAL1RCwjXw42gEUZM8KzQS0pD6IpXVrMU3ZWReXhb8Kg6
+KDOK+3+UXlpMXLUKfj1lgvxM+cNEdBxSIoszerARDc1s3KseufOui4dL2ZbhSQVc
+Z9BH4lCSe4x3CCeAEvzQjhatirMY51BCpnMdm+fUE07KfwyKobNLQSpZ+Pod4f5i
+oQbOiZYfRfU2quaWIsVb/a5IiUD0gG0KS9O5wX6VigVeFRpOPHT4YCQ1qds4HqQq
+PKQtkLq0mo6beXCfXWrJ5Nc0QOIFlgSAHkeRR7zLK8MlaerwZ5YdeJIWuPM9l9H+
+34FVkHle1rPN6dJf7EPwWxn1PceFe3QYn1GHoiMmXfkCgYEA/U6iQypbLEKLmLbt
+XTvhV1FVDQM42BX+ATNQ8Wro0ybdyzM+d4271uAUGTF1Zvxndv22p+JOmldWveAR
+0iVK4mvrs25ACg27Bz3LiUaQB2OyYrj9M7TLgQ47gYEhwgnsSniFyrMcptNyIfW5
+GoB1N00EKiCvHyWo5LK6kRZt5QcCgYEA4xBOC/Otc9lTp24iSVA8Y7XJ+nlypFtc
+pehf262jH11wEkWskmc9aP/kpxt9fUrDxf3YIOqITR4mMNn184P1WywHAQF7Adfd
+3r5YBMVaanuaMsSuAZOJGyvuk2BE6328IKdE+3emndzXuQdDf0X2TUznwdKe9AzZ
+qadCBLfUpk0CgYAgDKbzIJTQkMrg06RMu5rTVXMRZmr2zDGLLVb8dK5oqO4/G4i3
+z7MIiOmCFoPoN99PauKFc1jGpm5PL96RXC6RX14/IZ/wpbQYQnVSNR9cD/0uCIHg
+3OsytP5KcHA5ANBoy78B2o+xe+dg7JozBDXQfWodem0t37Hy3bpFSTU2WQKBgETY
+qcFn9hydNYcblpvCDz1wXjhq4H7DENlhFseF42LcMuHnbEbLtMwEYrDkXe1CYQ/E
+QubgFcnELXI8dB2M0jT9qXX9m+1YJXanIgr4R8zngz6HcfcaY8TwUhsvYlZAvmzs
+KrdQdR2CW4pHkIijjuWrPs3+7aEz0D9nblX94yU1AoGATVCfQOwmEMFHg33luMMt
+0lTOHsar6g1O5vz0ZPZ1NjJF9Qe3+T7B4n4gq9pLwfi7Ohoa4CDmt0nKmy56dBha
+5LM8mzw+PaH9a3pP93caS6k/X68TLOp7fwvnzP6HTjtis2sdYzVma6ghEF0zRdQr
+6nWMI6Kx2kFaNdzKSHzxP5A=
+-----END PRIVATE KEY-----
diff --git a/tests/auto/network/ssl/qocsp/certs/infbob.key b/tests/auto/network/ssl/qocsp/certs/infbob.key
new file mode 100644
index 0000000000..7878339151
--- /dev/null
+++ b/tests/auto/network/ssl/qocsp/certs/infbob.key
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDkF2BuPlkQa3Ox
+JxnbQ+gy1mAxaGGzfnmGocraxVSKSssX3zSkeIrWB1kW3diOtIZ1jovYftHGsqoB
+F5k6fN9dr37mFIZnilF6Bq0seYjNUl6I0d7Cf3NJSf7TG5+P+dAyNLN8aXILctY8
+krlSe4ysb++9xgawt2DYL3I0LBd+W27hd2BlfcmB4g2X3zOasjZM8F5HSBxF5e7f
+fVaUmCC8S4jdXUQEbUNFk6HufDwDhP1gMtoGKHusWOdI5O6cQAfUUmRLSfi/jWoe
+KLPafbj7KIcA8+YojOvub2guNpO42h9fc83/gCkkBJhwXNdIQjRUnz6Lu05kDTG9
+X28gbX9TAgMBAAECggEBAN9xCxVUXJmaOb6ciFblIi3TFm6wS62zw0chbgB8eQH0
+nRoonYBVWeSrVBnzf7bkoCe/Wb3fFo+o7KOfQ4spUwOK7SxlhPkfZgu9SJ4d/Obu
+vw8XUTqF8iEkrM6P6/L2DX9xYzcIcSFIARlbvtJPmBJAocHtoRYyvltpt13mp6kt
+/LVYR4qFAWRpPR6rnjlXEjfrE9taHWgIJEjwMj+IcTjnGiS1rX1T/JNhjRxsRJwU
+qxqhYmeenNymyUJxS2B806EcG3UAJu63dK61VXN1dtPhS3FqjeR//GRlmy14n7RW
+ZQAuT9dPB/WzUZVzEcOgTwe/+XsPTSfz7gpaoffgMJECgYEA/43xZRi48Dfp3tdq
+qwwLf6Ya9pB2zb3XE8MUQhxsrygzL5ngZhmr2m0LgGCf5fXa983G6wzA6sOdpvve
+jFAlBZYbWaYnvog9QIFcTj0S6PahGTBaR7PSNzK0UzoHYexYVCkyzQl1O2hktazd
+Cankh/6IlAFkKbUSDqAwc07jNCkCgYEA5H0tNXpcDN6JTgKNe8YHM0GjZB+qGEoL
+7YZbFlANjO9pOPY6JMQ3+DbOoruIH97CIyVYokuH0qRAfjm5LNiVYECFVFZRnGFb
+BNPOPAnPJPISDF66zjW0KLMYCykJAHQ4SpHUPcJ6JnfBr76s/xSbNI9qnhpy3QYI
+ATkqOrP25xsCgYEAy3pjmJGEv5BloM942VSv2yWRFn2UeuELXWrYuIMVbqndh6tH
+50PNeA+XNtK4vktx3Bl2pzTybnrvDkRBwQsXT0lj4Y/Q2X509uWJb6plYiTtxLah
+S7I8UUMIHbR4qFmdQvXCw0sikvjeJ2HKZaVml3ntmZs5+5N3GzolGcrYUXECgYEA
+pPsBnsCoIJ66s7pCIKIfZtI5QT1f20P0EuDVemn5Ls9bwcaAuzV3WGFymKwiISj+
+MtRviFhTTTROYRYa8Be+3A4ad4gQS4M8bmLlYhKPIJUtlQL9jZHXcR/H9578ofhJ
+AQcFIkb/XjFQiC58yX4+hxgbGufsEk2dkAyPwm1ZlQsCgYBTjnraJbYSz1v3MQKx
+fHm9eHki/ODR3lWiCYYnnW3AwRa7AXS4ZiSw78wzkUX2XTJbE6JlEUH4M9DMzr4y
+QBwKmx+3u+Im4WcZ889jo6XrF0X9mXRmY25+gr2ypTbKZjT8FCYcXIgiOxITLXZh
+Bmn7KZcsdaPxSFn05ASEanLNqA==
+-----END PRIVATE KEY-----
diff --git a/tests/auto/network/ssl/qocsp/certs/infbobchain.crt b/tests/auto/network/ssl/qocsp/certs/infbobchain.crt
new file mode 100644
index 0000000000..7ed13c2856
--- /dev/null
+++ b/tests/auto/network/ssl/qocsp/certs/infbobchain.crt
@@ -0,0 +1,49 @@
+-----BEGIN CERTIFICATE-----
+MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQsFADCBjjELMAkGA1UEBhMCTk8x
+DTALBgNVBAgMBE9zbG8xEjAQBgNVBAcMCU9zbG8gQ2l0eTETMBEGA1UECgwKVGhl
+IFF0IENBMTENMAsGA1UECwwEUVRDTjERMA8GA1UEAwwIY2ExcXQuaW8xJTAjBgkq
+hkiG9w0BCQEWFnRpbXVyLnBvY2hlcHRzb3ZAcXQuaW8wHhcNMTgxMTIyMTAyOTM3
+WhcNMjgxMTE5MTAyOTM3WjCBmDELMAkGA1UEBhMCTk8xDTALBgNVBAgMBE9zbG8x
+EjAQBgNVBAcMCU9zbG8gQ2l0eTEkMCIGA1UECgwbVGhlIEluZmFtb3VzIFNuZWFr
+eSBCb2IgTHRkMQwwCgYDVQQLDANCREExEzARBgNVBAMMCmluZmJvYi5jb20xHTAb
+BgkqhkiG9w0BCQEWDmJvYkBpbmZib2IuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEA5Bdgbj5ZEGtzsScZ20PoMtZgMWhhs355hqHK2sVUikrLF980
+pHiK1gdZFt3YjrSGdY6L2H7RxrKqAReZOnzfXa9+5hSGZ4pRegatLHmIzVJeiNHe
+wn9zSUn+0xufj/nQMjSzfGlyC3LWPJK5UnuMrG/vvcYGsLdg2C9yNCwXfltu4Xdg
+ZX3JgeINl98zmrI2TPBeR0gcReXu331WlJggvEuI3V1EBG1DRZOh7nw8A4T9YDLa
+Bih7rFjnSOTunEAH1FJkS0n4v41qHiiz2n24+yiHAPPmKIzr7m9oLjaTuNofX3PN
+/4ApJASYcFzXSEI0VJ8+i7tOZA0xvV9vIG1/UwIDAQABo3sweTAJBgNVHRMEAjAA
+MCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAd
+BgNVHQ4EFgQUloqk6Iihkkcxp85jAzeUPGVmapkwHwYDVR0jBBgwFoAUeBcnAkU7
+sTqm7i2QvTxwgr0nQ0QwDQYJKoZIhvcNAQELBQADggEBAGCdYFNskTzMilRtmw+v
+oJQM3mc6LdYYuADCuh8O/GKaqUnE7V2XnMBYWMN93eeN9VXmK2yAZaQU1J6ruP1S
+pLMzJ8hbQej+sm+XAHVxAtr34KmEC50gIn1cB/sRKxHMombbNl7EK44puFU7q58P
+zBz5lTXXTfA954D/ijEMMSDvIZ25me6vrGPMj1LX/wC6CWadSr9IxAO9HQVQQqwv
+AbbqrCvMSMv633/f1EYU8Q6jhUCTlnin4pXtriOnqi+6MZICaYRCUgV224Rs3OUS
+jmrbOeoaZUpmOVmuoYXWeexe229G2KGiEIgnSBEk5OLFHCeZ8++WJ5/SLHt8MBLc
+O0w=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIID9DCCAtygAwIBAgIJAMQbE3657KDYMA0GCSqGSIb3DQEBCwUAMIGOMQswCQYD
+VQQGEwJOTzENMAsGA1UECAwET3NsbzESMBAGA1UEBwwJT3NsbyBDaXR5MRMwEQYD
+VQQKDApUaGUgUXQgQ0ExMQ0wCwYDVQQLDARRVENOMREwDwYDVQQDDAhjYTFxdC5p
+bzElMCMGCSqGSIb3DQEJARYWdGltdXIucG9jaGVwdHNvdkBxdC5pbzAeFw0xODEx
+MjIxMDIxMTNaFw0yODExMTkxMDIxMTNaMIGOMQswCQYDVQQGEwJOTzENMAsGA1UE
+CAwET3NsbzESMBAGA1UEBwwJT3NsbyBDaXR5MRMwEQYDVQQKDApUaGUgUXQgQ0Ex
+MQ0wCwYDVQQLDARRVENOMREwDwYDVQQDDAhjYTFxdC5pbzElMCMGCSqGSIb3DQEJ
+ARYWdGltdXIucG9jaGVwdHNvdkBxdC5pbzCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBAOCs3AV7sDKHJUJcm7a0OqnShIvoB1qv6UcOmlBmUzGl5GzX90Jz
+7jYJoOPjxjNyRxMOsOReB1ZcSuIAjkdAEfFMaVe6j7qKTJ5ycTVY/fVoxyxsSNuI
+xOJ6RCEjLHcxONEbkN/xI8LMdVko3m4P10r5GxwrgyPvpa87Yq5+XJ1BPWJyKbD7
+Tqpn3dvZUj0/POsMUTT7Q7VXOfDlZj58XWAC6ECTqJauhGFMhiwgqOn2Qo1W0QjV
+DkGqRTdgIAM6Rv2cSRxgnflwW5QZ8kWUV81h/yx4cck/D9TcVxjr3Pvy6aJ/U41u
+d4XJQgwCj4LJi4msw1S0CvZWmz+2BKxcbRsCAwEAAaNTMFEwHQYDVR0OBBYEFHgX
+JwJFO7E6pu4tkL08cIK9J0NEMB8GA1UdIwQYMBaAFHgXJwJFO7E6pu4tkL08cIK9
+J0NEMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBADp1kqDRcyVG
+BdMge+Il10IjbpzzSjAoZiqiw69V99LiHW9ePbxG4AmliE6Za60GE5PCXOLjJh/5
+efgnIbybbyIOIT9iK4TXWLw2XW+rMY51c0RAxp2h/sc+5CZ0F0I811F5VUHXg2qR
+U7C2zbzqAimN8TBm6FRe7NFQfqLCrsuFJjSc3obrqKQcpvRwxMk6NpkdoemzqLmY
+lrBrTaeVbZ4ix3srVPvXRm9TdiC+JuuFmvulMfe+/wwnhb+dwT3JUC+EIq/Uf5Wb
+g8lvB4ntitL8NLQ2hFGqYuoFNIGs6tRN71ohk+/ONqe9wJhcI9QAruPOvsg+8J0H
+uGooX7PUNHg=
+-----END CERTIFICATE-----
diff --git a/tests/auto/network/ssl/qocsp/certs/ss1-private.key b/tests/auto/network/ssl/qocsp/certs/ss1-private.key
new file mode 100644
index 0000000000..1c42daaf9f
--- /dev/null
+++ b/tests/auto/network/ssl/qocsp/certs/ss1-private.key
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC4bXcfIjweShLx
+6jBTKu/i5sXmlwTH9Z4PTzQ1VteKyEIDlnW5ocVWqRgBrvz3NlTFkDKkQXshkXyE
+JyVZFbAPCfGsroZVISpFhUmJbPMBNn3SyGEU+sxWIpOZOKmG5tel6B4Bt5TWsRHL
+mtU8Pv/APsz+i9JhgE25ksGhx16MqvdRv/xNGleF8qe+hDOeiNF3/lNv2hYb/MvD
+1F73FBoDVnqty/VXXOJFb7elLE4ArXsTN/hip42Lbl1guYvnqnTZFhCHwMzRu4qc
+3FTlemumfJpacpRnqVw2TURA5SdpTp9NYIxygEGNY201meNEjAEyg8GeFkAgu99R
+LPQT+rTNAgMBAAECggEAPQEIfCXo2OQLrDWY0onLW7SWFZYyoKngJJRAYrxdA60G
+GQW13zdhfS7ln/jv+B3ioI74EVkPj6T+GQCR3AvOdssFQ+dey93yi5hxIKIHJ4mM
+ySI66qOi34MEa5RQjyzgfCJxeoPtGa7sgfqvOgRkuISNbk11w4abLx0aK5c08TY0
+JdeoWWhATaFZXl782Aw2FwGPTwOIf7GB09BJS3qUqlMT9fowLmWO10jOKkNtvcnT
+2mAqT5cdZG1ffT5+f0JETPCbBPhhyE7VyYEVQfqTkRnEoz3hcZvjx91jD527+CSL
+Qhg7zZu2oakyJQvpHETZ6cgrs7uDEiol7ARANezwyQKBgQDmapxV/qIOd5WFDVXw
+lGt+dsELBBdMhvzr4A9eZdIZiXu48rdFG0XoECo5BKpXa1+ISr2od0U0YODrJrws
+OHxHhlxGjJFs8kFteUPHyEZv6/rvkbA+xc0Uw04NnDRHBLK8VvX7MBWfvTqLN4bK
+sZsMblscRBtEpFpN1fiJgnNASwKBgQDM56lBugtueBV9M4C/JF2is96d14ue3Y4i
+SgMnHY18D3ru+KDuxPYoIs5Yos2vDWK2k8754WZ+WNXokjRoYPiFbeBPpI9NudJs
+BUJz/sLJHjs3a4HrQs3hCuufczNxq9wQnALQHCMEqeBUTYCu/1+zYgwAu3Z/R8rJ
+jKgexl+gRwKBgGrLCNCWpze7VzKGvsk1kSjZE5nueHoAqqMMgzMGUD2DyjMrU6QV
+Au6O53Lr5aOE4Y9CzOqS9SFUsYprtpVsTLW94XDVX+W11ntN1At5mKPxJKn6xUwi
+022HI9sNBfHQjKLcTz/vxmX2B3dU8gVqEenOEC5mppjG8A/ZV0ssigxHAoGAfGsG
+OSSwoElGMxm8yVNZj9vMBufEnZhGH8f1FiE5seTsboKFpbXvCfvoc6WXYv2rvNUP
+TmdxBrMGYAu2ytJm1Q4cr/9qDHYSsQiYizpcKCa1KjebUbDktgsde1pGGHWUUHmK
+s7cCBGjqEAZnZtslzxRv2Vn639pF5hAEXXtywS0CgYAUIjhp43qgtbQdZMX7xbVR
+lT26aq7NguCtt7njpgkhqc0HThb3I8ImrhNSDcS0/T9dPU70vt0ceruyRXmwX5hA
+l28i5GzF5ufaRQdcsSR9u+P67nD5sTZBesbejXFySis5EC/97A4XZvkSfY4DQSZ+
+u8JJPZUlb2kGAHRpmxvpDA==
+-----END PRIVATE KEY-----
diff --git a/tests/auto/network/ssl/qocsp/certs/ss1.crt b/tests/auto/network/ssl/qocsp/certs/ss1.crt
new file mode 100644
index 0000000000..43ca8316c2
--- /dev/null
+++ b/tests/auto/network/ssl/qocsp/certs/ss1.crt
@@ -0,0 +1,25 @@
+-----BEGIN CERTIFICATE-----
+MIIEKzCCAxOgAwIBAgIJAOO/b5uLSmT8MA0GCSqGSIb3DQEBBQUAMIGqMQswCQYD
+VQQGEwJOTzENMAsGA1UECAwET3NsbzENMAsGA1UEBwwET3NsbzESMBAGA1UECgwJ
+VGhlIFF0IENBMScwJQYDVQQLDB5SJkQgKGZha2UgY2VydGlmaWNhdGVzIGlzc3Vl
+cikxGTAXBgNVBAMMEFRpbXVyIFBvY2hlcHRzb3YxJTAjBgkqhkiG9w0BCQEWFnRp
+bXVyLnBvY2hlcHRzb3ZAcXQuaW8wIBcNMTgxMTE3MDUxNDA1WhgPMjExODEwMjQw
+NTE0MDVaMIGqMQswCQYDVQQGEwJOTzENMAsGA1UECAwET3NsbzENMAsGA1UEBwwE
+T3NsbzESMBAGA1UECgwJVGhlIFF0IENBMScwJQYDVQQLDB5SJkQgKGZha2UgY2Vy
+dGlmaWNhdGVzIGlzc3VlcikxGTAXBgNVBAMMEFRpbXVyIFBvY2hlcHRzb3YxJTAj
+BgkqhkiG9w0BCQEWFnRpbXVyLnBvY2hlcHRzb3ZAcXQuaW8wggEiMA0GCSqGSIb3
+DQEBAQUAA4IBDwAwggEKAoIBAQC4bXcfIjweShLx6jBTKu/i5sXmlwTH9Z4PTzQ1
+VteKyEIDlnW5ocVWqRgBrvz3NlTFkDKkQXshkXyEJyVZFbAPCfGsroZVISpFhUmJ
+bPMBNn3SyGEU+sxWIpOZOKmG5tel6B4Bt5TWsRHLmtU8Pv/APsz+i9JhgE25ksGh
+x16MqvdRv/xNGleF8qe+hDOeiNF3/lNv2hYb/MvD1F73FBoDVnqty/VXXOJFb7el
+LE4ArXsTN/hip42Lbl1guYvnqnTZFhCHwMzRu4qc3FTlemumfJpacpRnqVw2TURA
+5SdpTp9NYIxygEGNY201meNEjAEyg8GeFkAgu99RLPQT+rTNAgMBAAGjUDBOMB0G
+A1UdDgQWBBSyHPlJr6BrpwMY7Sxg2R3CpQR7UzAfBgNVHSMEGDAWgBSyHPlJr6Br
+pwMY7Sxg2R3CpQR7UzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQBD
+o86xp1WwvX6mYzF94ifZlkq1aDN6/njj2B9fvJCtygfqq6b9BrQJ0hNeqRh8OaIh
+v2YmjbdUaoYguHmUxL+SeS67Sp8QBoSwdU5x0i8ygrigBrbb3myNqN6hGvpGy9E0
+B8PnVDt9DaOCunaMyGNPMLNPVGYULmberGtxV9wilcH4Q6WZrk9IhuyfqeBZtBYM
+IcjV3OKdUv/ggu2IZSN7njKcgr+uyPt0Ymo9GozJSTdnN/E4hsRgzcgzCMf2fxzj
+nGcsDRQ4L1R8p1zDlduxmmk42zGCGz3duFX7dijAxJWirS8Zsea4aooLgDQYT/zI
+8hKd3KC3knLhPcxFKiUg
+-----END CERTIFICATE-----
diff --git a/tests/auto/network/ssl/qocsp/qocsp.pro b/tests/auto/network/ssl/qocsp/qocsp.pro
new file mode 100644
index 0000000000..f4e846f39b
--- /dev/null
+++ b/tests/auto/network/ssl/qocsp/qocsp.pro
@@ -0,0 +1,15 @@
+CONFIG += testcase
+
+SOURCES += tst_qocsp.cpp
+QT = core network network-private testlib
+
+TARGET = tst_qocsp
+
+win32 {
+ CONFIG(debug, debug|release) {
+ DESTDIR = debug
+ } else {
+ DESTDIR = release
+ }
+}
+
diff --git a/tests/auto/network/ssl/qocsp/tst_qocsp.cpp b/tests/auto/network/ssl/qocsp/tst_qocsp.cpp
new file mode 100644
index 0000000000..9716c04bbb
--- /dev/null
+++ b/tests/auto/network/ssl/qocsp/tst_qocsp.cpp
@@ -0,0 +1,823 @@
+/****************************************************************************
+ **
+ ** Copyright (C) 2018 The Qt Company Ltd.
+ ** Contact: https://www.qt.io/licensing/
+ **
+ ** This file is part of the test suite of the Qt Toolkit.
+ **
+ ** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+ ** Commercial License Usage
+ ** Licensees holding valid commercial Qt licenses may use this file in
+ ** accordance with the commercial license agreement provided with the
+ ** Software or, alternatively, in accordance with the terms contained in
+ ** a written agreement between you and The Qt Company. For licensing terms
+ ** and conditions see https://www.qt.io/terms-conditions. For further
+ ** information use the contact form at https://www.qt.io/contact-us.
+ **
+ ** GNU General Public License Usage
+ ** Alternatively, this file may be used under the terms of the GNU
+ ** General Public License version 3 as published by the Free Software
+ ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+ ** included in the packaging of this file. Please review the following
+ ** information to ensure the GNU General Public License requirements will
+ ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+ **
+ ** $QT_END_LICENSE$
+ **
+ ****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <QtNetwork/private/qtnetworkglobal_p.h>
+
+#include <QtNetwork/private/qsslsocket_openssl_symbols_p.h>
+#include <QtNetwork/private/qsslsocket_openssl_p.h>
+
+#include <QtNetwork/qsslcertificate.h>
+#include <QtNetwork/qtcpserver.h>
+#include <QtNetwork/qsslerror.h>
+#include <QtNetwork/qsslkey.h>
+#include <QtNetwork/qssl.h>
+
+#include <QtCore/qsharedpointer.h>
+#include <QtCore/qbytearray.h>
+#include <QtCore/qfileinfo.h>
+#include <QtCore/qstring.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qlist.h>
+#include <QtCore/qdir.h>
+
+#include <openssl/ocsp.h>
+
+#include <algorithm>
+#include <utility>
+
+// NOTE: the word 'subject' in the code below means the subject of a status request,
+// so in general it's our peer's certificate we are asking about.
+
+using SslError = QT_PREPEND_NAMESPACE(QSslError);
+using VectorOfErrors = QT_PREPEND_NAMESPACE(QVector<SslError>);
+using Latin1String = QT_PREPEND_NAMESPACE(QLatin1String);
+
+Q_DECLARE_METATYPE(SslError)
+Q_DECLARE_METATYPE(VectorOfErrors)
+Q_DECLARE_METATYPE(Latin1String)
+
+QT_BEGIN_NAMESPACE
+
+namespace {
+
+using OcspResponse = QSharedPointer<OCSP_RESPONSE>;
+using BasicResponse = QSharedPointer<OCSP_BASICRESP>;
+using SingleResponse = QSharedPointer<OCSP_SINGLERESP>;
+using CertId = QSharedPointer<OCSP_CERTID>;
+using EvpKey = QSharedPointer<EVP_PKEY>;
+using Asn1Time = QSharedPointer<ASN1_TIME>;
+using CertificateChain = QList<QSslCertificate>;
+
+using NativeX509Ptr = X509 *;
+
+class X509Stack {
+public:
+ explicit X509Stack(const QList<QSslCertificate> &chain);
+
+ ~X509Stack();
+
+ int size() const;
+ X509 *operator[](int index) const;
+ operator STACK_OF(X509) *() const;
+
+private:
+ OPENSSL_STACK *stack = nullptr;
+
+ Q_DISABLE_COPY(X509Stack)
+};
+
+X509Stack::X509Stack(const QList<QSslCertificate> &chain)
+{
+ if (!chain.size())
+ return;
+
+ stack = q_OPENSSL_sk_new_null();
+ if (!stack)
+ return;
+
+ for (const QSslCertificate &cert : chain) {
+ X509 *nativeCert = NativeX509Ptr(cert.handle());
+ if (!nativeCert)
+ continue;
+ q_OPENSSL_sk_push(stack, nativeCert);
+ q_X509_up_ref(nativeCert);
+ }
+}
+
+X509Stack::~X509Stack()
+{
+ if (stack)
+ q_OPENSSL_sk_pop_free(stack, reinterpret_cast<void(*)(void*)>(q_X509_free));
+}
+
+int X509Stack::size() const
+{
+ if (stack)
+ return q_OPENSSL_sk_num(stack);
+ return 0;
+}
+
+X509 *X509Stack::operator[](int index) const
+{
+ return NativeX509Ptr(q_OPENSSL_sk_value(stack, index));
+}
+
+X509Stack::operator STACK_OF(X509) *() const
+{
+ return reinterpret_cast<STACK_OF(X509)*>(stack);
+}
+
+struct OcspTimeStamp
+{
+ OcspTimeStamp() = default;
+ OcspTimeStamp(long secondsBeforeNow, long secondsAfterNow);
+
+ static Asn1Time timeToAsn1Time(long adjustment);
+
+ Asn1Time thisUpdate;
+ Asn1Time nextUpdate;
+};
+
+OcspTimeStamp::OcspTimeStamp(long secondsBeforeNow, long secondsAfterNow)
+{
+ Asn1Time start = timeToAsn1Time(secondsBeforeNow);
+ Asn1Time end = timeToAsn1Time(secondsAfterNow);
+ if (start.data() && end.data()) {
+ thisUpdate.swap(start);
+ nextUpdate.swap(end);
+ }
+}
+
+Asn1Time OcspTimeStamp::timeToAsn1Time(long adjustment)
+{
+ if (ASN1_TIME *adjusted = q_X509_gmtime_adj(nullptr, adjustment))
+ return Asn1Time(adjusted, q_ASN1_TIME_free);
+ return Asn1Time{};
+}
+
+struct OcspResponder
+{
+ OcspResponder(const OcspTimeStamp &stamp, const CertificateChain &subjs,
+ const CertificateChain &respChain, const QSslKey &respPKey);
+
+ QByteArray buildResponse(int responseStatus, int certificateStatus) const;
+ static EvpKey privateKeyToEVP_PKEY(const QSslKey &privateKey);
+ static CertId certificateToCertId(X509 *subject, X509 *issuer);
+ static QByteArray responseToDer(OCSP_RESPONSE *response);
+
+ OcspTimeStamp timeStamp;
+ // Plural, we can send a 'wrong' BasicResponse containing more than
+ // 1 SingleResponse.
+ X509Stack subjects;
+ X509Stack responderChain;
+ QSslKey responderKey;
+};
+
+OcspResponder::OcspResponder(const OcspTimeStamp &stamp, const CertificateChain &subjs,
+ const CertificateChain &respChain, const QSslKey &respPKey)
+ : timeStamp(stamp),
+ subjects(subjs),
+ responderChain(respChain),
+ responderKey(respPKey)
+{
+}
+
+QByteArray OcspResponder::buildResponse(int responseStatus, int certificateStatus) const
+{
+ if (responseStatus != OCSP_RESPONSE_STATUS_SUCCESSFUL) {
+ OCSP_RESPONSE *response = q_OCSP_response_create(responseStatus, nullptr);
+ if (!response)
+ return {};
+ const OcspResponse rGuard(response, q_OCSP_RESPONSE_free);
+ return responseToDer(response);
+ }
+
+ Q_ASSERT(subjects.size() && responderChain.size() && responderKey.handle());
+
+ const EvpKey nativeKey = privateKeyToEVP_PKEY(responderKey);
+ if (!nativeKey.data())
+ return {};
+
+ OCSP_BASICRESP *basicResponse = q_OCSP_BASICRESP_new();
+ if (!basicResponse)
+ return {};
+ const BasicResponse brGuard(basicResponse, q_OCSP_BASICRESP_free);
+
+ for (int i = 0, e = subjects.size(); i < e; ++i) {
+ X509 *subject = subjects[i];
+ Q_ASSERT(subject);
+ CertId certId = certificateToCertId(subject, responderChain[0]);
+ if (!certId.data())
+ return {};
+
+ // NOTE: we do not own this 'singleResponse':
+ ASN1_TIME *revisionTime = certificateStatus == V_OCSP_CERTSTATUS_REVOKED ?
+ timeStamp.thisUpdate.data() : nullptr;
+
+ if (!q_OCSP_basic_add1_status(basicResponse, certId.data(), certificateStatus, 0, revisionTime,
+ timeStamp.thisUpdate.data(), timeStamp.nextUpdate.data())) {
+ return {};
+ }
+ }
+
+ if (q_OCSP_basic_sign(basicResponse, responderChain[0], nativeKey.data(), q_EVP_sha1(),
+ responderChain, 0) != 1) {
+ return {};
+ }
+
+ OCSP_RESPONSE *ocspResponse = q_OCSP_response_create(OCSP_RESPONSE_STATUS_SUCCESSFUL, basicResponse);
+ if (!ocspResponse)
+ return {};
+ const OcspResponse rGuard(ocspResponse, q_OCSP_RESPONSE_free);
+ return responseToDer(ocspResponse);
+}
+
+EvpKey OcspResponder::privateKeyToEVP_PKEY(const QSslKey &privateKey)
+{
+ const EvpKey nullKey;
+ if (privateKey.isNull() || privateKey.algorithm() != QSsl::Rsa) {
+ // We use only RSA keys in this auto-test, since we test OCSP only,
+ // not handshake/TLS in general.
+ return nullKey;
+ }
+
+ EVP_PKEY *nativeKey = q_EVP_PKEY_new();
+ if (!nativeKey)
+ return nullKey;
+
+ const EvpKey keyGuard(nativeKey, q_EVP_PKEY_free);
+ if (!q_EVP_PKEY_set1_RSA(nativeKey, reinterpret_cast<RSA *>(privateKey.handle())))
+ return nullKey;
+
+ return keyGuard;
+}
+
+CertId OcspResponder::certificateToCertId(X509 *subject, X509 *issuer)
+{
+ const CertId nullId;
+ if (!subject || !issuer)
+ return nullId;
+
+ const EVP_MD *digest = q_EVP_sha1();
+ if (!digest)
+ return nullId;
+
+ OCSP_CERTID *certId = q_OCSP_cert_to_id(digest, subject, issuer);
+ if (!certId)
+ return nullId;
+
+ return CertId(certId, q_OCSP_CERTID_free);
+}
+
+QByteArray OcspResponder::responseToDer(OCSP_RESPONSE *response)
+{
+ if (!response)
+ return {};
+
+ const int derSize = q_i2d_OCSP_RESPONSE(response, nullptr);
+ if (derSize <= 0)
+ return {};
+
+ QByteArray derData(derSize, Qt::Uninitialized);
+ unsigned char *pData = reinterpret_cast<unsigned char *>(derData.data());
+ const int serializedSize = q_i2d_OCSP_RESPONSE(response, &pData);
+ if (serializedSize != derSize)
+ return {};
+
+ return derData;
+}
+
+// The QTcpServer capable of sending OCSP status responses.
+class OcspServer : public QTcpServer
+{
+ Q_OBJECT
+
+public:
+ OcspServer(const CertificateChain &serverChain, const QSslKey &privateKey);
+
+ void configureResponse(const QByteArray &responseDer);
+ QString hostName() const;
+ QString peerVerifyName() const;
+
+Q_SIGNALS:
+ void internalServerError();
+
+private:
+ void incomingConnection(qintptr descriptor) override;
+
+public:
+ QSslConfiguration serverConfig;
+ QSslSocket serverSocket;
+};
+
+OcspServer::OcspServer(const CertificateChain &serverChain, const QSslKey &privateKey)
+{
+ Q_ASSERT(serverChain.size());
+ Q_ASSERT(!privateKey.isNull());
+
+ serverConfig = QSslConfiguration::defaultConfiguration();
+ serverConfig.setLocalCertificateChain(serverChain);
+ serverConfig.setPrivateKey(privateKey);
+}
+
+void OcspServer::configureResponse(const QByteArray &responseDer)
+{
+ serverConfig.setBackendConfigurationOption("Qt-OCSP-response", responseDer);
+}
+
+QString OcspServer::hostName() const
+{
+ // It's 'name' and not 'address' to be consistent with QSslSocket's naming style,
+ // where it's connectToHostEncrypted(hostName, ...)
+ const QHostAddress &addr = serverAddress();
+ if (addr == QHostAddress::Any || addr == QHostAddress::AnyIPv4)
+ return QStringLiteral("127.0.0.1");
+ if (addr == QHostAddress::AnyIPv6)
+ return QStringLiteral("::1");
+ return addr.toString();
+}
+
+QString OcspServer::peerVerifyName() const
+{
+ const CertificateChain &localChain = serverConfig.localCertificateChain();
+ if (localChain.isEmpty())
+ return {};
+ const auto cert = localChain.first();
+ if (cert.isNull())
+ return {};
+
+ const QStringList &names = cert.subjectInfo(QSslCertificate::CommonName);
+ return names.isEmpty() ? QString{} : names.first();
+}
+
+void OcspServer::incomingConnection(qintptr socketDescriptor)
+{
+ close();
+
+ if (!serverSocket.setSocketDescriptor(socketDescriptor)) {
+ emit internalServerError();
+ return;
+ }
+
+ serverSocket.setSslConfiguration(serverConfig);
+ // Since we test a client, not a server, we don't care about any
+ // possible errors on the server (QAbstractSocket or QSslSocket-related).
+ // Thus, we don't connect to any error signal.
+ serverSocket.startServerEncryption();
+}
+
+} // unnamed namespace
+
+class tst_QOcsp : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void initTestCase();
+
+private slots:
+ void connectSelfSigned();
+ void badStatus_data();
+ void badStatus();
+ void multipleSingleResponses();
+ void malformedResponse();
+ void expiredResponse_data();
+ void expiredResponse();
+ void noNextUpdate();
+ void wrongCertificateInResponse_data();
+ void wrongCertificateInResponse();
+ void untrustedResponder();
+
+ // OCSPTODO: more tests in future ...
+
+private:
+ void setupOcspClient(QSslSocket &clientSocket, const CertificateChain &trustedCAs,
+ const QString &peerName);
+ bool containsOcspErrors(const QList<QSslError> &errorsFound) const;
+ static bool containsError(const QList<QSslError> &errors, QSslError::SslError code);
+ static QByteArray goodResponse(const CertificateChain &subject, const CertificateChain &responder,
+ const QSslKey &privateKey, long beforeNow = -1000, long afterNow = 1000);
+ static bool loadPrivateKey(const QString &keyName, QSslKey &key);
+ static CertificateChain issuerToChain(const CertificateChain &chain);
+ static CertificateChain subjectToChain(const CertificateChain &chain);
+
+ static QString certDirPath;
+
+ void (QSslSocket::*socketErrorSignal)(QAbstractSocket::SocketError) = &QAbstractSocket::error;
+ void (QSslSocket::*tlsErrorsSignal)(const QList<QSslError> &) = &QSslSocket::sslErrors;
+ void (QTestEventLoop::*exitLoopSlot)() = &QTestEventLoop::exitLoop;
+
+ const int handshakeTimeoutMS = 500;
+ QTestEventLoop loop;
+
+ std::vector<QSslError::SslError> ocspErrorCodes = {QSslError::OcspNoResponseFound,
+ QSslError::OcspMalformedRequest,
+ QSslError::OcspMalformedResponse,
+ QSslError::OcspInternalError,
+ QSslError::OcspTryLater,
+ QSslError::OcspSigRequred,
+ QSslError::OcspUnauthorized,
+ QSslError::OcspResponseCannotBeTrusted,
+ QSslError::OcspResponseCertIdUnknown,
+ QSslError::OcspResponseExpired,
+ QSslError::OcspStatusUnknown};
+};
+
+#define QCOMPARE_SINGLE_ERROR(sslSocket, expectedError) \
+ const auto &tlsErrors = sslSocket.sslErrors(); \
+ QCOMPARE(tlsErrors.size(), 1); \
+ QCOMPARE(tlsErrors[0].error(), expectedError)
+
+#define QVERIFY_HANDSHAKE_WITHOUT_ERRORS(sslSocket) \
+ QVERIFY(sslSocket.isEncrypted()); \
+ QCOMPARE(sslSocket.state(), QAbstractSocket::ConnectedState); \
+ QVERIFY(sslSocket.sslErrors().isEmpty())
+
+#define QDECLARE_CHAIN(object, chainFileName) \
+ CertificateChain object = QSslCertificate::fromPath(certDirPath + QLatin1String(chainFileName)); \
+ QVERIFY(object.size())
+
+#define QDECLARE_PRIVATE_KEY(key, keyFileName) \
+ QSslKey key; \
+ QVERIFY(loadPrivateKey(QLatin1String(keyFileName), key))
+
+QString tst_QOcsp::certDirPath;
+
+void tst_QOcsp::initTestCase()
+{
+ QVERIFY(QSslSocket::supportsSsl());
+
+ certDirPath = QFileInfo(QFINDTESTDATA("certs")).absolutePath();
+ QVERIFY(certDirPath.size() > 0);
+ certDirPath += QDir::separator() + QStringLiteral("certs") + QDir::separator();
+}
+
+void tst_QOcsp::connectSelfSigned()
+{
+ // This test may look a bit confusing, since we have essentially 1
+ // self-signed certificate, which we trust for the purpose of this test,
+ // but we also request its (the certificate's) status and then we sign
+ // the status response using the same certificate and the corresponding
+ // private key. Anyway, we test the very basic things here: we send
+ // an OCSP status request, we verify the response (if server has sent it),
+ // and detect errors (if any).
+ QDECLARE_CHAIN(subjectChain, "ss1.crt");
+ QDECLARE_CHAIN(responderChain, "ss1.crt");
+ QDECLARE_PRIVATE_KEY(privateKey, "ss1-private.key");
+ {
+ // This server ignores our status request:
+ const QSslError::SslError expectedError = QSslError::OcspNoResponseFound;
+
+ OcspServer server(subjectChain, privateKey);
+ QVERIFY(server.listen());
+ connect(&server, &OcspServer::internalServerError, &loop, exitLoopSlot);
+
+ QSslSocket clientSocket;
+ QSslConfiguration clientConfig = QSslConfiguration::defaultConfiguration();
+ auto roots = clientConfig.caCertificates();
+ setupOcspClient(clientSocket, issuerToChain(subjectChain), server.peerVerifyName());
+ clientSocket.connectToHostEncrypted(server.hostName(), server.serverPort());
+ loop.enterLoopMSecs(handshakeTimeoutMS);
+
+ QVERIFY(!clientSocket.isEncrypted());
+ QCOMPARE_SINGLE_ERROR(clientSocket, expectedError);
+ }
+ {
+ // Now the server will send a valid 'status: good' response.
+ OcspServer server(subjectChain, privateKey);
+ const QByteArray response(goodResponse(subjectChain, responderChain, privateKey));
+ QVERIFY(response.size());
+ server.configureResponse(response);
+ QVERIFY(server.listen());
+
+ QSslSocket clientSocket;
+ setupOcspClient(clientSocket, issuerToChain(subjectChain), server.peerVerifyName());
+ clientSocket.connectToHostEncrypted(server.hostName(), server.serverPort());
+ loop.enterLoopMSecs(handshakeTimeoutMS);
+
+ QVERIFY_HANDSHAKE_WITHOUT_ERRORS(clientSocket);
+ }
+}
+
+void tst_QOcsp::badStatus_data()
+{
+ QTest::addColumn<int>("responseStatus");
+ QTest::addColumn<int>("certificateStatus");
+ QTest::addColumn<QSslError>("expectedError");
+
+ QTest::addRow("malformed-request") << OCSP_RESPONSE_STATUS_MALFORMEDREQUEST << 1 << QSslError(QSslError::OcspMalformedRequest);
+ QTest::addRow("internal-error") << OCSP_RESPONSE_STATUS_INTERNALERROR << 2 << QSslError(QSslError::OcspInternalError);
+ QTest::addRow("try-later") << OCSP_RESPONSE_STATUS_TRYLATER << 3 << QSslError(QSslError::OcspTryLater);
+ QTest::addRow("signed-request-require") << OCSP_RESPONSE_STATUS_SIGREQUIRED << 2 << QSslError(QSslError::OcspSigRequred);
+ QTest::addRow("unauthorized-request") << OCSP_RESPONSE_STATUS_UNAUTHORIZED << 1 <<QSslError(QSslError::OcspUnauthorized);
+
+ QTest::addRow("certificate-revoked") << OCSP_RESPONSE_STATUS_SUCCESSFUL << V_OCSP_CERTSTATUS_REVOKED
+ << QSslError(QSslError::CertificateRevoked);
+ QTest::addRow("status-unknown") << OCSP_RESPONSE_STATUS_SUCCESSFUL << V_OCSP_CERTSTATUS_UNKNOWN
+ << QSslError(QSslError::OcspStatusUnknown);
+}
+
+void tst_QOcsp::badStatus()
+{
+ // This test works with two types of 'bad' responses:
+ // 1. 'Error messages' (the response's status is anything but SUCCESSFUL,
+ // no information about the certificate itself, no signature);
+ // 2. 'REVOKED' or 'UNKNOWN' status for a certificate in question.
+ QFETCH(const int, responseStatus);
+ QFETCH(const int, certificateStatus);
+ QFETCH(const QSslError, expectedError);
+
+ QDECLARE_CHAIN(subjectChain, "infbobchain.crt");
+ QCOMPARE(subjectChain.size(), 2);
+ QDECLARE_CHAIN(responderChain, "ca1.crt");
+ QDECLARE_PRIVATE_KEY(subjPrivateKey, "infbob.key");
+ QDECLARE_PRIVATE_KEY(respPrivateKey, "ca1.key");
+
+ OcspServer server(subjectChain, subjPrivateKey);
+ const OcspTimeStamp stamp(-1000, 1000);
+ OcspResponder builder(stamp, subjectToChain(subjectChain), responderChain, respPrivateKey);
+ const QByteArray response(builder.buildResponse(responseStatus, certificateStatus));
+ QVERIFY(response.size());
+ server.configureResponse(response);
+ QVERIFY(server.listen());
+ connect(&server, &OcspServer::internalServerError, &loop, exitLoopSlot);
+
+ QSslSocket clientSocket;
+ setupOcspClient(clientSocket, issuerToChain(subjectChain), server.peerVerifyName());
+ clientSocket.connectToHostEncrypted(server.hostName(), server.serverPort());
+ loop.enterLoopMSecs(handshakeTimeoutMS);
+
+ QVERIFY(!clientSocket.isEncrypted());
+ QCOMPARE_SINGLE_ERROR(clientSocket, expectedError.error());
+}
+
+void tst_QOcsp::multipleSingleResponses()
+{
+ // We handle a response with more than one SingleResponse as malformed:
+ const QSslError::SslError expectedError = QSslError::OcspMalformedResponse;
+
+ // Here we use subjectChain only to generate a response, the server
+ // is configured with the responder chain (it's the same cert after all).
+ QDECLARE_CHAIN(subjectChain, "ss1.crt");
+ QDECLARE_CHAIN(responderChain, "ss1.crt");
+ QDECLARE_PRIVATE_KEY(privateKey, "ss1-private.key");
+
+ // Let's have more than 1 certificate in a chain:
+ subjectChain.append(subjectChain[0]);
+
+ OcspServer server(responderChain, privateKey);
+ // Generate a BasicOCSPResponse containing 2 SingleResponses:
+ const QByteArray response(goodResponse(subjectChain, responderChain, privateKey));
+ QVERIFY(response.size());
+ server.configureResponse(response);
+ QVERIFY(server.listen());
+ connect(&server, &OcspServer::internalServerError, &loop, exitLoopSlot);
+
+ QSslSocket clientSocket;
+ setupOcspClient(clientSocket, issuerToChain(responderChain), server.peerVerifyName());
+ clientSocket.connectToHostEncrypted(server.hostName(), server.serverPort());
+ loop.enterLoopMSecs(handshakeTimeoutMS);
+
+ QVERIFY(!clientSocket.isEncrypted());
+ QCOMPARE_SINGLE_ERROR(clientSocket, expectedError);
+}
+
+void tst_QOcsp::malformedResponse()
+{
+ QDECLARE_CHAIN(serverChain, "ss1.crt");
+ QDECLARE_PRIVATE_KEY(privateKey, "ss1-private.key");
+
+ OcspServer server(serverChain, privateKey);
+ // Let's send some arbitrary bytes instead of DER and see what happens next:
+ server.configureResponse("Sure, you can trust me, this cert was not revoked (I don't say it was issued at all)!");
+ QVERIFY(server.listen());
+ connect(&server, &OcspServer::internalServerError, &loop, exitLoopSlot);
+
+ QSslSocket clientSocket;
+ setupOcspClient(clientSocket, issuerToChain(serverChain), server.peerVerifyName());
+ clientSocket.connectToHostEncrypted(server.hostName(), server.serverPort());
+ loop.enterLoopMSecs(handshakeTimeoutMS);
+
+ QVERIFY(!clientSocket.isEncrypted());
+ QCOMPARE(clientSocket.error(), QAbstractSocket::SslHandshakeFailedError);
+}
+
+void tst_QOcsp::expiredResponse_data()
+{
+ QTest::addColumn<long>("beforeNow");
+ QTest::addColumn<long>("afterNow");
+
+ QTest::addRow("expired") << -2000L << -1000L;
+ QTest::addRow("not-valid-yet") << 5000L << 10000L;
+ QTest::addRow("next-before-this") << -1000L << -2000L;
+}
+
+void tst_QOcsp::expiredResponse()
+{
+ // We report different kinds of problems with [thisUpdate, nextUpdate]
+ // as 'expired' (to keep it simple):
+ const QSslError::SslError expectedError = QSslError::OcspResponseExpired;
+
+ QFETCH(const long, beforeNow);
+ QFETCH(const long, afterNow);
+
+ QDECLARE_CHAIN(subjectChain, "ss1.crt");
+ QDECLARE_CHAIN(responderChain, "ss1.crt");
+ QDECLARE_PRIVATE_KEY(privateKey, "ss1-private.key");
+
+ OcspServer server(subjectChain, privateKey);
+ const QByteArray response(goodResponse(subjectChain, responderChain, privateKey, beforeNow, afterNow));
+ QVERIFY(response.size());
+ server.configureResponse(response);
+ QVERIFY(server.listen());
+ connect(&server, &OcspServer::internalServerError, &loop, exitLoopSlot);
+
+ QSslSocket clientSocket;
+ setupOcspClient(clientSocket, issuerToChain(subjectChain), server.peerVerifyName());
+ clientSocket.connectToHostEncrypted(server.hostName(), server.serverPort());
+ loop.enterLoopMSecs(handshakeTimeoutMS);
+
+ QVERIFY(!clientSocket.isEncrypted());
+ QCOMPARE_SINGLE_ERROR(clientSocket, expectedError);
+}
+
+void tst_QOcsp::noNextUpdate()
+{
+ // RFC2560, 2.4:
+ // "If nextUpdate is not set, the responder is indicating that newer
+ // revocation information is available all the time."
+ //
+ // This test is just to verify that we correctly handle such responses.
+ QDECLARE_CHAIN(subjectChain, "ss1.crt");
+ QDECLARE_CHAIN(responderChain, "ss1.crt");
+ QDECLARE_PRIVATE_KEY(privateKey, "ss1-private.key");
+
+ OcspServer server(subjectChain, privateKey);
+ OcspTimeStamp openRange(-1000, 0);
+ openRange.nextUpdate.clear();
+ const OcspResponder responder(openRange, subjectChain, responderChain, privateKey);
+ const QByteArray response(responder.buildResponse(OCSP_RESPONSE_STATUS_SUCCESSFUL,
+ V_OCSP_CERTSTATUS_GOOD));
+ QVERIFY(response.size());
+ server.configureResponse(response);
+ QVERIFY(server.listen());
+ connect(&server, &OcspServer::internalServerError, &loop, exitLoopSlot);
+
+ QSslSocket clientSocket;
+ setupOcspClient(clientSocket, issuerToChain(subjectChain), server.peerVerifyName());
+ clientSocket.connectToHostEncrypted(server.hostName(), server.serverPort());
+ loop.enterLoopMSecs(handshakeTimeoutMS);
+
+ QVERIFY_HANDSHAKE_WITHOUT_ERRORS(clientSocket);
+}
+
+void tst_QOcsp::wrongCertificateInResponse_data()
+{
+ QTest::addColumn<QLatin1String>("respChainName");
+ QTest::addColumn<QLatin1String>("respKeyName");
+ QTest::addColumn<QLatin1String>("wrongChainName");
+
+ QTest::addRow("same-CA-wrong-subject") << QLatin1String("ca1.crt") << QLatin1String("ca1.key")
+ << QLatin1String("alice.crt");
+ QTest::addRow("wrong-CA-same-subject") << QLatin1String("ss1.crt") << QLatin1String("ss1-private.key")
+ << QLatin1String("alice.crt");
+ QTest::addRow("wrong-CA-wrong-subject") << QLatin1String("ss1.crt") << QLatin1String("ss1-private.key")
+ << QLatin1String("ss1.crt");
+}
+
+void tst_QOcsp::wrongCertificateInResponse()
+{
+ QFETCH(const QLatin1String, respChainName);
+ QFETCH(const QLatin1String, respKeyName);
+ QFETCH(const QLatin1String, wrongChainName);
+ // In this test, the server will send a valid response (correctly signed
+ // by a trusted key/cert) but for a wrong certificate (not the one the
+ // server presented to the client in the server's 'Certificate' message).
+ const QSslError::SslError expectedError = QSslError::OcspResponseCertIdUnknown;
+
+ QDECLARE_CHAIN(subjectChain, "infbobchain.crt");
+ QDECLARE_PRIVATE_KEY(subjectKey, "infbob.key");
+ QDECLARE_CHAIN(responderChain, respChainName);
+ QDECLARE_PRIVATE_KEY(responderKey, respKeyName);
+
+ QDECLARE_CHAIN(wrongChain, wrongChainName);
+
+ OcspServer server(subjectToChain(subjectChain), subjectKey);
+ const QByteArray wrongResponse(goodResponse(wrongChain, responderChain, responderKey));
+ QVERIFY(wrongResponse.size());
+ server.configureResponse(wrongResponse);
+ QVERIFY(server.listen());
+ connect(&server, &OcspServer::internalServerError, &loop, exitLoopSlot);
+
+ QSslSocket clientSocket;
+ setupOcspClient(clientSocket, issuerToChain(subjectChain), server.peerVerifyName());
+ clientSocket.connectToHostEncrypted(server.hostName(), server.serverPort());
+ loop.enterLoopMSecs(handshakeTimeoutMS);
+
+ QVERIFY(!clientSocket.isEncrypted());
+ QVERIFY(containsError(clientSocket.sslErrors(), expectedError));
+}
+
+void tst_QOcsp::untrustedResponder()
+{
+ const QSslError::SslError expectedError = QSslError::OcspResponseCannotBeTrusted;
+
+ QDECLARE_CHAIN(subjectChain, "infbobchain.crt");
+ QDECLARE_PRIVATE_KEY(subjectKey, "infbob.key");
+ QDECLARE_CHAIN(responderChain, "ca1.crt");
+ QDECLARE_PRIVATE_KEY(responderKey, "ca1.key");
+
+ OcspServer server(subjectChain, subjectKey);
+ const QByteArray response(goodResponse(subjectToChain(subjectChain), responderChain, responderKey));
+ QVERIFY(response.size());
+ server.configureResponse(response);
+ QVERIFY(server.listen());
+ connect(&server, &OcspServer::internalServerError, &loop, exitLoopSlot);
+
+ QSslSocket clientSocket;
+ setupOcspClient(clientSocket, {}, server.peerVerifyName());
+ clientSocket.connectToHostEncrypted(server.hostName(), server.serverPort());
+ loop.enterLoopMSecs(handshakeTimeoutMS);
+
+ QVERIFY(!clientSocket.isEncrypted());
+ QVERIFY(containsError(clientSocket.sslErrors(), expectedError));
+}
+
+void tst_QOcsp::setupOcspClient(QSslSocket &clientSocket, const CertificateChain &caCerts, const QString &name)
+{
+ QSslConfiguration clientConfig = QSslConfiguration::defaultConfiguration();
+ clientConfig.setOcspStaplingEnabled(true);
+
+ if (caCerts.size()) {
+ auto roots = clientConfig.caCertificates();
+ roots.append(caCerts);
+ clientConfig.setCaCertificates(roots);
+ }
+
+ clientSocket.setSslConfiguration(clientConfig);
+ clientSocket.setPeerVerifyName(name);
+
+ connect(&clientSocket, socketErrorSignal, &loop, exitLoopSlot);
+ connect(&clientSocket, tlsErrorsSignal, &loop, exitLoopSlot);
+ connect(&clientSocket, &QSslSocket::encrypted, &loop, exitLoopSlot);
+}
+
+bool tst_QOcsp::containsOcspErrors(const QList<QSslError> &errorsFound) const
+{
+ for (auto code : ocspErrorCodes) {
+ if (containsError(errorsFound, code))
+ return true;
+ }
+ return false;
+}
+
+bool tst_QOcsp::containsError(const QList<QSslError> &errors, QSslError::SslError code)
+{
+ const auto it = std::find_if(errors.begin(), errors.end(),
+ [&code](const QSslError &other){return other.error() == code;});
+ return it != errors.end();
+}
+
+QByteArray tst_QOcsp::goodResponse(const CertificateChain &subject, const CertificateChain &responder,
+ const QSslKey &privateKey, long beforeNow, long afterNow)
+{
+ const OcspResponder builder(OcspTimeStamp(beforeNow, afterNow), subject, responder, privateKey);
+ return builder.buildResponse(OCSP_RESPONSE_STATUS_SUCCESSFUL, V_OCSP_CERTSTATUS_GOOD);
+}
+
+bool tst_QOcsp::loadPrivateKey(const QString &keyFileName, QSslKey &key)
+{
+ QFile keyFile(certDirPath + keyFileName);
+ if (!keyFile.open(QIODevice::ReadOnly))
+ return false;
+ key = QSslKey(keyFile.readAll(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey);
+ return !key.isNull();
+}
+
+CertificateChain tst_QOcsp::issuerToChain(const CertificateChain &chain)
+{
+ // Here we presume that, if the chain isn't a single self-signed certificate, its second
+ // entry is the issuer.
+ const int length = chain.size();
+ Q_ASSERT(length > 0);
+ return CertificateChain() << chain[length > 1 ? 1 : 0];
+}
+
+CertificateChain tst_QOcsp::subjectToChain(const CertificateChain &chain)
+{
+ Q_ASSERT(chain.size());
+ return CertificateChain() << chain[0];
+}
+
+QT_END_NAMESPACE
+
+QTEST_MAIN(tst_QOcsp)
+
+#include "tst_qocsp.moc"
diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
index 7f8580ddd6..88be13f41d 100644
--- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
@@ -814,7 +814,7 @@ void tst_QSslCertificate::task256066toPem()
void tst_QSslCertificate::nulInCN()
{
-#if defined(QT_SECURETRANSPORT) || defined(Q_OS_WINRT)
+#if defined(QT_SECURETRANSPORT) || defined(Q_OS_WINRT) || QT_CONFIG(schannel)
QSKIP("Generic QSslCertificatePrivate fails this test");
#endif
QList<QSslCertificate> certList =
@@ -833,7 +833,7 @@ void tst_QSslCertificate::nulInCN()
void tst_QSslCertificate::nulInSan()
{
-#if defined(QT_SECURETRANSPORT) || defined(Q_OS_WINRT)
+#if defined(QT_SECURETRANSPORT) || defined(Q_OS_WINRT) || QT_CONFIG(schannel)
QSKIP("Generic QSslCertificatePrivate fails this test");
#endif
QList<QSslCertificate> certList =
diff --git a/tests/auto/network/ssl/qsslkey/keys/dh-pri-1024.der b/tests/auto/network/ssl/qsslkey/keys/dh-pri-1024.der
new file mode 100644
index 0000000000..687009e087
--- /dev/null
+++ b/tests/auto/network/ssl/qsslkey/keys/dh-pri-1024.der
Binary files differ
diff --git a/tests/auto/network/ssl/qsslkey/keys/dh-pri-1024.pem b/tests/auto/network/ssl/qsslkey/keys/dh-pri-1024.pem
new file mode 100644
index 0000000000..233e0dfb37
--- /dev/null
+++ b/tests/auto/network/ssl/qsslkey/keys/dh-pri-1024.pem
@@ -0,0 +1,9 @@
+-----BEGIN PRIVATE KEY-----
+MIIBIQIBADCBlQYJKoZIhvcNAQMBMIGHAoGBAIlk2YX0TJzfQ18ZzZroQoE5Nyjt
+bWxWRxBriG/c+JWhBwttVDb6lzLN+GVJxXVPfc6JJmDORVRxdxAlMqu++2Vqpsnl
+/H8xIXsxjuTcTjq8sXagGRa0LfeggkUD64tEhO4iZ8Q2TIdb3OHkAF0Sn+06b/0e
+iIz323Kywq0CsspTAgECBIGDAoGAQCo39UHP4s2ZVH4nOmWgNlb4JsHPX4EzqDBr
+ig46hvMLAFrILYnsCbqqD/+GNAUl1PV/nfEQoAk/HvtACqLFLG5/3jK2w6dVHGEo
+JnVOGz9vZpWUx+SCslHJRFaeE+6AAbbvrTr0lci29Ta4IesHlamRsj+ZaUrVX6k/
+/9OTGAo=
+-----END PRIVATE KEY-----
diff --git a/tests/auto/network/ssl/qsslkey/keys/dh-pri-2048.der b/tests/auto/network/ssl/qsslkey/keys/dh-pri-2048.der
new file mode 100644
index 0000000000..e193f25f07
--- /dev/null
+++ b/tests/auto/network/ssl/qsslkey/keys/dh-pri-2048.der
Binary files differ
diff --git a/tests/auto/network/ssl/qsslkey/keys/dh-pri-2048.pem b/tests/auto/network/ssl/qsslkey/keys/dh-pri-2048.pem
new file mode 100644
index 0000000000..32299b2b6c
--- /dev/null
+++ b/tests/auto/network/ssl/qsslkey/keys/dh-pri-2048.pem
@@ -0,0 +1,14 @@
+-----BEGIN PRIVATE KEY-----
+MIICJgIBADCCARcGCSqGSIb3DQEDATCCAQgCggEBAJsiReJxBjkC7Hy99AJATusq
+YsNQHhjoeTLPeHhsBuLtJK18Krk736V09efX6qeAEmvgMQbvbHqtrOaY3q6dut6C
+UTGVW+oVg3d/Y8qakkanvEnIlliaTIyWIz0JMjO2prC6AuU/QEzZcQVUS6bxyn3D
+iYFxCE6+7cJJpEH9HVbcrl+J6Ch6ax5rQGUyxpSMkmItLJx92upRxOnaxJMHR+ZF
+OSdDPfrkINpEzahnhteLszddyLasnE0or6ZnXYLvKsT1Uu6QwDc4EO1FJHScoeep
+zsK/VRcXzMpj/1Rl+F9E/AikCqHRrnvISt25wrK0Mwy854P2T7dJlBNewc6vE6MC
+AQIEggEEAoIBAGIctO30MoZ9DiuKbOBpqM9rl2bNH/I46GGcfEiSsO/zOw2V9WFC
+MxkjF0I1ilDfPY+Ag3bLB2n89DPcfXliYH9MFolehPTc1fWplhX3+ImdC6y95uXO
+FV5xtcEQCbPktnUtkUdcAT5831p9lu1QJo+DzMPrQa7axMLj8heBAi4VqAi+8Q31
+dpGKuhCUlgs+pLENx1o0QY2kui6Z5uR0YhmA547lwBWA4XEv5OV9ExmxytiatvOv
+PZKT1ID76LrL9bnnZvOEGczWLQvJ9VaaZSpoP+2QisRANWW4w57d+PIR1WR/FTSH
+F6xocElUoTzuiSPzRz60aw/KkisImBBKERQ=
+-----END PRIVATE KEY-----
diff --git a/tests/auto/network/ssl/qsslkey/keys/dh-pri-512.der b/tests/auto/network/ssl/qsslkey/keys/dh-pri-512.der
new file mode 100644
index 0000000000..42ddbaaae2
--- /dev/null
+++ b/tests/auto/network/ssl/qsslkey/keys/dh-pri-512.der
Binary files differ
diff --git a/tests/auto/network/ssl/qsslkey/keys/dh-pri-512.pem b/tests/auto/network/ssl/qsslkey/keys/dh-pri-512.pem
new file mode 100644
index 0000000000..d2c3170b16
--- /dev/null
+++ b/tests/auto/network/ssl/qsslkey/keys/dh-pri-512.pem
@@ -0,0 +1,6 @@
+-----BEGIN PRIVATE KEY-----
+MIGcAgEAMFMGCSqGSIb3DQEDATBGAkEAvXx0QxJvIGA2ig8Je55R2rmeO4Ta2Esj
+ANLuyVIFRbtuLFsdhU+amUc8bs9RUQmkUNzS92jkpAfqtCv+mQ06EwIBAgRCAkBJ
+rDM0BTevOPIHpJzMtSQhw3e7Dr38HUfTn8zF3uYi1RCxjkTUukmzRLPTf0aqPgpd
+8dSldjG/11aZORl8/mXO
+-----END PRIVATE KEY-----
diff --git a/tests/auto/network/ssl/qsslkey/keys/dh-pub-1024.der b/tests/auto/network/ssl/qsslkey/keys/dh-pub-1024.der
new file mode 100644
index 0000000000..2805a67633
--- /dev/null
+++ b/tests/auto/network/ssl/qsslkey/keys/dh-pub-1024.der
Binary files differ
diff --git a/tests/auto/network/ssl/qsslkey/keys/dh-pub-1024.pem b/tests/auto/network/ssl/qsslkey/keys/dh-pub-1024.pem
new file mode 100644
index 0000000000..da4e327ac9
--- /dev/null
+++ b/tests/auto/network/ssl/qsslkey/keys/dh-pub-1024.pem
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBHzCBlQYJKoZIhvcNAQMBMIGHAoGBAIlk2YX0TJzfQ18ZzZroQoE5NyjtbWxW
+RxBriG/c+JWhBwttVDb6lzLN+GVJxXVPfc6JJmDORVRxdxAlMqu++2Vqpsnl/H8x
+IXsxjuTcTjq8sXagGRa0LfeggkUD64tEhO4iZ8Q2TIdb3OHkAF0Sn+06b/0eiIz3
+23Kywq0CsspTAgECA4GEAAKBgA8pxU1sMDvRWKpvJKNs3jNhZPQWFf4Tszu/cMcb
+1qAQ/q0DRb41VvsUoMaCfef/plZleV4MG26owb574AJeC86wX5MbRDTPS4CzAn+I
+an92AZl3vlYRQ2sSo3ktkyhw6LV1iewi08Ky7J4rqvG0Oo335QGEZlK1OgwBsyh0
+FKLe
+-----END PUBLIC KEY-----
diff --git a/tests/auto/network/ssl/qsslkey/keys/dh-pub-2048.der b/tests/auto/network/ssl/qsslkey/keys/dh-pub-2048.der
new file mode 100644
index 0000000000..9e749d8a41
--- /dev/null
+++ b/tests/auto/network/ssl/qsslkey/keys/dh-pub-2048.der
Binary files differ
diff --git a/tests/auto/network/ssl/qsslkey/keys/dh-pub-2048.pem b/tests/auto/network/ssl/qsslkey/keys/dh-pub-2048.pem
new file mode 100644
index 0000000000..f751157c87
--- /dev/null
+++ b/tests/auto/network/ssl/qsslkey/keys/dh-pub-2048.pem
@@ -0,0 +1,14 @@
+-----BEGIN PUBLIC KEY-----
+MIICJDCCARcGCSqGSIb3DQEDATCCAQgCggEBAJsiReJxBjkC7Hy99AJATusqYsNQ
+HhjoeTLPeHhsBuLtJK18Krk736V09efX6qeAEmvgMQbvbHqtrOaY3q6dut6CUTGV
+W+oVg3d/Y8qakkanvEnIlliaTIyWIz0JMjO2prC6AuU/QEzZcQVUS6bxyn3DiYFx
+CE6+7cJJpEH9HVbcrl+J6Ch6ax5rQGUyxpSMkmItLJx92upRxOnaxJMHR+ZFOSdD
+PfrkINpEzahnhteLszddyLasnE0or6ZnXYLvKsT1Uu6QwDc4EO1FJHScoeepzsK/
+VRcXzMpj/1Rl+F9E/AikCqHRrnvISt25wrK0Mwy854P2T7dJlBNewc6vE6MCAQID
+ggEFAAKCAQAUeWRuqjl7F84USogxJOM1M4y8yKtBYY2KLs5iIVhzV4UZ+9+cMNZA
+otLXJ/e8BH0diR0yk7tjxD6hjjqd+nyafIkJGPElDMnTbRPHg5zZYMmI5L/efdSm
+OPbM7QsodrYH5aoF4c7hjMb/cttYVG2Yupsy4tfORuDbwL70upqOo6rkVq55eOGS
+6pseEume/SD+7e3xIPJTkrMMzBFHG6H7bVHikT4O7yWV1iVzElj919yi+4Zy6TK8
+0hG6l31D5bsJpOduhHYZtN1yQpw+sGT6Yiepkjgt+1YkGFiiRs5vDl4DHeYHyAhL
+oH9uKcm3q4lhaOeT5ml765g87qQD6+vr
+-----END PUBLIC KEY-----
diff --git a/tests/auto/network/ssl/qsslkey/keys/dh-pub-512.der b/tests/auto/network/ssl/qsslkey/keys/dh-pub-512.der
new file mode 100644
index 0000000000..8a75babb6d
--- /dev/null
+++ b/tests/auto/network/ssl/qsslkey/keys/dh-pub-512.der
Binary files differ
diff --git a/tests/auto/network/ssl/qsslkey/keys/dh-pub-512.pem b/tests/auto/network/ssl/qsslkey/keys/dh-pub-512.pem
new file mode 100644
index 0000000000..1f4e5c9a47
--- /dev/null
+++ b/tests/auto/network/ssl/qsslkey/keys/dh-pub-512.pem
@@ -0,0 +1,6 @@
+-----BEGIN PUBLIC KEY-----
+MIGaMFMGCSqGSIb3DQEDATBGAkEAvXx0QxJvIGA2ig8Je55R2rmeO4Ta2EsjANLu
+yVIFRbtuLFsdhU+amUc8bs9RUQmkUNzS92jkpAfqtCv+mQ06EwIBAgNDAAJARGBh
+9FmRRZZAxBtXZmS8wIgDwWvjB63GQ+E1pDLtZPztvPQ2eqUjTgSuGKV5cDankAV1
+Pkj/IA0Xl+SuFhLLew==
+-----END PUBLIC KEY-----
diff --git a/tests/auto/network/ssl/qsslkey/keys/genkeys.sh b/tests/auto/network/ssl/qsslkey/keys/genkeys.sh
index 6210b42ab4..0106953bff 100755
--- a/tests/auto/network/ssl/qsslkey/keys/genkeys.sh
+++ b/tests/auto/network/ssl/qsslkey/keys/genkeys.sh
@@ -88,6 +88,27 @@ do
openssl ec -in ec-pri-$size-$curve.pem -pubout -out ec-pub-$size-$curve.der -outform DER
done
+#--- DH ----------------------------------------------------------------------------
+for size in 512 1024 2048
+do
+ echo -e "\ngenerating DH parameters to PEM file ..."
+ openssl dhparam -out dhpar-$size.pem $size
+
+ echo -e "\ngenerating DH private key to PEM file ..."
+ openssl genpkey -paramfile dhpar-$size.pem -out dh-pri-$size.pem
+
+ /bin/rm dhpar-$size.pem
+
+ echo -e "\ngenerating DH private key to DER file ..."
+ openssl pkey -in dh-pri-$size.pem -out dh-pri-$size.der -outform DER
+
+ echo -e "\ngenerating DH public key to PEM file ..."
+ openssl pkey -in dh-pri-$size.pem -pubout -out dh-pub-$size.pem
+
+ echo -e "\ngenerating DH public key to DER file ..."
+ openssl pkey -in dh-pri-$size.pem -pubout -out dh-pub-$size.der -outform DER
+done
+
#--- PKCS#8 ------------------------------------------------------------------------
# Note: We'll just grab some of the keys generated earlier and convert those
# https://www.openssl.org/docs/manmaster/man1/pkcs8.html#PKCS-5-v1.5-and-PKCS-12-algorithms
diff --git a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
index ddfe52c5e4..28476fce5b 100644
--- a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
+++ b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
@@ -63,7 +63,7 @@ class tst_QSslKey : public QObject
QList<KeyInfo> keyInfoList;
- void createPlainTestRows(bool filter = false, QSsl::EncodingFormat format = QSsl::EncodingFormat::Pem);
+ void createPlainTestRows(bool pemOnly = false);
public slots:
void initTestCase();
@@ -111,13 +111,14 @@ void tst_QSslKey::initTestCase()
QDir dir(testDataDir + "keys");
const QFileInfoList fileInfoList = dir.entryInfoList(QDir::Files | QDir::Readable);
- QRegExp rx(QLatin1String("^(rsa|dsa|ec)-(pub|pri)-(\\d+)-?[\\w-]*\\.(pem|der)$"));
+ QRegExp rx(QLatin1String("^(rsa|dsa|dh|ec)-(pub|pri)-(\\d+)-?[\\w-]*\\.(pem|der)$"));
for (const QFileInfo &fileInfo : fileInfoList) {
if (rx.indexIn(fileInfo.fileName()) >= 0) {
keyInfoList << KeyInfo(
fileInfo,
rx.cap(1) == QLatin1String("rsa") ? QSsl::Rsa :
- (rx.cap(1) == QLatin1String("dsa") ? QSsl::Dsa : QSsl::Ec),
+ rx.cap(1) == QLatin1String("dsa") ? QSsl::Dsa :
+ rx.cap(1) == QLatin1String("dh") ? QSsl::Dh : QSsl::Ec,
rx.cap(2) == QLatin1String("pub") ? QSsl::PublicKey : QSsl::PrivateKey,
rx.cap(3).toInt(),
rx.cap(4) == QLatin1String("pem") ? QSsl::Pem : QSsl::Der);
@@ -154,7 +155,7 @@ Q_DECLARE_METATYPE(QSsl::KeyAlgorithm)
Q_DECLARE_METATYPE(QSsl::KeyType)
Q_DECLARE_METATYPE(QSsl::EncodingFormat)
-void tst_QSslKey::createPlainTestRows(bool filter, QSsl::EncodingFormat format)
+void tst_QSslKey::createPlainTestRows(bool pemOnly)
{
QTest::addColumn<QString>("absFilePath");
QTest::addColumn<QSsl::KeyAlgorithm>("algorithm");
@@ -162,11 +163,11 @@ void tst_QSslKey::createPlainTestRows(bool filter, QSsl::EncodingFormat format)
QTest::addColumn<int>("length");
QTest::addColumn<QSsl::EncodingFormat>("format");
foreach (KeyInfo keyInfo, keyInfoList) {
- if (filter && keyInfo.format != format)
+ if (pemOnly && keyInfo.format != QSsl::EncodingFormat::Pem)
continue;
-#ifdef Q_OS_WINRT
+#if defined(Q_OS_WINRT) || QT_CONFIG(schannel)
if (keyInfo.fileInfo.fileName().contains("RC2-64"))
- continue; // WinRT treats RC2 as 128 bit
+ continue; // WinRT/Schannel treats RC2 as 128 bit
#endif
#if !defined(QT_NO_SSL) && defined(QT_NO_OPENSSL) // generic backend
if (keyInfo.fileInfo.fileName().contains(QRegularExpression("-aes\\d\\d\\d-")))
@@ -598,11 +599,11 @@ void tst_QSslKey::encrypt()
QFETCH(QByteArray, cipherText);
QByteArray iv("abcdefgh");
-#ifdef Q_OS_WINRT
- QEXPECT_FAIL("RC2-40-CBC, length 0", "WinRT treats RC2 as 128-bit", Abort);
- QEXPECT_FAIL("RC2-40-CBC, length 8", "WinRT treats RC2 as 128-bit", Abort);
- QEXPECT_FAIL("RC2-64-CBC, length 0", "WinRT treats RC2 as 128-bit", Abort);
- QEXPECT_FAIL("RC2-64-CBC, length 8", "WinRT treats RC2 as 128-bit", Abort);
+#if defined(Q_OS_WINRT) || QT_CONFIG(schannel)
+ QEXPECT_FAIL("RC2-40-CBC, length 0", "WinRT/Schannel treats RC2 as 128-bit", Abort);
+ QEXPECT_FAIL("RC2-40-CBC, length 8", "WinRT/Schannel treats RC2 as 128-bit", Abort);
+ QEXPECT_FAIL("RC2-64-CBC, length 0", "WinRT/Schannel treats RC2 as 128-bit", Abort);
+ QEXPECT_FAIL("RC2-64-CBC, length 8", "WinRT/Schannel treats RC2 as 128-bit", Abort);
#endif
QByteArray encrypted = QSslKeyPrivate::encrypt(cipher, plainText, key, iv);
QCOMPARE(encrypted, cipherText);
diff --git a/tests/auto/network/ssl/qsslsocket/certs/subjectAltNameIP.crt b/tests/auto/network/ssl/qsslsocket/certs/subjectAltNameIP.crt
new file mode 100644
index 0000000000..1377fbbabb
--- /dev/null
+++ b/tests/auto/network/ssl/qsslsocket/certs/subjectAltNameIP.crt
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDMDCCAhigAwIBAgIURWaTvdnvU+Y+gPSONs61cMCH8JUwDQYJKoZIhvcNAQEL
+BQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5vcmcwHhcNMTkwMTA4MTExMDMxWhcNMTkw
+MjA3MTExMDMxWjAWMRQwEgYDVQQDDAtleGFtcGxlLm9yZzCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBALf0qv9vl8RqvDHpEWfjum7DMrY8qrQnD77C/9f/
+Jl0Jo4UZiSBr1OYYVbiWJyodw8LpQQsKE+fQCo2STb5X9BldJpwpQvvVi6ygxdzN
+erJnB15G7xhUkGzDI2xhIJw3e6NGqf1PMB4CTNna6eN2cKYAxPfsWo5Pyh1YtU4s
+5h+B3+43ol32ccBiRo4YXagbYMELjspEf0AvObvMWSxZQoBHcJ5JGEApxcgvFu8i
+FBSALVy1IrYE3gXAv8TB0AK7IpuNIL48v5JXCA6JOGYbXFljj6aLFTzfrV3lzhQ0
+kqBVnQNqVfOUQNUhNT93bnEWVf911j/af5zuFtmr1kbMzucCAwEAAaN2MHQwHQYD
+VR0OBBYEFHZOtGQHV3roaj3nlQ1XRU0O+05TMB8GA1UdIwQYMBaAFHZOtGQHV3ro
+aj3nlQ1XRU0O+05TMA8GA1UdEwEB/wQFMAMBAf8wIQYDVR0RBBowGIcEwAUIEIcQ
+/oAAAAAAAAA8KS+h3UQHZTANBgkqhkiG9w0BAQsFAAOCAQEAcvqvtUSJ2JM3rrWj
+XjCOhosKY/cow4oDAVdn8AvI/Z4FJfcQZ1vA+ZM533/TaJStG4ThfjyX9t1Ej08M
+UzP4ZUyXJTv8o6C6j5e9ggEwo/cFp1iWP+xr2SXLJ2cabnu8db5FN5J75HjNsuVs
+PM95LYY9VlTm9W7JxMwkPEIG+wH5zu6Hj45UAAamwwjOKT1hJYumxdmLAp1oyG1p
+u86b8iVUjiHG+K6qr4hAKXhuSXE1s/pYqcn1feyk2SbkKvGFR6ad+gmdT4ZaiNYT
+nL8+t2wim/fRkV0CNdWrrJpWtLzjPq1al7g2eIopdLufSlqanouVpnzwuKGN5QC/
+MuDohA==
+-----END CERTIFICATE-----
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index bca142e245..8367977648 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -233,18 +233,22 @@ private slots:
void verifyClientCertificate();
void readBufferMaxSize();
+ void allowedProtocolNegotiation();
+
#ifndef QT_NO_OPENSSL
void simplePskConnect_data();
void simplePskConnect();
void ephemeralServerKey_data();
void ephemeralServerKey();
- void allowedProtocolNegotiation();
void pskServer();
void forwardReadChannelFinished();
void signatureAlgorithm_data();
void signatureAlgorithm();
#endif
+ void disabledProtocols_data();
+ void disabledProtocols();
+
void setEmptyDefaultConfiguration(); // this test should be last
protected slots:
@@ -638,6 +642,10 @@ void tst_QSslSocket::sslErrors()
QFETCH(int, port);
QSslSocketPtr socket = newSocket();
+#if QT_CONFIG(schannel)
+ // Needs to be < 1.2 because of the old certificate and <= 1.0 because of the mail server
+ socket->setProtocol(QSsl::SslProtocol::TlsV1_0);
+#endif
QSignalSpy sslErrorsSpy(socket.data(), SIGNAL(sslErrors(QList<QSslError>)));
QSignalSpy peerVerifyErrorSpy(socket.data(), SIGNAL(peerVerifyError(QSslError)));
@@ -717,6 +725,9 @@ void tst_QSslSocket::connectToHostEncrypted()
return;
QSslSocketPtr socket = newSocket();
+#if QT_CONFIG(schannel) // old certificate not supported with TLS 1.2
+ socket->setProtocol(QSsl::SslProtocol::TlsV1_1);
+#endif
this->socket = socket.data();
QVERIFY(socket->addCaCertificates(testDataDir + "certs/qt-test-server-cacert.pem"));
#ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
@@ -750,6 +761,9 @@ void tst_QSslSocket::connectToHostEncryptedWithVerificationPeerName()
return;
QSslSocketPtr socket = newSocket();
+#if QT_CONFIG(schannel) // old certificate not supported with TLS 1.2
+ socket->setProtocol(QSsl::SslProtocol::TlsV1_1);
+#endif
this->socket = socket.data();
socket->addCaCertificates(testDataDir + "certs/qt-test-server-cacert.pem");
@@ -952,24 +966,6 @@ void tst_QSslSocket::protocol()
QCOMPARE(socket->protocol(), QSsl::SecureProtocols);
QFETCH_GLOBAL(bool, setProxy);
{
- // qt-test-server allows SSLv3.
- socket->setProtocol(QSsl::SslV3);
- QCOMPARE(socket->protocol(), QSsl::SslV3);
- socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
- if (setProxy && !socket->waitForEncrypted())
- QSKIP("Skipping flaky test - See QTBUG-29941");
- QCOMPARE(socket->protocol(), QSsl::SslV3);
- socket->abort();
- QCOMPARE(socket->protocol(), QSsl::SslV3);
- socket->connectToHost(QtNetworkSettings::serverName(), 443);
- QVERIFY2(socket->waitForConnected(), qPrintable(socket->errorString()));
- socket->startClientEncryption();
- if (setProxy && !socket->waitForEncrypted())
- QSKIP("Skipping flaky test - See QTBUG-29941");
- QCOMPARE(socket->protocol(), QSsl::SslV3);
- socket->abort();
- }
- {
// qt-test-server allows TLSV1.
socket->setProtocol(QSsl::TlsV1_0);
QCOMPARE(socket->protocol(), QSsl::TlsV1_0);
@@ -1045,26 +1041,6 @@ void tst_QSslSocket::protocol()
socket->abort();
}
#endif // TLS1_3_VERSION
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
- {
- // qt-test-server allows SSLV2.
- socket->setProtocol(QSsl::SslV2);
- QCOMPARE(socket->protocol(), QSsl::SslV2);
- socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
- if (setProxy && !socket->waitForEncrypted())
- QSKIP("Skipping flaky test - See QTBUG-29941");
- QCOMPARE(socket->protocol(), QSsl::SslV2);
- socket->abort();
- QCOMPARE(socket->protocol(), QSsl::SslV2);
- socket->connectToHost(QtNetworkSettings::serverName(), 443);
- if (setProxy && !socket->waitForConnected())
- QSKIP("Skipping flaky test - See QTBUG-29941");
- socket->startClientEncryption();
- if (setProxy && !socket->waitForEncrypted())
- QSKIP("Skipping flaky test - See QTBUG-29941");
- socket->abort();
- }
-#endif
{
// qt-test-server allows SSLV3, so it allows AnyProtocol.
socket->setProtocol(QSsl::AnyProtocol);
@@ -1084,7 +1060,7 @@ void tst_QSslSocket::protocol()
socket->abort();
}
{
- // qt-test-server allows SSLV3, so it allows NoSslV2
+ // qt-test-server allows TlsV1, so it allows TlsV1SslV3
socket->setProtocol(QSsl::TlsV1SslV3);
QCOMPARE(socket->protocol(), QSsl::TlsV1SslV3);
socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
@@ -1207,120 +1183,38 @@ void tst_QSslSocket::protocolServerSide_data()
QTest::addColumn<QSsl::SslProtocol>("clientProtocol");
QTest::addColumn<bool>("works");
-#if QT_CONFIG(opensslv11)
-#if !defined(OPENSSL_NO_SSL2)
- // OpenSSL 1.1 has removed SSL2 support. But there is no OPENSSL_NO_SSL2 macro ...
-#define OPENSSL_NO_SSL2
-#endif // OPENSSL_NO_SSL2
-#endif // opensslv11
-
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
- QTest::newRow("ssl2-ssl2") << QSsl::SslV2 << QSsl::SslV2 << false; // no idea why it does not work, but we don't care about SSL 2
-#endif
-#if !defined(OPENSSL_NO_SSL3)
- QTest::newRow("ssl3-ssl3") << QSsl::SslV3 << QSsl::SslV3 << true;
-#endif
QTest::newRow("tls1.0-tls1.0") << QSsl::TlsV1_0 << QSsl::TlsV1_0 << true;
QTest::newRow("tls1ssl3-tls1ssl3") << QSsl::TlsV1SslV3 << QSsl::TlsV1SslV3 << true;
QTest::newRow("any-any") << QSsl::AnyProtocol << QSsl::AnyProtocol << true;
QTest::newRow("secure-secure") << QSsl::SecureProtocols << QSsl::SecureProtocols << true;
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
- QTest::newRow("ssl2-ssl3") << QSsl::SslV2 << QSsl::SslV3 << false;
- QTest::newRow("ssl2-tls1.0") << QSsl::SslV2 << QSsl::TlsV1_0 << false;
- QTest::newRow("ssl2-tls1ssl3") << QSsl::SslV2 << QSsl::TlsV1SslV3 << false;
- QTest::newRow("ssl2-secure") << QSsl::SslV2 << QSsl::SecureProtocols << false;
- QTest::newRow("ssl2-any") << QSsl::SslV2 << QSsl::AnyProtocol << false; // no idea why it does not work, but we don't care about SSL 2
-#endif
-
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT) && !defined(OPENSSL_NO_SSL3)
- QTest::newRow("ssl3-ssl2") << QSsl::SslV3 << QSsl::SslV2 << false;
-#endif
-#if !defined(OPENSSL_NO_SSL3)
- QTest::newRow("ssl3-tls1.0") << QSsl::SslV3 << QSsl::TlsV1_0 << false;
- QTest::newRow("ssl3-tls1ssl3") << QSsl::SslV3 << QSsl::TlsV1SslV3 << true;
- QTest::newRow("ssl3-secure") << QSsl::SslV3 << QSsl::SecureProtocols << false;
-#endif
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT) && !defined(OPENSSL_NO_SSL3)
- QTest::newRow("ssl3-any") << QSsl::SslV3 << QSsl::AnyProtocol << false; // we won't set a SNI header here because we connect to a
- // numerical IP, so OpenSSL will send a SSL 2 handshake
-#elif !defined(OPENSSL_NO_SSL3)
- QTest::newRow("ssl3-any") << QSsl::SslV3 << QSsl::AnyProtocol << true;
-#endif
-
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
- QTest::newRow("tls1.0-ssl2") << QSsl::TlsV1_0 << QSsl::SslV2 << false;
-#endif
-#if !defined(OPENSSL_NO_SSL3)
- QTest::newRow("tls1.0-ssl3") << QSsl::TlsV1_0 << QSsl::SslV3 << false;
-#endif
QTest::newRow("tls1-tls1ssl3") << QSsl::TlsV1_0 << QSsl::TlsV1SslV3 << true;
QTest::newRow("tls1.0-secure") << QSsl::TlsV1_0 << QSsl::SecureProtocols << true;
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
- QTest::newRow("tls1.0-any") << QSsl::TlsV1_0 << QSsl::AnyProtocol << false; // we won't set a SNI header here because we connect to a
- // numerical IP, so OpenSSL will send a SSL 2 handshake
-#else
QTest::newRow("tls1.0-any") << QSsl::TlsV1_0 << QSsl::AnyProtocol << true;
-#endif
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
- QTest::newRow("tls1ssl3-ssl2") << QSsl::TlsV1SslV3 << QSsl::SslV2 << false;
-#endif
-#if !defined(OPENSSL_NO_SSL3)
- QTest::newRow("tls1ssl3-ssl3") << QSsl::TlsV1SslV3 << QSsl::SslV3 << true;
-#endif
QTest::newRow("tls1ssl3-tls1.0") << QSsl::TlsV1SslV3 << QSsl::TlsV1_0 << true;
QTest::newRow("tls1ssl3-secure") << QSsl::TlsV1SslV3 << QSsl::SecureProtocols << true;
QTest::newRow("tls1ssl3-any") << QSsl::TlsV1SslV3 << QSsl::AnyProtocol << true;
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
- QTest::newRow("secure-ssl2") << QSsl::SecureProtocols << QSsl::SslV2 << false;
-#endif
-#if !defined(OPENSSL_NO_SSL3)
- QTest::newRow("secure-ssl3") << QSsl::SecureProtocols << QSsl::SslV3 << false;
-#endif
QTest::newRow("secure-tls1.0") << QSsl::SecureProtocols << QSsl::TlsV1_0 << true;
QTest::newRow("secure-tls1ssl3") << QSsl::SecureProtocols << QSsl::TlsV1SslV3 << true;
QTest::newRow("secure-any") << QSsl::SecureProtocols << QSsl::AnyProtocol << true;
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
- QTest::newRow("any-ssl2") << QSsl::AnyProtocol << QSsl::SslV2 << false; // no idea why it does not work, but we don't care about SSL 2
-#endif
-#if !defined(OPENSSL_NO_SSL3)
- QTest::newRow("any-ssl3") << QSsl::AnyProtocol << QSsl::SslV3 << true;
-#endif
-
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
- QTest::newRow("tls1.0orlater-ssl2") << QSsl::TlsV1_0OrLater << QSsl::SslV2 << false;
-#endif
-#if !defined(OPENSSL_NO_SSL3)
- QTest::newRow("tls1.0orlater-ssl3") << QSsl::TlsV1_0OrLater << QSsl::SslV3 << false;
-#endif
QTest::newRow("tls1.0orlater-tls1.0") << QSsl::TlsV1_0OrLater << QSsl::TlsV1_0 << true;
QTest::newRow("tls1.0orlater-tls1.1") << QSsl::TlsV1_0OrLater << QSsl::TlsV1_1 << true;
QTest::newRow("tls1.0orlater-tls1.2") << QSsl::TlsV1_0OrLater << QSsl::TlsV1_2 << true;
#ifdef TLS1_3_VERSION
QTest::newRow("tls1.0orlater-tls1.3") << QSsl::TlsV1_0OrLater << QSsl::TlsV1_3 << true;
#endif
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
- QTest::newRow("tls1.1orlater-ssl2") << QSsl::TlsV1_1OrLater << QSsl::SslV2 << false;
-#endif
-#if !defined(OPENSSL_NO_SSL3)
- QTest::newRow("tls1.1orlater-ssl3") << QSsl::TlsV1_1OrLater << QSsl::SslV3 << false;
-#endif
QTest::newRow("tls1.1orlater-tls1.0") << QSsl::TlsV1_1OrLater << QSsl::TlsV1_0 << false;
QTest::newRow("tls1.1orlater-tls1.1") << QSsl::TlsV1_1OrLater << QSsl::TlsV1_1 << true;
QTest::newRow("tls1.1orlater-tls1.2") << QSsl::TlsV1_1OrLater << QSsl::TlsV1_2 << true;
+
#ifdef TLS1_3_VERSION
QTest::newRow("tls1.1orlater-tls1.3") << QSsl::TlsV1_1OrLater << QSsl::TlsV1_3 << true;
#endif
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
- QTest::newRow("tls1.2orlater-ssl2") << QSsl::TlsV1_2OrLater << QSsl::SslV2 << false;
-#endif
-#if !defined(OPENSSL_NO_SSL3)
- QTest::newRow("tls1.2orlater-ssl3") << QSsl::TlsV1_2OrLater << QSsl::SslV3 << false;
-#endif
+
QTest::newRow("tls1.2orlater-tls1.0") << QSsl::TlsV1_2OrLater << QSsl::TlsV1_0 << false;
QTest::newRow("tls1.2orlater-tls1.1") << QSsl::TlsV1_2OrLater << QSsl::TlsV1_1 << false;
QTest::newRow("tls1.2orlater-tls1.2") << QSsl::TlsV1_2OrLater << QSsl::TlsV1_2 << true;
@@ -1328,12 +1222,6 @@ void tst_QSslSocket::protocolServerSide_data()
QTest::newRow("tls1.2orlater-tls1.3") << QSsl::TlsV1_2OrLater << QSsl::TlsV1_3 << true;
#endif
#ifdef TLS1_3_VERSION
-#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
- QTest::newRow("tls1.3orlater-ssl2") << QSsl::TlsV1_3OrLater << QSsl::SslV2 << false;
-#endif
-#if !defined(OPENSSL_NO_SSL3)
- QTest::newRow("tls1.3orlater-ssl3") << QSsl::TlsV1_3OrLater << QSsl::SslV3 << false;
-#endif
QTest::newRow("tls1.3orlater-tls1.0") << QSsl::TlsV1_3OrLater << QSsl::TlsV1_0 << false;
QTest::newRow("tls1.3orlater-tls1.1") << QSsl::TlsV1_3OrLater << QSsl::TlsV1_1 << false;
QTest::newRow("tls1.3orlater-tls1.2") << QSsl::TlsV1_3OrLater << QSsl::TlsV1_2 << false;
@@ -1389,10 +1277,10 @@ void tst_QSslSocket::protocolServerSide()
if (server.socket)
QVERIFY(server.socket->error() == QAbstractSocket::UnknownSocketError);
- QCOMPARE(int(client.state()), int(expectedState));
+ QCOMPARE(client.state(), expectedState);
} else if (server.socket->error() != QAbstractSocket::UnknownSocketError) {
QVERIFY(client.error() == QAbstractSocket::UnknownSocketError);
- QCOMPARE(int(server.socket->state()), int(expectedState));
+ QCOMPARE(server.socket->state(), expectedState);
}
QCOMPARE(client.isEncrypted(), works);
@@ -1536,6 +1424,11 @@ void tst_QSslSocket::setLocalCertificateChain()
loop.exec();
QList<QSslCertificate> chain = socket->peerCertificateChain();
+#if QT_CONFIG(schannel)
+ QEXPECT_FAIL("", "Schannel cannot send intermediate certificates not "
+ "located in a system certificate store",
+ Abort);
+#endif
QCOMPARE(chain.size(), 2);
QCOMPARE(chain[0].serialNumber(), QByteArray("10:a0:ad:77:58:f6:6e:ae:46:93:a3:43:f9:59:8a:9e"));
QCOMPARE(chain[1].serialNumber(), QByteArray("3b:eb:99:c5:ea:d8:0b:5d:0b:97:5d:4f:06:75:4b:e1"));
@@ -1603,6 +1496,9 @@ void tst_QSslSocket::setSslConfiguration()
QSslSocketPtr socket = newSocket();
QFETCH(QSslConfiguration, configuration);
socket->setSslConfiguration(configuration);
+#if QT_CONFIG(schannel) // old certificate not supported with TLS 1.2
+ socket->setProtocol(QSsl::SslProtocol::TlsV1_1);
+#endif
this->socket = socket.data();
socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
QFETCH(bool, works);
@@ -1815,6 +1711,17 @@ void tst_QSslSocket::isMatchingHostname()
QCOMPARE(QSslSocketPrivate::isMatchingHostname(cert, QString::fromUtf8("foo.foo.xn--schufele-2za.de")), false);
QCOMPARE(QSslSocketPrivate::isMatchingHostname(cert, QString::fromUtf8("www.schaufele.de")), false);
QCOMPARE(QSslSocketPrivate::isMatchingHostname(cert, QString::fromUtf8("www.schufele.de")), false);
+
+ /* Generated with the following command (only valid with openssl >= 1.1.1 due to "-addext"):
+ openssl req -x509 -nodes -subj "/CN=example.org" \
+ -addext "subjectAltName = IP:192.5.8.16, IP:fe80::3c29:2fa1:dd44:765" \
+ -newkey rsa:2048 -keyout /dev/null -out subjectAltNameIP.crt
+ */
+ certs = QSslCertificate::fromPath(testDataDir + "certs/subjectAltNameIP.crt");
+ QVERIFY(!certs.isEmpty());
+ cert = certs.first();
+ QCOMPARE(QSslSocketPrivate::isMatchingHostname(cert, QString::fromUtf8("192.5.8.16")), true);
+ QCOMPARE(QSslSocketPrivate::isMatchingHostname(cert, QString::fromUtf8("fe80::3c29:2fa1:dd44:765")), true);
}
void tst_QSslSocket::wildcard()
@@ -2297,6 +2204,9 @@ void tst_QSslSocket::verifyMode()
return;
QSslSocket socket;
+#if QT_CONFIG(schannel) // old certificate not supported with TLS 1.2
+ socket.setProtocol(QSsl::SslProtocol::TlsV1_1);
+#endif
QCOMPARE(socket.peerVerifyMode(), QSslSocket::AutoVerifyPeer);
socket.setPeerVerifyMode(QSslSocket::VerifyNone);
QCOMPARE(socket.peerVerifyMode(), QSslSocket::VerifyNone);
@@ -2597,6 +2507,9 @@ void tst_QSslSocket::abortOnSslErrors()
void tst_QSslSocket::readFromClosedSocket()
{
QSslSocketPtr socket = newSocket();
+#if QT_CONFIG(schannel) // old certificate not supported with TLS 1.2
+ socket->setProtocol(QSsl::SslProtocol::TlsV1_1);
+#endif
socket->ignoreSslErrors();
socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
socket->ignoreSslErrors();
@@ -3316,10 +3229,10 @@ void tst_QSslSocket::verifyClientCertificate_data()
validCerts += QSslCertificate::fromPath(testDataDir + "certs/bogus-ca.crt");
QCOMPARE(validCerts.size(), 2);
- QTest::newRow("ValidClientCert:AutoVerifyPeer") << QSslSocket::AutoVerifyPeer << validCerts << validKey << true;
- QTest::newRow("ValidClientCert:QueryPeer") << QSslSocket::QueryPeer << validCerts << validKey << true;
- QTest::newRow("ValidClientCert:VerifyNone") << QSslSocket::VerifyNone << validCerts << validKey << true;
- QTest::newRow("ValidClientCert:VerifyPeer") << QSslSocket::VerifyPeer << validCerts << validKey << true;
+ QTest::newRow("ValidChainedClientCert:AutoVerifyPeer") << QSslSocket::AutoVerifyPeer << validCerts << validKey << true;
+ QTest::newRow("ValidChainedClientCert:QueryPeer") << QSslSocket::QueryPeer << validCerts << validKey << true;
+ QTest::newRow("ValidChainedClientCert:VerifyNone") << QSslSocket::VerifyNone << validCerts << validKey << true;
+ QTest::newRow("ValidChainedClientCert:VerifyPeer") << QSslSocket::VerifyPeer << validCerts << validKey << true;
}
void tst_QSslSocket::verifyClientCertificate()
@@ -3345,6 +3258,11 @@ void tst_QSslSocket::verifyClientCertificate()
return;
QFETCH(QSslSocket::PeerVerifyMode, peerVerifyMode);
+#if QT_CONFIG(schannel)
+ if (peerVerifyMode == QSslSocket::QueryPeer || peerVerifyMode == QSslSocket::AutoVerifyPeer)
+ QSKIP("Schannel doesn't tackle requesting a certificate and not receiving one.");
+#endif
+
SslServer server;
server.addCaCertificates = testDataDir + "certs/bogus-ca.crt";
server.ignoreSslErrors = false;
@@ -3375,7 +3293,15 @@ void tst_QSslSocket::verifyClientCertificate()
// check server socket
QVERIFY(server.socket);
- QCOMPARE(int(server.socket->state()), int(expectedState));
+#if QT_CONFIG(schannel)
+ // As additional info to the QEXPECT_FAIL below:
+ // This is because schannel treats it as an error (client side) if you don't have a certificate
+ // when asked for one.
+ QEXPECT_FAIL("NoCert:VerifyPeer",
+ "The client disconnects first, which causes the event "
+ "loop to quit before the server disconnects.", Continue);
+#endif
+ QCOMPARE(server.socket->state(), expectedState);
QCOMPARE(server.socket->isEncrypted(), works);
if (peerVerifyMode == QSslSocket::VerifyNone || clientCerts.isEmpty()) {
@@ -3383,17 +3309,24 @@ void tst_QSslSocket::verifyClientCertificate()
QVERIFY(server.socket->peerCertificateChain().isEmpty());
} else {
QCOMPARE(server.socket->peerCertificate(), clientCerts.first());
+#if QT_CONFIG(schannel)
+ if (clientCerts.count() == 1 && server.socket->peerCertificateChain().count() == 2) {
+ QEXPECT_FAIL("",
+ "Schannel includes the entire chain, not just the leaf and intermediates",
+ Continue);
+ }
+#endif
QCOMPARE(server.socket->peerCertificateChain(), clientCerts);
}
// check client socket
- QCOMPARE(int(client.state()), int(expectedState));
+ QCOMPARE(client.state(), expectedState);
QCOMPARE(client.isEncrypted(), works);
}
void tst_QSslSocket::readBufferMaxSize()
{
-#ifdef QT_SECURETRANSPORT
+#if defined(QT_SECURETRANSPORT) || QT_CONFIG(schannel)
// QTBUG-55170:
// SecureTransport back-end was ignoring read-buffer
// size limit, resulting (potentially) in a constantly
@@ -3473,6 +3406,45 @@ void tst_QSslSocket::setEmptyDefaultConfiguration() // this test should be last,
QSKIP("Skipping flaky test - See QTBUG-29941");
}
+void tst_QSslSocket::allowedProtocolNegotiation()
+{
+#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_TLSEXT)
+
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy)
+ return;
+
+ const QByteArray expectedNegotiated("cool-protocol");
+ QList<QByteArray> serverProtos;
+ serverProtos << expectedNegotiated << "not-so-cool-protocol";
+ QList<QByteArray> clientProtos;
+ clientProtos << "uber-cool-protocol" << expectedNegotiated << "not-so-cool-protocol";
+
+
+ SslServer server;
+ server.config.setAllowedNextProtocols(serverProtos);
+ QVERIFY(server.listen());
+
+ QSslSocket clientSocket;
+ auto configuration = clientSocket.sslConfiguration();
+ configuration.setAllowedNextProtocols(clientProtos);
+ clientSocket.setSslConfiguration(configuration);
+
+ clientSocket.connectToHostEncrypted("127.0.0.1", server.serverPort());
+ clientSocket.ignoreSslErrors();
+
+ QEventLoop loop;
+ QTimer::singleShot(5000, &loop, SLOT(quit()));
+ connect(&clientSocket, SIGNAL(encrypted()), &loop, SLOT(quit()));
+ loop.exec();
+
+ QVERIFY(server.socket->sslConfiguration().nextNegotiatedProtocol() ==
+ clientSocket.sslConfiguration().nextNegotiatedProtocol());
+ QVERIFY(server.socket->sslConfiguration().nextNegotiatedProtocol() == expectedNegotiated);
+
+#endif // OPENSSL_VERSION_NUMBER
+}
+
#ifndef QT_NO_OPENSSL
class PskProvider : public QObject
{
@@ -3886,50 +3858,14 @@ void tst_QSslSocket::ephemeralServerKey()
QCOMPARE(client->sslConfiguration().ephemeralServerKey().isNull(), emptyKey);
}
-void tst_QSslSocket::allowedProtocolNegotiation()
-{
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_TLSEXT)
-
- QFETCH_GLOBAL(bool, setProxy);
- if (setProxy)
- return;
-
- const QByteArray expectedNegotiated("cool-protocol");
- QList<QByteArray> serverProtos;
- serverProtos << expectedNegotiated << "not-so-cool-protocol";
- QList<QByteArray> clientProtos;
- clientProtos << "uber-cool-protocol" << expectedNegotiated << "not-so-cool-protocol";
-
-
- SslServer server;
- server.config.setAllowedNextProtocols(serverProtos);
- QVERIFY(server.listen());
-
- QSslSocket clientSocket;
- auto configuration = clientSocket.sslConfiguration();
- configuration.setAllowedNextProtocols(clientProtos);
- clientSocket.setSslConfiguration(configuration);
-
- clientSocket.connectToHostEncrypted("127.0.0.1", server.serverPort());
- clientSocket.ignoreSslErrors();
-
- QEventLoop loop;
- QTimer::singleShot(5000, &loop, SLOT(quit()));
- connect(&clientSocket, SIGNAL(encrypted()), &loop, SLOT(quit()));
- loop.exec();
-
- QVERIFY(server.socket->sslConfiguration().nextNegotiatedProtocol() ==
- clientSocket.sslConfiguration().nextNegotiatedProtocol());
- QVERIFY(server.socket->sslConfiguration().nextNegotiatedProtocol() == expectedNegotiated);
-
-#endif // OPENSSL_VERSION_NUMBER
-}
-
void tst_QSslSocket::pskServer()
{
#ifdef Q_OS_WINRT
QSKIP("Server-side encryption is not implemented on WinRT.");
#endif
+#if QT_CONFIG(schannel)
+ QSKIP("Schannel does not have PSK support implemented.");
+#endif
QFETCH_GLOBAL(bool, setProxy);
if (!QSslSocket::supportsSsl() || setProxy)
return;
@@ -4174,6 +4110,74 @@ void tst_QSslSocket::forwardReadChannelFinished()
#endif // QT_NO_OPENSSL
+void tst_QSslSocket::disabledProtocols_data()
+{
+ QTest::addColumn<QSsl::SslProtocol>("disabledProtocol");
+ QTest::newRow("SslV2") << QSsl::SslV2;
+ QTest::newRow("SslV3") << QSsl::SslV3;
+}
+
+void tst_QSslSocket::disabledProtocols()
+{
+ QFETCH_GLOBAL(const bool, setProxy);
+ if (setProxy)
+ return;
+
+ QFETCH(const QSsl::SslProtocol, disabledProtocol);
+ const int timeoutMS = 500;
+ // Test a client socket.
+ {
+ // 0. connectToHostEncrypted: client-side, non-blocking API, error is discovered
+ // early, preventing any real connection from ever starting.
+ QSslSocket socket;
+ socket.setProtocol(disabledProtocol);
+ QCOMPARE(socket.error(), QAbstractSocket::UnknownSocketError);
+ socket.connectToHostEncrypted(QStringLiteral("doesnotmatter.org"), 1010);
+ QCOMPARE(socket.error(), QAbstractSocket::SslInvalidUserDataError);
+ QCOMPARE(socket.state(), QAbstractSocket::UnconnectedState);
+ }
+ {
+ // 1. startClientEncryption: client-side, non blocking API, but wants a socket in
+ // the 'connected' state (otherwise just returns false not setting any error code).
+ SslServer server;
+ QVERIFY(server.listen());
+
+ QSslSocket socket;
+ QCOMPARE(socket.error(), QAbstractSocket::UnknownSocketError);
+
+ socket.connectToHost(QHostAddress::LocalHost, server.serverPort());
+ QVERIFY(socket.waitForConnected(timeoutMS));
+
+ socket.setProtocol(disabledProtocol);
+ socket.startClientEncryption();
+ QCOMPARE(socket.error(), QAbstractSocket::SslInvalidUserDataError);
+ }
+ {
+ // 2. waitForEncrypted: client-side, blocking API plus requires from us
+ // to call ... connectToHostEncrypted(), which will notice an error and
+ // will prevent any connect at all. Nothing to test.
+ }
+
+ // Test a server side, relatively simple: server does not connect, it listens/accepts
+ // and then calls startServerEncryption() (which must fall).
+ {
+ SslServer server;
+ server.protocol = disabledProtocol;
+ QVERIFY(server.listen());
+
+ QTestEventLoop loop;
+ connect(&server, &SslServer::socketError, [&loop](QAbstractSocket::SocketError)
+ {loop.exitLoop();});
+
+ QTcpSocket client;
+ client.connectToHost(QHostAddress::LocalHost, server.serverPort());
+ loop.enterLoopMSecs(timeoutMS);
+ QVERIFY(!loop.timeout());
+ QVERIFY(server.socket);
+ QCOMPARE(server.socket->error(), QAbstractSocket::SslInvalidUserDataError);
+ }
+}
+
#endif // QT_NO_SSL
QTEST_MAIN(tst_QSslSocket)
diff --git a/tests/auto/network/ssl/ssl.pro b/tests/auto/network/ssl/ssl.pro
index e89443ef4e..169e9bce83 100644
--- a/tests/auto/network/ssl/ssl.pro
+++ b/tests/auto/network/ssl/ssl.pro
@@ -21,6 +21,8 @@ qtConfig(ssl) {
qdtlscookie \
qdtls
}
+
+ qtConfig(ocsp): SUBDIRS += qocsp
}
}
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
index 97397e3159..55875359ff 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
@@ -79,14 +79,14 @@ inline QString fixupTableName(const QString &tableName, QSqlDatabase db)
return tbName;
}
-inline static QString qTableName(const QString& prefix, const char *sourceFileName, QSqlDatabase db)
+inline static QString qTableName(const QString &prefix, const char *sourceFileName,
+ QSqlDatabase db, bool escape = true)
{
- QString tableStr = QLatin1String("dbtst");
- if (db.driverName().toLower().contains("ODBC"))
- tableStr += QLatin1String("_odbc");
- return fixupTableName(QString(QLatin1String("dbtst") + db.driverName() +
- QString::number(qHash(QLatin1String(sourceFileName) +
- "_" + qGetHostName().replace( "-", "_" )), 16) + "_" + prefix), db);
+ const auto tableStr = fixupTableName(QString(QLatin1String("dbtst") + db.driverName() +
+ QString::number(qHash(QLatin1String(sourceFileName) +
+ "_" + qGetHostName().replace("-", "_")), 16) +
+ "_" + prefix), db);
+ return escape ? db.driver()->escapeIdentifier(tableStr, QSqlDriver::TableName) : tableStr;
}
inline static QString qTableName(const QString& prefix, QSqlDatabase db)
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
index 8cf43e243b..892c743dbf 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
@@ -199,6 +199,9 @@ private slots:
void sqlite_openError();
+ void sqlite_check_json1_data() { generic_data("QSQLITE"); }
+ void sqlite_check_json1();
+
private:
void createTestTables(QSqlDatabase db);
void dropTestTables(QSqlDatabase db);
@@ -311,10 +314,8 @@ void tst_QSqlDatabase::createTestTables(QSqlDatabase db)
" (id integer not null, t_varchar varchar(40) not null, "
"t_char char(40), t_numeric numeric(6, 3), primary key (id, t_varchar))"));
}
-
if (testWhiteSpaceNames(db.driverName())) {
- QString qry = "create table "
- + db.driver()->escapeIdentifier(tableName + " test", QSqlDriver::TableName)
+ QString qry = "create table " + qTableName("qtest test", __FILE__, db)
+ '('
+ db.driver()->escapeIdentifier(QLatin1String("test test"), QSqlDriver::FieldName)
+ " int not null primary key)";
@@ -338,6 +339,7 @@ void tst_QSqlDatabase::dropTestTables(QSqlDatabase db)
const QString qtestTable = qTableName("qtest", __FILE__, db);
QStringList tableNames;
tableNames << qtestTable
+ << qTableName("qtest test", __FILE__, db)
<< qTableName("qtestfields", __FILE__, db)
<< qTableName("qtestalter", __FILE__, db)
<< qTableName("qtest_temp", __FILE__, db)
@@ -510,7 +512,9 @@ void tst_QSqlDatabase::tables()
CHECK_DATABASE(db);
QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db);
- const QString qtest(qTableName("qtest", __FILE__, db)), qtest_view(qTableName("qtest_view", __FILE__, db)), temp_tab(qTableName("test_tab", __FILE__, db));
+ const auto qtest(qTableName("qtest", __FILE__, db, false)),
+ qtest_view(qTableName("qtest_view", __FILE__, db, false)),
+ temp_tab(qTableName("test_tab", __FILE__, db, false));
bool views = true;
bool tempTables = false;
@@ -575,10 +579,10 @@ void tst_QSqlDatabase::whitespaceInIdentifiers()
const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db);
if (testWhiteSpaceNames(db.driverName())) {
- const QString tableName(qTableName("qtest", __FILE__, db) + " test");
+ const auto tableName(qTableName("qtest test", __FILE__, db, false));
QVERIFY(db.tables().contains(tableName, Qt::CaseInsensitive));
- QSqlRecord rec = db.record(db.driver()->escapeIdentifier(tableName, QSqlDriver::TableName));
+ QSqlRecord rec = db.record(tableName);
QCOMPARE(rec.count(), 1);
QCOMPARE(rec.fieldName(0), QString("test test"));
if (dbType == QSqlDriver::Oracle)
@@ -586,7 +590,7 @@ void tst_QSqlDatabase::whitespaceInIdentifiers()
else
QCOMPARE(rec.field(0).type(), QVariant::Int);
- QSqlIndex idx = db.primaryIndex(db.driver()->escapeIdentifier(tableName, QSqlDriver::TableName));
+ QSqlIndex idx = db.primaryIndex(tableName);
QCOMPARE(idx.count(), 1);
QCOMPARE(idx.fieldName(0), QString("test test"));
if (dbType == QSqlDriver::Oracle)
@@ -604,11 +608,12 @@ void tst_QSqlDatabase::alterTable()
QSqlDatabase db = QSqlDatabase::database(dbName);
CHECK_DATABASE(db);
const QString qtestalter(qTableName("qtestalter", __FILE__, db));
+ const auto noEscapeAlterTable = qTableName("qtestalter", __FILE__, db, false);
QSqlQuery q(db);
QVERIFY_SQL(q, exec("create table " + qtestalter + " (F1 char(20), F2 char(20), F3 char(20))"));
- QSqlRecord rec = db.record(qtestalter);
+ QSqlRecord rec = db.record(noEscapeAlterTable);
QCOMPARE((int)rec.count(), 3);
int i;
@@ -620,7 +625,7 @@ void tst_QSqlDatabase::alterTable()
QSKIP("DBMS doesn't support dropping columns in ALTER TABLE statement");
}
- rec = db.record(qtestalter);
+ rec = db.record(noEscapeAlterTable);
QCOMPARE((int)rec.count(), 2);
@@ -678,13 +683,16 @@ void tst_QSqlDatabase::testRecord(const FieldDef fieldDefs[], const QSqlRecord&
void tst_QSqlDatabase::commonFieldTest(const FieldDef fieldDefs[], QSqlDatabase db, const int fieldCount)
{
CHECK_DATABASE(db);
- const QString tableName = qTableName("qtestfields", __FILE__, db);
- QSqlRecord rec = db.record(tableName);
- QCOMPARE((int)rec.count(), fieldCount+1);
- testRecord(fieldDefs, rec, db);
-
+ const QStringList tableNames = { qTableName("qtestfields", __FILE__, db),
+ qTableName("qtestfields", __FILE__, db, false) };
+ for (const QString table : tableNames) {
+ QSqlRecord rec = db.record(table);
+ QCOMPARE(rec.count(), fieldCount + 1);
+ testRecord(fieldDefs, rec, db);
+ }
QSqlQuery q(db);
- QVERIFY_SQL(q, exec("select * from " + tableName));
+ // Only check the escaped entry
+ QVERIFY_SQL(q, exec("select * from " + tableNames.at(0)));
}
void tst_QSqlDatabase::recordTDS()
@@ -843,12 +851,8 @@ void tst_QSqlDatabase::recordPSQL()
QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db);
if (dbType == QSqlDriver::PostgreSQL)
QVERIFY_SQL( q, exec("set client_min_messages='warning'"));
- const QString tableName = qTableName("qtestfields", __FILE__, db);
- q.exec("drop sequence " + tableName + "_t_bigserial_seq");
- q.exec("drop sequence " + tableName + "_t_serial_seq");
- // older psql cut off the table name
- q.exec("drop sequence " + tableName + "_t_bigserial_seq");
- q.exec("drop sequence " + tableName + "_t_serial_seq");
+ q.exec("drop sequence " + qTableName("qtestfields_t_bigserial_seq", __FILE__, db));
+ q.exec("drop sequence " + qTableName("qtestfields_t_serial_seq", __FILE__, db));
const int fieldCount = createFieldTable(fieldDefs, db);
QVERIFY(fieldCount > 0);
@@ -1202,27 +1206,40 @@ void tst_QSqlDatabase::caseSensivity()
const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db);
bool cs = false;
- if (dbType == QSqlDriver::MySqlServer || dbType == QSqlDriver::SQLite || dbType == QSqlDriver::Sybase
+ if (dbType == QSqlDriver::MySqlServer || dbType == QSqlDriver::SQLite
+ || dbType == QSqlDriver::Sybase || dbType == QSqlDriver::PostgreSQL
|| dbType == QSqlDriver::MSSqlServer || db.driverName().startsWith("QODBC"))
cs = true;
- QSqlRecord rec = db.record(qTableName("qtest", __FILE__, db));
+ QSqlRecord rec = db.record(qTableName("qtest", __FILE__, db, false));
QVERIFY((int)rec.count() > 0);
if (!cs) {
- rec = db.record(qTableName("QTEST", __FILE__, db).toUpper());
+ rec = db.record(qTableName("QTEST", __FILE__, db, false).toUpper());
QVERIFY((int)rec.count() > 0);
- rec = db.record(qTableName("qTesT", __FILE__, db));
+ rec = db.record(qTableName("qTesT", __FILE__, db, false));
QVERIFY((int)rec.count() > 0);
}
- rec = db.primaryIndex(qTableName("qtest", __FILE__, db));
+ rec = db.primaryIndex(qTableName("qtest", __FILE__, db, false));
QVERIFY((int)rec.count() > 0);
if (!cs) {
- rec = db.primaryIndex(qTableName("QTEST", __FILE__, db).toUpper());
+ rec = db.primaryIndex(qTableName("QTEST", __FILE__, db, false).toUpper());
QVERIFY((int)rec.count() > 0);
- rec = db.primaryIndex(qTableName("qTesT", __FILE__, db));
+ rec = db.primaryIndex(qTableName("qTesT", __FILE__, db, false));
QVERIFY((int)rec.count() > 0);
}
+
+ // Explicit test for case sensitive table creation without quoting
+ QSqlQuery qry(db);
+ const auto noQuotesTable = qTableName("NoQuotes", __FILE__, db, false);
+ tst_Databases::safeDropTable(db, noQuotesTable);
+ QVERIFY_SQL(qry, exec("CREATE TABLE " + noQuotesTable + " (id INTEGER)"));
+ QVERIFY_SQL(qry, exec("INSERT INTO " + noQuotesTable + " VALUES(1)"));
+ QVERIFY_SQL(qry, exec("SELECT * FROM " + noQuotesTable));
+ QVERIFY_SQL(qry, next());
+ QCOMPARE(qry.value(0).toInt(), 1);
+ rec = db.record(cs ? noQuotesTable.toLower() : noQuotesTable);
+ QVERIFY(rec.count() > 0);
}
void tst_QSqlDatabase::noEscapedFieldNamesInRecord()
@@ -1257,17 +1274,19 @@ void tst_QSqlDatabase::psql_schemas()
const QString schemaName = qTableName("qtestschema", __FILE__, db);
QVERIFY_SQL(q, exec("CREATE SCHEMA " + schemaName));
- QString table = schemaName + '.' + qTableName("qtesttable", __FILE__, db);
+ const auto table = schemaName + '.' + qTableName("qtesttable", __FILE__, db);
+ const auto noescapeTable = qTableName("qtestschema", __FILE__, db, false) + '.' +
+ qTableName("qtesttable", __FILE__, db, false);
QVERIFY_SQL(q, exec("CREATE TABLE " + table + " (id int primary key, name varchar(20))"));
- QVERIFY(db.tables().contains(table, Qt::CaseInsensitive));
+ QVERIFY(db.tables().contains(noescapeTable, Qt::CaseInsensitive));
- QSqlRecord rec = db.record(table);
+ QSqlRecord rec = db.record(noescapeTable);
QCOMPARE(rec.count(), 2);
QCOMPARE(rec.fieldName(0), QString("id"));
QCOMPARE(rec.fieldName(1), QString("name"));
- QSqlIndex idx = db.primaryIndex(table);
+ QSqlIndex idx = db.primaryIndex(noescapeTable);
QCOMPARE(idx.count(), 1);
QCOMPARE(idx.fieldName(0), QString("id"));
}
@@ -1285,18 +1304,21 @@ void tst_QSqlDatabase::psql_escapedIdentifiers()
QSqlQuery q(db);
QVERIFY_SQL( q, exec("set client_min_messages='warning'"));
- const QString schemaName(qTableName("qtestScHeMa", __FILE__, db)),
+ const char bumpyCase[] = "qtestScHeMa";
+ const QString schemaName(qTableName(bumpyCase, __FILE__, db)),
tableName(qTableName("qtest", __FILE__, db)),
field1Name(QLatin1String("fIeLdNaMe")),
field2Name(QLatin1String("ZuLu"));
- q.exec(QString("DROP SCHEMA \"%1\" CASCADE").arg(schemaName));
- QString createSchema = QString("CREATE SCHEMA \"%1\"").arg(schemaName);
+ q.exec(QString("DROP SCHEMA %1 CASCADE").arg(schemaName));
+ const auto createSchema = QString("CREATE SCHEMA %1").arg(schemaName);
QVERIFY_SQL(q, exec(createSchema));
- QString createTable = QString("CREATE TABLE \"%1\".\"%2\" (\"%3\" int PRIMARY KEY, \"%4\" varchar(20))").arg(schemaName).arg(tableName).arg(field1Name).arg(field2Name);
+ const auto createTable = QString("CREATE TABLE %1.%2 (\"%3\" int PRIMARY KEY, \"%4\" varchar(20))")
+ .arg(schemaName, tableName, field1Name, field2Name);
QVERIFY_SQL(q, exec(createTable));
- QVERIFY(db.tables().contains(schemaName + '.' + tableName, Qt::CaseSensitive));
+ QVERIFY(db.tables().contains(qTableName(bumpyCase, __FILE__, db, false) + '.' +
+ qTableName("qtest", __FILE__, db, false), Qt::CaseSensitive));
QSqlField fld1(field1Name, QVariant::Int);
QSqlField fld2(field2Name, QVariant::String);
@@ -1304,7 +1326,9 @@ void tst_QSqlDatabase::psql_escapedIdentifiers()
rec.append(fld1);
rec.append(fld2);
- QVERIFY_SQL(q, exec(drv->sqlStatement(QSqlDriver::SelectStatement, db.driver()->escapeIdentifier(schemaName, QSqlDriver::TableName) + '.' + db.driver()->escapeIdentifier(tableName, QSqlDriver::TableName), rec, false)));
+ QVERIFY_SQL(q, exec(drv->sqlStatement(QSqlDriver::SelectStatement,
+ schemaName + '.' + tableName,
+ rec, false)));
rec = q.record();
QCOMPARE(rec.count(), 2);
@@ -1312,7 +1336,7 @@ void tst_QSqlDatabase::psql_escapedIdentifiers()
QCOMPARE(rec.fieldName(1), field2Name);
QCOMPARE(rec.field(0).type(), QVariant::Int);
- q.exec(QString("DROP SCHEMA \"%1\" CASCADE").arg(schemaName));
+ q.exec(QString("DROP SCHEMA %1 CASCADE").arg(schemaName));
}
void tst_QSqlDatabase::psql_escapeBytea()
@@ -2143,7 +2167,7 @@ void tst_QSqlDatabase::eventNotificationPSQL()
CHECK_DATABASE(db);
QSqlQuery query(db);
- QString procedureName = qTableName("posteventProc", __FILE__, db);
+ const auto procedureName = qTableName("posteventProc", __FILE__, db, false);
QString payload = "payload";
QSqlDriver &driver=*(db.driver());
QVERIFY_SQL(driver, subscribeToNotification(procedureName));
@@ -2167,21 +2191,22 @@ void tst_QSqlDatabase::eventNotificationSQLite()
QSKIP("QSQLITE specific test");
}
const QString tableName(qTableName("sqlitnotifytest", __FILE__, db));
+ const auto noEscapeTableName(qTableName("sqlitnotifytest", __FILE__, db, false));
tst_Databases::safeDropTable(db, tableName);
QSignalSpy notificationSpy(db.driver(), SIGNAL(notification(QString)));
QSignalSpy notificationSpyExt(db.driver(), SIGNAL(notification(QString,QSqlDriver::NotificationSource,QVariant)));
QSqlQuery q(db);
QVERIFY_SQL(q, exec("CREATE TABLE " + tableName + " (id INTEGER, realVal REAL)"));
- db.driver()->subscribeToNotification(tableName);
+ db.driver()->subscribeToNotification(noEscapeTableName);
QVERIFY_SQL(q, exec("INSERT INTO " + tableName + " (id, realVal) VALUES (1, 2.3)"));
QTRY_COMPARE(notificationSpy.count(), 1);
QTRY_COMPARE(notificationSpyExt.count(), 1);
QList<QVariant> arguments = notificationSpy.takeFirst();
- QCOMPARE(arguments.at(0).toString(), tableName);
+ QCOMPARE(arguments.at(0).toString(), noEscapeTableName);
arguments = notificationSpyExt.takeFirst();
- QCOMPARE(arguments.at(0).toString(), tableName);
- db.driver()->unsubscribeFromNotification(tableName);
+ QCOMPARE(arguments.at(0).toString(), noEscapeTableName);
+ db.driver()->unsubscribeFromNotification(noEscapeTableName);
QVERIFY_SQL(q, exec("INSERT INTO " + tableName + " (id, realVal) VALUES (1, 2.3)"));
QTRY_COMPARE(notificationSpy.count(), 0);
QTRY_COMPARE(notificationSpyExt.count(), 0);
@@ -2350,6 +2375,30 @@ void tst_QSqlDatabase::sqlite_openError()
QCOMPARE(error.databaseText(), "unable to open database file");
}
+void tst_QSqlDatabase::sqlite_check_json1()
+{
+ QFETCH(QString, dbName);
+ QSqlDatabase db = QSqlDatabase::database(dbName);
+ CHECK_DATABASE(db);
+ const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db);
+ if (dbType != QSqlDriver::SQLite)
+ QSKIP("SQLite3 specific test");
+
+ QSqlQuery q(db);
+ const QString json1("{\"id\":1}");
+ const QString tableName(qTableName("sqlite_check_json1", __FILE__, db));
+ tst_Databases::safeDropTable(db, tableName);
+ QVERIFY_SQL(q, exec(QString("CREATE TABLE %1(text TEXT)").arg(tableName)));
+ QVERIFY_SQL(q, exec(QString("INSERT INTO %1 VALUES(json('%2'))").arg(tableName, json1)));
+ QVERIFY_SQL(q, prepare(QString("INSERT INTO %1 VALUES(?)").arg(tableName)));
+ q.addBindValue("json('{\"id\":2}')");
+ QVERIFY_SQL(q, prepare(QString("SELECT * from %1 WHERE text = json('%2')").arg(tableName, json1)));
+ QVERIFY_SQL(q, exec());
+ QVERIFY_SQL(q, next());
+ QCOMPARE(q.value(0).toString(), json1);
+ QFAIL_SQL(q, next());
+}
+
void tst_QSqlDatabase::cloneDatabase()
{
QFETCH(QString, dbName);
@@ -2395,6 +2444,16 @@ public slots:
QSqlDatabase invalidDb = QSqlDatabase::database("invalid");
QVERIFY(!invalidDb.isValid());
+
+ {
+ QSqlDatabase clonedDatabase = QSqlDatabase::cloneDatabase(dbName, "CloneDB");
+ QVERIFY(!clonedDatabase.isOpen());
+ QVERIFY(clonedDatabase.isValid());
+ QVERIFY(clonedDatabase.open());
+ QVERIFY(clonedDatabase.isOpen());
+ clonedDatabase.close();
+ }
+
QThread::currentThread()->exit();
}
private:
diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
index c4cf2e752f..b4b92ebe9a 100644
--- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp
@@ -1096,7 +1096,7 @@ void tst_QSqlQuery::record()
for (int i = 0; i < 3; ++i)
QCOMPARE(q.record().field(i).tableName().toLower(), lowerQTest);
q.clear();
- const auto tst_record = qTableName("tst_record", __FILE__, db).toLower();
+ const auto tst_record = qTableName("tst_record", __FILE__, db, false).toLower();
SETUP_RECORD_TABLE;
CHECK_RECORD;
q.clear();
@@ -3742,15 +3742,13 @@ void tst_QSqlQuery::QTBUG_5251()
const QString timetest(qTableName("timetest", __FILE__, db));
tst_Databases::safeDropTable(db, timetest);
QSqlQuery q(db);
- QVERIFY_SQL(q, exec(QStringLiteral("CREATE TABLE \"") + timetest + QStringLiteral("\" (t TIME)")));
- QVERIFY_SQL(q, exec(QStringLiteral("INSERT INTO \"") + timetest +
- QStringLiteral("\" VALUES ('1:2:3.666')")));
+ QVERIFY_SQL(q, exec(QStringLiteral("CREATE TABLE ") + timetest + QStringLiteral(" (t TIME)")));
+ QVERIFY_SQL(q, exec(QStringLiteral("INSERT INTO ") + timetest +
+ QStringLiteral(" VALUES ('1:2:3.666')")));
QSqlTableModel timetestModel(0,db);
timetestModel.setEditStrategy(QSqlTableModel::OnManualSubmit);
timetestModel.setTable(timetest);
- if (tst_Databases::getDatabaseType(db) == QSqlDriver::PostgreSQL)
- QEXPECT_FAIL("", "Currently broken for PostgreSQL due to case sensitivity problems - see QTBUG-65788", Abort);
QVERIFY_SQL(timetestModel, select());
QCOMPARE(timetestModel.record(0).field(0).value().toTime().toString("HH:mm:ss.zzz"), QString("01:02:03.666"));
@@ -3759,8 +3757,8 @@ void tst_QSqlQuery::QTBUG_5251()
QVERIFY_SQL(timetestModel, submitAll());
QCOMPARE(timetestModel.record(0).field(0).value().toTime().toString("HH:mm:ss.zzz"), QString("00:12:34.500"));
- QVERIFY_SQL(q, exec(QStringLiteral("UPDATE \"") + timetest +
- QStringLiteral("\" SET t = '0:11:22.33'")));
+ QVERIFY_SQL(q, exec(QStringLiteral("UPDATE ") + timetest +
+ QStringLiteral(" SET t = '0:11:22.33'")));
QVERIFY_SQL(timetestModel, select());
QCOMPARE(timetestModel.record(0).field(0).value().toTime().toString("HH:mm:ss.zzz"), QString("00:11:22.330"));
diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
index e4a277e096..722ef9c570 100644
--- a/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
+++ b/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
@@ -122,13 +122,13 @@ void tst_QSqlRelationalTableModel::recreateTestTables(QSqlDatabase db)
QVERIFY_SQL( q, exec("insert into " + reltest5 + " values('mister', 'Mr')"));
if (testWhiteSpaceNames(db.driverName())) {
- QString reltest6 = db.driver()->escapeIdentifier(qTableName("rel", __FILE__, db) + " test6", QSqlDriver::TableName);
+ const auto reltest6 = qTableName("rel test6", __FILE__, db);
QVERIFY_SQL( q, exec("create table " + reltest6 + " (id int not null primary key, " + db.driver()->escapeIdentifier("city key", QSqlDriver::FieldName) +
" int, " + db.driver()->escapeIdentifier("extra field", QSqlDriver::FieldName) + " int)"));
QVERIFY_SQL( q, exec("insert into " + reltest6 + " values(1, 1,9)"));
QVERIFY_SQL( q, exec("insert into " + reltest6 + " values(2, 2,8)"));
- QString reltest7 = db.driver()->escapeIdentifier(qTableName("rel", __FILE__, db) + " test7", QSqlDriver::TableName);
+ const auto reltest7 = qTableName("rel test7", __FILE__, db);
QVERIFY_SQL( q, exec("create table " + reltest7 + " (" + db.driver()->escapeIdentifier("city id", QSqlDriver::TableName) + " int not null primary key, " + db.driver()->escapeIdentifier("city name", QSqlDriver::FieldName) + " varchar(20))"));
QVERIFY_SQL( q, exec("insert into " + reltest7 + " values(1, 'New York')"));
QVERIFY_SQL( q, exec("insert into " + reltest7 + " values(2, 'Washington')"));
@@ -170,8 +170,8 @@ void tst_QSqlRelationalTableModel::dropTestTables( QSqlDatabase db )
<< reltest3
<< reltest4
<< reltest5
- << (qTableName("rel", __FILE__, db) + " test6")
- << (qTableName( "rel", __FILE__, db) + " test7")
+ << qTableName("rel test6", __FILE__, db)
+ << qTableName("rel test7", __FILE__, db)
<< qTableName("CASETEST1", db)
<< qTableName("casetest1", db);
tst_Databases::safeDropTables( db, tableNames );
@@ -1379,9 +1379,9 @@ void tst_QSqlRelationalTableModel::whiteSpaceInIdentifiers()
if (!testWhiteSpaceNames(db.driverName()))
QSKIP("White space test irrelevant for driver");
QSqlRelationalTableModel model(0, db);
- model.setTable(db.driver()->escapeIdentifier(qTableName("rel", __FILE__, db) + " test6", QSqlDriver::TableName));
+ model.setTable(qTableName("rel test6", __FILE__, db));
model.setSort(0, Qt::DescendingOrder);
- model.setRelation(1, QSqlRelation(db.driver()->escapeIdentifier(qTableName("rel", __FILE__, db) + " test7", QSqlDriver::TableName),
+ model.setRelation(1, QSqlRelation(qTableName("rel test7", __FILE__, db),
db.driver()->escapeIdentifier("city id", QSqlDriver::FieldName),
db.driver()->escapeIdentifier("city name", QSqlDriver::FieldName)));
QVERIFY_SQL(model, select());
@@ -1547,8 +1547,6 @@ void tst_QSqlRelationalTableModel::relationOnFirstColumn()
//modify the model data
QVERIFY_SQL(model, setData(model.index(0, 0), 40));
- if (tst_Databases::getDatabaseType(db) == QSqlDriver::PostgreSQL)
- QEXPECT_FAIL("", "Currently broken for PostgreSQL due to case sensitivity problems - see QTBUG-65788", Abort);
QVERIFY_SQL(model, submit());
QVERIFY_SQL(model, setData(model.index(1, 0), 50));
QVERIFY_SQL(model, submit());
diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
index da31f437d9..b617151a36 100644
--- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
+++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
@@ -383,8 +383,6 @@ void tst_QSqlTableModel::selectRow()
q.exec("UPDATE " + tbl + " SET a = 'Qt' WHERE id = 1");
QCOMPARE(model.data(idx).toString(), QString("b"));
model.selectRow(1);
- if (tst_Databases::getDatabaseType(db) == QSqlDriver::PostgreSQL)
- QEXPECT_FAIL("", "Currently broken for PostgreSQL due to case sensitivity problems - see QTBUG-65788", Abort);
QCOMPARE(model.data(idx).toString(), QString("Qt"));
// Check if selectRow() refreshes a changed row.
@@ -441,8 +439,6 @@ void tst_QSqlTableModel::selectRowOverride()
// both rows should have changed
QCOMPARE(model.data(idx).toString(), QString("Qt"));
idx = model.index(2, 1);
- if (tst_Databases::getDatabaseType(db) == QSqlDriver::PostgreSQL)
- QEXPECT_FAIL("", "Currently broken for PostgreSQL due to case sensitivity problems - see QTBUG-65788", Abort);
QCOMPARE(model.data(idx).toString(), QString("Qt"));
q.exec("DELETE FROM " + tbl);
@@ -854,8 +850,6 @@ void tst_QSqlTableModel::insertRowFailure()
// populate 1 row
const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db);
- if (dbType == QSqlDriver::PostgreSQL && submitpolicy != QSqlTableModel::OnManualSubmit)
- QEXPECT_FAIL("", "Currently broken for PostgreSQL due to case sensitivity problems - see QTBUG-65788", Abort);
QVERIFY_SQL(model, insertRecord(0, values));
QVERIFY_SQL(model, submitAll());
QVERIFY_SQL(model, select());
@@ -899,8 +893,6 @@ void tst_QSqlTableModel::insertRowFailure()
// restore empty table
model.revertAll();
QVERIFY_SQL(model, removeRow(0));
- if (dbType == QSqlDriver::PostgreSQL)
- QEXPECT_FAIL("", "Currently broken for PostgreSQL due to case sensitivity problems - see QTBUG-65788", Abort);
QVERIFY_SQL(model, submitAll());
QVERIFY_SQL(model, select());
QCOMPARE(model.rowCount(), 0);
@@ -2009,8 +2001,6 @@ void tst_QSqlTableModel::tableModifyWithBlank()
//Should be equivalent to QSqlQuery INSERT INTO... command)
QVERIFY_SQL(model, insertRow(0));
QVERIFY_SQL(model, setData(model.index(0,0),timeString));
- if (tst_Databases::getDatabaseType(db) == QSqlDriver::PostgreSQL)
- QEXPECT_FAIL("", "Currently broken for PostgreSQL due to case sensitivity problems - see QTBUG-65788", Abort);
QVERIFY_SQL(model, submitAll());
//set a filter on the table so the only record we get is the one we just made
diff --git a/tests/auto/testlib/outformat/outformat.pro b/tests/auto/testlib/outformat/outformat.pro
new file mode 100644
index 0000000000..ea02f3167f
--- /dev/null
+++ b/tests/auto/testlib/outformat/outformat.pro
@@ -0,0 +1,7 @@
+CONFIG += testcase
+QT = core testlib
+
+SOURCES += tst_outformat.cpp
+TARGET = outformat
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/outformat/tst_outformat.cpp b/tests/auto/testlib/outformat/tst_outformat.cpp
new file mode 100644
index 0000000000..5d131159a9
--- /dev/null
+++ b/tests/auto/testlib/outformat/tst_outformat.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+class tst_OutFormat : public QObject
+{
+ Q_OBJECT
+private slots:
+ void toHex_data() const;
+ void toHex() const;
+ // other formats of interest ?
+};
+
+void tst_OutFormat::toHex_data() const
+{
+ QTest::addColumn<QByteArray>("raw");
+ QTest::addColumn<QByteArray>("hex");
+
+ QTest::newRow("empty") << QByteArray("") << QByteArray("");
+ QTest::newRow("long")
+ << QByteArray("Truncates in ellipsis when more than fifty characters long")
+ << QByteArray("54 72 75 6E 63 61 74 65 73 20 69 6E 20 65 6C 6C "
+ "69 70 73 69 73 20 77 68 65 6E 20 6D 6F 72 65 20 "
+ "74 68 61 6E 20 66 69 66 74 79 20 63 68 61 72 61 "
+ "63 74 ...");
+ QTest::newRow("spaces")
+ << QByteArray(" \t\n\v\f\r") << QByteArray("20 09 0A 0B 0C 0D");
+ QTest::newRow("ASCII-escapes")
+ << QByteArray("\a\b\\\"'\177") << QByteArray("07 08 5C 22 27 7F");
+ // These are the ISO Latin-15 &nbsp;, pound, Euro, ..., y-umlaut
+ QTest::newRow("8-bit-sampler")
+ << QByteArray("\240\243\244\261\327\360\377") << QByteArray("A0 A3 A4 B1 D7 F0 FF");
+}
+
+void tst_OutFormat::toHex() const
+{
+ QFETCH(QByteArray, raw);
+ QFETCH(QByteArray, hex);
+ QScopedArrayPointer<char> repr(QTest::toHexRepresentation(raw.constData(), raw.size()));
+ QCOMPARE(repr.data(), hex);
+}
+
+QTEST_APPLESS_MAIN(tst_OutFormat)
+
+#include "tst_outformat.moc"
diff --git a/tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro b/tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro
index 306e8089f3..1aefc544d1 100644
--- a/tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro
+++ b/tests/auto/testlib/qabstractitemmodeltester/qabstractitemmodeltester.pro
@@ -11,3 +11,5 @@ SOURCES += \
HEADERS += \
$${mtdir}/dynamictreemodel.h
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp b/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp
index 0593ae74bf..60aa350145 100644
--- a/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp
+++ b/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp
@@ -79,9 +79,9 @@ void tst_QAbstractItemModelTester::treeWidgetModel()
root->removeChild(remove);
QTreeWidgetItem *parent = new QTreeWidgetItem(&widget, QStringList("parent"));
new QTreeWidgetItem(parent, QStringList("child"));
- widget.setItemHidden(parent, true);
+ parent->setHidden(true);
- widget.sortByColumn(0);
+ widget.sortByColumn(0, Qt::AscendingOrder);
}
void tst_QAbstractItemModelTester::standardItemModel()
diff --git a/tests/auto/testlib/qsignalspy/qsignalspy.pro b/tests/auto/testlib/qsignalspy/qsignalspy.pro
index 1578802bf8..5343a98c14 100644
--- a/tests/auto/testlib/qsignalspy/qsignalspy.pro
+++ b/tests/auto/testlib/qsignalspy/qsignalspy.pro
@@ -2,3 +2,5 @@ CONFIG += testcase
TARGET = tst_qsignalspy
SOURCES += tst_qsignalspy.cpp
QT = core testlib
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/alive/alive.pro b/tests/auto/testlib/selftests/alive/alive.pro
index d3df09b10d..bda0db2282 100644
--- a/tests/auto/testlib/selftests/alive/alive.pro
+++ b/tests/auto/testlib/selftests/alive/alive.pro
@@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target
TARGET = alive
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/assert/assert.pro b/tests/auto/testlib/selftests/assert/assert.pro
index cfc6a0c6b3..0692b6bdf2 100644
--- a/tests/auto/testlib/selftests/assert/assert.pro
+++ b/tests/auto/testlib/selftests/assert/assert.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = assert
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/badxml/badxml.pro b/tests/auto/testlib/selftests/badxml/badxml.pro
index 7b3b0f701c..4e15886504 100644
--- a/tests/auto/testlib/selftests/badxml/badxml.pro
+++ b/tests/auto/testlib/selftests/badxml/badxml.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = badxml
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro b/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro
index 6cbefe518c..12f068843e 100644
--- a/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro
+++ b/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = benchlibcallgrind
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp b/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp
index 0d3e884a56..fe83ee6608 100644
--- a/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp
+++ b/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp
@@ -68,9 +68,9 @@ void tst_BenchlibCallgrind::twoHundredMillionInstructions()
QBENCHMARK {
__asm__ __volatile__(
"mov $100000000,%%eax \n"
- "LOOPTOP: \n"
+ "1: \n"
"dec %%eax \n"
- "jnz LOOPTOP \n"
+ "jnz 1b \n"
: /* no output */
: /* no input */
: /* clobber */ "eax"
diff --git a/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro b/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro
index b495995eac..786511d057 100644
--- a/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro
+++ b/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = benchlibcounting
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro b/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro
index 5e2b963491..98fa0e4567 100644
--- a/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro
+++ b/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = benchlibeventcounter
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro b/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro
index f4bcc92129..0b627ecb10 100644
--- a/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro
+++ b/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = benchliboptions
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro b/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro
index ce0ec7012c..f0741d5c26 100644
--- a/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro
+++ b/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro
@@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target
TARGET = benchlibtickcounter
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro b/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro
index 0e689871ab..80d97a2422 100644
--- a/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro
+++ b/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro
@@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target
TARGET = benchlibwalltime
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/blacklisted/BLACKLIST b/tests/auto/testlib/selftests/blacklisted/BLACKLIST
index 36b7699cbd..a923c11416 100644
--- a/tests/auto/testlib/selftests/blacklisted/BLACKLIST
+++ b/tests/auto/testlib/selftests/blacklisted/BLACKLIST
@@ -1,12 +1,20 @@
-[pass]
+obscure # no such platform; is ignored
*
+
+[pass]
+!*
+
[skip]
*
+
[fail]
*
-[xpass]
-*
+
[xfail]
*
+
+[xpass]
+*
+
[messages]
*
diff --git a/tests/auto/testlib/selftests/blacklisted/blacklisted.pro b/tests/auto/testlib/selftests/blacklisted/blacklisted.pro
index 5bd22910b1..a8602ee266 100644
--- a/tests/auto/testlib/selftests/blacklisted/blacklisted.pro
+++ b/tests/auto/testlib/selftests/blacklisted/blacklisted.pro
@@ -5,3 +5,5 @@ mac: CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = blacklisted
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp b/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
index 8578752e22..90520385ec 100644
--- a/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
+++ b/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
@@ -45,7 +45,8 @@ private slots:
void messages();
};
-// All the tests below have been blacklisted in blacklisted/BLACKLIST
+// All the tests below except pass() have been blacklisted in blacklisted/BLACKLIST
+// Contrast with ../silent/, for the same tests without blacklisting but with -silent
void tst_Blacklisted::pass()
{
@@ -64,7 +65,7 @@ void tst_Blacklisted::fail()
void tst_Blacklisted::xfail()
{
- QEXPECT_FAIL("", "This test should XFAIL then BFAIL", Abort);
+ QEXPECT_FAIL("", "This test should XFAIL then BPASS", Abort);
QVERIFY(false);
}
diff --git a/tests/auto/testlib/selftests/cmptest/cmptest.pro b/tests/auto/testlib/selftests/cmptest/cmptest.pro
index 2d5dd071a9..f38f5ecce1 100644
--- a/tests/auto/testlib/selftests/cmptest/cmptest.pro
+++ b/tests/auto/testlib/selftests/cmptest/cmptest.pro
@@ -6,3 +6,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = cmptest
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro b/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro
index 056388333a..8032ba5a02 100644
--- a/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro
+++ b/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = commandlinedata
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/counting/counting.pro b/tests/auto/testlib/selftests/counting/counting.pro
index 8aa2fe5753..be3a5339b0 100644
--- a/tests/auto/testlib/selftests/counting/counting.pro
+++ b/tests/auto/testlib/selftests/counting/counting.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = counting
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/crashes/crashes.pro b/tests/auto/testlib/selftests/crashes/crashes.pro
index 25e24243d1..00fa07a415 100644
--- a/tests/auto/testlib/selftests/crashes/crashes.pro
+++ b/tests/auto/testlib/selftests/crashes/crashes.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = crashes
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/datatable/datatable.pro b/tests/auto/testlib/selftests/datatable/datatable.pro
index 72fa851ae6..12a1f697b1 100644
--- a/tests/auto/testlib/selftests/datatable/datatable.pro
+++ b/tests/auto/testlib/selftests/datatable/datatable.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = datatable
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/datetime/datetime.pro b/tests/auto/testlib/selftests/datetime/datetime.pro
index d65c59354f..1524281090 100644
--- a/tests/auto/testlib/selftests/datetime/datetime.pro
+++ b/tests/auto/testlib/selftests/datetime/datetime.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = datetime
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/deleteLater/deleteLater.pro b/tests/auto/testlib/selftests/deleteLater/deleteLater.pro
index 6847238b1d..9a10096461 100644
--- a/tests/auto/testlib/selftests/deleteLater/deleteLater.pro
+++ b/tests/auto/testlib/selftests/deleteLater/deleteLater.pro
@@ -5,3 +5,5 @@ CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = tst_deleteLater
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro b/tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro
index f860a767cd..6f2b253c14 100644
--- a/tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro
+++ b/tests/auto/testlib/selftests/deleteLater_noApp/deleteLater_noApp.pro
@@ -5,3 +5,5 @@ CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = tst_deleteLater_noApp
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/differentexec/differentexec.pro b/tests/auto/testlib/selftests/differentexec/differentexec.pro
index 7f148ba996..339962f609 100644
--- a/tests/auto/testlib/selftests/differentexec/differentexec.pro
+++ b/tests/auto/testlib/selftests/differentexec/differentexec.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = differentexec
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro b/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro
index fe89f6f3cd..5473ec32c3 100644
--- a/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro
+++ b/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro
@@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target
CONFIG += exceptions
TARGET = exceptionthrow
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/expected_blacklisted.lightxml b/tests/auto/testlib/selftests/expected_blacklisted.lightxml
index 4193628e7c..98d7a38ca9 100644
--- a/tests/auto/testlib/selftests/expected_blacklisted.lightxml
+++ b/tests/auto/testlib/selftests/expected_blacklisted.lightxml
@@ -25,7 +25,7 @@
</TestFunction>
<TestFunction name="xfail">
<Incident type="xfail" file="qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp" line="0">
- <Description><![CDATA[This test should XFAIL then BFAIL]]></Description>
+ <Description><![CDATA[This test should XFAIL then BPASS]]></Description>
</Incident>
<Incident type="bpass" file="" line="0" />
<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_blacklisted.tap b/tests/auto/testlib/selftests/expected_blacklisted.tap
new file mode 100644
index 0000000000..f26155ded0
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_blacklisted.tap
@@ -0,0 +1,43 @@
+TAP version 13
+# tst_Blacklisted
+ok 1 - initTestCase()
+ok 2 - pass() # TODO
+ok 3 - skip() # SKIP This test should SKIP
+not ok 4 - fail() # TODO 'false' returned FALSE. (This test should BFAIL)
+ ---
+ type: QVERIFY
+ message: This test should BFAIL
+ wanted: true (false)
+ found: false (false)
+ expected: true (false)
+ actual: false (false)
+ at: tst_Blacklisted::fail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:63)
+ file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
+ line: 63
+ ...
+not ok 5 - xfail() # TODO This test should XFAIL then BPASS
+ ---
+ at: tst_Blacklisted::xfail() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:69)
+ file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
+ line: 69
+ ...
+ok 5 - xfail() # TODO
+ok 6 - xpass() # TODO 'true' returned TRUE unexpectedly. (This test should XPASS, blacklist ignored for XPASS)
+# This is a warning that should not appear in silent test output
+# This is an internal testlib warning that should not appear in silent test output
+# This is a debug message that should not appear in silent test output
+# This is a critical message that should not appear in silent test output
+# This is an info message that should not appear in silent test output
+# This is an internal testlib info message that should not appear in silent test output
+# This is a fatal error message that should still appear in silent test output
+not ok 7 - messages() # TODO Received a fatal error.
+ ---
+ # Received a fatal error.
+ at: tst_Blacklisted::messages() (Unknown file:0)
+ file: Unknown file
+ line: 0
+ ...
+1..7
+# tests 7
+# pass 1
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_blacklisted.teamcity b/tests/auto/testlib/selftests/expected_blacklisted.teamcity
index 8180a7ce76..df58208fb3 100644
--- a/tests/auto/testlib/selftests/expected_blacklisted.teamcity
+++ b/tests/auto/testlib/selftests/expected_blacklisted.teamcity
@@ -7,7 +7,7 @@
##teamcity[testStarted name='fail()' flowId='tst_Blacklisted']
##teamcity[testFinished name='fail()' flowId='tst_Blacklisted']
##teamcity[testStarted name='xfail()' flowId='tst_Blacklisted']
-##teamcity[testStdOut name='xfail()' out='XFAIL |[Loc: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)|]: This test should XFAIL then BFAIL' flowId='tst_Blacklisted']
+##teamcity[testStdOut name='xfail()' out='XFAIL |[Loc: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)|]: This test should XFAIL then BPASS' flowId='tst_Blacklisted']
##teamcity[testFinished name='xfail()' flowId='tst_Blacklisted']
##teamcity[testStarted name='xpass()' flowId='tst_Blacklisted']
##teamcity[testFailed name='xpass()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)|]' details='|'true|' returned TRUE unexpectedly. (This test should XPASS, blacklist ignored for XPASS)' flowId='tst_Blacklisted']
diff --git a/tests/auto/testlib/selftests/expected_blacklisted.txt b/tests/auto/testlib/selftests/expected_blacklisted.txt
index 6fa2403b59..3cfe40eb12 100644
--- a/tests/auto/testlib/selftests/expected_blacklisted.txt
+++ b/tests/auto/testlib/selftests/expected_blacklisted.txt
@@ -6,7 +6,7 @@ SKIP : tst_Blacklisted::skip() This test should SKIP
Loc: [qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)]
BFAIL : tst_Blacklisted::fail() 'false' returned FALSE. (This test should BFAIL)
Loc: [qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)]
-XFAIL : tst_Blacklisted::xfail() This test should XFAIL then BFAIL
+XFAIL : tst_Blacklisted::xfail() This test should XFAIL then BPASS
Loc: [qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)]
BPASS : tst_Blacklisted::xfail()
XPASS : tst_Blacklisted::xpass() 'true' returned TRUE unexpectedly. (This test should XPASS, blacklist ignored for XPASS)
diff --git a/tests/auto/testlib/selftests/expected_blacklisted.xml b/tests/auto/testlib/selftests/expected_blacklisted.xml
index 443bc6b199..f0387bae00 100644
--- a/tests/auto/testlib/selftests/expected_blacklisted.xml
+++ b/tests/auto/testlib/selftests/expected_blacklisted.xml
@@ -27,7 +27,7 @@
</TestFunction>
<TestFunction name="xfail">
<Incident type="xfail" file="qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp" line="0">
- <Description><![CDATA[This test should XFAIL then BFAIL]]></Description>
+ <Description><![CDATA[This test should XFAIL then BPASS]]></Description>
</Incident>
<Incident type="bpass" file="" line="0" />
<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_blacklisted.xunitxml b/tests/auto/testlib/selftests/expected_blacklisted.xunitxml
index 2752bc18b4..e2d0cd009b 100644
--- a/tests/auto/testlib/selftests/expected_blacklisted.xunitxml
+++ b/tests/auto/testlib/selftests/expected_blacklisted.xunitxml
@@ -12,7 +12,7 @@
</testcase>
<testcase result="bfail" name="fail"/>
<testcase result="xfail" name="xfail">
- <!-- message="This test should XFAIL then BFAIL" type="info" -->
+ <!-- message="This test should XFAIL then BPASS" type="info" -->
</testcase>
<testcase result="xpass" name="xpass">
<failure message="&apos;true&apos; returned TRUE unexpectedly. (This test should XPASS, blacklist ignored for XPASS)" result="xpass"/>
@@ -28,7 +28,7 @@
</testcase>
<system-err>
<![CDATA[This test should SKIP]]>
-<![CDATA[This test should XFAIL then BFAIL]]>
+<![CDATA[This test should XFAIL then BPASS]]>
<![CDATA[This is a warning that should not appear in silent test output]]>
<![CDATA[This is an internal testlib warning that should not appear in silent test output]]>
<![CDATA[This is a debug message that should not appear in silent test output]]>
diff --git a/tests/auto/testlib/selftests/expected_faildatatype.lightxml b/tests/auto/testlib/selftests/expected_faildatatype.lightxml
new file mode 100644
index 0000000000..24992b78af
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_faildatatype.lightxml
@@ -0,0 +1,22 @@
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="value">
+<Message type="qdebug" file="" line="0">
+ <Description><![CDATA[expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string']]></Description>
+</Message>
+<Message type="qfatal" file="" line="0">
+ <Description><![CDATA[ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0]]></Description>
+</Message>
+<Incident type="fail" file="Unknown file" line="0">
+ <Description><![CDATA[Received a fatal error.]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_faildatatype.tap b/tests/auto/testlib/selftests/expected_faildatatype.tap
new file mode 100644
index 0000000000..684cea4126
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_faildatatype.tap
@@ -0,0 +1,16 @@
+TAP version 13
+# tst_FailDataType
+ok 1 - initTestCase()
+# expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string'
+# ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0
+not ok 2 - value()
+ ---
+ # Received a fatal error.
+ at: tst_FailDataType::value() (Unknown file:0)
+ file: Unknown file
+ line: 0
+ ...
+1..2
+# tests 2
+# pass 1
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_faildatatype.teamcity b/tests/auto/testlib/selftests/expected_faildatatype.teamcity
new file mode 100644
index 0000000000..82731ae09e
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_faildatatype.teamcity
@@ -0,0 +1,8 @@
+##teamcity[testSuiteStarted name='tst_FailDataType' flowId='tst_FailDataType']
+##teamcity[testStarted name='initTestCase()' flowId='tst_FailDataType']
+##teamcity[testFinished name='initTestCase()' flowId='tst_FailDataType']
+##teamcity[testStarted name='value()' flowId='tst_FailDataType']
+##teamcity[testFailed name='value()' message='Failure! |[Loc: Unknown file(0)|]' details='Received a fatal error.' flowId='tst_FailDataType']
+##teamcity[testStdOut name='value()' out='QDEBUG: expected data of type |'QString|', got |'bool|' for element 0 of data with tag |'bool-as-string|'|nQFATAL: ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0' flowId='tst_FailDataType']
+##teamcity[testFinished name='value()' flowId='tst_FailDataType']
+##teamcity[testSuiteFinished name='tst_FailDataType' flowId='tst_FailDataType']
diff --git a/tests/auto/testlib/selftests/expected_faildatatype.txt b/tests/auto/testlib/selftests/expected_faildatatype.txt
new file mode 100644
index 0000000000..4cfe3b7654
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_faildatatype.txt
@@ -0,0 +1,9 @@
+********* Start testing of tst_FailDataType *********
+Config: Using QtTest library
+PASS : tst_FailDataType::initTestCase()
+QDEBUG : tst_FailDataType::value() expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string'
+QFATAL : tst_FailDataType::value() ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0
+FAIL! : tst_FailDataType::value() Received a fatal error.
+ Loc: [Unknown file(0)]
+Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms
+********* Finished testing of tst_FailDataType *********
diff --git a/tests/auto/testlib/selftests/expected_faildatatype.xml b/tests/auto/testlib/selftests/expected_faildatatype.xml
new file mode 100644
index 0000000000..8812bfab71
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_faildatatype.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestCase name="tst_FailDataType">
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="value">
+<Message type="qdebug" file="" line="0">
+ <Description><![CDATA[expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string']]></Description>
+</Message>
+<Message type="qfatal" file="" line="0">
+ <Description><![CDATA[ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0]]></Description>
+</Message>
+<Incident type="fail" file="Unknown file" line="0">
+ <Description><![CDATA[Received a fatal error.]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
+</TestCase>
diff --git a/tests/auto/testlib/selftests/expected_faildatatype.xunitxml b/tests/auto/testlib/selftests/expected_faildatatype.xunitxml
new file mode 100644
index 0000000000..fcc0db3892
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_faildatatype.xunitxml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="2" failures="1" tests="2" name="tst_FailDataType">
+ <properties>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
+ <property value="" name="QtBuild"/>
+ </properties>
+ <testcase result="pass" name="initTestCase"/>
+ <testcase result="fail" name="value">
+ <!-- message="expected data of type &apos;QString&apos;, got &apos;bool&apos; for element 0 of data with tag &apos;bool&#x002D;as&#x002D;string&apos;" type="qdebug" -->
+ <!-- message="ASSERT: &quot;false&quot; in file qtbase/src/testlib/qtestdata.cpp, line 92" type="qfatal" -->
+ <failure message="Received a fatal error." result="fail"/>
+ </testcase>
+ <system-err>
+<![CDATA[expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string']]>
+<![CDATA[ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0]]>
+ </system-err>
+</testsuite>
diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.lightxml b/tests/auto/testlib/selftests/expected_failfetchtype.lightxml
new file mode 100644
index 0000000000..f7c84a1876
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failfetchtype.lightxml
@@ -0,0 +1,21 @@
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="fetch">
+<Message type="qfatal" file="" line="0">
+ <DataTag><![CDATA[bool]]></DataTag>
+ <Description><![CDATA[Requested type 'QString' does not match available type 'bool'.]]></Description>
+</Message>
+<Incident type="fail" file="Unknown file" line="0">
+ <DataTag><![CDATA[bool]]></DataTag>
+ <Description><![CDATA[Received a fatal error.]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.tap b/tests/auto/testlib/selftests/expected_failfetchtype.tap
new file mode 100644
index 0000000000..94c3b6e1b2
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failfetchtype.tap
@@ -0,0 +1,15 @@
+TAP version 13
+# tst_FailFetchType
+ok 1 - initTestCase()
+# Requested type 'QString' does not match available type 'bool'.
+not ok 2 - fetch(bool)
+ ---
+ # Received a fatal error.
+ at: tst_FailFetchType::fetch() (Unknown file:0)
+ file: Unknown file
+ line: 0
+ ...
+1..2
+# tests 2
+# pass 1
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.teamcity b/tests/auto/testlib/selftests/expected_failfetchtype.teamcity
new file mode 100644
index 0000000000..91cf0c6ae8
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failfetchtype.teamcity
@@ -0,0 +1,8 @@
+##teamcity[testSuiteStarted name='tst_FailFetchType' flowId='tst_FailFetchType']
+##teamcity[testStarted name='initTestCase()' flowId='tst_FailFetchType']
+##teamcity[testFinished name='initTestCase()' flowId='tst_FailFetchType']
+##teamcity[testStarted name='fetch(bool)' flowId='tst_FailFetchType']
+##teamcity[testFailed name='fetch(bool)' message='Failure! |[Loc: Unknown file(0)|]' details='Received a fatal error.' flowId='tst_FailFetchType']
+##teamcity[testStdOut name='fetch(bool)' out='QFATAL: Requested type |'QString|' does not match available type |'bool|'.' flowId='tst_FailFetchType']
+##teamcity[testFinished name='fetch(bool)' flowId='tst_FailFetchType']
+##teamcity[testSuiteFinished name='tst_FailFetchType' flowId='tst_FailFetchType']
diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.txt b/tests/auto/testlib/selftests/expected_failfetchtype.txt
new file mode 100644
index 0000000000..d12cf0dc7d
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failfetchtype.txt
@@ -0,0 +1,8 @@
+********* Start testing of tst_FailFetchType *********
+Config: Using QtTest library
+PASS : tst_FailFetchType::initTestCase()
+QFATAL : tst_FailFetchType::fetch(bool) Requested type 'QString' does not match available type 'bool'.
+FAIL! : tst_FailFetchType::fetch(bool) Received a fatal error.
+ Loc: [Unknown file(0)]
+Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms
+********* Finished testing of tst_FailFetchType *********
diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.xml b/tests/auto/testlib/selftests/expected_failfetchtype.xml
new file mode 100644
index 0000000000..a349baa710
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failfetchtype.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestCase name="tst_FailFetchType">
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="fetch">
+<Message type="qfatal" file="" line="0">
+ <DataTag><![CDATA[bool]]></DataTag>
+ <Description><![CDATA[Requested type 'QString' does not match available type 'bool'.]]></Description>
+</Message>
+<Incident type="fail" file="Unknown file" line="0">
+ <DataTag><![CDATA[bool]]></DataTag>
+ <Description><![CDATA[Received a fatal error.]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
+</TestCase>
diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.xunitxml b/tests/auto/testlib/selftests/expected_failfetchtype.xunitxml
new file mode 100644
index 0000000000..a54a37a913
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_failfetchtype.xunitxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="1" failures="1" tests="2" name="tst_FailFetchType">
+ <properties>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
+ <property value="" name="QtBuild"/>
+ </properties>
+ <testcase result="pass" name="initTestCase"/>
+ <testcase result="fail" name="fetch">
+ <!-- tag="bool" message="Requested type &apos;QString&apos; does not match available type &apos;bool&apos;." type="qfatal" -->
+ <failure tag="bool" message="Received a fatal error." result="fail"/>
+ </testcase>
+ <system-err>
+<![CDATA[Requested type 'QString' does not match available type 'bool'.]]>
+ </system-err>
+</testsuite>
diff --git a/tests/auto/testlib/selftests/expected_float.lightxml b/tests/auto/testlib/selftests/expected_float.lightxml
index 0dbc5dd8c8..37ccbfc2c5 100644
--- a/tests/auto/testlib/selftests/expected_float.lightxml
+++ b/tests/auto/testlib/selftests/expected_float.lightxml
@@ -34,6 +34,33 @@
</Incident>
<Duration msecs="0"/>
</TestFunction>
+<TestFunction name="float16Comparisons">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should SUCCEED 1]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 1]]></DataTag>
+ <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): 3]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 2]]></DataTag>
+ <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 0.0001
+ Expected (operandRight): 0.0003]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 3]]></DataTag>
+ <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 98
+ Expected (operandRight): 99]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should SUCCEED 2]]></DataTag>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
<TestFunction name="compareFloatTests">
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
<DataTag><![CDATA[1e0]]></DataTag>
diff --git a/tests/auto/testlib/selftests/expected_float.tap b/tests/auto/testlib/selftests/expected_float.tap
index fae2dc9796..158eff1470 100644
--- a/tests/auto/testlib/selftests/expected_float.tap
+++ b/tests/auto/testlib/selftests/expected_float.tap
@@ -10,9 +10,9 @@ not ok 3 - floatComparisons(should FAIL 1)
found: 1 (operandLeft)
expected: 3 (operandRight)
actual: 1 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:48)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 48
+ line: 51
...
not ok 4 - floatComparisons(should FAIL 2)
---
@@ -22,9 +22,9 @@ not ok 4 - floatComparisons(should FAIL 2)
found: 1e-07 (operandLeft)
expected: 3e-07 (operandRight)
actual: 1e-07 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:48)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 48
+ line: 51
...
not ok 5 - floatComparisons(should FAIL 3)
---
@@ -34,12 +34,50 @@ not ok 5 - floatComparisons(should FAIL 3)
found: 99998 (operandLeft)
expected: 99999 (operandRight)
actual: 99998 (operandLeft)
- at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:48)
+ at: tst_float::floatComparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:51)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 48
+ line: 51
...
ok 6 - floatComparisons(should SUCCEED 2)
-not ok 7 - compareFloatTests(1e0)
+ok 7 - float16Comparisons(should SUCCEED 1)
+not ok 8 - float16Comparisons(should FAIL 1)
+ ---
+ type: QCOMPARE
+ message: Compared qfloat16s are not the same (fuzzy compare)
+ wanted: 3 (operandRight)
+ found: 1 (operandLeft)
+ expected: 3 (operandRight)
+ actual: 1 (operandLeft)
+ at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:90)
+ file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
+ line: 90
+ ...
+not ok 9 - float16Comparisons(should FAIL 2)
+ ---
+ type: QCOMPARE
+ message: Compared qfloat16s are not the same (fuzzy compare)
+ wanted: 0.0003 (operandRight)
+ found: 0.0001 (operandLeft)
+ expected: 0.0003 (operandRight)
+ actual: 0.0001 (operandLeft)
+ at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:90)
+ file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
+ line: 90
+ ...
+not ok 10 - float16Comparisons(should FAIL 3)
+ ---
+ type: QCOMPARE
+ message: Compared qfloat16s are not the same (fuzzy compare)
+ wanted: 99 (operandRight)
+ found: 98 (operandLeft)
+ expected: 99 (operandRight)
+ actual: 98 (operandLeft)
+ at: tst_float::float16Comparisons() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:90)
+ file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
+ line: 90
+ ...
+ok 11 - float16Comparisons(should SUCCEED 2)
+not ok 12 - compareFloatTests(1e0)
---
type: QCOMPARE
message: Compared floats are not the same (fuzzy compare)
@@ -47,11 +85,11 @@ not ok 7 - compareFloatTests(1e0)
found: 1 (t1)
expected: 3 (t3)
actual: 1 (t1)
- at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:96)
+ at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:135)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 96
+ line: 135
...
-not ok 8 - compareFloatTests(1e-7)
+not ok 13 - compareFloatTests(1e-7)
---
type: QCOMPARE
message: Compared floats are not the same (fuzzy compare)
@@ -59,11 +97,11 @@ not ok 8 - compareFloatTests(1e-7)
found: 1e-07 (t1)
expected: 3e-07 (t3)
actual: 1e-07 (t1)
- at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:96)
+ at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:135)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 96
+ line: 135
...
-not ok 9 - compareFloatTests(1e+7)
+not ok 14 - compareFloatTests(1e+7)
---
type: QCOMPARE
message: Compared floats are not the same (fuzzy compare)
@@ -71,12 +109,12 @@ not ok 9 - compareFloatTests(1e+7)
found: 1e+07 (t1)
expected: 3e+07 (t3)
actual: 1e+07 (t1)
- at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:96)
+ at: tst_float::compareFloatTests() (qtbase/tests/auto/testlib/selftests/float/tst_float.cpp:135)
file: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp
- line: 96
+ line: 135
...
-ok 10 - cleanupTestCase()
-1..10
-# tests 10
-# pass 4
-# fail 6
+ok 15 - cleanupTestCase()
+1..15
+# tests 15
+# pass 6
+# fail 9
diff --git a/tests/auto/testlib/selftests/expected_float.teamcity b/tests/auto/testlib/selftests/expected_float.teamcity
index d5b81593d8..140dc7edf9 100644
--- a/tests/auto/testlib/selftests/expected_float.teamcity
+++ b/tests/auto/testlib/selftests/expected_float.teamcity
@@ -14,6 +14,19 @@
##teamcity[testFinished name='floatComparisons(should FAIL 3)' flowId='tst_float']
##teamcity[testStarted name='floatComparisons(should SUCCEED 2)' flowId='tst_float']
##teamcity[testFinished name='floatComparisons(should SUCCEED 2)' flowId='tst_float']
+##teamcity[testStarted name='float16Comparisons(should SUCCEED 1)' flowId='tst_float']
+##teamcity[testFinished name='float16Comparisons(should SUCCEED 1)' flowId='tst_float']
+##teamcity[testStarted name='float16Comparisons(should FAIL 1)' flowId='tst_float']
+##teamcity[testFailed name='float16Comparisons(should FAIL 1)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)|]' details='Compared qfloat16s are not the same (fuzzy compare)|n Actual (operandLeft) : 1|n Expected (operandRight): 3' flowId='tst_float']
+##teamcity[testFinished name='float16Comparisons(should FAIL 1)' flowId='tst_float']
+##teamcity[testStarted name='float16Comparisons(should FAIL 2)' flowId='tst_float']
+##teamcity[testFailed name='float16Comparisons(should FAIL 2)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)|]' details='Compared qfloat16s are not the same (fuzzy compare)|n Actual (operandLeft) : 0.0001|n Expected (operandRight): 0.0003' flowId='tst_float']
+##teamcity[testFinished name='float16Comparisons(should FAIL 2)' flowId='tst_float']
+##teamcity[testStarted name='float16Comparisons(should FAIL 3)' flowId='tst_float']
+##teamcity[testFailed name='float16Comparisons(should FAIL 3)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)|]' details='Compared qfloat16s are not the same (fuzzy compare)|n Actual (operandLeft) : 98|n Expected (operandRight): 99' flowId='tst_float']
+##teamcity[testFinished name='float16Comparisons(should FAIL 3)' flowId='tst_float']
+##teamcity[testStarted name='float16Comparisons(should SUCCEED 2)' flowId='tst_float']
+##teamcity[testFinished name='float16Comparisons(should SUCCEED 2)' flowId='tst_float']
##teamcity[testStarted name='compareFloatTests(1e0)' flowId='tst_float']
##teamcity[testFailed name='compareFloatTests(1e0)' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)|]' details='Compared floats are not the same (fuzzy compare)|n Actual (t1): 1|n Expected (t3): 3' flowId='tst_float']
##teamcity[testFinished name='compareFloatTests(1e0)' flowId='tst_float']
diff --git a/tests/auto/testlib/selftests/expected_float.txt b/tests/auto/testlib/selftests/expected_float.txt
index 8abea6a67e..4e3554758d 100644
--- a/tests/auto/testlib/selftests/expected_float.txt
+++ b/tests/auto/testlib/selftests/expected_float.txt
@@ -15,6 +15,20 @@ FAIL! : tst_float::floatComparisons(should FAIL 3) Compared floats are not the
Expected (operandRight): 99999
Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)]
PASS : tst_float::floatComparisons(should SUCCEED 2)
+PASS : tst_float::float16Comparisons(should SUCCEED 1)
+FAIL! : tst_float::float16Comparisons(should FAIL 1) Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): 3
+ Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)]
+FAIL! : tst_float::float16Comparisons(should FAIL 2) Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 0.0001
+ Expected (operandRight): 0.0003
+ Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)]
+FAIL! : tst_float::float16Comparisons(should FAIL 3) Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 98
+ Expected (operandRight): 99
+ Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)]
+PASS : tst_float::float16Comparisons(should SUCCEED 2)
FAIL! : tst_float::compareFloatTests(1e0) Compared floats are not the same (fuzzy compare)
Actual (t1): 1
Expected (t3): 3
@@ -28,5 +42,5 @@ FAIL! : tst_float::compareFloatTests(1e+7) Compared floats are not the same (fu
Expected (t3): 3e+07
Loc: [qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(0)]
PASS : tst_float::cleanupTestCase()
-Totals: 4 passed, 6 failed, 0 skipped, 0 blacklisted, 0ms
+Totals: 6 passed, 9 failed, 0 skipped, 0 blacklisted, 0ms
********* Finished testing of tst_float *********
diff --git a/tests/auto/testlib/selftests/expected_float.xml b/tests/auto/testlib/selftests/expected_float.xml
index 096e1a5b54..1f17d48d1b 100644
--- a/tests/auto/testlib/selftests/expected_float.xml
+++ b/tests/auto/testlib/selftests/expected_float.xml
@@ -36,6 +36,33 @@
</Incident>
<Duration msecs="0"/>
</TestFunction>
+<TestFunction name="float16Comparisons">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should SUCCEED 1]]></DataTag>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 1]]></DataTag>
+ <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): 3]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 2]]></DataTag>
+ <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 0.0001
+ Expected (operandRight): 0.0003]]></Description>
+</Incident>
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
+ <DataTag><![CDATA[should FAIL 3]]></DataTag>
+ <Description><![CDATA[Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 98
+ Expected (operandRight): 99]]></Description>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[should SUCCEED 2]]></DataTag>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
<TestFunction name="compareFloatTests">
<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/float/tst_float.cpp" line="0">
<DataTag><![CDATA[1e0]]></DataTag>
diff --git a/tests/auto/testlib/selftests/expected_float.xunitxml b/tests/auto/testlib/selftests/expected_float.xunitxml
index 5de14e8d9b..87f11ccba5 100644
--- a/tests/auto/testlib/selftests/expected_float.xunitxml
+++ b/tests/auto/testlib/selftests/expected_float.xunitxml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite errors="0" failures="6" tests="4" name="tst_float">
+<testsuite errors="0" failures="9" tests="5" name="tst_float">
<properties>
<property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
<property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
@@ -17,6 +17,17 @@
Actual (operandLeft) : 99998
Expected (operandRight): 99999" result="fail"/>
</testcase>
+ <testcase result="fail" name="float16Comparisons">
+ <failure tag="should FAIL 1" message="Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 1
+ Expected (operandRight): 3" result="fail"/>
+ <failure tag="should FAIL 2" message="Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 0.0001
+ Expected (operandRight): 0.0003" result="fail"/>
+ <failure tag="should FAIL 3" message="Compared qfloat16s are not the same (fuzzy compare)
+ Actual (operandLeft) : 98
+ Expected (operandRight): 99" result="fail"/>
+ </testcase>
<testcase result="fail" name="compareFloatTests">
<failure tag="1e0" message="Compared floats are not the same (fuzzy compare)
Actual (t1): 1
diff --git a/tests/auto/testlib/selftests/expected_testlib.lightxml b/tests/auto/testlib/selftests/expected_testlib.lightxml
new file mode 100644
index 0000000000..47f5edc07d
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_testlib.lightxml
@@ -0,0 +1,45 @@
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="basics">
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp" line="0">
+ <Description><![CDATA[Compared pointers are not the same]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="delays">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="reals">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[zero]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[self-qQNaN]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[self-qInf]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[infineg]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[Sin(turn/4)]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[Cos(turn/2)]]></DataTag>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="cleanupTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_testlib.tap b/tests/auto/testlib/selftests/expected_testlib.tap
new file mode 100644
index 0000000000..d85b23b7d4
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_testlib.tap
@@ -0,0 +1,22 @@
+TAP version 13
+# tst_TestLib
+ok 1 - initTestCase()
+not ok 2 - basics()
+ ---
+ # Compared pointers are not the same
+ at: tst_TestLib::basics() (qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp:54)
+ file: qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp
+ line: 54
+ ...
+ok 3 - delays()
+ok 4 - reals(zero)
+ok 5 - reals(self-qQNaN)
+ok 6 - reals(self-qInf)
+ok 7 - reals(infineg)
+ok 8 - reals(Sin(turn/4))
+ok 9 - reals(Cos(turn/2))
+ok 10 - cleanupTestCase()
+1..10
+# tests 10
+# pass 9
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_testlib.teamcity b/tests/auto/testlib/selftests/expected_testlib.teamcity
new file mode 100644
index 0000000000..11617121e2
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_testlib.teamcity
@@ -0,0 +1,23 @@
+##teamcity[testSuiteStarted name='tst_TestLib' flowId='tst_TestLib']
+##teamcity[testStarted name='initTestCase()' flowId='tst_TestLib']
+##teamcity[testFinished name='initTestCase()' flowId='tst_TestLib']
+##teamcity[testStarted name='basics()' flowId='tst_TestLib']
+##teamcity[testFailed name='basics()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp(0)|]' details='Compared pointers are not the same' flowId='tst_TestLib']
+##teamcity[testFinished name='basics()' flowId='tst_TestLib']
+##teamcity[testStarted name='delays()' flowId='tst_TestLib']
+##teamcity[testFinished name='delays()' flowId='tst_TestLib']
+##teamcity[testStarted name='reals(zero)' flowId='tst_TestLib']
+##teamcity[testFinished name='reals(zero)' flowId='tst_TestLib']
+##teamcity[testStarted name='reals(self-qQNaN)' flowId='tst_TestLib']
+##teamcity[testFinished name='reals(self-qQNaN)' flowId='tst_TestLib']
+##teamcity[testStarted name='reals(self-qInf)' flowId='tst_TestLib']
+##teamcity[testFinished name='reals(self-qInf)' flowId='tst_TestLib']
+##teamcity[testStarted name='reals(infineg)' flowId='tst_TestLib']
+##teamcity[testFinished name='reals(infineg)' flowId='tst_TestLib']
+##teamcity[testStarted name='reals(Sin(turn/4))' flowId='tst_TestLib']
+##teamcity[testFinished name='reals(Sin(turn/4))' flowId='tst_TestLib']
+##teamcity[testStarted name='reals(Cos(turn/2))' flowId='tst_TestLib']
+##teamcity[testFinished name='reals(Cos(turn/2))' flowId='tst_TestLib']
+##teamcity[testStarted name='cleanupTestCase()' flowId='tst_TestLib']
+##teamcity[testFinished name='cleanupTestCase()' flowId='tst_TestLib']
+##teamcity[testSuiteFinished name='tst_TestLib' flowId='tst_TestLib']
diff --git a/tests/auto/testlib/selftests/expected_testlib.txt b/tests/auto/testlib/selftests/expected_testlib.txt
new file mode 100644
index 0000000000..a3f463e7d4
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_testlib.txt
@@ -0,0 +1,15 @@
+********* Start testing of tst_TestLib *********
+Config: Using QtTest library
+PASS : tst_TestLib::initTestCase()
+FAIL! : tst_TestLib::basics() Compared pointers are not the same
+ Loc: [qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp(0)]
+PASS : tst_TestLib::delays()
+PASS : tst_TestLib::reals(zero)
+PASS : tst_TestLib::reals(self-qQNaN)
+PASS : tst_TestLib::reals(self-qInf)
+PASS : tst_TestLib::reals(infineg)
+PASS : tst_TestLib::reals(Sin(turn/4))
+PASS : tst_TestLib::reals(Cos(turn/2))
+PASS : tst_TestLib::cleanupTestCase()
+Totals: 9 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms
+********* Finished testing of tst_TestLib *********
diff --git a/tests/auto/testlib/selftests/expected_testlib.xml b/tests/auto/testlib/selftests/expected_testlib.xml
new file mode 100644
index 0000000000..3aca904ac1
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_testlib.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestCase name="tst_TestLib">
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="basics">
+<Incident type="fail" file="qtbase/tests/auto/testlib/selftests/testlib/tst_testlib.cpp" line="0">
+ <Description><![CDATA[Compared pointers are not the same]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="delays">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="reals">
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[zero]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[self-qQNaN]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[self-qInf]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[infineg]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[Sin(turn/4)]]></DataTag>
+</Incident>
+<Incident type="pass" file="" line="0">
+ <DataTag><![CDATA[Cos(turn/2)]]></DataTag>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="cleanupTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
+</TestCase>
diff --git a/tests/auto/testlib/selftests/expected_testlib.xunitxml b/tests/auto/testlib/selftests/expected_testlib.xunitxml
new file mode 100644
index 0000000000..c9c67c7c9a
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_testlib.xunitxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="0" failures="1" tests="5" name="tst_TestLib">
+ <properties>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
+ <property value="" name="QtBuild"/>
+ </properties>
+ <testcase result="pass" name="initTestCase"/>
+ <testcase result="fail" name="basics">
+ <failure message="Compared pointers are not the same" result="fail"/>
+ </testcase>
+ <testcase result="pass" name="delays"/>
+ <testcase result="pass" name="reals"/>
+ <testcase result="pass" name="cleanupTestCase"/>
+ <system-err/>
+</testsuite>
diff --git a/tests/auto/testlib/selftests/expected_watchdog.lightxml b/tests/auto/testlib/selftests/expected_watchdog.lightxml
new file mode 100644
index 0000000000..1070324f2a
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_watchdog.lightxml
@@ -0,0 +1,19 @@
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="delay">
+<Message type="qfatal" file="" line="0">
+ <Description><![CDATA[Test function timed out]]></Description>
+</Message>
+<Incident type="fail" file="Unknown file" line="0">
+ <Description><![CDATA[Received a fatal error.]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_watchdog.tap b/tests/auto/testlib/selftests/expected_watchdog.tap
new file mode 100644
index 0000000000..3d4890b67e
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_watchdog.tap
@@ -0,0 +1,15 @@
+TAP version 13
+# tst_Watchdog
+ok 1 - initTestCase()
+# Test function timed out
+not ok 2 - delay()
+ ---
+ # Received a fatal error.
+ at: tst_Watchdog::delay() (Unknown file:0)
+ file: Unknown file
+ line: 0
+ ...
+1..2
+# tests 2
+# pass 1
+# fail 1
diff --git a/tests/auto/testlib/selftests/expected_watchdog.teamcity b/tests/auto/testlib/selftests/expected_watchdog.teamcity
new file mode 100644
index 0000000000..0d77bf70d5
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_watchdog.teamcity
@@ -0,0 +1,8 @@
+##teamcity[testSuiteStarted name='tst_Watchdog' flowId='tst_Watchdog']
+##teamcity[testStarted name='initTestCase()' flowId='tst_Watchdog']
+##teamcity[testFinished name='initTestCase()' flowId='tst_Watchdog']
+##teamcity[testStarted name='delay()' flowId='tst_Watchdog']
+##teamcity[testFailed name='delay()' message='Failure! |[Loc: Unknown file(0)|]' details='Received a fatal error.' flowId='tst_Watchdog']
+##teamcity[testStdOut name='delay()' out='QFATAL: Test function timed out' flowId='tst_Watchdog']
+##teamcity[testFinished name='delay()' flowId='tst_Watchdog']
+##teamcity[testSuiteFinished name='tst_Watchdog' flowId='tst_Watchdog']
diff --git a/tests/auto/testlib/selftests/expected_watchdog.txt b/tests/auto/testlib/selftests/expected_watchdog.txt
new file mode 100644
index 0000000000..4c9cde4ea2
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_watchdog.txt
@@ -0,0 +1,8 @@
+********* Start testing of tst_Watchdog *********
+Config: Using QtTest library
+PASS : tst_Watchdog::initTestCase()
+QFATAL : tst_Watchdog::delay() Test function timed out
+FAIL! : tst_Watchdog::delay() Received a fatal error.
+ Loc: [Unknown file(0)]
+Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms
+********* Finished testing of tst_Watchdog *********
diff --git a/tests/auto/testlib/selftests/expected_watchdog.xml b/tests/auto/testlib/selftests/expected_watchdog.xml
new file mode 100644
index 0000000000..f1642fba79
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_watchdog.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestCase name="tst_Watchdog">
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="delay">
+<Message type="qfatal" file="" line="0">
+ <Description><![CDATA[Test function timed out]]></Description>
+</Message>
+<Incident type="fail" file="Unknown file" line="0">
+ <Description><![CDATA[Received a fatal error.]]></Description>
+</Incident>
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
+</TestCase>
diff --git a/tests/auto/testlib/selftests/expected_watchdog.xunitxml b/tests/auto/testlib/selftests/expected_watchdog.xunitxml
new file mode 100644
index 0000000000..7e16ab2c34
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_watchdog.xunitxml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="1" failures="1" tests="2" name="tst_Watchdog">
+ <properties>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
+ <property value="" name="QtBuild"/>
+ </properties>
+ <testcase result="pass" name="initTestCase"/>
+ <testcase result="fail" name="delay">
+ <!-- message="Test function timed out" type="qfatal" -->
+ <failure message="Received a fatal error." result="fail"/>
+ </testcase>
+ <system-err>
+<![CDATA[Test function timed out]]>
+ </system-err>
+</testsuite>
diff --git a/tests/auto/testlib/selftests/expectfail/expectfail.pro b/tests/auto/testlib/selftests/expectfail/expectfail.pro
index c1849990f2..db383bee6a 100644
--- a/tests/auto/testlib/selftests/expectfail/expectfail.pro
+++ b/tests/auto/testlib/selftests/expectfail/expectfail.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = expectfail
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/failcleanup/failcleanup.pro b/tests/auto/testlib/selftests/failcleanup/failcleanup.pro
index 426d7cc45b..12da5920fb 100644
--- a/tests/auto/testlib/selftests/failcleanup/failcleanup.pro
+++ b/tests/auto/testlib/selftests/failcleanup/failcleanup.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = failcleanup
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/faildatatype/BLACKLIST b/tests/auto/testlib/selftests/faildatatype/BLACKLIST
new file mode 100644
index 0000000000..bb1cae98e5
--- /dev/null
+++ b/tests/auto/testlib/selftests/faildatatype/BLACKLIST
@@ -0,0 +1,4 @@
+# See qtbase/src/testlib/qtestblacklist.cpp for format
+# Incidental test: exercise more of the blacklisting code
+[value:bool-as-string]
+*
diff --git a/tests/auto/testlib/selftests/faildatatype/faildatatype.pro b/tests/auto/testlib/selftests/faildatatype/faildatatype.pro
new file mode 100644
index 0000000000..4ff7352555
--- /dev/null
+++ b/tests/auto/testlib/selftests/faildatatype/faildatatype.pro
@@ -0,0 +1,9 @@
+SOURCES += tst_faildatatype.cpp
+QT = core testlib
+
+darwin: CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = faildatatype
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/faildatatype/tst_faildatatype.cpp b/tests/auto/testlib/selftests/faildatatype/tst_faildatatype.cpp
new file mode 100644
index 0000000000..b49c7723ef
--- /dev/null
+++ b/tests/auto/testlib/selftests/faildatatype/tst_faildatatype.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+
+class tst_FailDataType: public QObject
+{
+Q_OBJECT
+private slots:
+ void value_data() const;
+ void value() const;
+};
+
+void tst_FailDataType::value_data() const
+{
+ QTest::addColumn<QString>("value");
+
+ QTest::newRow("bool-as-string") << true; // assertion should fail here
+}
+
+/*! \internal
+ This function should never be run because its _data() fails.
+ */
+void tst_FailDataType::value() const
+{
+ QFAIL("ERROR: this function is NOT supposed to be run.");
+}
+
+QTEST_APPLESS_MAIN(tst_FailDataType)
+
+#include "tst_faildatatype.moc"
diff --git a/tests/auto/testlib/selftests/failfetchtype/BLACKLIST b/tests/auto/testlib/selftests/failfetchtype/BLACKLIST
new file mode 100644
index 0000000000..20a502724a
--- /dev/null
+++ b/tests/auto/testlib/selftests/failfetchtype/BLACKLIST
@@ -0,0 +1,4 @@
+# See qtbase/src/testlib/qtestblacklist.cpp for format
+# Incidental test: exercise more of the blacklisting code
+[fetch:no-such-dataset]
+*
diff --git a/tests/auto/testlib/selftests/failfetchtype/failfetchtype.pro b/tests/auto/testlib/selftests/failfetchtype/failfetchtype.pro
new file mode 100644
index 0000000000..5821018af4
--- /dev/null
+++ b/tests/auto/testlib/selftests/failfetchtype/failfetchtype.pro
@@ -0,0 +1,9 @@
+SOURCES += tst_failfetchtype.cpp
+QT = core testlib
+
+darwin: CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = failfetchtype
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/failfetchtype/tst_failfetchtype.cpp b/tests/auto/testlib/selftests/failfetchtype/tst_failfetchtype.cpp
new file mode 100644
index 0000000000..2dd32a5a5e
--- /dev/null
+++ b/tests/auto/testlib/selftests/failfetchtype/tst_failfetchtype.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include <QtTest/QtTest>
+
+class tst_FailFetchType: public QObject
+{
+Q_OBJECT
+private slots:
+ void fetch_data() const;
+ void fetch() const;
+};
+
+void tst_FailFetchType::fetch_data() const
+{
+ QTest::addColumn<bool>("value");
+
+ QTest::newRow("bool") << true;
+}
+
+void tst_FailFetchType::fetch() const
+{
+ QFETCH(QString, value); // assertion should fail here
+ QFAIL("ERROR: this function is NOT supposed to be run.");
+}
+
+QTEST_APPLESS_MAIN(tst_FailFetchType)
+
+#include "tst_failfetchtype.moc"
diff --git a/tests/auto/testlib/selftests/failinit/failinit.pro b/tests/auto/testlib/selftests/failinit/failinit.pro
index 6a30a5af68..46b1c3a6c4 100644
--- a/tests/auto/testlib/selftests/failinit/failinit.pro
+++ b/tests/auto/testlib/selftests/failinit/failinit.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = failinit
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/failinitdata/failinitdata.pro b/tests/auto/testlib/selftests/failinitdata/failinitdata.pro
index b608c67dbb..63b32cb6d6 100644
--- a/tests/auto/testlib/selftests/failinitdata/failinitdata.pro
+++ b/tests/auto/testlib/selftests/failinitdata/failinitdata.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = failinitdata
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro b/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro
index 33b306ca75..0fbb5e4c00 100644
--- a/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro
+++ b/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = fetchbogus
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/findtestdata/findtestdata.pro b/tests/auto/testlib/selftests/findtestdata/findtestdata.pro
index f04a640c59..7fbdaea3a3 100644
--- a/tests/auto/testlib/selftests/findtestdata/findtestdata.pro
+++ b/tests/auto/testlib/selftests/findtestdata/findtestdata.pro
@@ -7,3 +7,5 @@ CONFIG -= debug_and_release_target
RESOURCES = findtestdata.qrc
TARGET = findtestdata
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/float/float.pro b/tests/auto/testlib/selftests/float/float.pro
index 95980eeac8..479eb152c5 100644
--- a/tests/auto/testlib/selftests/float/float.pro
+++ b/tests/auto/testlib/selftests/float/float.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = float
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/float/tst_float.cpp b/tests/auto/testlib/selftests/float/tst_float.cpp
index 2fffcc7803..b12bc24c58 100644
--- a/tests/auto/testlib/selftests/float/tst_float.cpp
+++ b/tests/auto/testlib/selftests/float/tst_float.cpp
@@ -27,6 +27,7 @@
****************************************************************************/
#include <QtCore/QCoreApplication>
+#include <QtCore/qfloat16.h>
#include <QtTest/QtTest>
#include <QDebug>
@@ -36,6 +37,8 @@ class tst_float: public QObject
private slots:
void floatComparisons() const;
void floatComparisons_data() const;
+ void float16Comparisons() const;
+ void float16Comparisons_data() const;
void compareFloatTests() const;
void compareFloatTests_data() const;
};
@@ -79,6 +82,42 @@ void tst_float::floatComparisons_data() const
<< float(100002);
}
+void tst_float::float16Comparisons() const
+{
+ QFETCH(qfloat16, operandLeft);
+ QFETCH(qfloat16, operandRight);
+
+ QCOMPARE(operandLeft, operandRight);
+}
+
+void tst_float::float16Comparisons_data() const
+{
+ QTest::addColumn<qfloat16>("operandLeft");
+ QTest::addColumn<qfloat16>("operandRight");
+
+ QTest::newRow("should SUCCEED 1")
+ << qfloat16(0)
+ << qfloat16(0);
+
+ QTest::newRow("should FAIL 1")
+ << qfloat16(1.000)
+ << qfloat16(3.000);
+
+ QTest::newRow("should FAIL 2")
+ << qfloat16(1.000e-4f)
+ << qfloat16(3.000e-4f);
+
+ // QCOMPARE for qfloat16s uses qFuzzyCompare()
+
+ QTest::newRow("should FAIL 3")
+ << qfloat16(98)
+ << qfloat16(99);
+
+ QTest::newRow("should SUCCEED 2")
+ << qfloat16(1001)
+ << qfloat16(1002);
+}
+
void tst_float::compareFloatTests() const
{
QFETCH(float, t1);
diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py
index 1996416e8c..92588c614d 100755
--- a/tests/auto/testlib/selftests/generate_expected_output.py
+++ b/tests/auto/testlib/selftests/generate_expected_output.py
@@ -221,8 +221,71 @@ class Scanner (object):
print('tst_selftests.cpp names', d, "as a test, but it doesn't exist")
del re
+# Keep in sync with tst_selftests.cpp's processEnvironment():
+def baseEnv(platname=None,
+ keep=('PATH', 'QT_QPA_PLATFORM'),
+ posix=('HOME', 'USER', 'QEMU_SET_ENV', 'QEMU_LD_PREFIX'),
+ nonapple=('DISPLAY', 'XAUTHLOCALHOSTNAME'), # and XDG_*
+ # Don't actually know how to test for QNX, so this is ignored:
+ qnx=('GRAPHICS_ROOT', 'TZ'),
+ # Probably not actually relevant
+ preserveLib=('QT_PLUGIN_PATH', 'LD_LIBRARY_PATH'),
+ # Shall be modified on first call (a *copy* is returned):
+ cached={}):
+ """Lazily-evaluated standard environment for sub-tests to run in.
+
+ This prunes the parent process environment, selecting a only those
+ variables we chose to keep. The platname passed to the first call
+ helps select which variables to keep. The environment computed
+ then is cached: a copy of this is returned on that call and each
+ subsequent call.\n"""
+
+ if not cached:
+ xdg = False
+ # The platform module may be more apt for the platform tests here.
+ if os.name == 'posix':
+ keep += posix
+ if platname != 'darwin':
+ keep += nonapple
+ xdg = True
+ if 'QT_PRESERVE_TESTLIB_PATH' in os.environ:
+ keep += preserveLib
+
+ cached = dict(
+ LC_ALL = 'C', # Use standard locale
+ # Avoid interference from any qtlogging.ini files, e.g. in
+ # /etc/xdg/QtProject/, (must match tst_selftests.cpp's
+ # processEnvironment()'s value):
+ QT_LOGGING_RULES = '*.debug=true;qt.*=false')
+
+ for k, v in os.environ.items():
+ if k in keep or (xdg and k.startswith('XDG_')):
+ cached[k] = v
+
+ return cached.copy()
+
+def testEnv(testname,
+ # Make sure this matches tst_Selftests::doRunSubTest():
+ extraEnv = {
+ "crashers": { "QTEST_DISABLE_CORE_DUMP": "1",
+ "QTEST_DISABLE_STACK_DUMP": "1" },
+ "watchdog": { "QTEST_FUNCTION_TIMEOUT": "100" },
+ },
+ # Must match tst_Selftests::runSubTest_data():
+ crashers = ("assert", "blacklisted", "crashes", "crashedterminate",
+ "exceptionthrow", "faildatatype", "failfetchtype",
+ "fetchbogus", "silent", "watchdog")):
+ """Determine the environment in which to run a test."""
+ data = baseEnv()
+ if testname in crashers:
+ data.update(extraEnv["crashers"])
+ if testname in extraEnv:
+ data.update(extraEnv[testname])
+ return data
+
def generateTestData(testname, clean,
formats = ('xml', 'txt', 'xunitxml', 'lightxml', 'teamcity', 'tap'),
+ # Make sure this matches tst_Selftests::runSubTest_data():
extraArgs = {
"commandlinedata": "fiveTablePasses fiveTablePasses:fiveTablePasses_data1 -v2",
"benchlibcallgrind": "-callgrind",
@@ -249,26 +312,22 @@ def generateTestData(testname, clean,
print("Warning: directory", testname, "contains no test executable")
return
+ # Prepare environment in which to run tests:
+ env = testEnv(testname)
+
print(" running", testname)
for format in formats:
cmd = [path, '-' + format]
if testname in extraArgs:
cmd += extraArgs[testname].split()
- data = subprocess.Popen(cmd, stdout=subprocess.PIPE,
+ data = subprocess.Popen(cmd, stdout=subprocess.PIPE, env=env,
universal_newlines=True).communicate()[0]
with open('expected_' + testname + '.' + format, 'w') as out:
out.write('\n'.join(clean(data))) # write() appends a newline, too
def main(name, *args):
"""Minimal argument parsing and driver for the real work"""
- os.environ.update(
- LC_ALL = 'C', # Use standard locale
- # Avoid interference from any qtlogging.ini files, e.g. in
- # /etc/xdg/QtProject/, (must match tst_selftests.cpp's
- # processEnvironment()'s value):
- QT_LOGGING_RULES = '*.debug=true;qt.*=false')
-
herePath = os.getcwd()
cleaner = Cleaner(herePath, name)
@@ -280,6 +339,7 @@ def main(name, *args):
if __name__ == '__main__':
# Executed when script is run, not when imported (e.g. to debug)
import sys
+ baseEnv(sys.platform) # initializes its cache
if sys.platform.startswith('win'):
print("This script does not work on Windows.")
diff --git a/tests/auto/testlib/selftests/globaldata/globaldata.pro b/tests/auto/testlib/selftests/globaldata/globaldata.pro
index c0b1554c0f..621416c5b8 100644
--- a/tests/auto/testlib/selftests/globaldata/globaldata.pro
+++ b/tests/auto/testlib/selftests/globaldata/globaldata.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = globaldata
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/keyboard/keyboard.pro b/tests/auto/testlib/selftests/keyboard/keyboard.pro
index 0097318797..488c992e62 100644
--- a/tests/auto/testlib/selftests/keyboard/keyboard.pro
+++ b/tests/auto/testlib/selftests/keyboard/keyboard.pro
@@ -5,3 +5,5 @@ macos:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = keyboard
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/longstring/longstring.pro b/tests/auto/testlib/selftests/longstring/longstring.pro
index d16ba85095..d8961203f3 100644
--- a/tests/auto/testlib/selftests/longstring/longstring.pro
+++ b/tests/auto/testlib/selftests/longstring/longstring.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = longstring
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro
index 79451af1ec..bdca0225d3 100644
--- a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro
+++ b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = maxwarnings
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/mouse/mouse.pro b/tests/auto/testlib/selftests/mouse/mouse.pro
index 7c06b8aa64..e5701eee0f 100644
--- a/tests/auto/testlib/selftests/mouse/mouse.pro
+++ b/tests/auto/testlib/selftests/mouse/mouse.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = mouse
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/multiexec/multiexec.pro b/tests/auto/testlib/selftests/multiexec/multiexec.pro
index 2038acbd31..e9b2b7b587 100644
--- a/tests/auto/testlib/selftests/multiexec/multiexec.pro
+++ b/tests/auto/testlib/selftests/multiexec/multiexec.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = multiexec
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro b/tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro
index 1c07c93e9d..25f5bfe809 100644
--- a/tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro
+++ b/tests/auto/testlib/selftests/pairdiagnostics/pairdiagnostics.pro
@@ -4,3 +4,5 @@ QT = core testlib
CONFIG -= app_bundle debug_and_release_target
TARGET = pairdiagnostics
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/printdatatags/printdatatags.pro b/tests/auto/testlib/selftests/printdatatags/printdatatags.pro
index cd06384835..83f171aac5 100644
--- a/tests/auto/testlib/selftests/printdatatags/printdatatags.pro
+++ b/tests/auto/testlib/selftests/printdatatags/printdatatags.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = printdatatags
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro b/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro
index f1cf25d104..00ca4a0e62 100644
--- a/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro
+++ b/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = printdatatagswithglobaltags
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro b/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro
index bd967f32e6..4d7af8ab40 100644
--- a/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro
+++ b/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = qexecstringlist
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/selftests.pri b/tests/auto/testlib/selftests/selftests.pri
index 05ed6d9905..b4568dd3e1 100644
--- a/tests/auto/testlib/selftests/selftests.pri
+++ b/tests/auto/testlib/selftests/selftests.pri
@@ -21,6 +21,8 @@ SUBPROGRAMS = \
exceptionthrow \
expectfail \
failcleanup \
+ faildatatype \
+ failfetchtype \
failinit \
failinitdata \
fetchbogus \
@@ -43,11 +45,13 @@ SUBPROGRAMS = \
sleep \
strcmp \
subtest \
+ testlib \
tuplediagnostics \
verbose1 \
verbose2 \
verifyexceptionthrown \
warnings \
+ watchdog \
xunit
qtHaveModule(gui): SUBPROGRAMS += \
diff --git a/tests/auto/testlib/selftests/silent/silent.pro b/tests/auto/testlib/selftests/silent/silent.pro
index 3150f65a5e..3f6325a010 100644
--- a/tests/auto/testlib/selftests/silent/silent.pro
+++ b/tests/auto/testlib/selftests/silent/silent.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = silent
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/singleskip/singleskip.pro b/tests/auto/testlib/selftests/singleskip/singleskip.pro
index 9f63e62747..a32c22c943 100644
--- a/tests/auto/testlib/selftests/singleskip/singleskip.pro
+++ b/tests/auto/testlib/selftests/singleskip/singleskip.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = singleskip
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/skip/skip.pro b/tests/auto/testlib/selftests/skip/skip.pro
index 8780d295cf..19a01908af 100644
--- a/tests/auto/testlib/selftests/skip/skip.pro
+++ b/tests/auto/testlib/selftests/skip/skip.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = skip
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro b/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro
index f98cda7596..059132b5a6 100644
--- a/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro
+++ b/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = skipcleanup
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/skipinit/skipinit.pro b/tests/auto/testlib/selftests/skipinit/skipinit.pro
index 7defce9a52..6605226993 100644
--- a/tests/auto/testlib/selftests/skipinit/skipinit.pro
+++ b/tests/auto/testlib/selftests/skipinit/skipinit.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = skipinit
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro b/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro
index cd806c2a43..176955500b 100644
--- a/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro
+++ b/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = skipinitdata
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/sleep/sleep.pro b/tests/auto/testlib/selftests/sleep/sleep.pro
index affcba22ee..b109bf6253 100644
--- a/tests/auto/testlib/selftests/sleep/sleep.pro
+++ b/tests/auto/testlib/selftests/sleep/sleep.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = sleep
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/strcmp/strcmp.pro b/tests/auto/testlib/selftests/strcmp/strcmp.pro
index f5f6eecc88..35a4c5e858 100644
--- a/tests/auto/testlib/selftests/strcmp/strcmp.pro
+++ b/tests/auto/testlib/selftests/strcmp/strcmp.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = strcmp
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/subtest/subtest.pro b/tests/auto/testlib/selftests/subtest/subtest.pro
index 09dee1b1b9..b5c294aed6 100644
--- a/tests/auto/testlib/selftests/subtest/subtest.pro
+++ b/tests/auto/testlib/selftests/subtest/subtest.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = subtest
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/test/test.pro b/tests/auto/testlib/selftests/test/test.pro
index ec1633ebff..fce8e48ca2 100644
--- a/tests/auto/testlib/selftests/test/test.pro
+++ b/tests/auto/testlib/selftests/test/test.pro
@@ -19,3 +19,4 @@ RESOURCES += expected_files
include(../selftests.pri)
!android:!winrt: for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}"
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/testlib/testlib.pro b/tests/auto/testlib/selftests/testlib/testlib.pro
new file mode 100644
index 0000000000..8798f86b18
--- /dev/null
+++ b/tests/auto/testlib/selftests/testlib/testlib.pro
@@ -0,0 +1,9 @@
+SOURCES += tst_testlib.cpp
+QT = core testlib
+
+darwin: CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = testlib
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/testlib/tst_testlib.cpp b/tests/auto/testlib/selftests/testlib/tst_testlib.cpp
new file mode 100644
index 0000000000..38a71be732
--- /dev/null
+++ b/tests/auto/testlib/selftests/testlib/tst_testlib.cpp
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtCore/QtMath>
+#include <QtCore/QtNumeric>
+
+/* Test QTest functions not covered by other parts of the selftest. Tests that
+ * involve crashing or exiting should be added as separate tests in their own
+ * right. Tests that form a coherent group on a related theme should also go in
+ * their own directory. Tests that fail in order to exercise QTest internals
+ * are fine.
+ */
+
+class tst_TestLib : public QObject
+{
+Q_OBJECT
+private slots:
+ void basics() const;
+ void delays() const;
+ void reals_data() const;
+ void reals() const;
+};
+
+void tst_TestLib::basics() const
+{
+ QVERIFY(QByteArray(QTest::currentAppName()).contains("testlib"));
+
+ QCOMPARE(QTest::testObject(), nullptr); // last, because it should fail
+}
+
+QT_BEGIN_NAMESPACE
+
+namespace QTest {
+ // Defined; not declared in the public header, but used by qtdeclarative.
+ int defaultKeyDelay();
+ int defaultMouseDelay();
+}
+
+QT_END_NAMESPACE
+
+void tst_TestLib::delays() const
+{
+ QVERIFY(QTest::defaultMouseDelay() >= 0);
+ QVERIFY(QTest::defaultKeyDelay() >= 0);
+}
+
+void tst_TestLib::reals_data() const
+{
+ QTest::addColumn<double>("actual");
+ QTest::addColumn<double>("expected");
+
+ QTest::newRow("zero") << 0.0 << 0.0;
+#define ADDROW(func) QTest::addRow("self-%s", #func) << func() << func()
+ ADDROW(qQNaN);
+ ADDROW(qInf);
+#undef ADDROW // Just used so as to exercise addRow()
+ QTest::newRow("infineg") << -qInf() << -qInf();
+ QTest::newRow("Sin(turn/4)") << qSin(9 * M_PI_2) << 1.0;
+ QTest::newRow("Cos(turn/2)") << qCos(15 * M_PI) << -1.0;
+}
+
+void tst_TestLib::reals() const
+{
+ QFETCH(double, actual);
+ QFETCH(double, expected);
+ QCOMPARE(actual, expected);
+}
+
+QTEST_APPLESS_MAIN(tst_TestLib)
+
+#include "tst_testlib.moc"
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 08c6dec191..6ef0ca19ed 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -468,10 +468,13 @@ void tst_Selftests::runSubTest_data()
#endif
<< "expectfail"
<< "failcleanup"
+#ifndef Q_OS_WIN // these assert, by design; so same problem as "assert"
+ << "faildatatype"
+ << "failfetchtype"
+#endif
<< "failinit"
<< "failinitdata"
-#if !defined(Q_OS_WIN)
- // Disable this test on Windows, as the run-time will popup dialogs with warnings
+#ifndef Q_OS_WIN // asserts, by design; so same problem as "assert"
<< "fetchbogus"
#endif
<< "findtestdata"
@@ -494,6 +497,7 @@ void tst_Selftests::runSubTest_data()
<< "sleep"
<< "strcmp"
<< "subtest"
+ << "testlib"
<< "tuplediagnostics"
<< "verbose1"
<< "verbose2"
@@ -502,6 +506,7 @@ void tst_Selftests::runSubTest_data()
<< "verifyexceptionthrown"
#endif //!QT_NO_EXCEPTIONS
<< "warnings"
+ << "watchdog"
<< "xunit"
;
@@ -520,6 +525,7 @@ void tst_Selftests::runSubTest_data()
foreach (QString const& subtest, tests) {
QStringList arguments = loggerSet.arguments;
+ // Keep in sync with generateTestData()'s extraArgs in generate_expected_output.py:
if (subtest == "commandlinedata") {
arguments << QString("fiveTablePasses fiveTablePasses:fiveTablePasses_data1 -v2").split(' ');
}
@@ -612,10 +618,12 @@ void tst_Selftests::runSubTest_data()
if (loggerSet.name.contains("teamcity") && subtest.startsWith("benchlib"))
continue; // Skip benchmark for TeamCity logger
+ // Keep in sync with generateTestData()'s crashers in generate_expected_output.py:
const bool crashes = subtest == QLatin1String("assert") || subtest == QLatin1String("exceptionthrow")
|| subtest == QLatin1String("fetchbogus") || subtest == QLatin1String("crashedterminate")
+ || subtest == QLatin1String("faildatatype") || subtest == QLatin1String("failfetchtype")
|| subtest == QLatin1String("crashes") || subtest == QLatin1String("silent")
- || subtest == QLatin1String("blacklisted");
+ || subtest == QLatin1String("blacklisted") || subtest == QLatin1String("watchdog");
QTest::newRow(qPrintable(QString("%1 %2").arg(subtest).arg(loggerSet.name)))
<< subtest
<< loggers
@@ -690,9 +698,12 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
QProcess proc;
QProcessEnvironment environment = processEnvironment();
+ // Keep in sync with generateTestData()'s extraEnv in generate_expected_output.py:
if (crashes) {
environment.insert("QTEST_DISABLE_CORE_DUMP", "1");
environment.insert("QTEST_DISABLE_STACK_DUMP", "1");
+ if (subdir == QLatin1String("watchdog"))
+ environment.insert("QTEST_FUNCTION_TIMEOUT", "100");
}
proc.setProcessEnvironment(environment);
const QString path = subdir + QLatin1Char('/') + subdir;
@@ -735,6 +746,7 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
if (subdir != QLatin1String("exceptionthrow")
&& subdir != QLatin1String("cmptest") // QImage comparison requires QGuiApplication
&& subdir != QLatin1String("fetchbogus")
+ && subdir != QLatin1String("watchdog")
&& subdir != QLatin1String("xunit")
#ifdef Q_CC_MINGW
&& subdir != QLatin1String("blacklisted") // calls qFatal()
@@ -742,11 +754,13 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
#endif
#ifdef Q_OS_LINUX
// QEMU outputs to stderr about uncaught signals
- && (!EmulationDetector::isRunningArmOnX86() ||
- (subdir != QLatin1String("blacklisted")
- && subdir != QLatin1String("silent")
- && subdir != QLatin1String("assert")
- && subdir != QLatin1String("crashes")
+ && !(EmulationDetector::isRunningArmOnX86() &&
+ (subdir == QLatin1String("assert")
+ || subdir == QLatin1String("blacklisted")
+ || subdir == QLatin1String("crashes")
+ || subdir == QLatin1String("faildatatype")
+ || subdir == QLatin1String("failfetchtype")
+ || subdir == QLatin1String("silent")
)
)
#endif
@@ -896,16 +910,20 @@ bool tst_Selftests::compareLine(const QString &logger, const QString &subdir,
const QString &actualLine, const QString &expectedLine,
QString *errorMessage) const
{
- if (subdir == QLatin1String("assert") && actualLine.contains(QLatin1String("ASSERT: "))
- && expectedLine.contains(QLatin1String("ASSERT: ")) && actualLine != expectedLine) {
+ if (actualLine == expectedLine)
+ return true;
+
+ if ((subdir == QLatin1String("assert")
+ || subdir == QLatin1String("faildatatype") || subdir == QLatin1String("failfetchtype"))
+ && actualLine.contains(QLatin1String("ASSERT: "))
+ && expectedLine.contains(QLatin1String("ASSERT: "))) {
// Q_ASSERT uses __FILE__, the exact contents of which are
// undefined. If have we something that looks like a Q_ASSERT and we
// were expecting to see a Q_ASSERT, we'll skip the line.
return true;
}
- if (expectedLine.startsWith(QLatin1String("FAIL! : tst_Exception::throwException() Caught unhandled exce"))
- && actualLine != expectedLine) {
+ if (expectedLine.startsWith(QLatin1String("FAIL! : tst_Exception::throwException() Caught unhandled exce"))) {
// On some platforms we compile without RTTI, and as a result we never throw an exception
if (actualLine.simplified() != QLatin1String("tst_Exception::throwException()")) {
*errorMessage = QString::fromLatin1("'%1' != 'tst_Exception::throwException()'").arg(actualLine);
@@ -944,9 +962,6 @@ bool tst_Selftests::compareLine(const QString &logger, const QString &subdir,
if (actualLine.startsWith(QLatin1String("Totals:")) && expectedLine.startsWith(QLatin1String("Totals:")))
return true;
- if (actualLine == expectedLine)
- return true;
-
*errorMessage = msgMismatch(actualLine, expectedLine);
return false;
}
diff --git a/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro b/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro
index 7a29e0e5e1..f338170b81 100644
--- a/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro
+++ b/tests/auto/testlib/selftests/tuplediagnostics/tuplediagnostics.pro
@@ -4,3 +4,5 @@ QT = core testlib
CONFIG -= app_bundle debug_and_release_target
TARGET = tuplediagnostics
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/verbose1/verbose1.pro b/tests/auto/testlib/selftests/verbose1/verbose1.pro
index f00ae69d17..1f16d70d66 100644
--- a/tests/auto/testlib/selftests/verbose1/verbose1.pro
+++ b/tests/auto/testlib/selftests/verbose1/verbose1.pro
@@ -8,3 +8,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = verbose1
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/verbose2/verbose2.pro b/tests/auto/testlib/selftests/verbose2/verbose2.pro
index 796cdeb975..bf54904488 100644
--- a/tests/auto/testlib/selftests/verbose2/verbose2.pro
+++ b/tests/auto/testlib/selftests/verbose2/verbose2.pro
@@ -8,3 +8,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = verbose2
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro b/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro
index 51f108c9d7..198d35dc6c 100644
--- a/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro
+++ b/tests/auto/testlib/selftests/verifyexceptionthrown/verifyexceptionthrown.pro
@@ -6,3 +6,5 @@ CONFIG -= debug_and_release_target
CONFIG += exceptions
TARGET = verifyexceptionthrown
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/warnings/warnings.pro b/tests/auto/testlib/selftests/warnings/warnings.pro
index 0c6cddcefb..a0bd2c62ba 100644
--- a/tests/auto/testlib/selftests/warnings/warnings.pro
+++ b/tests/auto/testlib/selftests/warnings/warnings.pro
@@ -5,3 +5,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = warnings
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/watchdog/tst_watchdog.cpp b/tests/auto/testlib/selftests/watchdog/tst_watchdog.cpp
new file mode 100644
index 0000000000..2f29609f71
--- /dev/null
+++ b/tests/auto/testlib/selftests/watchdog/tst_watchdog.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+class tst_Watchdog : public QObject
+{
+ Q_OBJECT
+private slots:
+ void delay() const;
+};
+
+void tst_Watchdog::delay() const
+{
+ bool ok = false;
+ const int fiveMinutes = 5 * 60 * 1000;
+ // Use the same env.var as the watch-dog and add a little to it:
+ const int timeout = qEnvironmentVariableIntValue("QTEST_FUNCTION_TIMEOUT", &ok);
+ QTest::qSleep(5000 + (ok && timeout > 0 ? timeout : fiveMinutes));
+ // The watchdog timer should have interrupted us by now.
+ QFAIL("ERROR: this function should be interrupted.");
+}
+
+QTEST_APPLESS_MAIN(tst_Watchdog)
+
+#include "tst_watchdog.moc"
diff --git a/tests/auto/testlib/selftests/watchdog/watchdog.pro b/tests/auto/testlib/selftests/watchdog/watchdog.pro
new file mode 100644
index 0000000000..ddcc3f6ca2
--- /dev/null
+++ b/tests/auto/testlib/selftests/watchdog/watchdog.pro
@@ -0,0 +1,14 @@
+SOURCES += tst_watchdog.cpp
+QT = core testlib
+
+darwin: CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = watchdog
+
+# The test deliberately times out; so tell it to do so quickly
+checkenv.name = QTEST_FUNCTION_TIMEOUT
+checkenv.value = 100
+QT_TOOL_ENV += checkenv
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/xunit/xunit.pro b/tests/auto/testlib/selftests/xunit/xunit.pro
index b8c606e828..becb46ce8b 100644
--- a/tests/auto/testlib/selftests/xunit/xunit.pro
+++ b/tests/auto/testlib/selftests/xunit/xunit.pro
@@ -6,3 +6,5 @@ mac:CONFIG -= app_bundle
CONFIG -= debug_and_release_target
TARGET = xunit
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/testlib.pro b/tests/auto/testlib/testlib.pro
index 25ccc591d6..587c76a189 100644
--- a/tests/auto/testlib/testlib.pro
+++ b/tests/auto/testlib/testlib.pro
@@ -1,6 +1,7 @@
-TEMPLATE=subdirs
-SUBDIRS=\
+TEMPLATE = subdirs
+SUBDIRS = \
+ outformat \
qsignalspy \
selftests \
-qtHaveModule(widgets):SUBDIRS += qabstractitemmodeltester
+qtHaveModule(widgets): SUBDIRS += qabstractitemmodeltester
diff --git a/tests/auto/testserver.pri b/tests/auto/testserver.pri
index b2f593235f..0042571115 100644
--- a/tests/auto/testserver.pri
+++ b/tests/auto/testserver.pri
@@ -51,37 +51,121 @@
# 2. testserver_clean - Clean up server containers/images and tidy away related
# files.
-TESTSERVER_COMPOSE_FILE = $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose.yml
+# The docker test server should only be integrated in the leaf Makefile.
+# If debug_and_release option is in use, skip the meta-Makefile except for
+# Makefile.Debug and Makefile.Release.
+debug_and_release:!build_pass: return()
+
TESTSERVER_VERSION = $$system(docker-compose --version)
-equals(QMAKE_HOST.os, Windows)|isEmpty(TESTSERVER_VERSION) {
+isEmpty(TESTSERVER_VERSION) {
# Make check with server "qt-test-server.qt-test-net" as a fallback
- message("testserver: qt-test-server.qt-test-net")
} else {
- # Make check with test servers
- message("testserver:" $$TESTSERVER_VERSION)
+ # Make check with docker test servers
+ DNSDOMAIN = test-net.qt.local
+
+ equals(QMAKE_HOST.os, Darwin) {
+ # There is no docker bridge on macOS. It is impossible to ping a container.
+ # Docker docs recommends using port mapping to connect to a container;
+ # but it causes a port conflict if the user is running a service that
+ # binds the same port on the host. An alternative solution is to deploy
+ # the docker environment into VirtualBox using docker-machine.
+ TESTSERVER_COMPOSE_FILE = \
+ $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-for-macOS.yml
+
+ # The connection configuration for the target machine
+ MACHINE_CONFIG = $(shell docker-machine config qt-test-server)
+
+ # The environment variables passed to the docker-compose file
+ TEST_ENV = 'MACHINE_IP=$(shell docker-machine ip qt-test-server)'
+ TEST_ENV += 'TEST_DOMAIN=$$DNSDOMAIN'
+ TEST_CMD = env
+ } else:equals(QMAKE_HOST.os, Windows) {
+ # There is no docker bridge on Windows. It is impossible to ping a container.
+ # Use docker-machine to deploy the docker environment into VirtualBox.
+ TESTSERVER_COMPOSE_FILE = \
+ $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-for-windows.yml
+
+ # Bonjour only works within a single broadcast domain.
+ DNSDOMAIN = local
+
+ # The connection configuration for the target machine
+ MACHINE_CONFIG = (docker-machine config qt-test-server)
+
+ # The environment variables passed to the docker-compose file
+ TEST_ENV = '\$\$env:MACHINE_IP = docker-machine ip qt-test-server;'
+ TEST_ENV += '\$\$env:TEST_DOMAIN = $$shell_quote(\"$$DNSDOMAIN\");'
+
+ # Docker-compose CLI environment variables:
+ # Enable path conversion from Windows-style to Unix-style in volume definitions.
+ TEST_ENV += '\$\$env:COMPOSE_CONVERT_WINDOWS_PATHS = $$shell_quote(\"true\");'
+
+ TEST_CMD = 'PowerShell -noprofile'
+ CONFIG += PowerShell
+ } else {
+ TESTSERVER_COMPOSE_FILE = $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose.yml
+ DEFINES += QT_TEST_SERVER_NAME
+
+ # The environment variables passed to the docker-compose file
+ TEST_ENV = 'TEST_DOMAIN=$$DNSDOMAIN'
+ TEST_CMD = env
+ }
+
+ # The domain name is relevant to https keycert (qnetworkreply/crts/qt-test-net-cacert.pem).
+ DEFINES += QT_TEST_SERVER QT_TEST_SERVER_DOMAIN=$$shell_quote(\"$${DNSDOMAIN}\")
# Ensure that the docker-compose file is provided. It is a configuration
# file which is mandatory for all docker-compose commands. You can get more
# detail from the description of TESTSERVER_COMPOSE_FILE above. There is
# also an example showing how to configure it manually.
FILE_PRETEST_MSG = "Project variable 'TESTSERVER_COMPOSE_FILE' is not set"
- testserver_pretest.commands = $(if $$TESTSERVER_COMPOSE_FILE,,$(error $$FILE_PRETEST_MSG))
+ PowerShell {
+ testserver_pretest.commands = echo $$TESTSERVER_VERSION &&
+ testserver_pretest.commands += \
+ $$TEST_CMD if ([String]::IsNullOrEmpty($$shell_quote(\"$$TESTSERVER_COMPOSE_FILE\"))) \
+ {Write-Error $$shell_quote(\"$$FILE_PRETEST_MSG\")} &&
+ } else {
+ testserver_pretest.commands = $(info "testserver:" $$TESTSERVER_VERSION)
+ testserver_pretest.commands += $(if $$TESTSERVER_COMPOSE_FILE,,$(error $$FILE_PRETEST_MSG))
+ }
+
+ # Make sure docker-machine is both created and running. The docker_machine
+ # script is used to deploy the docker environment into VirtualBox.
+ # Example: qt5/coin/provisioning/common/shared/testserver/docker_machine.sh
+ !isEmpty(MACHINE_CONFIG) {
+ MACHINE_LIST_CMD = docker-machine ls -q --filter "Name=^qt-test-server\$\$"
+ MACHINE_LIST_MSG = "Docker machine qt-test-server not found"
+ PowerShell {
+ testserver_pretest.commands += $$TEST_CMD if (!($$MACHINE_LIST_CMD)) \
+ {Write-Error $$shell_quote(\"$$MACHINE_LIST_MSG\")} &&
+ } else {
+ testserver_pretest.commands += \
+ $(if $(shell $$MACHINE_LIST_CMD),,$(error $$MACHINE_LIST_MSG))
+ }
+
+ MACHINE_STATE_CMD = \
+ docker-machine ls -q --filter "State=Running" --filter "Name=^qt-test-server\$\$"
+ MACHINE_START_CMD = docker-machine start qt-test-server
+ PowerShell {
+ testserver_pretest.commands += \
+ $$TEST_CMD if (!($$MACHINE_STATE_CMD)) {$$MACHINE_START_CMD} &&
+ } else {
+ testserver_pretest.commands += \
+ $(if $(shell $$MACHINE_STATE_CMD),,$(shell $$MACHINE_START_CMD > /dev/null))
+ }
+ }
# Before starting the test servers, it requires the user to run the setup
# script (coin/provisioning/.../testserver/docker_testserver.sh) in advance.
- IMAGE_PRETEST_CMD = docker images -aq "qt-test-server-*"
+ IMAGE_PRETEST_CMD = docker $$MACHINE_CONFIG images -aq "qt-test-server-*"
IMAGE_PRETEST_MSG = "Docker image qt-test-server-* not found"
- testserver_pretest.commands += $(if $(shell $$IMAGE_PRETEST_CMD),,$(error $$IMAGE_PRETEST_MSG))
-
- # The domain name is relevant to https keycert (qnetworkreply/crts/qt-test-net-cacert.pem).
- DNSDOMAIN = test-net.qt.local
- TEST_ENV += TESTSERVER_DOMAIN=$$DNSDOMAIN
- DEFINES += QT_TEST_SERVER QT_TEST_SERVER_DOMAIN=$$shell_quote(\"$${DNSDOMAIN}\")
-
- # There is no docker bridge on macOS. It is impossible to ping a container.
- # Docker docs recommends using port mapping to connect to a container.
- equals(QMAKE_HOST.os, Darwin): TEST_ENV += TESTSERVER_BIND_LOCAL=1
+ PowerShell {
+ testserver_pretest.commands += $$TEST_CMD if (!($$IMAGE_PRETEST_CMD)) \
+ {Write-Error $$shell_quote(\"$$IMAGE_PRETEST_MSG\")}
+ } else {
+ testserver_pretest.commands += \
+ $(if $(shell $$IMAGE_PRETEST_CMD),,$(error $$IMAGE_PRETEST_MSG))
+ }
# Rename the check target of testcase feature
check.target = check_network
@@ -91,18 +175,20 @@ equals(QMAKE_HOST.os, Windows)|isEmpty(TESTSERVER_VERSION) {
testserver_test.depends = testserver_pretest
# Bring up test servers and make sure the services are ready.
- testserver_test.commands = $$TEST_ENV docker-compose -f $$TESTSERVER_COMPOSE_FILE up -d \
- --force-recreate --timeout 1 $${QT_TEST_SERVER_LIST} &&
+ !isEmpty(TEST_CMD): testserver_test.commands = $$TEST_CMD $$TEST_ENV
+ testserver_test.commands += docker-compose $$MACHINE_CONFIG -f $$TESTSERVER_COMPOSE_FILE up \
+ --detach --force-recreate --timeout 1 $${QT_TEST_SERVER_LIST} &&
# Check test cases with docker-based test servers.
- testserver_test.commands += $(MAKE) check_network;
+ testserver_test.commands += $(MAKE) -f $(MAKEFILE) check_network &&
# Stop and remove test servers after testing.
- testserver_test.commands += $$TEST_ENV docker-compose -f $$TESTSERVER_COMPOSE_FILE down \
+ !isEmpty(TEST_CMD): testserver_test.commands += $$TEST_CMD $$TEST_ENV
+ testserver_test.commands += docker-compose $$MACHINE_CONFIG -f $$TESTSERVER_COMPOSE_FILE down \
--timeout 1
# Destroy test servers and tidy away related files.
- testserver_clean.commands = $$TEST_ENV docker-compose -f $$TESTSERVER_COMPOSE_FILE down \
+ testserver_clean.commands = docker-compose $$MACHINE_CONFIG -f $$TESTSERVER_COMPOSE_FILE down \
--rmi all
QMAKE_EXTRA_TARGETS += testserver_pretest testserver_test testserver_clean
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index 293cbd8323..74ddfd5620 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -682,6 +682,7 @@ private slots:
void finalClasses();
void explicitOverrideControl_data();
void explicitOverrideControl();
+ void overloadedAddressOperator();
void autoPropertyMetaTypeRegistration();
void autoMethodArgumentMetaTypeRegistration();
void autoSignalSpyMetaTypeRegistration();
@@ -2942,6 +2943,34 @@ void tst_Moc::explicitOverrideControl()
#endif
}
+class OverloadedAddressOperator : public QObject
+{
+ Q_OBJECT
+public:
+ void* operator&() { return nullptr; }
+signals:
+ void self(OverloadedAddressOperator&);
+public slots:
+ void assertSelf(OverloadedAddressOperator &o)
+ {
+ QCOMPARE(std::addressof(o), this);
+ testResult = (std::addressof(o) == this);
+ }
+public:
+ bool testResult = false;
+};
+
+void tst_Moc::overloadedAddressOperator()
+{
+ OverloadedAddressOperator o;
+ OverloadedAddressOperator *p = std::addressof(o);
+ QCOMPARE(&o, nullptr);
+ QVERIFY(p);
+ QObject::connect(p, &OverloadedAddressOperator::self, p, &OverloadedAddressOperator::assertSelf);
+ emit o.self(o);
+ QVERIFY(o.testResult);
+}
+
class CustomQObject : public QObject
{
Q_OBJECT
diff --git a/tests/auto/tools/rcc/data/images/images.expected b/tests/auto/tools/rcc/data/images/images.expected
index 45e96dccd0..2af071812e 100644
--- a/tests/auto/tools/rcc/data/images/images.expected
+++ b/tests/auto/tools/rcc/data/images/images.expected
@@ -115,7 +115,6 @@ namespace QT_NAMESPACE {
#endif
bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
-
bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
#ifdef QT_NAMESPACE
@@ -125,16 +124,18 @@ bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *,
int QT_RCC_MANGLE_NAMESPACE(qInitResources)();
int QT_RCC_MANGLE_NAMESPACE(qInitResources)()
{
+ int version = 3;
QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData)
- (0x2, qt_resource_struct, qt_resource_name, qt_resource_data);
+ (version, qt_resource_struct, qt_resource_name, qt_resource_data);
return 1;
}
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)();
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)()
{
+ int version = 3;
QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData)
- (0x2, qt_resource_struct, qt_resource_name, qt_resource_data);
+ (version, qt_resource_struct, qt_resource_name, qt_resource_data);
return 1;
}
diff --git a/tests/auto/tools/rcc/data/sizes/data/data-0.txt b/tests/auto/tools/rcc/data/sizes/data/data-0.txt
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/auto/tools/rcc/data/sizes/data/data-0.txt
diff --git a/tests/auto/tools/rcc/data/sizes/data/data-1.txt b/tests/auto/tools/rcc/data/sizes/data/data-1.txt
new file mode 100644
index 0000000000..b516b2c489
--- /dev/null
+++ b/tests/auto/tools/rcc/data/sizes/data/data-1.txt
@@ -0,0 +1 @@
+@ \ No newline at end of file
diff --git a/tests/auto/tools/rcc/data/sizes/data/data-2.txt b/tests/auto/tools/rcc/data/sizes/data/data-2.txt
new file mode 100644
index 0000000000..a616ad491b
--- /dev/null
+++ b/tests/auto/tools/rcc/data/sizes/data/data-2.txt
@@ -0,0 +1 @@
+01 \ No newline at end of file
diff --git a/tests/auto/tools/rcc/data/sizes/data/data-35.txt b/tests/auto/tools/rcc/data/sizes/data/data-35.txt
new file mode 100644
index 0000000000..19a8036a15
--- /dev/null
+++ b/tests/auto/tools/rcc/data/sizes/data/data-35.txt
@@ -0,0 +1 @@
+0123456789 0123456789 0123456789 12 \ No newline at end of file
diff --git a/tests/auto/tools/rcc/data/sizes/size-0.expected b/tests/auto/tools/rcc/data/sizes/size-0.expected
new file mode 100644
index 0000000000..2f70a607ab
--- /dev/null
+++ b/tests/auto/tools/rcc/data/sizes/size-0.expected
@@ -0,0 +1,89 @@
+/****************************************************************************
+** Resource object code
+**
+IGNORE: ** Created by: The Resource Compiler for Qt version 5.11.2
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+static const unsigned char qt_resource_data[] = {
+IGNORE: // /data/dev/qt-5/qtbase/tests/auto/tools/rcc/data/sizes/data/data-0.txt
+ 0x0,0x0,0x0,0x0,
+
+
+};
+
+static const unsigned char qt_resource_name[] = {
+ // data
+ 0x0,0x4,
+ 0x0,0x6,0xa8,0xa1,
+ 0x0,0x64,
+ 0x0,0x61,0x0,0x74,0x0,0x61,
+ // data-0.txt
+ 0x0,0xa,
+ 0x4,0xe,0xa,0xb4,
+ 0x0,0x64,
+ 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x30,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74,
+
+};
+
+static const unsigned char qt_resource_struct[] = {
+ // :
+ 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1,
+0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ // :/data
+ 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x2,
+0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ // :/data/data-0.txt
+ 0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
+TIMESTAMP:data/data-0.txt
+
+};
+
+#ifdef QT_NAMESPACE
+# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
+# define QT_RCC_MANGLE_NAMESPACE0(x) x
+# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b
+# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b)
+# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \
+ QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE))
+#else
+# define QT_RCC_PREPEND_NAMESPACE(name) name
+# define QT_RCC_MANGLE_NAMESPACE(name) name
+#endif
+
+#ifdef QT_NAMESPACE
+namespace QT_NAMESPACE {
+#endif
+
+bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
+bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
+
+#ifdef QT_NAMESPACE
+}
+#endif
+
+int QT_RCC_MANGLE_NAMESPACE(qInitResources)();
+int QT_RCC_MANGLE_NAMESPACE(qInitResources)()
+{
+ int version = 3;
+ QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData)
+ (version, qt_resource_struct, qt_resource_name, qt_resource_data);
+ return 1;
+}
+
+int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)();
+int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)()
+{
+ int version = 3;
+ QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData)
+ (version, qt_resource_struct, qt_resource_name, qt_resource_data);
+ return 1;
+}
+
+namespace {
+ struct initializer {
+ initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources)(); }
+ ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); }
+ } dummy;
+}
diff --git a/tests/auto/tools/rcc/data/sizes/size-0.qrc b/tests/auto/tools/rcc/data/sizes/size-0.qrc
new file mode 100644
index 0000000000..9f47732fe2
--- /dev/null
+++ b/tests/auto/tools/rcc/data/sizes/size-0.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>data/data-0.txt</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/tools/rcc/data/sizes/size-1.expected b/tests/auto/tools/rcc/data/sizes/size-1.expected
new file mode 100644
index 0000000000..d1717a9255
--- /dev/null
+++ b/tests/auto/tools/rcc/data/sizes/size-1.expected
@@ -0,0 +1,90 @@
+/****************************************************************************
+** Resource object code
+**
+IGNORE:** Created by: The Resource Compiler for Qt version 5.11.2
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+static const unsigned char qt_resource_data[] = {
+IGNORE: // /data/dev/qt-5/qtbase/tests/auto/tools/rcc/data/sizes/data/data-1.txt
+ 0x0,0x0,0x0,0x1,
+ 0x40,
+
+
+};
+
+static const unsigned char qt_resource_name[] = {
+ // data
+ 0x0,0x4,
+ 0x0,0x6,0xa8,0xa1,
+ 0x0,0x64,
+ 0x0,0x61,0x0,0x74,0x0,0x61,
+ // data-1.txt
+ 0x0,0xa,
+ 0x4,0x11,0xa,0xb4,
+ 0x0,0x64,
+ 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x31,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74,
+
+};
+
+static const unsigned char qt_resource_struct[] = {
+ // :
+ 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1,
+0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ // :/data
+ 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x2,
+0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ // :/data/data-1.txt
+ 0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
+TIMESTAMP:data/data-1.txt
+
+};
+
+#ifdef QT_NAMESPACE
+# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
+# define QT_RCC_MANGLE_NAMESPACE0(x) x
+# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b
+# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b)
+# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \
+ QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE))
+#else
+# define QT_RCC_PREPEND_NAMESPACE(name) name
+# define QT_RCC_MANGLE_NAMESPACE(name) name
+#endif
+
+#ifdef QT_NAMESPACE
+namespace QT_NAMESPACE {
+#endif
+
+bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
+bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
+
+#ifdef QT_NAMESPACE
+}
+#endif
+
+int QT_RCC_MANGLE_NAMESPACE(qInitResources)();
+int QT_RCC_MANGLE_NAMESPACE(qInitResources)()
+{
+ int version = 3;
+ QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData)
+ (version, qt_resource_struct, qt_resource_name, qt_resource_data);
+ return 1;
+}
+
+int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)();
+int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)()
+{
+ int version = 3;
+ QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData)
+ (version, qt_resource_struct, qt_resource_name, qt_resource_data);
+ return 1;
+}
+
+namespace {
+ struct initializer {
+ initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources)(); }
+ ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); }
+ } dummy;
+}
diff --git a/tests/auto/tools/rcc/data/sizes/size-1.qrc b/tests/auto/tools/rcc/data/sizes/size-1.qrc
new file mode 100644
index 0000000000..9fde9a1722
--- /dev/null
+++ b/tests/auto/tools/rcc/data/sizes/size-1.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>data/data-1.txt</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.expected b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.expected
new file mode 100644
index 0000000000..7a7cc93df1
--- /dev/null
+++ b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.expected
@@ -0,0 +1,127 @@
+/****************************************************************************
+** Resource object code
+**
+IGNORE: ** Created by: The Resource Compiler for Qt version 5.11.2
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+static const unsigned char qt_resource_data[] = {
+IGNORE: // /data/dev/qt-5/qtbase/tests/auto/tools/rcc/data/sizes/data/data-2.txt
+ 0x0,0x0,0x0,0x2,
+ 0x30,
+ 0x31,
+IGNORE: // /data/dev/qt-5/qtbase/tests/auto/tools/rcc/data/sizes/data/data-35.txt
+ 0x0,0x0,0x0,0x23,
+ 0x30,
+ 0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x20,0x30,0x31,0x32,0x33,0x34,0x35,
+ 0x36,0x37,0x38,0x39,0x20,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x20,
+ 0x31,0x32,
+IGNORE: // /data/dev/qt-5/qtbase/tests/auto/tools/rcc/data/sizes/data/data-1.txt
+ 0x0,0x0,0x0,0x1,
+ 0x40,
+
+IGNORE: // /data/dev/qt-5/qtbase/tests/auto/tools/rcc/data/sizes/data/data-0.txt
+ 0x0,0x0,0x0,0x0,
+
+
+};
+
+static const unsigned char qt_resource_name[] = {
+ // data
+ 0x0,0x4,
+ 0x0,0x6,0xa8,0xa1,
+ 0x0,0x64,
+ 0x0,0x61,0x0,0x74,0x0,0x61,
+ // data-2.txt
+ 0x0,0xa,
+ 0x4,0x8,0xa,0xb4,
+ 0x0,0x64,
+ 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x32,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74,
+ // data-35.txt
+ 0x0,0xb,
+ 0x0,0xb5,0x4f,0x74,
+ 0x0,0x64,
+ 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x33,0x0,0x35,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74,
+ // data-1.txt
+ 0x0,0xa,
+ 0x4,0x11,0xa,0xb4,
+ 0x0,0x64,
+ 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x31,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74,
+ // data-0.txt
+ 0x0,0xa,
+ 0x4,0xe,0xa,0xb4,
+ 0x0,0x64,
+ 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x30,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74,
+
+};
+
+static const unsigned char qt_resource_struct[] = {
+ // :
+ 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1,
+0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ // :/data
+ 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x2,
+0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+ // :/data/data-35.txt
+ 0x0,0x0,0x0,0x28,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x6,
+TIMESTAMP:data/data-35.txt
+ // :/data/data-2.txt
+ 0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
+TIMESTAMP:data/data-2.txt
+ // :/data/data-0.txt
+ 0x0,0x0,0x0,0x5e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x32,
+TIMESTAMP:data/data-0.txt
+ // :/data/data-1.txt
+ 0x0,0x0,0x0,0x44,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x2d,
+TIMESTAMP:data/data-1.txt
+
+};
+
+#ifdef QT_NAMESPACE
+# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
+# define QT_RCC_MANGLE_NAMESPACE0(x) x
+# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b
+# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b)
+# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \
+ QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE))
+#else
+# define QT_RCC_PREPEND_NAMESPACE(name) name
+# define QT_RCC_MANGLE_NAMESPACE(name) name
+#endif
+
+#ifdef QT_NAMESPACE
+namespace QT_NAMESPACE {
+#endif
+
+bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
+bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
+
+#ifdef QT_NAMESPACE
+}
+#endif
+
+int QT_RCC_MANGLE_NAMESPACE(qInitResources)();
+int QT_RCC_MANGLE_NAMESPACE(qInitResources)()
+{
+ int version = 3;
+ QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData)
+ (version, qt_resource_struct, qt_resource_name, qt_resource_data);
+ return 1;
+}
+
+int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)();
+int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)()
+{
+ int version = 3;
+ QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData)
+ (version, qt_resource_struct, qt_resource_name, qt_resource_data);
+ return 1;
+}
+
+namespace {
+ struct initializer {
+ initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources)(); }
+ ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); }
+ } dummy;
+}
diff --git a/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.qrc b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.qrc
new file mode 100644
index 0000000000..039c9203ff
--- /dev/null
+++ b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.qrc
@@ -0,0 +1,8 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>data/data-2.txt</file>
+ <file>data/data-0.txt</file>
+ <file>data/data-35.txt</file>
+ <file>data/data-1.txt</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/tools/rcc/rcc.pro b/tests/auto/tools/rcc/rcc.pro
index 264b8ecc66..3fdc4132a7 100644
--- a/tests/auto/tools/rcc/rcc.pro
+++ b/tests/auto/tools/rcc/rcc.pro
@@ -3,3 +3,10 @@ QT = core testlib
TARGET = tst_rcc
SOURCES += tst_rcc.cpp
+
+RESOURCES += \
+ $$PWD/data/images/images.qrc \
+ $$PWD/data/sizes/size-0.qrc \
+ $$PWD/data/sizes/size-2-0-35-1.qrc \
+ $$PWD/data/sizes/size-1.qrc
+
diff --git a/tests/auto/tools/rcc/tst_rcc.cpp b/tests/auto/tools/rcc/tst_rcc.cpp
index 54a2854ede..c810c6e364 100644
--- a/tests/auto/tools/rcc/tst_rcc.cpp
+++ b/tests/auto/tools/rcc/tst_rcc.cpp
@@ -55,9 +55,13 @@ private slots:
void rcc_data();
void rcc();
+
void binary_data();
void binary();
+ void readback_data();
+ void readback();
+
void cleanupTestCase();
private:
@@ -126,6 +130,13 @@ void tst_rcc::rcc_data()
if (dataPath.isEmpty())
QFAIL("data path not found");
QTest::newRow("images") << dataPath << "images.qrc" << "images.expected";
+
+ QString sizesPath = QFINDTESTDATA("data/sizes/");
+ if (sizesPath.isEmpty())
+ QFAIL("data path not found");
+ QTest::newRow("size-0") << sizesPath << "size-0.qrc" << "size-0.expected";
+ QTest::newRow("size-1") << sizesPath << "size-1.qrc" << "size-1.expected";
+ QTest::newRow("size-2-0-35-1") << sizesPath << "size-2-0-35-1.qrc" << "size-2-0-35-1.expected";
}
void tst_rcc::rcc()
@@ -148,9 +159,10 @@ void tst_rcc::rcc()
return;
}
- // Launch
+ // Launch; force no compression, otherwise the output would be different
+ // depending on the compression algorithm we're using
QProcess process;
- process.start(m_rcc, QStringList(qrcfile));
+ process.start(m_rcc, { "-no-compress", qrcfile });
if (!process.waitForFinished()) {
const QString path = QString::fromLocal8Bit(qgetenv("PATH"));
QString message = QString::fromLatin1("'%1' could not be found when run from '%2'. Path: '%3' ").
@@ -185,8 +197,9 @@ static void createRccBinaryData(const QString &rcc, const QString &baseDir,
QString currentDir = QDir::currentPath();
QDir::setCurrent(baseDir);
+ // same as above: force no compression
QProcess rccProcess;
- rccProcess.start(rcc, QStringList() << "-binary" << "-o" << rccFileName << qrcFileName);
+ rccProcess.start(rcc, { "-binary", "-no-compress", "-o", rccFileName, qrcFileName });
bool ok = rccProcess.waitForFinished();
if (!ok) {
QString errorString = QString::fromLatin1("Could not start rcc (is it in PATH?): %1").arg(rccProcess.errorString());
@@ -353,6 +366,42 @@ void tst_rcc::binary()
QLocale::setDefault(oldDefaultLocale);
}
+void tst_rcc::readback_data()
+{
+ QTest::addColumn<QString>("resourceName");
+ QTest::addColumn<QString>("fileSystemName");
+
+ QTest::newRow("data-0") << ":data/data-0.txt" << "sizes/data/data-0.txt";
+ QTest::newRow("data-1") << ":data/data-1.txt" << "sizes/data/data-1.txt";
+ QTest::newRow("data-2") << ":data/data-2.txt" << "sizes/data/data-2.txt";
+ QTest::newRow("data-35") << ":data/data-35.txt" << "sizes/data/data-35.txt";
+ QTest::newRow("circle") << ":images/circle.png" << "images/images/circle.png";
+ QTest::newRow("square") << ":images/square.png" << "images/images/square.png";
+ QTest::newRow("triangle") << ":images/subdir/triangle.png"
+ << "images/images/subdir/triangle.png";
+}
+
+void tst_rcc::readback()
+{
+ QFETCH(QString, resourceName);
+ QFETCH(QString, fileSystemName);
+
+ QString dataPath = QFINDTESTDATA("data/");
+ if (dataPath.isEmpty())
+ QFAIL("data path not found");
+
+ QFile resourceFile(resourceName);
+ QVERIFY(resourceFile.open(QIODevice::ReadOnly));
+ QByteArray resourceData = resourceFile.readAll();
+ resourceFile.close();
+
+ QFile fileSystemFile(dataPath + fileSystemName);
+ QVERIFY(fileSystemFile.open(QIODevice::ReadOnly));
+ QByteArray fileSystemData = fileSystemFile.readAll();
+ fileSystemFile.close();
+
+ QCOMPARE(resourceData, fileSystemData);
+}
void tst_rcc::cleanupTestCase()
{
diff --git a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h
index 1f5004b2aa..8b17acc1cd 100644
--- a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h
+++ b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'Dialog_with_Buttons_Bottom.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -41,7 +41,7 @@ public:
void retranslateUi(QDialog *Dialog)
{
- Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", nullptr));
+ Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Dialog", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h
index 8dd8b11b62..cdb12ec2b8 100644
--- a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h
+++ b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'Dialog_with_Buttons_Right.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -41,7 +41,7 @@ public:
void retranslateUi(QDialog *Dialog)
{
- Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", nullptr));
+ Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Dialog", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h b/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h
index 95acabf3f8..abdeb5b823 100644
--- a/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h
+++ b/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'Dialog_without_Buttons.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -32,7 +32,7 @@ public:
void retranslateUi(QDialog *Dialog)
{
- Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", nullptr));
+ Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Dialog", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/Main_Window.ui.h b/tests/auto/tools/uic/baseline/Main_Window.ui.h
index 9e59e9f2e5..b78a3df8af 100644
--- a/tests/auto/tools/uic/baseline/Main_Window.ui.h
+++ b/tests/auto/tools/uic/baseline/Main_Window.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'Main_Window.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -47,7 +47,7 @@ public:
void retranslateUi(QMainWindow *MainWindow)
{
- MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", nullptr));
+ MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "MainWindow", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/Widget.ui.h b/tests/auto/tools/uic/baseline/Widget.ui.h
index 4318c2262f..906f648533 100644
--- a/tests/auto/tools/uic/baseline/Widget.ui.h
+++ b/tests/auto/tools/uic/baseline/Widget.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'Widget.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -57,13 +57,13 @@ public:
void retranslateUi(QWidget *Form)
{
- Form->setWindowTitle(QApplication::translate("Form", "Form", nullptr));
- Alabel->setText(QApplication::translate("Form", "A label.\n"
+ Form->setWindowTitle(QCoreApplication::translate("Form", "Form", nullptr));
+ Alabel->setText(QCoreApplication::translate("Form", "A label.\n"
"One new line.\n"
"Another new line.\n"
"Last line.", nullptr));
- groupBox->setTitle(QApplication::translate("Form", "A Group Box", nullptr));
- pushButton->setText(QApplication::translate("Form", "PushButton", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("Form", "A Group Box", nullptr));
+ pushButton->setText(QCoreApplication::translate("Form", "PushButton", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/addlinkdialog.ui.h b/tests/auto/tools/uic/baseline/addlinkdialog.ui.h
index 17f51a92f8..2a0ef18fa7 100644
--- a/tests/auto/tools/uic/baseline/addlinkdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/addlinkdialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'addlinkdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -97,9 +97,9 @@ public:
void retranslateUi(QDialog *AddLinkDialog)
{
- AddLinkDialog->setWindowTitle(QApplication::translate("AddLinkDialog", "Insert Link", nullptr));
- label->setText(QApplication::translate("AddLinkDialog", "Title:", nullptr));
- label_2->setText(QApplication::translate("AddLinkDialog", "URL:", nullptr));
+ AddLinkDialog->setWindowTitle(QCoreApplication::translate("AddLinkDialog", "Insert Link", nullptr));
+ label->setText(QCoreApplication::translate("AddLinkDialog", "Title:", nullptr));
+ label_2->setText(QCoreApplication::translate("AddLinkDialog", "URL:", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/addtorrentform.ui.h b/tests/auto/tools/uic/baseline/addtorrentform.ui.h
index d259a011bf..b357d708d5 100644
--- a/tests/auto/tools/uic/baseline/addtorrentform.ui.h
+++ b/tests/auto/tools/uic/baseline/addtorrentform.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'addtorrentform.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -209,23 +209,23 @@ public:
void retranslateUi(QDialog *AddTorrentFile)
{
- AddTorrentFile->setWindowTitle(QApplication::translate("AddTorrentFile", "Add a torrent", nullptr));
- groupBox->setTitle(QApplication::translate("AddTorrentFile", "Select a torrent source", nullptr));
- label_4->setText(QApplication::translate("AddTorrentFile", "Destination:", nullptr));
- label_2->setText(QApplication::translate("AddTorrentFile", "Tracker URL:", nullptr));
- browseTorrents->setText(QApplication::translate("AddTorrentFile", "Browse", nullptr));
- label_5->setText(QApplication::translate("AddTorrentFile", "File(s):", nullptr));
- label_3->setText(QApplication::translate("AddTorrentFile", "Size:", nullptr));
- label_6->setText(QApplication::translate("AddTorrentFile", "Creator:", nullptr));
- announceUrl->setText(QApplication::translate("AddTorrentFile", "<none>", nullptr));
- label->setText(QApplication::translate("AddTorrentFile", "Torrent file:", nullptr));
- browseDestination->setText(QApplication::translate("AddTorrentFile", "Browse", nullptr));
- label_7->setText(QApplication::translate("AddTorrentFile", "Comment:", nullptr));
- commentLabel->setText(QApplication::translate("AddTorrentFile", "<none>", nullptr));
- creatorLabel->setText(QApplication::translate("AddTorrentFile", "<none>", nullptr));
- sizeLabel->setText(QApplication::translate("AddTorrentFile", "0", nullptr));
- okButton->setText(QApplication::translate("AddTorrentFile", "&OK", nullptr));
- cancelButton->setText(QApplication::translate("AddTorrentFile", "&Cancel", nullptr));
+ AddTorrentFile->setWindowTitle(QCoreApplication::translate("AddTorrentFile", "Add a torrent", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("AddTorrentFile", "Select a torrent source", nullptr));
+ label_4->setText(QCoreApplication::translate("AddTorrentFile", "Destination:", nullptr));
+ label_2->setText(QCoreApplication::translate("AddTorrentFile", "Tracker URL:", nullptr));
+ browseTorrents->setText(QCoreApplication::translate("AddTorrentFile", "Browse", nullptr));
+ label_5->setText(QCoreApplication::translate("AddTorrentFile", "File(s):", nullptr));
+ label_3->setText(QCoreApplication::translate("AddTorrentFile", "Size:", nullptr));
+ label_6->setText(QCoreApplication::translate("AddTorrentFile", "Creator:", nullptr));
+ announceUrl->setText(QCoreApplication::translate("AddTorrentFile", "<none>", nullptr));
+ label->setText(QCoreApplication::translate("AddTorrentFile", "Torrent file:", nullptr));
+ browseDestination->setText(QCoreApplication::translate("AddTorrentFile", "Browse", nullptr));
+ label_7->setText(QCoreApplication::translate("AddTorrentFile", "Comment:", nullptr));
+ commentLabel->setText(QCoreApplication::translate("AddTorrentFile", "<none>", nullptr));
+ creatorLabel->setText(QCoreApplication::translate("AddTorrentFile", "<none>", nullptr));
+ sizeLabel->setText(QCoreApplication::translate("AddTorrentFile", "0", nullptr));
+ okButton->setText(QCoreApplication::translate("AddTorrentFile", "&OK", nullptr));
+ cancelButton->setText(QCoreApplication::translate("AddTorrentFile", "&Cancel", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/authenticationdialog.ui.h b/tests/auto/tools/uic/baseline/authenticationdialog.ui.h
index 16c9ce16a8..f8378b9a4e 100644
--- a/tests/auto/tools/uic/baseline/authenticationdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/authenticationdialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'authenticationdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -103,12 +103,12 @@ public:
void retranslateUi(QDialog *Dialog)
{
- Dialog->setWindowTitle(QApplication::translate("Dialog", "Http authentication required", nullptr));
- label->setText(QApplication::translate("Dialog", "You need to supply a Username and a Password to access this site", nullptr));
- label_2->setText(QApplication::translate("Dialog", "Username:", nullptr));
- label_3->setText(QApplication::translate("Dialog", "Password:", nullptr));
- label_4->setText(QApplication::translate("Dialog", "Site:", nullptr));
- siteDescription->setText(QApplication::translate("Dialog", "%1 at %2", nullptr));
+ Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Http authentication required", nullptr));
+ label->setText(QCoreApplication::translate("Dialog", "You need to supply a Username and a Password to access this site", nullptr));
+ label_2->setText(QCoreApplication::translate("Dialog", "Username:", nullptr));
+ label_3->setText(QCoreApplication::translate("Dialog", "Password:", nullptr));
+ label_4->setText(QCoreApplication::translate("Dialog", "Site:", nullptr));
+ siteDescription->setText(QCoreApplication::translate("Dialog", "%1 at %2", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/backside.ui.h b/tests/auto/tools/uic/baseline/backside.ui.h
index e7053c632f..7f2b3662f3 100644
--- a/tests/auto/tools/uic/baseline/backside.ui.h
+++ b/tests/auto/tools/uic/baseline/backside.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'backside.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -144,40 +144,40 @@ public:
void retranslateUi(QWidget *BackSide)
{
- BackSide->setWindowTitle(QApplication::translate("BackSide", "BackSide", nullptr));
- groupBox->setTitle(QApplication::translate("BackSide", "Settings", nullptr));
- label->setText(QApplication::translate("BackSide", "Title:", nullptr));
- hostName->setText(QApplication::translate("BackSide", "Pad Navigator Example", nullptr));
- label_2->setText(QApplication::translate("BackSide", "Modified:", nullptr));
- label_3->setText(QApplication::translate("BackSide", "Extent", nullptr));
- groupBox_2->setTitle(QApplication::translate("BackSide", "Other input", nullptr));
+ BackSide->setWindowTitle(QCoreApplication::translate("BackSide", "BackSide", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("BackSide", "Settings", nullptr));
+ label->setText(QCoreApplication::translate("BackSide", "Title:", nullptr));
+ hostName->setText(QCoreApplication::translate("BackSide", "Pad Navigator Example", nullptr));
+ label_2->setText(QCoreApplication::translate("BackSide", "Modified:", nullptr));
+ label_3->setText(QCoreApplication::translate("BackSide", "Extent", nullptr));
+ groupBox_2->setTitle(QCoreApplication::translate("BackSide", "Other input", nullptr));
QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem();
- ___qtreewidgetitem->setText(0, QApplication::translate("BackSide", "Widgets On Graphics View", nullptr));
+ ___qtreewidgetitem->setText(0, QCoreApplication::translate("BackSide", "Widgets On Graphics View", nullptr));
const bool __sortingEnabled = treeWidget->isSortingEnabled();
treeWidget->setSortingEnabled(false);
QTreeWidgetItem *___qtreewidgetitem1 = treeWidget->topLevelItem(0);
- ___qtreewidgetitem1->setText(0, QApplication::translate("BackSide", "QGraphicsProxyWidget", nullptr));
+ ___qtreewidgetitem1->setText(0, QCoreApplication::translate("BackSide", "QGraphicsProxyWidget", nullptr));
QTreeWidgetItem *___qtreewidgetitem2 = ___qtreewidgetitem1->child(0);
- ___qtreewidgetitem2->setText(0, QApplication::translate("BackSide", "QGraphicsWidget", nullptr));
+ ___qtreewidgetitem2->setText(0, QCoreApplication::translate("BackSide", "QGraphicsWidget", nullptr));
QTreeWidgetItem *___qtreewidgetitem3 = ___qtreewidgetitem2->child(0);
- ___qtreewidgetitem3->setText(0, QApplication::translate("BackSide", "QObject", nullptr));
+ ___qtreewidgetitem3->setText(0, QCoreApplication::translate("BackSide", "QObject", nullptr));
QTreeWidgetItem *___qtreewidgetitem4 = ___qtreewidgetitem2->child(1);
- ___qtreewidgetitem4->setText(0, QApplication::translate("BackSide", "QGraphicsItem", nullptr));
+ ___qtreewidgetitem4->setText(0, QCoreApplication::translate("BackSide", "QGraphicsItem", nullptr));
QTreeWidgetItem *___qtreewidgetitem5 = ___qtreewidgetitem2->child(2);
- ___qtreewidgetitem5->setText(0, QApplication::translate("BackSide", "QGraphicsLayoutItem", nullptr));
+ ___qtreewidgetitem5->setText(0, QCoreApplication::translate("BackSide", "QGraphicsLayoutItem", nullptr));
QTreeWidgetItem *___qtreewidgetitem6 = treeWidget->topLevelItem(1);
- ___qtreewidgetitem6->setText(0, QApplication::translate("BackSide", "QGraphicsGridLayout", nullptr));
+ ___qtreewidgetitem6->setText(0, QCoreApplication::translate("BackSide", "QGraphicsGridLayout", nullptr));
QTreeWidgetItem *___qtreewidgetitem7 = ___qtreewidgetitem6->child(0);
- ___qtreewidgetitem7->setText(0, QApplication::translate("BackSide", "QGraphicsLayout", nullptr));
+ ___qtreewidgetitem7->setText(0, QCoreApplication::translate("BackSide", "QGraphicsLayout", nullptr));
QTreeWidgetItem *___qtreewidgetitem8 = ___qtreewidgetitem7->child(0);
- ___qtreewidgetitem8->setText(0, QApplication::translate("BackSide", "QGraphicsLayoutItem", nullptr));
+ ___qtreewidgetitem8->setText(0, QCoreApplication::translate("BackSide", "QGraphicsLayoutItem", nullptr));
QTreeWidgetItem *___qtreewidgetitem9 = treeWidget->topLevelItem(2);
- ___qtreewidgetitem9->setText(0, QApplication::translate("BackSide", "QGraphicsLinearLayout", nullptr));
+ ___qtreewidgetitem9->setText(0, QCoreApplication::translate("BackSide", "QGraphicsLinearLayout", nullptr));
QTreeWidgetItem *___qtreewidgetitem10 = ___qtreewidgetitem9->child(0);
- ___qtreewidgetitem10->setText(0, QApplication::translate("BackSide", "QGraphicsLayout", nullptr));
+ ___qtreewidgetitem10->setText(0, QCoreApplication::translate("BackSide", "QGraphicsLayout", nullptr));
QTreeWidgetItem *___qtreewidgetitem11 = ___qtreewidgetitem10->child(0);
- ___qtreewidgetitem11->setText(0, QApplication::translate("BackSide", "QGraphicsLayoutItem", nullptr));
+ ___qtreewidgetitem11->setText(0, QCoreApplication::translate("BackSide", "QGraphicsLayoutItem", nullptr));
treeWidget->setSortingEnabled(__sortingEnabled);
} // retranslateUi
diff --git a/tests/auto/tools/uic/baseline/batchtranslation.ui.h b/tests/auto/tools/uic/baseline/batchtranslation.ui.h
index 8a4dc7a677..5e7278a581 100644
--- a/tests/auto/tools/uic/baseline/batchtranslation.ui.h
+++ b/tests/auto/tools/uic/baseline/batchtranslation.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'batchtranslation.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -90,7 +90,7 @@ public:
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
groupBox = new QGroupBox(databaseTranslationDialog);
groupBox->setObjectName(QString::fromUtf8("groupBox"));
- QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4));
+ QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(groupBox->sizePolicy().hasHeightForWidth());
@@ -120,7 +120,7 @@ public:
groupBox_2 = new QGroupBox(databaseTranslationDialog);
groupBox_2->setObjectName(QString::fromUtf8("groupBox_2"));
- QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(1));
+ QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Minimum);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(groupBox_2->sizePolicy().hasHeightForWidth());
@@ -213,16 +213,16 @@ public:
void retranslateUi(QDialog *databaseTranslationDialog)
{
- databaseTranslationDialog->setWindowTitle(QApplication::translate("databaseTranslationDialog", "Qt Linguist - Batch Translation", nullptr));
- groupBox->setTitle(QApplication::translate("databaseTranslationDialog", "Options", nullptr));
- ckOnlyUntranslated->setText(QApplication::translate("databaseTranslationDialog", "Only translate entries with no translation", nullptr));
- ckMarkFinished->setText(QApplication::translate("databaseTranslationDialog", "Set translated entries to finished", nullptr));
- groupBox_2->setTitle(QApplication::translate("databaseTranslationDialog", "Phrase book preference", nullptr));
- moveUpButton->setText(QApplication::translate("databaseTranslationDialog", "Move up", nullptr));
- moveDownButton->setText(QApplication::translate("databaseTranslationDialog", "Move down", nullptr));
- label->setText(QApplication::translate("databaseTranslationDialog", "The batch translator will search through the selected phrasebooks in the order given above.", nullptr));
- runButton->setText(QApplication::translate("databaseTranslationDialog", "&Run", nullptr));
- cancelButton->setText(QApplication::translate("databaseTranslationDialog", "&Cancel", nullptr));
+ databaseTranslationDialog->setWindowTitle(QCoreApplication::translate("databaseTranslationDialog", "Qt Linguist - Batch Translation", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("databaseTranslationDialog", "Options", nullptr));
+ ckOnlyUntranslated->setText(QCoreApplication::translate("databaseTranslationDialog", "Only translate entries with no translation", nullptr));
+ ckMarkFinished->setText(QCoreApplication::translate("databaseTranslationDialog", "Set translated entries to finished", nullptr));
+ groupBox_2->setTitle(QCoreApplication::translate("databaseTranslationDialog", "Phrase book preference", nullptr));
+ moveUpButton->setText(QCoreApplication::translate("databaseTranslationDialog", "Move up", nullptr));
+ moveDownButton->setText(QCoreApplication::translate("databaseTranslationDialog", "Move down", nullptr));
+ label->setText(QCoreApplication::translate("databaseTranslationDialog", "The batch translator will search through the selected phrasebooks in the order given above.", nullptr));
+ runButton->setText(QCoreApplication::translate("databaseTranslationDialog", "&Run", nullptr));
+ cancelButton->setText(QCoreApplication::translate("databaseTranslationDialog", "&Cancel", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h b/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h
index b5a44998be..11caa3f130 100644
--- a/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'bookmarkdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -148,13 +148,13 @@ public:
void retranslateUi(QDialog *BookmarkDialog)
{
- BookmarkDialog->setWindowTitle(QApplication::translate("BookmarkDialog", "Add Bookmark", nullptr));
- label->setText(QApplication::translate("BookmarkDialog", "Bookmark:", nullptr));
- label_2->setText(QApplication::translate("BookmarkDialog", "Add in Folder:", nullptr));
- toolButton->setText(QApplication::translate("BookmarkDialog", "+", nullptr));
+ BookmarkDialog->setWindowTitle(QCoreApplication::translate("BookmarkDialog", "Add Bookmark", nullptr));
+ label->setText(QCoreApplication::translate("BookmarkDialog", "Bookmark:", nullptr));
+ label_2->setText(QCoreApplication::translate("BookmarkDialog", "Add in Folder:", nullptr));
+ toolButton->setText(QCoreApplication::translate("BookmarkDialog", "+", nullptr));
QTreeWidgetItem *___qtreewidgetitem = bookmarkWidget->headerItem();
- ___qtreewidgetitem->setText(0, QApplication::translate("BookmarkDialog", "1", nullptr));
- newFolderButton->setText(QApplication::translate("BookmarkDialog", "New Folder", nullptr));
+ ___qtreewidgetitem->setText(0, QCoreApplication::translate("BookmarkDialog", "1", nullptr));
+ newFolderButton->setText(QCoreApplication::translate("BookmarkDialog", "New Folder", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/bookwindow.ui.h b/tests/auto/tools/uic/baseline/bookwindow.ui.h
index 8fe5f000e2..fbdcb17bd2 100644
--- a/tests/auto/tools/uic/baseline/bookwindow.ui.h
+++ b/tests/auto/tools/uic/baseline/bookwindow.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'bookwindow.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -157,15 +157,15 @@ public:
void retranslateUi(QMainWindow *BookWindow)
{
- BookWindow->setWindowTitle(QApplication::translate("BookWindow", "Books", nullptr));
- groupBox->setTitle(QApplication::translate("BookWindow", "Books", nullptr));
- groupBox_2->setTitle(QApplication::translate("BookWindow", "Details", nullptr));
- label_5->setText(QApplication::translate("BookWindow", "<b>Title:</b>", nullptr));
- label_2_2_2_2->setText(QApplication::translate("BookWindow", "<b>Author: </b>", nullptr));
- label_3->setText(QApplication::translate("BookWindow", "<b>Genre:</b>", nullptr));
- label_4->setText(QApplication::translate("BookWindow", "<b>Year:</b>", nullptr));
+ BookWindow->setWindowTitle(QCoreApplication::translate("BookWindow", "Books", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("BookWindow", "Books", nullptr));
+ groupBox_2->setTitle(QCoreApplication::translate("BookWindow", "Details", nullptr));
+ label_5->setText(QCoreApplication::translate("BookWindow", "<b>Title:</b>", nullptr));
+ label_2_2_2_2->setText(QCoreApplication::translate("BookWindow", "<b>Author: </b>", nullptr));
+ label_3->setText(QCoreApplication::translate("BookWindow", "<b>Genre:</b>", nullptr));
+ label_4->setText(QCoreApplication::translate("BookWindow", "<b>Year:</b>", nullptr));
yearEdit->setPrefix(QString());
- label->setText(QApplication::translate("BookWindow", "<b>Rating:</b>", nullptr));
+ label->setText(QCoreApplication::translate("BookWindow", "<b>Rating:</b>", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/browserwidget.ui.h b/tests/auto/tools/uic/baseline/browserwidget.ui.h
index 3db93c34cf..7dcfb290f7 100644
--- a/tests/auto/tools/uic/baseline/browserwidget.ui.h
+++ b/tests/auto/tools/uic/baseline/browserwidget.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'browserwidget.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -62,7 +62,7 @@ public:
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
splitter_2 = new QSplitter(Browser);
splitter_2->setObjectName(QString::fromUtf8("splitter_2"));
- QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(7));
+ QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(splitter_2->sizePolicy().hasHeightForWidth());
@@ -70,7 +70,7 @@ public:
splitter_2->setOrientation(Qt::Horizontal);
connectionWidget = new ConnectionWidget(splitter_2);
connectionWidget->setObjectName(QString::fromUtf8("connectionWidget"));
- QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(13), static_cast<QSizePolicy::Policy>(7));
+ QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Expanding);
sizePolicy1.setHorizontalStretch(1);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(connectionWidget->sizePolicy().hasHeightForWidth());
@@ -78,7 +78,7 @@ public:
splitter_2->addWidget(connectionWidget);
table = new QTableView(splitter_2);
table->setObjectName(QString::fromUtf8("table"));
- QSizePolicy sizePolicy2(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(7));
+ QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Expanding);
sizePolicy2.setHorizontalStretch(2);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(table->sizePolicy().hasHeightForWidth());
@@ -91,7 +91,7 @@ public:
groupBox = new QGroupBox(Browser);
groupBox->setObjectName(QString::fromUtf8("groupBox"));
- QSizePolicy sizePolicy3(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(3));
+ QSizePolicy sizePolicy3(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding);
sizePolicy3.setHorizontalStretch(0);
sizePolicy3.setVerticalStretch(0);
sizePolicy3.setHeightForWidth(groupBox->sizePolicy().hasHeightForWidth());
@@ -107,7 +107,7 @@ public:
vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));
sqlEdit = new QTextEdit(groupBox);
sqlEdit->setObjectName(QString::fromUtf8("sqlEdit"));
- QSizePolicy sizePolicy4(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(3));
+ QSizePolicy sizePolicy4(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding);
sizePolicy4.setHorizontalStretch(0);
sizePolicy4.setVerticalStretch(0);
sizePolicy4.setHeightForWidth(sqlEdit->sizePolicy().hasHeightForWidth());
@@ -155,18 +155,18 @@ public:
void retranslateUi(QWidget *Browser)
{
- Browser->setWindowTitle(QApplication::translate("Browser", "Qt SQL Browser", nullptr));
- insertRowAction->setText(QApplication::translate("Browser", "&Insert Row", nullptr));
-#ifndef QT_NO_STATUSTIP
- insertRowAction->setStatusTip(QApplication::translate("Browser", "Inserts a new Row", nullptr));
-#endif // QT_NO_STATUSTIP
- deleteRowAction->setText(QApplication::translate("Browser", "&Delete Row", nullptr));
-#ifndef QT_NO_STATUSTIP
- deleteRowAction->setStatusTip(QApplication::translate("Browser", "Deletes the current Row", nullptr));
-#endif // QT_NO_STATUSTIP
- groupBox->setTitle(QApplication::translate("Browser", "SQL Query", nullptr));
- clearButton->setText(QApplication::translate("Browser", "&Clear", nullptr));
- submitButton->setText(QApplication::translate("Browser", "&Submit", nullptr));
+ Browser->setWindowTitle(QCoreApplication::translate("Browser", "Qt SQL Browser", nullptr));
+ insertRowAction->setText(QCoreApplication::translate("Browser", "&Insert Row", nullptr));
+#if QT_CONFIG(statustip)
+ insertRowAction->setStatusTip(QCoreApplication::translate("Browser", "Inserts a new Row", nullptr));
+#endif // QT_CONFIG(statustip)
+ deleteRowAction->setText(QCoreApplication::translate("Browser", "&Delete Row", nullptr));
+#if QT_CONFIG(statustip)
+ deleteRowAction->setStatusTip(QCoreApplication::translate("Browser", "Deletes the current Row", nullptr));
+#endif // QT_CONFIG(statustip)
+ groupBox->setTitle(QCoreApplication::translate("Browser", "SQL Query", nullptr));
+ clearButton->setText(QCoreApplication::translate("Browser", "&Clear", nullptr));
+ submitButton->setText(QCoreApplication::translate("Browser", "&Submit", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h b/tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h
index 47f8f22132..4e7186041e 100644
--- a/tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h
+++ b/tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'bug18156QTreeWidget.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -57,9 +57,9 @@ public:
void retranslateUi(QDialog *Dialog)
{
- Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", nullptr));
+ Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Dialog", nullptr));
QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem();
- ___qtreewidgetitem->setText(1, QApplication::translate("Dialog", "4", nullptr));
+ ___qtreewidgetitem->setText(1, QCoreApplication::translate("Dialog", "4", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/buttongroup.ui.h b/tests/auto/tools/uic/baseline/buttongroup.ui.h
index 87814dcba1..f48db1d593 100644
--- a/tests/auto/tools/uic/baseline/buttongroup.ui.h
+++ b/tests/auto/tools/uic/baseline/buttongroup.ui.h
@@ -195,14 +195,14 @@ public:
void retranslateUi(QWidget *Form)
{
- Form->setWindowTitle(QApplication::translate("Form", "Easing curves", nullptr));
- groupBox_2->setTitle(QApplication::translate("Form", "Path type", nullptr));
- lineRadio->setText(QApplication::translate("Form", "Line", nullptr));
- circleRadio->setText(QApplication::translate("Form", "Circle", nullptr));
- groupBox->setTitle(QApplication::translate("Form", "Properties", nullptr));
- label->setText(QApplication::translate("Form", "Period", nullptr));
- label_3->setText(QApplication::translate("Form", "Overshoot", nullptr));
- label_2->setText(QApplication::translate("Form", "Amplitude", nullptr));
+ Form->setWindowTitle(QCoreApplication::translate("Form", "Easing curves", nullptr));
+ groupBox_2->setTitle(QCoreApplication::translate("Form", "Path type", nullptr));
+ lineRadio->setText(QCoreApplication::translate("Form", "Line", nullptr));
+ circleRadio->setText(QCoreApplication::translate("Form", "Circle", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("Form", "Properties", nullptr));
+ label->setText(QCoreApplication::translate("Form", "Period", nullptr));
+ label_3->setText(QCoreApplication::translate("Form", "Overshoot", nullptr));
+ label_2->setText(QCoreApplication::translate("Form", "Amplitude", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/calculator.ui.h b/tests/auto/tools/uic/baseline/calculator.ui.h
index 0387ee472b..bfe272f8ea 100644
--- a/tests/auto/tools/uic/baseline/calculator.ui.h
+++ b/tests/auto/tools/uic/baseline/calculator.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'calculator.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -156,34 +156,34 @@ public:
void retranslateUi(QWidget *Calculator)
{
- Calculator->setWindowTitle(QApplication::translate("Calculator", "Calculator", nullptr));
- backspaceButton->setText(QApplication::translate("Calculator", "Backspace", nullptr));
- clearButton->setText(QApplication::translate("Calculator", "Clear", nullptr));
- clearAllButton->setText(QApplication::translate("Calculator", "Clear All", nullptr));
- clearMemoryButton->setText(QApplication::translate("Calculator", "MC", nullptr));
- readMemoryButton->setText(QApplication::translate("Calculator", "MR", nullptr));
- setMemoryButton->setText(QApplication::translate("Calculator", "MS", nullptr));
- addToMemoryButton->setText(QApplication::translate("Calculator", "M+", nullptr));
- sevenButton->setText(QApplication::translate("Calculator", "7", nullptr));
- eightButton->setText(QApplication::translate("Calculator", "8", nullptr));
- nineButton->setText(QApplication::translate("Calculator", "9", nullptr));
- fourButton->setText(QApplication::translate("Calculator", "4", nullptr));
- fiveButton->setText(QApplication::translate("Calculator", "5", nullptr));
- sixButton->setText(QApplication::translate("Calculator", "6", nullptr));
- oneButton->setText(QApplication::translate("Calculator", "1", nullptr));
- twoButton->setText(QApplication::translate("Calculator", "2", nullptr));
- threeButton->setText(QApplication::translate("Calculator", "3", nullptr));
- zeroButton->setText(QApplication::translate("Calculator", "0", nullptr));
- pointButton->setText(QApplication::translate("Calculator", ".", nullptr));
- changeSignButton->setText(QApplication::translate("Calculator", "+-", nullptr));
- plusButton->setText(QApplication::translate("Calculator", "+", nullptr));
- divisionButton->setText(QApplication::translate("Calculator", "/", nullptr));
- timesButton->setText(QApplication::translate("Calculator", "*", nullptr));
- minusButton->setText(QApplication::translate("Calculator", "-", nullptr));
- squareRootButton->setText(QApplication::translate("Calculator", "Sqrt", nullptr));
- powerButton->setText(QApplication::translate("Calculator", "x^2", nullptr));
- reciprocalButton->setText(QApplication::translate("Calculator", "1/x", nullptr));
- equalButton->setText(QApplication::translate("Calculator", "=", nullptr));
+ Calculator->setWindowTitle(QCoreApplication::translate("Calculator", "Calculator", nullptr));
+ backspaceButton->setText(QCoreApplication::translate("Calculator", "Backspace", nullptr));
+ clearButton->setText(QCoreApplication::translate("Calculator", "Clear", nullptr));
+ clearAllButton->setText(QCoreApplication::translate("Calculator", "Clear All", nullptr));
+ clearMemoryButton->setText(QCoreApplication::translate("Calculator", "MC", nullptr));
+ readMemoryButton->setText(QCoreApplication::translate("Calculator", "MR", nullptr));
+ setMemoryButton->setText(QCoreApplication::translate("Calculator", "MS", nullptr));
+ addToMemoryButton->setText(QCoreApplication::translate("Calculator", "M+", nullptr));
+ sevenButton->setText(QCoreApplication::translate("Calculator", "7", nullptr));
+ eightButton->setText(QCoreApplication::translate("Calculator", "8", nullptr));
+ nineButton->setText(QCoreApplication::translate("Calculator", "9", nullptr));
+ fourButton->setText(QCoreApplication::translate("Calculator", "4", nullptr));
+ fiveButton->setText(QCoreApplication::translate("Calculator", "5", nullptr));
+ sixButton->setText(QCoreApplication::translate("Calculator", "6", nullptr));
+ oneButton->setText(QCoreApplication::translate("Calculator", "1", nullptr));
+ twoButton->setText(QCoreApplication::translate("Calculator", "2", nullptr));
+ threeButton->setText(QCoreApplication::translate("Calculator", "3", nullptr));
+ zeroButton->setText(QCoreApplication::translate("Calculator", "0", nullptr));
+ pointButton->setText(QCoreApplication::translate("Calculator", ".", nullptr));
+ changeSignButton->setText(QCoreApplication::translate("Calculator", "+-", nullptr));
+ plusButton->setText(QCoreApplication::translate("Calculator", "+", nullptr));
+ divisionButton->setText(QCoreApplication::translate("Calculator", "/", nullptr));
+ timesButton->setText(QCoreApplication::translate("Calculator", "*", nullptr));
+ minusButton->setText(QCoreApplication::translate("Calculator", "-", nullptr));
+ squareRootButton->setText(QCoreApplication::translate("Calculator", "Sqrt", nullptr));
+ powerButton->setText(QCoreApplication::translate("Calculator", "x^2", nullptr));
+ reciprocalButton->setText(QCoreApplication::translate("Calculator", "1/x", nullptr));
+ equalButton->setText(QCoreApplication::translate("Calculator", "=", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/calculatorform.ui.h b/tests/auto/tools/uic/baseline/calculatorform.ui.h
index f4661c6237..ab55c8ad97 100644
--- a/tests/auto/tools/uic/baseline/calculatorform.ui.h
+++ b/tests/auto/tools/uic/baseline/calculatorform.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'calculatorform.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -45,7 +45,7 @@ public:
if (CalculatorForm->objectName().isEmpty())
CalculatorForm->setObjectName(QString::fromUtf8("CalculatorForm"));
CalculatorForm->resize(276, 98);
- QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(5));
+ QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(CalculatorForm->sizePolicy().hasHeightForWidth());
@@ -170,13 +170,13 @@ public:
void retranslateUi(QWidget *CalculatorForm)
{
- CalculatorForm->setWindowTitle(QApplication::translate("CalculatorForm", "Calculator Builder", nullptr));
- label->setText(QApplication::translate("CalculatorForm", "Input 1", nullptr));
- label_3->setText(QApplication::translate("CalculatorForm", "+", nullptr));
- label_2->setText(QApplication::translate("CalculatorForm", "Input 2", nullptr));
- label_3_2->setText(QApplication::translate("CalculatorForm", "=", nullptr));
- label_2_2_2->setText(QApplication::translate("CalculatorForm", "Output", nullptr));
- outputWidget->setText(QApplication::translate("CalculatorForm", "0", nullptr));
+ CalculatorForm->setWindowTitle(QCoreApplication::translate("CalculatorForm", "Calculator Builder", nullptr));
+ label->setText(QCoreApplication::translate("CalculatorForm", "Input 1", nullptr));
+ label_3->setText(QCoreApplication::translate("CalculatorForm", "+", nullptr));
+ label_2->setText(QCoreApplication::translate("CalculatorForm", "Input 2", nullptr));
+ label_3_2->setText(QCoreApplication::translate("CalculatorForm", "=", nullptr));
+ label_2_2_2->setText(QCoreApplication::translate("CalculatorForm", "Output", nullptr));
+ outputWidget->setText(QCoreApplication::translate("CalculatorForm", "0", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/certificateinfo.ui.h b/tests/auto/tools/uic/baseline/certificateinfo.ui.h
index 2aa47d40ad..4a70f86c3b 100644
--- a/tests/auto/tools/uic/baseline/certificateinfo.ui.h
+++ b/tests/auto/tools/uic/baseline/certificateinfo.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'certificateinfo.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -90,9 +90,9 @@ public:
void retranslateUi(QDialog *CertificateInfo)
{
- CertificateInfo->setWindowTitle(QApplication::translate("CertificateInfo", "Display Certificate Information", nullptr));
- groupBox->setTitle(QApplication::translate("CertificateInfo", "Certification Path", nullptr));
- groupBox_2->setTitle(QApplication::translate("CertificateInfo", "Certificate Information", nullptr));
+ CertificateInfo->setWindowTitle(QCoreApplication::translate("CertificateInfo", "Display Certificate Information", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("CertificateInfo", "Certification Path", nullptr));
+ groupBox_2->setTitle(QCoreApplication::translate("CertificateInfo", "Certificate Information", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/chatdialog.ui.h b/tests/auto/tools/uic/baseline/chatdialog.ui.h
index ace6951669..2a1ba2e84c 100644
--- a/tests/auto/tools/uic/baseline/chatdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/chatdialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'chatdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -97,8 +97,8 @@ public:
void retranslateUi(QDialog *ChatDialog)
{
- ChatDialog->setWindowTitle(QApplication::translate("ChatDialog", "Chat", nullptr));
- label->setText(QApplication::translate("ChatDialog", "Message:", nullptr));
+ ChatDialog->setWindowTitle(QCoreApplication::translate("ChatDialog", "Chat", nullptr));
+ label->setText(QCoreApplication::translate("ChatDialog", "Message:", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/chatmainwindow.ui.h b/tests/auto/tools/uic/baseline/chatmainwindow.ui.h
index 8d4ccd53ae..220d44300b 100644
--- a/tests/auto/tools/uic/baseline/chatmainwindow.ui.h
+++ b/tests/auto/tools/uic/baseline/chatmainwindow.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'chatmainwindow.ui'
**
-** Created by: Qt User Interface Compiler version 5.9.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -99,7 +99,7 @@ public:
sendButton = new QPushButton(centralwidget);
sendButton->setObjectName(QString::fromUtf8("sendButton"));
- QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(1), static_cast<QSizePolicy::Policy>(0));
+ QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(sendButton->sizePolicy().hasHeightForWidth());
@@ -125,9 +125,9 @@ public:
statusbar = new QStatusBar(ChatMainWindow);
statusbar->setObjectName(QString::fromUtf8("statusbar"));
ChatMainWindow->setStatusBar(statusbar);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
label->setBuddy(messageLineEdit);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
QWidget::setTabOrder(chatHistory, messageLineEdit);
QWidget::setTabOrder(messageLineEdit, sendButton);
@@ -147,29 +147,29 @@ public:
void retranslateUi(QMainWindow *ChatMainWindow)
{
- ChatMainWindow->setWindowTitle(QApplication::translate("ChatMainWindow", "Qt D-Bus Chat", nullptr));
- actionQuit->setText(QApplication::translate("ChatMainWindow", "Quit", nullptr));
-#ifndef QT_NO_SHORTCUT
- actionQuit->setShortcut(QApplication::translate("ChatMainWindow", "Ctrl+Q", nullptr));
-#endif // QT_NO_SHORTCUT
- actionAboutQt->setText(QApplication::translate("ChatMainWindow", "About Qt...", nullptr));
- actionChangeNickname->setText(QApplication::translate("ChatMainWindow", "Change nickname...", nullptr));
-#ifndef QT_NO_SHORTCUT
- actionChangeNickname->setShortcut(QApplication::translate("ChatMainWindow", "Ctrl+N", nullptr));
-#endif // QT_NO_SHORTCUT
-#ifndef QT_NO_TOOLTIP
- chatHistory->setToolTip(QApplication::translate("ChatMainWindow", "Messages sent and received from other users", nullptr));
-#endif // QT_NO_TOOLTIP
- label->setText(QApplication::translate("ChatMainWindow", "Message:", nullptr));
-#ifndef QT_NO_TOOLTIP
- sendButton->setToolTip(QApplication::translate("ChatMainWindow", "Sends a message to other people", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_WHATSTHIS
+ ChatMainWindow->setWindowTitle(QCoreApplication::translate("ChatMainWindow", "Qt D-Bus Chat", nullptr));
+ actionQuit->setText(QCoreApplication::translate("ChatMainWindow", "Quit", nullptr));
+#if QT_CONFIG(shortcut)
+ actionQuit->setShortcut(QCoreApplication::translate("ChatMainWindow", "Ctrl+Q", nullptr));
+#endif // QT_CONFIG(shortcut)
+ actionAboutQt->setText(QCoreApplication::translate("ChatMainWindow", "About Qt...", nullptr));
+ actionChangeNickname->setText(QCoreApplication::translate("ChatMainWindow", "Change nickname...", nullptr));
+#if QT_CONFIG(shortcut)
+ actionChangeNickname->setShortcut(QCoreApplication::translate("ChatMainWindow", "Ctrl+N", nullptr));
+#endif // QT_CONFIG(shortcut)
+#if QT_CONFIG(tooltip)
+ chatHistory->setToolTip(QCoreApplication::translate("ChatMainWindow", "Messages sent and received from other users", nullptr));
+#endif // QT_CONFIG(tooltip)
+ label->setText(QCoreApplication::translate("ChatMainWindow", "Message:", nullptr));
+#if QT_CONFIG(tooltip)
+ sendButton->setToolTip(QCoreApplication::translate("ChatMainWindow", "Sends a message to other people", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(whatsthis)
sendButton->setWhatsThis(QString());
-#endif // QT_NO_WHATSTHIS
- sendButton->setText(QApplication::translate("ChatMainWindow", "Send", nullptr));
- menuQuit->setTitle(QApplication::translate("ChatMainWindow", "Help", nullptr));
- menuFile->setTitle(QApplication::translate("ChatMainWindow", "File", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ sendButton->setText(QCoreApplication::translate("ChatMainWindow", "Send", nullptr));
+ menuQuit->setTitle(QCoreApplication::translate("ChatMainWindow", "Help", nullptr));
+ menuFile->setTitle(QCoreApplication::translate("ChatMainWindow", "File", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/chatsetnickname.ui.h b/tests/auto/tools/uic/baseline/chatsetnickname.ui.h
index c73dfb2c6e..0e93828c90 100644
--- a/tests/auto/tools/uic/baseline/chatsetnickname.ui.h
+++ b/tests/auto/tools/uic/baseline/chatsetnickname.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'chatsetnickname.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -39,7 +39,7 @@ public:
if (NicknameDialog->objectName().isEmpty())
NicknameDialog->setObjectName(QString::fromUtf8("NicknameDialog"));
NicknameDialog->resize(396, 105);
- QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(1), static_cast<QSizePolicy::Policy>(1));
+ QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(NicknameDialog->sizePolicy().hasHeightForWidth());
@@ -112,10 +112,10 @@ public:
void retranslateUi(QDialog *NicknameDialog)
{
- NicknameDialog->setWindowTitle(QApplication::translate("NicknameDialog", "Set nickname", nullptr));
- label->setText(QApplication::translate("NicknameDialog", "New nickname:", nullptr));
- okButton->setText(QApplication::translate("NicknameDialog", "OK", nullptr));
- cancelButton->setText(QApplication::translate("NicknameDialog", "Cancel", nullptr));
+ NicknameDialog->setWindowTitle(QCoreApplication::translate("NicknameDialog", "Set nickname", nullptr));
+ label->setText(QCoreApplication::translate("NicknameDialog", "New nickname:", nullptr));
+ okButton->setText(QCoreApplication::translate("NicknameDialog", "OK", nullptr));
+ cancelButton->setText(QCoreApplication::translate("NicknameDialog", "Cancel", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/config.ui.h b/tests/auto/tools/uic/baseline/config.ui.h
index 8287e0b1ac..153718aca1 100644
--- a/tests/auto/tools/uic/baseline/config.ui.h
+++ b/tests/auto/tools/uic/baseline/config.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'config.ui'
**
-** Created by: Qt User Interface Compiler version 5.10.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -706,44 +706,44 @@ public:
void retranslateUi(QDialog *Config)
{
- Config->setWindowTitle(QApplication::translate("Config", "Configure", nullptr));
- ButtonGroup1->setTitle(QApplication::translate("Config", "Size", nullptr));
- size_176_220->setText(QApplication::translate("Config", "176x220 \"SmartPhone\"", nullptr));
- size_240_320->setText(QApplication::translate("Config", "240x320 \"PDA\"", nullptr));
- size_320_240->setText(QApplication::translate("Config", "320x240 \"TV\" / \"QVGA\"", nullptr));
- size_640_480->setText(QApplication::translate("Config", "640x480 \"VGA\"", nullptr));
- size_800_600->setText(QApplication::translate("Config", "800x600", nullptr));
- size_1024_768->setText(QApplication::translate("Config", "1024x768", nullptr));
- size_custom->setText(QApplication::translate("Config", "Custom", nullptr));
- ButtonGroup2->setTitle(QApplication::translate("Config", "Depth", nullptr));
- depth_1->setText(QApplication::translate("Config", "1 bit monochrome", nullptr));
- depth_4gray->setText(QApplication::translate("Config", "4 bit grayscale", nullptr));
- depth_8->setText(QApplication::translate("Config", "8 bit", nullptr));
- depth_12->setText(QApplication::translate("Config", "12 (16) bit", nullptr));
- depth_15->setText(QApplication::translate("Config", "15 bit", nullptr));
- depth_16->setText(QApplication::translate("Config", "16 bit", nullptr));
- depth_18->setText(QApplication::translate("Config", "18 bit", nullptr));
- depth_24->setText(QApplication::translate("Config", "24 bit", nullptr));
- depth_32->setText(QApplication::translate("Config", "32 bit", nullptr));
- depth_32_argb->setText(QApplication::translate("Config", "32 bit ARGB", nullptr));
- TextLabel1_3->setText(QApplication::translate("Config", "Skin", nullptr));
- skin->setItemText(0, QApplication::translate("Config", "None", nullptr));
-
- touchScreen->setText(QApplication::translate("Config", "Emulate touch screen (no mouse move)", nullptr));
- lcdScreen->setText(QApplication::translate("Config", "Emulate LCD screen (Only with fixed zoom of 3.0 times magnification)", nullptr));
- TextLabel1->setText(QApplication::translate("Config", "<p>Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth <i>above</i>. You may freely modify the Gamma <i>below</i>.", nullptr));
- GroupBox1->setTitle(QApplication::translate("Config", "Gamma", nullptr));
- TextLabel3->setText(QApplication::translate("Config", "Blue", nullptr));
- blabel->setText(QApplication::translate("Config", "1.0", nullptr));
- TextLabel2->setText(QApplication::translate("Config", "Green", nullptr));
- glabel->setText(QApplication::translate("Config", "1.0", nullptr));
- TextLabel7->setText(QApplication::translate("Config", "All", nullptr));
- TextLabel8->setText(QApplication::translate("Config", "1.0", nullptr));
- TextLabel1_2->setText(QApplication::translate("Config", "Red", nullptr));
- rlabel->setText(QApplication::translate("Config", "1.0", nullptr));
- PushButton3->setText(QApplication::translate("Config", "Set all to 1.0", nullptr));
- buttonOk->setText(QApplication::translate("Config", "&OK", nullptr));
- buttonCancel->setText(QApplication::translate("Config", "&Cancel", nullptr));
+ Config->setWindowTitle(QCoreApplication::translate("Config", "Configure", nullptr));
+ ButtonGroup1->setTitle(QCoreApplication::translate("Config", "Size", nullptr));
+ size_176_220->setText(QCoreApplication::translate("Config", "176x220 \"SmartPhone\"", nullptr));
+ size_240_320->setText(QCoreApplication::translate("Config", "240x320 \"PDA\"", nullptr));
+ size_320_240->setText(QCoreApplication::translate("Config", "320x240 \"TV\" / \"QVGA\"", nullptr));
+ size_640_480->setText(QCoreApplication::translate("Config", "640x480 \"VGA\"", nullptr));
+ size_800_600->setText(QCoreApplication::translate("Config", "800x600", nullptr));
+ size_1024_768->setText(QCoreApplication::translate("Config", "1024x768", nullptr));
+ size_custom->setText(QCoreApplication::translate("Config", "Custom", nullptr));
+ ButtonGroup2->setTitle(QCoreApplication::translate("Config", "Depth", nullptr));
+ depth_1->setText(QCoreApplication::translate("Config", "1 bit monochrome", nullptr));
+ depth_4gray->setText(QCoreApplication::translate("Config", "4 bit grayscale", nullptr));
+ depth_8->setText(QCoreApplication::translate("Config", "8 bit", nullptr));
+ depth_12->setText(QCoreApplication::translate("Config", "12 (16) bit", nullptr));
+ depth_15->setText(QCoreApplication::translate("Config", "15 bit", nullptr));
+ depth_16->setText(QCoreApplication::translate("Config", "16 bit", nullptr));
+ depth_18->setText(QCoreApplication::translate("Config", "18 bit", nullptr));
+ depth_24->setText(QCoreApplication::translate("Config", "24 bit", nullptr));
+ depth_32->setText(QCoreApplication::translate("Config", "32 bit", nullptr));
+ depth_32_argb->setText(QCoreApplication::translate("Config", "32 bit ARGB", nullptr));
+ TextLabel1_3->setText(QCoreApplication::translate("Config", "Skin", nullptr));
+ skin->setItemText(0, QCoreApplication::translate("Config", "None", nullptr));
+
+ touchScreen->setText(QCoreApplication::translate("Config", "Emulate touch screen (no mouse move)", nullptr));
+ lcdScreen->setText(QCoreApplication::translate("Config", "Emulate LCD screen (Only with fixed zoom of 3.0 times magnification)", nullptr));
+ TextLabel1->setText(QCoreApplication::translate("Config", "<p>Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth <i>above</i>. You may freely modify the Gamma <i>below</i>.", nullptr));
+ GroupBox1->setTitle(QCoreApplication::translate("Config", "Gamma", nullptr));
+ TextLabel3->setText(QCoreApplication::translate("Config", "Blue", nullptr));
+ blabel->setText(QCoreApplication::translate("Config", "1.0", nullptr));
+ TextLabel2->setText(QCoreApplication::translate("Config", "Green", nullptr));
+ glabel->setText(QCoreApplication::translate("Config", "1.0", nullptr));
+ TextLabel7->setText(QCoreApplication::translate("Config", "All", nullptr));
+ TextLabel8->setText(QCoreApplication::translate("Config", "1.0", nullptr));
+ TextLabel1_2->setText(QCoreApplication::translate("Config", "Red", nullptr));
+ rlabel->setText(QCoreApplication::translate("Config", "1.0", nullptr));
+ PushButton3->setText(QCoreApplication::translate("Config", "Set all to 1.0", nullptr));
+ buttonOk->setText(QCoreApplication::translate("Config", "&OK", nullptr));
+ buttonCancel->setText(QCoreApplication::translate("Config", "&Cancel", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/connectdialog.ui.h b/tests/auto/tools/uic/baseline/connectdialog.ui.h
index a470a6705d..1e91b498f4 100644
--- a/tests/auto/tools/uic/baseline/connectdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/connectdialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'connectdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -126,12 +126,12 @@ public:
void retranslateUi(QDialog *ConnectDialog)
{
- ConnectDialog->setWindowTitle(QApplication::translate("ConnectDialog", "Configure Connection", nullptr));
- signalGroupBox->setTitle(QApplication::translate("ConnectDialog", "GroupBox", nullptr));
- editSignalsButton->setText(QApplication::translate("ConnectDialog", "Edit...", nullptr));
- slotGroupBox->setTitle(QApplication::translate("ConnectDialog", "GroupBox", nullptr));
- editSlotsButton->setText(QApplication::translate("ConnectDialog", "Edit...", nullptr));
- showAllCheckBox->setText(QApplication::translate("ConnectDialog", "Show signals and slots inherited from QWidget", nullptr));
+ ConnectDialog->setWindowTitle(QCoreApplication::translate("ConnectDialog", "Configure Connection", nullptr));
+ signalGroupBox->setTitle(QCoreApplication::translate("ConnectDialog", "GroupBox", nullptr));
+ editSignalsButton->setText(QCoreApplication::translate("ConnectDialog", "Edit...", nullptr));
+ slotGroupBox->setTitle(QCoreApplication::translate("ConnectDialog", "GroupBox", nullptr));
+ editSlotsButton->setText(QCoreApplication::translate("ConnectDialog", "Edit...", nullptr));
+ showAllCheckBox->setText(QCoreApplication::translate("ConnectDialog", "Show signals and slots inherited from QWidget", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/controller.ui.h b/tests/auto/tools/uic/baseline/controller.ui.h
index 72b0956472..3ebfad187f 100644
--- a/tests/auto/tools/uic/baseline/controller.ui.h
+++ b/tests/auto/tools/uic/baseline/controller.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'controller.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -75,12 +75,12 @@ public:
void retranslateUi(QWidget *Controller)
{
- Controller->setWindowTitle(QApplication::translate("Controller", "Controller", nullptr));
- label->setText(QApplication::translate("Controller", "Controller", nullptr));
- decelerate->setText(QApplication::translate("Controller", "Decelerate", nullptr));
- accelerate->setText(QApplication::translate("Controller", "Accelerate", nullptr));
- right->setText(QApplication::translate("Controller", "Right", nullptr));
- left->setText(QApplication::translate("Controller", "Left", nullptr));
+ Controller->setWindowTitle(QCoreApplication::translate("Controller", "Controller", nullptr));
+ label->setText(QCoreApplication::translate("Controller", "Controller", nullptr));
+ decelerate->setText(QCoreApplication::translate("Controller", "Decelerate", nullptr));
+ accelerate->setText(QCoreApplication::translate("Controller", "Accelerate", nullptr));
+ right->setText(QCoreApplication::translate("Controller", "Right", nullptr));
+ left->setText(QCoreApplication::translate("Controller", "Left", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/cookies.ui.h b/tests/auto/tools/uic/baseline/cookies.ui.h
index 144c306874..2cc21888b1 100644
--- a/tests/auto/tools/uic/baseline/cookies.ui.h
+++ b/tests/auto/tools/uic/baseline/cookies.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'cookies.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -91,9 +91,9 @@ public:
void retranslateUi(QDialog *CookiesDialog)
{
- CookiesDialog->setWindowTitle(QApplication::translate("CookiesDialog", "Cookies", nullptr));
- removeButton->setText(QApplication::translate("CookiesDialog", "&Remove", nullptr));
- removeAllButton->setText(QApplication::translate("CookiesDialog", "Remove &All Cookies", nullptr));
+ CookiesDialog->setWindowTitle(QCoreApplication::translate("CookiesDialog", "Cookies", nullptr));
+ removeButton->setText(QCoreApplication::translate("CookiesDialog", "&Remove", nullptr));
+ removeAllButton->setText(QCoreApplication::translate("CookiesDialog", "Remove &All Cookies", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h b/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h
index a3bf7a449e..77212cf2f3 100644
--- a/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h
+++ b/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'cookiesexceptions.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -158,15 +158,15 @@ public:
void retranslateUi(QDialog *CookiesExceptionsDialog)
{
- CookiesExceptionsDialog->setWindowTitle(QApplication::translate("CookiesExceptionsDialog", "Cookie Exceptions", nullptr));
- newExceptionGroupBox->setTitle(QApplication::translate("CookiesExceptionsDialog", "New Exception", nullptr));
- label->setText(QApplication::translate("CookiesExceptionsDialog", "Domain:", nullptr));
- blockButton->setText(QApplication::translate("CookiesExceptionsDialog", "Block", nullptr));
- allowForSessionButton->setText(QApplication::translate("CookiesExceptionsDialog", "Allow For Session", nullptr));
- allowButton->setText(QApplication::translate("CookiesExceptionsDialog", "Allow", nullptr));
- ExceptionsGroupBox->setTitle(QApplication::translate("CookiesExceptionsDialog", "Exceptions", nullptr));
- removeButton->setText(QApplication::translate("CookiesExceptionsDialog", "&Remove", nullptr));
- removeAllButton->setText(QApplication::translate("CookiesExceptionsDialog", "Remove &All", nullptr));
+ CookiesExceptionsDialog->setWindowTitle(QCoreApplication::translate("CookiesExceptionsDialog", "Cookie Exceptions", nullptr));
+ newExceptionGroupBox->setTitle(QCoreApplication::translate("CookiesExceptionsDialog", "New Exception", nullptr));
+ label->setText(QCoreApplication::translate("CookiesExceptionsDialog", "Domain:", nullptr));
+ blockButton->setText(QCoreApplication::translate("CookiesExceptionsDialog", "Block", nullptr));
+ allowForSessionButton->setText(QCoreApplication::translate("CookiesExceptionsDialog", "Allow For Session", nullptr));
+ allowButton->setText(QCoreApplication::translate("CookiesExceptionsDialog", "Allow", nullptr));
+ ExceptionsGroupBox->setTitle(QCoreApplication::translate("CookiesExceptionsDialog", "Exceptions", nullptr));
+ removeButton->setText(QCoreApplication::translate("CookiesExceptionsDialog", "&Remove", nullptr));
+ removeAllButton->setText(QCoreApplication::translate("CookiesExceptionsDialog", "Remove &All", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/default.ui.h b/tests/auto/tools/uic/baseline/default.ui.h
index fafff9d728..fbbe81d0b8 100644
--- a/tests/auto/tools/uic/baseline/default.ui.h
+++ b/tests/auto/tools/uic/baseline/default.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'default.ui'
**
-** Created by: Qt User Interface Compiler version 5.10.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -192,13 +192,13 @@ public:
statusbar = new QStatusBar(MainWindow);
statusbar->setObjectName(QString::fromUtf8("statusbar"));
MainWindow->setStatusBar(statusbar);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
nameLabel->setBuddy(nameCombo);
ageLabel->setBuddy(ageSpinBox);
passwordLabel->setBuddy(passwordEdit);
label->setBuddy(professionList);
countryLabel->setBuddy(professionList);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
QWidget::setTabOrder(maleRadioButton, femaleRadioButton);
QWidget::setTabOrder(femaleRadioButton, ageSpinBox);
QWidget::setTabOrder(ageSpinBox, passwordEdit);
@@ -226,84 +226,84 @@ public:
void retranslateUi(QMainWindow *MainWindow)
{
- MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", nullptr));
- exitAction->setText(QApplication::translate("MainWindow", "&Exit", nullptr));
- aboutQtAction->setText(QApplication::translate("MainWindow", "About Qt", nullptr));
- editStyleAction->setText(QApplication::translate("MainWindow", "Edit &Style", nullptr));
- aboutAction->setText(QApplication::translate("MainWindow", "About", nullptr));
- nameLabel->setText(QApplication::translate("MainWindow", "&Name:", nullptr));
- nameCombo->setItemText(0, QApplication::translate("MainWindow", "Girish", nullptr));
- nameCombo->setItemText(1, QApplication::translate("MainWindow", "Jasmin", nullptr));
- nameCombo->setItemText(2, QApplication::translate("MainWindow", "Simon", nullptr));
- nameCombo->setItemText(3, QApplication::translate("MainWindow", "Zack", nullptr));
-
-#ifndef QT_NO_TOOLTIP
- nameCombo->setToolTip(QApplication::translate("MainWindow", "Specify your name", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- femaleRadioButton->setToolTip(QApplication::translate("MainWindow", "Check this if you are female", nullptr));
-#endif // QT_NO_TOOLTIP
- femaleRadioButton->setText(QApplication::translate("MainWindow", "&Female", nullptr));
-#ifndef QT_NO_TOOLTIP
- agreeCheckBox->setToolTip(QApplication::translate("MainWindow", "Please read the license before checking this", nullptr));
-#endif // QT_NO_TOOLTIP
- agreeCheckBox->setText(QApplication::translate("MainWindow", "I &accept the terms and conditions", nullptr));
-#ifndef QT_NO_TOOLTIP
- maleRadioButton->setToolTip(QApplication::translate("MainWindow", "Check this if you are male", nullptr));
-#endif // QT_NO_TOOLTIP
- maleRadioButton->setText(QApplication::translate("MainWindow", "&Male", nullptr));
- genderLabel->setText(QApplication::translate("MainWindow", "Gender:", nullptr));
-#ifndef QT_NO_TOOLTIP
- ageSpinBox->setToolTip(QApplication::translate("MainWindow", "Specify your age", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_STATUSTIP
- ageSpinBox->setStatusTip(QApplication::translate("MainWindow", "Specify your age here", nullptr));
-#endif // QT_NO_STATUSTIP
- ageLabel->setText(QApplication::translate("MainWindow", "&Age:", nullptr));
- passwordLabel->setText(QApplication::translate("MainWindow", "&Password:", nullptr));
-#ifndef QT_NO_TOOLTIP
- passwordEdit->setToolTip(QApplication::translate("MainWindow", "Specify your password", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_STATUSTIP
- passwordEdit->setStatusTip(QApplication::translate("MainWindow", "Specify your password here", nullptr));
-#endif // QT_NO_STATUSTIP
- passwordEdit->setText(QApplication::translate("MainWindow", "Password", nullptr));
- label->setText(QApplication::translate("MainWindow", "Profession", nullptr));
- countryLabel->setText(QApplication::translate("MainWindow", "&Country", nullptr));
+ MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "MainWindow", nullptr));
+ exitAction->setText(QCoreApplication::translate("MainWindow", "&Exit", nullptr));
+ aboutQtAction->setText(QCoreApplication::translate("MainWindow", "About Qt", nullptr));
+ editStyleAction->setText(QCoreApplication::translate("MainWindow", "Edit &Style", nullptr));
+ aboutAction->setText(QCoreApplication::translate("MainWindow", "About", nullptr));
+ nameLabel->setText(QCoreApplication::translate("MainWindow", "&Name:", nullptr));
+ nameCombo->setItemText(0, QCoreApplication::translate("MainWindow", "Girish", nullptr));
+ nameCombo->setItemText(1, QCoreApplication::translate("MainWindow", "Jasmin", nullptr));
+ nameCombo->setItemText(2, QCoreApplication::translate("MainWindow", "Simon", nullptr));
+ nameCombo->setItemText(3, QCoreApplication::translate("MainWindow", "Zack", nullptr));
+
+#if QT_CONFIG(tooltip)
+ nameCombo->setToolTip(QCoreApplication::translate("MainWindow", "Specify your name", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ femaleRadioButton->setToolTip(QCoreApplication::translate("MainWindow", "Check this if you are female", nullptr));
+#endif // QT_CONFIG(tooltip)
+ femaleRadioButton->setText(QCoreApplication::translate("MainWindow", "&Female", nullptr));
+#if QT_CONFIG(tooltip)
+ agreeCheckBox->setToolTip(QCoreApplication::translate("MainWindow", "Please read the license before checking this", nullptr));
+#endif // QT_CONFIG(tooltip)
+ agreeCheckBox->setText(QCoreApplication::translate("MainWindow", "I &accept the terms and conditions", nullptr));
+#if QT_CONFIG(tooltip)
+ maleRadioButton->setToolTip(QCoreApplication::translate("MainWindow", "Check this if you are male", nullptr));
+#endif // QT_CONFIG(tooltip)
+ maleRadioButton->setText(QCoreApplication::translate("MainWindow", "&Male", nullptr));
+ genderLabel->setText(QCoreApplication::translate("MainWindow", "Gender:", nullptr));
+#if QT_CONFIG(tooltip)
+ ageSpinBox->setToolTip(QCoreApplication::translate("MainWindow", "Specify your age", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(statustip)
+ ageSpinBox->setStatusTip(QCoreApplication::translate("MainWindow", "Specify your age here", nullptr));
+#endif // QT_CONFIG(statustip)
+ ageLabel->setText(QCoreApplication::translate("MainWindow", "&Age:", nullptr));
+ passwordLabel->setText(QCoreApplication::translate("MainWindow", "&Password:", nullptr));
+#if QT_CONFIG(tooltip)
+ passwordEdit->setToolTip(QCoreApplication::translate("MainWindow", "Specify your password", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(statustip)
+ passwordEdit->setStatusTip(QCoreApplication::translate("MainWindow", "Specify your password here", nullptr));
+#endif // QT_CONFIG(statustip)
+ passwordEdit->setText(QCoreApplication::translate("MainWindow", "Password", nullptr));
+ label->setText(QCoreApplication::translate("MainWindow", "Profession", nullptr));
+ countryLabel->setText(QCoreApplication::translate("MainWindow", "&Country", nullptr));
const bool __sortingEnabled = professionList->isSortingEnabled();
professionList->setSortingEnabled(false);
QListWidgetItem *___qlistwidgetitem = professionList->item(0);
- ___qlistwidgetitem->setText(QApplication::translate("MainWindow", "Developer", nullptr));
+ ___qlistwidgetitem->setText(QCoreApplication::translate("MainWindow", "Developer", nullptr));
QListWidgetItem *___qlistwidgetitem1 = professionList->item(1);
- ___qlistwidgetitem1->setText(QApplication::translate("MainWindow", "Student", nullptr));
+ ___qlistwidgetitem1->setText(QCoreApplication::translate("MainWindow", "Student", nullptr));
QListWidgetItem *___qlistwidgetitem2 = professionList->item(2);
- ___qlistwidgetitem2->setText(QApplication::translate("MainWindow", "Fisherman", nullptr));
+ ___qlistwidgetitem2->setText(QCoreApplication::translate("MainWindow", "Fisherman", nullptr));
professionList->setSortingEnabled(__sortingEnabled);
-#ifndef QT_NO_TOOLTIP
- professionList->setToolTip(QApplication::translate("MainWindow", "Select your profession", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_STATUSTIP
- professionList->setStatusTip(QApplication::translate("MainWindow", "Select your profession", nullptr));
-#endif // QT_NO_STATUSTIP
-#ifndef QT_NO_WHATSTHIS
- professionList->setWhatsThis(QApplication::translate("MainWindow", "Select your profession", nullptr));
-#endif // QT_NO_WHATSTHIS
- countryCombo->setItemText(0, QApplication::translate("MainWindow", "Germany", nullptr));
- countryCombo->setItemText(1, QApplication::translate("MainWindow", "India", nullptr));
- countryCombo->setItemText(2, QApplication::translate("MainWindow", "Norway", nullptr));
- countryCombo->setItemText(3, QApplication::translate("MainWindow", "United States Of America", nullptr));
- countryCombo->setItemText(4, QApplication::translate("MainWindow", "United Kingdom", nullptr));
-
-#ifndef QT_NO_TOOLTIP
- countryCombo->setToolTip(QApplication::translate("MainWindow", "Specify your country", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_STATUSTIP
- countryCombo->setStatusTip(QApplication::translate("MainWindow", "Specify your country here", nullptr));
-#endif // QT_NO_STATUSTIP
- menu_File->setTitle(QApplication::translate("MainWindow", "&File", nullptr));
- menu_Help->setTitle(QApplication::translate("MainWindow", "&Help", nullptr));
+#if QT_CONFIG(tooltip)
+ professionList->setToolTip(QCoreApplication::translate("MainWindow", "Select your profession", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(statustip)
+ professionList->setStatusTip(QCoreApplication::translate("MainWindow", "Select your profession", nullptr));
+#endif // QT_CONFIG(statustip)
+#if QT_CONFIG(whatsthis)
+ professionList->setWhatsThis(QCoreApplication::translate("MainWindow", "Select your profession", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ countryCombo->setItemText(0, QCoreApplication::translate("MainWindow", "Germany", nullptr));
+ countryCombo->setItemText(1, QCoreApplication::translate("MainWindow", "India", nullptr));
+ countryCombo->setItemText(2, QCoreApplication::translate("MainWindow", "Norway", nullptr));
+ countryCombo->setItemText(3, QCoreApplication::translate("MainWindow", "United States Of America", nullptr));
+ countryCombo->setItemText(4, QCoreApplication::translate("MainWindow", "United Kingdom", nullptr));
+
+#if QT_CONFIG(tooltip)
+ countryCombo->setToolTip(QCoreApplication::translate("MainWindow", "Specify your country", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(statustip)
+ countryCombo->setStatusTip(QCoreApplication::translate("MainWindow", "Specify your country here", nullptr));
+#endif // QT_CONFIG(statustip)
+ menu_File->setTitle(QCoreApplication::translate("MainWindow", "&File", nullptr));
+ menu_Help->setTitle(QCoreApplication::translate("MainWindow", "&Help", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/dialog.ui.h b/tests/auto/tools/uic/baseline/dialog.ui.h
index 2a159312b9..aeed71d058 100644
--- a/tests/auto/tools/uic/baseline/dialog.ui.h
+++ b/tests/auto/tools/uic/baseline/dialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'dialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -58,10 +58,10 @@ public:
void retranslateUi(QDialog *Dialog)
{
- Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", nullptr));
- loadFromFileButton->setText(QApplication::translate("Dialog", "Load Image From File...", nullptr));
- label->setText(QApplication::translate("Dialog", "Launch two of these dialogs. In the first, press the top button and load an image from a file. In the second, press the bottom button and display the loaded image from shared memory.", nullptr));
- loadFromSharedMemoryButton->setText(QApplication::translate("Dialog", "Display Image From Shared Memory", nullptr));
+ Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Dialog", nullptr));
+ loadFromFileButton->setText(QCoreApplication::translate("Dialog", "Load Image From File...", nullptr));
+ label->setText(QCoreApplication::translate("Dialog", "Launch two of these dialogs. In the first, press the top button and load an image from a file. In the second, press the bottom button and display the loaded image from shared memory.", nullptr));
+ loadFromSharedMemoryButton->setText(QCoreApplication::translate("Dialog", "Display Image From Shared Memory", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/downloaditem.ui.h b/tests/auto/tools/uic/baseline/downloaditem.ui.h
index f0e8e88307..31d938f0eb 100644
--- a/tests/auto/tools/uic/baseline/downloaditem.ui.h
+++ b/tests/auto/tools/uic/baseline/downloaditem.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'downloaditem.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -124,13 +124,13 @@ public:
void retranslateUi(QWidget *DownloadItem)
{
- DownloadItem->setWindowTitle(QApplication::translate("DownloadItem", "Form", nullptr));
- fileIcon->setText(QApplication::translate("DownloadItem", "Ico", nullptr));
- fileNameLabel->setProperty("text", QVariant(QApplication::translate("DownloadItem", "Filename", nullptr)));
+ DownloadItem->setWindowTitle(QCoreApplication::translate("DownloadItem", "Form", nullptr));
+ fileIcon->setText(QCoreApplication::translate("DownloadItem", "Ico", nullptr));
+ fileNameLabel->setProperty("text", QVariant(QCoreApplication::translate("DownloadItem", "Filename", nullptr)));
downloadInfoLabel->setProperty("text", QVariant(QString()));
- tryAgainButton->setText(QApplication::translate("DownloadItem", "Try Again", nullptr));
- stopButton->setText(QApplication::translate("DownloadItem", "Stop", nullptr));
- openButton->setText(QApplication::translate("DownloadItem", "Open", nullptr));
+ tryAgainButton->setText(QCoreApplication::translate("DownloadItem", "Try Again", nullptr));
+ stopButton->setText(QCoreApplication::translate("DownloadItem", "Stop", nullptr));
+ openButton->setText(QCoreApplication::translate("DownloadItem", "Open", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/downloads.ui.h b/tests/auto/tools/uic/baseline/downloads.ui.h
index 1df992d30f..1b5b825792 100644
--- a/tests/auto/tools/uic/baseline/downloads.ui.h
+++ b/tests/auto/tools/uic/baseline/downloads.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'downloads.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -79,9 +79,9 @@ public:
void retranslateUi(QDialog *DownloadDialog)
{
- DownloadDialog->setWindowTitle(QApplication::translate("DownloadDialog", "Downloads", nullptr));
- cleanupButton->setText(QApplication::translate("DownloadDialog", "Clean up", nullptr));
- itemCount->setText(QApplication::translate("DownloadDialog", "0 Items", nullptr));
+ DownloadDialog->setWindowTitle(QCoreApplication::translate("DownloadDialog", "Downloads", nullptr));
+ cleanupButton->setText(QCoreApplication::translate("DownloadDialog", "Clean up", nullptr));
+ itemCount->setText(QCoreApplication::translate("DownloadDialog", "0 Items", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/embeddeddialog.ui.h b/tests/auto/tools/uic/baseline/embeddeddialog.ui.h
index 194ff578e8..20d6567576 100644
--- a/tests/auto/tools/uic/baseline/embeddeddialog.ui.h
+++ b/tests/auto/tools/uic/baseline/embeddeddialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'embeddeddialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.10.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -83,12 +83,12 @@ public:
formLayout->setWidget(3, QFormLayout::FieldRole, spacing);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
label->setBuddy(layoutDirection);
label_2->setBuddy(fontComboBox);
label_3->setBuddy(style);
label_4->setBuddy(spacing);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
retranslateUi(embeddedDialog);
@@ -97,14 +97,14 @@ public:
void retranslateUi(QDialog *embeddedDialog)
{
- embeddedDialog->setWindowTitle(QApplication::translate("embeddedDialog", "Embedded Dialog", nullptr));
- label->setText(QApplication::translate("embeddedDialog", "Layout Direction:", nullptr));
- layoutDirection->setItemText(0, QApplication::translate("embeddedDialog", "Left to Right", nullptr));
- layoutDirection->setItemText(1, QApplication::translate("embeddedDialog", "Right to Left", nullptr));
-
- label_2->setText(QApplication::translate("embeddedDialog", "Select Font:", nullptr));
- label_3->setText(QApplication::translate("embeddedDialog", "Style:", nullptr));
- label_4->setText(QApplication::translate("embeddedDialog", "Layout spacing:", nullptr));
+ embeddedDialog->setWindowTitle(QCoreApplication::translate("embeddedDialog", "Embedded Dialog", nullptr));
+ label->setText(QCoreApplication::translate("embeddedDialog", "Layout Direction:", nullptr));
+ layoutDirection->setItemText(0, QCoreApplication::translate("embeddedDialog", "Left to Right", nullptr));
+ layoutDirection->setItemText(1, QCoreApplication::translate("embeddedDialog", "Right to Left", nullptr));
+
+ label_2->setText(QCoreApplication::translate("embeddedDialog", "Select Font:", nullptr));
+ label_3->setText(QCoreApplication::translate("embeddedDialog", "Style:", nullptr));
+ label_4->setText(QCoreApplication::translate("embeddedDialog", "Layout spacing:", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/enumnostdset.ui.h b/tests/auto/tools/uic/baseline/enumnostdset.ui.h
index 233fc616ac..54ec7c4161 100644
--- a/tests/auto/tools/uic/baseline/enumnostdset.ui.h
+++ b/tests/auto/tools/uic/baseline/enumnostdset.ui.h
@@ -38,7 +38,7 @@ public:
void retranslateUi(QWidget *Form)
{
- Form->setWindowTitle(QApplication::translate("Form", "Form", nullptr));
+ Form->setWindowTitle(QCoreApplication::translate("Form", "Form", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/filespage.ui.h b/tests/auto/tools/uic/baseline/filespage.ui.h
index 29ed981a8a..327b2c571b 100644
--- a/tests/auto/tools/uic/baseline/filespage.ui.h
+++ b/tests/auto/tools/uic/baseline/filespage.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'filespage.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -80,10 +80,10 @@ public:
void retranslateUi(QWidget *FilesPage)
{
- FilesPage->setWindowTitle(QApplication::translate("FilesPage", "Form", nullptr));
- fileLabel->setText(QApplication::translate("FilesPage", "Files:", nullptr));
- removeButton->setText(QApplication::translate("FilesPage", "Remove", nullptr));
- removeAllButton->setText(QApplication::translate("FilesPage", "Remove All", nullptr));
+ FilesPage->setWindowTitle(QCoreApplication::translate("FilesPage", "Form", nullptr));
+ fileLabel->setText(QCoreApplication::translate("FilesPage", "Files:", nullptr));
+ removeButton->setText(QCoreApplication::translate("FilesPage", "Remove", nullptr));
+ removeAllButton->setText(QCoreApplication::translate("FilesPage", "Remove All", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/filternamedialog.ui.h b/tests/auto/tools/uic/baseline/filternamedialog.ui.h
index 716c291fdd..0098282d59 100644
--- a/tests/auto/tools/uic/baseline/filternamedialog.ui.h
+++ b/tests/auto/tools/uic/baseline/filternamedialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'filternamedialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -76,8 +76,8 @@ public:
void retranslateUi(QDialog *FilterNameDialogClass)
{
- FilterNameDialogClass->setWindowTitle(QApplication::translate("FilterNameDialogClass", "FilterNameDialog", nullptr));
- label->setText(QApplication::translate("FilterNameDialogClass", "Filter Name:", nullptr));
+ FilterNameDialogClass->setWindowTitle(QCoreApplication::translate("FilterNameDialogClass", "FilterNameDialog", nullptr));
+ label->setText(QCoreApplication::translate("FilterNameDialogClass", "Filter Name:", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/filterpage.ui.h b/tests/auto/tools/uic/baseline/filterpage.ui.h
index f6610fdc4d..1581c6554d 100644
--- a/tests/auto/tools/uic/baseline/filterpage.ui.h
+++ b/tests/auto/tools/uic/baseline/filterpage.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'filterpage.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -103,14 +103,14 @@ public:
void retranslateUi(QWidget *FilterPage)
{
- FilterPage->setWindowTitle(QApplication::translate("FilterPage", "Form", nullptr));
- label->setText(QApplication::translate("FilterPage", "Filter attributes for current documentation (comma separated list):", nullptr));
- groupBox->setTitle(QApplication::translate("FilterPage", "Custom Filters", nullptr));
+ FilterPage->setWindowTitle(QCoreApplication::translate("FilterPage", "Form", nullptr));
+ label->setText(QCoreApplication::translate("FilterPage", "Filter attributes for current documentation (comma separated list):", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("FilterPage", "Custom Filters", nullptr));
QTreeWidgetItem *___qtreewidgetitem = customFilterWidget->headerItem();
- ___qtreewidgetitem->setText(1, QApplication::translate("FilterPage", "2", nullptr));
- ___qtreewidgetitem->setText(0, QApplication::translate("FilterPage", "1", nullptr));
- addButton->setText(QApplication::translate("FilterPage", "Add", nullptr));
- removeButton->setText(QApplication::translate("FilterPage", "Remove", nullptr));
+ ___qtreewidgetitem->setText(1, QCoreApplication::translate("FilterPage", "2", nullptr));
+ ___qtreewidgetitem->setText(0, QCoreApplication::translate("FilterPage", "1", nullptr));
+ addButton->setText(QCoreApplication::translate("FilterPage", "Add", nullptr));
+ removeButton->setText(QCoreApplication::translate("FilterPage", "Remove", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/finddialog.ui.h b/tests/auto/tools/uic/baseline/finddialog.ui.h
index a427be3614..f335eee2e4 100644
--- a/tests/auto/tools/uic/baseline/finddialog.ui.h
+++ b/tests/auto/tools/uic/baseline/finddialog.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'finddialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -172,9 +172,9 @@ public:
hboxLayout->addLayout(vboxLayout1);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
findWhat->setBuddy(led);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
QWidget::setTabOrder(led, findNxt);
QWidget::setTabOrder(findNxt, cancel);
QWidget::setTabOrder(cancel, comments);
@@ -193,40 +193,40 @@ public:
void retranslateUi(QDialog *FindDialog)
{
- FindDialog->setWindowTitle(QApplication::translate("FindDialog", "Find", nullptr));
-#ifndef QT_NO_WHATSTHIS
- FindDialog->setWhatsThis(QApplication::translate("FindDialog", "This window allows you to search for some text in the translation source file.", nullptr));
-#endif // QT_NO_WHATSTHIS
- findWhat->setText(QApplication::translate("FindDialog", "&Find what:", nullptr));
-#ifndef QT_NO_WHATSTHIS
- led->setWhatsThis(QApplication::translate("FindDialog", "Type in the text to search for.", nullptr));
-#endif // QT_NO_WHATSTHIS
- groupBox->setTitle(QApplication::translate("FindDialog", "Options", nullptr));
-#ifndef QT_NO_WHATSTHIS
- sourceText->setWhatsThis(QApplication::translate("FindDialog", "Source texts are searched when checked.", nullptr));
-#endif // QT_NO_WHATSTHIS
- sourceText->setText(QApplication::translate("FindDialog", "&Source texts", nullptr));
-#ifndef QT_NO_WHATSTHIS
- translations->setWhatsThis(QApplication::translate("FindDialog", "Translations are searched when checked.", nullptr));
-#endif // QT_NO_WHATSTHIS
- translations->setText(QApplication::translate("FindDialog", "&Translations", nullptr));
-#ifndef QT_NO_WHATSTHIS
- matchCase->setWhatsThis(QApplication::translate("FindDialog", "Texts such as 'TeX' and 'tex' are considered as different when checked.", nullptr));
-#endif // QT_NO_WHATSTHIS
- matchCase->setText(QApplication::translate("FindDialog", "&Match case", nullptr));
-#ifndef QT_NO_WHATSTHIS
- comments->setWhatsThis(QApplication::translate("FindDialog", "Comments and contexts are searched when checked.", nullptr));
-#endif // QT_NO_WHATSTHIS
- comments->setText(QApplication::translate("FindDialog", "&Comments", nullptr));
- ignoreAccelerators->setText(QApplication::translate("FindDialog", "Ignore &accelerators", nullptr));
-#ifndef QT_NO_WHATSTHIS
- findNxt->setWhatsThis(QApplication::translate("FindDialog", "Click here to find the next occurrence of the text you typed in.", nullptr));
-#endif // QT_NO_WHATSTHIS
- findNxt->setText(QApplication::translate("FindDialog", "Find Next", nullptr));
-#ifndef QT_NO_WHATSTHIS
- cancel->setWhatsThis(QApplication::translate("FindDialog", "Click here to close this window.", nullptr));
-#endif // QT_NO_WHATSTHIS
- cancel->setText(QApplication::translate("FindDialog", "Cancel", nullptr));
+ FindDialog->setWindowTitle(QCoreApplication::translate("FindDialog", "Find", nullptr));
+#if QT_CONFIG(whatsthis)
+ FindDialog->setWhatsThis(QCoreApplication::translate("FindDialog", "This window allows you to search for some text in the translation source file.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ findWhat->setText(QCoreApplication::translate("FindDialog", "&Find what:", nullptr));
+#if QT_CONFIG(whatsthis)
+ led->setWhatsThis(QCoreApplication::translate("FindDialog", "Type in the text to search for.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ groupBox->setTitle(QCoreApplication::translate("FindDialog", "Options", nullptr));
+#if QT_CONFIG(whatsthis)
+ sourceText->setWhatsThis(QCoreApplication::translate("FindDialog", "Source texts are searched when checked.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ sourceText->setText(QCoreApplication::translate("FindDialog", "&Source texts", nullptr));
+#if QT_CONFIG(whatsthis)
+ translations->setWhatsThis(QCoreApplication::translate("FindDialog", "Translations are searched when checked.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ translations->setText(QCoreApplication::translate("FindDialog", "&Translations", nullptr));
+#if QT_CONFIG(whatsthis)
+ matchCase->setWhatsThis(QCoreApplication::translate("FindDialog", "Texts such as 'TeX' and 'tex' are considered as different when checked.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ matchCase->setText(QCoreApplication::translate("FindDialog", "&Match case", nullptr));
+#if QT_CONFIG(whatsthis)
+ comments->setWhatsThis(QCoreApplication::translate("FindDialog", "Comments and contexts are searched when checked.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ comments->setText(QCoreApplication::translate("FindDialog", "&Comments", nullptr));
+ ignoreAccelerators->setText(QCoreApplication::translate("FindDialog", "Ignore &accelerators", nullptr));
+#if QT_CONFIG(whatsthis)
+ findNxt->setWhatsThis(QCoreApplication::translate("FindDialog", "Click here to find the next occurrence of the text you typed in.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ findNxt->setText(QCoreApplication::translate("FindDialog", "Find Next", nullptr));
+#if QT_CONFIG(whatsthis)
+ cancel->setWhatsThis(QCoreApplication::translate("FindDialog", "Click here to close this window.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ cancel->setText(QCoreApplication::translate("FindDialog", "Cancel", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/form.ui.h b/tests/auto/tools/uic/baseline/form.ui.h
index ecc63e339b..df8163f726 100644
--- a/tests/auto/tools/uic/baseline/form.ui.h
+++ b/tests/auto/tools/uic/baseline/form.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'form.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -123,9 +123,9 @@ public:
void retranslateUi(QWidget *WorldTimeForm)
{
- WorldTimeForm->setWindowTitle(QApplication::translate("WorldTimeForm", "World Time Clock", nullptr));
- label->setText(QApplication::translate("WorldTimeForm", "Current time:", nullptr));
- label_2->setText(QApplication::translate("WorldTimeForm", "Set time zone:", nullptr));
+ WorldTimeForm->setWindowTitle(QCoreApplication::translate("WorldTimeForm", "World Time Clock", nullptr));
+ label->setText(QCoreApplication::translate("WorldTimeForm", "Current time:", nullptr));
+ label_2->setText(QCoreApplication::translate("WorldTimeForm", "Set time zone:", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h
index d2cfa03edb..17c301e959 100644
--- a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h
+++ b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'formwindowsettings.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -250,12 +250,12 @@ public:
gridLayout->addWidget(gridPanel, 1, 0, 1, 2);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
label_2->setBuddy(defaultSpacingSpinBox);
label->setBuddy(defaultMarginSpinBox);
label_3->setBuddy(marginFunctionLineEdit);
label_3_2->setBuddy(spacingFunctionLineEdit);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
QWidget::setTabOrder(authorLineEdit, defaultMarginSpinBox);
QWidget::setTabOrder(defaultMarginSpinBox, defaultSpacingSpinBox);
QWidget::setTabOrder(defaultSpacingSpinBox, marginFunctionLineEdit);
@@ -271,17 +271,17 @@ public:
void retranslateUi(QDialog *FormWindowSettings)
{
- FormWindowSettings->setWindowTitle(QApplication::translate("FormWindowSettings", "Form Settings", nullptr));
- layoutDefaultGroupBox->setTitle(QApplication::translate("FormWindowSettings", "Layout &Default", nullptr));
- label_2->setText(QApplication::translate("FormWindowSettings", "&Spacing:", nullptr));
- label->setText(QApplication::translate("FormWindowSettings", "&Margin:", nullptr));
- layoutFunctionGroupBox->setTitle(QApplication::translate("FormWindowSettings", "&Layout Function", nullptr));
- label_3->setText(QApplication::translate("FormWindowSettings", "Ma&rgin:", nullptr));
- label_3_2->setText(QApplication::translate("FormWindowSettings", "Spa&cing:", nullptr));
- pixmapFunctionGroupBox_2->setTitle(QApplication::translate("FormWindowSettings", "&Author", nullptr));
- includeHintsGroupBox->setTitle(QApplication::translate("FormWindowSettings", "&Include Hints", nullptr));
- pixmapFunctionGroupBox->setTitle(QApplication::translate("FormWindowSettings", "&Pixmap Function", nullptr));
- gridPanel->setTitle(QApplication::translate("FormWindowSettings", "Grid", nullptr));
+ FormWindowSettings->setWindowTitle(QCoreApplication::translate("FormWindowSettings", "Form Settings", nullptr));
+ layoutDefaultGroupBox->setTitle(QCoreApplication::translate("FormWindowSettings", "Layout &Default", nullptr));
+ label_2->setText(QCoreApplication::translate("FormWindowSettings", "&Spacing:", nullptr));
+ label->setText(QCoreApplication::translate("FormWindowSettings", "&Margin:", nullptr));
+ layoutFunctionGroupBox->setTitle(QCoreApplication::translate("FormWindowSettings", "&Layout Function", nullptr));
+ label_3->setText(QCoreApplication::translate("FormWindowSettings", "Ma&rgin:", nullptr));
+ label_3_2->setText(QCoreApplication::translate("FormWindowSettings", "Spa&cing:", nullptr));
+ pixmapFunctionGroupBox_2->setTitle(QCoreApplication::translate("FormWindowSettings", "&Author", nullptr));
+ includeHintsGroupBox->setTitle(QCoreApplication::translate("FormWindowSettings", "&Include Hints", nullptr));
+ pixmapFunctionGroupBox->setTitle(QCoreApplication::translate("FormWindowSettings", "&Pixmap Function", nullptr));
+ gridPanel->setTitle(QCoreApplication::translate("FormWindowSettings", "Grid", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/generalpage.ui.h b/tests/auto/tools/uic/baseline/generalpage.ui.h
index bd04285d28..6488bfc061 100644
--- a/tests/auto/tools/uic/baseline/generalpage.ui.h
+++ b/tests/auto/tools/uic/baseline/generalpage.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'generalpage.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -73,9 +73,9 @@ public:
void retranslateUi(QWidget *GeneralPage)
{
- GeneralPage->setWindowTitle(QApplication::translate("GeneralPage", "Form", nullptr));
- label->setText(QApplication::translate("GeneralPage", "Namespace:", nullptr));
- label_2->setText(QApplication::translate("GeneralPage", "Virtual Folder:", nullptr));
+ GeneralPage->setWindowTitle(QCoreApplication::translate("GeneralPage", "Form", nullptr));
+ label->setText(QCoreApplication::translate("GeneralPage", "Namespace:", nullptr));
+ label_2->setText(QCoreApplication::translate("GeneralPage", "Virtual Folder:", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/gridalignment.ui.h b/tests/auto/tools/uic/baseline/gridalignment.ui.h
index 421f257c9a..f85ed818f7 100644
--- a/tests/auto/tools/uic/baseline/gridalignment.ui.h
+++ b/tests/auto/tools/uic/baseline/gridalignment.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'gridalignment.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -61,11 +61,11 @@ public:
void retranslateUi(QWidget *Form)
{
- Form->setWindowTitle(QApplication::translate("Form", "Form", nullptr));
- pushButton->setText(QApplication::translate("Form", "Left", nullptr));
- pushButton_3->setText(QApplication::translate("Form", "Top", nullptr));
- pushButton_2->setText(QApplication::translate("Form", "Right", nullptr));
- pushButton_4->setText(QApplication::translate("Form", "Bottom", nullptr));
+ Form->setWindowTitle(QCoreApplication::translate("Form", "Form", nullptr));
+ pushButton->setText(QCoreApplication::translate("Form", "Left", nullptr));
+ pushButton_3->setText(QCoreApplication::translate("Form", "Top", nullptr));
+ pushButton_2->setText(QCoreApplication::translate("Form", "Right", nullptr));
+ pushButton_4->setText(QCoreApplication::translate("Form", "Bottom", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/gridpanel.ui.h b/tests/auto/tools/uic/baseline/gridpanel.ui.h
index 858b71d0cc..54c9a3b5de 100644
--- a/tests/auto/tools/uic/baseline/gridpanel.ui.h
+++ b/tests/auto/tools/uic/baseline/gridpanel.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'gridpanel.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -120,10 +120,10 @@ public:
vboxLayout->addWidget(m_gridGroupBox);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
label->setBuddy(m_deltaXSpinBox);
label_2->setBuddy(m_deltaYSpinBox);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
retranslateUi(qdesigner_internal__GridPanel);
@@ -132,14 +132,14 @@ public:
void retranslateUi(QWidget *qdesigner_internal__GridPanel)
{
- qdesigner_internal__GridPanel->setWindowTitle(QApplication::translate("qdesigner_internal::GridPanel", "Form", nullptr));
- m_gridGroupBox->setTitle(QApplication::translate("qdesigner_internal::GridPanel", "Grid", nullptr));
- m_visibleCheckBox->setText(QApplication::translate("qdesigner_internal::GridPanel", "Visible", nullptr));
- label->setText(QApplication::translate("qdesigner_internal::GridPanel", "Grid &X", nullptr));
- m_snapXCheckBox->setText(QApplication::translate("qdesigner_internal::GridPanel", "Snap", nullptr));
- m_resetButton->setText(QApplication::translate("qdesigner_internal::GridPanel", "Reset", nullptr));
- label_2->setText(QApplication::translate("qdesigner_internal::GridPanel", "Grid &Y", nullptr));
- m_snapYCheckBox->setText(QApplication::translate("qdesigner_internal::GridPanel", "Snap", nullptr));
+ qdesigner_internal__GridPanel->setWindowTitle(QCoreApplication::translate("qdesigner_internal::GridPanel", "Form", nullptr));
+ m_gridGroupBox->setTitle(QCoreApplication::translate("qdesigner_internal::GridPanel", "Grid", nullptr));
+ m_visibleCheckBox->setText(QCoreApplication::translate("qdesigner_internal::GridPanel", "Visible", nullptr));
+ label->setText(QCoreApplication::translate("qdesigner_internal::GridPanel", "Grid &X", nullptr));
+ m_snapXCheckBox->setText(QCoreApplication::translate("qdesigner_internal::GridPanel", "Snap", nullptr));
+ m_resetButton->setText(QCoreApplication::translate("qdesigner_internal::GridPanel", "Reset", nullptr));
+ label_2->setText(QCoreApplication::translate("qdesigner_internal::GridPanel", "Grid &Y", nullptr));
+ m_snapYCheckBox->setText(QCoreApplication::translate("qdesigner_internal::GridPanel", "Snap", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/helpdialog.ui b/tests/auto/tools/uic/baseline/helpdialog.ui
index 8c3178183c..91b81c75d5 100644
--- a/tests/auto/tools/uic/baseline/helpdialog.ui
+++ b/tests/auto/tools/uic/baseline/helpdialog.ui
@@ -57,6 +57,9 @@
<string>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</string>
</property>
<widget class="QWidget" name="contentPage" >
+ <attribute name="icon">
+ <iconset theme="edit-copy"/>
+ </attribute>
<attribute name="title" >
<string>Con&amp;tents</string>
</attribute>
diff --git a/tests/auto/tools/uic/baseline/helpdialog.ui.h b/tests/auto/tools/uic/baseline/helpdialog.ui.h
index abcf280cf9..dd28041a3e 100644
--- a/tests/auto/tools/uic/baseline/helpdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/helpdialog.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'helpdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -124,7 +124,8 @@ public:
vboxLayout1->addWidget(listContents);
- tabWidget->addTab(contentPage, QString());
+ QIcon icon(QIcon::fromTheme(QString::fromUtf8("edit-copy")));
+ tabWidget->addTab(contentPage, icon, QString());
indexPage = new QWidget();
indexPage->setObjectName(QString::fromUtf8("indexPage"));
vboxLayout2 = new QVBoxLayout(indexPage);
@@ -273,11 +274,11 @@ public:
vboxLayout->addWidget(framePrepare);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
TextLabel1->setBuddy(editIndex);
TextLabel1_2->setBuddy(termsEdit);
TextLabel2->setBuddy(resultBox);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
QWidget::setTabOrder(tabWidget, listContents);
QWidget::setTabOrder(listContents, editIndex);
QWidget::setTabOrder(editIndex, listIndex);
@@ -296,77 +297,77 @@ public:
void retranslateUi(QWidget *HelpDialog)
{
- HelpDialog->setWindowTitle(QApplication::translate("HelpDialog", "Help", nullptr));
-#ifndef QT_NO_WHATSTHIS
- HelpDialog->setWhatsThis(QApplication::translate("HelpDialog", "<b>Help</b><p>Choose the topic you want help on from the contents list, or search the index for keywords.</p>", nullptr));
-#endif // QT_NO_WHATSTHIS
-#ifndef QT_NO_WHATSTHIS
- tabWidget->setWhatsThis(QApplication::translate("HelpDialog", "Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.", nullptr));
-#endif // QT_NO_WHATSTHIS
+ HelpDialog->setWindowTitle(QCoreApplication::translate("HelpDialog", "Help", nullptr));
+#if QT_CONFIG(whatsthis)
+ HelpDialog->setWhatsThis(QCoreApplication::translate("HelpDialog", "<b>Help</b><p>Choose the topic you want help on from the contents list, or search the index for keywords.</p>", nullptr));
+#endif // QT_CONFIG(whatsthis)
+#if QT_CONFIG(whatsthis)
+ tabWidget->setWhatsThis(QCoreApplication::translate("HelpDialog", "Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.", nullptr));
+#endif // QT_CONFIG(whatsthis)
QTreeWidgetItem *___qtreewidgetitem = listContents->headerItem();
- ___qtreewidgetitem->setText(0, QApplication::translate("HelpDialog", "column 1", nullptr));
-#ifndef QT_NO_WHATSTHIS
- listContents->setWhatsThis(QApplication::translate("HelpDialog", "<b>Help topics organized by category.</b><p>Double-click an item to see the topics in that category. To view a topic, just double-click it.</p>", nullptr));
-#endif // QT_NO_WHATSTHIS
- tabWidget->setTabText(tabWidget->indexOf(contentPage), QApplication::translate("HelpDialog", "Con&tents", nullptr));
- TextLabel1->setText(QApplication::translate("HelpDialog", "&Look For:", nullptr));
-#ifndef QT_NO_TOOLTIP
- editIndex->setToolTip(QApplication::translate("HelpDialog", "Enter keyword", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_WHATSTHIS
- editIndex->setWhatsThis(QApplication::translate("HelpDialog", "<b>Enter a keyword.</b><p>The list will select an item that matches the entered string best.</p>", nullptr));
-#endif // QT_NO_WHATSTHIS
-#ifndef QT_NO_WHATSTHIS
- listIndex->setWhatsThis(QApplication::translate("HelpDialog", "<b>List of available help topics.</b><p>Double-click on an item to open its help page. If more than one is found, you must specify which page you want.</p>", nullptr));
-#endif // QT_NO_WHATSTHIS
- tabWidget->setTabText(tabWidget->indexOf(indexPage), QApplication::translate("HelpDialog", "&Index", nullptr));
+ ___qtreewidgetitem->setText(0, QCoreApplication::translate("HelpDialog", "column 1", nullptr));
+#if QT_CONFIG(whatsthis)
+ listContents->setWhatsThis(QCoreApplication::translate("HelpDialog", "<b>Help topics organized by category.</b><p>Double-click an item to see the topics in that category. To view a topic, just double-click it.</p>", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ tabWidget->setTabText(tabWidget->indexOf(contentPage), QCoreApplication::translate("HelpDialog", "Con&tents", nullptr));
+ TextLabel1->setText(QCoreApplication::translate("HelpDialog", "&Look For:", nullptr));
+#if QT_CONFIG(tooltip)
+ editIndex->setToolTip(QCoreApplication::translate("HelpDialog", "Enter keyword", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(whatsthis)
+ editIndex->setWhatsThis(QCoreApplication::translate("HelpDialog", "<b>Enter a keyword.</b><p>The list will select an item that matches the entered string best.</p>", nullptr));
+#endif // QT_CONFIG(whatsthis)
+#if QT_CONFIG(whatsthis)
+ listIndex->setWhatsThis(QCoreApplication::translate("HelpDialog", "<b>List of available help topics.</b><p>Double-click on an item to open its help page. If more than one is found, you must specify which page you want.</p>", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ tabWidget->setTabText(tabWidget->indexOf(indexPage), QCoreApplication::translate("HelpDialog", "&Index", nullptr));
QTreeWidgetItem *___qtreewidgetitem1 = listBookmarks->headerItem();
- ___qtreewidgetitem1->setText(0, QApplication::translate("HelpDialog", "column 1", nullptr));
-#ifndef QT_NO_WHATSTHIS
- listBookmarks->setWhatsThis(QApplication::translate("HelpDialog", "Displays the list of bookmarks.", nullptr));
-#endif // QT_NO_WHATSTHIS
-#ifndef QT_NO_TOOLTIP
- buttonAdd->setToolTip(QApplication::translate("HelpDialog", "Add new bookmark", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_WHATSTHIS
- buttonAdd->setWhatsThis(QApplication::translate("HelpDialog", "Add the currently displayed page as a new bookmark.", nullptr));
-#endif // QT_NO_WHATSTHIS
- buttonAdd->setText(QApplication::translate("HelpDialog", "&New", nullptr));
-#ifndef QT_NO_TOOLTIP
- buttonRemove->setToolTip(QApplication::translate("HelpDialog", "Delete bookmark", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_WHATSTHIS
- buttonRemove->setWhatsThis(QApplication::translate("HelpDialog", "Delete the selected bookmark.", nullptr));
-#endif // QT_NO_WHATSTHIS
- buttonRemove->setText(QApplication::translate("HelpDialog", "&Delete", nullptr));
- tabWidget->setTabText(tabWidget->indexOf(bookmarkPage), QApplication::translate("HelpDialog", "&Bookmarks", nullptr));
- TextLabel1_2->setText(QApplication::translate("HelpDialog", "Searching f&or:", nullptr));
-#ifndef QT_NO_TOOLTIP
- termsEdit->setToolTip(QApplication::translate("HelpDialog", "Enter searchword(s).", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_WHATSTHIS
- termsEdit->setWhatsThis(QApplication::translate("HelpDialog", "<b>Enter search word(s).</b><p>Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.</p>", nullptr));
-#endif // QT_NO_WHATSTHIS
-#ifndef QT_NO_WHATSTHIS
- resultBox->setWhatsThis(QApplication::translate("HelpDialog", "<b>Found documents</b><p>This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.</p>", nullptr));
-#endif // QT_NO_WHATSTHIS
- TextLabel2->setText(QApplication::translate("HelpDialog", "Found &Documents:", nullptr));
-#ifndef QT_NO_TOOLTIP
- helpButton->setToolTip(QApplication::translate("HelpDialog", "Display the help page.", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_WHATSTHIS
- helpButton->setWhatsThis(QApplication::translate("HelpDialog", "Display the help page for the full text search.", nullptr));
-#endif // QT_NO_WHATSTHIS
- helpButton->setText(QApplication::translate("HelpDialog", "He&lp", nullptr));
-#ifndef QT_NO_TOOLTIP
- searchButton->setToolTip(QApplication::translate("HelpDialog", "Start searching.", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_WHATSTHIS
- searchButton->setWhatsThis(QApplication::translate("HelpDialog", "Pressing this button starts the search.", nullptr));
-#endif // QT_NO_WHATSTHIS
- searchButton->setText(QApplication::translate("HelpDialog", "&Search", nullptr));
- tabWidget->setTabText(tabWidget->indexOf(searchPage), QApplication::translate("HelpDialog", "&Search", nullptr));
- labelPrepare->setText(QApplication::translate("HelpDialog", "Preparing...", nullptr));
+ ___qtreewidgetitem1->setText(0, QCoreApplication::translate("HelpDialog", "column 1", nullptr));
+#if QT_CONFIG(whatsthis)
+ listBookmarks->setWhatsThis(QCoreApplication::translate("HelpDialog", "Displays the list of bookmarks.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+#if QT_CONFIG(tooltip)
+ buttonAdd->setToolTip(QCoreApplication::translate("HelpDialog", "Add new bookmark", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(whatsthis)
+ buttonAdd->setWhatsThis(QCoreApplication::translate("HelpDialog", "Add the currently displayed page as a new bookmark.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ buttonAdd->setText(QCoreApplication::translate("HelpDialog", "&New", nullptr));
+#if QT_CONFIG(tooltip)
+ buttonRemove->setToolTip(QCoreApplication::translate("HelpDialog", "Delete bookmark", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(whatsthis)
+ buttonRemove->setWhatsThis(QCoreApplication::translate("HelpDialog", "Delete the selected bookmark.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ buttonRemove->setText(QCoreApplication::translate("HelpDialog", "&Delete", nullptr));
+ tabWidget->setTabText(tabWidget->indexOf(bookmarkPage), QCoreApplication::translate("HelpDialog", "&Bookmarks", nullptr));
+ TextLabel1_2->setText(QCoreApplication::translate("HelpDialog", "Searching f&or:", nullptr));
+#if QT_CONFIG(tooltip)
+ termsEdit->setToolTip(QCoreApplication::translate("HelpDialog", "Enter searchword(s).", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(whatsthis)
+ termsEdit->setWhatsThis(QCoreApplication::translate("HelpDialog", "<b>Enter search word(s).</b><p>Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.</p>", nullptr));
+#endif // QT_CONFIG(whatsthis)
+#if QT_CONFIG(whatsthis)
+ resultBox->setWhatsThis(QCoreApplication::translate("HelpDialog", "<b>Found documents</b><p>This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.</p>", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ TextLabel2->setText(QCoreApplication::translate("HelpDialog", "Found &Documents:", nullptr));
+#if QT_CONFIG(tooltip)
+ helpButton->setToolTip(QCoreApplication::translate("HelpDialog", "Display the help page.", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(whatsthis)
+ helpButton->setWhatsThis(QCoreApplication::translate("HelpDialog", "Display the help page for the full text search.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ helpButton->setText(QCoreApplication::translate("HelpDialog", "He&lp", nullptr));
+#if QT_CONFIG(tooltip)
+ searchButton->setToolTip(QCoreApplication::translate("HelpDialog", "Start searching.", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(whatsthis)
+ searchButton->setWhatsThis(QCoreApplication::translate("HelpDialog", "Pressing this button starts the search.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ searchButton->setText(QCoreApplication::translate("HelpDialog", "&Search", nullptr));
+ tabWidget->setTabText(tabWidget->indexOf(searchPage), QCoreApplication::translate("HelpDialog", "&Search", nullptr));
+ labelPrepare->setText(QCoreApplication::translate("HelpDialog", "Preparing...", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/history.ui.h b/tests/auto/tools/uic/baseline/history.ui.h
index 715312d11a..7f48fb9f54 100644
--- a/tests/auto/tools/uic/baseline/history.ui.h
+++ b/tests/auto/tools/uic/baseline/history.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'history.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -91,9 +91,9 @@ public:
void retranslateUi(QDialog *HistoryDialog)
{
- HistoryDialog->setWindowTitle(QApplication::translate("HistoryDialog", "History", nullptr));
- removeButton->setText(QApplication::translate("HistoryDialog", "&Remove", nullptr));
- removeAllButton->setText(QApplication::translate("HistoryDialog", "Remove &All", nullptr));
+ HistoryDialog->setWindowTitle(QCoreApplication::translate("HistoryDialog", "History", nullptr));
+ removeButton->setText(QCoreApplication::translate("HistoryDialog", "&Remove", nullptr));
+ removeAllButton->setText(QCoreApplication::translate("HistoryDialog", "Remove &All", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/icontheme.ui.h b/tests/auto/tools/uic/baseline/icontheme.ui.h
index 936d6b5cf7..f1f6e42a02 100644
--- a/tests/auto/tools/uic/baseline/icontheme.ui.h
+++ b/tests/auto/tools/uic/baseline/icontheme.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'icontheme.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -75,10 +75,10 @@ public:
void retranslateUi(QWidget *Form)
{
- Form->setWindowTitle(QApplication::translate("Form", "Form", nullptr));
- fileicon->setText(QApplication::translate("Form", "fileicon", nullptr));
- fileandthemeicon->setText(QApplication::translate("Form", "PushButton", nullptr));
- themeicon->setText(QApplication::translate("Form", "PushButton", nullptr));
+ Form->setWindowTitle(QCoreApplication::translate("Form", "Form", nullptr));
+ fileicon->setText(QCoreApplication::translate("Form", "fileicon", nullptr));
+ fileandthemeicon->setText(QCoreApplication::translate("Form", "PushButton", nullptr));
+ themeicon->setText(QCoreApplication::translate("Form", "PushButton", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/idbased.ui.h b/tests/auto/tools/uic/baseline/idbased.ui.h
index e246313e11..0209895a3c 100644
--- a/tests/auto/tools/uic/baseline/idbased.ui.h
+++ b/tests/auto/tools/uic/baseline/idbased.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'idbased.ui'
**
-** Created by: Qt User Interface Compiler version 5.11.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -44,15 +44,15 @@ public:
void retranslateUi(QWidget *Form)
{
Form->setWindowTitle(qtTrId("windowTitleId"));
-#ifndef QT_NO_TOOLTIP
+#if QT_CONFIG(tooltip)
pushButton->setToolTip(qtTrId("buttonToolTipId"));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_STATUSTIP
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(statustip)
pushButton->setStatusTip(qtTrId("buttonStatusTipId"));
-#endif // QT_NO_STATUSTIP
-#ifndef QT_NO_WHATSTHIS
+#endif // QT_CONFIG(statustip)
+#if QT_CONFIG(whatsthis)
pushButton->setWhatsThis(qtTrId("buttonWhatsThisId"));
-#endif // QT_NO_WHATSTHIS
+#endif // QT_CONFIG(whatsthis)
pushButton->setText(qtTrId("buttonTextId"));
} // retranslateUi
diff --git a/tests/auto/tools/uic/baseline/identifierpage.ui.h b/tests/auto/tools/uic/baseline/identifierpage.ui.h
index 322a9cf30a..420d668fe9 100644
--- a/tests/auto/tools/uic/baseline/identifierpage.ui.h
+++ b/tests/auto/tools/uic/baseline/identifierpage.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'identifierpage.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -89,10 +89,10 @@ public:
void retranslateUi(QWidget *IdentifierPage)
{
- IdentifierPage->setWindowTitle(QApplication::translate("IdentifierPage", "Form", nullptr));
- identifierCheckBox->setText(QApplication::translate("IdentifierPage", "Create identifiers", nullptr));
- globalButton->setText(QApplication::translate("IdentifierPage", "Global prefix:", nullptr));
- fileNameButton->setText(QApplication::translate("IdentifierPage", "Inherit prefix from file names", nullptr));
+ IdentifierPage->setWindowTitle(QCoreApplication::translate("IdentifierPage", "Form", nullptr));
+ identifierCheckBox->setText(QCoreApplication::translate("IdentifierPage", "Create identifiers", nullptr));
+ globalButton->setText(QCoreApplication::translate("IdentifierPage", "Global prefix:", nullptr));
+ fileNameButton->setText(QCoreApplication::translate("IdentifierPage", "Inherit prefix from file names", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/imagedialog.ui.h b/tests/auto/tools/uic/baseline/imagedialog.ui.h
index e32e7639fa..eea8b6ee03 100644
--- a/tests/auto/tools/uic/baseline/imagedialog.ui.h
+++ b/tests/auto/tools/uic/baseline/imagedialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'imagedialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -86,7 +86,7 @@ public:
colorDepthCombo = new QComboBox(dialog);
colorDepthCombo->setObjectName(QString::fromUtf8("colorDepthCombo"));
colorDepthCombo->setGeometry(QRect(74, 83, 227, 22));
- QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0));
+ QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(colorDepthCombo->sizePolicy().hasHeightForWidth());
@@ -98,7 +98,7 @@ public:
nameLineEdit = new QLineEdit(dialog);
nameLineEdit->setObjectName(QString::fromUtf8("nameLineEdit"));
nameLineEdit->setGeometry(QRect(74, 83, 227, 22));
- QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0));
+ QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Fixed);
sizePolicy1.setHorizontalStretch(1);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(nameLineEdit->sizePolicy().hasHeightForWidth());
@@ -196,14 +196,14 @@ public:
void retranslateUi(QDialog *dialog)
{
- dialog->setWindowTitle(QApplication::translate("ImageDialog", "Create Image", nullptr));
- widthLabel->setText(QApplication::translate("ImageDialog", "Width:", nullptr));
- heightLabel->setText(QApplication::translate("ImageDialog", "Height:", nullptr));
- nameLineEdit->setText(QApplication::translate("ImageDialog", "Untitled image", nullptr));
- nameLabel->setText(QApplication::translate("ImageDialog", "Name:", nullptr));
- colorDepthLabel->setText(QApplication::translate("ImageDialog", "Color depth:", nullptr));
- okButton->setText(QApplication::translate("ImageDialog", "OK", nullptr));
- cancelButton->setText(QApplication::translate("ImageDialog", "Cancel", nullptr));
+ dialog->setWindowTitle(QCoreApplication::translate("ImageDialog", "Create Image", nullptr));
+ widthLabel->setText(QCoreApplication::translate("ImageDialog", "Width:", nullptr));
+ heightLabel->setText(QCoreApplication::translate("ImageDialog", "Height:", nullptr));
+ nameLineEdit->setText(QCoreApplication::translate("ImageDialog", "Untitled image", nullptr));
+ nameLabel->setText(QCoreApplication::translate("ImageDialog", "Name:", nullptr));
+ colorDepthLabel->setText(QCoreApplication::translate("ImageDialog", "Color depth:", nullptr));
+ okButton->setText(QCoreApplication::translate("ImageDialog", "OK", nullptr));
+ cancelButton->setText(QCoreApplication::translate("ImageDialog", "Cancel", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/inputpage.ui.h b/tests/auto/tools/uic/baseline/inputpage.ui.h
index 9367dec6df..0cb4cce4f2 100644
--- a/tests/auto/tools/uic/baseline/inputpage.ui.h
+++ b/tests/auto/tools/uic/baseline/inputpage.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'inputpage.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -81,9 +81,9 @@ public:
void retranslateUi(QWidget *InputPage)
{
- InputPage->setWindowTitle(QApplication::translate("InputPage", "Form", nullptr));
- label->setText(QApplication::translate("InputPage", "File name:", nullptr));
- browseButton->setText(QApplication::translate("InputPage", "...", nullptr));
+ InputPage->setWindowTitle(QCoreApplication::translate("InputPage", "Form", nullptr));
+ label->setText(QCoreApplication::translate("InputPage", "File name:", nullptr));
+ browseButton->setText(QCoreApplication::translate("InputPage", "...", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/installdialog.ui.h b/tests/auto/tools/uic/baseline/installdialog.ui.h
index 3ec7f69b76..b452971f19 100644
--- a/tests/auto/tools/uic/baseline/installdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/installdialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'installdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -120,13 +120,13 @@ public:
void retranslateUi(QDialog *InstallDialog)
{
- InstallDialog->setWindowTitle(QApplication::translate("InstallDialog", "Install Documentation", nullptr));
- label->setText(QApplication::translate("InstallDialog", "Available Documentation:", nullptr));
- installButton->setText(QApplication::translate("InstallDialog", "Install", nullptr));
- cancelButton->setText(QApplication::translate("InstallDialog", "Cancel", nullptr));
- closeButton->setText(QApplication::translate("InstallDialog", "Close", nullptr));
- label_4->setText(QApplication::translate("InstallDialog", "Installation Path:", nullptr));
- browseButton->setText(QApplication::translate("InstallDialog", "...", nullptr));
+ InstallDialog->setWindowTitle(QCoreApplication::translate("InstallDialog", "Install Documentation", nullptr));
+ label->setText(QCoreApplication::translate("InstallDialog", "Available Documentation:", nullptr));
+ installButton->setText(QCoreApplication::translate("InstallDialog", "Install", nullptr));
+ cancelButton->setText(QCoreApplication::translate("InstallDialog", "Cancel", nullptr));
+ closeButton->setText(QCoreApplication::translate("InstallDialog", "Close", nullptr));
+ label_4->setText(QCoreApplication::translate("InstallDialog", "Installation Path:", nullptr));
+ browseButton->setText(QCoreApplication::translate("InstallDialog", "...", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/languagesdialog.ui.h b/tests/auto/tools/uic/baseline/languagesdialog.ui.h
index cf2599fd07..f605d942d4 100644
--- a/tests/auto/tools/uic/baseline/languagesdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/languagesdialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'languagesdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -108,39 +108,39 @@ public:
void retranslateUi(QDialog *LanguagesDialog)
{
- LanguagesDialog->setWindowTitle(QApplication::translate("LanguagesDialog", "Auxiliary Languages", nullptr));
+ LanguagesDialog->setWindowTitle(QCoreApplication::translate("LanguagesDialog", "Auxiliary Languages", nullptr));
QTreeWidgetItem *___qtreewidgetitem = languagesList->headerItem();
- ___qtreewidgetitem->setText(1, QApplication::translate("LanguagesDialog", "File", nullptr));
- ___qtreewidgetitem->setText(0, QApplication::translate("LanguagesDialog", "Locale", nullptr));
-#ifndef QT_NO_TOOLTIP
- upButton->setToolTip(QApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
+ ___qtreewidgetitem->setText(1, QCoreApplication::translate("LanguagesDialog", "File", nullptr));
+ ___qtreewidgetitem->setText(0, QCoreApplication::translate("LanguagesDialog", "Locale", nullptr));
+#if QT_CONFIG(tooltip)
+ upButton->setToolTip(QCoreApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Move selected language up</p></body></html>", nullptr));
-#endif // QT_NO_TOOLTIP
- upButton->setText(QApplication::translate("LanguagesDialog", "up", nullptr));
-#ifndef QT_NO_TOOLTIP
- downButton->setToolTip(QApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
+#endif // QT_CONFIG(tooltip)
+ upButton->setText(QCoreApplication::translate("LanguagesDialog", "up", nullptr));
+#if QT_CONFIG(tooltip)
+ downButton->setToolTip(QCoreApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\">Move selected language down</p></body></html>", nullptr));
-#endif // QT_NO_TOOLTIP
- downButton->setText(QApplication::translate("LanguagesDialog", "down", nullptr));
-#ifndef QT_NO_TOOLTIP
- removeButton->setToolTip(QApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
+#endif // QT_CONFIG(tooltip)
+ downButton->setText(QCoreApplication::translate("LanguagesDialog", "down", nullptr));
+#if QT_CONFIG(tooltip)
+ removeButton->setToolTip(QCoreApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Remove selected language</p></body></html>", nullptr));
-#endif // QT_NO_TOOLTIP
- removeButton->setText(QApplication::translate("LanguagesDialog", "remove", nullptr));
-#ifndef QT_NO_TOOLTIP
- openFileButton->setToolTip(QApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
+#endif // QT_CONFIG(tooltip)
+ removeButton->setText(QCoreApplication::translate("LanguagesDialog", "remove", nullptr));
+#if QT_CONFIG(tooltip)
+ openFileButton->setToolTip(QCoreApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Open auxiliary language files</p></body></html>", nullptr));
-#endif // QT_NO_TOOLTIP
- openFileButton->setText(QApplication::translate("LanguagesDialog", "...", nullptr));
- okButton->setText(QApplication::translate("LanguagesDialog", "OK", nullptr));
+#endif // QT_CONFIG(tooltip)
+ openFileButton->setText(QCoreApplication::translate("LanguagesDialog", "...", nullptr));
+ okButton->setText(QCoreApplication::translate("LanguagesDialog", "OK", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h
index 14067ced18..721d4c9950 100644
--- a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'listwidgeteditor.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -172,28 +172,28 @@ public:
void retranslateUi(QDialog *qdesigner_internal__ListWidgetEditor)
{
- qdesigner_internal__ListWidgetEditor->setWindowTitle(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Dialog", nullptr));
- groupBox->setTitle(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Items List", nullptr));
-#ifndef QT_NO_TOOLTIP
- listWidget->setToolTip(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Items List", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- newItemButton->setToolTip(QApplication::translate("qdesigner_internal::ListWidgetEditor", "New Item", nullptr));
-#endif // QT_NO_TOOLTIP
- newItemButton->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "&New", nullptr));
-#ifndef QT_NO_TOOLTIP
- deleteItemButton->setToolTip(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Delete Item", nullptr));
-#endif // QT_NO_TOOLTIP
- deleteItemButton->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "&Delete", nullptr));
-#ifndef QT_NO_TOOLTIP
- moveItemUpButton->setToolTip(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Move Item Up", nullptr));
-#endif // QT_NO_TOOLTIP
- moveItemUpButton->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "U", nullptr));
-#ifndef QT_NO_TOOLTIP
- moveItemDownButton->setToolTip(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Move Item Down", nullptr));
-#endif // QT_NO_TOOLTIP
- moveItemDownButton->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "D", nullptr));
- label->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Icon", nullptr));
+ qdesigner_internal__ListWidgetEditor->setWindowTitle(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Dialog", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Items List", nullptr));
+#if QT_CONFIG(tooltip)
+ listWidget->setToolTip(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Items List", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ newItemButton->setToolTip(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "New Item", nullptr));
+#endif // QT_CONFIG(tooltip)
+ newItemButton->setText(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "&New", nullptr));
+#if QT_CONFIG(tooltip)
+ deleteItemButton->setToolTip(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Delete Item", nullptr));
+#endif // QT_CONFIG(tooltip)
+ deleteItemButton->setText(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "&Delete", nullptr));
+#if QT_CONFIG(tooltip)
+ moveItemUpButton->setToolTip(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Move Item Up", nullptr));
+#endif // QT_CONFIG(tooltip)
+ moveItemUpButton->setText(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "U", nullptr));
+#if QT_CONFIG(tooltip)
+ moveItemDownButton->setToolTip(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Move Item Down", nullptr));
+#endif // QT_CONFIG(tooltip)
+ moveItemDownButton->setText(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "D", nullptr));
+ label->setText(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Icon", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/mainwindow.ui.h b/tests/auto/tools/uic/baseline/mainwindow.ui.h
index fe84d0baa3..df61d57ceb 100644
--- a/tests/auto/tools/uic/baseline/mainwindow.ui.h
+++ b/tests/auto/tools/uic/baseline/mainwindow.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'mainwindow.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -361,30 +361,30 @@ public:
void retranslateUi(QMainWindow *MainWindow)
{
- MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MakeQPF", nullptr));
- actionAdd_Custom_Font->setText(QApplication::translate("MainWindow", "&Add Custom Font...", nullptr));
- action_Exit->setText(QApplication::translate("MainWindow", "&Exit", nullptr));
- groupBox->setTitle(QApplication::translate("MainWindow", "Font Properties", nullptr));
- label->setText(QApplication::translate("MainWindow", "Family:", nullptr));
- label_2->setText(QApplication::translate("MainWindow", "Pixel Size:", nullptr));
- label_7->setText(QApplication::translate("MainWindow", "Weight:", nullptr));
- italic->setText(QApplication::translate("MainWindow", "Italic", nullptr));
- groupBox_2->setTitle(QApplication::translate("MainWindow", "Glyph Coverage", nullptr));
- chooseFromCodePoints->setText(QApplication::translate("MainWindow", "Choose from Unicode Codepoints:", nullptr));
- selectAll->setText(QApplication::translate("MainWindow", "Select &All", nullptr));
- deselectAll->setText(QApplication::translate("MainWindow", "&Deselect All", nullptr));
- invertSelection->setText(QApplication::translate("MainWindow", "&Invert Selection", nullptr));
- chooseFromSampleFile->setText(QApplication::translate("MainWindow", "Choose from Sample Text File (UTF-8 Encoded):", nullptr));
- label_5->setText(QApplication::translate("MainWindow", "Path:", nullptr));
- browseSampleFile->setText(QApplication::translate("MainWindow", "Browse...", nullptr));
- charCount->setText(QApplication::translate("MainWindow", "TextLabel", nullptr));
- groupBox_3->setTitle(QApplication::translate("MainWindow", "Preview", nullptr));
- groupBox_4->setTitle(QApplication::translate("MainWindow", "Output Options", nullptr));
- label_3->setText(QApplication::translate("MainWindow", "Path:", nullptr));
- browsePath->setText(QApplication::translate("MainWindow", "Browse...", nullptr));
- label_4->setText(QApplication::translate("MainWindow", "Filename:", nullptr));
- generate->setText(QApplication::translate("MainWindow", "Generate Pre-Rendered Font...", nullptr));
- menuFile->setTitle(QApplication::translate("MainWindow", "File", nullptr));
+ MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "MakeQPF", nullptr));
+ actionAdd_Custom_Font->setText(QCoreApplication::translate("MainWindow", "&Add Custom Font...", nullptr));
+ action_Exit->setText(QCoreApplication::translate("MainWindow", "&Exit", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("MainWindow", "Font Properties", nullptr));
+ label->setText(QCoreApplication::translate("MainWindow", "Family:", nullptr));
+ label_2->setText(QCoreApplication::translate("MainWindow", "Pixel Size:", nullptr));
+ label_7->setText(QCoreApplication::translate("MainWindow", "Weight:", nullptr));
+ italic->setText(QCoreApplication::translate("MainWindow", "Italic", nullptr));
+ groupBox_2->setTitle(QCoreApplication::translate("MainWindow", "Glyph Coverage", nullptr));
+ chooseFromCodePoints->setText(QCoreApplication::translate("MainWindow", "Choose from Unicode Codepoints:", nullptr));
+ selectAll->setText(QCoreApplication::translate("MainWindow", "Select &All", nullptr));
+ deselectAll->setText(QCoreApplication::translate("MainWindow", "&Deselect All", nullptr));
+ invertSelection->setText(QCoreApplication::translate("MainWindow", "&Invert Selection", nullptr));
+ chooseFromSampleFile->setText(QCoreApplication::translate("MainWindow", "Choose from Sample Text File (UTF-8 Encoded):", nullptr));
+ label_5->setText(QCoreApplication::translate("MainWindow", "Path:", nullptr));
+ browseSampleFile->setText(QCoreApplication::translate("MainWindow", "Browse...", nullptr));
+ charCount->setText(QCoreApplication::translate("MainWindow", "TextLabel", nullptr));
+ groupBox_3->setTitle(QCoreApplication::translate("MainWindow", "Preview", nullptr));
+ groupBox_4->setTitle(QCoreApplication::translate("MainWindow", "Output Options", nullptr));
+ label_3->setText(QCoreApplication::translate("MainWindow", "Path:", nullptr));
+ browsePath->setText(QCoreApplication::translate("MainWindow", "Browse...", nullptr));
+ label_4->setText(QCoreApplication::translate("MainWindow", "Filename:", nullptr));
+ generate->setText(QCoreApplication::translate("MainWindow", "Generate Pre-Rendered Font...", nullptr));
+ menuFile->setTitle(QCoreApplication::translate("MainWindow", "File", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/mydialog.ui.h b/tests/auto/tools/uic/baseline/mydialog.ui.h
index 1a784d1b0a..e71927092f 100644
--- a/tests/auto/tools/uic/baseline/mydialog.ui.h
+++ b/tests/auto/tools/uic/baseline/mydialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'mydialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.9.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -56,12 +56,12 @@ public:
void retranslateUi(QDialog *MyDialog)
{
- MyDialog->setWindowTitle(QApplication::translate("MyDialog", "Mach 2!", nullptr));
- aLabel->setText(QApplication::translate("MyDialog", "Join the life in the fastlane; - PCH enable your project today! -", nullptr));
- aButton->setText(QApplication::translate("MyDialog", "&Quit", nullptr));
-#ifndef QT_NO_SHORTCUT
- aButton->setShortcut(QApplication::translate("MyDialog", "Alt+Q", nullptr));
-#endif // QT_NO_SHORTCUT
+ MyDialog->setWindowTitle(QCoreApplication::translate("MyDialog", "Mach 2!", nullptr));
+ aLabel->setText(QCoreApplication::translate("MyDialog", "Join the life in the fastlane; - PCH enable your project today! -", nullptr));
+ aButton->setText(QCoreApplication::translate("MyDialog", "&Quit", nullptr));
+#if QT_CONFIG(shortcut)
+ aButton->setShortcut(QCoreApplication::translate("MyDialog", "Alt+Q", nullptr));
+#endif // QT_CONFIG(shortcut)
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/myform.ui.h b/tests/auto/tools/uic/baseline/myform.ui.h
index d3a08e04c9..87d88e8246 100644
--- a/tests/auto/tools/uic/baseline/myform.ui.h
+++ b/tests/auto/tools/uic/baseline/myform.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'myform.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -120,17 +120,17 @@ public:
void retranslateUi(QWidget *Form)
{
- Form->setWindowTitle(QApplication::translate("Form", "Export Document", nullptr));
- groupBox->setTitle(QApplication::translate("Form", "Export Options", nullptr));
- radioButton_2->setText(QApplication::translate("Form", "&DocBook", nullptr));
- radioButton->setText(QApplication::translate("Form", "&LaTeX", nullptr));
- checkBox_2->setText(QApplication::translate("Form", "Include p&ictures", nullptr));
- checkBox->setText(QApplication::translate("Form", "&Compress", nullptr));
- radioButton_2_2->setText(QApplication::translate("Form", "&HTML", nullptr));
- radioButton_3->setText(QApplication::translate("Form", "&PostScript", nullptr));
- radioButton_4->setText(QApplication::translate("Form", "PD&F", nullptr));
- checkBox_3->setText(QApplication::translate("Form", "Include &metadata", nullptr));
- checkBox_4->setText(QApplication::translate("Form", "Create inde&x", nullptr));
+ Form->setWindowTitle(QCoreApplication::translate("Form", "Export Document", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("Form", "Export Options", nullptr));
+ radioButton_2->setText(QCoreApplication::translate("Form", "&DocBook", nullptr));
+ radioButton->setText(QCoreApplication::translate("Form", "&LaTeX", nullptr));
+ checkBox_2->setText(QCoreApplication::translate("Form", "Include p&ictures", nullptr));
+ checkBox->setText(QCoreApplication::translate("Form", "&Compress", nullptr));
+ radioButton_2_2->setText(QCoreApplication::translate("Form", "&HTML", nullptr));
+ radioButton_3->setText(QCoreApplication::translate("Form", "&PostScript", nullptr));
+ radioButton_4->setText(QCoreApplication::translate("Form", "PD&F", nullptr));
+ checkBox_3->setText(QCoreApplication::translate("Form", "Include &metadata", nullptr));
+ checkBox_4->setText(QCoreApplication::translate("Form", "Create inde&x", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/newactiondialog.ui.h b/tests/auto/tools/uic/baseline/newactiondialog.ui.h
index ca99ab8356..4b3b6bcf1a 100644
--- a/tests/auto/tools/uic/baseline/newactiondialog.ui.h
+++ b/tests/auto/tools/uic/baseline/newactiondialog.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'newactiondialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -143,11 +143,11 @@ public:
verticalLayout->addWidget(buttonBox);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
label->setBuddy(editActionText);
label_3->setBuddy(editObjectName);
label_2->setBuddy(iconSelector);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
QWidget::setTabOrder(editActionText, editObjectName);
retranslateUi(qdesigner_internal__NewActionDialog);
@@ -159,10 +159,10 @@ public:
void retranslateUi(QDialog *qdesigner_internal__NewActionDialog)
{
- qdesigner_internal__NewActionDialog->setWindowTitle(QApplication::translate("qdesigner_internal::NewActionDialog", "New Action...", nullptr));
- label->setText(QApplication::translate("qdesigner_internal::NewActionDialog", "&Text:", nullptr));
- label_3->setText(QApplication::translate("qdesigner_internal::NewActionDialog", "Object &name:", nullptr));
- label_2->setText(QApplication::translate("qdesigner_internal::NewActionDialog", "&Icon:", nullptr));
+ qdesigner_internal__NewActionDialog->setWindowTitle(QCoreApplication::translate("qdesigner_internal::NewActionDialog", "New Action...", nullptr));
+ label->setText(QCoreApplication::translate("qdesigner_internal::NewActionDialog", "&Text:", nullptr));
+ label_3->setText(QCoreApplication::translate("qdesigner_internal::NewActionDialog", "Object &name:", nullptr));
+ label_2->setText(QCoreApplication::translate("qdesigner_internal::NewActionDialog", "&Icon:", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h b/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h
index f5fd6f1fa4..406f8bc1a3 100644
--- a/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h
+++ b/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'newdynamicpropertydialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -108,9 +108,9 @@ public:
void retranslateUi(QDialog *qdesigner_internal__NewDynamicPropertyDialog)
{
- qdesigner_internal__NewDynamicPropertyDialog->setWindowTitle(QApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Create Dynamic Property", nullptr));
- label->setText(QApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Property Name", nullptr));
- label_2->setText(QApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Property Type", nullptr));
+ qdesigner_internal__NewDynamicPropertyDialog->setWindowTitle(QCoreApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Create Dynamic Property", nullptr));
+ label->setText(QCoreApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Property Name", nullptr));
+ label_2->setText(QCoreApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Property Type", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/newform.ui.h b/tests/auto/tools/uic/baseline/newform.ui.h
index 80e70dcf66..e0b5baef81 100644
--- a/tests/auto/tools/uic/baseline/newform.ui.h
+++ b/tests/auto/tools/uic/baseline/newform.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'newform.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -93,7 +93,7 @@ public:
lblPreview = new QLabel(NewForm);
lblPreview->setObjectName(QString::fromUtf8("lblPreview"));
- QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(5));
+ QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(lblPreview->sizePolicy().hasHeightForWidth());
@@ -132,11 +132,11 @@ public:
void retranslateUi(QDialog *NewForm)
{
- NewForm->setWindowTitle(QApplication::translate("NewForm", "New Form", nullptr));
+ NewForm->setWindowTitle(QCoreApplication::translate("NewForm", "New Form", nullptr));
QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem();
- ___qtreewidgetitem->setText(0, QApplication::translate("NewForm", "0", nullptr));
- lblPreview->setText(QApplication::translate("NewForm", "Choose a template for a preview", nullptr));
- chkShowOnStartup->setText(QApplication::translate("NewForm", "Show this Dialog on Startup", nullptr));
+ ___qtreewidgetitem->setText(0, QCoreApplication::translate("NewForm", "0", nullptr));
+ lblPreview->setText(QCoreApplication::translate("NewForm", "Choose a template for a preview", nullptr));
+ chkShowOnStartup->setText(QCoreApplication::translate("NewForm", "Show this Dialog on Startup", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/orderdialog.ui.h b/tests/auto/tools/uic/baseline/orderdialog.ui.h
index 0ee08257f4..532ec2d41c 100644
--- a/tests/auto/tools/uic/baseline/orderdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/orderdialog.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'orderdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -130,14 +130,14 @@ public:
void retranslateUi(QDialog *qdesigner_internal__OrderDialog)
{
- qdesigner_internal__OrderDialog->setWindowTitle(QApplication::translate("qdesigner_internal::OrderDialog", "Change Page Order", nullptr));
- groupBox->setTitle(QApplication::translate("qdesigner_internal::OrderDialog", "Page Order", nullptr));
-#ifndef QT_NO_TOOLTIP
- upButton->setToolTip(QApplication::translate("qdesigner_internal::OrderDialog", "Move page up", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- downButton->setToolTip(QApplication::translate("qdesigner_internal::OrderDialog", "Move page down", nullptr));
-#endif // QT_NO_TOOLTIP
+ qdesigner_internal__OrderDialog->setWindowTitle(QCoreApplication::translate("qdesigner_internal::OrderDialog", "Change Page Order", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("qdesigner_internal::OrderDialog", "Page Order", nullptr));
+#if QT_CONFIG(tooltip)
+ upButton->setToolTip(QCoreApplication::translate("qdesigner_internal::OrderDialog", "Move page up", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ downButton->setToolTip(QCoreApplication::translate("qdesigner_internal::OrderDialog", "Move page down", nullptr));
+#endif // QT_CONFIG(tooltip)
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/outputpage.ui.h b/tests/auto/tools/uic/baseline/outputpage.ui.h
index 00491bb3d8..9d2593dc77 100644
--- a/tests/auto/tools/uic/baseline/outputpage.ui.h
+++ b/tests/auto/tools/uic/baseline/outputpage.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'outputpage.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -87,9 +87,9 @@ public:
void retranslateUi(QWidget *OutputPage)
{
- OutputPage->setWindowTitle(QApplication::translate("OutputPage", "Form", nullptr));
- label->setText(QApplication::translate("OutputPage", "Project file name:", nullptr));
- label_2->setText(QApplication::translate("OutputPage", "Collection file name:", nullptr));
+ OutputPage->setWindowTitle(QCoreApplication::translate("OutputPage", "Form", nullptr));
+ label->setText(QCoreApplication::translate("OutputPage", "Project file name:", nullptr));
+ label_2->setText(QCoreApplication::translate("OutputPage", "Collection file name:", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/pagefold.ui.h b/tests/auto/tools/uic/baseline/pagefold.ui.h
index c1ff03648d..a0594b7ec7 100644
--- a/tests/auto/tools/uic/baseline/pagefold.ui.h
+++ b/tests/auto/tools/uic/baseline/pagefold.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'pagefold.ui'
**
-** Created by: Qt User Interface Compiler version 5.10.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -213,13 +213,13 @@ public:
statusbar = new QStatusBar(MainWindow);
statusbar->setObjectName(QString::fromUtf8("statusbar"));
MainWindow->setStatusBar(statusbar);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
ageLabel->setBuddy(ageSpinBox);
nameLabel->setBuddy(nameCombo);
passwordLabel->setBuddy(passwordEdit);
label->setBuddy(professionList);
countryLabel->setBuddy(professionList);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
menubar->addAction(menu_File->menuAction());
menubar->addAction(menu_Help->menuAction());
@@ -242,84 +242,84 @@ public:
void retranslateUi(QMainWindow *MainWindow)
{
- MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", nullptr));
- exitAction->setText(QApplication::translate("MainWindow", "&Exit", nullptr));
- aboutQtAction->setText(QApplication::translate("MainWindow", "About Qt", nullptr));
- editStyleAction->setText(QApplication::translate("MainWindow", "Edit &Style", nullptr));
- aboutAction->setText(QApplication::translate("MainWindow", "About", nullptr));
- nameCombo->setItemText(0, QApplication::translate("MainWindow", "Girish", nullptr));
- nameCombo->setItemText(1, QApplication::translate("MainWindow", "Jasmin", nullptr));
- nameCombo->setItemText(2, QApplication::translate("MainWindow", "Simon", nullptr));
- nameCombo->setItemText(3, QApplication::translate("MainWindow", "Zack", nullptr));
-
-#ifndef QT_NO_TOOLTIP
- nameCombo->setToolTip(QApplication::translate("MainWindow", "Specify your name", nullptr));
-#endif // QT_NO_TOOLTIP
- femaleRadioButton->setStyleSheet(QApplication::translate("MainWindow", "Check this if you are female", nullptr));
- femaleRadioButton->setText(QApplication::translate("MainWindow", "&Female", nullptr));
- genderLabel->setText(QApplication::translate("MainWindow", "Gender:", nullptr));
- ageLabel->setText(QApplication::translate("MainWindow", "&Age:", nullptr));
-#ifndef QT_NO_TOOLTIP
- maleRadioButton->setToolTip(QApplication::translate("MainWindow", "Check this if you are male", nullptr));
-#endif // QT_NO_TOOLTIP
- maleRadioButton->setText(QApplication::translate("MainWindow", "&Male", nullptr));
- nameLabel->setText(QApplication::translate("MainWindow", "&Name:", nullptr));
- passwordLabel->setText(QApplication::translate("MainWindow", "&Password:", nullptr));
-#ifndef QT_NO_TOOLTIP
- ageSpinBox->setToolTip(QApplication::translate("MainWindow", "Specify your age", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_STATUSTIP
- ageSpinBox->setStatusTip(QApplication::translate("MainWindow", "Specify your age", nullptr));
-#endif // QT_NO_STATUSTIP
-#ifndef QT_NO_TOOLTIP
- agreeCheckBox->setToolTip(QApplication::translate("MainWindow", "Please read the LICENSE file before checking", nullptr));
-#endif // QT_NO_TOOLTIP
- agreeCheckBox->setText(QApplication::translate("MainWindow", "I &accept the terms and &conditions", nullptr));
-#ifndef QT_NO_TOOLTIP
- passwordEdit->setToolTip(QApplication::translate("MainWindow", "Specify your password", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_STATUSTIP
- passwordEdit->setStatusTip(QApplication::translate("MainWindow", "Specify your password", nullptr));
-#endif // QT_NO_STATUSTIP
- passwordEdit->setText(QApplication::translate("MainWindow", "Password", nullptr));
+ MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "MainWindow", nullptr));
+ exitAction->setText(QCoreApplication::translate("MainWindow", "&Exit", nullptr));
+ aboutQtAction->setText(QCoreApplication::translate("MainWindow", "About Qt", nullptr));
+ editStyleAction->setText(QCoreApplication::translate("MainWindow", "Edit &Style", nullptr));
+ aboutAction->setText(QCoreApplication::translate("MainWindow", "About", nullptr));
+ nameCombo->setItemText(0, QCoreApplication::translate("MainWindow", "Girish", nullptr));
+ nameCombo->setItemText(1, QCoreApplication::translate("MainWindow", "Jasmin", nullptr));
+ nameCombo->setItemText(2, QCoreApplication::translate("MainWindow", "Simon", nullptr));
+ nameCombo->setItemText(3, QCoreApplication::translate("MainWindow", "Zack", nullptr));
+
+#if QT_CONFIG(tooltip)
+ nameCombo->setToolTip(QCoreApplication::translate("MainWindow", "Specify your name", nullptr));
+#endif // QT_CONFIG(tooltip)
+ femaleRadioButton->setStyleSheet(QCoreApplication::translate("MainWindow", "Check this if you are female", nullptr));
+ femaleRadioButton->setText(QCoreApplication::translate("MainWindow", "&Female", nullptr));
+ genderLabel->setText(QCoreApplication::translate("MainWindow", "Gender:", nullptr));
+ ageLabel->setText(QCoreApplication::translate("MainWindow", "&Age:", nullptr));
+#if QT_CONFIG(tooltip)
+ maleRadioButton->setToolTip(QCoreApplication::translate("MainWindow", "Check this if you are male", nullptr));
+#endif // QT_CONFIG(tooltip)
+ maleRadioButton->setText(QCoreApplication::translate("MainWindow", "&Male", nullptr));
+ nameLabel->setText(QCoreApplication::translate("MainWindow", "&Name:", nullptr));
+ passwordLabel->setText(QCoreApplication::translate("MainWindow", "&Password:", nullptr));
+#if QT_CONFIG(tooltip)
+ ageSpinBox->setToolTip(QCoreApplication::translate("MainWindow", "Specify your age", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(statustip)
+ ageSpinBox->setStatusTip(QCoreApplication::translate("MainWindow", "Specify your age", nullptr));
+#endif // QT_CONFIG(statustip)
+#if QT_CONFIG(tooltip)
+ agreeCheckBox->setToolTip(QCoreApplication::translate("MainWindow", "Please read the LICENSE file before checking", nullptr));
+#endif // QT_CONFIG(tooltip)
+ agreeCheckBox->setText(QCoreApplication::translate("MainWindow", "I &accept the terms and &conditions", nullptr));
+#if QT_CONFIG(tooltip)
+ passwordEdit->setToolTip(QCoreApplication::translate("MainWindow", "Specify your password", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(statustip)
+ passwordEdit->setStatusTip(QCoreApplication::translate("MainWindow", "Specify your password", nullptr));
+#endif // QT_CONFIG(statustip)
+ passwordEdit->setText(QCoreApplication::translate("MainWindow", "Password", nullptr));
const bool __sortingEnabled = professionList->isSortingEnabled();
professionList->setSortingEnabled(false);
QListWidgetItem *___qlistwidgetitem = professionList->item(0);
- ___qlistwidgetitem->setText(QApplication::translate("MainWindow", "Developer", nullptr));
+ ___qlistwidgetitem->setText(QCoreApplication::translate("MainWindow", "Developer", nullptr));
QListWidgetItem *___qlistwidgetitem1 = professionList->item(1);
- ___qlistwidgetitem1->setText(QApplication::translate("MainWindow", "Student", nullptr));
+ ___qlistwidgetitem1->setText(QCoreApplication::translate("MainWindow", "Student", nullptr));
QListWidgetItem *___qlistwidgetitem2 = professionList->item(2);
- ___qlistwidgetitem2->setText(QApplication::translate("MainWindow", "Fisherman", nullptr));
+ ___qlistwidgetitem2->setText(QCoreApplication::translate("MainWindow", "Fisherman", nullptr));
professionList->setSortingEnabled(__sortingEnabled);
-#ifndef QT_NO_TOOLTIP
- professionList->setToolTip(QApplication::translate("MainWindow", "Select your profession", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_STATUSTIP
- professionList->setStatusTip(QApplication::translate("MainWindow", "Specify your name here", nullptr));
-#endif // QT_NO_STATUSTIP
-#ifndef QT_NO_WHATSTHIS
- professionList->setWhatsThis(QApplication::translate("MainWindow", "Specify your name here", nullptr));
-#endif // QT_NO_WHATSTHIS
- label->setText(QApplication::translate("MainWindow", "Profession:", nullptr));
- countryCombo->setItemText(0, QApplication::translate("MainWindow", "Egypt", nullptr));
- countryCombo->setItemText(1, QApplication::translate("MainWindow", "France", nullptr));
- countryCombo->setItemText(2, QApplication::translate("MainWindow", "Germany", nullptr));
- countryCombo->setItemText(3, QApplication::translate("MainWindow", "India", nullptr));
- countryCombo->setItemText(4, QApplication::translate("MainWindow", "Italy", nullptr));
- countryCombo->setItemText(5, QApplication::translate("MainWindow", "Korea", nullptr));
- countryCombo->setItemText(6, QApplication::translate("MainWindow", "Norway", nullptr));
-
-#ifndef QT_NO_TOOLTIP
- countryCombo->setToolTip(QApplication::translate("MainWindow", "Specify country of origin", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_STATUSTIP
- countryCombo->setStatusTip(QApplication::translate("MainWindow", "Specify country of origin", nullptr));
-#endif // QT_NO_STATUSTIP
- countryLabel->setText(QApplication::translate("MainWindow", "Pro&fession", nullptr));
- menu_File->setTitle(QApplication::translate("MainWindow", "&File", nullptr));
- menu_Help->setTitle(QApplication::translate("MainWindow", "&Help", nullptr));
+#if QT_CONFIG(tooltip)
+ professionList->setToolTip(QCoreApplication::translate("MainWindow", "Select your profession", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(statustip)
+ professionList->setStatusTip(QCoreApplication::translate("MainWindow", "Specify your name here", nullptr));
+#endif // QT_CONFIG(statustip)
+#if QT_CONFIG(whatsthis)
+ professionList->setWhatsThis(QCoreApplication::translate("MainWindow", "Specify your name here", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ label->setText(QCoreApplication::translate("MainWindow", "Profession:", nullptr));
+ countryCombo->setItemText(0, QCoreApplication::translate("MainWindow", "Egypt", nullptr));
+ countryCombo->setItemText(1, QCoreApplication::translate("MainWindow", "France", nullptr));
+ countryCombo->setItemText(2, QCoreApplication::translate("MainWindow", "Germany", nullptr));
+ countryCombo->setItemText(3, QCoreApplication::translate("MainWindow", "India", nullptr));
+ countryCombo->setItemText(4, QCoreApplication::translate("MainWindow", "Italy", nullptr));
+ countryCombo->setItemText(5, QCoreApplication::translate("MainWindow", "Korea", nullptr));
+ countryCombo->setItemText(6, QCoreApplication::translate("MainWindow", "Norway", nullptr));
+
+#if QT_CONFIG(tooltip)
+ countryCombo->setToolTip(QCoreApplication::translate("MainWindow", "Specify country of origin", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(statustip)
+ countryCombo->setStatusTip(QCoreApplication::translate("MainWindow", "Specify country of origin", nullptr));
+#endif // QT_CONFIG(statustip)
+ countryLabel->setText(QCoreApplication::translate("MainWindow", "Pro&fession", nullptr));
+ menu_File->setTitle(QCoreApplication::translate("MainWindow", "&File", nullptr));
+ menu_Help->setTitle(QCoreApplication::translate("MainWindow", "&Help", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/paletteeditor.ui.h b/tests/auto/tools/uic/baseline/paletteeditor.ui.h
index 0061164960..eb1cad8c3a 100644
--- a/tests/auto/tools/uic/baseline/paletteeditor.ui.h
+++ b/tests/auto/tools/uic/baseline/paletteeditor.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'paletteeditor.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -81,7 +81,7 @@ public:
if (qdesigner_internal__PaletteEditor->objectName().isEmpty())
qdesigner_internal__PaletteEditor->setObjectName(QString::fromUtf8("qdesigner_internal__PaletteEditor"));
qdesigner_internal__PaletteEditor->resize(365, 409);
- QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(7));
+ QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(qdesigner_internal__PaletteEditor->sizePolicy().hasHeightForWidth());
@@ -108,7 +108,7 @@ public:
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
buildButton = new QtColorButton(advancedBox);
buildButton->setObjectName(QString::fromUtf8("buildButton"));
- QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(13));
+ QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Ignored);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(buildButton->sizePolicy().hasHeightForWidth());
@@ -143,7 +143,7 @@ public:
GroupBox126 = new QGroupBox(qdesigner_internal__PaletteEditor);
GroupBox126->setObjectName(QString::fromUtf8("GroupBox126"));
- QSizePolicy sizePolicy2(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(7));
+ QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Expanding);
sizePolicy2.setHorizontalStretch(0);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(GroupBox126->sizePolicy().hasHeightForWidth());
@@ -197,16 +197,16 @@ public:
void retranslateUi(QDialog *qdesigner_internal__PaletteEditor)
{
- qdesigner_internal__PaletteEditor->setWindowTitle(QApplication::translate("qdesigner_internal::PaletteEditor", "Edit Palette", nullptr));
- advancedBox->setTitle(QApplication::translate("qdesigner_internal::PaletteEditor", "Tune Palette", nullptr));
+ qdesigner_internal__PaletteEditor->setWindowTitle(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Edit Palette", nullptr));
+ advancedBox->setTitle(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Tune Palette", nullptr));
buildButton->setText(QString());
- detailsRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Show Details", nullptr));
- computeRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Compute Details", nullptr));
- label->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Quick", nullptr));
- GroupBox126->setTitle(QApplication::translate("qdesigner_internal::PaletteEditor", "Preview", nullptr));
- disabledRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Disabled", nullptr));
- inactiveRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Inactive", nullptr));
- activeRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Active", nullptr));
+ detailsRadio->setText(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Show Details", nullptr));
+ computeRadio->setText(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Compute Details", nullptr));
+ label->setText(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Quick", nullptr));
+ GroupBox126->setTitle(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Preview", nullptr));
+ disabledRadio->setText(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Disabled", nullptr));
+ inactiveRadio->setText(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Inactive", nullptr));
+ activeRadio->setText(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Active", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/passworddialog.ui.h b/tests/auto/tools/uic/baseline/passworddialog.ui.h
index 9ab95c4de9..0542098ec2 100644
--- a/tests/auto/tools/uic/baseline/passworddialog.ui.h
+++ b/tests/auto/tools/uic/baseline/passworddialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'passworddialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -98,11 +98,11 @@ public:
void retranslateUi(QDialog *PasswordDialog)
{
- PasswordDialog->setWindowTitle(QApplication::translate("PasswordDialog", "Authentication Required", nullptr));
- iconLabel->setText(QApplication::translate("PasswordDialog", "DUMMY ICON", nullptr));
- introLabel->setText(QApplication::translate("PasswordDialog", "INTRO TEXT DUMMY", nullptr));
- label->setText(QApplication::translate("PasswordDialog", "Username:", nullptr));
- lblPassword->setText(QApplication::translate("PasswordDialog", "Password:", nullptr));
+ PasswordDialog->setWindowTitle(QCoreApplication::translate("PasswordDialog", "Authentication Required", nullptr));
+ iconLabel->setText(QCoreApplication::translate("PasswordDialog", "DUMMY ICON", nullptr));
+ introLabel->setText(QCoreApplication::translate("PasswordDialog", "INTRO TEXT DUMMY", nullptr));
+ label->setText(QCoreApplication::translate("PasswordDialog", "Username:", nullptr));
+ lblPassword->setText(QCoreApplication::translate("PasswordDialog", "Password:", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/pathpage.ui.h b/tests/auto/tools/uic/baseline/pathpage.ui.h
index eb151f9550..bc9f254965 100644
--- a/tests/auto/tools/uic/baseline/pathpage.ui.h
+++ b/tests/auto/tools/uic/baseline/pathpage.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'pathpage.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -104,11 +104,11 @@ public:
void retranslateUi(QWidget *PathPage)
{
- PathPage->setWindowTitle(QApplication::translate("PathPage", "Form", nullptr));
- label_2->setText(QApplication::translate("PathPage", "File filters:", nullptr));
- label->setText(QApplication::translate("PathPage", "Documentation source file paths:", nullptr));
- addButton->setText(QApplication::translate("PathPage", "Add", nullptr));
- removeButton->setText(QApplication::translate("PathPage", "Remove", nullptr));
+ PathPage->setWindowTitle(QCoreApplication::translate("PathPage", "Form", nullptr));
+ label_2->setText(QCoreApplication::translate("PathPage", "File filters:", nullptr));
+ label->setText(QCoreApplication::translate("PathPage", "Documentation source file paths:", nullptr));
+ addButton->setText(QCoreApplication::translate("PathPage", "Add", nullptr));
+ removeButton->setText(QCoreApplication::translate("PathPage", "Remove", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h
index 27a0fa79ed..25989c4bd3 100644
--- a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h
+++ b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'phrasebookbox.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -165,11 +165,11 @@ public:
unnamed->addLayout(buttonLayout);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
target->setBuddy(targetLed);
source->setBuddy(sourceLed);
definition->setBuddy(definitionLed);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
QWidget::setTabOrder(sourceLed, targetLed);
QWidget::setTabOrder(targetLed, definitionLed);
QWidget::setTabOrder(definitionLed, newBut);
@@ -184,38 +184,38 @@ public:
void retranslateUi(QDialog *PhraseBookBox)
{
- PhraseBookBox->setWindowTitle(QApplication::translate("PhraseBookBox", "Edit Phrase Book", nullptr));
-#ifndef QT_NO_WHATSTHIS
- PhraseBookBox->setWhatsThis(QApplication::translate("PhraseBookBox", "This window allows you to add, modify, or delete phrases in a phrase book.", nullptr));
-#endif // QT_NO_WHATSTHIS
- target->setText(QApplication::translate("PhraseBookBox", "&Translation:", nullptr));
-#ifndef QT_NO_WHATSTHIS
- targetLed->setWhatsThis(QApplication::translate("PhraseBookBox", "This is the phrase in the target language corresponding to the source phrase.", nullptr));
-#endif // QT_NO_WHATSTHIS
- source->setText(QApplication::translate("PhraseBookBox", "S&ource phrase:", nullptr));
-#ifndef QT_NO_WHATSTHIS
- definitionLed->setWhatsThis(QApplication::translate("PhraseBookBox", "This is a definition for the source phrase.", nullptr));
-#endif // QT_NO_WHATSTHIS
-#ifndef QT_NO_WHATSTHIS
- sourceLed->setWhatsThis(QApplication::translate("PhraseBookBox", "This is the phrase in the source language.", nullptr));
-#endif // QT_NO_WHATSTHIS
- definition->setText(QApplication::translate("PhraseBookBox", "&Definition:", nullptr));
-#ifndef QT_NO_WHATSTHIS
- newBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to add the phrase to the phrase book.", nullptr));
-#endif // QT_NO_WHATSTHIS
- newBut->setText(QApplication::translate("PhraseBookBox", "&New Phrase", nullptr));
-#ifndef QT_NO_WHATSTHIS
- removeBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to remove the phrase from the phrase book.", nullptr));
-#endif // QT_NO_WHATSTHIS
- removeBut->setText(QApplication::translate("PhraseBookBox", "&Remove Phrase", nullptr));
-#ifndef QT_NO_WHATSTHIS
- saveBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to save the changes made.", nullptr));
-#endif // QT_NO_WHATSTHIS
- saveBut->setText(QApplication::translate("PhraseBookBox", "&Save", nullptr));
-#ifndef QT_NO_WHATSTHIS
- closeBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to close this window.", nullptr));
-#endif // QT_NO_WHATSTHIS
- closeBut->setText(QApplication::translate("PhraseBookBox", "Close", nullptr));
+ PhraseBookBox->setWindowTitle(QCoreApplication::translate("PhraseBookBox", "Edit Phrase Book", nullptr));
+#if QT_CONFIG(whatsthis)
+ PhraseBookBox->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "This window allows you to add, modify, or delete phrases in a phrase book.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ target->setText(QCoreApplication::translate("PhraseBookBox", "&Translation:", nullptr));
+#if QT_CONFIG(whatsthis)
+ targetLed->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "This is the phrase in the target language corresponding to the source phrase.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ source->setText(QCoreApplication::translate("PhraseBookBox", "S&ource phrase:", nullptr));
+#if QT_CONFIG(whatsthis)
+ definitionLed->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "This is a definition for the source phrase.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+#if QT_CONFIG(whatsthis)
+ sourceLed->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "This is the phrase in the source language.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ definition->setText(QCoreApplication::translate("PhraseBookBox", "&Definition:", nullptr));
+#if QT_CONFIG(whatsthis)
+ newBut->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "Click here to add the phrase to the phrase book.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ newBut->setText(QCoreApplication::translate("PhraseBookBox", "&New Phrase", nullptr));
+#if QT_CONFIG(whatsthis)
+ removeBut->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "Click here to remove the phrase from the phrase book.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ removeBut->setText(QCoreApplication::translate("PhraseBookBox", "&Remove Phrase", nullptr));
+#if QT_CONFIG(whatsthis)
+ saveBut->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "Click here to save the changes made.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ saveBut->setText(QCoreApplication::translate("PhraseBookBox", "&Save", nullptr));
+#if QT_CONFIG(whatsthis)
+ closeBut->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "Click here to close this window.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ closeBut->setText(QCoreApplication::translate("PhraseBookBox", "Close", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/pixmapfunction.ui.h b/tests/auto/tools/uic/baseline/pixmapfunction.ui.h
index 1644380c15..5a24aeeded 100644
--- a/tests/auto/tools/uic/baseline/pixmapfunction.ui.h
+++ b/tests/auto/tools/uic/baseline/pixmapfunction.ui.h
@@ -58,9 +58,9 @@ public:
void retranslateUi(QWidget *Form)
{
- Form->setWindowTitle(QApplication::translate("Form", "Form", nullptr));
+ Form->setWindowTitle(QCoreApplication::translate("Form", "Form", nullptr));
label->setText(QString());
- pushButton->setText(QApplication::translate("Form", "PushButton", nullptr));
+ pushButton->setText(QCoreApplication::translate("Form", "PushButton", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/plugindialog.ui.h b/tests/auto/tools/uic/baseline/plugindialog.ui.h
index 3634b8436f..72e4d22b78 100644
--- a/tests/auto/tools/uic/baseline/plugindialog.ui.h
+++ b/tests/auto/tools/uic/baseline/plugindialog.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'plugindialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -111,11 +111,11 @@ public:
void retranslateUi(QDialog *PluginDialog)
{
- PluginDialog->setWindowTitle(QApplication::translate("PluginDialog", "Plugin Information", nullptr));
- label->setText(QApplication::translate("PluginDialog", "TextLabel", nullptr));
+ PluginDialog->setWindowTitle(QCoreApplication::translate("PluginDialog", "Plugin Information", nullptr));
+ label->setText(QCoreApplication::translate("PluginDialog", "TextLabel", nullptr));
QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem();
- ___qtreewidgetitem->setText(0, QApplication::translate("PluginDialog", "1", nullptr));
- message->setText(QApplication::translate("PluginDialog", "TextLabel", nullptr));
+ ___qtreewidgetitem->setText(0, QCoreApplication::translate("PluginDialog", "1", nullptr));
+ message->setText(QCoreApplication::translate("PluginDialog", "TextLabel", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/preferencesdialog.ui.h b/tests/auto/tools/uic/baseline/preferencesdialog.ui.h
index 289e6775b4..c4002eaff7 100644
--- a/tests/auto/tools/uic/baseline/preferencesdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/preferencesdialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'preferencesdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -150,11 +150,11 @@ public:
void retranslateUi(QDialog *PreferencesDialog)
{
- PreferencesDialog->setWindowTitle(QApplication::translate("PreferencesDialog", "Preferences", nullptr));
- m_uiModeGroupBox->setTitle(QApplication::translate("PreferencesDialog", "User Interface Mode", nullptr));
- m_templatePathGroupBox->setTitle(QApplication::translate("PreferencesDialog", "Additional Template Paths", nullptr));
- m_addTemplatePathButton->setText(QApplication::translate("PreferencesDialog", "...", nullptr));
- m_removeTemplatePathButton->setText(QApplication::translate("PreferencesDialog", "...", nullptr));
+ PreferencesDialog->setWindowTitle(QCoreApplication::translate("PreferencesDialog", "Preferences", nullptr));
+ m_uiModeGroupBox->setTitle(QCoreApplication::translate("PreferencesDialog", "User Interface Mode", nullptr));
+ m_templatePathGroupBox->setTitle(QCoreApplication::translate("PreferencesDialog", "Additional Template Paths", nullptr));
+ m_addTemplatePathButton->setText(QCoreApplication::translate("PreferencesDialog", "...", nullptr));
+ m_removeTemplatePathButton->setText(QCoreApplication::translate("PreferencesDialog", "...", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h b/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h
index 3c729b9c65..71e8605832 100644
--- a/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h
+++ b/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'previewconfigurationwidget.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -108,14 +108,14 @@ public:
void retranslateUi(QGroupBox *PreviewConfigurationWidget)
{
- PreviewConfigurationWidget->setWindowTitle(QApplication::translate("PreviewConfigurationWidget", "Form", nullptr));
- PreviewConfigurationWidget->setTitle(QApplication::translate("PreviewConfigurationWidget", "Print/Preview Configuration", nullptr));
- m_styleLabel->setText(QApplication::translate("PreviewConfigurationWidget", "Style", nullptr));
- m_appStyleSheetLabel->setText(QApplication::translate("PreviewConfigurationWidget", "Style sheet", nullptr));
- m_appStyleSheetChangeButton->setText(QApplication::translate("PreviewConfigurationWidget", "...", nullptr));
- m_appStyleSheetClearButton->setText(QApplication::translate("PreviewConfigurationWidget", "...", nullptr));
- m_skinLabel->setText(QApplication::translate("PreviewConfigurationWidget", "Device skin", nullptr));
- m_skinRemoveButton->setText(QApplication::translate("PreviewConfigurationWidget", "...", nullptr));
+ PreviewConfigurationWidget->setWindowTitle(QCoreApplication::translate("PreviewConfigurationWidget", "Form", nullptr));
+ PreviewConfigurationWidget->setTitle(QCoreApplication::translate("PreviewConfigurationWidget", "Print/Preview Configuration", nullptr));
+ m_styleLabel->setText(QCoreApplication::translate("PreviewConfigurationWidget", "Style", nullptr));
+ m_appStyleSheetLabel->setText(QCoreApplication::translate("PreviewConfigurationWidget", "Style sheet", nullptr));
+ m_appStyleSheetChangeButton->setText(QCoreApplication::translate("PreviewConfigurationWidget", "...", nullptr));
+ m_appStyleSheetClearButton->setText(QCoreApplication::translate("PreviewConfigurationWidget", "...", nullptr));
+ m_skinLabel->setText(QCoreApplication::translate("PreviewConfigurationWidget", "Device skin", nullptr));
+ m_skinRemoveButton->setText(QCoreApplication::translate("PreviewConfigurationWidget", "...", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/previewdialogbase.ui.h b/tests/auto/tools/uic/baseline/previewdialogbase.ui.h
index 8d4c0dae9f..5ff155de13 100644
--- a/tests/auto/tools/uic/baseline/previewdialogbase.ui.h
+++ b/tests/auto/tools/uic/baseline/previewdialogbase.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'previewdialogbase.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -70,7 +70,7 @@ public:
paperSizeCombo = new QComboBox(PreviewDialogBase);
paperSizeCombo->setObjectName(QString::fromUtf8("paperSizeCombo"));
- QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(1), static_cast<QSizePolicy::Policy>(0));
+ QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(paperSizeCombo->sizePolicy().hasHeightForWidth());
@@ -115,7 +115,7 @@ public:
previewArea = new QScrollArea(PreviewDialogBase);
previewArea->setObjectName(QString::fromUtf8("previewArea"));
- QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(5));
+ QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy1.setHorizontalStretch(1);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(previewArea->sizePolicy().hasHeightForWidth());
@@ -135,7 +135,7 @@ public:
progressBar = new QProgressBar(PreviewDialogBase);
progressBar->setObjectName(QString::fromUtf8("progressBar"));
progressBar->setEnabled(false);
- QSizePolicy sizePolicy2(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(0));
+ QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Fixed);
sizePolicy2.setHorizontalStretch(1);
sizePolicy2.setVerticalStretch(0);
sizePolicy2.setHeightForWidth(progressBar->sizePolicy().hasHeightForWidth());
@@ -156,10 +156,10 @@ public:
vboxLayout->addLayout(hboxLayout2);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
label->setBuddy(paperSizeCombo);
label_2->setBuddy(paperOrientationCombo);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
retranslateUi(PreviewDialogBase);
QObject::connect(buttonBox, SIGNAL(accepted()), PreviewDialogBase, SLOT(accept()));
@@ -170,11 +170,11 @@ public:
void retranslateUi(QDialog *PreviewDialogBase)
{
- PreviewDialogBase->setWindowTitle(QApplication::translate("PreviewDialogBase", "Print Preview", nullptr));
- label->setText(QApplication::translate("PreviewDialogBase", "&Paper Size:", nullptr));
- label_2->setText(QApplication::translate("PreviewDialogBase", "&Orientation:", nullptr));
+ PreviewDialogBase->setWindowTitle(QCoreApplication::translate("PreviewDialogBase", "Print Preview", nullptr));
+ label->setText(QCoreApplication::translate("PreviewDialogBase", "&Paper Size:", nullptr));
+ label_2->setText(QCoreApplication::translate("PreviewDialogBase", "&Orientation:", nullptr));
QTreeWidgetItem *___qtreewidgetitem = pageList->headerItem();
- ___qtreewidgetitem->setText(0, QApplication::translate("PreviewDialogBase", "1", nullptr));
+ ___qtreewidgetitem->setText(0, QCoreApplication::translate("PreviewDialogBase", "1", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/previewwidget.ui.h b/tests/auto/tools/uic/baseline/previewwidget.ui.h
index 6e359416c8..47563587fb 100644
--- a/tests/auto/tools/uic/baseline/previewwidget.ui.h
+++ b/tests/auto/tools/uic/baseline/previewwidget.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'previewwidget.ui'
**
-** Created by: Qt User Interface Compiler version 5.10.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -92,7 +92,7 @@ public:
if (qdesigner_internal__PreviewWidget->objectName().isEmpty())
qdesigner_internal__PreviewWidget->setObjectName(QString::fromUtf8("qdesigner_internal__PreviewWidget"));
qdesigner_internal__PreviewWidget->resize(471, 251);
- QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(1), static_cast<QSizePolicy::Policy>(1));
+ QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(qdesigner_internal__PreviewWidget->sizePolicy().hasHeightForWidth());
@@ -235,18 +235,18 @@ public:
void retranslateUi(QWidget *qdesigner_internal__PreviewWidget)
{
- qdesigner_internal__PreviewWidget->setWindowTitle(QApplication::translate("qdesigner_internal::PreviewWidget", "Preview Window", nullptr));
- LineEdit1->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "LineEdit", nullptr));
- ComboBox1->setItemText(0, QApplication::translate("qdesigner_internal::PreviewWidget", "ComboBox", nullptr));
-
- PushButton1->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "PushButton", nullptr));
- ButtonGroup2->setTitle(QApplication::translate("qdesigner_internal::PreviewWidget", "ButtonGroup2", nullptr));
- CheckBox1->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "CheckBox1", nullptr));
- CheckBox2->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "CheckBox2", nullptr));
- ButtonGroup1->setTitle(QApplication::translate("qdesigner_internal::PreviewWidget", "ButtonGroup", nullptr));
- RadioButton1->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton1", nullptr));
- RadioButton2->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton2", nullptr));
- RadioButton3->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton3", nullptr));
+ qdesigner_internal__PreviewWidget->setWindowTitle(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "Preview Window", nullptr));
+ LineEdit1->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "LineEdit", nullptr));
+ ComboBox1->setItemText(0, QCoreApplication::translate("qdesigner_internal::PreviewWidget", "ComboBox", nullptr));
+
+ PushButton1->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "PushButton", nullptr));
+ ButtonGroup2->setTitle(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "ButtonGroup2", nullptr));
+ CheckBox1->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "CheckBox1", nullptr));
+ CheckBox2->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "CheckBox2", nullptr));
+ ButtonGroup1->setTitle(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "ButtonGroup", nullptr));
+ RadioButton1->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton1", nullptr));
+ RadioButton2->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton2", nullptr));
+ RadioButton3->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton3", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/proxy.ui.h b/tests/auto/tools/uic/baseline/proxy.ui.h
index a1bc287190..1ecea389f3 100644
--- a/tests/auto/tools/uic/baseline/proxy.ui.h
+++ b/tests/auto/tools/uic/baseline/proxy.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'proxy.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -87,11 +87,11 @@ public:
void retranslateUi(QDialog *ProxyDialog)
{
- ProxyDialog->setWindowTitle(QApplication::translate("ProxyDialog", "Proxy Authentication", nullptr));
- iconLabel->setText(QApplication::translate("ProxyDialog", "ICON", nullptr));
- introLabel->setText(QApplication::translate("ProxyDialog", "Connect to proxy", nullptr));
- usernameLabel->setText(QApplication::translate("ProxyDialog", "Username:", nullptr));
- passwordLabel->setText(QApplication::translate("ProxyDialog", "Password:", nullptr));
+ ProxyDialog->setWindowTitle(QCoreApplication::translate("ProxyDialog", "Proxy Authentication", nullptr));
+ iconLabel->setText(QCoreApplication::translate("ProxyDialog", "ICON", nullptr));
+ introLabel->setText(QCoreApplication::translate("ProxyDialog", "Connect to proxy", nullptr));
+ usernameLabel->setText(QCoreApplication::translate("ProxyDialog", "Username:", nullptr));
+ passwordLabel->setText(QCoreApplication::translate("ProxyDialog", "Password:", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/qfiledialog.ui.h b/tests/auto/tools/uic/baseline/qfiledialog.ui.h
index 53607db449..9e51ee6a7c 100644
--- a/tests/auto/tools/uic/baseline/qfiledialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qfiledialog.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'qfiledialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -271,26 +271,26 @@ public:
void retranslateUi(QDialog *QFileDialog)
{
- lookInLabel->setText(QApplication::translate("QFileDialog", "Look in:", nullptr));
-#ifndef QT_NO_TOOLTIP
- backButton->setToolTip(QApplication::translate("QFileDialog", "Back", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- forwardButton->setToolTip(QApplication::translate("QFileDialog", "Forward", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- toParentButton->setToolTip(QApplication::translate("QFileDialog", "Parent Directory", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- newFolderButton->setToolTip(QApplication::translate("QFileDialog", "Create New Folder", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- listModeButton->setToolTip(QApplication::translate("QFileDialog", "List View", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- detailModeButton->setToolTip(QApplication::translate("QFileDialog", "Detail View", nullptr));
-#endif // QT_NO_TOOLTIP
- fileTypeLabel->setText(QApplication::translate("QFileDialog", "Files of type:", nullptr));
+ lookInLabel->setText(QCoreApplication::translate("QFileDialog", "Look in:", nullptr));
+#if QT_CONFIG(tooltip)
+ backButton->setToolTip(QCoreApplication::translate("QFileDialog", "Back", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ forwardButton->setToolTip(QCoreApplication::translate("QFileDialog", "Forward", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ toParentButton->setToolTip(QCoreApplication::translate("QFileDialog", "Parent Directory", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ newFolderButton->setToolTip(QCoreApplication::translate("QFileDialog", "Create New Folder", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ listModeButton->setToolTip(QCoreApplication::translate("QFileDialog", "List View", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ detailModeButton->setToolTip(QCoreApplication::translate("QFileDialog", "Detail View", nullptr));
+#endif // QT_CONFIG(tooltip)
+ fileTypeLabel->setText(QCoreApplication::translate("QFileDialog", "Files of type:", nullptr));
Q_UNUSED(QFileDialog);
} // retranslateUi
diff --git a/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h b/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h
index a5379bc468..d21d6da972 100644
--- a/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h
+++ b/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h
@@ -290,12 +290,12 @@ public:
gridLayout_3->addItem(verticalSpacer, 6, 0, 1, 1);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
pageSizeLabel->setBuddy(pageSizeCombo);
widthLabel->setBuddy(pageWidth);
heightLabel->setBuddy(pageHeight);
paperSourceLabel->setBuddy(paperSource);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
retranslateUi(QPageSetupWidget);
@@ -304,45 +304,45 @@ public:
void retranslateUi(QWidget *QPageSetupWidget)
{
- QPageSetupWidget->setWindowTitle(QApplication::translate("QPageSetupWidget", "Form", nullptr));
- groupBox_2->setTitle(QApplication::translate("QPageSetupWidget", "Paper", nullptr));
- pageSizeLabel->setText(QApplication::translate("QPageSetupWidget", "Page size:", nullptr));
- widthLabel->setText(QApplication::translate("QPageSetupWidget", "Width:", nullptr));
- heightLabel->setText(QApplication::translate("QPageSetupWidget", "Height:", nullptr));
- paperSourceLabel->setText(QApplication::translate("QPageSetupWidget", "Paper source:", nullptr));
- groupBox_3->setTitle(QApplication::translate("QPageSetupWidget", "Orientation", nullptr));
- portrait->setText(QApplication::translate("QPageSetupWidget", "Portrait", nullptr));
- landscape->setText(QApplication::translate("QPageSetupWidget", "Landscape", nullptr));
- reverseLandscape->setText(QApplication::translate("QPageSetupWidget", "Reverse landscape", nullptr));
- reversePortrait->setText(QApplication::translate("QPageSetupWidget", "Reverse portrait", nullptr));
- groupBox->setTitle(QApplication::translate("QPageSetupWidget", "Margins", nullptr));
-#ifndef QT_NO_TOOLTIP
- topMargin->setToolTip(QApplication::translate("QPageSetupWidget", "top margin", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_ACCESSIBILITY
- topMargin->setAccessibleName(QApplication::translate("QPageSetupWidget", "top margin", nullptr));
-#endif // QT_NO_ACCESSIBILITY
-#ifndef QT_NO_TOOLTIP
- leftMargin->setToolTip(QApplication::translate("QPageSetupWidget", "left margin", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_ACCESSIBILITY
- leftMargin->setAccessibleName(QApplication::translate("QPageSetupWidget", "left margin", nullptr));
-#endif // QT_NO_ACCESSIBILITY
-#ifndef QT_NO_TOOLTIP
- rightMargin->setToolTip(QApplication::translate("QPageSetupWidget", "right margin", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_ACCESSIBILITY
- rightMargin->setAccessibleName(QApplication::translate("QPageSetupWidget", "right margin", nullptr));
-#endif // QT_NO_ACCESSIBILITY
-#ifndef QT_NO_TOOLTIP
- bottomMargin->setToolTip(QApplication::translate("QPageSetupWidget", "bottom margin", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_ACCESSIBILITY
- bottomMargin->setAccessibleName(QApplication::translate("QPageSetupWidget", "bottom margin", nullptr));
-#endif // QT_NO_ACCESSIBILITY
- pagesPerSheetButtonGroup->setTitle(QApplication::translate("QPageSetupWidget", "Page Layout", nullptr));
- label->setText(QApplication::translate("QPageSetupWidget", "Page order:", nullptr));
- label_2->setText(QApplication::translate("QPageSetupWidget", "Pages per sheet:", nullptr));
+ QPageSetupWidget->setWindowTitle(QCoreApplication::translate("QPageSetupWidget", "Form", nullptr));
+ groupBox_2->setTitle(QCoreApplication::translate("QPageSetupWidget", "Paper", nullptr));
+ pageSizeLabel->setText(QCoreApplication::translate("QPageSetupWidget", "Page size:", nullptr));
+ widthLabel->setText(QCoreApplication::translate("QPageSetupWidget", "Width:", nullptr));
+ heightLabel->setText(QCoreApplication::translate("QPageSetupWidget", "Height:", nullptr));
+ paperSourceLabel->setText(QCoreApplication::translate("QPageSetupWidget", "Paper source:", nullptr));
+ groupBox_3->setTitle(QCoreApplication::translate("QPageSetupWidget", "Orientation", nullptr));
+ portrait->setText(QCoreApplication::translate("QPageSetupWidget", "Portrait", nullptr));
+ landscape->setText(QCoreApplication::translate("QPageSetupWidget", "Landscape", nullptr));
+ reverseLandscape->setText(QCoreApplication::translate("QPageSetupWidget", "Reverse landscape", nullptr));
+ reversePortrait->setText(QCoreApplication::translate("QPageSetupWidget", "Reverse portrait", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("QPageSetupWidget", "Margins", nullptr));
+#if QT_CONFIG(tooltip)
+ topMargin->setToolTip(QCoreApplication::translate("QPageSetupWidget", "top margin", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(accessibility)
+ topMargin->setAccessibleName(QCoreApplication::translate("QPageSetupWidget", "top margin", nullptr));
+#endif // QT_CONFIG(accessibility)
+#if QT_CONFIG(tooltip)
+ leftMargin->setToolTip(QCoreApplication::translate("QPageSetupWidget", "left margin", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(accessibility)
+ leftMargin->setAccessibleName(QCoreApplication::translate("QPageSetupWidget", "left margin", nullptr));
+#endif // QT_CONFIG(accessibility)
+#if QT_CONFIG(tooltip)
+ rightMargin->setToolTip(QCoreApplication::translate("QPageSetupWidget", "right margin", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(accessibility)
+ rightMargin->setAccessibleName(QCoreApplication::translate("QPageSetupWidget", "right margin", nullptr));
+#endif // QT_CONFIG(accessibility)
+#if QT_CONFIG(tooltip)
+ bottomMargin->setToolTip(QCoreApplication::translate("QPageSetupWidget", "bottom margin", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(accessibility)
+ bottomMargin->setAccessibleName(QCoreApplication::translate("QPageSetupWidget", "bottom margin", nullptr));
+#endif // QT_CONFIG(accessibility)
+ pagesPerSheetButtonGroup->setTitle(QCoreApplication::translate("QPageSetupWidget", "Page Layout", nullptr));
+ label->setText(QCoreApplication::translate("QPageSetupWidget", "Page order:", nullptr));
+ label_2->setText(QCoreApplication::translate("QPageSetupWidget", "Pages per sheet:", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h b/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h
index 8626a9fc3c..f0e06548b5 100644
--- a/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h
+++ b/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qprintpropertieswidget.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -79,9 +79,9 @@ public:
void retranslateUi(QWidget *QPrintPropertiesWidget)
{
- QPrintPropertiesWidget->setWindowTitle(QApplication::translate("QPrintPropertiesWidget", "Form", nullptr));
- tabs->setTabText(tabs->indexOf(tabPage), QApplication::translate("QPrintPropertiesWidget", "Page", nullptr));
- tabs->setTabText(tabs->indexOf(cupsPropertiesPage), QApplication::translate("QPrintPropertiesWidget", "Advanced", nullptr));
+ QPrintPropertiesWidget->setWindowTitle(QCoreApplication::translate("QPrintPropertiesWidget", "Form", nullptr));
+ tabs->setTabText(tabs->indexOf(tabPage), QCoreApplication::translate("QPrintPropertiesWidget", "Page", nullptr));
+ tabs->setTabText(tabs->indexOf(cupsPropertiesPage), QCoreApplication::translate("QPrintPropertiesWidget", "Advanced", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h b/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h
index 656b5f9deb..3d37a55548 100644
--- a/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h
+++ b/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qprintsettingsoutput.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -260,9 +260,9 @@ public:
horizontalLayout_2->addWidget(tabs);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
label->setBuddy(copies);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
retranslateUi(QPrintSettingsOutput);
QObject::connect(printRange, SIGNAL(toggled(bool)), from, SLOT(setEnabled(bool)));
@@ -276,25 +276,25 @@ public:
void retranslateUi(QWidget *QPrintSettingsOutput)
{
- QPrintSettingsOutput->setWindowTitle(QApplication::translate("QPrintSettingsOutput", "Form", nullptr));
- gbPrintRange->setTitle(QApplication::translate("QPrintSettingsOutput", "Print range", nullptr));
- printAll->setText(QApplication::translate("QPrintSettingsOutput", "Print all", nullptr));
- printRange->setText(QApplication::translate("QPrintSettingsOutput", "Pages from", nullptr));
- label_3->setText(QApplication::translate("QPrintSettingsOutput", "to", nullptr));
- printSelection->setText(QApplication::translate("QPrintSettingsOutput", "Selection", nullptr));
- groupBox->setTitle(QApplication::translate("QPrintSettingsOutput", "Output Settings", nullptr));
- label->setText(QApplication::translate("QPrintSettingsOutput", "Copies:", nullptr));
- collate->setText(QApplication::translate("QPrintSettingsOutput", "Collate", nullptr));
- reverse->setText(QApplication::translate("QPrintSettingsOutput", "Reverse", nullptr));
- tabs->setTabText(tabs->indexOf(copiesTab), QApplication::translate("QPrintSettingsOutput", "Copies", nullptr));
- colorMode->setTitle(QApplication::translate("QPrintSettingsOutput", "Color Mode", nullptr));
- color->setText(QApplication::translate("QPrintSettingsOutput", "Color", nullptr));
- grayscale->setText(QApplication::translate("QPrintSettingsOutput", "Grayscale", nullptr));
- duplex->setTitle(QApplication::translate("QPrintSettingsOutput", "Duplex Printing", nullptr));
- noDuplex->setText(QApplication::translate("QPrintSettingsOutput", "None", nullptr));
- duplexLong->setText(QApplication::translate("QPrintSettingsOutput", "Long side", nullptr));
- duplexShort->setText(QApplication::translate("QPrintSettingsOutput", "Short side", nullptr));
- tabs->setTabText(tabs->indexOf(optionsTab), QApplication::translate("QPrintSettingsOutput", "Options", nullptr));
+ QPrintSettingsOutput->setWindowTitle(QCoreApplication::translate("QPrintSettingsOutput", "Form", nullptr));
+ gbPrintRange->setTitle(QCoreApplication::translate("QPrintSettingsOutput", "Print range", nullptr));
+ printAll->setText(QCoreApplication::translate("QPrintSettingsOutput", "Print all", nullptr));
+ printRange->setText(QCoreApplication::translate("QPrintSettingsOutput", "Pages from", nullptr));
+ label_3->setText(QCoreApplication::translate("QPrintSettingsOutput", "to", nullptr));
+ printSelection->setText(QCoreApplication::translate("QPrintSettingsOutput", "Selection", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("QPrintSettingsOutput", "Output Settings", nullptr));
+ label->setText(QCoreApplication::translate("QPrintSettingsOutput", "Copies:", nullptr));
+ collate->setText(QCoreApplication::translate("QPrintSettingsOutput", "Collate", nullptr));
+ reverse->setText(QCoreApplication::translate("QPrintSettingsOutput", "Reverse", nullptr));
+ tabs->setTabText(tabs->indexOf(copiesTab), QCoreApplication::translate("QPrintSettingsOutput", "Copies", nullptr));
+ colorMode->setTitle(QCoreApplication::translate("QPrintSettingsOutput", "Color Mode", nullptr));
+ color->setText(QCoreApplication::translate("QPrintSettingsOutput", "Color", nullptr));
+ grayscale->setText(QCoreApplication::translate("QPrintSettingsOutput", "Grayscale", nullptr));
+ duplex->setTitle(QCoreApplication::translate("QPrintSettingsOutput", "Duplex Printing", nullptr));
+ noDuplex->setText(QCoreApplication::translate("QPrintSettingsOutput", "None", nullptr));
+ duplexLong->setText(QCoreApplication::translate("QPrintSettingsOutput", "Long side", nullptr));
+ duplexShort->setText(QCoreApplication::translate("QPrintSettingsOutput", "Short side", nullptr));
+ tabs->setTabText(tabs->indexOf(optionsTab), QCoreApplication::translate("QPrintSettingsOutput", "Options", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/qprintwidget.ui.h b/tests/auto/tools/uic/baseline/qprintwidget.ui.h
index 04b05143c6..5b1d921173 100644
--- a/tests/auto/tools/uic/baseline/qprintwidget.ui.h
+++ b/tests/auto/tools/uic/baseline/qprintwidget.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qprintwidget.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -128,10 +128,10 @@ public:
horizontalLayout_2->addWidget(printerGroup);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
label->setBuddy(printers);
lOutput->setBuddy(filename);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
retranslateUi(QPrintWidget);
@@ -140,15 +140,15 @@ public:
void retranslateUi(QWidget *QPrintWidget)
{
- QPrintWidget->setWindowTitle(QApplication::translate("QPrintWidget", "Form", nullptr));
- printerGroup->setTitle(QApplication::translate("QPrintWidget", "Printer", nullptr));
- label->setText(QApplication::translate("QPrintWidget", "&Name:", nullptr));
- properties->setText(QApplication::translate("QPrintWidget", "P&roperties", nullptr));
- label_2->setText(QApplication::translate("QPrintWidget", "Location:", nullptr));
- preview->setText(QApplication::translate("QPrintWidget", "Preview", nullptr));
- label_3->setText(QApplication::translate("QPrintWidget", "Type:", nullptr));
- lOutput->setText(QApplication::translate("QPrintWidget", "Output &file:", nullptr));
- fileBrowser->setText(QApplication::translate("QPrintWidget", "...", nullptr));
+ QPrintWidget->setWindowTitle(QCoreApplication::translate("QPrintWidget", "Form", nullptr));
+ printerGroup->setTitle(QCoreApplication::translate("QPrintWidget", "Printer", nullptr));
+ label->setText(QCoreApplication::translate("QPrintWidget", "&Name:", nullptr));
+ properties->setText(QCoreApplication::translate("QPrintWidget", "P&roperties", nullptr));
+ label_2->setText(QCoreApplication::translate("QPrintWidget", "Location:", nullptr));
+ preview->setText(QCoreApplication::translate("QPrintWidget", "Preview", nullptr));
+ label_3->setText(QCoreApplication::translate("QPrintWidget", "Type:", nullptr));
+ lOutput->setText(QCoreApplication::translate("QPrintWidget", "Output &file:", nullptr));
+ fileBrowser->setText(QCoreApplication::translate("QPrintWidget", "...", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h b/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h
index 2131bc6d9b..681c1f97da 100644
--- a/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qsqlconnectiondialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -179,14 +179,14 @@ public:
vboxLayout->addLayout(hboxLayout1);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
textLabel4->setBuddy(editUsername);
textLabel2->setBuddy(comboDriver);
textLabel3->setBuddy(editDatabase);
textLabel5->setBuddy(editHostname);
textLabel5_2->setBuddy(portSpinBox);
textLabel4_2->setBuddy(editPassword);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
QWidget::setTabOrder(comboDriver, editDatabase);
QWidget::setTabOrder(editDatabase, editUsername);
QWidget::setTabOrder(editUsername, editPassword);
@@ -206,18 +206,18 @@ public:
void retranslateUi(QDialog *QSqlConnectionDialogUi)
{
- QSqlConnectionDialogUi->setWindowTitle(QApplication::translate("QSqlConnectionDialogUi", "Connect...", nullptr));
- connGroupBox->setTitle(QApplication::translate("QSqlConnectionDialogUi", "Connection settings", nullptr));
- textLabel4->setText(QApplication::translate("QSqlConnectionDialogUi", "&Username:", nullptr));
- textLabel2->setText(QApplication::translate("QSqlConnectionDialogUi", "D&river", nullptr));
- portSpinBox->setSpecialValueText(QApplication::translate("QSqlConnectionDialogUi", "Default", nullptr));
- textLabel3->setText(QApplication::translate("QSqlConnectionDialogUi", "Database Name:", nullptr));
- textLabel5->setText(QApplication::translate("QSqlConnectionDialogUi", "&Hostname:", nullptr));
- textLabel5_2->setText(QApplication::translate("QSqlConnectionDialogUi", "P&ort:", nullptr));
- textLabel4_2->setText(QApplication::translate("QSqlConnectionDialogUi", "&Password:", nullptr));
- dbCheckBox->setText(QApplication::translate("QSqlConnectionDialogUi", "Us&e predefined in-memory database", nullptr));
- okButton->setText(QApplication::translate("QSqlConnectionDialogUi", "&OK", nullptr));
- cancelButton->setText(QApplication::translate("QSqlConnectionDialogUi", "&Cancel", nullptr));
+ QSqlConnectionDialogUi->setWindowTitle(QCoreApplication::translate("QSqlConnectionDialogUi", "Connect...", nullptr));
+ connGroupBox->setTitle(QCoreApplication::translate("QSqlConnectionDialogUi", "Connection settings", nullptr));
+ textLabel4->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "&Username:", nullptr));
+ textLabel2->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "D&river", nullptr));
+ portSpinBox->setSpecialValueText(QCoreApplication::translate("QSqlConnectionDialogUi", "Default", nullptr));
+ textLabel3->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "Database Name:", nullptr));
+ textLabel5->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "&Hostname:", nullptr));
+ textLabel5_2->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "P&ort:", nullptr));
+ textLabel4_2->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "&Password:", nullptr));
+ dbCheckBox->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "Us&e predefined in-memory database", nullptr));
+ okButton->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "&OK", nullptr));
+ cancelButton->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "&Cancel", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h
index 805f70e60d..5c09962572 100644
--- a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'qtgradientdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -89,7 +89,7 @@ public:
void retranslateUi(QDialog *QtGradientDialog)
{
- QtGradientDialog->setWindowTitle(QApplication::translate("QtGradientDialog", "Edit Gradient", nullptr));
+ QtGradientDialog->setWindowTitle(QCoreApplication::translate("QtGradientDialog", "Edit Gradient", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h
index 9db07f35ac..7ca14d6ef4 100644
--- a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h
@@ -583,119 +583,119 @@ public:
void retranslateUi(QWidget *QtGradientEditor)
{
- QtGradientEditor->setWindowTitle(QApplication::translate("QtGradientEditor", "Form", nullptr));
-#ifndef QT_NO_TOOLTIP
- gradientWidget->setToolTip(QApplication::translate("QtGradientEditor", "Gradient Editor", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_WHATSTHIS
- gradientWidget->setWhatsThis(QApplication::translate("QtGradientEditor", "This area shows a preview of the gradient being edited. It also allows you to edit parameters specific to the gradient's type such as start and final point, radius, etc. by drag & drop.", nullptr));
-#endif // QT_NO_WHATSTHIS
- label1->setText(QApplication::translate("QtGradientEditor", "1", nullptr));
- label2->setText(QApplication::translate("QtGradientEditor", "2", nullptr));
- label3->setText(QApplication::translate("QtGradientEditor", "3", nullptr));
- label4->setText(QApplication::translate("QtGradientEditor", "4", nullptr));
- label5->setText(QApplication::translate("QtGradientEditor", "5", nullptr));
-#ifndef QT_NO_TOOLTIP
- gradientStopsWidget->setToolTip(QApplication::translate("QtGradientEditor", "Gradient Stops Editor", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_WHATSTHIS
- gradientStopsWidget->setWhatsThis(QApplication::translate("QtGradientEditor", "This area allows you to edit gradient stops. Double click on the existing stop handle to duplicate it. Double click outside of the existing stop handles to create a new stop. Drag & drop the handle to reposition it. Use right mouse button to popup context menu with extra actions.", nullptr));
-#endif // QT_NO_WHATSTHIS
- zoomLabel->setText(QApplication::translate("QtGradientEditor", "Zoom", nullptr));
-#ifndef QT_NO_TOOLTIP
- zoomAllButton->setToolTip(QApplication::translate("QtGradientEditor", "Reset Zoom", nullptr));
-#endif // QT_NO_TOOLTIP
- zoomAllButton->setText(QApplication::translate("QtGradientEditor", "Reset Zoom", nullptr));
- positionLabel->setText(QApplication::translate("QtGradientEditor", "Position", nullptr));
-#ifndef QT_NO_TOOLTIP
- hLabel->setToolTip(QApplication::translate("QtGradientEditor", "Hue", nullptr));
-#endif // QT_NO_TOOLTIP
- hLabel->setText(QApplication::translate("QtGradientEditor", "H", nullptr));
-#ifndef QT_NO_TOOLTIP
- hueColorLine->setToolTip(QApplication::translate("QtGradientEditor", "Hue", nullptr));
-#endif // QT_NO_TOOLTIP
- hueLabel->setText(QApplication::translate("QtGradientEditor", "Hue", nullptr));
-#ifndef QT_NO_TOOLTIP
- sLabel->setToolTip(QApplication::translate("QtGradientEditor", "Saturation", nullptr));
-#endif // QT_NO_TOOLTIP
- sLabel->setText(QApplication::translate("QtGradientEditor", "S", nullptr));
-#ifndef QT_NO_TOOLTIP
- saturationColorLine->setToolTip(QApplication::translate("QtGradientEditor", "Saturation", nullptr));
-#endif // QT_NO_TOOLTIP
- saturationLabel->setText(QApplication::translate("QtGradientEditor", "Sat", nullptr));
-#ifndef QT_NO_TOOLTIP
- vLabel->setToolTip(QApplication::translate("QtGradientEditor", "Value", nullptr));
-#endif // QT_NO_TOOLTIP
- vLabel->setText(QApplication::translate("QtGradientEditor", "V", nullptr));
-#ifndef QT_NO_TOOLTIP
- valueColorLine->setToolTip(QApplication::translate("QtGradientEditor", "Value", nullptr));
-#endif // QT_NO_TOOLTIP
- valueLabel->setText(QApplication::translate("QtGradientEditor", "Val", nullptr));
-#ifndef QT_NO_TOOLTIP
- aLabel->setToolTip(QApplication::translate("QtGradientEditor", "Alpha", nullptr));
-#endif // QT_NO_TOOLTIP
- aLabel->setText(QApplication::translate("QtGradientEditor", "A", nullptr));
-#ifndef QT_NO_TOOLTIP
- alphaColorLine->setToolTip(QApplication::translate("QtGradientEditor", "Alpha", nullptr));
-#endif // QT_NO_TOOLTIP
- alphaLabel->setText(QApplication::translate("QtGradientEditor", "Alpha", nullptr));
-#ifndef QT_NO_TOOLTIP
- typeComboBox->setToolTip(QApplication::translate("QtGradientEditor", "Type", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- spreadComboBox->setToolTip(QApplication::translate("QtGradientEditor", "Spread", nullptr));
-#endif // QT_NO_TOOLTIP
- colorLabel->setText(QApplication::translate("QtGradientEditor", "Color", nullptr));
-#ifndef QT_NO_TOOLTIP
- colorButton->setToolTip(QApplication::translate("QtGradientEditor", "Current stop's color", nullptr));
-#endif // QT_NO_TOOLTIP
+ QtGradientEditor->setWindowTitle(QCoreApplication::translate("QtGradientEditor", "Form", nullptr));
+#if QT_CONFIG(tooltip)
+ gradientWidget->setToolTip(QCoreApplication::translate("QtGradientEditor", "Gradient Editor", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(whatsthis)
+ gradientWidget->setWhatsThis(QCoreApplication::translate("QtGradientEditor", "This area shows a preview of the gradient being edited. It also allows you to edit parameters specific to the gradient's type such as start and final point, radius, etc. by drag & drop.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ label1->setText(QCoreApplication::translate("QtGradientEditor", "1", nullptr));
+ label2->setText(QCoreApplication::translate("QtGradientEditor", "2", nullptr));
+ label3->setText(QCoreApplication::translate("QtGradientEditor", "3", nullptr));
+ label4->setText(QCoreApplication::translate("QtGradientEditor", "4", nullptr));
+ label5->setText(QCoreApplication::translate("QtGradientEditor", "5", nullptr));
+#if QT_CONFIG(tooltip)
+ gradientStopsWidget->setToolTip(QCoreApplication::translate("QtGradientEditor", "Gradient Stops Editor", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(whatsthis)
+ gradientStopsWidget->setWhatsThis(QCoreApplication::translate("QtGradientEditor", "This area allows you to edit gradient stops. Double click on the existing stop handle to duplicate it. Double click outside of the existing stop handles to create a new stop. Drag & drop the handle to reposition it. Use right mouse button to popup context menu with extra actions.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ zoomLabel->setText(QCoreApplication::translate("QtGradientEditor", "Zoom", nullptr));
+#if QT_CONFIG(tooltip)
+ zoomAllButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Reset Zoom", nullptr));
+#endif // QT_CONFIG(tooltip)
+ zoomAllButton->setText(QCoreApplication::translate("QtGradientEditor", "Reset Zoom", nullptr));
+ positionLabel->setText(QCoreApplication::translate("QtGradientEditor", "Position", nullptr));
+#if QT_CONFIG(tooltip)
+ hLabel->setToolTip(QCoreApplication::translate("QtGradientEditor", "Hue", nullptr));
+#endif // QT_CONFIG(tooltip)
+ hLabel->setText(QCoreApplication::translate("QtGradientEditor", "H", nullptr));
+#if QT_CONFIG(tooltip)
+ hueColorLine->setToolTip(QCoreApplication::translate("QtGradientEditor", "Hue", nullptr));
+#endif // QT_CONFIG(tooltip)
+ hueLabel->setText(QCoreApplication::translate("QtGradientEditor", "Hue", nullptr));
+#if QT_CONFIG(tooltip)
+ sLabel->setToolTip(QCoreApplication::translate("QtGradientEditor", "Saturation", nullptr));
+#endif // QT_CONFIG(tooltip)
+ sLabel->setText(QCoreApplication::translate("QtGradientEditor", "S", nullptr));
+#if QT_CONFIG(tooltip)
+ saturationColorLine->setToolTip(QCoreApplication::translate("QtGradientEditor", "Saturation", nullptr));
+#endif // QT_CONFIG(tooltip)
+ saturationLabel->setText(QCoreApplication::translate("QtGradientEditor", "Sat", nullptr));
+#if QT_CONFIG(tooltip)
+ vLabel->setToolTip(QCoreApplication::translate("QtGradientEditor", "Value", nullptr));
+#endif // QT_CONFIG(tooltip)
+ vLabel->setText(QCoreApplication::translate("QtGradientEditor", "V", nullptr));
+#if QT_CONFIG(tooltip)
+ valueColorLine->setToolTip(QCoreApplication::translate("QtGradientEditor", "Value", nullptr));
+#endif // QT_CONFIG(tooltip)
+ valueLabel->setText(QCoreApplication::translate("QtGradientEditor", "Val", nullptr));
+#if QT_CONFIG(tooltip)
+ aLabel->setToolTip(QCoreApplication::translate("QtGradientEditor", "Alpha", nullptr));
+#endif // QT_CONFIG(tooltip)
+ aLabel->setText(QCoreApplication::translate("QtGradientEditor", "A", nullptr));
+#if QT_CONFIG(tooltip)
+ alphaColorLine->setToolTip(QCoreApplication::translate("QtGradientEditor", "Alpha", nullptr));
+#endif // QT_CONFIG(tooltip)
+ alphaLabel->setText(QCoreApplication::translate("QtGradientEditor", "Alpha", nullptr));
+#if QT_CONFIG(tooltip)
+ typeComboBox->setToolTip(QCoreApplication::translate("QtGradientEditor", "Type", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ spreadComboBox->setToolTip(QCoreApplication::translate("QtGradientEditor", "Spread", nullptr));
+#endif // QT_CONFIG(tooltip)
+ colorLabel->setText(QCoreApplication::translate("QtGradientEditor", "Color", nullptr));
+#if QT_CONFIG(tooltip)
+ colorButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Current stop's color", nullptr));
+#endif // QT_CONFIG(tooltip)
colorButton->setText(QString());
-#ifndef QT_NO_TOOLTIP
- hsvRadioButton->setToolTip(QApplication::translate("QtGradientEditor", "Show HSV specification", nullptr));
-#endif // QT_NO_TOOLTIP
- hsvRadioButton->setText(QApplication::translate("QtGradientEditor", "HSV", nullptr));
-#ifndef QT_NO_TOOLTIP
- rgbRadioButton->setToolTip(QApplication::translate("QtGradientEditor", "Show RGB specification", nullptr));
-#endif // QT_NO_TOOLTIP
- rgbRadioButton->setText(QApplication::translate("QtGradientEditor", "RGB", nullptr));
-#ifndef QT_NO_TOOLTIP
- positionSpinBox->setToolTip(QApplication::translate("QtGradientEditor", "Current stop's position", nullptr));
-#endif // QT_NO_TOOLTIP
- zoomSpinBox->setSuffix(QApplication::translate("QtGradientEditor", "%", nullptr));
-#ifndef QT_NO_TOOLTIP
- zoomInButton->setToolTip(QApplication::translate("QtGradientEditor", "Zoom In", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- zoomOutButton->setToolTip(QApplication::translate("QtGradientEditor", "Zoom Out", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- detailsButton->setToolTip(QApplication::translate("QtGradientEditor", "Toggle details extension", nullptr));
-#endif // QT_NO_TOOLTIP
- detailsButton->setText(QApplication::translate("QtGradientEditor", ">", nullptr));
-#ifndef QT_NO_TOOLTIP
- linearButton->setToolTip(QApplication::translate("QtGradientEditor", "Linear Type", nullptr));
-#endif // QT_NO_TOOLTIP
- linearButton->setText(QApplication::translate("QtGradientEditor", "...", nullptr));
-#ifndef QT_NO_TOOLTIP
- radialButton->setToolTip(QApplication::translate("QtGradientEditor", "Radial Type", nullptr));
-#endif // QT_NO_TOOLTIP
- radialButton->setText(QApplication::translate("QtGradientEditor", "...", nullptr));
-#ifndef QT_NO_TOOLTIP
- conicalButton->setToolTip(QApplication::translate("QtGradientEditor", "Conical Type", nullptr));
-#endif // QT_NO_TOOLTIP
- conicalButton->setText(QApplication::translate("QtGradientEditor", "...", nullptr));
-#ifndef QT_NO_TOOLTIP
- padButton->setToolTip(QApplication::translate("QtGradientEditor", "Pad Spread", nullptr));
-#endif // QT_NO_TOOLTIP
- padButton->setText(QApplication::translate("QtGradientEditor", "...", nullptr));
-#ifndef QT_NO_TOOLTIP
- repeatButton->setToolTip(QApplication::translate("QtGradientEditor", "Repeat Spread", nullptr));
-#endif // QT_NO_TOOLTIP
- repeatButton->setText(QApplication::translate("QtGradientEditor", "...", nullptr));
-#ifndef QT_NO_TOOLTIP
- reflectButton->setToolTip(QApplication::translate("QtGradientEditor", "Reflect Spread", nullptr));
-#endif // QT_NO_TOOLTIP
- reflectButton->setText(QApplication::translate("QtGradientEditor", "...", nullptr));
+#if QT_CONFIG(tooltip)
+ hsvRadioButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Show HSV specification", nullptr));
+#endif // QT_CONFIG(tooltip)
+ hsvRadioButton->setText(QCoreApplication::translate("QtGradientEditor", "HSV", nullptr));
+#if QT_CONFIG(tooltip)
+ rgbRadioButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Show RGB specification", nullptr));
+#endif // QT_CONFIG(tooltip)
+ rgbRadioButton->setText(QCoreApplication::translate("QtGradientEditor", "RGB", nullptr));
+#if QT_CONFIG(tooltip)
+ positionSpinBox->setToolTip(QCoreApplication::translate("QtGradientEditor", "Current stop's position", nullptr));
+#endif // QT_CONFIG(tooltip)
+ zoomSpinBox->setSuffix(QCoreApplication::translate("QtGradientEditor", "%", nullptr));
+#if QT_CONFIG(tooltip)
+ zoomInButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Zoom In", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ zoomOutButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Zoom Out", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ detailsButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Toggle details extension", nullptr));
+#endif // QT_CONFIG(tooltip)
+ detailsButton->setText(QCoreApplication::translate("QtGradientEditor", ">", nullptr));
+#if QT_CONFIG(tooltip)
+ linearButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Linear Type", nullptr));
+#endif // QT_CONFIG(tooltip)
+ linearButton->setText(QCoreApplication::translate("QtGradientEditor", "...", nullptr));
+#if QT_CONFIG(tooltip)
+ radialButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Radial Type", nullptr));
+#endif // QT_CONFIG(tooltip)
+ radialButton->setText(QCoreApplication::translate("QtGradientEditor", "...", nullptr));
+#if QT_CONFIG(tooltip)
+ conicalButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Conical Type", nullptr));
+#endif // QT_CONFIG(tooltip)
+ conicalButton->setText(QCoreApplication::translate("QtGradientEditor", "...", nullptr));
+#if QT_CONFIG(tooltip)
+ padButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Pad Spread", nullptr));
+#endif // QT_CONFIG(tooltip)
+ padButton->setText(QCoreApplication::translate("QtGradientEditor", "...", nullptr));
+#if QT_CONFIG(tooltip)
+ repeatButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Repeat Spread", nullptr));
+#endif // QT_CONFIG(tooltip)
+ repeatButton->setText(QCoreApplication::translate("QtGradientEditor", "...", nullptr));
+#if QT_CONFIG(tooltip)
+ reflectButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Reflect Spread", nullptr));
+#endif // QT_CONFIG(tooltip)
+ reflectButton->setText(QCoreApplication::translate("QtGradientEditor", "...", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/qtgradientview.ui.h b/tests/auto/tools/uic/baseline/qtgradientview.ui.h
index aa3c03b02f..494324b00f 100644
--- a/tests/auto/tools/uic/baseline/qtgradientview.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradientview.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qtgradientview.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -105,11 +105,11 @@ public:
void retranslateUi(QWidget *QtGradientView)
{
- QtGradientView->setWindowTitle(QApplication::translate("QtGradientView", "Gradient View", nullptr));
- newButton->setText(QApplication::translate("QtGradientView", "New...", nullptr));
- editButton->setText(QApplication::translate("QtGradientView", "Edit...", nullptr));
- renameButton->setText(QApplication::translate("QtGradientView", "Rename", nullptr));
- removeButton->setText(QApplication::translate("QtGradientView", "Remove", nullptr));
+ QtGradientView->setWindowTitle(QCoreApplication::translate("QtGradientView", "Gradient View", nullptr));
+ newButton->setText(QCoreApplication::translate("QtGradientView", "New...", nullptr));
+ editButton->setText(QCoreApplication::translate("QtGradientView", "Edit...", nullptr));
+ renameButton->setText(QCoreApplication::translate("QtGradientView", "Rename", nullptr));
+ removeButton->setText(QCoreApplication::translate("QtGradientView", "Remove", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h
index e6d98ed4f0..f6369c8c5f 100644
--- a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'qtgradientviewdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -89,7 +89,7 @@ public:
void retranslateUi(QDialog *QtGradientViewDialog)
{
- QtGradientViewDialog->setWindowTitle(QApplication::translate("QtGradientViewDialog", "Select Gradient", nullptr));
+ QtGradientViewDialog->setWindowTitle(QCoreApplication::translate("QtGradientViewDialog", "Select Gradient", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h b/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h
index 6a8c9c7172..7428778a9c 100644
--- a/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qtresourceeditordialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -141,25 +141,25 @@ public:
void retranslateUi(QDialog *QtResourceEditorDialog)
{
- QtResourceEditorDialog->setWindowTitle(QApplication::translate("QtResourceEditorDialog", "Dialog", nullptr));
-#ifndef QT_NO_TOOLTIP
- newQrcButton->setToolTip(QApplication::translate("QtResourceEditorDialog", "New File", nullptr));
-#endif // QT_NO_TOOLTIP
- newQrcButton->setText(QApplication::translate("QtResourceEditorDialog", "N", nullptr));
-#ifndef QT_NO_TOOLTIP
- removeQrcButton->setToolTip(QApplication::translate("QtResourceEditorDialog", "Remove File", nullptr));
-#endif // QT_NO_TOOLTIP
- removeQrcButton->setText(QApplication::translate("QtResourceEditorDialog", "R", nullptr));
- importQrcButton->setText(QApplication::translate("QtResourceEditorDialog", "I", nullptr));
-#ifndef QT_NO_TOOLTIP
- newResourceButton->setToolTip(QApplication::translate("QtResourceEditorDialog", "New Resource", nullptr));
-#endif // QT_NO_TOOLTIP
- newResourceButton->setText(QApplication::translate("QtResourceEditorDialog", "N", nullptr));
- addResourceButton->setText(QApplication::translate("QtResourceEditorDialog", "A", nullptr));
-#ifndef QT_NO_TOOLTIP
- removeResourceButton->setToolTip(QApplication::translate("QtResourceEditorDialog", "Remove Resource or File", nullptr));
-#endif // QT_NO_TOOLTIP
- removeResourceButton->setText(QApplication::translate("QtResourceEditorDialog", "R", nullptr));
+ QtResourceEditorDialog->setWindowTitle(QCoreApplication::translate("QtResourceEditorDialog", "Dialog", nullptr));
+#if QT_CONFIG(tooltip)
+ newQrcButton->setToolTip(QCoreApplication::translate("QtResourceEditorDialog", "New File", nullptr));
+#endif // QT_CONFIG(tooltip)
+ newQrcButton->setText(QCoreApplication::translate("QtResourceEditorDialog", "N", nullptr));
+#if QT_CONFIG(tooltip)
+ removeQrcButton->setToolTip(QCoreApplication::translate("QtResourceEditorDialog", "Remove File", nullptr));
+#endif // QT_CONFIG(tooltip)
+ removeQrcButton->setText(QCoreApplication::translate("QtResourceEditorDialog", "R", nullptr));
+ importQrcButton->setText(QCoreApplication::translate("QtResourceEditorDialog", "I", nullptr));
+#if QT_CONFIG(tooltip)
+ newResourceButton->setToolTip(QCoreApplication::translate("QtResourceEditorDialog", "New Resource", nullptr));
+#endif // QT_CONFIG(tooltip)
+ newResourceButton->setText(QCoreApplication::translate("QtResourceEditorDialog", "N", nullptr));
+ addResourceButton->setText(QCoreApplication::translate("QtResourceEditorDialog", "A", nullptr));
+#if QT_CONFIG(tooltip)
+ removeResourceButton->setToolTip(QCoreApplication::translate("QtResourceEditorDialog", "Remove Resource or File", nullptr));
+#endif // QT_CONFIG(tooltip)
+ removeResourceButton->setText(QCoreApplication::translate("QtResourceEditorDialog", "R", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h b/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h
index e893386d9b..bfaeb99af2 100644
--- a/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h
+++ b/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'qttoolbardialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -178,40 +178,40 @@ public:
void retranslateUi(QDialog *QtToolBarDialog)
{
- QtToolBarDialog->setWindowTitle(QApplication::translate("QtToolBarDialog", "Customize Toolbars", nullptr));
+ QtToolBarDialog->setWindowTitle(QCoreApplication::translate("QtToolBarDialog", "Customize Toolbars", nullptr));
QTreeWidgetItem *___qtreewidgetitem = actionTree->headerItem();
- ___qtreewidgetitem->setText(0, QApplication::translate("QtToolBarDialog", "1", nullptr));
- label->setText(QApplication::translate("QtToolBarDialog", "Actions", nullptr));
- label_2->setText(QApplication::translate("QtToolBarDialog", "Toolbars", nullptr));
-#ifndef QT_NO_TOOLTIP
- newButton->setToolTip(QApplication::translate("QtToolBarDialog", "Add new toolbar", nullptr));
-#endif // QT_NO_TOOLTIP
- newButton->setText(QApplication::translate("QtToolBarDialog", "New", nullptr));
-#ifndef QT_NO_TOOLTIP
- removeButton->setToolTip(QApplication::translate("QtToolBarDialog", "Remove selected toolbar", nullptr));
-#endif // QT_NO_TOOLTIP
- removeButton->setText(QApplication::translate("QtToolBarDialog", "Remove", nullptr));
-#ifndef QT_NO_TOOLTIP
- renameButton->setToolTip(QApplication::translate("QtToolBarDialog", "Rename toolbar", nullptr));
-#endif // QT_NO_TOOLTIP
- renameButton->setText(QApplication::translate("QtToolBarDialog", "Rename", nullptr));
-#ifndef QT_NO_TOOLTIP
- upButton->setToolTip(QApplication::translate("QtToolBarDialog", "Move action up", nullptr));
-#endif // QT_NO_TOOLTIP
- upButton->setText(QApplication::translate("QtToolBarDialog", "Up", nullptr));
-#ifndef QT_NO_TOOLTIP
- leftButton->setToolTip(QApplication::translate("QtToolBarDialog", "Remove action from toolbar", nullptr));
-#endif // QT_NO_TOOLTIP
- leftButton->setText(QApplication::translate("QtToolBarDialog", "<-", nullptr));
-#ifndef QT_NO_TOOLTIP
- rightButton->setToolTip(QApplication::translate("QtToolBarDialog", "Add action to toolbar", nullptr));
-#endif // QT_NO_TOOLTIP
- rightButton->setText(QApplication::translate("QtToolBarDialog", "->", nullptr));
-#ifndef QT_NO_TOOLTIP
- downButton->setToolTip(QApplication::translate("QtToolBarDialog", "Move action down", nullptr));
-#endif // QT_NO_TOOLTIP
- downButton->setText(QApplication::translate("QtToolBarDialog", "Down", nullptr));
- label_3->setText(QApplication::translate("QtToolBarDialog", "Current Toolbar Actions", nullptr));
+ ___qtreewidgetitem->setText(0, QCoreApplication::translate("QtToolBarDialog", "1", nullptr));
+ label->setText(QCoreApplication::translate("QtToolBarDialog", "Actions", nullptr));
+ label_2->setText(QCoreApplication::translate("QtToolBarDialog", "Toolbars", nullptr));
+#if QT_CONFIG(tooltip)
+ newButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Add new toolbar", nullptr));
+#endif // QT_CONFIG(tooltip)
+ newButton->setText(QCoreApplication::translate("QtToolBarDialog", "New", nullptr));
+#if QT_CONFIG(tooltip)
+ removeButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Remove selected toolbar", nullptr));
+#endif // QT_CONFIG(tooltip)
+ removeButton->setText(QCoreApplication::translate("QtToolBarDialog", "Remove", nullptr));
+#if QT_CONFIG(tooltip)
+ renameButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Rename toolbar", nullptr));
+#endif // QT_CONFIG(tooltip)
+ renameButton->setText(QCoreApplication::translate("QtToolBarDialog", "Rename", nullptr));
+#if QT_CONFIG(tooltip)
+ upButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Move action up", nullptr));
+#endif // QT_CONFIG(tooltip)
+ upButton->setText(QCoreApplication::translate("QtToolBarDialog", "Up", nullptr));
+#if QT_CONFIG(tooltip)
+ leftButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Remove action from toolbar", nullptr));
+#endif // QT_CONFIG(tooltip)
+ leftButton->setText(QCoreApplication::translate("QtToolBarDialog", "<-", nullptr));
+#if QT_CONFIG(tooltip)
+ rightButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Add action to toolbar", nullptr));
+#endif // QT_CONFIG(tooltip)
+ rightButton->setText(QCoreApplication::translate("QtToolBarDialog", "->", nullptr));
+#if QT_CONFIG(tooltip)
+ downButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Move action down", nullptr));
+#endif // QT_CONFIG(tooltip)
+ downButton->setText(QCoreApplication::translate("QtToolBarDialog", "Down", nullptr));
+ label_3->setText(QCoreApplication::translate("QtToolBarDialog", "Current Toolbar Actions", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/querywidget.ui.h b/tests/auto/tools/uic/baseline/querywidget.ui.h
index 81516722d5..a92c60f4fe 100644
--- a/tests/auto/tools/uic/baseline/querywidget.ui.h
+++ b/tests/auto/tools/uic/baseline/querywidget.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'querywidget.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -153,10 +153,10 @@ public:
void retranslateUi(QMainWindow *QueryWidget)
{
- QueryWidget->setWindowTitle(QApplication::translate("QueryWidget", "Recipes XQuery Example", nullptr));
- inputGroupBox->setTitle(QApplication::translate("QueryWidget", "Input Document", nullptr));
- queryGroupBox->setTitle(QApplication::translate("QueryWidget", "Select your query:", nullptr));
- outputGroupBox->setTitle(QApplication::translate("QueryWidget", "Output Document", nullptr));
+ QueryWidget->setWindowTitle(QCoreApplication::translate("QueryWidget", "Recipes XQuery Example", nullptr));
+ inputGroupBox->setTitle(QCoreApplication::translate("QueryWidget", "Input Document", nullptr));
+ queryGroupBox->setTitle(QCoreApplication::translate("QueryWidget", "Select your query:", nullptr));
+ outputGroupBox->setTitle(QCoreApplication::translate("QueryWidget", "Output Document", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/remotecontrol.ui.h b/tests/auto/tools/uic/baseline/remotecontrol.ui.h
index 5893ff42af..5b7c6c42c2 100644
--- a/tests/auto/tools/uic/baseline/remotecontrol.ui.h
+++ b/tests/auto/tools/uic/baseline/remotecontrol.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'remotecontrol.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -222,22 +222,22 @@ public:
void retranslateUi(QMainWindow *RemoteControlClass)
{
- RemoteControlClass->setWindowTitle(QApplication::translate("RemoteControlClass", "RemoteControl", nullptr));
- actionQuit->setText(QApplication::translate("RemoteControlClass", "Quit", nullptr));
- label->setText(QApplication::translate("RemoteControlClass", "Start URL:", nullptr));
- launchButton->setText(QApplication::translate("RemoteControlClass", "Launch Qt HelpViewer", nullptr));
- actionGroupBox->setTitle(QApplication::translate("RemoteControlClass", "Actions", nullptr));
- label_2->setText(QApplication::translate("RemoteControlClass", "Search in Index:", nullptr));
+ RemoteControlClass->setWindowTitle(QCoreApplication::translate("RemoteControlClass", "RemoteControl", nullptr));
+ actionQuit->setText(QCoreApplication::translate("RemoteControlClass", "Quit", nullptr));
+ label->setText(QCoreApplication::translate("RemoteControlClass", "Start URL:", nullptr));
+ launchButton->setText(QCoreApplication::translate("RemoteControlClass", "Launch Qt HelpViewer", nullptr));
+ actionGroupBox->setTitle(QCoreApplication::translate("RemoteControlClass", "Actions", nullptr));
+ label_2->setText(QCoreApplication::translate("RemoteControlClass", "Search in Index:", nullptr));
indexButton->setText(QString());
- label_4->setText(QApplication::translate("RemoteControlClass", "Identifier:", nullptr));
+ label_4->setText(QCoreApplication::translate("RemoteControlClass", "Identifier:", nullptr));
identifierButton->setText(QString());
- label_3->setText(QApplication::translate("RemoteControlClass", "Show URL:", nullptr));
+ label_3->setText(QCoreApplication::translate("RemoteControlClass", "Show URL:", nullptr));
urlButton->setText(QString());
- syncContentsButton->setText(QApplication::translate("RemoteControlClass", "Sync Contents", nullptr));
- contentsCheckBox->setText(QApplication::translate("RemoteControlClass", "Show Contents", nullptr));
- indexCheckBox->setText(QApplication::translate("RemoteControlClass", "Show Index", nullptr));
- bookmarksCheckBox->setText(QApplication::translate("RemoteControlClass", "Show Bookmarks", nullptr));
- menuFile->setTitle(QApplication::translate("RemoteControlClass", "File", nullptr));
+ syncContentsButton->setText(QCoreApplication::translate("RemoteControlClass", "Sync Contents", nullptr));
+ contentsCheckBox->setText(QCoreApplication::translate("RemoteControlClass", "Show Contents", nullptr));
+ indexCheckBox->setText(QCoreApplication::translate("RemoteControlClass", "Show Index", nullptr));
+ bookmarksCheckBox->setText(QCoreApplication::translate("RemoteControlClass", "Show Bookmarks", nullptr));
+ menuFile->setTitle(QCoreApplication::translate("RemoteControlClass", "File", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h
index 9ef6eedb4c..6829958463 100644
--- a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h
+++ b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'saveformastemplate.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -117,10 +117,10 @@ public:
vboxLayout->addWidget(buttonBox);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
label->setBuddy(templateNameEdit);
label_2->setBuddy(categoryCombo);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
retranslateUi(SaveFormAsTemplate);
QObject::connect(buttonBox, SIGNAL(accepted()), SaveFormAsTemplate, SLOT(accept()));
@@ -131,10 +131,10 @@ public:
void retranslateUi(QDialog *SaveFormAsTemplate)
{
- SaveFormAsTemplate->setWindowTitle(QApplication::translate("SaveFormAsTemplate", "Save Form As Template", nullptr));
- label->setText(QApplication::translate("SaveFormAsTemplate", "&Name:", nullptr));
+ SaveFormAsTemplate->setWindowTitle(QCoreApplication::translate("SaveFormAsTemplate", "Save Form As Template", nullptr));
+ label->setText(QCoreApplication::translate("SaveFormAsTemplate", "&Name:", nullptr));
templateNameEdit->setText(QString());
- label_2->setText(QApplication::translate("SaveFormAsTemplate", "&Category:", nullptr));
+ label_2->setText(QCoreApplication::translate("SaveFormAsTemplate", "&Category:", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/settings.ui.h b/tests/auto/tools/uic/baseline/settings.ui.h
index cc680c8033..6a1adb2d2c 100644
--- a/tests/auto/tools/uic/baseline/settings.ui.h
+++ b/tests/auto/tools/uic/baseline/settings.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'settings.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -182,13 +182,13 @@ public:
void retranslateUi(QDialog *Dialog)
{
- Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", nullptr));
- label->setText(QApplication::translate("Dialog", "Audio device:", nullptr));
- label_6->setText(QApplication::translate("Dialog", "Audio effect:", nullptr));
- crossFadeLabel->setText(QApplication::translate("Dialog", "Cross fade:", nullptr));
- label_3->setText(QApplication::translate("Dialog", "-10 Sec", nullptr));
- label_5->setText(QApplication::translate("Dialog", "0", nullptr));
- label_4->setText(QApplication::translate("Dialog", "10 Sec", nullptr));
+ Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Dialog", nullptr));
+ label->setText(QCoreApplication::translate("Dialog", "Audio device:", nullptr));
+ label_6->setText(QCoreApplication::translate("Dialog", "Audio effect:", nullptr));
+ crossFadeLabel->setText(QCoreApplication::translate("Dialog", "Cross fade:", nullptr));
+ label_3->setText(QCoreApplication::translate("Dialog", "-10 Sec", nullptr));
+ label_5->setText(QCoreApplication::translate("Dialog", "0", nullptr));
+ label_4->setText(QCoreApplication::translate("Dialog", "10 Sec", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/signalslotdialog.ui.h b/tests/auto/tools/uic/baseline/signalslotdialog.ui.h
index 5833a25a8b..143e281a24 100644
--- a/tests/auto/tools/uic/baseline/signalslotdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/signalslotdialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'signalslotdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -133,25 +133,25 @@ public:
void retranslateUi(QDialog *SignalSlotDialogClass)
{
- SignalSlotDialogClass->setWindowTitle(QApplication::translate("SignalSlotDialogClass", "Signals and slots", nullptr));
- slotGroupBox->setTitle(QApplication::translate("SignalSlotDialogClass", "Slots", nullptr));
-#ifndef QT_NO_TOOLTIP
- addSlotButton->setToolTip(QApplication::translate("SignalSlotDialogClass", "Add", nullptr));
-#endif // QT_NO_TOOLTIP
- addSlotButton->setText(QApplication::translate("SignalSlotDialogClass", "...", nullptr));
-#ifndef QT_NO_TOOLTIP
- removeSlotButton->setToolTip(QApplication::translate("SignalSlotDialogClass", "Delete", nullptr));
-#endif // QT_NO_TOOLTIP
- removeSlotButton->setText(QApplication::translate("SignalSlotDialogClass", "...", nullptr));
- signalGroupBox->setTitle(QApplication::translate("SignalSlotDialogClass", "Signals", nullptr));
-#ifndef QT_NO_TOOLTIP
- addSignalButton->setToolTip(QApplication::translate("SignalSlotDialogClass", "Add", nullptr));
-#endif // QT_NO_TOOLTIP
- addSignalButton->setText(QApplication::translate("SignalSlotDialogClass", "...", nullptr));
-#ifndef QT_NO_TOOLTIP
- removeSignalButton->setToolTip(QApplication::translate("SignalSlotDialogClass", "Delete", nullptr));
-#endif // QT_NO_TOOLTIP
- removeSignalButton->setText(QApplication::translate("SignalSlotDialogClass", "...", nullptr));
+ SignalSlotDialogClass->setWindowTitle(QCoreApplication::translate("SignalSlotDialogClass", "Signals and slots", nullptr));
+ slotGroupBox->setTitle(QCoreApplication::translate("SignalSlotDialogClass", "Slots", nullptr));
+#if QT_CONFIG(tooltip)
+ addSlotButton->setToolTip(QCoreApplication::translate("SignalSlotDialogClass", "Add", nullptr));
+#endif // QT_CONFIG(tooltip)
+ addSlotButton->setText(QCoreApplication::translate("SignalSlotDialogClass", "...", nullptr));
+#if QT_CONFIG(tooltip)
+ removeSlotButton->setToolTip(QCoreApplication::translate("SignalSlotDialogClass", "Delete", nullptr));
+#endif // QT_CONFIG(tooltip)
+ removeSlotButton->setText(QCoreApplication::translate("SignalSlotDialogClass", "...", nullptr));
+ signalGroupBox->setTitle(QCoreApplication::translate("SignalSlotDialogClass", "Signals", nullptr));
+#if QT_CONFIG(tooltip)
+ addSignalButton->setToolTip(QCoreApplication::translate("SignalSlotDialogClass", "Add", nullptr));
+#endif // QT_CONFIG(tooltip)
+ addSignalButton->setText(QCoreApplication::translate("SignalSlotDialogClass", "...", nullptr));
+#if QT_CONFIG(tooltip)
+ removeSignalButton->setToolTip(QCoreApplication::translate("SignalSlotDialogClass", "Delete", nullptr));
+#endif // QT_CONFIG(tooltip)
+ removeSignalButton->setText(QCoreApplication::translate("SignalSlotDialogClass", "...", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/sslclient.ui.h b/tests/auto/tools/uic/baseline/sslclient.ui.h
index 382889648e..755ea7827b 100644
--- a/tests/auto/tools/uic/baseline/sslclient.ui.h
+++ b/tests/auto/tools/uic/baseline/sslclient.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'sslclient.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -155,20 +155,20 @@ public:
void retranslateUi(QWidget *Form)
{
- Form->setWindowTitle(QApplication::translate("Form", "Secure Socket Client", nullptr));
- hostNameLabel->setText(QApplication::translate("Form", "Host name:", nullptr));
- hostNameEdit->setText(QApplication::translate("Form", "imap.example.com", nullptr));
- portLabel->setText(QApplication::translate("Form", "Port:", nullptr));
- connectButton->setText(QApplication::translate("Form", "Connect to host", nullptr));
- sessionBox->setTitle(QApplication::translate("Form", "Active session", nullptr));
- cipherText->setText(QApplication::translate("Form", "Cryptographic Cipher:", nullptr));
- cipherLabel->setText(QApplication::translate("Form", "<none>", nullptr));
- sessionOutput->setHtml(QApplication::translate("Form", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
+ Form->setWindowTitle(QCoreApplication::translate("Form", "Secure Socket Client", nullptr));
+ hostNameLabel->setText(QCoreApplication::translate("Form", "Host name:", nullptr));
+ hostNameEdit->setText(QCoreApplication::translate("Form", "imap.example.com", nullptr));
+ portLabel->setText(QCoreApplication::translate("Form", "Port:", nullptr));
+ connectButton->setText(QCoreApplication::translate("Form", "Connect to host", nullptr));
+ sessionBox->setTitle(QCoreApplication::translate("Form", "Active session", nullptr));
+ cipherText->setText(QCoreApplication::translate("Form", "Cryptographic Cipher:", nullptr));
+ cipherLabel->setText(QCoreApplication::translate("Form", "<none>", nullptr));
+ sessionOutput->setHtml(QCoreApplication::translate("Form", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p></body></html>", nullptr));
- sessionInputLabel->setText(QApplication::translate("Form", "Input:", nullptr));
- sendButton->setText(QApplication::translate("Form", "&Send", nullptr));
+ sessionInputLabel->setText(QCoreApplication::translate("Form", "Input:", nullptr));
+ sendButton->setText(QCoreApplication::translate("Form", "&Send", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/sslerrors.ui.h b/tests/auto/tools/uic/baseline/sslerrors.ui.h
index 04f21ded43..ac40fe8244 100644
--- a/tests/auto/tools/uic/baseline/sslerrors.ui.h
+++ b/tests/auto/tools/uic/baseline/sslerrors.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'sslerrors.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -86,14 +86,14 @@ public:
void retranslateUi(QDialog *SslErrors)
{
- SslErrors->setWindowTitle(QApplication::translate("SslErrors", "Unable To Validate The Connection", nullptr));
- label->setText(QApplication::translate("SslErrors", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
+ SslErrors->setWindowTitle(QCoreApplication::translate("SslErrors", "Unable To Validate The Connection", nullptr));
+ label->setText(QCoreApplication::translate("SslErrors", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600; color:#ff0000;\">Warning</span><span style=\" color:#ff0000;\">:</span><span style=\" color:#000000;\"> One or more errors with this connection prevent validating the authenticity of the host you are connecting to. Please review the following list of errors, and click </span><span style=\" color:#000000;\">Ignore</span><span style=\" color:#000000;\"> to continue, or </span><span style=\" color:#000000;\">Cancel</span><span style=\" color:#000000;\"> to abort the connection.</span></p></body></html>", nullptr));
- certificateChainButton->setText(QApplication::translate("SslErrors", "View Certificate Chain", nullptr));
- pushButton->setText(QApplication::translate("SslErrors", "Ignore", nullptr));
- pushButton_2->setText(QApplication::translate("SslErrors", "Cancel", nullptr));
+ certificateChainButton->setText(QCoreApplication::translate("SslErrors", "View Certificate Chain", nullptr));
+ pushButton->setText(QCoreApplication::translate("SslErrors", "Ignore", nullptr));
+ pushButton_2->setText(QCoreApplication::translate("SslErrors", "Cancel", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/statistics.ui.h b/tests/auto/tools/uic/baseline/statistics.ui.h
index 0b508836f2..6bbb6dbc32 100644
--- a/tests/auto/tools/uic/baseline/statistics.ui.h
+++ b/tests/auto/tools/uic/baseline/statistics.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'statistics.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -179,19 +179,19 @@ public:
void retranslateUi(QDialog *Statistics)
{
- Statistics->setWindowTitle(QApplication::translate("Statistics", "Statistics", nullptr));
- closeBtn->setText(QApplication::translate("Statistics", "&Close", nullptr));
- textLabel4->setText(QApplication::translate("Statistics", "Translation", nullptr));
- textLabel5->setText(QApplication::translate("Statistics", "Source", nullptr));
- untrWords->setText(QApplication::translate("Statistics", "0", nullptr));
- trWords->setText(QApplication::translate("Statistics", "0", nullptr));
- textLabel1->setText(QApplication::translate("Statistics", "Words:", nullptr));
- trChars->setText(QApplication::translate("Statistics", "0", nullptr));
- untrChars->setText(QApplication::translate("Statistics", "0", nullptr));
- textLabel3->setText(QApplication::translate("Statistics", "Characters:", nullptr));
- textLabel6->setText(QApplication::translate("Statistics", "Characters (with spaces):", nullptr));
- trCharsSpc->setText(QApplication::translate("Statistics", "0", nullptr));
- untrCharsSpc->setText(QApplication::translate("Statistics", "0", nullptr));
+ Statistics->setWindowTitle(QCoreApplication::translate("Statistics", "Statistics", nullptr));
+ closeBtn->setText(QCoreApplication::translate("Statistics", "&Close", nullptr));
+ textLabel4->setText(QCoreApplication::translate("Statistics", "Translation", nullptr));
+ textLabel5->setText(QCoreApplication::translate("Statistics", "Source", nullptr));
+ untrWords->setText(QCoreApplication::translate("Statistics", "0", nullptr));
+ trWords->setText(QCoreApplication::translate("Statistics", "0", nullptr));
+ textLabel1->setText(QCoreApplication::translate("Statistics", "Words:", nullptr));
+ trChars->setText(QCoreApplication::translate("Statistics", "0", nullptr));
+ untrChars->setText(QCoreApplication::translate("Statistics", "0", nullptr));
+ textLabel3->setText(QCoreApplication::translate("Statistics", "Characters:", nullptr));
+ textLabel6->setText(QCoreApplication::translate("Statistics", "Characters (with spaces):", nullptr));
+ trCharsSpc->setText(QCoreApplication::translate("Statistics", "0", nullptr));
+ untrCharsSpc->setText(QCoreApplication::translate("Statistics", "0", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h
index fd78ce91c1..91e7198793 100644
--- a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'stringlisteditor.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -201,9 +201,9 @@ public:
vboxLayout->addWidget(buttonBox);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
label->setBuddy(valueEdit);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
retranslateUi(qdesigner_internal__Dialog);
QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__Dialog, SLOT(accept()));
@@ -214,25 +214,25 @@ public:
void retranslateUi(QDialog *qdesigner_internal__Dialog)
{
- qdesigner_internal__Dialog->setWindowTitle(QApplication::translate("qdesigner_internal::Dialog", "Dialog", nullptr));
- groupBox->setTitle(QApplication::translate("qdesigner_internal::Dialog", "StringList", nullptr));
-#ifndef QT_NO_TOOLTIP
- newButton->setToolTip(QApplication::translate("qdesigner_internal::Dialog", "New String", nullptr));
-#endif // QT_NO_TOOLTIP
- newButton->setText(QApplication::translate("qdesigner_internal::Dialog", "&New", nullptr));
-#ifndef QT_NO_TOOLTIP
- deleteButton->setToolTip(QApplication::translate("qdesigner_internal::Dialog", "Delete String", nullptr));
-#endif // QT_NO_TOOLTIP
- deleteButton->setText(QApplication::translate("qdesigner_internal::Dialog", "&Delete", nullptr));
- label->setText(QApplication::translate("qdesigner_internal::Dialog", "&Value:", nullptr));
-#ifndef QT_NO_TOOLTIP
- upButton->setToolTip(QApplication::translate("qdesigner_internal::Dialog", "Move String Up", nullptr));
-#endif // QT_NO_TOOLTIP
- upButton->setText(QApplication::translate("qdesigner_internal::Dialog", "Up", nullptr));
-#ifndef QT_NO_TOOLTIP
- downButton->setToolTip(QApplication::translate("qdesigner_internal::Dialog", "Move String Down", nullptr));
-#endif // QT_NO_TOOLTIP
- downButton->setText(QApplication::translate("qdesigner_internal::Dialog", "Down", nullptr));
+ qdesigner_internal__Dialog->setWindowTitle(QCoreApplication::translate("qdesigner_internal::Dialog", "Dialog", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("qdesigner_internal::Dialog", "StringList", nullptr));
+#if QT_CONFIG(tooltip)
+ newButton->setToolTip(QCoreApplication::translate("qdesigner_internal::Dialog", "New String", nullptr));
+#endif // QT_CONFIG(tooltip)
+ newButton->setText(QCoreApplication::translate("qdesigner_internal::Dialog", "&New", nullptr));
+#if QT_CONFIG(tooltip)
+ deleteButton->setToolTip(QCoreApplication::translate("qdesigner_internal::Dialog", "Delete String", nullptr));
+#endif // QT_CONFIG(tooltip)
+ deleteButton->setText(QCoreApplication::translate("qdesigner_internal::Dialog", "&Delete", nullptr));
+ label->setText(QCoreApplication::translate("qdesigner_internal::Dialog", "&Value:", nullptr));
+#if QT_CONFIG(tooltip)
+ upButton->setToolTip(QCoreApplication::translate("qdesigner_internal::Dialog", "Move String Up", nullptr));
+#endif // QT_CONFIG(tooltip)
+ upButton->setText(QCoreApplication::translate("qdesigner_internal::Dialog", "Up", nullptr));
+#if QT_CONFIG(tooltip)
+ downButton->setToolTip(QCoreApplication::translate("qdesigner_internal::Dialog", "Move String Down", nullptr));
+#endif // QT_CONFIG(tooltip)
+ downButton->setText(QCoreApplication::translate("qdesigner_internal::Dialog", "Down", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h b/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h
index 5ae254ebab..ecca62c867 100644
--- a/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'stylesheeteditor.ui'
**
-** Created by: Qt User Interface Compiler version 5.10.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -73,7 +73,7 @@ public:
styleCombo = new QComboBox(StyleSheetEditor);
styleCombo->setObjectName(QString::fromUtf8("styleCombo"));
- QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0));
+ QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(styleCombo->sizePolicy().hasHeightForWidth());
@@ -83,7 +83,7 @@ public:
label_7 = new QLabel(StyleSheetEditor);
label_7->setObjectName(QString::fromUtf8("label_7"));
- QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(5));
+ QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Preferred);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(label_7->sizePolicy().hasHeightForWidth());
@@ -130,14 +130,14 @@ public:
void retranslateUi(QWidget *StyleSheetEditor)
{
- StyleSheetEditor->setWindowTitle(QApplication::translate("StyleSheetEditor", "Style Editor", nullptr));
- styleSheetCombo->setItemText(0, QApplication::translate("StyleSheetEditor", "Default", nullptr));
- styleSheetCombo->setItemText(1, QApplication::translate("StyleSheetEditor", "Coffee", nullptr));
- styleSheetCombo->setItemText(2, QApplication::translate("StyleSheetEditor", "Pagefold", nullptr));
-
- label_7->setText(QApplication::translate("StyleSheetEditor", "Style:", nullptr));
- applyButton->setText(QApplication::translate("StyleSheetEditor", "&Apply", nullptr));
- label_8->setText(QApplication::translate("StyleSheetEditor", "Style Sheet:", nullptr));
+ StyleSheetEditor->setWindowTitle(QCoreApplication::translate("StyleSheetEditor", "Style Editor", nullptr));
+ styleSheetCombo->setItemText(0, QCoreApplication::translate("StyleSheetEditor", "Default", nullptr));
+ styleSheetCombo->setItemText(1, QCoreApplication::translate("StyleSheetEditor", "Coffee", nullptr));
+ styleSheetCombo->setItemText(2, QCoreApplication::translate("StyleSheetEditor", "Pagefold", nullptr));
+
+ label_7->setText(QCoreApplication::translate("StyleSheetEditor", "Style:", nullptr));
+ applyButton->setText(QCoreApplication::translate("StyleSheetEditor", "&Apply", nullptr));
+ label_8->setText(QCoreApplication::translate("StyleSheetEditor", "Style Sheet:", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
index 09b230f5df..4be294af37 100644
--- a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
+++ b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'tabbedbrowser.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -117,7 +117,7 @@ public:
editFind = new QLineEdit(frameFind);
editFind->setObjectName(QString::fromUtf8("editFind"));
- QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0));
+ QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(editFind->sizePolicy().hasHeightForWidth());
@@ -181,14 +181,14 @@ public:
void retranslateUi(QWidget *TabbedBrowser)
{
- TabbedBrowser->setWindowTitle(QApplication::translate("TabbedBrowser", "TabbedBrowser", nullptr));
- tab->setTabText(tab->indexOf(frontpage), QApplication::translate("TabbedBrowser", "Untitled", nullptr));
+ TabbedBrowser->setWindowTitle(QCoreApplication::translate("TabbedBrowser", "TabbedBrowser", nullptr));
+ tab->setTabText(tab->indexOf(frontpage), QCoreApplication::translate("TabbedBrowser", "Untitled", nullptr));
toolClose->setText(QString());
- toolPrevious->setText(QApplication::translate("TabbedBrowser", "Previous", nullptr));
- toolNext->setText(QApplication::translate("TabbedBrowser", "Next", nullptr));
- checkCase->setText(QApplication::translate("TabbedBrowser", "Case Sensitive", nullptr));
- checkWholeWords->setText(QApplication::translate("TabbedBrowser", "Whole words", nullptr));
- labelWrapped->setText(QApplication::translate("TabbedBrowser", "<img src=\":/qt-project.org/assistant/images/wrap.png\">&nbsp;Search wrapped", nullptr));
+ toolPrevious->setText(QCoreApplication::translate("TabbedBrowser", "Previous", nullptr));
+ toolNext->setText(QCoreApplication::translate("TabbedBrowser", "Next", nullptr));
+ checkCase->setText(QCoreApplication::translate("TabbedBrowser", "Case Sensitive", nullptr));
+ checkWholeWords->setText(QCoreApplication::translate("TabbedBrowser", "Whole words", nullptr));
+ labelWrapped->setText(QCoreApplication::translate("TabbedBrowser", "<img src=\":/qt-project.org/assistant/images/wrap.png\">&nbsp;Search wrapped", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h
index e3ba00095e..4559bd910b 100644
--- a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'tablewidgeteditor.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -311,54 +311,54 @@ public:
void retranslateUi(QDialog *qdesigner_internal__TableWidgetEditor)
{
- qdesigner_internal__TableWidgetEditor->setWindowTitle(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Edit Table Widget", nullptr));
- itemsBox->setTitle(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Items", nullptr));
-#ifndef QT_NO_TOOLTIP
- tableWidget->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Items", nullptr));
-#endif // QT_NO_TOOLTIP
- label_3->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", nullptr));
- columnsBox->setTitle(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Columns", nullptr));
-#ifndef QT_NO_TOOLTIP
- columnsListWidget->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Columns", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- newColumnButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "New Column", nullptr));
-#endif // QT_NO_TOOLTIP
- newColumnButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "New", nullptr));
-#ifndef QT_NO_TOOLTIP
- deleteColumnButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete Column", nullptr));
-#endif // QT_NO_TOOLTIP
- deleteColumnButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete", nullptr));
-#ifndef QT_NO_TOOLTIP
- moveColumnUpButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Column Up", nullptr));
-#endif // QT_NO_TOOLTIP
- moveColumnUpButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "U", nullptr));
-#ifndef QT_NO_TOOLTIP
- moveColumnDownButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Column Down", nullptr));
-#endif // QT_NO_TOOLTIP
- moveColumnDownButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "D", nullptr));
- label->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", nullptr));
- rowsBox->setTitle(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Rows", nullptr));
-#ifndef QT_NO_TOOLTIP
- rowsListWidget->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Rows", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- newRowButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "New Row", nullptr));
-#endif // QT_NO_TOOLTIP
- newRowButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "New", nullptr));
-#ifndef QT_NO_TOOLTIP
- deleteRowButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete Row", nullptr));
-#endif // QT_NO_TOOLTIP
- deleteRowButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete", nullptr));
-#ifndef QT_NO_TOOLTIP
- moveRowUpButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Row Up", nullptr));
-#endif // QT_NO_TOOLTIP
- moveRowUpButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "U", nullptr));
-#ifndef QT_NO_TOOLTIP
- moveRowDownButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Row Down", nullptr));
-#endif // QT_NO_TOOLTIP
- moveRowDownButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "D", nullptr));
- label_2->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", nullptr));
+ qdesigner_internal__TableWidgetEditor->setWindowTitle(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Edit Table Widget", nullptr));
+ itemsBox->setTitle(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Items", nullptr));
+#if QT_CONFIG(tooltip)
+ tableWidget->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Items", nullptr));
+#endif // QT_CONFIG(tooltip)
+ label_3->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", nullptr));
+ columnsBox->setTitle(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Columns", nullptr));
+#if QT_CONFIG(tooltip)
+ columnsListWidget->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Columns", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ newColumnButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "New Column", nullptr));
+#endif // QT_CONFIG(tooltip)
+ newColumnButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "New", nullptr));
+#if QT_CONFIG(tooltip)
+ deleteColumnButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete Column", nullptr));
+#endif // QT_CONFIG(tooltip)
+ deleteColumnButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete", nullptr));
+#if QT_CONFIG(tooltip)
+ moveColumnUpButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Column Up", nullptr));
+#endif // QT_CONFIG(tooltip)
+ moveColumnUpButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "U", nullptr));
+#if QT_CONFIG(tooltip)
+ moveColumnDownButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Column Down", nullptr));
+#endif // QT_CONFIG(tooltip)
+ moveColumnDownButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "D", nullptr));
+ label->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", nullptr));
+ rowsBox->setTitle(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Rows", nullptr));
+#if QT_CONFIG(tooltip)
+ rowsListWidget->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Rows", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ newRowButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "New Row", nullptr));
+#endif // QT_CONFIG(tooltip)
+ newRowButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "New", nullptr));
+#if QT_CONFIG(tooltip)
+ deleteRowButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete Row", nullptr));
+#endif // QT_CONFIG(tooltip)
+ deleteRowButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete", nullptr));
+#if QT_CONFIG(tooltip)
+ moveRowUpButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Row Up", nullptr));
+#endif // QT_CONFIG(tooltip)
+ moveRowUpButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "U", nullptr));
+#if QT_CONFIG(tooltip)
+ moveRowDownButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Row Down", nullptr));
+#endif // QT_CONFIG(tooltip)
+ moveRowDownButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "D", nullptr));
+ label_2->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/tetrixwindow.ui.h b/tests/auto/tools/uic/baseline/tetrixwindow.ui.h
index dc1033ce3a..340acbd9f2 100644
--- a/tests/auto/tools/uic/baseline/tetrixwindow.ui.h
+++ b/tests/auto/tools/uic/baseline/tetrixwindow.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'tetrixwindow.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -147,15 +147,15 @@ public:
void retranslateUi(QWidget *TetrixWindow)
{
- TetrixWindow->setWindowTitle(QApplication::translate("TetrixWindow", "Tetrix", nullptr));
- startButton->setText(QApplication::translate("TetrixWindow", "&Start", nullptr));
- linesRemovedLabel->setText(QApplication::translate("TetrixWindow", "LINES REMOVED", nullptr));
- pauseButton->setText(QApplication::translate("TetrixWindow", "&Pause", nullptr));
- levelLabel->setText(QApplication::translate("TetrixWindow", "LEVEL", nullptr));
- nextLabel->setText(QApplication::translate("TetrixWindow", "NEXT", nullptr));
- scoreLabel->setText(QApplication::translate("TetrixWindow", "SCORE", nullptr));
+ TetrixWindow->setWindowTitle(QCoreApplication::translate("TetrixWindow", "Tetrix", nullptr));
+ startButton->setText(QCoreApplication::translate("TetrixWindow", "&Start", nullptr));
+ linesRemovedLabel->setText(QCoreApplication::translate("TetrixWindow", "LINES REMOVED", nullptr));
+ pauseButton->setText(QCoreApplication::translate("TetrixWindow", "&Pause", nullptr));
+ levelLabel->setText(QCoreApplication::translate("TetrixWindow", "LEVEL", nullptr));
+ nextLabel->setText(QCoreApplication::translate("TetrixWindow", "NEXT", nullptr));
+ scoreLabel->setText(QCoreApplication::translate("TetrixWindow", "SCORE", nullptr));
nextPieceLabel->setText(QString());
- quitButton->setText(QApplication::translate("TetrixWindow", "&Quit", nullptr));
+ quitButton->setText(QCoreApplication::translate("TetrixWindow", "&Quit", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/textfinder.ui.h b/tests/auto/tools/uic/baseline/textfinder.ui.h
index 2f6bfebf98..38bdf756c2 100644
--- a/tests/auto/tools/uic/baseline/textfinder.ui.h
+++ b/tests/auto/tools/uic/baseline/textfinder.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'textfinder.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -81,9 +81,9 @@ public:
vboxLayout->addItem(spacerItem);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
searchLabel->setBuddy(lineEdit);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
retranslateUi(Form);
QObject::connect(lineEdit, SIGNAL(returnPressed()), findButton, SLOT(animateClick()));
@@ -93,9 +93,9 @@ public:
void retranslateUi(QWidget *Form)
{
- Form->setWindowTitle(QApplication::translate("Form", "Find Text", nullptr));
- searchLabel->setText(QApplication::translate("Form", "&Keyword:", nullptr));
- findButton->setText(QApplication::translate("Form", "&Find", nullptr));
+ Form->setWindowTitle(QCoreApplication::translate("Form", "Find Text", nullptr));
+ searchLabel->setText(QCoreApplication::translate("Form", "&Keyword:", nullptr));
+ findButton->setText(QCoreApplication::translate("Form", "&Find", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/topicchooser.ui.h b/tests/auto/tools/uic/baseline/topicchooser.ui.h
index 90ec485e39..a89f62c4b5 100644
--- a/tests/auto/tools/uic/baseline/topicchooser.ui.h
+++ b/tests/auto/tools/uic/baseline/topicchooser.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'topicchooser.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -86,9 +86,9 @@ public:
vboxLayout->addWidget(Layout16);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
label->setBuddy(listWidget);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
retranslateUi(TopicChooser);
@@ -100,10 +100,10 @@ public:
void retranslateUi(QDialog *TopicChooser)
{
- TopicChooser->setWindowTitle(QApplication::translate("TopicChooser", "Choose Topic", nullptr));
- label->setText(QApplication::translate("TopicChooser", "&Topics", nullptr));
- buttonDisplay->setText(QApplication::translate("TopicChooser", "&Display", nullptr));
- buttonCancel->setText(QApplication::translate("TopicChooser", "&Close", nullptr));
+ TopicChooser->setWindowTitle(QCoreApplication::translate("TopicChooser", "Choose Topic", nullptr));
+ label->setText(QCoreApplication::translate("TopicChooser", "&Topics", nullptr));
+ buttonDisplay->setText(QCoreApplication::translate("TopicChooser", "&Display", nullptr));
+ buttonCancel->setText(QCoreApplication::translate("TopicChooser", "&Close", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/translatedialog.ui.h b/tests/auto/tools/uic/baseline/translatedialog.ui.h
index 5bea11f9f2..10390c62df 100644
--- a/tests/auto/tools/uic/baseline/translatedialog.ui.h
+++ b/tests/auto/tools/uic/baseline/translatedialog.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'translatedialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -182,10 +182,10 @@ public:
hboxLayout->addLayout(vboxLayout2);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
findWhat->setBuddy(ledFindWhat);
translateTo->setBuddy(ledTranslateTo);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
QWidget::setTabOrder(ledFindWhat, ledTranslateTo);
QWidget::setTabOrder(ledTranslateTo, findNxt);
QWidget::setTabOrder(findNxt, translate);
@@ -205,34 +205,34 @@ public:
void retranslateUi(QDialog *TranslateDialog)
{
- TranslateDialog->setWindowTitle(QApplication::translate("TranslateDialog", "Qt Linguist", nullptr));
-#ifndef QT_NO_WHATSTHIS
- TranslateDialog->setWhatsThis(QApplication::translate("TranslateDialog", "This window allows you to search for some text in the translation source file.", nullptr));
-#endif // QT_NO_WHATSTHIS
-#ifndef QT_NO_WHATSTHIS
- ledTranslateTo->setWhatsThis(QApplication::translate("TranslateDialog", "Type in the text to search for.", nullptr));
-#endif // QT_NO_WHATSTHIS
- findWhat->setText(QApplication::translate("TranslateDialog", "Find &source text:", nullptr));
- translateTo->setText(QApplication::translate("TranslateDialog", "&Translate to:", nullptr));
-#ifndef QT_NO_WHATSTHIS
- ledFindWhat->setWhatsThis(QApplication::translate("TranslateDialog", "Type in the text to search for.", nullptr));
-#endif // QT_NO_WHATSTHIS
- groupBox->setTitle(QApplication::translate("TranslateDialog", "Search options", nullptr));
-#ifndef QT_NO_WHATSTHIS
- ckMatchCase->setWhatsThis(QApplication::translate("TranslateDialog", "Texts such as 'TeX' and 'tex' are considered as different when checked.", nullptr));
-#endif // QT_NO_WHATSTHIS
- ckMatchCase->setText(QApplication::translate("TranslateDialog", "Match &case", nullptr));
- ckMarkFinished->setText(QApplication::translate("TranslateDialog", "Mark new translation as &finished", nullptr));
-#ifndef QT_NO_WHATSTHIS
- findNxt->setWhatsThis(QApplication::translate("TranslateDialog", "Click here to find the next occurrence of the text you typed in.", nullptr));
-#endif // QT_NO_WHATSTHIS
- findNxt->setText(QApplication::translate("TranslateDialog", "Find Next", nullptr));
- translate->setText(QApplication::translate("TranslateDialog", "Translate", nullptr));
- translateAll->setText(QApplication::translate("TranslateDialog", "Translate All", nullptr));
-#ifndef QT_NO_WHATSTHIS
- cancel->setWhatsThis(QApplication::translate("TranslateDialog", "Click here to close this window.", nullptr));
-#endif // QT_NO_WHATSTHIS
- cancel->setText(QApplication::translate("TranslateDialog", "Cancel", nullptr));
+ TranslateDialog->setWindowTitle(QCoreApplication::translate("TranslateDialog", "Qt Linguist", nullptr));
+#if QT_CONFIG(whatsthis)
+ TranslateDialog->setWhatsThis(QCoreApplication::translate("TranslateDialog", "This window allows you to search for some text in the translation source file.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+#if QT_CONFIG(whatsthis)
+ ledTranslateTo->setWhatsThis(QCoreApplication::translate("TranslateDialog", "Type in the text to search for.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ findWhat->setText(QCoreApplication::translate("TranslateDialog", "Find &source text:", nullptr));
+ translateTo->setText(QCoreApplication::translate("TranslateDialog", "&Translate to:", nullptr));
+#if QT_CONFIG(whatsthis)
+ ledFindWhat->setWhatsThis(QCoreApplication::translate("TranslateDialog", "Type in the text to search for.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ groupBox->setTitle(QCoreApplication::translate("TranslateDialog", "Search options", nullptr));
+#if QT_CONFIG(whatsthis)
+ ckMatchCase->setWhatsThis(QCoreApplication::translate("TranslateDialog", "Texts such as 'TeX' and 'tex' are considered as different when checked.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ ckMatchCase->setText(QCoreApplication::translate("TranslateDialog", "Match &case", nullptr));
+ ckMarkFinished->setText(QCoreApplication::translate("TranslateDialog", "Mark new translation as &finished", nullptr));
+#if QT_CONFIG(whatsthis)
+ findNxt->setWhatsThis(QCoreApplication::translate("TranslateDialog", "Click here to find the next occurrence of the text you typed in.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ findNxt->setText(QCoreApplication::translate("TranslateDialog", "Find Next", nullptr));
+ translate->setText(QCoreApplication::translate("TranslateDialog", "Translate", nullptr));
+ translateAll->setText(QCoreApplication::translate("TranslateDialog", "Translate All", nullptr));
+#if QT_CONFIG(whatsthis)
+ cancel->setWhatsThis(QCoreApplication::translate("TranslateDialog", "Click here to close this window.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ cancel->setText(QCoreApplication::translate("TranslateDialog", "Cancel", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/translationsettings.ui.h b/tests/auto/tools/uic/baseline/translationsettings.ui.h
index 764e3a85b6..5e0f1520a0 100644
--- a/tests/auto/tools/uic/baseline/translationsettings.ui.h
+++ b/tests/auto/tools/uic/baseline/translationsettings.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'translationsettings.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -86,9 +86,9 @@ public:
vboxLayout->addWidget(buttonBox);
-#ifndef QT_NO_SHORTCUT
+#if QT_CONFIG(shortcut)
label->setBuddy(cbLanguageList);
-#endif // QT_NO_SHORTCUT
+#endif // QT_CONFIG(shortcut)
retranslateUi(TranslationSettings);
QObject::connect(buttonBox, SIGNAL(accepted()), TranslationSettings, SLOT(accept()));
@@ -99,10 +99,10 @@ public:
void retranslateUi(QDialog *TranslationSettings)
{
- TranslationSettings->setWindowTitle(QApplication::translate("TranslationSettings", "Qt Linguist - Translation file settings", nullptr));
- groupBox->setTitle(QApplication::translate("TranslationSettings", "Target language", nullptr));
- label->setText(QApplication::translate("TranslationSettings", "Language", nullptr));
- lblCountry->setText(QApplication::translate("TranslationSettings", "Country/Region", nullptr));
+ TranslationSettings->setWindowTitle(QCoreApplication::translate("TranslationSettings", "Qt Linguist - Translation file settings", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("TranslationSettings", "Target language", nullptr));
+ label->setText(QCoreApplication::translate("TranslationSettings", "Language", nullptr));
+ lblCountry->setText(QCoreApplication::translate("TranslationSettings", "Country/Region", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h
index d432195648..395d66a999 100644
--- a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h
+++ b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'treewidgeteditor.ui'
**
-** Created by: Qt User Interface Compiler version 5.0.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -276,63 +276,63 @@ public:
void retranslateUi(QDialog *qdesigner_internal__TreeWidgetEditor)
{
- qdesigner_internal__TreeWidgetEditor->setWindowTitle(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Edit Tree Widget", nullptr));
- itemsBox->setTitle(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Tree Items", nullptr));
+ qdesigner_internal__TreeWidgetEditor->setWindowTitle(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Edit Tree Widget", nullptr));
+ itemsBox->setTitle(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Tree Items", nullptr));
QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem();
- ___qtreewidgetitem->setText(0, QApplication::translate("qdesigner_internal::TreeWidgetEditor", "1", nullptr));
-#ifndef QT_NO_TOOLTIP
- treeWidget->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Tree Items", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- newItemButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "New Item", nullptr));
-#endif // QT_NO_TOOLTIP
- newItemButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "&New", nullptr));
-#ifndef QT_NO_TOOLTIP
- newSubItemButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "New Subitem", nullptr));
-#endif // QT_NO_TOOLTIP
- newSubItemButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "New &Subitem", nullptr));
-#ifndef QT_NO_TOOLTIP
- deleteItemButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Delete Item", nullptr));
-#endif // QT_NO_TOOLTIP
- deleteItemButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "&Delete", nullptr));
-#ifndef QT_NO_TOOLTIP
- moveItemLeftButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Left (before Parent Item)", nullptr));
-#endif // QT_NO_TOOLTIP
- moveItemLeftButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "L", nullptr));
-#ifndef QT_NO_TOOLTIP
- moveItemRightButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Right (as a First Subitem of the Next Sibling Item)", nullptr));
-#endif // QT_NO_TOOLTIP
- moveItemRightButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "R", nullptr));
-#ifndef QT_NO_TOOLTIP
- moveItemUpButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Up", nullptr));
-#endif // QT_NO_TOOLTIP
- moveItemUpButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "U", nullptr));
-#ifndef QT_NO_TOOLTIP
- moveItemDownButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Down", nullptr));
-#endif // QT_NO_TOOLTIP
- moveItemDownButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "D", nullptr));
- label_2->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Icon", nullptr));
- columnsBox->setTitle(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Columns", nullptr));
-#ifndef QT_NO_TOOLTIP
- listWidget->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Tree Columns", nullptr));
-#endif // QT_NO_TOOLTIP
-#ifndef QT_NO_TOOLTIP
- newColumnButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "New Column", nullptr));
-#endif // QT_NO_TOOLTIP
- newColumnButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "New", nullptr));
-#ifndef QT_NO_TOOLTIP
- deleteColumnButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Delete Column", nullptr));
-#endif // QT_NO_TOOLTIP
- deleteColumnButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Delete", nullptr));
-#ifndef QT_NO_TOOLTIP
- moveColumnUpButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Column Up", nullptr));
-#endif // QT_NO_TOOLTIP
- moveColumnUpButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "U", nullptr));
-#ifndef QT_NO_TOOLTIP
- moveColumnDownButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Column Down", nullptr));
-#endif // QT_NO_TOOLTIP
- moveColumnDownButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "D", nullptr));
- label->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Icon", nullptr));
+ ___qtreewidgetitem->setText(0, QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "1", nullptr));
+#if QT_CONFIG(tooltip)
+ treeWidget->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Tree Items", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ newItemButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "New Item", nullptr));
+#endif // QT_CONFIG(tooltip)
+ newItemButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "&New", nullptr));
+#if QT_CONFIG(tooltip)
+ newSubItemButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "New Subitem", nullptr));
+#endif // QT_CONFIG(tooltip)
+ newSubItemButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "New &Subitem", nullptr));
+#if QT_CONFIG(tooltip)
+ deleteItemButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Delete Item", nullptr));
+#endif // QT_CONFIG(tooltip)
+ deleteItemButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "&Delete", nullptr));
+#if QT_CONFIG(tooltip)
+ moveItemLeftButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Left (before Parent Item)", nullptr));
+#endif // QT_CONFIG(tooltip)
+ moveItemLeftButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "L", nullptr));
+#if QT_CONFIG(tooltip)
+ moveItemRightButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Right (as a First Subitem of the Next Sibling Item)", nullptr));
+#endif // QT_CONFIG(tooltip)
+ moveItemRightButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "R", nullptr));
+#if QT_CONFIG(tooltip)
+ moveItemUpButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Up", nullptr));
+#endif // QT_CONFIG(tooltip)
+ moveItemUpButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "U", nullptr));
+#if QT_CONFIG(tooltip)
+ moveItemDownButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Down", nullptr));
+#endif // QT_CONFIG(tooltip)
+ moveItemDownButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "D", nullptr));
+ label_2->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Icon", nullptr));
+ columnsBox->setTitle(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Columns", nullptr));
+#if QT_CONFIG(tooltip)
+ listWidget->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Tree Columns", nullptr));
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(tooltip)
+ newColumnButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "New Column", nullptr));
+#endif // QT_CONFIG(tooltip)
+ newColumnButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "New", nullptr));
+#if QT_CONFIG(tooltip)
+ deleteColumnButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Delete Column", nullptr));
+#endif // QT_CONFIG(tooltip)
+ deleteColumnButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Delete", nullptr));
+#if QT_CONFIG(tooltip)
+ moveColumnUpButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Column Up", nullptr));
+#endif // QT_CONFIG(tooltip)
+ moveColumnUpButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "U", nullptr));
+#if QT_CONFIG(tooltip)
+ moveColumnDownButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Column Down", nullptr));
+#endif // QT_CONFIG(tooltip)
+ moveColumnDownButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "D", nullptr));
+ label->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Icon", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h
index 3fbf125a1f..612d7ad427 100644
--- a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h
+++ b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h
@@ -31,7 +31,7 @@
/********************************************************************************
** Form generated from reading UI file 'trpreviewtool.ui'
**
-** Created by: Qt User Interface Compiler version 5.9.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -117,7 +117,7 @@ public:
mainToolBar = new QToolBar(TrPreviewToolClass);
mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
mainToolBar->setOrientation(Qt::Horizontal);
- TrPreviewToolClass->addToolBar(static_cast<Qt::ToolBarArea>(4), mainToolBar);
+ TrPreviewToolClass->addToolBar(Qt::TopToolBarArea, mainToolBar);
statusBar = new QStatusBar(TrPreviewToolClass);
statusBar->setObjectName(QString::fromUtf8("statusBar"));
TrPreviewToolClass->setStatusBar(statusBar);
@@ -138,7 +138,7 @@ public:
vboxLayout->addWidget(viewForms);
dwForms->setWidget(dockWidgetContents);
- TrPreviewToolClass->addDockWidget(static_cast<Qt::DockWidgetArea>(1), dwForms);
+ TrPreviewToolClass->addDockWidget(Qt::LeftDockWidgetArea, dwForms);
menuBar->addAction(menuFile->menuAction());
menuBar->addAction(menuView->menuAction());
@@ -162,21 +162,21 @@ public:
void retranslateUi(QMainWindow *TrPreviewToolClass)
{
- TrPreviewToolClass->setWindowTitle(QApplication::translate("TrPreviewToolClass", "Qt Translation Preview Tool", nullptr));
- actionOpenForm->setText(QApplication::translate("TrPreviewToolClass", "&Open Form...", nullptr));
- actionLoadTranslation->setText(QApplication::translate("TrPreviewToolClass", "&Load Translation...", nullptr));
- actionReloadTranslations->setText(QApplication::translate("TrPreviewToolClass", "&Reload Translations", nullptr));
-#ifndef QT_NO_SHORTCUT
- actionReloadTranslations->setShortcut(QApplication::translate("TrPreviewToolClass", "F5", nullptr));
-#endif // QT_NO_SHORTCUT
- actionClose->setText(QApplication::translate("TrPreviewToolClass", "&Close", nullptr));
- actionAbout->setText(QApplication::translate("TrPreviewToolClass", "About", nullptr));
- actionAbout_Qt->setText(QApplication::translate("TrPreviewToolClass", "About Qt", nullptr));
- menuView->setTitle(QApplication::translate("TrPreviewToolClass", "&View", nullptr));
- menuViewViews->setTitle(QApplication::translate("TrPreviewToolClass", "&Views", nullptr));
- menuHelp->setTitle(QApplication::translate("TrPreviewToolClass", "&Help", nullptr));
- menuFile->setTitle(QApplication::translate("TrPreviewToolClass", "&File", nullptr));
- dwForms->setWindowTitle(QApplication::translate("TrPreviewToolClass", "Forms", nullptr));
+ TrPreviewToolClass->setWindowTitle(QCoreApplication::translate("TrPreviewToolClass", "Qt Translation Preview Tool", nullptr));
+ actionOpenForm->setText(QCoreApplication::translate("TrPreviewToolClass", "&Open Form...", nullptr));
+ actionLoadTranslation->setText(QCoreApplication::translate("TrPreviewToolClass", "&Load Translation...", nullptr));
+ actionReloadTranslations->setText(QCoreApplication::translate("TrPreviewToolClass", "&Reload Translations", nullptr));
+#if QT_CONFIG(shortcut)
+ actionReloadTranslations->setShortcut(QCoreApplication::translate("TrPreviewToolClass", "F5", nullptr));
+#endif // QT_CONFIG(shortcut)
+ actionClose->setText(QCoreApplication::translate("TrPreviewToolClass", "&Close", nullptr));
+ actionAbout->setText(QCoreApplication::translate("TrPreviewToolClass", "About", nullptr));
+ actionAbout_Qt->setText(QCoreApplication::translate("TrPreviewToolClass", "About Qt", nullptr));
+ menuView->setTitle(QCoreApplication::translate("TrPreviewToolClass", "&View", nullptr));
+ menuViewViews->setTitle(QCoreApplication::translate("TrPreviewToolClass", "&Views", nullptr));
+ menuHelp->setTitle(QCoreApplication::translate("TrPreviewToolClass", "&Help", nullptr));
+ menuFile->setTitle(QCoreApplication::translate("TrPreviewToolClass", "&File", nullptr));
+ dwForms->setWindowTitle(QCoreApplication::translate("TrPreviewToolClass", "Forms", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/validators.ui.h b/tests/auto/tools/uic/baseline/validators.ui.h
index d0ae777f65..45d9c5aac6 100644
--- a/tests/auto/tools/uic/baseline/validators.ui.h
+++ b/tests/auto/tools/uic/baseline/validators.ui.h
@@ -375,22 +375,22 @@ public:
void retranslateUi(QWidget *ValidatorsForm)
{
- ValidatorsForm->setWindowTitle(QApplication::translate("ValidatorsForm", "Form", nullptr));
- groupBox->setTitle(QApplication::translate("ValidatorsForm", "QIntValidator", nullptr));
- label->setText(QApplication::translate("ValidatorsForm", "Min:", nullptr));
- label_2->setText(QApplication::translate("ValidatorsForm", "Max:", nullptr));
- label_7->setText(QApplication::translate("ValidatorsForm", "editingFinished()", nullptr));
- groupBox_2->setTitle(QApplication::translate("ValidatorsForm", "QDoubleValidator", nullptr));
- label_3->setText(QApplication::translate("ValidatorsForm", "Min:", nullptr));
- label_5->setText(QApplication::translate("ValidatorsForm", "Format:", nullptr));
- doubleFormat->setItemText(0, QApplication::translate("ValidatorsForm", "Standard", nullptr));
- doubleFormat->setItemText(1, QApplication::translate("ValidatorsForm", "Scientific", nullptr));
-
- label_4->setText(QApplication::translate("ValidatorsForm", "Max:", nullptr));
- label_6->setText(QApplication::translate("ValidatorsForm", "Decimals:", nullptr));
+ ValidatorsForm->setWindowTitle(QCoreApplication::translate("ValidatorsForm", "Form", nullptr));
+ groupBox->setTitle(QCoreApplication::translate("ValidatorsForm", "QIntValidator", nullptr));
+ label->setText(QCoreApplication::translate("ValidatorsForm", "Min:", nullptr));
+ label_2->setText(QCoreApplication::translate("ValidatorsForm", "Max:", nullptr));
+ label_7->setText(QCoreApplication::translate("ValidatorsForm", "editingFinished()", nullptr));
+ groupBox_2->setTitle(QCoreApplication::translate("ValidatorsForm", "QDoubleValidator", nullptr));
+ label_3->setText(QCoreApplication::translate("ValidatorsForm", "Min:", nullptr));
+ label_5->setText(QCoreApplication::translate("ValidatorsForm", "Format:", nullptr));
+ doubleFormat->setItemText(0, QCoreApplication::translate("ValidatorsForm", "Standard", nullptr));
+ doubleFormat->setItemText(1, QCoreApplication::translate("ValidatorsForm", "Scientific", nullptr));
+
+ label_4->setText(QCoreApplication::translate("ValidatorsForm", "Max:", nullptr));
+ label_6->setText(QCoreApplication::translate("ValidatorsForm", "Decimals:", nullptr));
doubleLedWidget->setText(QString());
- label_8->setText(QApplication::translate("ValidatorsForm", "editingFinished()", nullptr));
- pushButton->setText(QApplication::translate("ValidatorsForm", "Quit", nullptr));
+ label_8->setText(QCoreApplication::translate("ValidatorsForm", "editingFinished()", nullptr));
+ pushButton->setText(QCoreApplication::translate("ValidatorsForm", "Quit", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h b/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h
index d6f7ff5526..aa005593c0 100644
--- a/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h
+++ b/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading UI file 'wateringconfigdialog.ui'
**
-** Created by: Qt User Interface Compiler version 5.10.0
+** Created by: Qt User Interface Compiler version 5.12.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
@@ -250,34 +250,34 @@ public:
void retranslateUi(QDialog *WateringConfigDialog)
{
- WateringConfigDialog->setWindowTitle(QApplication::translate("WateringConfigDialog", "Watering Configuration", nullptr));
- label_3->setText(QApplication::translate("WateringConfigDialog", "Plant:", nullptr));
- plantComboBox->setItemText(0, QApplication::translate("WateringConfigDialog", "Squash", nullptr));
- plantComboBox->setItemText(1, QApplication::translate("WateringConfigDialog", "Bean", nullptr));
- plantComboBox->setItemText(2, QApplication::translate("WateringConfigDialog", "Carrot", nullptr));
- plantComboBox->setItemText(3, QApplication::translate("WateringConfigDialog", "Strawberry", nullptr));
- plantComboBox->setItemText(4, QApplication::translate("WateringConfigDialog", "Raspberry", nullptr));
- plantComboBox->setItemText(5, QApplication::translate("WateringConfigDialog", "Blueberry", nullptr));
-
- label_2->setText(QApplication::translate("WateringConfigDialog", "Water when:", nullptr));
- temperatureCheckBox->setText(QApplication::translate("WateringConfigDialog", "Temperature is higher than:", nullptr));
+ WateringConfigDialog->setWindowTitle(QCoreApplication::translate("WateringConfigDialog", "Watering Configuration", nullptr));
+ label_3->setText(QCoreApplication::translate("WateringConfigDialog", "Plant:", nullptr));
+ plantComboBox->setItemText(0, QCoreApplication::translate("WateringConfigDialog", "Squash", nullptr));
+ plantComboBox->setItemText(1, QCoreApplication::translate("WateringConfigDialog", "Bean", nullptr));
+ plantComboBox->setItemText(2, QCoreApplication::translate("WateringConfigDialog", "Carrot", nullptr));
+ plantComboBox->setItemText(3, QCoreApplication::translate("WateringConfigDialog", "Strawberry", nullptr));
+ plantComboBox->setItemText(4, QCoreApplication::translate("WateringConfigDialog", "Raspberry", nullptr));
+ plantComboBox->setItemText(5, QCoreApplication::translate("WateringConfigDialog", "Blueberry", nullptr));
+
+ label_2->setText(QCoreApplication::translate("WateringConfigDialog", "Water when:", nullptr));
+ temperatureCheckBox->setText(QCoreApplication::translate("WateringConfigDialog", "Temperature is higher than:", nullptr));
temperatureSpinBox->setSpecialValueText(QString());
- temperatureSpinBox->setSuffix(QApplication::translate("WateringConfigDialog", "C", nullptr));
- rainCheckBox->setText(QApplication::translate("WateringConfigDialog", "Rain less than:", nullptr));
+ temperatureSpinBox->setSuffix(QCoreApplication::translate("WateringConfigDialog", "C", nullptr));
+ rainCheckBox->setText(QCoreApplication::translate("WateringConfigDialog", "Rain less than:", nullptr));
rainSpinBox->setSpecialValueText(QString());
- rainSpinBox->setSuffix(QApplication::translate("WateringConfigDialog", "mm", nullptr));
- label->setText(QApplication::translate("WateringConfigDialog", "Starting Time:", nullptr));
- label_4->setText(QApplication::translate("WateringConfigDialog", "Amount:", nullptr));
- amountSpinBox->setSuffix(QApplication::translate("WateringConfigDialog", "l", nullptr));
- label_5->setText(QApplication::translate("WateringConfigDialog", "Source:", nullptr));
- sourceComboBox->setItemText(0, QApplication::translate("WateringConfigDialog", "Foundain", nullptr));
- sourceComboBox->setItemText(1, QApplication::translate("WateringConfigDialog", "River", nullptr));
- sourceComboBox->setItemText(2, QApplication::translate("WateringConfigDialog", "Lake", nullptr));
- sourceComboBox->setItemText(3, QApplication::translate("WateringConfigDialog", "Public Water System", nullptr));
-
- label_6->setText(QApplication::translate("WateringConfigDialog", "Filter:", nullptr));
+ rainSpinBox->setSuffix(QCoreApplication::translate("WateringConfigDialog", "mm", nullptr));
+ label->setText(QCoreApplication::translate("WateringConfigDialog", "Starting Time:", nullptr));
+ label_4->setText(QCoreApplication::translate("WateringConfigDialog", "Amount:", nullptr));
+ amountSpinBox->setSuffix(QCoreApplication::translate("WateringConfigDialog", "l", nullptr));
+ label_5->setText(QCoreApplication::translate("WateringConfigDialog", "Source:", nullptr));
+ sourceComboBox->setItemText(0, QCoreApplication::translate("WateringConfigDialog", "Foundain", nullptr));
+ sourceComboBox->setItemText(1, QCoreApplication::translate("WateringConfigDialog", "River", nullptr));
+ sourceComboBox->setItemText(2, QCoreApplication::translate("WateringConfigDialog", "Lake", nullptr));
+ sourceComboBox->setItemText(3, QCoreApplication::translate("WateringConfigDialog", "Public Water System", nullptr));
+
+ label_6->setText(QCoreApplication::translate("WateringConfigDialog", "Filter:", nullptr));
filterCheckBox->setText(QString());
- helpLabel->setText(QApplication::translate("WateringConfigDialog", "<a href=\"test\">Show Details</a>", nullptr));
+ helpLabel->setText(QCoreApplication::translate("WateringConfigDialog", "<a href=\"test\">Show Details</a>", nullptr));
} // retranslateUi
};
diff --git a/tests/auto/tools/uic/tst_uic.cpp b/tests/auto/tools/uic/tst_uic.cpp
index 85668c96d4..f9553028fe 100644
--- a/tests/auto/tools/uic/tst_uic.cpp
+++ b/tests/auto/tools/uic/tst_uic.cpp
@@ -37,6 +37,11 @@
#include <QtCore/QRegularExpression>
#include <QtCore/QStandardPaths>
+#include <cstdio>
+
+static const char keepEnvVar[] = "UIC_KEEP_GENERATED_FILES";
+static const char diffToStderrEnvVar[] = "UIC_STDERR_DIFF";
+
class tst_uic : public QObject
{
Q_OBJECT
@@ -69,7 +74,7 @@ private:
tst_uic::tst_uic()
: m_command(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/uic"))
- , m_versionRegexp(QLatin1String("\\*\\* Created by: Qt User Interface Compiler version \\d{1,2}\\.\\d{1,2}\\.\\d{1,2}"))
+ , m_versionRegexp(QLatin1String(R"(\*\* Created by: Qt User Interface Compiler version \d{1,2}\.\d{1,2}\.\d{1,2})"))
{
}
@@ -103,14 +108,19 @@ void tst_uic::initTestCase()
qDebug("%s", qPrintable(msg));
}
+static const char helpFormat[] = R"(
+Note: The environment variable '%s' can be set to keep the temporary files
+for error analysis.
+The environment variable '%s' can be set to redirect the diff output to
+stderr.)";
+
void tst_uic::cleanupTestCase()
{
- static const char envVar[] = "UIC_KEEP_GENERATED_FILES";
- if (qgetenv(envVar).isEmpty()) {
- qDebug("Note: The environment variable '%s' can be set to keep the temporary files for error analysis.", envVar);
- } else {
+ if (qEnvironmentVariableIsSet(keepEnvVar)) {
m_generated.setAutoRemove(false);
qDebug("Keeping generated files in '%s'", qPrintable(QDir::toNativeSeparators(m_generated.path())));
+ } else {
+ qDebug(helpFormat, keepEnvVar, diffToStderrEnvVar);
}
}
@@ -152,7 +162,7 @@ void tst_uic::run()
QVERIFY(process.waitForFinished());
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
- QCOMPARE(QFileInfo(generatedFile).exists(), true);
+ QVERIFY(QFileInfo::exists(generatedFile));
}
void tst_uic::run_data() const
@@ -212,6 +222,16 @@ static QByteArray msgCannotReadFile(const QFile &file)
return result.toLocal8Bit();
}
+static void outputDiff(const QString &diff)
+{
+ // Use patch -p3 < diff to apply the obtained diff output in the baseline directory.
+ static const bool diffToStderr = qEnvironmentVariableIsSet(diffToStderrEnvVar);
+ if (diffToStderr)
+ std::fputs(qPrintable(diff), stderr);
+ else
+ qWarning("Difference:\n%s", qPrintable(diff));
+}
+
void tst_uic::compare()
{
QFETCH(QString, originalFile);
@@ -233,7 +253,7 @@ void tst_uic::compare()
if (generatedFileContents != originalFileContents) {
const QString diff = generateDiff(originalFile, generatedFile);
if (!diff.isEmpty())
- qWarning().noquote().nospace() << "Difference:\n" << diff;
+ outputDiff(diff);
}
QCOMPARE(generatedFileContents, originalFileContents);
@@ -274,7 +294,7 @@ void tst_uic::runTranslation()
QVERIFY(process.waitForFinished());
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
QCOMPARE(process.exitCode(), 0);
- QCOMPARE(QFileInfo(generatedFile).exists(), true);
+ QVERIFY(QFileInfo::exists(generatedFile));
}
@@ -301,7 +321,7 @@ void tst_uic::runCompare()
if (generatedFileContents != originalFileContents) {
const QString diff = generateDiff(originalFile, generatedFile);
if (!diff.isEmpty())
- qWarning().noquote().nospace() << "Difference:\n" << diff;
+ outputDiff(diff);
}
QCOMPARE(generatedFileContents, originalFileContents);
diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
index b6932d4892..9d3770064f 100644
--- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
+++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
@@ -253,11 +253,12 @@ protected:
void calculateAndCheck(int cppline, const int precalced_comparedata[]);
void testMinMaxSectionSize(bool stretchLastSection);
- QWidget *topLevel;
- QHeaderView *view;
- QStandardItemModel *model;
- QTableView *m_tableview;
- bool m_using_reset_model;
+ QWidget *topLevel = nullptr;
+ QHeaderView *view = nullptr;
+ QStandardItemModel *model = nullptr;
+ QTableView *m_tableview = nullptr;
+ bool m_using_reset_model = false;
+ bool m_special_prepare = false;
QElapsedTimer timer;
};
@@ -614,6 +615,27 @@ void tst_QHeaderView::hidden()
view->setSectionHidden(1, false);
QCOMPARE(view->isSectionHidden(0), false);
QCOMPARE(view->sectionSize(0), view->defaultSectionSize());
+
+ // d->hiddenSectionSize could go out of sync when a new model
+ // was set which has fewer sections than before and some of them
+ // were hidden
+ QStandardItemModel model2(model->rowCount() - 1, model->columnCount());
+
+ for (int i = 0; i < model->rowCount(); ++i)
+ view->setSectionHidden(i, true);
+ view->setModel(&model2);
+ QVERIFY(view->sectionsHidden());
+ for (int i = 0; i < model2.rowCount(); ++i) {
+ QVERIFY(view->isSectionHidden(i));
+ }
+
+ view->setModel(model);
+ for (int i = 0; i < model2.rowCount(); ++i) {
+ QVERIFY(view->isSectionHidden(i));
+ }
+ QCOMPARE(view->isSectionHidden(model->rowCount() - 1), false);
+ for (int i = 0; i < model->rowCount(); ++i)
+ view->setSectionHidden(i, false);
}
void tst_QHeaderView::stretch()
@@ -2822,6 +2844,7 @@ void tst_QHeaderView::additionalInit()
QFETCH(bool, reset_model);
m_using_reset_model = reset_model;
+ m_special_prepare = special_prepare;
if (m_using_reset_model) {
XResetModel *m = new XResetModel();
@@ -3035,18 +3058,34 @@ void tst_QHeaderView::mixedTests()
view->moveSection(0, 5);
for (int u = model->rowCount(); u >= 0; --u) {
- if (u % 5 != 0)
+ if (u % 5 != 0) {
view->hideSection(u);
- if (u % 3 != 0)
+ QVERIFY(view->isSectionHidden(u));
+ }
+ if (u % 3 != 0) {
view->showSection(u);
+ QVERIFY(!view->isSectionHidden(u));
+ }
}
model->insertRows(3, 7);
model->removeRows(8, 3);
model->setRowCount(model->rowCount() - 10);
+ // the upper is not visible (when m_using_reset_model is true)
+ // the lower 11 are modified due to insert/removeRows
+ for (int u = model->rowCount() - 1; u >= 11; --u) {
+ // when using reset, the hidden rows will *not* move
+ const int calcMod = m_using_reset_model ? u : u - 4; // 7 added, 3 removed
+ if (calcMod % 5 != 0 && calcMod % 3 == 0) {
+ QVERIFY(view->isSectionHidden(u));
+ }
+ if (calcMod % 3 != 0) {
+ QVERIFY(!view->isSectionHidden(u));
+ }
+ }
if (m_using_reset_model) {
- const int precalced_results[] = { 898296472, 337096378, -543340640, 1, -1251526424, -568618976, 9250 };
+ const int precalced_results[] = { 898296472, 337096378, -543340640, -1964432121, -1251526424, -568618976, 9250 };
calculateAndCheck(__LINE__, precalced_results);
} else {
const int precalced_results[] = { 1911338224, 1693514365, -613398968, -1912534953, 1582159424, -1851079000, 9300 };
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
index aa11ed709f..7fd1822295 100644
--- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
@@ -1228,7 +1228,7 @@ void tst_QItemDelegate::editorEvent()
option.checkState = Qt::CheckState(checkState);
const int checkMargin = qApp->style()->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, 0) + 1;
- QPoint pos = inCheck ? qApp->style()->subElementRect(QStyle::SE_ViewItemCheckIndicator, &option, 0).center() + QPoint(checkMargin, 0) : QPoint(200,200);
+ QPoint pos = inCheck ? qApp->style()->subElementRect(QStyle::SE_ItemViewItemCheckIndicator, &option, 0).center() + QPoint(checkMargin, 0) : QPoint(200,200);
QEvent *event = new QMouseEvent((QEvent::Type)type,
pos,
@@ -1384,7 +1384,7 @@ void tst_QItemDelegate::QTBUG4435_keepSelectionOnCheck()
option.features = QStyleOptionViewItem::HasDisplay | QStyleOptionViewItem::HasCheckIndicator;
option.checkState = Qt::CheckState(model.index(0, 0).data(Qt::CheckStateRole).toInt());
const int checkMargin = qApp->style()->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, 0) + 1;
- QPoint pos = qApp->style()->subElementRect(QStyle::SE_ViewItemCheckIndicator, &option, 0).center()
+ QPoint pos = qApp->style()->subElementRect(QStyle::SE_ItemViewItemCheckIndicator, &option, 0).center()
+ QPoint(checkMargin, 0);
QTest::mouseClick(view.viewport(), Qt::LeftButton, Qt::ControlModifier, pos);
QTRY_VERIFY(view.selectionModel()->isColumnSelected(0, QModelIndex()));
diff --git a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
index bbdaac5c6f..071665a5e3 100644
--- a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
+++ b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp
@@ -249,7 +249,7 @@ void tst_QItemView::populate()
for (int y = 0; y < treeModel->columnCount(); ++y) {
QModelIndex index = treeModel->index(x, y, parent);
treeModel->setData(index, xS + QLatin1Char('_') + QString::number(y) + QLatin1Char('_') + iS);
- treeModel->setData(index, QVariant(QColor(Qt::blue)), Qt::TextColorRole);
+ treeModel->setData(index, QVariant(QColor(Qt::blue)), Qt::ForegroundRole);
}
}
}
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
index 5227db64ec..433b9e55e1 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -873,6 +873,10 @@ void tst_QListView::setCurrentIndex()
}
}
}
+ while (model.rowCount()) {
+ view.setCurrentIndex(model.index(model.rowCount() - 1, 0));
+ model.removeRow(model.rowCount() - 1);
+ }
}
class PublicListView : public QListView
diff --git a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
index 98b44fe8aa..0c1b20d61a 100644
--- a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
+++ b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
@@ -31,6 +31,7 @@
#include <QtGui/QtGui>
#include <QtWidgets/QtWidgets>
#include <qlist.h>
+#include <QSignalSpy>
#include <qlistwidget.h>
#include <private/qlistwidget_p.h>
@@ -116,6 +117,14 @@ private slots:
void QTBUG14363_completerWithAnyKeyPressedEditTriggers();
void mimeData();
void QTBUG50891_ensureSelectionModelSignalConnectionsAreSet();
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ void clearItemData();
+#endif
+
+ void moveRows_data();
+ void moveRows();
+ void moveRowsInvalid_data();
+ void moveRowsInvalid();
protected slots:
void rowsAboutToBeInserted(const QModelIndex &parent, int first, int last)
@@ -148,6 +157,108 @@ private:
};
+void tst_QListWidget::moveRowsInvalid_data()
+{
+ QTest::addColumn<QListWidget*>("baseWidget");
+ QTest::addColumn<QModelIndex>("startParent");
+ QTest::addColumn<int>("startRow");
+ QTest::addColumn<int>("count");
+ QTest::addColumn<QModelIndex>("destinationParent");
+ QTest::addColumn<int>("destination");
+
+ const auto createWidget = []() -> QListWidget* {
+ QListWidget* result = new QListWidget;
+ result->addItems(QStringList{"A", "B", "C", "D", "E", "F"});
+ return result;
+ };
+
+ QTest::addRow("destination_equal_source") << createWidget() << QModelIndex() << 0 << 1 << QModelIndex() << 1;
+ QTest::addRow("count_equal_0") << createWidget() << QModelIndex() << 0 << 0 << QModelIndex() << 2;
+ QListWidget* tempWidget = createWidget();
+ QTest::addRow("move_child") << tempWidget << tempWidget->model()->index(0, 0) << 0 << 1 << QModelIndex() << 2;
+ tempWidget = createWidget();
+ QTest::addRow("move_to_child") << tempWidget << QModelIndex() << 0 << 1 << tempWidget->model()->index(0, 0) << 2;
+ QTest::addRow("negative_count") << createWidget() << QModelIndex() << 0 << -1 << QModelIndex() << 2;
+ QTest::addRow("negative_source_row") << createWidget() << QModelIndex() << -1 << 1 << QModelIndex() << 2;
+ QTest::addRow("negative_destination_row") << createWidget() << QModelIndex() << 0 << 1 << QModelIndex() << -1;
+ QTest::addRow("source_row_equal_rowCount") << createWidget() << QModelIndex() << 6 << 1 << QModelIndex() << 1;
+ QTest::addRow("destination_row_greater_rowCount") << createWidget() << QModelIndex() << 0 << 1 << QModelIndex() << 6 + 1;
+ QTest::addRow("move_row_within_source_range") << createWidget() << QModelIndex() << 0 << 3 << QModelIndex() << 2;
+ QTest::addRow("destination_row_before_0") << createWidget() << QModelIndex() << 1 << 1 << QModelIndex() << 0;
+}
+
+void tst_QListWidget::moveRowsInvalid()
+{
+ QFETCH(QListWidget* const, baseWidget);
+ QFETCH(const QModelIndex, startParent);
+ QFETCH(const int, startRow);
+ QFETCH(const int, count);
+ QFETCH(const QModelIndex, destinationParent);
+ QFETCH(const int, destination);
+ QAbstractItemModel *baseModel = baseWidget->model();
+ QSignalSpy rowMovedSpy(baseModel, &QAbstractItemModel::rowsMoved);
+ QSignalSpy rowAboutMovedSpy(baseModel, &QAbstractItemModel::rowsAboutToBeMoved);
+ QVERIFY(rowMovedSpy.isValid());
+ QVERIFY(rowAboutMovedSpy.isValid());
+ QVERIFY(!baseModel->moveRows(startParent, startRow, count, destinationParent, destination));
+ QCOMPARE(rowMovedSpy.size(), 0);
+ QCOMPARE(rowAboutMovedSpy.size(), 0);
+ delete baseWidget;
+}
+
+void tst_QListWidget::moveRows_data()
+{
+ QTest::addColumn<int>("startRow");
+ QTest::addColumn<int>("count");
+ QTest::addColumn<int>("destination");
+ QTest::addColumn<QStringList>("expected");
+
+ QTest::newRow("1_Item_from_top_to_middle") << 0 << 1 << 3 << QStringList{"B", "C", "A", "D", "E", "F"};
+ QTest::newRow("1_Item_from_top_to_bottom") << 0 << 1 << 6 << QStringList{"B", "C", "D", "E", "F", "A"};
+ QTest::newRow("1_Item_from_middle_to_top") << 2 << 1 << 1 << QStringList{"C", "A", "B", "D", "E", "F"};
+ QTest::newRow("1_Item_from_bottom_to_middle") << 5 << 1 << 3 << QStringList{"A", "B", "F", "C", "D", "E"};
+ QTest::newRow("1_Item_from_bottom to_top") << 5 << 1 << 1 << QStringList{"F", "A", "B", "C", "D", "E"};
+ QTest::newRow("1_Item_from_middle_to_bottom") << 2 << 1 << 6 << QStringList{"A", "B", "D", "E", "F", "C"};
+ QTest::newRow("1_Item_from_middle_to_middle_before") << 2 << 1 << 1 << QStringList{"C", "A", "B", "D", "E", "F"};
+ QTest::newRow("1_Item_from_middle_to_middle_after") << 2 << 1 << 4 << QStringList{"A", "B", "D", "C", "E", "F"};
+
+ QTest::newRow("2_Items_from_top_to_middle") << 0 << 2 << 3 << QStringList{"C", "A", "B", "D", "E", "F"};
+ QTest::newRow("2_Items_from_top_to_bottom") << 0 << 2 << 6 << QStringList{"C", "D", "E", "F", "A", "B"};
+ QTest::newRow("2_Items_from_middle_to_top") << 2 << 2 << 1 << QStringList{"C", "D", "A", "B", "E", "F"};
+ QTest::newRow("2_Items_from_bottom_to_middle") << 4 << 2 << 3 << QStringList{"A", "B", "E", "F", "C", "D"};
+ QTest::newRow("2_Items_from_bottom_to_top") << 4 << 2 << 1 << QStringList{"E", "F", "A", "B", "C", "D"};
+ QTest::newRow("2_Items_from_middle_to_bottom") << 2 << 2 << 6 << QStringList{"A", "B", "E", "F", "C", "D"};
+ QTest::newRow("2_Items_from_middle_to_middle_before") << 3 << 2 << 2 << QStringList{"A", "D", "E", "B", "C", "F"};
+ QTest::newRow("2_Items_from_middle_to_middle_after") << 1 << 2 << 5 << QStringList{"A", "D", "E", "B", "C", "F"};
+}
+
+void tst_QListWidget::moveRows()
+{
+ QFETCH(const int, startRow);
+ QFETCH(const int, count);
+ QFETCH(const int, destination);
+ QFETCH(const QStringList, expected);
+ QListWidget baseWidget;
+ baseWidget.addItems(QStringList{"A", "B", "C", "D", "E", "F"});
+ QAbstractItemModel *baseModel = baseWidget.model();
+ QSignalSpy rowMovedSpy(baseModel, &QAbstractItemModel::rowsMoved);
+ QSignalSpy rowAboutMovedSpy(baseModel, &QAbstractItemModel::rowsAboutToBeMoved);
+ QVERIFY(baseModel->moveRows(QModelIndex(), startRow, count, QModelIndex(), destination));
+ QCOMPARE(baseModel->rowCount(), expected.size());
+ for (int i = 0; i < expected.size(); ++i)
+ QCOMPARE(baseModel->index(i, 0).data().toString(), expected.at(i));
+ QCOMPARE(rowMovedSpy.size(), 1);
+ QCOMPARE(rowAboutMovedSpy.size(), 1);
+ for (const QList<QVariant> &signalArgs : {rowMovedSpy.first(), rowAboutMovedSpy.first()}){
+ QVERIFY(!signalArgs.at(0).value<QModelIndex>().isValid());
+ QCOMPARE(signalArgs.at(1).toInt(), startRow);
+ QCOMPARE(signalArgs.at(2).toInt(), startRow + count - 1);
+ QVERIFY(!signalArgs.at(3).value<QModelIndex>().isValid());
+ QCOMPARE(signalArgs.at(4).toInt(), destination);
+ }
+}
+
+
typedef QList<int> IntList;
tst_QListWidget::tst_QListWidget(): testWidget(0), rcParent(8), rcFirst(8,0), rcLast(8,0)
@@ -233,7 +344,7 @@ void tst_QListWidget::addItem2()
testWidget->addItem(item);
QCOMPARE(testWidget->count(), ++count);
QCOMPARE(testWidget->item(testWidget->count()-1), item);
- QCOMPARE(testWidget->isItemHidden(item), false);
+ QCOMPARE(item->isHidden(), false);
}
void tst_QListWidget::addItems()
@@ -291,9 +402,11 @@ void tst_QListWidget::closePersistentEditor()
void tst_QListWidget::setItemHidden()
{
+#if QT_DEPRECATED_SINCE(5, 13)
// Boundary checking
testWidget->setItemHidden(0, true);
testWidget->setItemHidden(0, false);
+#endif
int totalHidden = 0;
for (int i = 0; i < testWidget->model()->rowCount(); ++i)
@@ -310,27 +423,27 @@ void tst_QListWidget::setItemHidden()
newTotal++;
QCOMPARE(newTotal, totalHidden);
- testWidget->setItemHidden(item, true);
- QCOMPARE(testWidget->isItemHidden(item), true);
+ item->setHidden(true);
+ QCOMPARE(item->isHidden(), true);
// Check that nothing else changed
newTotal = 0;
for (int i = 0; i < testWidget->model()->rowCount(); ++i)
- if (testWidget->isItemHidden(testWidget->item(i)))
+ if (testWidget->item(i)->isHidden())
newTotal++;
QCOMPARE(newTotal, totalHidden + 1);
- testWidget->setItemHidden(item, false);
- QCOMPARE(testWidget->isItemHidden(item), false);
+ item->setHidden(false);
+ QCOMPARE(item->isHidden(), false);
// Check that nothing else changed
newTotal = 0;
for (int i = 0; i < testWidget->model()->rowCount(); ++i)
- if (testWidget->isItemHidden(testWidget->item(i)))
+ if (testWidget->item(i)->isHidden())
newTotal++;
QCOMPARE(newTotal, totalHidden);
- testWidget->setItemHidden(item, true);
+ item->setHidden(true);
}
void tst_QListWidget::setCurrentItem_data()
@@ -736,7 +849,7 @@ void tst_QListWidget::selectedItems()
testWidget->setSelectionMode(QListWidget::SingleSelection);
for (int i=0; i<itemCount; ++i) {
QListWidgetItem *item = testWidget->item(i);
- testWidget->setItemSelected(item, true);
+ item->setSelected(true);
QVERIFY(item->isSelected());
QCOMPARE(testWidget->selectedItems().count(), 1);
}
@@ -749,10 +862,10 @@ void tst_QListWidget::selectedItems()
QCOMPARE(testWidget->count(), itemCount);
// hide items
foreach (int row, hiddenRows)
- testWidget->setItemHidden(testWidget->item(row), true);
+ testWidget->item(row)->setHidden(true);
// select items
foreach (int row, selectedRows)
- testWidget->setItemSelected(testWidget->item(row), true);
+ testWidget->item(row)->setSelected(true);
// check that the correct number of items and the expected items are there
QList<QListWidgetItem *> selectedItems = testWidget->selectedItems();
@@ -763,7 +876,7 @@ void tst_QListWidget::selectedItems()
//check that isSelected agrees with selectedItems
for (int i=0; i<itemCount; ++i) {
QListWidgetItem *item = testWidget->item(i);
- if (testWidget->isItemSelected(item))
+ if (item->isSelected())
QVERIFY(selectedItems.contains(item));
}
}
@@ -1743,5 +1856,27 @@ void tst_QListWidget::QTBUG50891_ensureSelectionModelSignalConnectionsAreSet()
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+void tst_QListWidget::clearItemData()
+{
+ QListWidget list;
+ for (int i = 0 ; i < 4; ++i)
+ new QListWidgetItem(QString::number(i), &list);
+ QSignalSpy dataChangeSpy(list.model(), &QAbstractItemModel::dataChanged);
+ QVERIFY(dataChangeSpy.isValid());
+ QVERIFY(!list.model()->clearItemData(QModelIndex()));
+ QCOMPARE(dataChangeSpy.size(), 0);
+ QVERIFY(list.model()->clearItemData(list.model()->index(0, 0)));
+ QVERIFY(!list.model()->index(0, 0).data().isValid());
+ QCOMPARE(dataChangeSpy.size(), 1);
+ const QList<QVariant> dataChangeArgs = dataChangeSpy.takeFirst();
+ QCOMPARE(dataChangeArgs.at(0).value<QModelIndex>(), list.model()->index(0, 0));
+ QCOMPARE(dataChangeArgs.at(1).value<QModelIndex>(), list.model()->index(0, 0));
+ QVERIFY(dataChangeArgs.at(2).value<QVector<int>>().isEmpty());
+ QVERIFY(list.model()->clearItemData(list.model()->index(0, 0)));
+ QCOMPARE(dataChangeSpy.size(), 0);
+}
+#endif
+
QTEST_MAIN(tst_QListWidget)
#include "tst_qlistwidget.moc"
diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
index 1b95b5a3ca..e8ee735915 100644
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
@@ -2534,7 +2534,6 @@ void tst_QTableView::columnViewportPosition()
view.horizontalScrollBar()->setValue(horizontalScrollValue);
#ifdef Q_OS_WINRT
- QEXPECT_FAIL("column 1, scroll per item, 1", "Fails on WinRT - QTBUG-68297", Abort);
QEXPECT_FAIL("column 5, scroll per item, 5", "Fails on WinRT - QTBUG-68297", Abort);
QEXPECT_FAIL("column 9, scroll per item, 5", "Fails on WinRT - QTBUG-68297", Abort);
QEXPECT_FAIL("column 1, scroll per pixel 1", "Fails on WinRT - QTBUG-68297", Abort);
diff --git a/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp b/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp
index 4155ff1ec6..f97c43e347 100644
--- a/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp
+++ b/tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp
@@ -83,12 +83,18 @@ private slots:
void setItemData();
void cellWidget();
void cellWidgetGeometry();
+ void sizeHint_data();
+ void sizeHint();
void task231094();
void task219380_removeLastRow();
void task262056_sortDuplicate();
void itemWithHeaderItems();
void mimeData();
void selectedRowAfterSorting();
+ void search();
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ void clearItemData();
+#endif
private:
QTableWidget *testWidget;
@@ -159,6 +165,7 @@ void tst_QTableWidget::initTestCase()
{
testWidget = new QTableWidget();
testWidget->show();
+ QApplication::setKeyboardInputInterval(100);
}
void tst_QTableWidget::cleanupTestCase()
@@ -191,10 +198,10 @@ void tst_QTableWidget::clear()
{
QTableWidgetItem *item = new QTableWidgetItem("foo");
testWidget->setItem(0, 0, item);
- testWidget->setItemSelected(item, true);
+ item->setSelected(true);
QVERIFY(testWidget->item(0, 0) == item);
- QVERIFY(testWidget->isItemSelected(item));
+ QVERIFY(item->isSelected());
QPointer<QObjectTableItem> bla = new QObjectTableItem();
@@ -578,7 +585,7 @@ void tst_QTableWidget::selectedItems()
continue;
QTableWidgetItem *item = testWidget->item(row, column);
- if (item && testWidget->isItemSelected(item))
+ if (item && item->isSelected())
QVERIFY(selectedItems.contains(item));
}
}
@@ -1454,6 +1461,56 @@ void tst_QTableWidget::cellWidgetGeometry()
QCOMPARE(tw.visualItemRect(item).top(), le->geometry().top());
}
+void tst_QTableWidget::sizeHint_data()
+{
+ QTest::addColumn<int>("scrollBarPolicy");
+ QTest::addColumn<QSize>("viewSize");
+ QTest::newRow("ScrollBarAlwaysOn") << static_cast<int>(Qt::ScrollBarAlwaysOn) << QSize();
+ QTest::newRow("ScrollBarAlwaysOff") << static_cast<int>(Qt::ScrollBarAlwaysOff) << QSize();
+ // make sure the scrollbars are shown by resizing the view to 40x40
+ QTest::newRow("ScrollBarAsNeeded (40x40)") << static_cast<int>(Qt::ScrollBarAsNeeded) << QSize(40, 40);
+ QTest::newRow("ScrollBarAsNeeded (1000x1000)") << static_cast<int>(Qt::ScrollBarAsNeeded) << QSize(1000, 1000);
+}
+
+void tst_QTableWidget::sizeHint()
+{
+ QFETCH(int, scrollBarPolicy);
+ QFETCH(QSize, viewSize);
+
+ QTableWidget view(2, 2);
+ view.setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
+ view.setVerticalScrollBarPolicy(static_cast<Qt::ScrollBarPolicy>(scrollBarPolicy));
+ view.setHorizontalScrollBarPolicy(static_cast<Qt::ScrollBarPolicy>(scrollBarPolicy));
+ for (int r = 0 ; r < view.rowCount(); ++r)
+ for (int c = 0 ; c < view.columnCount(); ++c)
+ view.setItem(r, c, new QTableWidgetItem(QString("%1/%2").arg(r).arg(c)));
+
+ view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
+ if (viewSize.isValid()) {
+ view.resize(viewSize);
+ view.setColumnWidth(0, 100);
+ view.setRowHeight(0, 100);
+ QTRY_COMPARE(view.size(), viewSize);
+ }
+
+ auto sizeHint = view.sizeHint();
+ view.hide();
+ QCOMPARE(view.sizeHint(), sizeHint);
+
+ view.horizontalHeader()->hide();
+ view.show();
+ sizeHint = view.sizeHint();
+ view.hide();
+ QCOMPARE(view.sizeHint(), sizeHint);
+
+ view.verticalHeader()->hide();
+ view.show();
+ sizeHint = view.sizeHint();
+ view.hide();
+ QCOMPARE(view.sizeHint(), sizeHint);
+}
+
void tst_QTableWidget::task231094()
{
QTableWidget tw(5, 3);
@@ -1543,6 +1600,7 @@ public:
using QTableWidget::mimeData;
using QTableWidget::indexFromItem;
+ using QTableWidget::keyPressEvent;
};
void tst_QTableWidget::mimeData()
@@ -1617,5 +1675,67 @@ void tst_QTableWidget::selectedRowAfterSorting()
}
}
+void tst_QTableWidget::search()
+{
+ auto createItem = [](const QString &txt)
+ {
+ auto item = new QTableWidgetItem(txt);
+ item->setFlags(item->flags().setFlag(Qt::ItemIsEditable, false));
+ return item;
+ };
+
+ auto checkSeries = [](TestTableWidget &tw, const QVector<QPair<QKeyEvent, int>> &series)
+ {
+ for (const auto &p : series) {
+ QKeyEvent e = p.first;
+ tw.keyPressEvent(&e);
+ QVERIFY(tw.selectionModel()->isSelected(tw.model()->index(p.second, 0)));
+ }
+ };
+ TestTableWidget tw(5, 1);
+ tw.setItem(0, 0, createItem("12"));
+ tw.setItem(1, 0, createItem("123"));
+ tw.setItem(2, 0, createItem("123 4"));
+ tw.setItem(3, 0, createItem("123 5"));
+ tw.setItem(4, 0, createItem(" "));
+ tw.show();
+
+ QKeyEvent evSpace(QEvent::KeyPress, Qt::Key_Space, Qt::NoModifier, " ");
+ QKeyEvent ev1(QEvent::KeyPress, Qt::Key_1, Qt::NoModifier, "1");
+ QKeyEvent ev2(QEvent::KeyPress, Qt::Key_2, Qt::NoModifier, "2");
+ QKeyEvent ev3(QEvent::KeyPress, Qt::Key_3, Qt::NoModifier, "3");
+ QKeyEvent ev4(QEvent::KeyPress, Qt::Key_4, Qt::NoModifier, "4");
+ QKeyEvent ev5(QEvent::KeyPress, Qt::Key_5, Qt::NoModifier, "5");
+
+ checkSeries(tw, {{evSpace, 4}, {ev1, 4}});
+ QTest::qWait(QApplication::keyboardInputInterval() * 2);
+ checkSeries(tw, {{ev1, 0}, {ev2, 0}, {ev3, 1}, {evSpace, 2}, {ev5, 3}});
+ QTest::qWait(QApplication::keyboardInputInterval() * 2);
+ checkSeries(tw, {{ev1, 0}, {ev2, 0}, {ev3, 1}, {evSpace, 2}, {ev4, 2}});
+}
+
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+void tst_QTableWidget::clearItemData()
+{
+ QTableWidget table(3,3);
+ for (int r = 0; r < 3; r++)
+ for (int c = 0; c < 3; c++)
+ table.setItem(r,c,new QTableWidgetItem(QStringLiteral("0")));
+ QSignalSpy dataChangeSpy(table.model(), &QAbstractItemModel::dataChanged);
+ QVERIFY(dataChangeSpy.isValid());
+ QVERIFY(!table.model()->clearItemData(QModelIndex()));
+ QCOMPARE(dataChangeSpy.size(), 0);
+ QVERIFY(table.model()->clearItemData(table.model()->index(0, 0)));
+ QVERIFY(!table.model()->index(0, 0).data().isValid());
+ QCOMPARE(dataChangeSpy.size(), 1);
+ const QList<QVariant> dataChangeArgs = dataChangeSpy.takeFirst();
+ QCOMPARE(dataChangeArgs.at(0).value<QModelIndex>(), table.model()->index(0, 0));
+ QCOMPARE(dataChangeArgs.at(1).value<QModelIndex>(), table.model()->index(0, 0));
+ QVERIFY(dataChangeArgs.at(2).value<QVector<int>>().isEmpty());
+ QVERIFY(table.model()->clearItemData(table.model()->index(0, 0)));
+ QCOMPARE(dataChangeSpy.size(), 0);
+}
+#endif
+
QTEST_MAIN(tst_QTableWidget)
#include "tst_qtablewidget.moc"
diff --git a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
index 8f9afeea4d..ece2e9a220 100644
--- a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
+++ b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
@@ -69,6 +69,7 @@ public slots:
void selectionOrderTest();
private slots:
+ void initTestCase() { QApplication::setKeyboardInputInterval(100); }
void getSetCheck();
// one test per QTreeView property
@@ -1647,50 +1648,96 @@ void tst_QTreeView::expandAndCollapse()
}
}
+static void checkExpandState(const QAbstractItemModel &model, const QTreeView &view,
+ const QModelIndex &startIdx, bool bIsExpanded, int *count)
+{
+ *count = 0;
+ QStack<QModelIndex> parents;
+ parents.push(startIdx);
+ if (startIdx.isValid()) {
+ QCOMPARE(view.isExpanded(startIdx), bIsExpanded);
+ *count += 1;
+ }
+ while (!parents.isEmpty()) {
+ const QModelIndex p = parents.pop();
+ const int rows = model.rowCount(p);
+ for (int r = 0; r < rows; ++r) {
+ const QModelIndex c = model.index(r, 0, p);
+ QCOMPARE(view.isExpanded(c), bIsExpanded);
+ parents.push(c);
+ }
+ *count += rows;
+ }
+}
+
void tst_QTreeView::expandAndCollapseAll()
{
- QtTestModel model(3, 2);
- model.levels = 2;
+ QStandardItemModel model;
+ // QtTestModel has a broken parent/child handling which will break the test
+ for (int i1 = 0; i1 < 3; ++i1) {
+ QStandardItem *s1 = new QStandardItem;
+ s1->setText(QString::number(i1));
+ model.appendRow(s1);
+ for (int i2 = 0; i2 < 3; ++i2) {
+ QStandardItem *s2 = new QStandardItem;
+ s2->setText(QStringLiteral("%1 - %2").arg(i1).arg(i2));
+ s1->appendRow(s2);
+ for (int i3 = 0; i3 < 3; ++i3) {
+ QStandardItem *s3 = new QStandardItem;
+ s3->setText(QStringLiteral("%1 - %2 - %3").arg(i1).arg(i2).arg(i3));
+ s2->appendRow(s3);
+ }
+ }
+ }
QTreeView view;
view.setUniformRowHeights(true);
view.setModel(&model);
+ view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
- QSignalSpy expandedSpy(&view, SIGNAL(expanded(QModelIndex)));
- QSignalSpy collapsedSpy(&view, SIGNAL(collapsed(QModelIndex)));
+ QSignalSpy expandedSpy(&view, &QTreeView::expanded);
+ QSignalSpy collapsedSpy(&view, &QTreeView::collapsed);
+ int count;
view.expandAll();
- view.show();
-
+ checkExpandState(model, view, QModelIndex(), true, &count);
QCOMPARE(collapsedSpy.count(), 0);
+ QCOMPARE(expandedSpy.count(), 39); // == 3 (first) + 9 (second) + 27 (third level)
+ QCOMPARE(count, 39);
- QStack<QModelIndex> parents;
- parents.push(QModelIndex());
- int count = 0;
- while (!parents.isEmpty()) {
- QModelIndex p = parents.pop();
- int rows = model.rowCount(p);
- for (int r = 0; r < rows; ++r)
- QVERIFY(view.isExpanded(model.index(r, 0, p)));
- count += rows;
- for (int r = 0; r < rows; ++r)
- parents.push(model.index(r, 0, p));
- }
- QCOMPARE(expandedSpy.count(), 12); // == (3+1)*(2+1) from QtTestModel model(3, 2);
-
+ collapsedSpy.clear();
+ expandedSpy.clear();
view.collapseAll();
-
- parents.push(QModelIndex());
- count = 0;
- while (!parents.isEmpty()) {
- QModelIndex p = parents.pop();
- int rows = model.rowCount(p);
- for (int r = 0; r < rows; ++r)
- QVERIFY(!view.isExpanded(model.index(r, 0, p)));
- count += rows;
- for (int r = 0; r < rows; ++r)
- parents.push(model.index(r, 0, p));
- }
- QCOMPARE(collapsedSpy.count(), 12);
+ checkExpandState(model, view, QModelIndex(), false, &count);
+ QCOMPARE(collapsedSpy.count(), 39);
+ QCOMPARE(expandedSpy.count(), 0);
+ QCOMPARE(count, 39);
+
+ collapsedSpy.clear();
+ expandedSpy.clear();
+ view.expandRecursively(model.index(0, 0));
+ QCOMPARE(expandedSpy.count(), 13); // 1 + 3 + 9
+
+ checkExpandState(model, view, model.index(0, 0), true, &count);
+ QCOMPARE(count, 13);
+ checkExpandState(model, view, model.index(1, 0), false, &count);
+ QCOMPARE(count, 13);
+ checkExpandState(model, view, model.index(2, 0), false, &count);
+ QCOMPARE(count, 13);
+
+ expandedSpy.clear();
+ view.collapseAll();
+ view.expandRecursively(model.index(0, 0), 1);
+ QCOMPARE(expandedSpy.count(), 4); // 1 + 3
+ view.expandRecursively(model.index(0, 0), 2);
+ QCOMPARE(expandedSpy.count(), 13); // (1 + 3) + 9
+
+ checkExpandState(model, view, model.index(0, 0), true, &count);
+ QCOMPARE(count, 13);
+ checkExpandState(model, view, model.index(1, 0), false, &count);
+ QCOMPARE(count, 13);
+ checkExpandState(model, view, model.index(2, 0), false, &count);
+ QCOMPARE(count, 13);
}
void tst_QTreeView::expandWithNoChildren()
@@ -2435,6 +2482,8 @@ void tst_QTreeView::selection()
for (int i = 0;i < 10; ++i)
m.setData(m.index(i, 0), i);
treeView.setModel(&m);
+ treeView.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&treeView));
treeView.setSelectionBehavior(QAbstractItemView::SelectRows);
treeView.setSelectionMode(QAbstractItemView::ExtendedSelection);
@@ -2446,6 +2495,13 @@ void tst_QTreeView::selection()
QTest::mousePress(treeView.viewport(), Qt::LeftButton, 0, treeView.visualRect(m.index(1, 0)).center());
QTest::keyPress(treeView.viewport(), Qt::Key_Down);
+ auto selectedRows = treeView.selectionModel()->selectedRows();
+ QCOMPARE(selectedRows.size(), 1);
+ QCOMPARE(selectedRows.first(), m.index(2, 0, QModelIndex()));
+ QTest::keyPress(treeView.viewport(), Qt::Key_5);
+ selectedRows = treeView.selectionModel()->selectedRows();
+ QCOMPARE(selectedRows.size(), 1);
+ QCOMPARE(selectedRows.first(), m.index(5, 0, QModelIndex()));
}
//From task 151686 QTreeView ExtendedSelection selects hidden rows
@@ -2737,7 +2793,7 @@ void tst_QTreeView::sortByColumn()
view.setSortingEnabled(sortingEnabled);
view.setModel(&model);
- view.sortByColumn(1);
+ view.sortByColumn(1, Qt::DescendingOrder);
QCOMPARE(view.header()->sortIndicatorSection(), 1);
QCOMPARE(view.model()->data(view.model()->index(0,1)).toString(), QString::fromLatin1("h"));
QCOMPARE(view.model()->data(view.model()->index(1,1)).toString(), QString::fromLatin1("g"));
@@ -3047,7 +3103,7 @@ void tst_QTreeView::evilModel()
view.resizeColumnToContents(1);
model.change();
- view.sortByColumn(1);
+ view.sortByColumn(1, Qt::DescendingOrder);
model.change();
view.selectAll();
@@ -3891,7 +3947,7 @@ void tst_QTreeView::task254234_proxySort()
model.setItem(2,1,new QStandardItem("h"));
model.setItem(3,1,new QStandardItem("f"));
- view.sortByColumn(1);
+ view.sortByColumn(1, Qt::DescendingOrder);
view.setSortingEnabled(true);
QSortFilterProxyModel proxy;
@@ -4079,6 +4135,30 @@ void tst_QTreeView::keyboardNavigationWithDisabled()
QCOMPARE(view.currentIndex(), model.index(12, 0));
QTest::keyClick(view.viewport(), Qt::Key_Up);
QCOMPARE(view.currentIndex(), model.index(6, 0));
+ // QTBUG-44746 - when first/last item is disabled,
+ // Key_PageUp/Down/Home/End will not work as expected.
+ model.item(0)->setEnabled(false);
+ model.item(1)->setEnabled(true);
+ model.item(2)->setEnabled(true);
+ model.item(model.rowCount() - 1)->setEnabled(false);
+ model.item(model.rowCount() - 2)->setEnabled(true);
+ model.item(model.rowCount() - 3)->setEnabled(true);
+ // PageUp
+ view.setCurrentIndex(model.index(2, 0));
+ QCOMPARE(view.currentIndex(), model.index(2, 0));
+ QTest::keyClick(view.viewport(), Qt::Key_PageUp);
+ QCOMPARE(view.currentIndex(), model.index(1, 0));
+ // PageDown
+ view.setCurrentIndex(model.index(model.rowCount() - 3, 0));
+ QCOMPARE(view.currentIndex(), model.index(model.rowCount() - 3, 0));
+ QTest::keyClick(view.viewport(), Qt::Key_PageDown);
+ QCOMPARE(view.currentIndex(), model.index(model.rowCount() - 2, 0));
+ // Key_Home
+ QTest::keyClick(view.viewport(), Qt::Key_Home);
+ QCOMPARE(view.currentIndex(), model.index(1, 0));
+ // Key_End
+ QTest::keyClick(view.viewport(), Qt::Key_End);
+ QCOMPARE(view.currentIndex(), model.index(model.rowCount() - 2, 0));
}
class RemoveColumnOne : public QSortFilterProxyModel
diff --git a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp
index adb2c54751..f2ed72be52 100644
--- a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp
+++ b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp
@@ -99,6 +99,7 @@ private slots:
void insertTopLevelItems_data();
void insertTopLevelItems();
void keyboardNavigation();
+ void keyboardNavigationWithHidden();
void scrollToItem();
void setSortingEnabled();
void match();
@@ -115,6 +116,8 @@ private slots:
void changeDataWithSorting();
void changeDataWithStableSorting_data();
void changeDataWithStableSorting();
+ void sizeHint_data();
+ void sizeHint();
void sortedIndexOfChild_data();
void sortedIndexOfChild();
@@ -138,6 +141,7 @@ private slots:
void expandAndCallapse();
void itemData();
void setDisabled();
+ void setSpanned();
void removeSelectedItem();
void removeCurrentItem();
void removeCurrentItem_task186451();
@@ -161,6 +165,9 @@ private slots:
void getMimeDataWithInvalidItem();
void testVisualItemRect();
void reparentHiddenItem();
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ void clearItemData();
+#endif
public slots:
void itemSelectionChanged();
@@ -603,31 +610,31 @@ void tst_QTreeWidget::setItemHidden()
QVERIFY(testWidget->visualItemRect(child).isValid()
&& testWidget->viewport()->rect().intersects(testWidget->visualItemRect(child)));
- QVERIFY(!testWidget->isItemHidden(parent));
- QVERIFY(!testWidget->isItemHidden(child));
+ QVERIFY(!parent->isHidden());
+ QVERIFY(!child->isHidden());
- testWidget->setItemHidden(parent, true);
+ parent->setHidden(true);
QVERIFY(!(testWidget->visualItemRect(parent).isValid()
&& testWidget->viewport()->rect().intersects(testWidget->visualItemRect(parent))));
QVERIFY(!(testWidget->visualItemRect(child).isValid()
&& testWidget->viewport()->rect().intersects(testWidget->visualItemRect(child))));
- QVERIFY(testWidget->isItemHidden(parent));
- QVERIFY(!testWidget->isItemHidden(child));
+ QVERIFY(parent->isHidden());
+ QVERIFY(!child->isHidden());
// From task 78670 (This caused an core dump)
// Check if we can set an item visible if it already is visible.
- testWidget->setItemHidden(parent, false);
- testWidget->setItemHidden(parent, false);
- QVERIFY(!testWidget->isItemHidden(parent));
+ parent->setHidden(false);
+ parent->setHidden(false);
+ QVERIFY(!parent->isHidden());
// hide, hide and then unhide.
- testWidget->setItemHidden(parent, true);
- testWidget->setItemHidden(parent, true);
- testWidget->setItemHidden(parent, false);
- QVERIFY(!testWidget->isItemHidden(parent));
+ parent->setHidden(true);
+ parent->setHidden(true);
+ parent->setHidden(false);
+ QVERIFY(!parent->isHidden());
}
@@ -653,7 +660,7 @@ void tst_QTreeWidget::setItemHidden2()
if (testWidget->topLevelItemCount() > 0) {
top = testWidget->topLevelItem(0);
- testWidget->setItemExpanded(top, true);
+ top->setExpanded(true);
}
if (testWidget->topLevelItemCount() > 0) {
@@ -661,8 +668,8 @@ void tst_QTreeWidget::setItemHidden2()
for (int i = 0; i < top->childCount(); i++) {
leaf = top->child(i);
if (leaf->text(0).toInt() % 2 == 0) {
- if (!testWidget->isItemHidden(leaf)) {
- testWidget->setItemHidden(leaf, true);
+ if (!leaf->isHidden()) {
+ leaf->setHidden(true);
}
}
}
@@ -816,7 +823,7 @@ void tst_QTreeWidget::selectedItems()
else
item = item->child(index);
}
- testWidget->setItemSelected(item, true);
+ item->setSelected(true);
}
// hide rows
@@ -828,7 +835,7 @@ void tst_QTreeWidget::selectedItems()
else
item = item->child(index);
}
- testWidget->setItemHidden(item, true);
+ item->setHidden(true);
}
// open/close toplevel
@@ -857,18 +864,20 @@ void tst_QTreeWidget::selectedItems()
// compare isSelected
for (int t=0; t<testWidget->topLevelItemCount(); ++t) {
QTreeWidgetItem *top = testWidget->topLevelItem(t);
- if (testWidget->isItemSelected(top) && !testWidget->isItemHidden(top))
+ if (top->isSelected() && !top->isHidden())
QVERIFY(sel.contains(top));
for (int c=0; c<top->childCount(); ++c) {
QTreeWidgetItem *child = top->child(c);
- if (testWidget->isItemSelected(child) && !testWidget->isItemHidden(child))
+ if (child->isSelected() && !child->isHidden())
QVERIFY(sel.contains(child));
}
}
+#if QT_DEPRECATED_SINCE(5, 13)
// Possible to select null without crashing?
testWidget->setItemSelected(0, true);
QVERIFY(!testWidget->isItemSelected(0));
+#endif
// unselect
foreach (IntList itemPath, selectedItems) {
@@ -879,7 +888,7 @@ void tst_QTreeWidget::selectedItems()
else
item = item->child(index);
}
- testWidget->setItemSelected(item, false);
+ item->setSelected(false);
}
QCOMPARE(testWidget->selectedItems().count(), 0);
}
@@ -1005,21 +1014,21 @@ void tst_QTreeWidget::expand()
QTreeWidgetItem *topLevelItem = testWidget->topLevelItem(topLevelIndex);
QTreeWidgetItem *childItem = topLevelItem->child(childIndex);
- QVERIFY(!testWidget->isItemExpanded(topLevelItem));
- testWidget->setItemExpanded(topLevelItem, true);
- QVERIFY(testWidget->isItemExpanded(topLevelItem));
+ QVERIFY(!topLevelItem->isExpanded());
+ topLevelItem->setExpanded(true);
+ QVERIFY(topLevelItem->isExpanded());
- QVERIFY(!testWidget->isItemExpanded(childItem));
- testWidget->setItemExpanded(childItem, true);
- QVERIFY(testWidget->isItemExpanded(childItem));
+ QVERIFY(!childItem->isExpanded());
+ childItem->setExpanded(true);
+ QVERIFY(childItem->isExpanded());
- QVERIFY(testWidget->isItemExpanded(topLevelItem));
- testWidget->setItemExpanded(topLevelItem, false);
- QVERIFY(!testWidget->isItemExpanded(topLevelItem));
+ QVERIFY(topLevelItem->isExpanded());
+ topLevelItem->setExpanded(false);
+ QVERIFY(!topLevelItem->isExpanded());
- QVERIFY(testWidget->isItemExpanded(childItem));
- testWidget->setItemExpanded(childItem, false);
- QVERIFY(!testWidget->isItemExpanded(childItem));
+ QVERIFY(childItem->isExpanded());
+ childItem->setExpanded(false);
+ QVERIFY(!childItem->isExpanded());
}
void tst_QTreeWidget::checkState_data()
@@ -1520,7 +1529,7 @@ void tst_QTreeWidget::keyboardNavigation()
}
break;
case Qt::Key_Down:
- if (testWidget->isItemExpanded(item)) {
+ if (item->isExpanded()) {
row = 0;
item = item->child(row);
} else {
@@ -1533,7 +1542,7 @@ void tst_QTreeWidget::keyboardNavigation()
break;
case Qt::Key_Left:
if (checkScroll) {
- QVERIFY(testWidget->isItemExpanded(item));
+ QVERIFY(item->isExpanded());
QCOMPARE(scrollBar->value(), valueBeforeClick - scrollBar->singleStep());
}
// windows style right will walk to the parent
@@ -1567,6 +1576,33 @@ void tst_QTreeWidget::keyboardNavigation()
}
}
+void tst_QTreeWidget::keyboardNavigationWithHidden()
+{
+ QTreeWidget tw;
+ for (int i = 0; i < 1000; ++i)
+ tw.addTopLevelItem(new QTreeWidgetItem({QString::number(i), QStringLiteral("second col")}));
+ // QTBUG-34832 - when first/last item is hidden,
+ // Key_PageUp/Down/Home/End will not work as expected.
+ tw.topLevelItem(0)->setHidden(true);
+ tw.topLevelItem(tw.model()->rowCount() - 1)->setHidden(true);
+ // PageUp
+ tw.setCurrentIndex(tw.model()->index(2, 0));
+ QCOMPARE(tw.currentIndex(), tw.model()->index(2, 0));
+ QTest::keyClick(tw.viewport(), Qt::Key_PageUp);
+ QCOMPARE(tw.currentIndex(), tw.model()->index(1, 0));
+ // PageDown
+ tw.setCurrentIndex(tw.model()->index(tw.model()->rowCount() - 3, 0));
+ QCOMPARE(tw.currentIndex(), tw.model()->index(tw.model()->rowCount() - 3, 0));
+ QTest::keyClick(tw.viewport(), Qt::Key_PageDown);
+ QCOMPARE(tw.currentIndex(), tw.model()->index(tw.model()->rowCount() - 2, 0));
+ // Key_Home
+ QTest::keyClick(tw.viewport(), Qt::Key_Home);
+ QCOMPARE(tw.currentIndex(), tw.model()->index(1, 0));
+ // Key_End
+ QTest::keyClick(tw.viewport(), Qt::Key_End);
+ QCOMPARE(tw.currentIndex(), tw.model()->index(tw.model()->rowCount() - 2, 0));
+}
+
void tst_QTreeWidget::scrollToItem()
{
// Check if all parent nodes of the item found are expanded.
@@ -1592,9 +1628,9 @@ void tst_QTreeWidget::scrollToItem()
QCOMPARE(search->text(0), QLatin1String("111"));
QTreeWidgetItem *par = search->parent();
- QVERIFY(testWidget->isItemExpanded(par));
+ QVERIFY(par->isExpanded());
par = par->parent();
- QVERIFY(testWidget->isItemExpanded(par));
+ QVERIFY(par->isExpanded());
}
// From task #85413
@@ -1880,9 +1916,8 @@ void tst_QTreeWidget::setData()
QCOMPARE(qvariant_cast<QSize>(item->data(j, Qt::SizeHintRole)), sizeHint);
QCOMPARE(qvariant_cast<QFont>(item->data(j, Qt::FontRole)), font);
QCOMPARE(qvariant_cast<int>(item->data(j, Qt::TextAlignmentRole)), int(textAlignment));
- QCOMPARE(qvariant_cast<QBrush>(item->data(j, Qt::BackgroundColorRole)), QBrush(backgroundColor));
QCOMPARE(qvariant_cast<QBrush>(item->data(j, Qt::BackgroundRole)), QBrush(backgroundColor));
- QCOMPARE(qvariant_cast<QColor>(item->data(j, Qt::TextColorRole)), textColor);
+ QCOMPARE(qvariant_cast<QColor>(item->data(j, Qt::ForegroundRole)), textColor);
QCOMPARE(qvariant_cast<int>(item->data(j, Qt::CheckStateRole)), int(checkState));
item->setBackground(j, pixmap);
@@ -1902,8 +1937,8 @@ void tst_QTreeWidget::setData()
item->setData(j, Qt::SizeHintRole, QVariant());
item->setData(j, Qt::FontRole, QVariant());
item->setData(j, Qt::TextAlignmentRole, QVariant());
- item->setData(j, Qt::BackgroundColorRole, QVariant());
- item->setData(j, Qt::TextColorRole, QVariant());
+ item->setData(j, Qt::BackgroundRole, QVariant());
+ item->setData(j, Qt::ForegroundRole, QVariant());
item->setData(j, Qt::CheckStateRole, QVariant());
QCOMPARE(itemChangedSpy.count(), 11);
itemChangedSpy.clear();
@@ -1916,9 +1951,8 @@ void tst_QTreeWidget::setData()
QCOMPARE(item->data(j, Qt::SizeHintRole), QVariant());
QCOMPARE(item->data(j, Qt::FontRole), QVariant());
QCOMPARE(item->data(j, Qt::TextAlignmentRole), QVariant());
- QCOMPARE(item->data(j, Qt::BackgroundColorRole), QVariant());
QCOMPARE(item->data(j, Qt::BackgroundRole), QVariant());
- QCOMPARE(item->data(j, Qt::TextColorRole), QVariant());
+ QCOMPARE(item->data(j, Qt::ForegroundRole), QVariant());
QCOMPARE(item->data(j, Qt::CheckStateRole), QVariant());
}
}
@@ -2618,6 +2652,50 @@ void tst_QTreeWidget::changeDataWithStableSorting()
QCOMPARE(layoutChangedSpy.count(), reorderingExpected ? 1 : 0);
}
+void tst_QTreeWidget::sizeHint_data()
+{
+ QTest::addColumn<int>("scrollBarPolicy");
+ QTest::addColumn<QSize>("viewSize");
+ QTest::newRow("ScrollBarAlwaysOn") << static_cast<int>(Qt::ScrollBarAlwaysOn) << QSize();
+ QTest::newRow("ScrollBarAlwaysOff") << static_cast<int>(Qt::ScrollBarAlwaysOff) << QSize();
+ // make sure the scrollbars are shown by resizing the view to 40x40
+ QTest::newRow("ScrollBarAsNeeded (40x40)") << static_cast<int>(Qt::ScrollBarAsNeeded) << QSize(40, 40);
+ QTest::newRow("ScrollBarAsNeeded (1000x1000)") << static_cast<int>(Qt::ScrollBarAsNeeded) << QSize(1000, 1000);
+}
+
+void tst_QTreeWidget::sizeHint()
+{
+ QFETCH(int, scrollBarPolicy);
+ QFETCH(QSize, viewSize);
+
+ QTreeWidget view;
+ view.setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
+ view.setVerticalScrollBarPolicy(static_cast<Qt::ScrollBarPolicy>(scrollBarPolicy));
+ view.setHorizontalScrollBarPolicy(static_cast<Qt::ScrollBarPolicy>(scrollBarPolicy));
+ view.setColumnCount(2);
+ for (int i = 0 ; i < view.columnCount(); ++i)
+ view.addTopLevelItem(new QTreeWidgetItem(QStringList{"foo","bar"}));
+
+ view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
+
+ if (viewSize.isValid()) {
+ view.resize(viewSize);
+ view.setColumnWidth(0, 100);
+ QTRY_COMPARE(view.size(), viewSize);
+ }
+
+ auto sizeHint = view.sizeHint();
+ view.hide();
+ QCOMPARE(view.sizeHint(), sizeHint);
+
+ view.header()->hide();
+ view.show();
+ sizeHint = view.sizeHint();
+ view.hide();
+ QCOMPARE(view.sizeHint(), sizeHint);
+}
+
void tst_QTreeWidget::itemOperatorLessThan()
{
QTreeWidget tw;
@@ -2769,6 +2847,28 @@ void tst_QTreeWidget::setDisabled()
QCOMPARE(takenChildren.items[1]->isDisabled(), false);
}
+void tst_QTreeWidget::setSpanned()
+{
+ QTreeWidget w;
+ QTreeWidgetItem *i1 = new QTreeWidgetItem();
+ QScopedPointer<QTreeWidgetItem> i2(new QTreeWidgetItem());
+
+ QTreeWidgetItem *top = new QTreeWidgetItem(&w);
+ top->addChild(i1);
+
+ top->setFirstColumnSpanned(true);
+ QCOMPARE(top->isFirstColumnSpanned(), true);
+ QCOMPARE(i1->isFirstColumnSpanned(), false);
+ QCOMPARE(i2->isFirstColumnSpanned(), false);
+
+ top->setFirstColumnSpanned(false);
+ i1->setFirstColumnSpanned(true);
+ i2->setFirstColumnSpanned(true);
+ QCOMPARE(top->isFirstColumnSpanned(), false);
+ QCOMPARE(i1->isFirstColumnSpanned(), true);
+ QCOMPARE(i2->isFirstColumnSpanned(), false);
+}
+
void tst_QTreeWidget::removeSelectedItem()
{
const QScopedPointer <QTreeWidget> w(new QTreeWidget);
@@ -2870,14 +2970,14 @@ void tst_QTreeWidget::randomExpand()
QTreeWidgetItem *newItem1 = 0;
for (int i = 0; i < 100; i++) {
newItem1 = new QTreeWidgetItem(&tree, item1);
- tree.setItemExpanded(newItem1, true);
- QCOMPARE(tree.isItemExpanded(newItem1), true);
+ newItem1->setExpanded(true);
+ QCOMPARE(newItem1->isExpanded(), true);
QTreeWidgetItem *x = new QTreeWidgetItem();
- QCOMPARE(tree.isItemExpanded(newItem1), true);
+ QCOMPARE(newItem1->isExpanded(), true);
newItem1->addChild(x);
- QCOMPARE(tree.isItemExpanded(newItem1), true);
+ QCOMPARE(newItem1->isExpanded(), true);
}
}
@@ -2890,19 +2990,19 @@ void tst_QTreeWidget::crashTest()
QTreeWidgetItem *item1 = new QTreeWidgetItem(tree);
item1->setText(0, "item1");
- tree->setItemExpanded(item1, true);
+ item1->setExpanded(true);
QTreeWidgetItem *item2 = new QTreeWidgetItem(item1);
item2->setText(0, "item2");
QTreeWidgetItem *item3 = new QTreeWidgetItem(tree, item1);
item3->setText(0, "item3");
- tree->setItemExpanded(item3, true);
+ item3->setExpanded(true);
QTreeWidgetItem *item4 = new QTreeWidgetItem(item3);
item4->setText(0, "item4");
QTreeWidgetItem *item5 = new QTreeWidgetItem(tree, item3);
item5->setText(0, "item5");
- tree->setItemExpanded(item5, true);
+ item5->setExpanded(true);
QTreeWidgetItem *item6 = new QTreeWidgetItem(item5);
item6->setText(0, "item6");
@@ -3004,7 +3104,7 @@ void tst_QTreeWidget::task191552_rtl()
opt.features = QStyleOptionViewItem::HasDisplay | QStyleOptionViewItem::HasCheckIndicator;
opt.checkState = Qt::Checked;
opt.widget = &tw;
- const QRect checkRect = tw.style()->subElementRect(QStyle::SE_ViewItemCheckIndicator, &opt, &tw);
+ const QRect checkRect = tw.style()->subElementRect(QStyle::SE_ItemViewItemCheckIndicator, &opt, &tw);
QTest::mouseClick(tw.viewport(), Qt::LeftButton, Qt::NoModifier, checkRect.center());
QCOMPARE(item->checkState(0), Qt::Unchecked);
@@ -3218,7 +3318,7 @@ void tst_QTreeWidget::nonEditableTristate()
option.checkState = item->checkState(0);
const int checkMargin = qApp->style()->pixelMetric(QStyle::PM_FocusFrameHMargin, 0, 0) + 1;
- QPoint pos = qApp->style()->subElementRect(QStyle::SE_ViewItemCheckIndicator, &option, 0).center() + QPoint(checkMargin, 0);
+ QPoint pos = qApp->style()->subElementRect(QStyle::SE_ItemViewItemCheckIndicator, &option, 0).center() + QPoint(checkMargin, 0);
QTest::mouseClick(tree->viewport(), Qt::LeftButton, Qt::NoModifier, pos);
QCOMPARE(int(item->checkState(0)), int(Qt::Checked));
@@ -3530,5 +3630,43 @@ void tst_QTreeWidget::reparentHiddenItem()
QVERIFY(grandChild->isHidden());
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+void tst_QTreeWidget::clearItemData()
+{
+ QTreeWidget tree;
+ QAbstractItemModel* model = tree.model();
+ QVERIFY(model->insertColumn(0));
+ QVERIFY(model->insertRow(0));
+ const QModelIndex parentIdx = model->index(0, 0);
+ QVERIFY(model->insertColumn(0, parentIdx));
+ QVERIFY(model->insertRow(0, parentIdx));
+ const QModelIndex childIdx = model->index(0, 0, parentIdx);
+ model->setData(parentIdx, QStringLiteral("parent"));
+ model->setData(parentIdx, QStringLiteral("parent"), Qt::UserRole);
+ model->setData(childIdx, QStringLiteral("child"));
+ QSignalSpy dataChangeSpy(model, &QAbstractItemModel::dataChanged);
+ QVERIFY(dataChangeSpy.isValid());
+ QVERIFY(!model->clearItemData(QModelIndex()));
+ QCOMPARE(dataChangeSpy.size(), 0);
+ QVERIFY(model->clearItemData(parentIdx));
+ QVERIFY(!model->data(parentIdx).isValid());
+ QVERIFY(!model->data(parentIdx, Qt::UserRole).isValid());
+ QCOMPARE(dataChangeSpy.size(), 1);
+ QList<QVariant> dataChangeArgs = dataChangeSpy.takeFirst();
+ QCOMPARE(dataChangeArgs.at(0).value<QModelIndex>(), parentIdx);
+ QCOMPARE(dataChangeArgs.at(1).value<QModelIndex>(), parentIdx);
+ QVERIFY(dataChangeArgs.at(2).value<QVector<int>>().isEmpty());
+ QVERIFY(model->clearItemData(parentIdx));
+ QCOMPARE(dataChangeSpy.size(), 0);
+ QVERIFY(model->clearItemData(childIdx));
+ QVERIFY(!model->data(childIdx).isValid());
+ QCOMPARE(dataChangeSpy.size(), 1);
+ dataChangeArgs = dataChangeSpy.takeFirst();
+ QCOMPARE(dataChangeArgs.at(0).value<QModelIndex>(), childIdx);
+ QCOMPARE(dataChangeArgs.at(1).value<QModelIndex>(), childIdx);
+ QVERIFY(dataChangeArgs.at(2).value<QVector<int>>().isEmpty());
+}
+#endif
+
QTEST_MAIN(tst_QTreeWidget)
#include "tst_qtreewidget.moc"
diff --git a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
index c2c02f3766..76ca148d3f 100644
--- a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
+++ b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/tst_qtreewidgetitemiterator.cpp
@@ -95,11 +95,11 @@ void tst_QTreeWidgetItemIterator::initTestCase()
const QString topS = QLatin1String("top") + QString::number(i);
top->setText(0, topS);
switch (i) {
- case 0: testWidget->setItemHidden(top, true);break;
- case 1: testWidget->setItemHidden(top, false);break;
+ case 0: top->setHidden(true);break;
+ case 1: top->setHidden(false);break;
- case 2: testWidget->setItemSelected(top, true);break;
- case 3: testWidget->setItemSelected(top, false);break;
+ case 2: top->setSelected(true);break;
+ case 3: top->setSelected(false);break;
case 4: top->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);break;
case 5: top->setFlags(Qt::ItemIsEnabled);break;
@@ -126,11 +126,11 @@ void tst_QTreeWidgetItemIterator::initTestCase()
QTreeWidgetItem *child = new QTreeWidgetItem(top);
child->setText(0, topS + QLatin1String(",child") + QString::number(j));
switch (j) {
- case 0: testWidget->setItemHidden(child, true);break;
- case 1: testWidget->setItemHidden(child, false);break;
+ case 0: child->setHidden(true);break;
+ case 1: child->setHidden(false);break;
- case 2: testWidget->setItemSelected(child, true);break;
- case 3: testWidget->setItemSelected(child, false);break;
+ case 2: child->setSelected(true);break;
+ case 3: child->setSelected(false);break;
case 4: child->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);break;
case 5: child->setFlags(Qt::ItemIsEnabled);break;
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index d2a244b762..e2ef5635c2 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -240,6 +240,7 @@ void tst_QApplication::staticSetup()
QVERIFY(style);
QApplication::setStyle(style);
+ bool palette_changed = false;
QPalette pal;
QApplication::setPalette(pal);
@@ -247,7 +248,11 @@ void tst_QApplication::staticSetup()
QApplication::setFont(font);*/
int argc = 0;
- QApplication app(argc, 0);
+ QApplication app(argc, nullptr);
+ QObject::connect(&app, &QApplication::paletteChanged, [&palette_changed]{ palette_changed = true; });
+ QVERIFY(!palette_changed);
+ qApp->setPalette(QPalette(Qt::red));
+ QVERIFY(palette_changed);
}
@@ -355,8 +360,8 @@ void tst_QApplication::setFont_data()
int cnt = 0;
QFontDatabase fdb;
QStringList families = fdb.families();
- for (QStringList::const_iterator itr = families.begin();
- itr != families.end();
+ for (QStringList::const_iterator itr = families.cbegin();
+ itr != families.cend();
++itr) {
if (cnt < 3) {
QString family = *itr;
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 3b9c9060fa..93c8b095e0 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -7668,9 +7668,6 @@ void tst_QWidget::updateWhileMinimized()
// Restore window.
widget.showNormal();
- QTest::qWait(30);
- if (m_platform == QStringLiteral("xcb"))
- QSKIP("QTBUG-26424");
QTRY_COMPARE(widget.numPaintEvents, 1);
QCOMPARE(widget.paintedRegion, QRegion(0, 0, 50, 50));
}
@@ -9438,7 +9435,7 @@ QWidgetBackingStore* backingStore(QWidget &widget)
void tst_QWidget::rectOutsideCoordinatesLimit_task144779()
{
#ifndef QT_NO_CURSOR
- QApplication::setOverrideCursor(Qt::BlankCursor); //keep the cursor out of screen grabs
+ QGuiApplication::setOverrideCursor(Qt::BlankCursor); //keep the cursor out of screen grabs
#endif
QWidget main(0,Qt::FramelessWindowHint); //don't get confused by the size of the window frame
QPalette palette;
@@ -9475,7 +9472,7 @@ void tst_QWidget::rectOutsideCoordinatesLimit_task144779()
QTRY_COMPARE(mainPixmap.toImage().convertToFormat(QImage::Format_RGB32),
correct.toImage().convertToFormat(QImage::Format_RGB32));
#ifndef QT_NO_CURSOR
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
#endif
}
diff --git a/tests/auto/widgets/kernel/qwidgetmetatype/tst_qwidgetmetatype.cpp b/tests/auto/widgets/kernel/qwidgetmetatype/tst_qwidgetmetatype.cpp
index 077e8de328..06522b2bd3 100644
--- a/tests/auto/widgets/kernel/qwidgetmetatype/tst_qwidgetmetatype.cpp
+++ b/tests/auto/widgets/kernel/qwidgetmetatype/tst_qwidgetmetatype.cpp
@@ -41,6 +41,8 @@ public:
private slots:
void metaObject();
+ void saveAndLoadBuiltin_data();
+ void saveAndLoadBuiltin();
};
class CustomWidget : public QWidget
@@ -68,5 +70,50 @@ void tst_QWidgetMetaType::metaObject()
QCOMPARE(QMetaType::metaObjectForType(qMetaTypeId<QSizePolicy>()), &QSizePolicy::staticMetaObject);
}
+template <typename T>
+struct StreamingTraits
+{
+ // Streamable by default, as currently all widgets built-in types are streamable
+ enum { isStreamable = 1 };
+};
+
+void tst_QWidgetMetaType::saveAndLoadBuiltin_data()
+{
+ QTest::addColumn<int>("type");
+ QTest::addColumn<bool>("isStreamable");
+
+#define ADD_METATYPE_TEST_ROW(MetaTypeName, MetaTypeId, RealType) \
+ QTest::newRow(#RealType) << MetaTypeId << bool(StreamingTraits<RealType>::isStreamable);
+ QT_FOR_EACH_STATIC_WIDGETS_CLASS(ADD_METATYPE_TEST_ROW)
+#undef ADD_METATYPE_TEST_ROW
+}
+
+void tst_QWidgetMetaType::saveAndLoadBuiltin()
+{
+ QFETCH(int, type);
+ QFETCH(bool, isStreamable);
+
+ void *value = QMetaType::create(type);
+
+ QByteArray ba;
+ QDataStream stream(&ba, QIODevice::ReadWrite);
+ QCOMPARE(QMetaType::save(stream, type, value), isStreamable);
+ QCOMPARE(stream.status(), QDataStream::Ok);
+
+ if (isStreamable)
+ QVERIFY(QMetaType::load(stream, type, value));
+
+ stream.device()->seek(0);
+ stream.resetStatus();
+ QCOMPARE(QMetaType::load(stream, type, value), isStreamable);
+ QCOMPARE(stream.status(), QDataStream::Ok);
+
+ if (isStreamable)
+ QVERIFY(QMetaType::load(stream, type, value));
+
+ QMetaType::destroy(type, value);
+}
+
+
QTEST_MAIN(tst_QWidgetMetaType)
#include "tst_qwidgetmetatype.moc"
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
index 0e5c40f1b6..61b1fed1f8 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -159,7 +159,7 @@ void tst_QStyleSheetStyle::numinstances()
QCOMPARE(QStyleSheetStyle::numinstances, 0);
qApp->setStyleSheet("* { color: red; }");
QCOMPARE(QStyleSheetStyle::numinstances, 1);
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
QCOMPARE(QStyleSheetStyle::numinstances, 0);
// set and unset application stylesheet+widget
@@ -168,9 +168,9 @@ void tst_QStyleSheetStyle::numinstances()
QCOMPARE(QStyleSheetStyle::numinstances, 2);
w.setStyle(style);
QCOMPARE(QStyleSheetStyle::numinstances, 2);
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
QCOMPARE(QStyleSheetStyle::numinstances, 1);
- w.setStyleSheet("");
+ w.setStyleSheet(QString());
QCOMPARE(QStyleSheetStyle::numinstances, 0);
// set and unset widget stylesheet
@@ -179,7 +179,7 @@ void tst_QStyleSheetStyle::numinstances()
QCOMPARE(QStyleSheetStyle::numinstances, 1);
c.setStyle(style);
QCOMPARE(QStyleSheetStyle::numinstances, 2);
- w.setStyleSheet("");
+ w.setStyleSheet(QString());
QCOMPARE(QStyleSheetStyle::numinstances, 0);
}
@@ -192,9 +192,9 @@ void tst_QStyleSheetStyle::widgetsBeforeAppStyleSheet()
QCOMPARE(COLOR(w1), red);
w1.setStyleSheet("color: white");
QCOMPARE(COLOR(w1), white);
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
QCOMPARE(COLOR(w1), white);
- w1.setStyleSheet("");
+ w1.setStyleSheet(QString());
QCOMPARE(COLOR(w1), APPCOLOR(w1));
}
@@ -217,17 +217,17 @@ void tst_QStyleSheetStyle::widgetsAfterAppStyleSheet()
QCOMPARE(COLOR(w1), white);
QCOMPARE(COLOR(spin), red);
QCOMPARE(COLOR(*spin.lineEdit()), red);
- w1.setStyleSheet("");
+ w1.setStyleSheet(QString());
QCOMPARE(COLOR(w1), red);
QCOMPARE(COLOR(spin), red);
QCOMPARE(COLOR(*spin.lineEdit()), red);
w1.setStyleSheet("color: white");
QCOMPARE(COLOR(w1), white);
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
QCOMPARE(COLOR(w1), white);
QCOMPARE(COLOR(spin), APPCOLOR(spin));
QCOMPARE(COLOR(*spin.lineEdit()), APPCOLOR(*spin.lineEdit()));
- w1.setStyleSheet("");
+ w1.setStyleSheet(QString());
QCOMPARE(COLOR(w1), APPCOLOR(w1));
// QCOMPARE(FONTSIZE(w1), APPFONTSIZE(w1)); //### task 244261
QCOMPARE(FONTSIZE(spin), APPFONTSIZE(spin));
@@ -243,7 +243,7 @@ void tst_QStyleSheetStyle::applicationStyleSheet()
QCOMPARE(COLOR(w1), red);
qApp->setStyleSheet("* { color: white; }");
QCOMPARE(COLOR(w1), white);
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
QCOMPARE(COLOR(w1), APPCOLOR(w1));
qApp->setStyleSheet("* { color: red }");
QCOMPARE(COLOR(w1), red);
@@ -254,21 +254,21 @@ void tst_QStyleSheetStyle::windowStyleSheet()
const QColor red(Qt::red);
const QColor white(Qt::white);
QPushButton w1;
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
w1.setStyleSheet("* { color: red; }");
QCOMPARE(COLOR(w1), red);
w1.setStyleSheet("* { color: white; }");
QCOMPARE(COLOR(w1), white);
- w1.setStyleSheet("");
+ w1.setStyleSheet(QString());
QCOMPARE(COLOR(w1), APPCOLOR(w1));
w1.setStyleSheet("* { color: red }");
QCOMPARE(COLOR(w1), red);
qApp->setStyleSheet("* { color: green }");
QCOMPARE(COLOR(w1), red);
- w1.setStyleSheet("");
+ w1.setStyleSheet(QString());
QCOMPARE(COLOR(w1), QColor("green"));
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
QCOMPARE(COLOR(w1), APPCOLOR(w1));
}
@@ -281,7 +281,7 @@ void tst_QStyleSheetStyle::widgetStyleSheet()
QPushButton *pb = new QPushButton(&w1);
QPushButton &w2 = *pb;
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
w1.setStyleSheet("* { color: red }");
QCOMPARE(COLOR(w1), red);
QCOMPARE(COLOR(w2), red);
@@ -293,11 +293,11 @@ void tst_QStyleSheetStyle::widgetStyleSheet()
QCOMPARE(COLOR(w1), blue);
QCOMPARE(COLOR(w2), white);
- w1.setStyleSheet("");
+ w1.setStyleSheet(QString());
QCOMPARE(COLOR(w1), APPCOLOR(w1));
QCOMPARE(COLOR(w2), white);
- w2.setStyleSheet("");
+ w2.setStyleSheet(QString());
QCOMPARE(COLOR(w1), APPCOLOR(w1));
QCOMPARE(COLOR(w2), APPCOLOR(w2));
}
@@ -311,7 +311,7 @@ void tst_QStyleSheetStyle::reparentWithNoChildStyleSheet()
QPushButton *pb = new QPushButton(&p1);
QPushButton &c1 = *pb; // child with no stylesheet
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
p1.setStyleSheet("* { color: red }");
QCOMPARE(COLOR(c1), red);
c1.setParent(&p2);
@@ -333,7 +333,7 @@ void tst_QStyleSheetStyle::reparentWithChildStyleSheet()
{
const QColor gray("gray");
const QColor white(Qt::white);
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
QPushButton p1, p2;
QPushButton *pb = new QPushButton(&p1);
QPushButton &c1 = *pb;
@@ -353,7 +353,7 @@ void tst_QStyleSheetStyle::repolish()
{
const QColor red(Qt::red);
const QColor white(Qt::white);
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
QPushButton p1;
p1.setStyleSheet("color: red; background: white");
QCOMPARE(BACKGROUND(p1), white);
@@ -362,14 +362,14 @@ void tst_QStyleSheetStyle::repolish()
p1.setStyleSheet("color: red");
QCOMPARE(COLOR(p1), red);
QCOMPARE(BACKGROUND(p1), APPBACKGROUND(p1));
- p1.setStyleSheet("");
+ p1.setStyleSheet(QString());
QCOMPARE(COLOR(p1), APPCOLOR(p1));
QCOMPARE(BACKGROUND(p1), APPBACKGROUND(p1));
}
void tst_QStyleSheetStyle::widgetStyle()
{
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
QWidget *window1 = new QWidget;
window1->setObjectName("window1");
@@ -429,7 +429,7 @@ void tst_QStyleSheetStyle::widgetStyle()
// Remove the stylesheet
proxy = (QStyleSheetStyle *)window1->style();
- window1->setStyleSheet("");
+ window1->setStyleSheet(QString());
QVERIFY(proxy.isNull()); // should have disappeared
QCOMPARE(window1->style(), style1.data()); // its restored
@@ -457,7 +457,7 @@ void tst_QStyleSheetStyle::widgetStyle()
QCOMPARE(proxy->baseStyle(), style1.data());
// Style Sheet propagation on a child widget with a custom style already set
- window2->setStyleSheet("");
+ window2->setStyleSheet(QString());
QCOMPARE(window2->style(), style2.data());
QCOMPARE(widget2->style(), style1.data());
widget2->setStyle(0);
@@ -470,9 +470,9 @@ void tst_QStyleSheetStyle::widgetStyle()
// clean everything out
window1->setStyle(0);
- window1->setStyleSheet("");
+ window1->setStyleSheet(QString());
window2->setStyle(0);
- window2->setStyleSheet("");
+ window2->setStyleSheet(QString());
qApp->setStyle(0);
qApp->setStyleSheet("may_insanity_prevail { }"); // app has stylesheet
@@ -489,14 +489,14 @@ void tst_QStyleSheetStyle::widgetStyle()
QCOMPARE(proxy->baseStyle(), newStyle); // magic ;) the widget still follows the application
QCOMPARE(static_cast<QStyle *>(proxy), widget1->style()); // child still follows...
- window1->setStyleSheet(""); // remove stylesheet
+ window1->setStyleSheet(QString()); // remove stylesheet
QCOMPARE(window1->style(), qApp->style()); // is this cool or what
QCOMPARE(widget1->style(), qApp->style()); // annoying child follows...
QScopedPointer<QStyle> wndStyle(QStyleFactory::create("Windows"));
window1->setStyle(wndStyle.data());
QCOMPARE(window1->style()->metaObject()->className(), "QStyleSheetStyle"); // auto wraps it
QCOMPARE(widget1->style(), window1->style()); // and auto propagates to child
- qApp->setStyleSheet(""); // remove the app stylesheet
+ qApp->setStyleSheet(QString()); // remove the app stylesheet
QCOMPARE(window1->style(), wndStyle.data()); // auto dewrap
QCOMPARE(widget1->style(), qApp->style()); // and child state is restored
window1->setStyle(0); // let sanity prevail
@@ -511,7 +511,7 @@ void tst_QStyleSheetStyle::widgetStyle()
void tst_QStyleSheetStyle::appStyle()
{
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
// qApp style can never be 0
QVERIFY(QApplication::style() != 0);
QPointer<QStyle> style1 = QStyleFactory::create("Windows");
@@ -544,11 +544,11 @@ void tst_QStyleSheetStyle::appStyle()
QCOMPARE(sss->baseStyle(), style1.data());
// Revert the stylesheet
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
QVERIFY(sss.isNull()); // should have disappeared
QCOMPARE(QApplication::style(), style1.data());
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
QCOMPARE(QApplication::style(), style1.data());
}
@@ -744,7 +744,7 @@ void tst_QStyleSheetStyle::fontPropagation()
window.setStyleSheet("* { font-size: 9pt }");
pb.setParent(&window);
QCOMPARE(FONTSIZE(pb), 9);
- window.setStyleSheet("");
+ window.setStyleSheet(QString());
QCOMPARE(FONTSIZE(pb), buttonFontSize);
QTabWidget tw;
@@ -757,7 +757,7 @@ void tst_QStyleSheetStyle::fontPropagation()
void tst_QStyleSheetStyle::onWidgetDestroyed()
{
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
QLabel *l = new QLabel;
l->setStyleSheet("QLabel { color: red }");
QPointer<QStyleSheetStyle> ss = (QStyleSheetStyle *) l->style();
@@ -778,14 +778,14 @@ void tst_QStyleSheetStyle::fontPrecedence()
font.setPointSize(16);
edit.setFont(font);
QCOMPARE(FONTSIZE(edit), 22);
- edit.setStyleSheet("");
+ edit.setStyleSheet(QString());
QCOMPARE(FONTSIZE(edit), 16);
font.setPointSize(18);
edit.setFont(font);
QCOMPARE(FONTSIZE(edit), 18);
edit.setStyleSheet("QLineEdit { font-size: 20pt; }");
QCOMPARE(FONTSIZE(edit), 20);
- edit.setStyleSheet("");
+ edit.setStyleSheet(QString());
QCOMPARE(FONTSIZE(edit), 18);
edit.hide();
@@ -1189,7 +1189,7 @@ void tst_QStyleSheetStyle::transparent()
QPushButton *p3=new QPushButton(&w);
p1->setStyleSheet("background:transparent");
p2->setStyleSheet("background-color:transparent");
- p3->setStyleSheet("background:rgb(0,0,0,0)");
+ p3->setStyleSheet("background:rgba(0,0,0,0)");
QCOMPARE(BACKGROUND(*p1) , QColor(0,0,0,0));
QCOMPARE(BACKGROUND(*p2) , QColor(0,0,0,0));
QCOMPARE(BACKGROUND(*p3) , QColor(0,0,0,0));
@@ -2051,7 +2051,7 @@ void tst_QStyleSheetStyle::styleSheetTargetAttribute()
QCOMPARE(lb.testAttribute(Qt::WA_StyleSheetTarget), true);
QCOMPARE(pb.testAttribute(Qt::WA_StyleSheetTarget), false);
- qApp->setStyleSheet("");
+ qApp->setStyleSheet(QString());
gb.ensurePolished(); lb.ensurePolished(); pb.ensurePolished();
QCOMPARE(gb.testAttribute(Qt::WA_StyleSheetTarget), false);
@@ -2066,7 +2066,7 @@ void tst_QStyleSheetStyle::unpolish()
w.setStyleSheet("QWidget { min-width: 100; }");
w.ensurePolished();
QCOMPARE(w.minimumWidth(), 100);
- w.setStyleSheet("");
+ w.setStyleSheet(QString());
QCOMPARE(w.minimumWidth(), 0);
}
diff --git a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
index 078a3215fd..f8ce6a2c0a 100644
--- a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
+++ b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
@@ -71,6 +71,7 @@ private slots:
void restoreStateOfFloating();
void restoreDockWidget();
void restoreStateWhileStillFloating();
+ void setWindowTitle();
// task specific tests:
void task165177_deleteFocusWidget();
void task169808_setFloating();
@@ -993,7 +994,54 @@ void tst_QDockWidget::taskQTBUG_9758_undockedGeometry()
QVERIFY(dock1.y() >= 0);
}
+void tst_QDockWidget::setWindowTitle()
+{
+ QMainWindow window;
+ QDockWidget dock1(&window);
+ QDockWidget dock2(&window);
+ const QString dock1Title = QStringLiteral("&Window");
+ const QString dock2Title = QStringLiteral("&Modifiable Window [*]");
+
+ dock1.setWindowTitle(dock1Title);
+ dock2.setWindowTitle(dock2Title);
+ window.addDockWidget(Qt::RightDockWidgetArea, &dock1);
+ window.addDockWidget(Qt::RightDockWidgetArea, &dock2);
+ window.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
+ QCOMPARE(dock1.windowTitle(), dock1Title);
+ QCOMPARE(dock2.windowTitle(), dock2Title);
+
+ dock1.setFloating(true);
+ dock1.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&dock1));
+ QCOMPARE(dock1.windowTitle(), dock1Title);
+ dock1.setFloating(false);
+ QCOMPARE(dock1.windowTitle(), dock1Title);
+ dock1.setFloating(true);
+ dock1.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&dock1));
+ const QString changed = QStringLiteral("Changed ");
+ dock1.setWindowTitle(QString(changed + dock1Title));
+ QCOMPARE(dock1.windowTitle(), QString(changed + dock1Title));
+ dock1.setFloating(false);
+ QCOMPARE(dock1.windowTitle(), QString(changed + dock1Title));
+
+ dock2.setWindowModified(true);
+ QCOMPARE(dock2.windowTitle(), dock2Title);
+ dock2.setFloating(true);
+ dock2.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&dock2));
+ QCOMPARE(dock2.windowTitle(), dock2Title);
+ dock2.setWindowModified(false);
+ QCOMPARE(dock2.windowTitle(), dock2Title);
+ dock2.setFloating(false);
+ QCOMPARE(dock2.windowTitle(), dock2Title);
+ dock2.setFloating(true);
+ dock2.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&dock2));
+ QCOMPARE(dock2.windowTitle(), dock2Title);
+}
QTEST_MAIN(tst_QDockWidget)
#include "tst_qdockwidget.moc"
diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
index 6cc19051d2..67b79e3faf 100644
--- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
@@ -1689,14 +1689,16 @@ void tst_QMdiArea::tileSubWindows()
workspace.setActiveSubWindow(0);
QVERIFY(workspace.viewport()->childrenRect() != workspace.viewport()->rect());
- // Make sure the active window is placed in top left corner regardless
+ // Make sure the active window does not move position after a tile regardless
// of whether we have any windows with staysOnTopHint or not.
+ workspace.tileSubWindows();
windows.at(3)->setWindowFlags(windows.at(3)->windowFlags() | Qt::WindowStaysOnTopHint);
QMdiSubWindow *activeSubWindow = windows.at(6);
workspace.setActiveSubWindow(activeSubWindow);
QCOMPARE(workspace.activeSubWindow(), activeSubWindow);
+ QPoint pos = activeSubWindow->geometry().topLeft();
workspace.tileSubWindows();
- QCOMPARE(activeSubWindow->geometry().topLeft(), QPoint(0, 0));
+ QCOMPARE(activeSubWindow->geometry().topLeft(), pos);
// Verify that we try to resize the area such that all sub-windows are visible.
// It's important that tiled windows are NOT overlapping.
@@ -1713,6 +1715,8 @@ void tst_QMdiArea::tileSubWindows()
// Prevent scrollbars from messing up the expected viewport calculation below
workspace.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
workspace.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ QCOMPARE(workspace.horizontalScrollBarPolicy(), Qt::ScrollBarAlwaysOff);
+ QCOMPARE(workspace.verticalScrollBarPolicy(), Qt::ScrollBarAlwaysOff);
workspace.tileSubWindows();
// The sub-windows are now tiled like this:
@@ -1731,9 +1735,11 @@ void tst_QMdiArea::tileSubWindows()
const QSize expectedViewportSize(3 * minSize.width() + spacing, 3 * minSize.height() + spacing);
QTRY_COMPARE(workspace.viewport()->rect().size(), expectedViewportSize);
- // Restore original scrollbar behavior for test below
+ // Enable scroll bar for test below (default property for QMdiArea is Qt::ScrollBarAlwaysOff)
workspace.setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
workspace.setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+ QCOMPARE(workspace.horizontalScrollBarPolicy(), Qt::ScrollBarAsNeeded);
+ QCOMPARE(workspace.verticalScrollBarPolicy(), Qt::ScrollBarAsNeeded);
// Not enough space for all sub-windows to be visible -> provide scroll bars.
workspace.resize(160, 150);
@@ -1754,13 +1760,16 @@ void tst_QMdiArea::tileSubWindows()
QCOMPARE(vBar->value(), 0);
QCOMPARE(vBar->minimum(), 0);
+ // Tile windows with scroll bars enabled.
workspace.tileSubWindows();
QVERIFY(QTest::qWaitForWindowExposed(&workspace));
qApp->processEvents();
- QTRY_VERIFY(workspace.size() != QSize(150, 150));
- QTRY_VERIFY(!vBar->isVisible());
- QTRY_VERIFY(!hBar->isVisible());
+ // Workspace should not have changed size after tile.
+ QTRY_VERIFY(workspace.size() == QSize(160, 150));
+ // Scroll bars should be visible.
+ QTRY_VERIFY(vBar->isVisible());
+ QTRY_VERIFY(hBar->isVisible());
}
void tst_QMdiArea::cascadeAndTileSubWindows()
@@ -2180,7 +2189,7 @@ void tst_QMdiArea::setActivationOrder_data()
list << 2 << 1 << 0 << 1 << 2 << 3 << 4;
list2 << 0 << 1 << 2 << 3 << 4;
- list3 << 1 << 4 << 3 << 1 << 2 << 0;
+ list3 << 4 << 3 << 2 << 4 << 1 << 0; // Most recently created window is in top-left position
QTest::newRow("CreationOrder") << QMdiArea::CreationOrder << 5 << 3 << 1 << list << list2 << list3;
list = QList<int>();
@@ -2188,7 +2197,7 @@ void tst_QMdiArea::setActivationOrder_data()
list2 = QList<int>();
list2 << 0 << 2 << 4 << 1 << 3;
list3 = QList<int>();
- list3 << 1 << 3 << 4 << 1 << 2 << 0;
+ list3 << 3 << 1 << 4 << 3 << 2 << 0; // Window with "stays-on-top" flag set will be in the top-left position
QTest::newRow("StackingOrder") << QMdiArea::StackingOrder << 5 << 3 << 1 << list << list2 << list3;
list = QList<int>();
diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
index a88fd8d19c..634e258250 100644
--- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
+++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
@@ -1143,8 +1143,16 @@ void tst_QMenu::QTBUG7411_submenus_activate()
QTRY_VERIFY(sub1.isVisible());
}
+static bool isPlatformWayland()
+{
+ return !QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive);
+}
+
void tst_QMenu::QTBUG30595_rtl_submenu()
{
+ if (isPlatformWayland())
+ QSKIP("Creating xdg_popups on Wayland requires real input events. Positions would be off.");
+
QMenu menu("Test Menu");
menu.setLayoutDirection(Qt::RightToLeft);
QMenu sub("&sub");
@@ -1179,6 +1187,9 @@ void tst_QMenu::QTBUG20403_nested_popup_on_shortcut_trigger()
#ifndef Q_OS_MACOS
void tst_QMenu::click_while_dismissing_submenu()
{
+ if (isPlatformWayland())
+ QSKIP("Wayland: Creating (grabbing) popups requires real mouse events.");
+
QMenu menu("Test Menu");
QAction *action = menu.addAction("action");
QMenu sub("&sub");
diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
index cfa2ddc4cc..be19cbc9d1 100644
--- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
+++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp
@@ -140,6 +140,11 @@ private slots:
void findBackwardWithRegExp();
void findWithRegExpReturnsFalseIfNoMoreResults();
#endif
+#if QT_CONFIG(regularexpression)
+ void findWithRegularExpression();
+ void findBackwardWithRegularExpression();
+ void findWithRegularExpressionReturnsFalseIfNoMoreResults();
+#endif
void layoutAfterMultiLineRemove();
void undoCommandRemovesAndReinsertsBlock();
void taskQTBUG_43562_lineCountCrash();
@@ -147,6 +152,9 @@ private slots:
void contextMenu();
#endif
void inputMethodCursorRect();
+#if QT_CONFIG(scrollbar)
+ void updateAfterChangeCenterOnScroll();
+#endif
private:
void createSelection();
@@ -1579,6 +1587,45 @@ void tst_QPlainTextEdit::findWithRegExpReturnsFalseIfNoMoreResults()
}
#endif
+#if QT_CONFIG(regularexpression)
+void tst_QPlainTextEdit::findWithRegularExpression()
+{
+ ed->setPlainText(QStringLiteral("arbitrary text"));
+ QRegularExpression rx("\\w{2}xt");
+
+ bool found = ed->find(rx);
+
+ QVERIFY(found);
+ QCOMPARE(ed->textCursor().selectedText(), QStringLiteral("text"));
+}
+
+void tst_QPlainTextEdit::findBackwardWithRegularExpression()
+{
+ ed->setPlainText(QStringLiteral("arbitrary text"));
+ QTextCursor cursor = ed->textCursor();
+ cursor.movePosition(QTextCursor::End);
+ ed->setTextCursor(cursor);
+ QRegularExpression rx("a\\w*t");
+
+ bool found = ed->find(rx, QTextDocument::FindBackward);
+
+ QVERIFY(found);
+ QCOMPARE(ed->textCursor().selectedText(), QStringLiteral("arbit"));
+}
+
+void tst_QPlainTextEdit::findWithRegularExpressionReturnsFalseIfNoMoreResults()
+{
+ ed->setPlainText(QStringLiteral("arbitrary text"));
+ QRegularExpression rx("t.xt");
+ ed->find(rx);
+
+ bool found = ed->find(rx);
+
+ QVERIFY(!found);
+ QCOMPARE(ed->textCursor().selectedText(), QStringLiteral("text"));
+}
+#endif
+
void tst_QPlainTextEdit::layoutAfterMultiLineRemove()
{
ed->setVisible(true); // The widget must be visible to reproduce this bug.
@@ -1727,5 +1774,20 @@ void tst_QPlainTextEdit::inputMethodCursorRect()
QCOMPARE(cursorRectV.toRect(), cursorRect.toRect());
}
+#if QT_CONFIG(scrollbar)
+// QTBUG-64730: Verify that the scrollbar is updated after center on scroll was set
+void tst_QPlainTextEdit::updateAfterChangeCenterOnScroll()
+{
+ ed->setPlainText("Line1\nLine2Line3\nLine3");
+ ed->show();
+ ed->setCenterOnScroll(true);
+ const int maxWithCenterOnScroll = ed->verticalScrollBar()->maximum();
+ ed->setCenterOnScroll(false);
+ const int maxWithoutCenterOnScroll = ed->verticalScrollBar()->maximum();
+ QVERIFY(maxWithCenterOnScroll > maxWithoutCenterOnScroll);
+}
+
+#endif
+
QTEST_MAIN(tst_QPlainTextEdit)
#include "tst_qplaintextedit.moc"
diff --git a/tests/auto/widgets/widgets/qsplitter/BLACKLIST b/tests/auto/widgets/widgets/qsplitter/BLACKLIST
deleted file mode 100644
index 1352805cd7..0000000000
--- a/tests/auto/widgets/widgets/qsplitter/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[replaceWidget:visible, not collapsed]
-xcb
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index 6a2ae4951b..5f5cd78215 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -199,6 +199,12 @@ private slots:
void findWithRegExpReturnsFalseIfNoMoreResults();
#endif
+#if QT_CONFIG(regularexpression)
+ void findWithRegularExpression();
+ void findBackwardWithRegularExpression();
+ void findWithRegularExpressionReturnsFalseIfNoMoreResults();
+#endif
+
#if QT_CONFIG(wheelevent)
void wheelEvent();
#endif
@@ -2572,6 +2578,45 @@ void tst_QTextEdit::findWithRegExpReturnsFalseIfNoMoreResults()
}
#endif
+#if QT_CONFIG(regularexpression)
+void tst_QTextEdit::findWithRegularExpression()
+{
+ ed->setHtml(QStringLiteral("arbitrary te<span style=\"color:#ff0000\">xt</span>"));
+ QRegularExpression rx("\\w{2}xt");
+
+ bool found = ed->find(rx);
+
+ QVERIFY(found);
+ QCOMPARE(ed->textCursor().selectedText(), QStringLiteral("text"));
+}
+
+void tst_QTextEdit::findBackwardWithRegularExpression()
+{
+ ed->setPlainText(QStringLiteral("arbitrary text"));
+ QTextCursor cursor = ed->textCursor();
+ cursor.movePosition(QTextCursor::End);
+ ed->setTextCursor(cursor);
+ QRegularExpression rx("a\\w*t");
+
+ bool found = ed->find(rx, QTextDocument::FindBackward);
+
+ QVERIFY(found);
+ QCOMPARE(ed->textCursor().selectedText(), QStringLiteral("arbit"));
+}
+
+void tst_QTextEdit::findWithRegularExpressionReturnsFalseIfNoMoreResults()
+{
+ ed->setPlainText(QStringLiteral("arbitrary text"));
+ QRegularExpression rx("t.xt");
+ ed->find(rx);
+
+ bool found = ed->find(rx);
+
+ QVERIFY(!found);
+ QCOMPARE(ed->textCursor().selectedText(), QStringLiteral("text"));
+}
+#endif
+
#if QT_CONFIG(wheelevent)
class TextEdit : public QTextEdit
diff --git a/tests/benchmarks/corelib/io/qfileinfo/main.cpp b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
index 5180e7c29e..6cc96777a1 100644
--- a/tests/benchmarks/corelib/io/qfileinfo/main.cpp
+++ b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
@@ -81,7 +81,7 @@ void qfileinfo::symLinkTargetPerformanceLNK()
QString linkTarget;
QBENCHMARK {
for(int i=0; i<100; i++)
- linkTarget = info.readLink();
+ linkTarget = info.symLinkTarget();
}
QVERIFY(QFile::remove("link.lnk"));
}
@@ -94,7 +94,9 @@ void qfileinfo::symLinkTargetPerformanceMounpoint()
QString rootVolume = QString::fromWCharArray(buffer);
QString mountpoint = "mountpoint";
rootVolume.replace("\\\\?\\","\\??\\");
- FileSystem::createNtfsJunction(rootVolume, mountpoint);
+ QString errorMessage;
+ QVERIFY2(FileSystem::createNtfsJunction(rootVolume, mountpoint, &errorMessage) == ERROR_SUCCESS,
+ qPrintable(errorMessage));
QFileInfo info(mountpoint);
info.setCaching(false);
@@ -102,7 +104,7 @@ void qfileinfo::symLinkTargetPerformanceMounpoint()
QString linkTarget;
QBENCHMARK {
for(int i=0; i<100; i++)
- linkTarget = info.readLink();
+ linkTarget = info.symLinkTarget();
}
QVERIFY(QDir().rmdir(mountpoint));
}
diff --git a/tests/benchmarks/corelib/io/qtextstream/qtextstream.pro b/tests/benchmarks/corelib/io/qtextstream/qtextstream.pro
index 758930c139..e8170319f2 100644
--- a/tests/benchmarks/corelib/io/qtextstream/qtextstream.pro
+++ b/tests/benchmarks/corelib/io/qtextstream/qtextstream.pro
@@ -1,5 +1,5 @@
TEMPLATE = app
-TARGET = tst_bench_qtemporaryfile
+TARGET = tst_bench_qtextstream
QT = core testlib
diff --git a/tests/benchmarks/corelib/mimetypes/qmimedatabase/main.cpp b/tests/benchmarks/corelib/mimetypes/qmimedatabase/main.cpp
index 704119b921..1b432f3b3e 100644
--- a/tests/benchmarks/corelib/mimetypes/qmimedatabase/main.cpp
+++ b/tests/benchmarks/corelib/mimetypes/qmimedatabase/main.cpp
@@ -35,6 +35,7 @@ class tst_QMimeDatabase: public QObject
private slots:
void inheritsPerformance();
+ void benchMimeTypeForName();
};
void tst_QMimeDatabase::inheritsPerformance()
@@ -70,5 +71,15 @@ void tst_QMimeDatabase::inheritsPerformance()
// parsing XML, and then keeps being around 4.5 MB for all the in-memory hashes.
}
+void tst_QMimeDatabase::benchMimeTypeForName()
+{
+ QMimeDatabase db;
+
+ QBENCHMARK {
+ const auto s = db.mimeTypeForName(QStringLiteral("text/plain"));
+ QVERIFY(s.isValid());
+ }
+}
+
QTEST_MAIN(tst_QMimeDatabase)
#include "main.moc"
diff --git a/tests/benchmarks/corelib/tools/qmap/qmap.pro b/tests/benchmarks/corelib/tools/qmap/qmap.pro
index 6a0c8d62bd..6c9bf5e8d6 100644
--- a/tests/benchmarks/corelib/tools/qmap/qmap.pro
+++ b/tests/benchmarks/corelib/tools/qmap/qmap.pro
@@ -1,4 +1,4 @@
-TARGET = tst_qmap
+TARGET = tst_bench_qmap
QT = core testlib
INCLUDEPATH += .
SOURCES += main.cpp
diff --git a/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp b/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp
index e0f69bee11..605df100ee 100644
--- a/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp
+++ b/tests/benchmarks/gui/image/qimageconversion/tst_qimageconversion.cpp
@@ -200,6 +200,8 @@ void tst_QImageConversion::convertRgb32_data()
QTest::newRow("argb32 -> argb8565pm") << argb32 << QImage::Format_ARGB8565_Premultiplied;
QTest::newRow("argb32 -> argb4444pm") << argb32 << QImage::Format_ARGB4444_Premultiplied;
QTest::newRow("argb32 -> argb6666pm") << argb32 << QImage::Format_ARGB6666_Premultiplied;
+ QTest::newRow("argb32 -> rgba64") << argb32 << QImage::Format_RGBA64;
+ QTest::newRow("argb32 -> rgba64pm") << argb32 << QImage::Format_RGBA64_Premultiplied;
QTest::newRow("argb32pm -> rgb16") << argb32pm << QImage::Format_RGB16;
QTest::newRow("argb32pm -> rgb32") << argb32pm << QImage::Format_RGB32;
@@ -239,6 +241,7 @@ void tst_QImageConversion::convertGeneric_data()
QImage a2rgb30 = argb32.convertToFormat(QImage::Format_A2RGB30_Premultiplied);
QImage rgb666 = rgb32.convertToFormat(QImage::Format_RGB666);
QImage argb4444 = argb32.convertToFormat(QImage::Format_ARGB4444_Premultiplied);
+ QImage rgba64pm = argb32.convertToFormat(QImage::Format_RGBA64_Premultiplied);
QTest::newRow("indexed8 -> rgb32") << i8 << QImage::Format_RGB32;
QTest::newRow("indexed8 -> argb32") << i8 << QImage::Format_ARGB32;
@@ -289,6 +292,13 @@ void tst_QImageConversion::convertGeneric_data()
QTest::newRow("argb4444pm -> rgba8888pm") << argb4444 << QImage::Format_RGBA8888_Premultiplied;
QTest::newRow("argb4444pm -> rgb30") << argb4444 << QImage::Format_RGB30;
QTest::newRow("argb4444pm -> a2bgr30") << argb4444 << QImage::Format_A2BGR30_Premultiplied;
+
+ QTest::newRow("rgba64pm -> argb32") << rgba64pm << QImage::Format_ARGB32;
+ QTest::newRow("rgba64pm -> rgbx8888") << rgba64pm << QImage::Format_RGBX8888;
+ QTest::newRow("rgba64pm -> rgba8888pm") << rgba64pm << QImage::Format_RGBA8888_Premultiplied;
+ QTest::newRow("rgba64pm -> rgb30") << rgba64pm << QImage::Format_RGB30;
+ QTest::newRow("rgba64pm -> a2bgr30") << rgba64pm << QImage::Format_A2BGR30_Premultiplied;
+ QTest::newRow("rgba64pm -> rgba64") << rgba64pm << QImage::Format_RGBA64;
}
void tst_QImageConversion::convertGeneric()
diff --git a/tests/benchmarks/widgets/itemviews/itemviews.pro b/tests/benchmarks/widgets/itemviews/itemviews.pro
index a23cdf7b97..0c3256f307 100644
--- a/tests/benchmarks/widgets/itemviews/itemviews.pro
+++ b/tests/benchmarks/widgets/itemviews/itemviews.pro
@@ -1,4 +1,5 @@
TEMPLATE = subdirs
SUBDIRS = \
qtableview \
- qheaderview
+ qheaderview \
+ qlistview
diff --git a/tests/benchmarks/widgets/itemviews/qlistview/qlistview.pro b/tests/benchmarks/widgets/itemviews/qlistview/qlistview.pro
new file mode 100644
index 0000000000..68537d09ea
--- /dev/null
+++ b/tests/benchmarks/widgets/itemviews/qlistview/qlistview.pro
@@ -0,0 +1,7 @@
+QT += widgets testlib
+
+TEMPLATE = app
+TARGET = tst_bench_qlistview
+
+SOURCES += tst_qlistview.cpp
+
diff --git a/tests/benchmarks/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/benchmarks/widgets/itemviews/qlistview/tst_qlistview.cpp
new file mode 100644
index 0000000000..01496743c2
--- /dev/null
+++ b/tests/benchmarks/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QListView>
+#include <QStandardItemModel>
+
+
+class tst_QListView : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QListView() = default;
+ virtual ~tst_QListView() = default;
+
+private slots:
+ void benchSetCurrentIndex();
+};
+
+void tst_QListView::benchSetCurrentIndex()
+{
+ QStandardItemModel sm(50000, 1);
+ QListView lv;
+ lv.setModel(&sm);
+ const int rc = lv.model()->rowCount();
+ for (int i = 0; i < rc; i+= 100)
+ lv.setRowHidden(i, true);
+ lv.setCurrentIndex(lv.model()->index(0, 0, QModelIndex()));
+ lv.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&lv));
+
+ QBENCHMARK_ONCE {
+ while (lv.currentIndex().row() < rc - 20)
+ lv.setCurrentIndex(lv.model()->index(lv.currentIndex().row() + 17,
+ lv.currentIndex().column(),
+ QModelIndex()));
+ }
+}
+
+
+QTEST_MAIN(tst_QListView)
+#include "tst_qlistview.moc"
diff --git a/tests/libfuzzer/README b/tests/libfuzzer/README
new file mode 100644
index 0000000000..ed668ff9e2
--- /dev/null
+++ b/tests/libfuzzer/README
@@ -0,0 +1,37 @@
+This directory contains tests to be run with clang's libFuzzer. It will generate data, pass this
+data to the function
+
+ LLVMFuzzerTestOneInput(const char *Data, size_t Size)
+
+of the test and track the code execution. Should the test crash, libFuzzer will provide you with the
+data which triggered the crash. You can then use this to debug and fix the called code.
+
+! Please note: The purpose of fuzz testing is to find unexpected code paths. Running fuzz tests may!
+! result in unforeseen bevavior, including loss of data. Consider running the tests in an isolated !
+! environment, e.g. on a virtual machine. You have been warned. !
+
+To run a test with libFuzzer:
+
+1. Install libFuzzer, e.g. from the repositories of the Linux distribution you are using.
+2. Make sure clang and clang++ from this version of clang are found in PATH.
+3. Configure Qt with
+ -platform linux-clang -coverage trace-pc-guard
+ to add the needed code coverage instrumentation. Since speed of execution is crucial for fuzz
+ testing, it's recommendable to also use the switches
+ -release -static
+ It might also make sense to add sanitzers by passing
+ -sanitize <...>
+4. Build Qt.
+5. Build one of the tests using this Qt build.
+6. Execute the resulting executable.
+ Depending on the expected input format of the tested function, you will get results faster if
+ you:
+ * provide a set of interesting input data by passing the path of a directory which contains
+ these data, each in one file. You can find such datasets in the subdirectory "testcases".
+ * pass a so-called dictionary listing keywords of the input format using
+ -dict=<dictionary file>
+ A couple of such dictionaries are provided by AFL (http://lcamtuf.coredump.cx/afl/)
+ * tell libFuzzer to generate only ASCII data using
+ -only_ascii=1
+
+For further info, see https://llvm.org/docs/LibFuzzer.html
diff --git a/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/main.cpp b/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/main.cpp
new file mode 100644
index 0000000000..5a60c78cb5
--- /dev/null
+++ b/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/main.cpp
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QXmlStreamReader>
+
+extern "C" int LLVMFuzzerTestOneInput(const char *Data, size_t Size) {
+ QXmlStreamReader reader(QByteArray(Data, Size));
+ while (!reader.atEnd())
+ reader.readNext();
+ return 0;
+}
diff --git a/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro b/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro
new file mode 100644
index 0000000000..8c890f5b6e
--- /dev/null
+++ b/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro
@@ -0,0 +1,5 @@
+QT -= gui
+CONFIG += c++11 console
+CONFIG -= app_bundle
+SOURCES += main.cpp
+LIBS += -lFuzzer
diff --git a/tests/libfuzzer/gui/text/qtextdocument/setHtml/main.cpp b/tests/libfuzzer/gui/text/qtextdocument/setHtml/main.cpp
new file mode 100644
index 0000000000..c9b33d0f88
--- /dev/null
+++ b/tests/libfuzzer/gui/text/qtextdocument/setHtml/main.cpp
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QTextDocument>
+
+extern "C" int LLVMFuzzerTestOneInput(const char *Data, size_t Size) {
+ static int c = 0;
+ static QApplication a(c, nullptr);
+ QTextDocument().setHtml(QByteArray(Data, Size));
+ return 0;
+}
diff --git a/tests/libfuzzer/gui/text/qtextdocument/setHtml/setHtml.pro b/tests/libfuzzer/gui/text/qtextdocument/setHtml/setHtml.pro
new file mode 100644
index 0000000000..2602f16dc7
--- /dev/null
+++ b/tests/libfuzzer/gui/text/qtextdocument/setHtml/setHtml.pro
@@ -0,0 +1,4 @@
+QT += widgets
+CONFIG += c++11
+SOURCES += main.cpp
+LIBS += -lFuzzer
diff --git a/tests/manual/foreignwindows/main.cpp b/tests/manual/foreignwindows/main.cpp
index 74c6d8c376..44aff54773 100644
--- a/tests/manual/foreignwindows/main.cpp
+++ b/tests/manual/foreignwindows/main.cpp
@@ -195,6 +195,9 @@ static QString description(const QString &appName)
"tests embedding foreign windows into Qt.\n\nUse cases:\n\n"
<< appName << " -a Dump a list of all native window ids.\n"
<< appName << " <winid> Dump information on the window.\n"
+ << appName << " -m <winid> Move window to top left corner\n"
+ << QByteArray(appName.size(), ' ')
+ << " (recover lost windows after changing monitor setups).\n"
<< appName << " -c <winid> Dump information on the window continuously.\n"
<< appName << " -e <winid> Embed window into a Qt widget.\n"
<< "\nOn Windows, class names of well known controls (EDIT, BUTTON...) can be\n"
@@ -245,6 +248,10 @@ int main(int argc, char *argv[])
parser.addOption(outputAllOption);
QCommandLineOption continuousOption(QStringList() << QStringLiteral("c") << QStringLiteral("continuous"),
QStringLiteral("Output continuously."));
+ parser.addOption(outputAllOption);
+ QCommandLineOption moveOption(QStringList() << QStringLiteral("m") << QStringLiteral("move"),
+ QStringLiteral("Move window to top left corner."));
+ parser.addOption(moveOption);
parser.addOption(continuousOption);
QCommandLineOption embedOption(QStringList() << QStringLiteral("e") << QStringLiteral("embed"),
QStringLiteral("Embed a foreign window into a Qt widget."));
@@ -274,8 +281,12 @@ int main(int argc, char *argv[])
return -1;
}
QWindow *foreignWindow = QWindow::fromWinId(wid);
+ if (!foreignWindow)
+ return -1;
foreignWindow->setObjectName("ForeignWindow" + QString::number(wid, 16));
windows.append(foreignWindow);
+ if (parser.isSet(moveOption))
+ foreignWindow->setFramePosition(QGuiApplication::primaryScreen()->availableGeometry().topLeft());
}
if (windows.isEmpty())
diff --git a/tests/manual/qcursor/grab_override/mainwindow.cpp b/tests/manual/qcursor/grab_override/mainwindow.cpp
index d2b7311846..087ee8d1d8 100644
--- a/tests/manual/qcursor/grab_override/mainwindow.cpp
+++ b/tests/manual/qcursor/grab_override/mainwindow.cpp
@@ -79,10 +79,10 @@ void MainWindow::toggleOverrideCursor()
{
switch (override) {
case 0:
- QApplication::setOverrideCursor(Qt::BusyCursor);
+ QGuiApplication::setOverrideCursor(Qt::BusyCursor);
break;
case 1:
- QApplication::restoreOverrideCursor();
+ QGuiApplication::restoreOverrideCursor();
break;
case 2:
ui->label->grabMouse(Qt::ForbiddenCursor);
diff --git a/tests/manual/qsslsocket/main.cpp b/tests/manual/qsslsocket/main.cpp
index b2cc1b5f23..58da520c07 100644
--- a/tests/manual/qsslsocket/main.cpp
+++ b/tests/manual/qsslsocket/main.cpp
@@ -91,21 +91,21 @@ void tst_QSslSocket::nextProtocolNegotiation_data()
<< QSslConfiguration::NextProtocolNegotiationNegotiated;
tag = host.toLocal8Bit();
- tag.append("-spdy/3");
+ tag.append("-h2");
QTest::newRow(tag)
<< true
<< host
- << (QList<QByteArray>() << QSslConfiguration::NextProtocolSpdy3_0)
- << QByteArray(QSslConfiguration::NextProtocolSpdy3_0)
+ << (QList<QByteArray>() << QSslConfiguration::ALPNProtocolHTTP2)
+ << QByteArray(QSslConfiguration::ALPNProtocolHTTP2)
<< QSslConfiguration::NextProtocolNegotiationNegotiated;
tag = host.toLocal8Bit();
- tag.append("-spdy/3-and-http/1.1");
+ tag.append("-h2-and-http/1.1");
QTest::newRow(tag)
<< true
<< host
- << (QList<QByteArray>() << QSslConfiguration::NextProtocolSpdy3_0 << QSslConfiguration::NextProtocolHttp1_1)
- << QByteArray(QSslConfiguration::NextProtocolSpdy3_0)
+ << (QList<QByteArray>() << QSslConfiguration::ALPNProtocolHTTP2 << QSslConfiguration::NextProtocolHttp1_1)
+ << QByteArray(QSslConfiguration::ALPNProtocolHTTP2)
<< QSslConfiguration::NextProtocolNegotiationNegotiated;
}
}
diff --git a/tests/manual/widgets/itemviews/itemviews.pro b/tests/manual/widgets/itemviews/itemviews.pro
index 53f658d54d..8884cc3aae 100644
--- a/tests/manual/widgets/itemviews/itemviews.pro
+++ b/tests/manual/widgets/itemviews/itemviews.pro
@@ -1,2 +1,8 @@
TEMPLATE = subdirs
-SUBDIRS = delegate qheaderview qtreeview qtreewidget tableview-span-navigation
+SUBDIRS = delegate \
+ qconcatenatetablesproxymodel \
+ qheaderview \
+ qtreeview \
+ qtreewidget \
+ tableview-span-navigation \
+
diff --git a/tests/manual/widgets/itemviews/qconcatenatetablesproxymodel/main.cpp b/tests/manual/widgets/itemviews/qconcatenatetablesproxymodel/main.cpp
new file mode 100644
index 0000000000..2c1825f29f
--- /dev/null
+++ b/tests/manual/widgets/itemviews/qconcatenatetablesproxymodel/main.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QConcatenateTablesProxyModel>
+#include <QStandardItemModel>
+#include <QTableView>
+#include <QTreeView>
+
+static void prepareModel(const QString &prefix, QStandardItemModel *model)
+{
+ for (int row = 0; row < model->rowCount(); ++row) {
+ for (int column = 0; column < model->columnCount(); ++column) {
+ QStandardItem *item = new QStandardItem(prefix + QString(" %1,%2").arg(row).arg(column));
+ item->setDragEnabled(true);
+ item->setDropEnabled(true);
+ model->setItem(row, column, item);
+ }
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QStandardItemModel firstModel(4, 4);
+ prepareModel("First", &firstModel);
+ QStandardItemModel secondModel(2, 2);
+
+ QConcatenateTablesProxyModel proxy;
+ proxy.addSourceModel(&firstModel);
+ proxy.addSourceModel(&secondModel);
+
+ prepareModel("Second", &secondModel);
+
+ QTableView tableView;
+ tableView.setWindowTitle("concat proxy, in QTableView");
+ tableView.setDragDropMode(QAbstractItemView::DragDrop);
+ tableView.setModel(&proxy);
+ tableView.show();
+
+ QTreeView treeView;
+ treeView.setWindowTitle("concat proxy, in QTreeView");
+ treeView.setDragDropMode(QAbstractItemView::DragDrop);
+ treeView.setModel(&proxy);
+ treeView.show();
+
+ // For comparison, views on top on QStandardItemModel
+
+ QTableView tableViewTest;
+ tableViewTest.setWindowTitle("first model, in QTableView");
+ tableViewTest.setDragDropMode(QAbstractItemView::DragDrop);
+ tableViewTest.setModel(&firstModel);
+ tableViewTest.show();
+
+ QTreeView treeViewTest;
+ treeViewTest.setWindowTitle("first model, in QTreeView");
+ treeViewTest.setDragDropMode(QAbstractItemView::DragDrop);
+ treeViewTest.setModel(&firstModel);
+ treeViewTest.show();
+
+ return app.exec();
+}
diff --git a/tests/manual/widgets/itemviews/qconcatenatetablesproxymodel/qconcatenatetablesproxymodel.pro b/tests/manual/widgets/itemviews/qconcatenatetablesproxymodel/qconcatenatetablesproxymodel.pro
new file mode 100644
index 0000000000..19904212a7
--- /dev/null
+++ b/tests/manual/widgets/itemviews/qconcatenatetablesproxymodel/qconcatenatetablesproxymodel.pro
@@ -0,0 +1,8 @@
+
+TEMPLATE = app
+TARGET = qconcatenatetablesproxymodel
+INCLUDEPATH += .
+
+QT += widgets
+
+SOURCES += main.cpp
diff --git a/tests/shared/filesystem.h b/tests/shared/filesystem.h
index 73d7d6523c..9f4527a992 100644
--- a/tests/shared/filesystem.h
+++ b/tests/shared/filesystem.h
@@ -80,7 +80,7 @@ public:
}
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
- static void createNtfsJunction(QString target, QString linkName)
+ static DWORD createNtfsJunction(QString target, QString linkName, QString *errorMessage)
{
typedef struct {
DWORD ReparseTag;
@@ -97,14 +97,22 @@ public:
DWORD returnedLength;
wchar_t fileSystem[MAX_PATH] = L"";
PREPARSE_MOUNTPOINT_DATA_BUFFER reparseInfo = (PREPARSE_MOUNTPOINT_DATA_BUFFER) reparseBuffer;
+ DWORD result = ERROR_SUCCESS;
QFileInfo junctionInfo(linkName);
linkName = QDir::toNativeSeparators(junctionInfo.absoluteFilePath());
-
- GetVolumeInformationW( (wchar_t*)linkName.left(3).utf16(), NULL, 0, NULL, NULL, NULL,
- fileSystem, sizeof(fileSystem)/sizeof(WCHAR));
- if(QString().fromWCharArray(fileSystem) != "NTFS")
- QSKIP("This seems not to be an NTFS volume. Junctions are not allowed.");
+ const QString drive = linkName.left(3);
+ if (GetVolumeInformationW(reinterpret_cast<const wchar_t *>(drive.utf16()),
+ NULL, 0, NULL, NULL, NULL,
+ fileSystem, sizeof(fileSystem)/sizeof(WCHAR)) == FALSE) {
+ result = GetLastError();
+ *errorMessage = "GetVolumeInformationW() failed: " + qt_error_string(int(result));
+ return result;
+ }
+ if (QString::fromWCharArray(fileSystem) != "NTFS") {
+ *errorMessage = "This seems not to be an NTFS volume. Junctions are not allowed.";
+ return ERROR_NOT_SUPPORTED;
+ }
if (!target.startsWith("\\??\\") && !target.startsWith("\\\\?\\")) {
QFileInfo targetInfo(target);
@@ -116,7 +124,11 @@ public:
QDir().mkdir(linkName);
hFile = CreateFileW( (wchar_t*)linkName.utf16(), GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, NULL );
- QVERIFY(hFile != INVALID_HANDLE_VALUE );
+ if (hFile == INVALID_HANDLE_VALUE) {
+ result = GetLastError();
+ *errorMessage = "CreateFileW(" + linkName + ") failed: " + qt_error_string(int(result));
+ return result;
+ }
memset( reparseInfo, 0, sizeof( *reparseInfo ));
reparseInfo->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT;
@@ -128,8 +140,12 @@ public:
bool ioc = DeviceIoControl(hFile, FSCTL_SET_REPARSE_POINT, reparseInfo,
reparseInfo->ReparseDataLength + REPARSE_MOUNTPOINT_HEADER_SIZE,
NULL, 0, &returnedLength, NULL);
+ if (!ioc) {
+ result = GetLastError();
+ *errorMessage = "DeviceIoControl() failed: " + qt_error_string(int(result));
+ }
CloseHandle( hFile );
- QVERIFY(ioc);
+ return result;
}
#endif
diff --git a/tests/testserver/apache2/.gitattributes b/tests/testserver/apache2/.gitattributes
new file mode 100644
index 0000000000..67af4c73e8
--- /dev/null
+++ b/tests/testserver/apache2/.gitattributes
@@ -0,0 +1,2 @@
+* text eol=lf
+*.gif -text
diff --git a/tests/testserver/common/.gitattributes b/tests/testserver/common/.gitattributes
new file mode 100644
index 0000000000..21f6efbe14
--- /dev/null
+++ b/tests/testserver/common/.gitattributes
@@ -0,0 +1,2 @@
+*.sh text eol=lf
+*.conf text eol=lf
diff --git a/tests/testserver/common/startup.sh b/tests/testserver/common/startup.sh
index 84d4003f86..74990a47f6 100755
--- a/tests/testserver/common/startup.sh
+++ b/tests/testserver/common/startup.sh
@@ -49,7 +49,9 @@ do $RUN_CMD
done
# start multicast DNS service discovery (mDNS)
-sed -i "s,#domain-name=local,domain-name=test-net.qt.local," /etc/avahi/avahi-daemon.conf
+sed -i -e "s,#domain-name=local,domain-name=${test_domain:-test-net.qt.local}," \
+ -e "s,#publish-aaaa-on-ipv4=yes,publish-aaaa-on-ipv4=no," \
+ /etc/avahi/avahi-daemon.conf
service dbus restart
service avahi-daemon restart
diff --git a/tests/testserver/danted/.gitattributes b/tests/testserver/danted/.gitattributes
new file mode 100644
index 0000000000..21f6efbe14
--- /dev/null
+++ b/tests/testserver/danted/.gitattributes
@@ -0,0 +1,2 @@
+*.sh text eol=lf
+*.conf text eol=lf
diff --git a/tests/testserver/danted/danted.sh b/tests/testserver/danted/danted.sh
index bf3d154f33..97e2142401 100755
--- a/tests/testserver/danted/danted.sh
+++ b/tests/testserver/danted/danted.sh
@@ -39,6 +39,25 @@ useradd -d /dev/null -s /bin/false qsockstest; echo "qsockstest:$PASS" | chpassw
# install configurations and test data
cp $TESTDATA/danted{,-authenticating}.conf /etc/
+# Use the input environment variables to overwrite the default value of internal interfaces.
+if [ "$danted_internal" -a "$danted_internal" != eth0 ]
+then sed -i "s,internal: eth0 port = 1080,internal: $danted_internal port = 1080," /etc/danted.conf
+fi
+
+if [ "$danted_auth_internal" -a "$danted_auth_internal" != eth0 ]
+then sed -i "s,internal: eth0 port = 1081,internal: $danted_auth_internal port = 1081," \
+ /etc/danted-authenticating.conf
+fi
+
+# Use the input environment variables to overwrite the default value of external interfaces.
+if [ "$danted_external" -a "$danted_external" != eth0 ]
+then sed -i "s,external: eth0,external: $danted_external," /etc/danted.conf
+fi
+
+if [ "$danted_auth_external" -a "$danted_auth_external" != eth0 ]
+then sed -i "s,external: eth0,external: $danted_auth_external," /etc/danted-authenticating.conf
+fi
+
# enable service with installed configurations
service danted start
service danted-authenticating start
diff --git a/tests/testserver/docker-compose-for-macOS.yml b/tests/testserver/docker-compose-for-macOS.yml
new file mode 100644
index 0000000000..bbd1f71a62
--- /dev/null
+++ b/tests/testserver/docker-compose-for-macOS.yml
@@ -0,0 +1,99 @@
+version: '3.4'
+
+# The tag of images is used by docker compose file to launch the corresponding
+# docker containers. The value of tag comes from the provisioning script
+# (coin/provisioning/.../testserver/docker_testserver.sh). The script gets SHA-1
+# of each server context as the tag of docker images. If one of the server
+# contexts gets changes, please make sure to update this compose file as well.
+# You can run command 'docker images' to list all the tags of test server images.
+# For example:
+# REPOSITORY TAG
+# qt-test-server-apache2 537fe302f61851d1663f41495230d8e3554a4a13
+
+services:
+ apache2:
+ image: qt-test-server-apache2:537fe302f61851d1663f41495230d8e3554a4a13
+ container_name: qt-test-server-apache2
+ domainname: ${TEST_DOMAIN}
+ volumes:
+ - ./common:/common:ro
+ - ./apache2:/service:ro
+ entrypoint: common/startup.sh
+ command: [common/ssl.sh, service/apache2.sh]
+ network_mode: "host"
+ extra_hosts:
+ - "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
+ environment:
+ - test_domain=${TEST_DOMAIN}
+
+ squid:
+ image: qt-test-server-squid:9c32f41b19aca3d778733c4d8fb0ecc5955e893c
+ container_name: qt-test-server-squid
+ domainname: ${TEST_DOMAIN}
+ depends_on:
+ - apache2
+ volumes:
+ - ./common:/common:ro
+ - ./squid:/service:ro
+ entrypoint: common/startup.sh
+ command: service/squid.sh
+ network_mode: "host"
+ extra_hosts:
+ - "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
+ environment:
+ - test_domain=${TEST_DOMAIN}
+
+ vsftpd:
+ image: qt-test-server-vsftpd:f3a9c8d793a77cc007c0e4e481bec01f9e3eeb7e
+ container_name: qt-test-server-vsftpd
+ domainname: ${TEST_DOMAIN}
+ volumes:
+ - ./common:/common:ro
+ - ./vsftpd:/service:ro
+ entrypoint: common/startup.sh
+ command: service/vsftpd.sh
+ network_mode: "host"
+ extra_hosts:
+ - "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
+ environment:
+ - test_domain=${TEST_DOMAIN}
+
+ ftp-proxy:
+ image: qt-test-server-ftp-proxy:d7de8b28392d173db512a558ccc84ead8bece2ae
+ container_name: qt-test-server-ftp-proxy
+ domainname: ${TEST_DOMAIN}
+ depends_on:
+ - vsftpd
+ volumes:
+ - ./common:/common:ro
+ - ./ftp-proxy:/service:ro
+ entrypoint: common/startup.sh
+ command: service/ftp-proxy.sh
+ network_mode: "host"
+ extra_hosts:
+ - "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
+ environment:
+ - test_domain=${TEST_DOMAIN}
+
+ danted:
+ image: qt-test-server-danted:35607f9b790524cf9690c7d12a9a401696b7b6b5
+ container_name: qt-test-server-danted
+ domainname: ${TEST_DOMAIN}
+ depends_on:
+ - apache2
+ - vsftpd
+ - ftp-proxy
+ volumes:
+ - ./common:/common:ro
+ - ./danted:/service:ro
+ entrypoint: common/startup.sh
+ command: service/danted.sh
+ network_mode: "host"
+ extra_hosts:
+ - "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
+ environment:
+ - danted_internal=${MACHINE_IP}
+ - danted_external=${MACHINE_IP}
+ - danted_auth_internal=${MACHINE_IP}
+ - danted_auth_external=${MACHINE_IP}
+ - test_domain=${TEST_DOMAIN}
diff --git a/tests/testserver/docker-compose-for-windows.yml b/tests/testserver/docker-compose-for-windows.yml
new file mode 100644
index 0000000000..bbd1f71a62
--- /dev/null
+++ b/tests/testserver/docker-compose-for-windows.yml
@@ -0,0 +1,99 @@
+version: '3.4'
+
+# The tag of images is used by docker compose file to launch the corresponding
+# docker containers. The value of tag comes from the provisioning script
+# (coin/provisioning/.../testserver/docker_testserver.sh). The script gets SHA-1
+# of each server context as the tag of docker images. If one of the server
+# contexts gets changes, please make sure to update this compose file as well.
+# You can run command 'docker images' to list all the tags of test server images.
+# For example:
+# REPOSITORY TAG
+# qt-test-server-apache2 537fe302f61851d1663f41495230d8e3554a4a13
+
+services:
+ apache2:
+ image: qt-test-server-apache2:537fe302f61851d1663f41495230d8e3554a4a13
+ container_name: qt-test-server-apache2
+ domainname: ${TEST_DOMAIN}
+ volumes:
+ - ./common:/common:ro
+ - ./apache2:/service:ro
+ entrypoint: common/startup.sh
+ command: [common/ssl.sh, service/apache2.sh]
+ network_mode: "host"
+ extra_hosts:
+ - "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
+ environment:
+ - test_domain=${TEST_DOMAIN}
+
+ squid:
+ image: qt-test-server-squid:9c32f41b19aca3d778733c4d8fb0ecc5955e893c
+ container_name: qt-test-server-squid
+ domainname: ${TEST_DOMAIN}
+ depends_on:
+ - apache2
+ volumes:
+ - ./common:/common:ro
+ - ./squid:/service:ro
+ entrypoint: common/startup.sh
+ command: service/squid.sh
+ network_mode: "host"
+ extra_hosts:
+ - "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
+ environment:
+ - test_domain=${TEST_DOMAIN}
+
+ vsftpd:
+ image: qt-test-server-vsftpd:f3a9c8d793a77cc007c0e4e481bec01f9e3eeb7e
+ container_name: qt-test-server-vsftpd
+ domainname: ${TEST_DOMAIN}
+ volumes:
+ - ./common:/common:ro
+ - ./vsftpd:/service:ro
+ entrypoint: common/startup.sh
+ command: service/vsftpd.sh
+ network_mode: "host"
+ extra_hosts:
+ - "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
+ environment:
+ - test_domain=${TEST_DOMAIN}
+
+ ftp-proxy:
+ image: qt-test-server-ftp-proxy:d7de8b28392d173db512a558ccc84ead8bece2ae
+ container_name: qt-test-server-ftp-proxy
+ domainname: ${TEST_DOMAIN}
+ depends_on:
+ - vsftpd
+ volumes:
+ - ./common:/common:ro
+ - ./ftp-proxy:/service:ro
+ entrypoint: common/startup.sh
+ command: service/ftp-proxy.sh
+ network_mode: "host"
+ extra_hosts:
+ - "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
+ environment:
+ - test_domain=${TEST_DOMAIN}
+
+ danted:
+ image: qt-test-server-danted:35607f9b790524cf9690c7d12a9a401696b7b6b5
+ container_name: qt-test-server-danted
+ domainname: ${TEST_DOMAIN}
+ depends_on:
+ - apache2
+ - vsftpd
+ - ftp-proxy
+ volumes:
+ - ./common:/common:ro
+ - ./danted:/service:ro
+ entrypoint: common/startup.sh
+ command: service/danted.sh
+ network_mode: "host"
+ extra_hosts:
+ - "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
+ environment:
+ - danted_internal=${MACHINE_IP}
+ - danted_external=${MACHINE_IP}
+ - danted_auth_internal=${MACHINE_IP}
+ - danted_auth_external=${MACHINE_IP}
+ - test_domain=${TEST_DOMAIN}
diff --git a/tests/testserver/docker-compose.yml b/tests/testserver/docker-compose.yml
index a151d6bfb0..be65e5a26a 100644
--- a/tests/testserver/docker-compose.yml
+++ b/tests/testserver/docker-compose.yml
@@ -7,14 +7,14 @@ version: '3.4'
# contexts gets changes, please make sure to update this compose file as well.
# You can run command 'docker images' to list all the tag of test server images.
# For example:
-# REPOSITORY TAG IMAGE ID
-# qt-test-server-apache2 e2a70c8b169c204e762b375885bd3a26cc40ba48 2ad5c8720317
+# REPOSITORY TAG
+# qt-test-server-apache2 537fe302f61851d1663f41495230d8e3554a4a13
services:
apache2:
- image: qt-test-server-apache2:cc9ea678b92bdda33acb9fa0159bb4ad0f3cd947
+ image: qt-test-server-apache2:537fe302f61851d1663f41495230d8e3554a4a13
container_name: qt-test-server-apache2
- domainname: test-net.qt.local
+ domainname: ${TEST_DOMAIN}
hostname: apache2
volumes:
- ./common:/common:ro
@@ -23,14 +23,14 @@ services:
command: [common/ssl.sh, service/apache2.sh]
squid:
- image: qt-test-server-squid:577d99307eea9a8cccfec944d25be2bce2fe99cc
+ image: qt-test-server-squid:9c32f41b19aca3d778733c4d8fb0ecc5955e893c
container_name: qt-test-server-squid
- domainname: test-net.qt.local
+ domainname: ${TEST_DOMAIN}
hostname: squid
depends_on:
- apache2
external_links:
- - apache2:apache2.test-net.qt.local
+ - apache2:apache2.${TEST_DOMAIN}
volumes:
- ./common:/common:ro
- ./squid:/service:ro
@@ -38,9 +38,9 @@ services:
command: service/squid.sh
vsftpd:
- image: qt-test-server-vsftpd:18896604c7e90b543e56d80c8a8aabdb65a590d0
+ image: qt-test-server-vsftpd:f3a9c8d793a77cc007c0e4e481bec01f9e3eeb7e
container_name: qt-test-server-vsftpd
- domainname: test-net.qt.local
+ domainname: ${TEST_DOMAIN}
hostname: vsftpd
volumes:
- ./common:/common:ro
@@ -49,14 +49,14 @@ services:
command: service/vsftpd.sh
ftp-proxy:
- image: qt-test-server-ftp-proxy:2c6c8f1ab6a364b540c43d705fb6f15a585cb2af
+ image: qt-test-server-ftp-proxy:d7de8b28392d173db512a558ccc84ead8bece2ae
container_name: qt-test-server-ftp-proxy
- domainname: test-net.qt.local
+ domainname: ${TEST_DOMAIN}
hostname: ftp-proxy
depends_on:
- vsftpd
external_links:
- - vsftpd:vsftpd.test-net.qt.local
+ - vsftpd:vsftpd.${TEST_DOMAIN}
volumes:
- ./common:/common:ro
- ./ftp-proxy:/service:ro
@@ -64,18 +64,18 @@ services:
command: service/ftp-proxy.sh
danted:
- image: qt-test-server-danted:327dd56c3c35db85b26fac93213a5a1918475bc7
+ image: qt-test-server-danted:35607f9b790524cf9690c7d12a9a401696b7b6b5
container_name: qt-test-server-danted
- domainname: test-net.qt.local
+ domainname: ${TEST_DOMAIN}
hostname: danted
depends_on:
- apache2
- vsftpd
- ftp-proxy
external_links:
- - apache2:apache2.test-net.qt.local
- - vsftpd:vsftpd.test-net.qt.local
- - ftp-proxy:ftp-proxy.test-net.qt.local
+ - apache2:apache2.${TEST_DOMAIN}
+ - vsftpd:vsftpd.${TEST_DOMAIN}
+ - ftp-proxy:ftp-proxy.${TEST_DOMAIN}
volumes:
- ./common:/common:ro
- ./danted:/service:ro
diff --git a/tests/testserver/ftp-proxy/.gitattributes b/tests/testserver/ftp-proxy/.gitattributes
new file mode 100644
index 0000000000..21f6efbe14
--- /dev/null
+++ b/tests/testserver/ftp-proxy/.gitattributes
@@ -0,0 +1,2 @@
+*.sh text eol=lf
+*.conf text eol=lf
diff --git a/tests/testserver/squid/.gitattributes b/tests/testserver/squid/.gitattributes
new file mode 100644
index 0000000000..21f6efbe14
--- /dev/null
+++ b/tests/testserver/squid/.gitattributes
@@ -0,0 +1,2 @@
+*.sh text eol=lf
+*.conf text eol=lf
diff --git a/tests/testserver/vsftpd/.gitattributes b/tests/testserver/vsftpd/.gitattributes
new file mode 100644
index 0000000000..67af4c73e8
--- /dev/null
+++ b/tests/testserver/vsftpd/.gitattributes
@@ -0,0 +1,2 @@
+* text eol=lf
+*.gif -text
diff --git a/tests/testserver/vsftpd/vsftpd.sh b/tests/testserver/vsftpd/vsftpd.sh
index 1ba1a8c347..14364f94c2 100755
--- a/tests/testserver/vsftpd/vsftpd.sh
+++ b/tests/testserver/vsftpd/vsftpd.sh
@@ -41,9 +41,10 @@ useradd -d "/home/$USER/ftp" -s /bin/bash ftptest; echo "ftptest:$PASS" | chpass
cp $TESTDATA/vsftpd.{conf,user_list} /etc/
# Resolve error message "vsftpd failed - probably invalid config" during boot
-command='start-stop-daemon --start --background -m --oknodo --pidfile /var/run/vsftpd/vsftpd.pid'
-command+=' --exec ${DAEMON}'
-sed -i "s,$command.*$,$command; sleep 1," /etc/init.d/vsftpd
+# This bug has been reported to Debian bug tracking system (ID #911396)
+command='ps -C vsftpd | grep -qs "${_PID}"'
+sed -i -e 's,while [ ${n} -le 5 ].*$,while true,' \
+ -e "s,\t\t\tif ! $command.*$,\t\t\tif $command," /etc/init.d/vsftpd
# Populate the FTP sites:
su $USER -c "cp -r $TESTDATA/ftp ~/ftp"
diff --git a/util/lexgen/README b/util/lexgen/README
index 435c7f31ee..005b77b81c 100644
--- a/util/lexgen/README
+++ b/util/lexgen/README
@@ -11,6 +11,5 @@ you want. But I like that it generates code that operates on QChar and friends.
Use at your own risk ;-)
-
--
-Simon Hausmann <simon.hausmann@digia.com>
+Simon Hausmann <simon.hausmann@qt.io>
diff --git a/util/lexgen/css3-simplified.lexgen b/util/lexgen/css3-simplified.lexgen
index 99463d524e..d86a4786be 100644
--- a/util/lexgen/css3-simplified.lexgen
+++ b/util/lexgen/css3-simplified.lexgen
@@ -5,7 +5,7 @@ classname = QCssScanner_Generated
[Code Generator Options]
MapToCode[a-z] = (ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256
TokenPrefix = QCss::
-FileHeader = ../../src/tools/moc/util/licenseheader.txt
+FileHeader = ../../header.LGPL
[Macros]
escape = \\[^\r\n\f0-9a-f]
diff --git a/util/lexgen/generator.cpp b/util/lexgen/generator.cpp
index edd2b603e7..481d586e73 100644
--- a/util/lexgen/generator.cpp
+++ b/util/lexgen/generator.cpp
@@ -29,6 +29,7 @@
#include "generator.h"
#include <QFile>
+#include <QDir>
void Function::printDeclaration(CodeBlock &block, const QString &funcNamePrefix) const
{
@@ -505,14 +506,16 @@ QString Generator::generate()
klass.addMember(Class::PublicMember, lexFunc);
QString header;
- QFile headerFile(headerFileName);
- if (!headerFileName.isEmpty()
- && headerFile.exists()
- && headerFile.open(QIODevice::ReadOnly)) {
- header = QString::fromUtf8(headerFile.readAll());
+ if (!headerFileName.isEmpty()) {
+ QString self(QDir::fromNativeSeparators(QStringLiteral(__FILE__)));
+ int lastSep = self.lastIndexOf(QChar('/'));
+ QDir here(lastSep < 0 ? QStringLiteral(".") : self.left(lastSep));
+ QFile headerFile(QDir::cleanPath(here.filePath(headerFileName)));
+ if (headerFile.exists() && headerFile.open(QIODevice::ReadOnly))
+ header = QString::fromUtf8(headerFile.readAll());
}
- header += QLatin1String("// auto generated. DO NOT EDIT.\n");
+ header += QLatin1String("// auto generated by qtbase/util/lexgen/. DO NOT EDIT.\n");
return header + klass.declaration() + klass.definition();
}
diff --git a/util/lexgen/main.cpp b/util/lexgen/main.cpp
index 22b99b633c..517629f4c1 100644
--- a/util/lexgen/main.cpp
+++ b/util/lexgen/main.cpp
@@ -256,7 +256,7 @@ int main(int argc, char **argv)
}
if (ruleFile.isEmpty()) {
- qWarning("usage: lexgen [-test rulefile");
+ qWarning("usage: lexgen [-debug] [-cache] [-test] rulefile");
qWarning(" ");
qWarning(" the -test option will cause lexgen to interpret standard input");
qWarning(" according to the specified rules and print out pairs of token and");
diff --git a/util/local_database/cldr2qlocalexml.py b/util/local_database/cldr2qlocalexml.py
index ce45f631a6..bc999e1b65 100755
--- a/util/local_database/cldr2qlocalexml.py
+++ b/util/local_database/cldr2qlocalexml.py
@@ -51,6 +51,7 @@ order.
import os
import sys
import re
+import textwrap
import enumdata
import xpathlite
@@ -59,6 +60,10 @@ from dateconverter import convert_date
from localexml import Locale
findEntryInFile = xpathlite._findEntryInFile
+def wrappedwarn(prefix, tokens):
+ return sys.stderr.write(
+ '\n'.join(textwrap.wrap(prefix + ', '.join(tokens),
+ subsequent_indent=' ', width=80)) + '\n')
def parse_number_format(patterns, data):
# this is a very limited parsing of the number format for currency only.
@@ -164,9 +169,9 @@ def getNumberSystems(cache={}):
entry = dict(ns[1])
name = entry[u'id']
if u'digits' in entry and ord(entry[u'digits'][0]) > 0xffff:
- # FIXME: make this redundant:
+ # FIXME, QTBUG-69324: make this redundant:
# omit number system if zero doesn't fit in single-char16 UTF-16 :-(
- sys.stderr.write('skipping number system "%s" [can\'t represent its zero, U+%X, QTBUG-69324]\n'
+ sys.stderr.write('skipping number system "%s" [can\'t represent its zero, U+%X]\n'
% (name, ord(entry[u'digits'][0])))
else:
cache[name] = entry
@@ -243,7 +248,7 @@ def _generateLocaleInfo(path, language_code, script_code, country_code, variant_
numbering_system = None
try:
numbering_system = findEntry(path, "numbers/defaultNumberingSystem")
- except:
+ except xpathlite.Error:
pass
def findEntryDef(path, xpath, value=''):
try:
@@ -438,6 +443,38 @@ def integrateWeekData(filePath):
else:
locale.weekendEnd = weekendEndByCountryCode["001"]
+def splitLocale(name):
+ """Split name into (language, script, territory) triple as generator.
+
+ Ignores any trailing fields (with a warning), leaves script (a capitalised
+ four-letter token) or territory (either a number or an all-uppercase token)
+ empty if unspecified, returns a single-entry generator if name is a single
+ tag (i.e. contains no underscores). Always yields 1 or 3 values, never 2."""
+ tags = iter(name.split('_'))
+ yield tags.next() # Language
+ tag = tags.next()
+
+ # Script is always four letters, always capitalised:
+ if len(tag) == 4 and tag[0].isupper() and tag[1:].islower():
+ yield tag
+ try:
+ tag = tags.next()
+ except StopIteration:
+ tag = ''
+ else:
+ yield ''
+
+ # Territory is upper-case or numeric:
+ if tag and tag.isupper() or tag.isdigit():
+ yield tag
+ tag = ''
+ else:
+ yield ''
+
+ # If nothing is left, StopIteration will avoid the warning:
+ tag = (tag if tag else tags.next(),)
+ sys.stderr.write('Ignoring unparsed cruft %s in %s\n' % ('_'.join(tag + tuple(tags)), name))
+
if len(sys.argv) != 2:
usage()
@@ -451,34 +488,30 @@ cldr_files = os.listdir(cldr_dir)
locale_database = {}
# see http://www.unicode.org/reports/tr35/tr35-info.html#Default_Content
-defaultContent_locales = {}
+defaultContent_locales = []
for ns in findTagsInFile(os.path.join(cldr_dir, '..', 'supplemental',
'supplementalMetadata.xml'),
'metadata/defaultContent'):
for data in ns[1:][0]:
if data[0] == u"locales":
- defaultContent_locales = data[1].split()
+ defaultContent_locales += data[1].split()
+skips = []
for file in defaultContent_locales:
- items = file.split("_")
- if len(items) == 3:
- language_code = items[0]
- script_code = items[1]
- country_code = items[2]
- else:
- if len(items) != 2:
- sys.stderr.write('skipping defaultContent locale "' + file + '" [neither lang_script_country nor lang_country]\n')
- continue
- language_code = items[0]
- script_code = ""
- country_code = items[1]
- if len(country_code) == 4:
- sys.stderr.write('skipping defaultContent locale "' + file + '" [long country code]\n')
- continue
+ try:
+ language_code, script_code, country_code = splitLocale(file)
+ except ValueError:
+ sys.stderr.write('skipping defaultContent locale "' + file + '" [neither two nor three tags]\n')
+ continue
+
+ if not (script_code or country_code):
+ sys.stderr.write('skipping defaultContent locale "' + file + '" [second tag is neither script nor territory]\n')
+ continue
+
try:
l = _generateLocaleInfo(cldr_dir + "/" + file + ".xml", language_code, script_code, country_code)
if not l:
- sys.stderr.write('skipping defaultContent locale "' + file + '" [no locale info generated]\n')
+ skips.append(file)
continue
except xpathlite.Error as e:
sys.stderr.write('skipping defaultContent locale "%s" (%s)\n' % (file, str(e)))
@@ -486,11 +519,15 @@ for file in defaultContent_locales:
locale_database[(l.language_id, l.script_id, l.country_id, l.variant_code)] = l
+if skips:
+ wrappedwarn('skipping defaultContent locales [no locale info generated]: ', skips)
+ skips = []
+
for file in cldr_files:
try:
l = generateLocaleInfo(cldr_dir + "/" + file)
if not l:
- sys.stderr.write('skipping file "' + file + '" [no locale info generated]\n')
+ skips.append(file)
continue
except xpathlite.Error as e:
sys.stderr.write('skipping file "%s" (%s)\n' % (file, str(e)))
@@ -498,6 +535,9 @@ for file in cldr_files:
locale_database[(l.language_id, l.script_id, l.country_id, l.variant_code)] = l
+if skips:
+ wrappedwarn('skipping files [no locale info generated]: ', skips)
+
integrateWeekData(cldr_dir+"/../supplemental/supplementalData.xml")
locale_keys = locale_database.keys()
locale_keys.sort()
@@ -548,34 +588,35 @@ def _parseLocale(l):
if l == "und":
raise xpathlite.Error("we are treating unknown locale like C")
- items = l.split("_")
- language_code = items[0]
+ parsed = splitLocale(l)
+ language_code = parsed.next()
+ script_code = country_code = ''
+ try:
+ script_code, country_code = parsed
+ except ValueError:
+ pass
+
if language_code != "und":
language_id = enumdata.languageCodeToId(language_code)
if language_id == -1:
raise xpathlite.Error('unknown language code "%s"' % language_code)
language = enumdata.language_list[language_id][0]
- if len(items) > 1:
- script_code = items[1]
- country_code = ""
- if len(items) > 2:
- country_code = items[2]
- if len(script_code) == 4:
- script_id = enumdata.scriptCodeToId(script_code)
- if script_id == -1:
- raise xpathlite.Error('unknown script code "%s"' % script_code)
- script = enumdata.script_list[script_id][0]
- else:
- country_code = script_code
- if country_code:
- country_id = enumdata.countryCodeToId(country_code)
- if country_id == -1:
- raise xpathlite.Error('unknown country code "%s"' % country_code)
- country = enumdata.country_list[country_id][0]
+ if script_code:
+ script_id = enumdata.scriptCodeToId(script_code)
+ if script_id == -1:
+ raise xpathlite.Error('unknown script code "%s"' % script_code)
+ script = enumdata.script_list[script_id][0]
+
+ if country_code:
+ country_id = enumdata.countryCodeToId(country_code)
+ if country_id == -1:
+ raise xpathlite.Error('unknown country code "%s"' % country_code)
+ country = enumdata.country_list[country_id][0]
return (language, script, country)
+skips = []
print " <likelySubtags>"
for ns in findTagsInFile(cldr_dir + "/../supplemental/likelySubtags.xml", "likelySubtags"):
tmp = {}
@@ -583,14 +624,13 @@ for ns in findTagsInFile(cldr_dir + "/../supplemental/likelySubtags.xml", "likel
tmp[data[0]] = data[1]
try:
- (from_language, from_script, from_country) = _parseLocale(tmp[u"from"])
+ from_language, from_script, from_country = _parseLocale(tmp[u"from"])
+ to_language, to_script, to_country = _parseLocale(tmp[u"to"])
except xpathlite.Error as e:
- sys.stderr.write('skipping likelySubtag "%s" -> "%s" (%s)\n' % (tmp[u"from"], tmp[u"to"], str(e)))
- continue
- try:
- (to_language, to_script, to_country) = _parseLocale(tmp[u"to"])
- except xpathlite.Error as e:
- sys.stderr.write('skipping likelySubtag "%s" -> "%s" (%s)\n' % (tmp[u"from"], tmp[u"to"], str(e)))
+ if tmp[u'to'].startswith(tmp[u'from']) and str(e) == 'unknown language code "%s"' % tmp[u'from']:
+ skips.append(tmp[u'to'])
+ else:
+ sys.stderr.write('skipping likelySubtag "%s" -> "%s" (%s)\n' % (tmp[u"from"], tmp[u"to"], str(e)))
continue
# substitute according to http://www.unicode.org/reports/tr35/#Likely_Subtags
if to_country == "AnyCountry" and from_country != to_country:
@@ -611,7 +651,8 @@ for ns in findTagsInFile(cldr_dir + "/../supplemental/likelySubtags.xml", "likel
print " </to>"
print " </likelySubtag>"
print " </likelySubtags>"
-
+if skips:
+ wrappedwarn('skipping likelySubtags (for unknown language codes): ', skips)
print " <localeList>"
Locale.C().toXml()
diff --git a/util/local_database/enumdata.py b/util/local_database/enumdata.py
index e24ac02b07..26bb74d1fe 100644
--- a/util/local_database/enumdata.py
+++ b/util/local_database/enumdata.py
@@ -37,366 +37,371 @@
### Qt 6: restore alphabetic order in each list.
language_list = {
- 0 : ["AnyLanguage", " "],
- 1 : ["C", " "],
- 2 : ["Abkhazian", "ab"],
- 3 : ["Oromo", "om"], # macrolanguage
- 4 : ["Afar", "aa"],
- 5 : ["Afrikaans", "af"],
- 6 : ["Albanian", "sq"], # macrolanguage
- 7 : ["Amharic", "am"],
- 8 : ["Arabic", "ar"], # macrolanguage
- 9 : ["Armenian", "hy"],
- 10 : ["Assamese", "as"],
- 11 : ["Aymara", "ay"], # macrolanguage
- 12 : ["Azerbaijani", "az"], # macrolanguage
- 13 : ["Bashkir", "ba"],
- 14 : ["Basque", "eu"],
- 15 : ["Bengali", "bn"],
- 16 : ["Dzongkha", "dz"],
- 17 : ["Bihari", "bh"],
- 18 : ["Bislama", "bi"],
- 19 : ["Breton", "br"],
- 20 : ["Bulgarian", "bg"],
- 21 : ["Burmese", "my"],
- 22 : ["Belarusian", "be"],
- 23 : ["Khmer", "km"],
- 24 : ["Catalan", "ca"],
- 25 : ["Chinese", "zh"], # macrolanguage
- 26 : ["Corsican", "co"],
- 27 : ["Croatian", "hr"],
- 28 : ["Czech", "cs"],
- 29 : ["Danish", "da"],
- 30 : ["Dutch", "nl"],
- 31 : ["English", "en"],
- 32 : ["Esperanto", "eo"],
- 33 : ["Estonian", "et"], # macrolanguage
- 34 : ["Faroese", "fo"],
- 35 : ["Fijian", "fj"],
- 36 : ["Finnish", "fi"],
- 37 : ["French", "fr"],
- 38 : ["Western Frisian", "fy"],
- 39 : ["Gaelic", "gd"],
- 40 : ["Galician", "gl"],
- 41 : ["Georgian", "ka"],
- 42 : ["German", "de"],
- 43 : ["Greek", "el"],
- 44 : ["Greenlandic", "kl"],
- 45 : ["Guarani", "gn"], # macrolanguage
- 46 : ["Gujarati", "gu"],
- 47 : ["Hausa", "ha"],
- 48 : ["Hebrew", "he"],
- 49 : ["Hindi", "hi"],
- 50 : ["Hungarian", "hu"],
- 51 : ["Icelandic", "is"],
- 52 : ["Indonesian", "id"],
- 53 : ["Interlingua", "ia"],
- 54 : ["Interlingue", "ie"],
- 55 : ["Inuktitut", "iu"], # macrolanguage
- 56 : ["Inupiak", "ik"], # macrolanguage
- 57 : ["Irish", "ga"],
- 58 : ["Italian", "it"],
- 59 : ["Japanese", "ja"],
- 60 : ["Javanese", "jv"],
- 61 : ["Kannada", "kn"],
- 62 : ["Kashmiri", "ks"],
- 63 : ["Kazakh", "kk"],
- 64 : ["Kinyarwanda", "rw"],
- 65 : ["Kirghiz", "ky"],
- 66 : ["Korean", "ko"],
- 67 : ["Kurdish", "ku"], # macrolanguage
- 68 : ["Rundi", "rn"],
- 69 : ["Lao", "lo"],
- 70 : ["Latin", "la"],
- 71 : ["Latvian", "lv"], # macrolanguage
- 72 : ["Lingala", "ln"],
- 73 : ["Lithuanian", "lt"],
- 74 : ["Macedonian", "mk"],
- 75 : ["Malagasy", "mg"], # macrolanguage
- 76 : ["Malay", "ms"], # macrolanguage
- 77 : ["Malayalam", "ml"],
- 78 : ["Maltese", "mt"],
- 79 : ["Maori", "mi"],
- 80 : ["Marathi", "mr"],
- 81 : ["Marshallese", "mh"],
- 82 : ["Mongolian", "mn"], # macrolanguage
- 83 : ["Nauru", "na"],
- 84 : ["Nepali", "ne"], # macrolanguage
- 85 : ["Norwegian Bokmal", "nb"],
- 86 : ["Occitan", "oc"],
- 87 : ["Oriya", "or"], # macrolanguage
- 88 : ["Pashto", "ps"], # macrolanguage
- 89 : ["Persian", "fa"], # macrolanguage
- 90 : ["Polish", "pl"],
- 91 : ["Portuguese", "pt"],
- 92 : ["Punjabi", "pa"],
- 93 : ["Quechua", "qu"], # macrolanguage
- 94 : ["Romansh", "rm"],
- 95 : ["Romanian", "ro"],
- 96 : ["Russian", "ru"],
- 97 : ["Samoan", "sm"],
- 98 : ["Sango", "sg"],
- 99 : ["Sanskrit", "sa"],
- 100 : ["Serbian", "sr"],
- 101 : ["Ossetic", "os"],
- 102 : ["Southern Sotho", "st"],
- 103 : ["Tswana", "tn"],
- 104 : ["Shona", "sn"],
- 105 : ["Sindhi", "sd"],
- 106 : ["Sinhala", "si"],
- 107 : ["Swati", "ss"],
- 108 : ["Slovak", "sk"],
- 109 : ["Slovenian", "sl"],
- 110 : ["Somali", "so"],
- 111 : ["Spanish", "es"],
- 112 : ["Sundanese", "su"],
- 113 : ["Swahili", "sw"], # macrolanguage
- 114 : ["Swedish", "sv"],
- 115 : ["Sardinian", "sc"], # macrolanguage
- 116 : ["Tajik", "tg"],
- 117 : ["Tamil", "ta"],
- 118 : ["Tatar", "tt"],
- 119 : ["Telugu", "te"],
- 120 : ["Thai", "th"],
- 121 : ["Tibetan", "bo"],
- 122 : ["Tigrinya", "ti"],
- 123 : ["Tongan", "to"],
- 124 : ["Tsonga", "ts"],
- 125 : ["Turkish", "tr"],
- 126 : ["Turkmen", "tk"],
- 127 : ["Tahitian", "ty"],
- 128 : ["Uighur", "ug"],
- 129 : ["Ukrainian", "uk"],
- 130 : ["Urdu", "ur"],
- 131 : ["Uzbek", "uz"], # macrolanguage
- 132 : ["Vietnamese", "vi"],
- 133 : ["Volapuk", "vo"],
- 134 : ["Welsh", "cy"],
- 135 : ["Wolof", "wo"],
- 136 : ["Xhosa", "xh"],
- 137 : ["Yiddish", "yi"], # macrolanguage
- 138 : ["Yoruba", "yo"],
- 139 : ["Zhuang", "za"], # macrolanguage
- 140 : ["Zulu", "zu"],
- 141 : ["Norwegian Nynorsk", "nn"],
- 142 : ["Bosnian", "bs"],
- 143 : ["Divehi", "dv"],
- 144 : ["Manx", "gv"],
- 145 : ["Cornish", "kw"],
- 146 : ["Akan", "ak"], # macrolanguage
- 147 : ["Konkani", "kok"],
- 148 : ["Ga", "gaa"],
- 149 : ["Igbo", "ig" ],
- 150 : ["Kamba", "kam"],
- 151 : ["Syriac", "syr"],
- 152 : ["Blin", "byn"],
- 153 : ["Geez", "gez"],
- 154 : ["Koro", "kfo"],
- 155 : ["Sidamo", "sid"],
- 156 : ["Atsam", "cch"],
- 157 : ["Tigre", "tig"],
- 158 : ["Jju", "kaj"],
- 159 : ["Friulian", "fur"],
- 160 : ["Venda", "ve" ],
- 161 : ["Ewe", "ee" ],
- 162 : ["Walamo", "wal"],
- 163 : ["Hawaiian", "haw"],
- 164 : ["Tyap", "kcg"],
- 165 : ["Nyanja", "ny" ],
- 166 : ["Filipino", "fil"],
- 167 : ["Swiss German", "gsw"],
- 168 : ["Sichuan Yi", "ii" ],
- 169 : ["Kpelle", "kpe"],
- 170 : ["Low German", "nds"],
- 171 : ["South Ndebele", "nr" ],
- 172 : ["Northern Sotho", "nso"],
- 173 : ["Northern Sami", "se" ],
- 174 : ["Taroko", "trv"],
- 175 : ["Gusii", "guz"],
- 176 : ["Taita", "dav"],
- 177 : ["Fulah", "ff"], # macrolanguage
- 178 : ["Kikuyu", "ki"],
- 179 : ["Samburu", "saq"],
- 180 : ["Sena", "seh"],
- 181 : ["North Ndebele", "nd"],
- 182 : ["Rombo", "rof"],
- 183 : ["Tachelhit", "shi"],
- 184 : ["Kabyle", "kab"],
- 185 : ["Nyankole", "nyn"],
- 186 : ["Bena", "bez"],
- 187 : ["Vunjo", "vun"],
- 188 : ["Bambara", "bm"],
- 189 : ["Embu", "ebu"],
- 190 : ["Cherokee", "chr"],
- 191 : ["Morisyen", "mfe"],
- 192 : ["Makonde", "kde"],
- 193 : ["Langi", "lag"],
- 194 : ["Ganda", "lg"],
- 195 : ["Bemba", "bem"],
- 196 : ["Kabuverdianu", "kea"],
- 197 : ["Meru", "mer"],
- 198 : ["Kalenjin", "kln"],
- 199 : ["Nama", "naq"],
- 200 : ["Machame", "jmc"],
- 201 : ["Colognian", "ksh"],
- 202 : ["Masai", "mas"],
- 203 : ["Soga", "xog"],
- 204 : ["Luyia", "luy"],
- 205 : ["Asu", "asa"],
- 206 : ["Teso", "teo"],
- 207 : ["Saho", "ssy"],
- 208 : ["Koyra Chiini", "khq"],
- 209 : ["Rwa", "rwk"],
- 210 : ["Luo", "luo"],
- 211 : ["Chiga", "cgg"],
- 212 : ["Central Morocco Tamazight", "tzm"],
- 213 : ["Koyraboro Senni", "ses"],
- 214 : ["Shambala", "ksb"],
- 215 : ["Bodo", "brx"],
- 216 : ["Avaric", "av"],
- 217 : ["Chamorro", "ch"],
- 218 : ["Chechen", "ce"],
- 219 : ["Church", "cu"], # macrolanguage
- 220 : ["Chuvash", "cv"],
- 221 : ["Cree", "cr"], # macrolanguage
- 222 : ["Haitian", "ht"],
- 223 : ["Herero", "hz"],
- 224 : ["Hiri Motu", "ho"],
- 225 : ["Kanuri", "kr"], # macrolanguage
- 226 : ["Komi", "kv"], # macrolanguage
- 227 : ["Kongo", "kg"], # macrolanguage
- 228 : ["Kwanyama", "kj"],
- 229 : ["Limburgish", "li"],
- 230 : ["Luba Katanga", "lu"],
- 231 : ["Luxembourgish", "lb"],
- 232 : ["Navaho", "nv"],
- 233 : ["Ndonga", "ng"],
- 234 : ["Ojibwa", "oj"], # macrolanguage
- 235 : ["Pali", "pi"], # macrolanguage
- 236 : ["Walloon", "wa"],
- 237 : ["Aghem", "agq"],
- 238 : ["Basaa", "bas"],
- 239 : ["Zarma", "dje"],
- 240 : ["Duala", "dua"],
- 241 : ["Jola Fonyi", "dyo"],
- 242 : ["Ewondo", "ewo"],
- 243 : ["Bafia", "ksf"],
- 244 : ["Makhuwa Meetto", "mgh"],
- 245 : ["Mundang", "mua"],
- 246 : ["Kwasio", "nmg"],
- 247 : ["Nuer", "nus"],
- 248 : ["Sakha", "sah"],
- 249 : ["Sangu", "sbp"],
- 250 : ["Congo Swahili", "swc"],
- 251 : ["Tasawaq", "twq"],
- 252 : ["Vai", "vai"],
- 253 : ["Walser", "wae"],
- 254 : ["Yangben", "yav"],
- 255 : ["Avestan", "ae"],
- 256 : ["Asturian", "ast"],
- 257 : ["Ngomba", "jgo"],
- 258 : ["Kako", "kkj"],
- 259 : ["Meta", "mgo"],
- 260 : ["Ngiemboon", "nnh"],
- 261 : ["Aragonese", "an"],
- 262 : ["Akkadian", "akk"],
- 263 : ["Ancient Egyptian", "egy"],
- 264 : ["Ancient Greek", "grc"],
- 265 : ["Aramaic", "arc"],
- 266 : ["Balinese", "ban"],
- 267 : ["Bamun", "bax"],
- 268 : ["Batak Toba", "bbc"],
- 269 : ["Buginese", "bug"],
- 270 : ["Buhid", "bku"],
- 271 : ["Carian", "xcr"],
- 272 : ["Chakma", "ccp"],
- 273 : ["Classical Mandaic", "myz"],
- 274 : ["Coptic", "cop"],
- 275 : ["Dogri", "doi"], # macrolanguage
- 276 : ["Eastern Cham", "cjm"],
- 277 : ["Eastern Kayah", "eky"],
- 278 : ["Etruscan", "ett"],
- 279 : ["Gothic", "got"],
- 280 : ["Hanunoo", "hnn"],
- 281 : ["Ingush", "inh"],
- 282 : ["Large Flowery Miao", "hmd"],
- 283 : ["Lepcha", "lep"],
- 284 : ["Limbu", "lif"],
- 285 : ["Lisu", "lis"],
- 286 : ["Lu", "khb"],
- 287 : ["Lycian", "xlc"],
- 288 : ["Lydian", "xld"],
- 289 : ["Mandingo", "man"], # macrolanguage
- 290 : ["Manipuri", "mni"],
- 291 : ["Meroitic", "xmr"],
- 292 : ["Northern Thai", "nod"],
- 293 : ["Old Irish", "sga"],
- 294 : ["Old Norse", "non"],
- 295 : ["Old Persian", "peo"],
- 296 : ["Old Turkish", "otk"],
- 297 : ["Pahlavi", "pal"],
- 298 : ["Parthian", "xpr"],
- 299 : ["Phoenician", "phn"],
- 300 : ["Prakrit Language", "pra"],
- 301 : ["Rejang", "rej"],
- 302 : ["Sabaean", "xsa"],
- 303 : ["Samaritan", "smp"],
- 304 : ["Santali", "sat"],
- 305 : ["Saurashtra", "saz"],
- 306 : ["Sora", "srb"],
- 307 : ["Sylheti", "syl"],
- 308 : ["Tagbanwa", "tbw"],
- 309 : ["Tai Dam", "blt"],
- 310 : ["Tai Nua", "tdd"],
- 311 : ["Ugaritic", "uga"],
- 312 : ["Akoose", "bss"],
- 313 : ["Lakota", "lkt"],
- 314 : ["Standard Moroccan Tamazight", "zgh"],
- 315 : ["Mapuche", "arn"],
- 316 : ["Central Kurdish", "ckb"],
- 317 : ["Lower Sorbian", "dsb"],
- 318 : ["Upper Sorbian", "hsb"],
- 319 : ["Kenyang", "ken"],
- 320 : ["Mohawk", "moh"],
- 321 : ["Nko", "nqo"],
- 322 : ["Prussian", "prg"],
- 323 : ["Kiche", "quc"],
- 324 : ["Southern Sami", "sma"],
- 325 : ["Lule Sami", "smj"],
- 326 : ["Inari Sami", "smn"],
- 327 : ["Skolt Sami", "sms"],
- 328 : ["Warlpiri", "wbp"],
- 329 : ["Manichaean Middle Persian", "xmn"],
- 330 : ["Mende", "men"],
- 331 : ["Ancient North Arabian", "xna"],
- 332 : ["Linear A", "lab"],
- 333 : ["Hmong Njua", "hnj"],
- 334 : ["Ho", "hoc"],
- 335 : ["Lezghian", "lez"],
- 336 : ["Bassa", "bsq"],
- 337 : ["Mono", "mru"],
- 338 : ["Tedim Chin", "ctd"],
- 339 : ["Maithili", "mai"],
- 340 : ["Ahom", "aho"],
- 341 : ["American Sign Language", "ase"],
- 342 : ["Ardhamagadhi Prakrit", "pka"],
- 343 : ["Bhojpuri", "bho"],
- 344 : ["Hieroglyphic Luwian", "hlu"],
- 345 : ["Literary Chinese", "lzh"],
- 346 : ["Mazanderani", "mzn"],
- 347 : ["Mru", "mro"],
- 348 : ["Newari", "new"],
- 349 : ["Northern Luri", "lrc"],
- 350 : ["Palauan", "pau"],
- 351 : ["Papiamento", "pap"],
- 352 : ["Saraiki", "skr"],
- 353 : ["Tokelau", "tkl"],
- 354 : ["Tok Pisin", "tpi"],
- 355 : ["Tuvalu", "tvl"],
- 356 : ["Uncoded Languages", "mis"],
- 357 : ["Cantonese", "yue"],
- 358 : ["Osage", "osa"],
- 359 : ["Tangut", "txg"]
+ 0: ["AnyLanguage", " "],
+ 1: ["C", " "],
+ 2: ["Abkhazian", "ab"],
+ 3: ["Oromo", "om"], # macrolanguage
+ 4: ["Afar", "aa"],
+ 5: ["Afrikaans", "af"],
+ 6: ["Albanian", "sq"], # macrolanguage
+ 7: ["Amharic", "am"],
+ 8: ["Arabic", "ar"], # macrolanguage
+ 9: ["Armenian", "hy"],
+ 10: ["Assamese", "as"],
+ 11: ["Aymara", "ay"], # macrolanguage
+ 12: ["Azerbaijani", "az"], # macrolanguage
+ 13: ["Bashkir", "ba"],
+ 14: ["Basque", "eu"],
+ 15: ["Bengali", "bn"],
+ 16: ["Dzongkha", "dz"],
+ 17: ["Bihari", "bh"],
+ 18: ["Bislama", "bi"],
+ 19: ["Breton", "br"],
+ 20: ["Bulgarian", "bg"],
+ 21: ["Burmese", "my"],
+ 22: ["Belarusian", "be"],
+ 23: ["Khmer", "km"],
+ 24: ["Catalan", "ca"],
+ 25: ["Chinese", "zh"], # macrolanguage
+ 26: ["Corsican", "co"],
+ 27: ["Croatian", "hr"],
+ 28: ["Czech", "cs"],
+ 29: ["Danish", "da"],
+ 30: ["Dutch", "nl"],
+ 31: ["English", "en"],
+ 32: ["Esperanto", "eo"],
+ 33: ["Estonian", "et"], # macrolanguage
+ 34: ["Faroese", "fo"],
+ 35: ["Fijian", "fj"],
+ 36: ["Finnish", "fi"],
+ 37: ["French", "fr"],
+ 38: ["Western Frisian", "fy"],
+ 39: ["Gaelic", "gd"],
+ 40: ["Galician", "gl"],
+ 41: ["Georgian", "ka"],
+ 42: ["German", "de"],
+ 43: ["Greek", "el"],
+ 44: ["Greenlandic", "kl"],
+ 45: ["Guarani", "gn"], # macrolanguage
+ 46: ["Gujarati", "gu"],
+ 47: ["Hausa", "ha"],
+ 48: ["Hebrew", "he"],
+ 49: ["Hindi", "hi"],
+ 50: ["Hungarian", "hu"],
+ 51: ["Icelandic", "is"],
+ 52: ["Indonesian", "id"],
+ 53: ["Interlingua", "ia"],
+ 54: ["Interlingue", "ie"],
+ 55: ["Inuktitut", "iu"], # macrolanguage
+ 56: ["Inupiak", "ik"], # macrolanguage
+ 57: ["Irish", "ga"],
+ 58: ["Italian", "it"],
+ 59: ["Japanese", "ja"],
+ 60: ["Javanese", "jv"],
+ 61: ["Kannada", "kn"],
+ 62: ["Kashmiri", "ks"],
+ 63: ["Kazakh", "kk"],
+ 64: ["Kinyarwanda", "rw"],
+ 65: ["Kirghiz", "ky"],
+ 66: ["Korean", "ko"],
+ 67: ["Kurdish", "ku"], # macrolanguage
+ 68: ["Rundi", "rn"],
+ 69: ["Lao", "lo"],
+ 70: ["Latin", "la"],
+ 71: ["Latvian", "lv"], # macrolanguage
+ 72: ["Lingala", "ln"],
+ 73: ["Lithuanian", "lt"],
+ 74: ["Macedonian", "mk"],
+ 75: ["Malagasy", "mg"], # macrolanguage
+ 76: ["Malay", "ms"], # macrolanguage
+ 77: ["Malayalam", "ml"],
+ 78: ["Maltese", "mt"],
+ 79: ["Maori", "mi"],
+ 80: ["Marathi", "mr"],
+ 81: ["Marshallese", "mh"],
+ 82: ["Mongolian", "mn"], # macrolanguage
+ 83: ["Nauru", "na"],
+ 84: ["Nepali", "ne"], # macrolanguage
+ 85: ["Norwegian Bokmal", "nb"],
+ 86: ["Occitan", "oc"],
+ 87: ["Oriya", "or"], # macrolanguage
+ 88: ["Pashto", "ps"], # macrolanguage
+ 89: ["Persian", "fa"], # macrolanguage
+ 90: ["Polish", "pl"],
+ 91: ["Portuguese", "pt"],
+ 92: ["Punjabi", "pa"],
+ 93: ["Quechua", "qu"], # macrolanguage
+ 94: ["Romansh", "rm"],
+ 95: ["Romanian", "ro"],
+ 96: ["Russian", "ru"],
+ 97: ["Samoan", "sm"],
+ 98: ["Sango", "sg"],
+ 99: ["Sanskrit", "sa"],
+ 100: ["Serbian", "sr"],
+ 101: ["Ossetic", "os"],
+ 102: ["Southern Sotho", "st"],
+ 103: ["Tswana", "tn"],
+ 104: ["Shona", "sn"],
+ 105: ["Sindhi", "sd"],
+ 106: ["Sinhala", "si"],
+ 107: ["Swati", "ss"],
+ 108: ["Slovak", "sk"],
+ 109: ["Slovenian", "sl"],
+ 110: ["Somali", "so"],
+ 111: ["Spanish", "es"],
+ 112: ["Sundanese", "su"],
+ 113: ["Swahili", "sw"], # macrolanguage
+ 114: ["Swedish", "sv"],
+ 115: ["Sardinian", "sc"], # macrolanguage
+ 116: ["Tajik", "tg"],
+ 117: ["Tamil", "ta"],
+ 118: ["Tatar", "tt"],
+ 119: ["Telugu", "te"],
+ 120: ["Thai", "th"],
+ 121: ["Tibetan", "bo"],
+ 122: ["Tigrinya", "ti"],
+ 123: ["Tongan", "to"],
+ 124: ["Tsonga", "ts"],
+ 125: ["Turkish", "tr"],
+ 126: ["Turkmen", "tk"],
+ 127: ["Tahitian", "ty"],
+ 128: ["Uighur", "ug"],
+ 129: ["Ukrainian", "uk"],
+ 130: ["Urdu", "ur"],
+ 131: ["Uzbek", "uz"], # macrolanguage
+ 132: ["Vietnamese", "vi"],
+ 133: ["Volapuk", "vo"],
+ 134: ["Welsh", "cy"],
+ 135: ["Wolof", "wo"],
+ 136: ["Xhosa", "xh"],
+ 137: ["Yiddish", "yi"], # macrolanguage
+ 138: ["Yoruba", "yo"],
+ 139: ["Zhuang", "za"], # macrolanguage
+ 140: ["Zulu", "zu"],
+ 141: ["Norwegian Nynorsk", "nn"],
+ 142: ["Bosnian", "bs"],
+ 143: ["Divehi", "dv"],
+ 144: ["Manx", "gv"],
+ 145: ["Cornish", "kw"],
+ 146: ["Akan", "ak"], # macrolanguage
+ 147: ["Konkani", "kok"],
+ 148: ["Ga", "gaa"],
+ 149: ["Igbo", "ig" ],
+ 150: ["Kamba", "kam"],
+ 151: ["Syriac", "syr"],
+ 152: ["Blin", "byn"],
+ 153: ["Geez", "gez"],
+ 154: ["Koro", "kfo"],
+ 155: ["Sidamo", "sid"],
+ 156: ["Atsam", "cch"],
+ 157: ["Tigre", "tig"],
+ 158: ["Jju", "kaj"],
+ 159: ["Friulian", "fur"],
+ 160: ["Venda", "ve" ],
+ 161: ["Ewe", "ee" ],
+ 162: ["Walamo", "wal"],
+ 163: ["Hawaiian", "haw"],
+ 164: ["Tyap", "kcg"],
+ 165: ["Nyanja", "ny" ],
+ 166: ["Filipino", "fil"],
+ 167: ["Swiss German", "gsw"],
+ 168: ["Sichuan Yi", "ii" ],
+ 169: ["Kpelle", "kpe"],
+ 170: ["Low German", "nds"],
+ 171: ["South Ndebele", "nr" ],
+ 172: ["Northern Sotho", "nso"],
+ 173: ["Northern Sami", "se" ],
+ 174: ["Taroko", "trv"],
+ 175: ["Gusii", "guz"],
+ 176: ["Taita", "dav"],
+ 177: ["Fulah", "ff"], # macrolanguage
+ 178: ["Kikuyu", "ki"],
+ 179: ["Samburu", "saq"],
+ 180: ["Sena", "seh"],
+ 181: ["North Ndebele", "nd"],
+ 182: ["Rombo", "rof"],
+ 183: ["Tachelhit", "shi"],
+ 184: ["Kabyle", "kab"],
+ 185: ["Nyankole", "nyn"],
+ 186: ["Bena", "bez"],
+ 187: ["Vunjo", "vun"],
+ 188: ["Bambara", "bm"],
+ 189: ["Embu", "ebu"],
+ 190: ["Cherokee", "chr"],
+ 191: ["Morisyen", "mfe"],
+ 192: ["Makonde", "kde"],
+ 193: ["Langi", "lag"],
+ 194: ["Ganda", "lg"],
+ 195: ["Bemba", "bem"],
+ 196: ["Kabuverdianu", "kea"],
+ 197: ["Meru", "mer"],
+ 198: ["Kalenjin", "kln"],
+ 199: ["Nama", "naq"],
+ 200: ["Machame", "jmc"],
+ 201: ["Colognian", "ksh"],
+ 202: ["Masai", "mas"],
+ 203: ["Soga", "xog"],
+ 204: ["Luyia", "luy"],
+ 205: ["Asu", "asa"],
+ 206: ["Teso", "teo"],
+ 207: ["Saho", "ssy"],
+ 208: ["Koyra Chiini", "khq"],
+ 209: ["Rwa", "rwk"],
+ 210: ["Luo", "luo"],
+ 211: ["Chiga", "cgg"],
+ 212: ["Central Morocco Tamazight", "tzm"],
+ 213: ["Koyraboro Senni", "ses"],
+ 214: ["Shambala", "ksb"],
+ 215: ["Bodo", "brx"],
+ 216: ["Avaric", "av"],
+ 217: ["Chamorro", "ch"],
+ 218: ["Chechen", "ce"],
+ 219: ["Church", "cu"], # macrolanguage
+ 220: ["Chuvash", "cv"],
+ 221: ["Cree", "cr"], # macrolanguage
+ 222: ["Haitian", "ht"],
+ 223: ["Herero", "hz"],
+ 224: ["Hiri Motu", "ho"],
+ 225: ["Kanuri", "kr"], # macrolanguage
+ 226: ["Komi", "kv"], # macrolanguage
+ 227: ["Kongo", "kg"], # macrolanguage
+ 228: ["Kwanyama", "kj"],
+ 229: ["Limburgish", "li"],
+ 230: ["Luba Katanga", "lu"],
+ 231: ["Luxembourgish", "lb"],
+ 232: ["Navaho", "nv"],
+ 233: ["Ndonga", "ng"],
+ 234: ["Ojibwa", "oj"], # macrolanguage
+ 235: ["Pali", "pi"], # macrolanguage
+ 236: ["Walloon", "wa"],
+ 237: ["Aghem", "agq"],
+ 238: ["Basaa", "bas"],
+ 239: ["Zarma", "dje"],
+ 240: ["Duala", "dua"],
+ 241: ["Jola Fonyi", "dyo"],
+ 242: ["Ewondo", "ewo"],
+ 243: ["Bafia", "ksf"],
+ 244: ["Makhuwa Meetto", "mgh"],
+ 245: ["Mundang", "mua"],
+ 246: ["Kwasio", "nmg"],
+ 247: ["Nuer", "nus"],
+ 248: ["Sakha", "sah"],
+ 249: ["Sangu", "sbp"],
+ 250: ["Congo Swahili", "swc"],
+ 251: ["Tasawaq", "twq"],
+ 252: ["Vai", "vai"],
+ 253: ["Walser", "wae"],
+ 254: ["Yangben", "yav"],
+ 255: ["Avestan", "ae"],
+ 256: ["Asturian", "ast"],
+ 257: ["Ngomba", "jgo"],
+ 258: ["Kako", "kkj"],
+ 259: ["Meta", "mgo"],
+ 260: ["Ngiemboon", "nnh"],
+ 261: ["Aragonese", "an"],
+ 262: ["Akkadian", "akk"],
+ 263: ["Ancient Egyptian", "egy"],
+ 264: ["Ancient Greek", "grc"],
+ 265: ["Aramaic", "arc"],
+ 266: ["Balinese", "ban"],
+ 267: ["Bamun", "bax"],
+ 268: ["Batak Toba", "bbc"],
+ 269: ["Buginese", "bug"],
+ 270: ["Buhid", "bku"],
+ 271: ["Carian", "xcr"],
+ 272: ["Chakma", "ccp"],
+ 273: ["Classical Mandaic", "myz"],
+ 274: ["Coptic", "cop"],
+ 275: ["Dogri", "doi"], # macrolanguage
+ 276: ["Eastern Cham", "cjm"],
+ 277: ["Eastern Kayah", "eky"],
+ 278: ["Etruscan", "ett"],
+ 279: ["Gothic", "got"],
+ 280: ["Hanunoo", "hnn"],
+ 281: ["Ingush", "inh"],
+ 282: ["Large Flowery Miao", "hmd"],
+ 283: ["Lepcha", "lep"],
+ 284: ["Limbu", "lif"],
+ 285: ["Lisu", "lis"],
+ 286: ["Lu", "khb"],
+ 287: ["Lycian", "xlc"],
+ 288: ["Lydian", "xld"],
+ 289: ["Mandingo", "man"], # macrolanguage
+ 290: ["Manipuri", "mni"],
+ 291: ["Meroitic", "xmr"],
+ 292: ["Northern Thai", "nod"],
+ 293: ["Old Irish", "sga"],
+ 294: ["Old Norse", "non"],
+ 295: ["Old Persian", "peo"],
+ 296: ["Old Turkish", "otk"],
+ 297: ["Pahlavi", "pal"],
+ 298: ["Parthian", "xpr"],
+ 299: ["Phoenician", "phn"],
+ 300: ["Prakrit Language", "pra"],
+ 301: ["Rejang", "rej"],
+ 302: ["Sabaean", "xsa"],
+ 303: ["Samaritan", "smp"],
+ 304: ["Santali", "sat"],
+ 305: ["Saurashtra", "saz"],
+ 306: ["Sora", "srb"],
+ 307: ["Sylheti", "syl"],
+ 308: ["Tagbanwa", "tbw"],
+ 309: ["Tai Dam", "blt"],
+ 310: ["Tai Nua", "tdd"],
+ 311: ["Ugaritic", "uga"],
+ 312: ["Akoose", "bss"],
+ 313: ["Lakota", "lkt"],
+ 314: ["Standard Moroccan Tamazight", "zgh"],
+ 315: ["Mapuche", "arn"],
+ 316: ["Central Kurdish", "ckb"],
+ 317: ["Lower Sorbian", "dsb"],
+ 318: ["Upper Sorbian", "hsb"],
+ 319: ["Kenyang", "ken"],
+ 320: ["Mohawk", "moh"],
+ 321: ["Nko", "nqo"],
+ 322: ["Prussian", "prg"],
+ 323: ["Kiche", "quc"],
+ 324: ["Southern Sami", "sma"],
+ 325: ["Lule Sami", "smj"],
+ 326: ["Inari Sami", "smn"],
+ 327: ["Skolt Sami", "sms"],
+ 328: ["Warlpiri", "wbp"],
+ 329: ["Manichaean Middle Persian", "xmn"],
+ 330: ["Mende", "men"],
+ 331: ["Ancient North Arabian", "xna"],
+ 332: ["Linear A", "lab"],
+ 333: ["Hmong Njua", "hnj"],
+ 334: ["Ho", "hoc"],
+ 335: ["Lezghian", "lez"],
+ 336: ["Bassa", "bsq"],
+ 337: ["Mono", "mru"],
+ 338: ["Tedim Chin", "ctd"],
+ 339: ["Maithili", "mai"],
+ 340: ["Ahom", "aho"],
+ 341: ["American Sign Language", "ase"],
+ 342: ["Ardhamagadhi Prakrit", "pka"],
+ 343: ["Bhojpuri", "bho"],
+ 344: ["Hieroglyphic Luwian", "hlu"],
+ 345: ["Literary Chinese", "lzh"],
+ 346: ["Mazanderani", "mzn"],
+ 347: ["Mru", "mro"],
+ 348: ["Newari", "new"],
+ 349: ["Northern Luri", "lrc"],
+ 350: ["Palauan", "pau"],
+ 351: ["Papiamento", "pap"],
+ 352: ["Saraiki", "skr"],
+ 353: ["Tokelau", "tkl"],
+ 354: ["Tok Pisin", "tpi"],
+ 355: ["Tuvalu", "tvl"],
+ 356: ["Uncoded Languages", "mis"],
+ 357: ["Cantonese", "yue"],
+ 358: ["Osage", "osa"],
+ 359: ["Tangut", "txg"],
+ 360: ["Ido", "io"],
+ 361: ["Lojban", "jbo"],
+ 362: ["Sicilian", "scn"],
+ 363: ["Southern Kurdish", "sdh"],
+ 364: ["Western Balochi", "bgn"],
}
language_aliases = {
@@ -419,268 +424,268 @@ language_aliases = {
}
country_list = {
- 0 : ["AnyCountry", "ZZ"],
- 1 : ["Afghanistan", "AF"],
- 2 : ["Albania", "AL"],
- 3 : ["Algeria", "DZ"],
- 4 : ["American Samoa", "AS"],
- 5 : ["Andorra", "AD"],
- 6 : ["Angola", "AO"],
- 7 : ["Anguilla", "AI"],
- 8 : ["Antarctica", "AQ"],
- 9 : ["Antigua And Barbuda", "AG"],
- 10 : ["Argentina", "AR"],
- 11 : ["Armenia", "AM"],
- 12 : ["Aruba", "AW"],
- 13 : ["Australia", "AU"],
- 14 : ["Austria", "AT"],
- 15 : ["Azerbaijan", "AZ"],
- 16 : ["Bahamas", "BS"],
- 17 : ["Bahrain", "BH"],
- 18 : ["Bangladesh", "BD"],
- 19 : ["Barbados", "BB"],
- 20 : ["Belarus", "BY"],
- 21 : ["Belgium", "BE"],
- 22 : ["Belize", "BZ"],
- 23 : ["Benin", "BJ"],
- 24 : ["Bermuda", "BM"],
- 25 : ["Bhutan", "BT"],
- 26 : ["Bolivia", "BO"],
- 27 : ["Bosnia And Herzegowina", "BA"],
- 28 : ["Botswana", "BW"],
- 29 : ["Bouvet Island", "BV"],
- 30 : ["Brazil", "BR"],
- 31 : ["British Indian Ocean Territory", "IO"],
- 32 : ["Brunei", "BN"],
- 33 : ["Bulgaria", "BG"],
- 34 : ["Burkina Faso", "BF"],
- 35 : ["Burundi", "BI"],
- 36 : ["Cambodia", "KH"],
- 37 : ["Cameroon", "CM"],
- 38 : ["Canada", "CA"],
- 39 : ["Cape Verde", "CV"],
- 40 : ["Cayman Islands", "KY"],
- 41 : ["Central African Republic", "CF"],
- 42 : ["Chad", "TD"],
- 43 : ["Chile", "CL"],
- 44 : ["China", "CN"],
- 45 : ["Christmas Island", "CX"],
- 46 : ["Cocos Islands", "CC"],
- 47 : ["Colombia", "CO"],
- 48 : ["Comoros", "KM"],
- 49 : ["Congo Kinshasa", "CD"],
- 50 : ["Congo Brazzaville", "CG"],
- 51 : ["Cook Islands", "CK"],
- 52 : ["Costa Rica", "CR"],
- 53 : ["Ivory Coast", "CI"],
- 54 : ["Croatia", "HR"],
- 55 : ["Cuba", "CU"],
- 56 : ["Cyprus", "CY"],
- 57 : ["Czech Republic", "CZ"],
- 58 : ["Denmark", "DK"],
- 59 : ["Djibouti", "DJ"],
- 60 : ["Dominica", "DM"],
- 61 : ["Dominican Republic", "DO"],
- 62 : ["East Timor", "TL"],
- 63 : ["Ecuador", "EC"],
- 64 : ["Egypt", "EG"],
- 65 : ["El Salvador", "SV"],
- 66 : ["Equatorial Guinea", "GQ"],
- 67 : ["Eritrea", "ER"],
- 68 : ["Estonia", "EE"],
- 69 : ["Ethiopia", "ET"],
- 70 : ["Falkland Islands", "FK"],
- 71 : ["Faroe Islands", "FO"],
- 72 : ["Fiji", "FJ"],
- 73 : ["Finland", "FI"],
- 74 : ["France", "FR"],
- 75 : ["Guernsey", "GG"],
- 76 : ["French Guiana", "GF"],
- 77 : ["French Polynesia", "PF"],
- 78 : ["French Southern Territories", "TF"],
- 79 : ["Gabon", "GA"],
- 80 : ["Gambia", "GM"],
- 81 : ["Georgia", "GE"],
- 82 : ["Germany", "DE"],
- 83 : ["Ghana", "GH"],
- 84 : ["Gibraltar", "GI"],
- 85 : ["Greece", "GR"],
- 86 : ["Greenland", "GL"],
- 87 : ["Grenada", "GD"],
- 88 : ["Guadeloupe", "GP"],
- 89 : ["Guam", "GU"],
- 90 : ["Guatemala", "GT"],
- 91 : ["Guinea", "GN"],
- 92 : ["Guinea Bissau", "GW"],
- 93 : ["Guyana", "GY"],
- 94 : ["Haiti", "HT"],
- 95 : ["Heard And McDonald Islands", "HM"],
- 96 : ["Honduras", "HN"],
- 97 : ["Hong Kong", "HK"],
- 98 : ["Hungary", "HU"],
- 99 : ["Iceland", "IS"],
- 100 : ["India", "IN"],
- 101 : ["Indonesia", "ID"],
- 102 : ["Iran", "IR"],
- 103 : ["Iraq", "IQ"],
- 104 : ["Ireland", "IE"],
- 105 : ["Israel", "IL"],
- 106 : ["Italy", "IT"],
- 107 : ["Jamaica", "JM"],
- 108 : ["Japan", "JP"],
- 109 : ["Jordan", "JO"],
- 110 : ["Kazakhstan", "KZ"],
- 111 : ["Kenya", "KE"],
- 112 : ["Kiribati", "KI"],
- 113 : ["North Korea", "KP"],
- 114 : ["South Korea", "KR"],
- 115 : ["Kuwait", "KW"],
- 116 : ["Kyrgyzstan", "KG"],
- 117 : ["Laos", "LA"],
- 118 : ["Latvia", "LV"],
- 119 : ["Lebanon", "LB"],
- 120 : ["Lesotho", "LS"],
- 121 : ["Liberia", "LR"],
- 122 : ["Libya", "LY"],
- 123 : ["Liechtenstein", "LI"],
- 124 : ["Lithuania", "LT"],
- 125 : ["Luxembourg", "LU"],
- 126 : ["Macau", "MO"],
- 127 : ["Macedonia", "MK"],
- 128 : ["Madagascar", "MG"],
- 129 : ["Malawi", "MW"],
- 130 : ["Malaysia", "MY"],
- 131 : ["Maldives", "MV"],
- 132 : ["Mali", "ML"],
- 133 : ["Malta", "MT"],
- 134 : ["Marshall Islands", "MH"],
- 135 : ["Martinique", "MQ"],
- 136 : ["Mauritania", "MR"],
- 137 : ["Mauritius", "MU"],
- 138 : ["Mayotte", "YT"],
- 139 : ["Mexico", "MX"],
- 140 : ["Micronesia", "FM"],
- 141 : ["Moldova", "MD"],
- 142 : ["Monaco", "MC"],
- 143 : ["Mongolia", "MN"],
- 144 : ["Montserrat", "MS"],
- 145 : ["Morocco", "MA"],
- 146 : ["Mozambique", "MZ"],
- 147 : ["Myanmar", "MM"],
- 148 : ["Namibia", "NA"],
- 149 : ["Nauru", "NR"],
- 150 : ["Nepal", "NP"],
- 151 : ["Netherlands", "NL"],
- 152 : ["Cura Sao", "CW"],
- 153 : ["New Caledonia", "NC"],
- 154 : ["New Zealand", "NZ"],
- 155 : ["Nicaragua", "NI"],
- 156 : ["Niger", "NE"],
- 157 : ["Nigeria", "NG"],
- 158 : ["Niue", "NU"],
- 159 : ["Norfolk Island", "NF"],
- 160 : ["Northern Mariana Islands", "MP"],
- 161 : ["Norway", "NO"],
- 162 : ["Oman", "OM"],
- 163 : ["Pakistan", "PK"],
- 164 : ["Palau", "PW"],
- 165 : ["Palestinian Territories", "PS"],
- 166 : ["Panama", "PA"],
- 167 : ["Papua New Guinea", "PG"],
- 168 : ["Paraguay", "PY"],
- 169 : ["Peru", "PE"],
- 170 : ["Philippines", "PH"],
- 171 : ["Pitcairn", "PN"],
- 172 : ["Poland", "PL"],
- 173 : ["Portugal", "PT"],
- 174 : ["Puerto Rico", "PR"],
- 175 : ["Qatar", "QA"],
- 176 : ["Reunion", "RE"],
- 177 : ["Romania", "RO"],
- 178 : ["Russia", "RU"],
- 179 : ["Rwanda", "RW"],
- 180 : ["Saint Kitts And Nevis", "KN"],
- 181 : ["Saint Lucia", "LC"],
- 182 : ["Saint Vincent And The Grenadines", "VC"],
- 183 : ["Samoa", "WS"],
- 184 : ["San Marino", "SM"],
- 185 : ["Sao Tome And Principe", "ST"],
- 186 : ["Saudi Arabia", "SA"],
- 187 : ["Senegal", "SN"],
- 188 : ["Seychelles", "SC"],
- 189 : ["Sierra Leone", "SL"],
- 190 : ["Singapore", "SG"],
- 191 : ["Slovakia", "SK"],
- 192 : ["Slovenia", "SI"],
- 193 : ["Solomon Islands", "SB"],
- 194 : ["Somalia", "SO"],
- 195 : ["South Africa", "ZA"],
- 196 : ["South Georgia And The South Sandwich Islands", "GS"],
- 197 : ["Spain", "ES"],
- 198 : ["Sri Lanka", "LK"],
- 199 : ["Saint Helena", "SH"],
- 200 : ["Saint Pierre And Miquelon", "PM"],
- 201 : ["Sudan", "SD"],
- 202 : ["Suriname", "SR"],
- 203 : ["Svalbard And Jan Mayen Islands", "SJ"],
- 204 : ["Swaziland", "SZ"],
- 205 : ["Sweden", "SE"],
- 206 : ["Switzerland", "CH"],
- 207 : ["Syria", "SY"],
- 208 : ["Taiwan", "TW"],
- 209 : ["Tajikistan", "TJ"],
- 210 : ["Tanzania", "TZ"],
- 211 : ["Thailand", "TH"],
- 212 : ["Togo", "TG"],
- 213 : ["Tokelau", "TK"],
- 214 : ["Tonga", "TO"],
- 215 : ["Trinidad And Tobago", "TT"],
- 216 : ["Tunisia", "TN"],
- 217 : ["Turkey", "TR"],
- 218 : ["Turkmenistan", "TM"],
- 219 : ["Turks And Caicos Islands", "TC"],
- 220 : ["Tuvalu", "TV"],
- 221 : ["Uganda", "UG"],
- 222 : ["Ukraine", "UA"],
- 223 : ["United Arab Emirates", "AE"],
- 224 : ["United Kingdom", "GB"],
- 225 : ["United States", "US"],
- 226 : ["United States Minor Outlying Islands", "UM"],
- 227 : ["Uruguay", "UY"],
- 228 : ["Uzbekistan", "UZ"],
- 229 : ["Vanuatu", "VU"],
- 230 : ["Vatican City State", "VA"],
- 231 : ["Venezuela", "VE"],
- 232 : ["Vietnam", "VN"],
- 233 : ["British Virgin Islands", "VG"],
- 234 : ["United States Virgin Islands", "VI"],
- 235 : ["Wallis And Futuna Islands", "WF"],
- 236 : ["Western Sahara", "EH"],
- 237 : ["Yemen", "YE"],
- 238 : ["Canary Islands", "IC"],
- 239 : ["Zambia", "ZM"],
- 240 : ["Zimbabwe", "ZW"],
- 241 : ["Clipperton Island", "CP"],
- 242 : ["Montenegro", "ME"],
- 243 : ["Serbia", "RS"],
- 244 : ["Saint Barthelemy", "BL"],
- 245 : ["Saint Martin", "MF"],
- 246 : ["Latin America", "419"],
- 247 : ["Ascension Island", "AC"],
- 248 : ["Aland Islands", "AX"],
- 249 : ["Diego Garcia", "DG"],
- 250 : ["Ceuta And Melilla", "EA"],
- 251 : ["Isle Of Man", "IM"],
- 252 : ["Jersey", "JE"],
- 253 : ["Tristan Da Cunha", "TA"],
- 254 : ["South Sudan", "SS"],
- 255 : ["Bonaire", "BQ"],
- 256 : ["Sint Maarten", "SX"],
- 257 : ["Kosovo", "XK"],
- 258 : ["European Union", "EU"],
- 259 : ["Outlying Oceania", "QO"],
- 260 : ["World", "001"],
- 261 : ["Europe", "150"]
+ 0: ["AnyCountry", "ZZ"],
+ 1: ["Afghanistan", "AF"],
+ 2: ["Albania", "AL"],
+ 3: ["Algeria", "DZ"],
+ 4: ["American Samoa", "AS"],
+ 5: ["Andorra", "AD"],
+ 6: ["Angola", "AO"],
+ 7: ["Anguilla", "AI"],
+ 8: ["Antarctica", "AQ"],
+ 9: ["Antigua And Barbuda", "AG"],
+ 10: ["Argentina", "AR"],
+ 11: ["Armenia", "AM"],
+ 12: ["Aruba", "AW"],
+ 13: ["Australia", "AU"],
+ 14: ["Austria", "AT"],
+ 15: ["Azerbaijan", "AZ"],
+ 16: ["Bahamas", "BS"],
+ 17: ["Bahrain", "BH"],
+ 18: ["Bangladesh", "BD"],
+ 19: ["Barbados", "BB"],
+ 20: ["Belarus", "BY"],
+ 21: ["Belgium", "BE"],
+ 22: ["Belize", "BZ"],
+ 23: ["Benin", "BJ"],
+ 24: ["Bermuda", "BM"],
+ 25: ["Bhutan", "BT"],
+ 26: ["Bolivia", "BO"],
+ 27: ["Bosnia And Herzegowina", "BA"],
+ 28: ["Botswana", "BW"],
+ 29: ["Bouvet Island", "BV"],
+ 30: ["Brazil", "BR"],
+ 31: ["British Indian Ocean Territory", "IO"],
+ 32: ["Brunei", "BN"],
+ 33: ["Bulgaria", "BG"],
+ 34: ["Burkina Faso", "BF"],
+ 35: ["Burundi", "BI"],
+ 36: ["Cambodia", "KH"],
+ 37: ["Cameroon", "CM"],
+ 38: ["Canada", "CA"],
+ 39: ["Cape Verde", "CV"],
+ 40: ["Cayman Islands", "KY"],
+ 41: ["Central African Republic", "CF"],
+ 42: ["Chad", "TD"],
+ 43: ["Chile", "CL"],
+ 44: ["China", "CN"],
+ 45: ["Christmas Island", "CX"],
+ 46: ["Cocos Islands", "CC"],
+ 47: ["Colombia", "CO"],
+ 48: ["Comoros", "KM"],
+ 49: ["Congo Kinshasa", "CD"],
+ 50: ["Congo Brazzaville", "CG"],
+ 51: ["Cook Islands", "CK"],
+ 52: ["Costa Rica", "CR"],
+ 53: ["Ivory Coast", "CI"],
+ 54: ["Croatia", "HR"],
+ 55: ["Cuba", "CU"],
+ 56: ["Cyprus", "CY"],
+ 57: ["Czech Republic", "CZ"],
+ 58: ["Denmark", "DK"],
+ 59: ["Djibouti", "DJ"],
+ 60: ["Dominica", "DM"],
+ 61: ["Dominican Republic", "DO"],
+ 62: ["East Timor", "TL"],
+ 63: ["Ecuador", "EC"],
+ 64: ["Egypt", "EG"],
+ 65: ["El Salvador", "SV"],
+ 66: ["Equatorial Guinea", "GQ"],
+ 67: ["Eritrea", "ER"],
+ 68: ["Estonia", "EE"],
+ 69: ["Ethiopia", "ET"],
+ 70: ["Falkland Islands", "FK"],
+ 71: ["Faroe Islands", "FO"],
+ 72: ["Fiji", "FJ"],
+ 73: ["Finland", "FI"],
+ 74: ["France", "FR"],
+ 75: ["Guernsey", "GG"],
+ 76: ["French Guiana", "GF"],
+ 77: ["French Polynesia", "PF"],
+ 78: ["French Southern Territories", "TF"],
+ 79: ["Gabon", "GA"],
+ 80: ["Gambia", "GM"],
+ 81: ["Georgia", "GE"],
+ 82: ["Germany", "DE"],
+ 83: ["Ghana", "GH"],
+ 84: ["Gibraltar", "GI"],
+ 85: ["Greece", "GR"],
+ 86: ["Greenland", "GL"],
+ 87: ["Grenada", "GD"],
+ 88: ["Guadeloupe", "GP"],
+ 89: ["Guam", "GU"],
+ 90: ["Guatemala", "GT"],
+ 91: ["Guinea", "GN"],
+ 92: ["Guinea Bissau", "GW"],
+ 93: ["Guyana", "GY"],
+ 94: ["Haiti", "HT"],
+ 95: ["Heard And McDonald Islands", "HM"],
+ 96: ["Honduras", "HN"],
+ 97: ["Hong Kong", "HK"],
+ 98: ["Hungary", "HU"],
+ 99: ["Iceland", "IS"],
+ 100: ["India", "IN"],
+ 101: ["Indonesia", "ID"],
+ 102: ["Iran", "IR"],
+ 103: ["Iraq", "IQ"],
+ 104: ["Ireland", "IE"],
+ 105: ["Israel", "IL"],
+ 106: ["Italy", "IT"],
+ 107: ["Jamaica", "JM"],
+ 108: ["Japan", "JP"],
+ 109: ["Jordan", "JO"],
+ 110: ["Kazakhstan", "KZ"],
+ 111: ["Kenya", "KE"],
+ 112: ["Kiribati", "KI"],
+ 113: ["North Korea", "KP"],
+ 114: ["South Korea", "KR"],
+ 115: ["Kuwait", "KW"],
+ 116: ["Kyrgyzstan", "KG"],
+ 117: ["Laos", "LA"],
+ 118: ["Latvia", "LV"],
+ 119: ["Lebanon", "LB"],
+ 120: ["Lesotho", "LS"],
+ 121: ["Liberia", "LR"],
+ 122: ["Libya", "LY"],
+ 123: ["Liechtenstein", "LI"],
+ 124: ["Lithuania", "LT"],
+ 125: ["Luxembourg", "LU"],
+ 126: ["Macau", "MO"],
+ 127: ["Macedonia", "MK"],
+ 128: ["Madagascar", "MG"],
+ 129: ["Malawi", "MW"],
+ 130: ["Malaysia", "MY"],
+ 131: ["Maldives", "MV"],
+ 132: ["Mali", "ML"],
+ 133: ["Malta", "MT"],
+ 134: ["Marshall Islands", "MH"],
+ 135: ["Martinique", "MQ"],
+ 136: ["Mauritania", "MR"],
+ 137: ["Mauritius", "MU"],
+ 138: ["Mayotte", "YT"],
+ 139: ["Mexico", "MX"],
+ 140: ["Micronesia", "FM"],
+ 141: ["Moldova", "MD"],
+ 142: ["Monaco", "MC"],
+ 143: ["Mongolia", "MN"],
+ 144: ["Montserrat", "MS"],
+ 145: ["Morocco", "MA"],
+ 146: ["Mozambique", "MZ"],
+ 147: ["Myanmar", "MM"],
+ 148: ["Namibia", "NA"],
+ 149: ["Nauru", "NR"],
+ 150: ["Nepal", "NP"],
+ 151: ["Netherlands", "NL"],
+ 152: ["Cura Sao", "CW"],
+ 153: ["New Caledonia", "NC"],
+ 154: ["New Zealand", "NZ"],
+ 155: ["Nicaragua", "NI"],
+ 156: ["Niger", "NE"],
+ 157: ["Nigeria", "NG"],
+ 158: ["Niue", "NU"],
+ 159: ["Norfolk Island", "NF"],
+ 160: ["Northern Mariana Islands", "MP"],
+ 161: ["Norway", "NO"],
+ 162: ["Oman", "OM"],
+ 163: ["Pakistan", "PK"],
+ 164: ["Palau", "PW"],
+ 165: ["Palestinian Territories", "PS"],
+ 166: ["Panama", "PA"],
+ 167: ["Papua New Guinea", "PG"],
+ 168: ["Paraguay", "PY"],
+ 169: ["Peru", "PE"],
+ 170: ["Philippines", "PH"],
+ 171: ["Pitcairn", "PN"],
+ 172: ["Poland", "PL"],
+ 173: ["Portugal", "PT"],
+ 174: ["Puerto Rico", "PR"],
+ 175: ["Qatar", "QA"],
+ 176: ["Reunion", "RE"],
+ 177: ["Romania", "RO"],
+ 178: ["Russia", "RU"],
+ 179: ["Rwanda", "RW"],
+ 180: ["Saint Kitts And Nevis", "KN"],
+ 181: ["Saint Lucia", "LC"],
+ 182: ["Saint Vincent And The Grenadines", "VC"],
+ 183: ["Samoa", "WS"],
+ 184: ["San Marino", "SM"],
+ 185: ["Sao Tome And Principe", "ST"],
+ 186: ["Saudi Arabia", "SA"],
+ 187: ["Senegal", "SN"],
+ 188: ["Seychelles", "SC"],
+ 189: ["Sierra Leone", "SL"],
+ 190: ["Singapore", "SG"],
+ 191: ["Slovakia", "SK"],
+ 192: ["Slovenia", "SI"],
+ 193: ["Solomon Islands", "SB"],
+ 194: ["Somalia", "SO"],
+ 195: ["South Africa", "ZA"],
+ 196: ["South Georgia And The South Sandwich Islands", "GS"],
+ 197: ["Spain", "ES"],
+ 198: ["Sri Lanka", "LK"],
+ 199: ["Saint Helena", "SH"],
+ 200: ["Saint Pierre And Miquelon", "PM"],
+ 201: ["Sudan", "SD"],
+ 202: ["Suriname", "SR"],
+ 203: ["Svalbard And Jan Mayen Islands", "SJ"],
+ 204: ["Swaziland", "SZ"],
+ 205: ["Sweden", "SE"],
+ 206: ["Switzerland", "CH"],
+ 207: ["Syria", "SY"],
+ 208: ["Taiwan", "TW"],
+ 209: ["Tajikistan", "TJ"],
+ 210: ["Tanzania", "TZ"],
+ 211: ["Thailand", "TH"],
+ 212: ["Togo", "TG"],
+ 213: ["Tokelau", "TK"],
+ 214: ["Tonga", "TO"],
+ 215: ["Trinidad And Tobago", "TT"],
+ 216: ["Tunisia", "TN"],
+ 217: ["Turkey", "TR"],
+ 218: ["Turkmenistan", "TM"],
+ 219: ["Turks And Caicos Islands", "TC"],
+ 220: ["Tuvalu", "TV"],
+ 221: ["Uganda", "UG"],
+ 222: ["Ukraine", "UA"],
+ 223: ["United Arab Emirates", "AE"],
+ 224: ["United Kingdom", "GB"],
+ 225: ["United States", "US"],
+ 226: ["United States Minor Outlying Islands", "UM"],
+ 227: ["Uruguay", "UY"],
+ 228: ["Uzbekistan", "UZ"],
+ 229: ["Vanuatu", "VU"],
+ 230: ["Vatican City State", "VA"],
+ 231: ["Venezuela", "VE"],
+ 232: ["Vietnam", "VN"],
+ 233: ["British Virgin Islands", "VG"],
+ 234: ["United States Virgin Islands", "VI"],
+ 235: ["Wallis And Futuna Islands", "WF"],
+ 236: ["Western Sahara", "EH"],
+ 237: ["Yemen", "YE"],
+ 238: ["Canary Islands", "IC"],
+ 239: ["Zambia", "ZM"],
+ 240: ["Zimbabwe", "ZW"],
+ 241: ["Clipperton Island", "CP"],
+ 242: ["Montenegro", "ME"],
+ 243: ["Serbia", "RS"],
+ 244: ["Saint Barthelemy", "BL"],
+ 245: ["Saint Martin", "MF"],
+ 246: ["Latin America", "419"],
+ 247: ["Ascension Island", "AC"],
+ 248: ["Aland Islands", "AX"],
+ 249: ["Diego Garcia", "DG"],
+ 250: ["Ceuta And Melilla", "EA"],
+ 251: ["Isle Of Man", "IM"],
+ 252: ["Jersey", "JE"],
+ 253: ["Tristan Da Cunha", "TA"],
+ 254: ["South Sudan", "SS"],
+ 255: ["Bonaire", "BQ"],
+ 256: ["Sint Maarten", "SX"],
+ 257: ["Kosovo", "XK"],
+ 258: ["European Union", "EU"],
+ 259: ["Outlying Oceania", "QO"],
+ 260: ["World", "001"],
+ 261: ["Europe", "150"],
}
country_aliases = {
@@ -698,148 +703,148 @@ country_aliases = {
}
script_list = {
- 0 : ["AnyScript", "Zzzz"],
- 1 : ["Arabic", "Arab"],
- 2 : ["Cyrillic", "Cyrl"],
- 3 : ["Deseret", "Dsrt"],
- 4 : ["Gurmukhi", "Guru"],
- 5 : ["Simplified Han", "Hans"],
- 6 : ["Traditional Han", "Hant"],
- 7 : ["Latin", "Latn"],
- 8 : ["Mongolian", "Mong"],
- 9 : ["Tifinagh", "Tfng"],
- 10 : ["Armenian", "Armn"],
- 11 : ["Bengali", "Beng"],
- 12 : ["Cherokee", "Cher"],
- 13 : ["Devanagari", "Deva"],
- 14 : ["Ethiopic", "Ethi"],
- 15 : ["Georgian", "Geor"],
- 16 : ["Greek", "Grek"],
- 17 : ["Gujarati", "Gujr"],
- 18 : ["Hebrew", "Hebr"],
- 19 : ["Japanese", "Jpan"],
- 20 : ["Khmer", "Khmr"],
- 21 : ["Kannada", "Knda"],
- 22 : ["Korean", "Kore"],
- 23 : ["Lao", "Laoo"],
- 24 : ["Malayalam", "Mlym"],
- 25 : ["Myanmar", "Mymr"],
- 26 : ["Oriya", "Orya"],
- 27 : ["Tamil", "Taml"],
- 28 : ["Telugu", "Telu"],
- 29 : ["Thaana", "Thaa"],
- 30 : ["Thai", "Thai"],
- 31 : ["Tibetan", "Tibt"],
- 32 : ["Sinhala", "Sinh"],
- 33 : ["Syriac", "Syrc"],
- 34 : ["Yi", "Yiii"],
- 35 : ["Vai", "Vaii"],
- 36 : ["Avestan", "Avst"],
- 37 : ["Balinese", "Bali"],
- 38 : ["Bamum", "Bamu"],
- 39 : ["Batak", "Batk"],
- 40 : ["Bopomofo", "Bopo"],
- 41 : ["Brahmi", "Brah"],
- 42 : ["Buginese", "Bugi"],
- 43 : ["Buhid", "Buhd"],
- 44 : ["Canadian Aboriginal", "Cans"],
- 45 : ["Carian", "Cari"],
- 46 : ["Chakma", "Cakm"],
- 47 : ["Cham", "Cham"],
- 48 : ["Coptic", "Copt"],
- 49 : ["Cypriot", "Cprt"],
- 50 : ["Egyptian Hieroglyphs", "Egyp"],
- 51 : ["Fraser", "Lisu"],
- 52 : ["Glagolitic", "Glag"],
- 53 : ["Gothic", "Goth"],
- 54 : ["Han", "Hani"],
- 55 : ["Hangul", "Hang"],
- 56 : ["Hanunoo", "Hano"],
- 57 : ["Imperial Aramaic", "Armi"],
- 58 : ["Inscriptional Pahlavi", "Phli"],
- 59 : ["Inscriptional Parthian", "Prti"],
- 60 : ["Javanese", "Java"],
- 61 : ["Kaithi", "Kthi"],
- 62 : ["Katakana", "Kana"],
- 63 : ["Kayah Li", "Kali"],
- 64 : ["Kharoshthi", "Khar"],
- 65 : ["Lanna", "Lana"],
- 66 : ["Lepcha", "Lepc"],
- 67 : ["Limbu", "Limb"],
- 68 : ["Linear B", "Linb"],
- 69 : ["Lycian", "Lyci"],
- 70 : ["Lydian", "Lydi"],
- 71 : ["Mandaean", "Mand"],
- 72 : ["Meitei Mayek", "Mtei"],
- 73 : ["Meroitic", "Mero"],
- 74 : ["Meroitic Cursive", "Merc"],
- 75 : ["Nko", "Nkoo"],
- 76 : ["New Tai Lue", "Talu"],
- 77 : ["Ogham", "Ogam"],
- 78 : ["Ol Chiki", "Olck"],
- 79 : ["Old Italic", "Ital"],
- 80 : ["Old Persian", "Xpeo"],
- 81 : ["Old South Arabian", "Sarb"],
- 82 : ["Orkhon", "Orkh"],
- 83 : ["Osmanya", "Osma"],
- 84 : ["Phags Pa", "Phag"],
- 85 : ["Phoenician", "Phnx"],
- 86 : ["Pollard Phonetic", "Plrd"],
- 87 : ["Rejang", "Rjng"],
- 88 : ["Runic", "Runr"],
- 89 : ["Samaritan", "Samr"],
- 90 : ["Saurashtra", "Saur"],
- 91 : ["Sharada", "Shrd"],
- 92 : ["Shavian", "Shaw"],
- 93 : ["Sora Sompeng", "Sora"],
- 94 : ["Cuneiform", "Xsux"],
- 95 : ["Sundanese", "Sund"],
- 96 : ["Syloti Nagri", "Sylo"],
- 97 : ["Tagalog", "Tglg"],
- 98 : ["Tagbanwa", "Tagb"],
- 99 : ["Tai Le", "Tale"],
- 100 : ["Tai Viet", "Tavt"],
- 101 : ["Takri", "Takr"],
- 102 : ["Ugaritic", "Ugar"],
- 103 : ["Braille", "Brai"],
- 104 : ["Hiragana", "Hira"],
- 105 : ["Caucasian Albanian", "Aghb"],
- 106 : ["Bassa Vah", "Bass"],
- 107 : ["Duployan", "Dupl"],
- 108 : ["Elbasan", "Elba"],
- 109 : ["Grantha", "Gran"],
- 110 : ["Pahawh Hmong", "Hmng"],
- 111 : ["Khojki", "Khoj"],
- 112 : ["Linear A", "Lina"],
- 113 : ["Mahajani", "Mahj"],
- 114 : ["Manichaean", "Mani"],
- 115 : ["Mende Kikakui", "Mend"],
- 116 : ["Modi", "Modi"],
- 117 : ["Mro", "Mroo"],
- 118 : ["Old North Arabian", "Narb"],
- 119 : ["Nabataean", "Nbat"],
- 120 : ["Palmyrene", "Palm"],
- 121 : ["Pau Cin Hau", "Pauc"],
- 122 : ["Old Permic", "Perm"],
- 123 : ["Psalter Pahlavi", "Phlp"],
- 124 : ["Siddham", "Sidd"],
- 125 : ["Khudawadi", "Sind"],
- 126 : ["Tirhuta", "Tirh"],
- 127 : ["Varang Kshiti", "Wara"],
- 128 : ["Ahom", "Ahom"],
- 129 : ["Anatolian Hieroglyphs", "Hluw"],
- 130 : ["Hatran", "Hatr"],
- 131 : ["Multani", "Mult"],
- 132 : ["Old Hungarian", "Hung"],
- 133 : ["Sign Writing", "Sgnw"],
- 134 : ["Adlam", "Adlm"],
- 135 : ["Bhaiksuki", "Bhks"],
- 136 : ["Marchen", "Marc"],
- 137 : ["Newa", "Newa"],
- 138 : ["Osage", "Osge"],
- 139 : ["Tangut", "Tang"],
- 140 : ["Han with Bopomofo", "Hanb"],
- 141 : ["Jamo", "Jamo"]
+ 0: ["AnyScript", "Zzzz"],
+ 1: ["Arabic", "Arab"],
+ 2: ["Cyrillic", "Cyrl"],
+ 3: ["Deseret", "Dsrt"],
+ 4: ["Gurmukhi", "Guru"],
+ 5: ["Simplified Han", "Hans"],
+ 6: ["Traditional Han", "Hant"],
+ 7: ["Latin", "Latn"],
+ 8: ["Mongolian", "Mong"],
+ 9: ["Tifinagh", "Tfng"],
+ 10: ["Armenian", "Armn"],
+ 11: ["Bengali", "Beng"],
+ 12: ["Cherokee", "Cher"],
+ 13: ["Devanagari", "Deva"],
+ 14: ["Ethiopic", "Ethi"],
+ 15: ["Georgian", "Geor"],
+ 16: ["Greek", "Grek"],
+ 17: ["Gujarati", "Gujr"],
+ 18: ["Hebrew", "Hebr"],
+ 19: ["Japanese", "Jpan"],
+ 20: ["Khmer", "Khmr"],
+ 21: ["Kannada", "Knda"],
+ 22: ["Korean", "Kore"],
+ 23: ["Lao", "Laoo"],
+ 24: ["Malayalam", "Mlym"],
+ 25: ["Myanmar", "Mymr"],
+ 26: ["Oriya", "Orya"],
+ 27: ["Tamil", "Taml"],
+ 28: ["Telugu", "Telu"],
+ 29: ["Thaana", "Thaa"],
+ 30: ["Thai", "Thai"],
+ 31: ["Tibetan", "Tibt"],
+ 32: ["Sinhala", "Sinh"],
+ 33: ["Syriac", "Syrc"],
+ 34: ["Yi", "Yiii"],
+ 35: ["Vai", "Vaii"],
+ 36: ["Avestan", "Avst"],
+ 37: ["Balinese", "Bali"],
+ 38: ["Bamum", "Bamu"],
+ 39: ["Batak", "Batk"],
+ 40: ["Bopomofo", "Bopo"],
+ 41: ["Brahmi", "Brah"],
+ 42: ["Buginese", "Bugi"],
+ 43: ["Buhid", "Buhd"],
+ 44: ["Canadian Aboriginal", "Cans"],
+ 45: ["Carian", "Cari"],
+ 46: ["Chakma", "Cakm"],
+ 47: ["Cham", "Cham"],
+ 48: ["Coptic", "Copt"],
+ 49: ["Cypriot", "Cprt"],
+ 50: ["Egyptian Hieroglyphs", "Egyp"],
+ 51: ["Fraser", "Lisu"],
+ 52: ["Glagolitic", "Glag"],
+ 53: ["Gothic", "Goth"],
+ 54: ["Han", "Hani"],
+ 55: ["Hangul", "Hang"],
+ 56: ["Hanunoo", "Hano"],
+ 57: ["Imperial Aramaic", "Armi"],
+ 58: ["Inscriptional Pahlavi", "Phli"],
+ 59: ["Inscriptional Parthian", "Prti"],
+ 60: ["Javanese", "Java"],
+ 61: ["Kaithi", "Kthi"],
+ 62: ["Katakana", "Kana"],
+ 63: ["Kayah Li", "Kali"],
+ 64: ["Kharoshthi", "Khar"],
+ 65: ["Lanna", "Lana"],
+ 66: ["Lepcha", "Lepc"],
+ 67: ["Limbu", "Limb"],
+ 68: ["Linear B", "Linb"],
+ 69: ["Lycian", "Lyci"],
+ 70: ["Lydian", "Lydi"],
+ 71: ["Mandaean", "Mand"],
+ 72: ["Meitei Mayek", "Mtei"],
+ 73: ["Meroitic", "Mero"],
+ 74: ["Meroitic Cursive", "Merc"],
+ 75: ["Nko", "Nkoo"],
+ 76: ["New Tai Lue", "Talu"],
+ 77: ["Ogham", "Ogam"],
+ 78: ["Ol Chiki", "Olck"],
+ 79: ["Old Italic", "Ital"],
+ 80: ["Old Persian", "Xpeo"],
+ 81: ["Old South Arabian", "Sarb"],
+ 82: ["Orkhon", "Orkh"],
+ 83: ["Osmanya", "Osma"],
+ 84: ["Phags Pa", "Phag"],
+ 85: ["Phoenician", "Phnx"],
+ 86: ["Pollard Phonetic", "Plrd"],
+ 87: ["Rejang", "Rjng"],
+ 88: ["Runic", "Runr"],
+ 89: ["Samaritan", "Samr"],
+ 90: ["Saurashtra", "Saur"],
+ 91: ["Sharada", "Shrd"],
+ 92: ["Shavian", "Shaw"],
+ 93: ["Sora Sompeng", "Sora"],
+ 94: ["Cuneiform", "Xsux"],
+ 95: ["Sundanese", "Sund"],
+ 96: ["Syloti Nagri", "Sylo"],
+ 97: ["Tagalog", "Tglg"],
+ 98: ["Tagbanwa", "Tagb"],
+ 99: ["Tai Le", "Tale"],
+ 100: ["Tai Viet", "Tavt"],
+ 101: ["Takri", "Takr"],
+ 102: ["Ugaritic", "Ugar"],
+ 103: ["Braille", "Brai"],
+ 104: ["Hiragana", "Hira"],
+ 105: ["Caucasian Albanian", "Aghb"],
+ 106: ["Bassa Vah", "Bass"],
+ 107: ["Duployan", "Dupl"],
+ 108: ["Elbasan", "Elba"],
+ 109: ["Grantha", "Gran"],
+ 110: ["Pahawh Hmong", "Hmng"],
+ 111: ["Khojki", "Khoj"],
+ 112: ["Linear A", "Lina"],
+ 113: ["Mahajani", "Mahj"],
+ 114: ["Manichaean", "Mani"],
+ 115: ["Mende Kikakui", "Mend"],
+ 116: ["Modi", "Modi"],
+ 117: ["Mro", "Mroo"],
+ 118: ["Old North Arabian", "Narb"],
+ 119: ["Nabataean", "Nbat"],
+ 120: ["Palmyrene", "Palm"],
+ 121: ["Pau Cin Hau", "Pauc"],
+ 122: ["Old Permic", "Perm"],
+ 123: ["Psalter Pahlavi", "Phlp"],
+ 124: ["Siddham", "Sidd"],
+ 125: ["Khudawadi", "Sind"],
+ 126: ["Tirhuta", "Tirh"],
+ 127: ["Varang Kshiti", "Wara"],
+ 128: ["Ahom", "Ahom"],
+ 129: ["Anatolian Hieroglyphs", "Hluw"],
+ 130: ["Hatran", "Hatr"],
+ 131: ["Multani", "Mult"],
+ 132: ["Old Hungarian", "Hung"],
+ 133: ["Sign Writing", "Sgnw"],
+ 134: ["Adlam", "Adlm"],
+ 135: ["Bhaiksuki", "Bhks"],
+ 136: ["Marchen", "Marc"],
+ 137: ["Newa", "Newa"],
+ 138: ["Osage", "Osge"],
+ 139: ["Tangut", "Tang"],
+ 140: ["Han with Bopomofo", "Hanb"],
+ 141: ["Jamo", "Jamo"],
}
script_aliases = {
diff --git a/util/local_database/xpathlite.py b/util/local_database/xpathlite.py
index a1ed42812d..b3f8325569 100644
--- a/util/local_database/xpathlite.py
+++ b/util/local_database/xpathlite.py
@@ -213,12 +213,8 @@ def _fixedLookupChain(dirname, name):
return items
def _findEntry(base, path, draft=None, attribute=None):
- file = base
if base.endswith(".xml"):
- filename = base
base = base[:-4]
- else:
- file = base + ".xml"
(dirname, filename) = os.path.split(base)
items = _fixedLookupChain(dirname, filename)