diff options
18 files changed, 1094 insertions, 22 deletions
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake index 7274b51cc0a..0f717ff2ae0 100644 --- a/src/corelib/configure.cmake +++ b/src/corelib/configure.cmake @@ -812,7 +812,7 @@ qt_feature("winsdkicu" PRIVATE ) qt_feature("windows-ioring" PRIVATE LABEL "Windows I/O Ring" - AUTODETECT WIN32 AND CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 10.0.22000 + AUTODETECT WIN32 CONDITION TEST_windows_ioring ) qt_feature("inotify" PUBLIC PRIVATE diff --git a/src/corelib/doc/images/modelview-begin-append-columns.svg b/src/corelib/doc/images/modelview-begin-append-columns.svg new file mode 100644 index 00000000000..937a2c03206 --- /dev/null +++ b/src/corelib/doc/images/modelview-begin-append-columns.svg @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="291" + height="166" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .high-text-style { font: 20px arial; fill: black } +</style> + +<path d="m 10.5,10.5 h 30 v 30 h -30 v -30" class="box-style" /> +<text x="20" y="32" font-family="arial" font-size="20px" class="text-style">0</text> +<path d="m 40.5,10.5 h 30 v 30 h -30 v -30" class="box-style" /> +<text x="50" y="32" font-family="arial" font-size="20px" class="text-style">1</text> +<path d="m 70.5,10.5 h 30 v 30 h -30 v -30" class="box-style" /> +<text x="80" y="32" font-family="arial" font-size="20px" class="text-style">2</text> +<path d="m 100.5,10.5 h 30 v 30 h -30 v -30" class="box-style" /> +<text x="110" y="32" font-family="arial" font-size="20px" class="text-style">3</text> +<path d="m 130.5,10.5 h 30 v 30 h -30 v -30" class="box-style" /> +<text x="140" y="32" font-family="arial" font-size="20px" class="text-style">4</text> +<path d="m 160.5,10.5 h 30 v 30 h -30 v -30" class="box-style" /> +<text x="170" y="32" font-family="arial" font-size="20px" class="text-style">5</text> + +<path d="m 190.5,68.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="200" y="90" font-family="arial" font-size="20px" class="high-text-style">6</text> +<path d="m 220.5,68.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="230" y="90" font-family="arial" font-size="20px" class="high-text-style">7</text> +<path d="m 250.5,68.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="260" y="90" font-family="arial" font-size="20px" class="high-text-style">8</text> + +<path d="m 10.5,125.5 h 30 v 30 h -30 v -30" class="box-style" /> +<text x="20" y="147" font-family="arial" font-size="20px" class="text-style">0</text> +<path d="m 40.5,125.5 h 30 v 30 h -30 v -30" class="box-style" /> +<text x="50" y="147" font-family="arial" font-size="20px" class="text-style">1</text> +<path d="m 70.5,125.5 h 30 v 30 h -30 v -30" class="box-style" /> +<text x="80" y="147" font-family="arial" font-size="20px" class="text-style">2</text> +<path d="m 100.5,125.5 h 30 v 30 h -30 v -30" class="box-style" /> +<text x="110" y="147" font-family="arial" font-size="20px" class="text-style">3</text> +<path d="m 130.5,125.5 h 30 v 30 h -30 v -30" class="box-style" /> +<text x="140" y="147" font-family="arial" font-size="20px" class="text-style">4</text> +<path d="m 160.5,125.5 h 30 v 30 h -30 v -30" class="box-style" /> +<text x="170" y="147" font-family="arial" font-size="20px" class="text-style">5</text> +<path d="m 190.5,125.5 h 30 v 30 h -30 v -30" class="highlighted-style" /> +<text x="200" y="147" font-family="arial" font-size="20px" class="high-text-style">6</text> +<path d="m 220.5,125.5 h 30 v 30 h -30 v -30" class="highlighted-style" /> +<text x="230" y="147" font-family="arial" font-size="20px" class="high-text-style">7</text> +<path d="m 250.5,125.5 h 30 v 30 h -30 v -30" class="highlighted-style" /> +<text x="260" y="147" font-family="arial" font-size="20px" class="high-text-style">8</text> + +<path d="m 190.5,65.5 v -20" class="line-style" /> +<path d="M 190.5 42.5 l 5,10 l -10,0 z" class="fill-style" /> +</svg> diff --git a/src/corelib/doc/images/modelview-begin-append-rows.svg b/src/corelib/doc/images/modelview-begin-append-rows.svg new file mode 100644 index 00000000000..7e66d0d8756 --- /dev/null +++ b/src/corelib/doc/images/modelview-begin-append-rows.svg @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="165" + height="200" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } +</style> + +<path d="m 10.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="32" font-family="arial" font-size="20px" class="text-style">0</text> +<path d="m 10.5,40.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="62" font-family="arial" font-size="20px" class="text-style">1</text> +<path d="m 10.5,70.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="92" font-family="arial" font-size="20px" class="text-style">2</text> +<path d="m 10.5,100.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="122" font-family="arial" font-size="20px" class="text-style">3</text> +<path d="m 68.5,130.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="77" y="152" font-family="arial" font-size="20px" class="high-text-style">4</text> +<path d="m 68.5,160.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="77" y="182" font-family="arial" font-size="20px" class="high-text-style">5</text> + +<path d="m 125.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="135" y="32" font-family="arial" font-size="20px" class="text-style">0</text> +<path d="m 125.5,40.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="135" y="62" font-family="arial" font-size="20px" class="text-style">1</text> +<path d="m 125.5,70.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="135" y="92" font-family="arial" font-size="20px" class="text-style">2</text> +<path d="m 125.5,100.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="135" y="122" font-family="arial" font-size="20px" class="text-style">3</text> +<path d="m 125.5,130.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="135" y="152" font-family="arial" font-size="20px" class="high-text-style">4</text> +<path d="m 125.5,160.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="135" y="182" font-family="arial" font-size="20px" class="high-text-style">5</text> + +<path d="m 65.5,130.5 h -20" class="line-style" /> +<path d="M 42.5,130.5 l 10,-5 l 0,10 z" class="fill-style" /> +</svg> diff --git a/src/corelib/doc/images/modelview-begin-insert-columns.svg b/src/corelib/doc/images/modelview-begin-insert-columns.svg new file mode 100644 index 00000000000..51664b80568 --- /dev/null +++ b/src/corelib/doc/images/modelview-begin-insert-columns.svg @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="290" + height="165" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + svg .faded-text-style { font: 20px arial; fill: #808080 } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + svg.dark .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="dark"] svg .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .faded-text-style { font: 20px arial; fill: #808080 } +</style> + +<path d="m 10.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="32" font-family="arial" font-size="20px" class="text-style">0</text> +<path d="m 40.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="50" y="32" font-family="arial" font-size="20px" class="text-style">1</text> +<path d="m 70.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="80" y="32" font-family="arial" font-size="20px" class="text-style">2</text> +<path d="m 100.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="110" y="32" font-family="arial" font-size="20px" class="text-style">3</text> +<path d="m 130.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="140" y="32" font-family="arial" font-size="20px" class="text-style">4</text> +<path d="m 160.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="170" y="32" font-family="arial" font-size="20px" class="text-style">5</text> +<path d="m 190.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="200" y="32" font-family="arial" font-size="20px" class="text-style">6</text> +<path d="m 220.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="230" y="32" font-family="arial" font-size="20px" class="text-style">7</text> +<path d="m 250.5,10.5 h 30 v 30 h -30 z" class="line-style" + stroke-dasharray="5, 5" /> + +<path d="m 130.5,68.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="140" y="90" font-family="arial" font-size="20px" class="high-text-style">4</text> +<path d="m 160.5,68.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="170" y="90" font-family="arial" font-size="20px" class="high-text-style">5</text> +<path d="m 190.5,68.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="200" y="90" font-family="arial" font-size="20px" class="high-text-style">6</text> + +<path d="m 10.5,125.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="147" font-family="arial" font-size="20px" class="text-style">0</text> +<path d="m 40.5,125.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="50" y="147" font-family="arial" font-size="20px" class="text-style">1</text> +<path d="m 70.5,125.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="80" y="147" font-family="arial" font-size="20px" class="text-style">2</text> +<path d="m 100.5,125.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="110" y="147" font-family="arial" font-size="20px" class="text-style">3</text> +<path d="m 130.5,125.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="140" y="147" font-family="arial" font-size="20px" class="high-text-style">4</text> +<path d="m 160.5,125.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="170" y="147" font-family="arial" font-size="20px" class="high-text-style">5</text> +<path d="m 190.5,125.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="200" y="147" font-family="arial" font-size="20px" class="high-text-style">6</text> +<path d="m 220.5,125.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="230" y="147" font-family="arial" font-size="20px" fill="#808080" class="faded-text-style">4</text> +<path d="m 250.5,125.5 h 30 v 30 h -30 z" class="line-style" + stroke-dasharray="5, 5" /> + + +<path d="m 130.5,65.5 v -20" class="line-style" /> +<path d="M 130.5,42.5 l 5,10 l -10,0 z" class="fill-style" /> +</svg> diff --git a/src/corelib/doc/images/modelview-begin-insert-rows.svg b/src/corelib/doc/images/modelview-begin-insert-rows.svg new file mode 100644 index 00000000000..fd6641218ed --- /dev/null +++ b/src/corelib/doc/images/modelview-begin-insert-rows.svg @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="165" + height="230" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + svg .faded-text-style { font: 20px arial; fill: #808080 } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + svg.dark .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="dark"] svg .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .faded-text-style { font: 20px arial; fill: #808080 } +</style> + +<path d="m 10.5,190.5 h 30 v 30 h -30 z" class="box-style" + stroke-dasharray="5, 5" /> +<path d="m 125.5,190.5 h 30 v 30 h -30 z" class="box-style" + stroke-dasharray="5, 5" /> +<path d="m 10.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="32" font-family="arial" font-size="20px" class="text-style">0</text> +<path d="m 10.5,40.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="62" font-family="arial" font-size="20px" class="text-style">1</text> +<path d="m 10.5,70.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="92" font-family="arial" font-size="20px" class="text-style">2</text> +<path d="m 10.5,100.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="122" font-family="arial" font-size="20px" class="text-style">3</text> +<path d="m 10.5,130.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="152" font-family="arial" font-size="20px" class="text-style">4</text> +<path d="m 10.5,160.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="182" font-family="arial" font-size="20px" class="text-style">5</text> + +<path d="m 68.5,70.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="77" y="92" font-family="arial" font-size="20px" class="high-text-style">2</text> +<path d="m 68.5,100.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="77" y="122" font-family="arial" font-size="20px" class="high-text-style">3</text> +<path d="m 68.5,130.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="77" y="152" font-family="arial" font-size="20px" class="high-text-style">4</text> + +<path d="m 125.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="135" y="32" font-family="arial" font-size="20px" class="text-style">0</text> +<path d="m 125.5,40.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="135" y="62" font-family="arial" font-size="20px" class="text-style">1</text> +<path d="m 125.5,70.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="135" y="92" font-family="arial" font-size="20px" class="high-text-style">2</text> +<path d="m 125.5,100.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="135" y="122" font-family="arial" font-size="20px" class="high-text-style">3</text> +<path d="m 125.5,130.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="135" y="152" font-family="arial" font-size="20px" class="high-text-style">4</text> +<path d="m 125.5,160.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="135" y="182" font-family="arial" font-size="20px" fill="#808080" class="faded-text-style">2</text> + +<path d="m 65.5,70.5 h -20" class="line-style" /> +<path d="M 42.5,70.5 l 10,-5 l 0,10 z" class="fill-style" /> +</svg> diff --git a/src/corelib/doc/images/modelview-begin-remove-columns.svg b/src/corelib/doc/images/modelview-begin-remove-columns.svg new file mode 100644 index 00000000000..a221bfda9fc --- /dev/null +++ b/src/corelib/doc/images/modelview-begin-remove-columns.svg @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="290" + height="165" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + svg .faded-text-style { font: 20px arial; fill: #808080 } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + svg.dark .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="dark"] svg .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .faded-text-style { font: 20px arial; fill: #808080 } +</style> + +<path d="m 10.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="32" font-family="arial" font-size="20px" class="text-style">0</text> +<path d="m 40.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="50" y="32" font-family="arial" font-size="20px" class="text-style">1</text> +<path d="m 70.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="80" y="32" font-family="arial" font-size="20px" class="text-style">2</text> +<path d="m 100.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="110" y="32" font-family="arial" font-size="20px" class="text-style">3</text> +<path d="m 130.5,10.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="140" y="32" font-family="arial" font-size="20px" class="high-text-style">4</text> +<path d="m 160.5,10.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="170" y="32" font-family="arial" font-size="20px" class="high-text-style">5</text> +<path d="m 190.5,10.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="200" y="32" font-family="arial" font-size="20px" class="high-text-style">6</text> +<path d="m 220.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="230" y="32" font-family="arial" font-size="20px" class="text-style">7</text> +<path d="m 250.5,10.5 h 30 v 30 h -30 z" class="box-style" + stroke-dasharray="5, 5" /> + +<path d="m 130.5,68.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="140" y="89" font-family="arial" font-size="20px" class="high-text-style">4</text> +<path d="m 160.5,68.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="170" y="89" font-family="arial" font-size="20px" class="high-text-style">5</text> +<path d="m 190.5,68.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="200" y="89" font-family="arial" font-size="20px" class="high-text-style">6</text> + +<path d="m 10.5,125.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="147" font-family="arial" font-size="20px" class="text-style">0</text> +<path d="m 40.5,125.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="50" y="147" font-family="arial" font-size="20px" class="text-style">1</text> +<path d="m 70.5,125.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="80" y="147" font-family="arial" font-size="20px" class="text-style">2</text> +<path d="m 100.5,125.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="110" y="147" font-family="arial" font-size="20px" class="text-style">3</text> +<path d="m 130.5,125.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="140" y="147" font-family="arial" font-size="20px" fill="#808080" class="faded-text-style">7</text> +<path d="m 160.5,125.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="170" y="147" font-family="arial" font-size="20px" fill="#808080" class="faded-text-style">8</text> +<path d="m 190.5,125.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="200" y="147" font-family="arial" font-size="20px" fill="#808080" class="faded-text-style">9</text> +<path d="m 220.5,125.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="224" y="147" font-family="arial" font-size="20px" fill="#808080" class="faded-text-style">10</text> +<path d="m 250.5,125.5 h 30 v 30 h -30 z" class="box-style" + stroke-dasharray="5, 5" /> + +<path d="M 130.5,63 V 43" class="line-style" /> +<path d="M 130.5,66 l -5,-10 l 10,0 z" class="fill-style" /> + +</svg> diff --git a/src/corelib/doc/images/modelview-begin-remove-rows.svg b/src/corelib/doc/images/modelview-begin-remove-rows.svg new file mode 100644 index 00000000000..0c67b1b6404 --- /dev/null +++ b/src/corelib/doc/images/modelview-begin-remove-rows.svg @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="165" + height="230" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + svg .faded-text-style { font: 20px arial; fill: #808080 } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + svg.dark .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="dark"] svg .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .faded-text-style { font: 20px arial; fill: #808080 } +</style> + +<path d="m 10.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="32" font-family="arial" font-size="20px" class="text-style">0</text> +<path d="m 10.5,40.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="62" font-family="arial" font-size="20px" class="text-style">1</text> +<path d="m 10.5,70.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="20" y="92" font-family="arial" font-size="20px" class="high-text-style">2</text> +<path d="m 10.5,100.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="20" y="122" font-family="arial" font-size="20px" class="high-text-style">3</text> +<path d="m 10.5,130.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="152" font-family="arial" font-size="20px" class="text-style">4</text> +<path d="m 10.5,160.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="20" y="182" font-family="arial" font-size="20px" class="text-style">5</text> +<path d="m 10.5,190.5 h 30 v 30 h -30 z" class="box-style" + stroke-dasharray="5, 5" /> + +<path d="m 125.5,10.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="135" y="32" font-family="arial" font-size="20px" class="text-style">0</text> +<path d="m 125.5,40.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="135" y="62" font-family="arial" font-size="20px" class="text-style">1</text> +<path d="m 125.5,70.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="135" y="92" font-family="arial" font-size="20px" fill="#808080" class="faded-text-style">4</text> +<path d="m 125.5,100.5 h 30 v 30 h -30 z" class="box-style" /> +<text x="135" y="122" font-family="arial" font-size="20px" fill="#808080" class="faded-text-style">5</text> +<path d="m 125.5,130.5 h 30 v 30 h -30 z" class="box-style" + stroke-dasharray="5, 5" /> + +<path d="m 68.5,70.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="77" y="92" font-family="arial" font-size="20px" class="high-text-style">2</text> +<path d="m 68.5,100.5 h 30 v 30 h -30 z" class="highlighted-style" /> +<text x="77" y="122" font-family="arial" font-size="20px" class="high-text-style">3</text> + +<path d="M 63,70.5 H 43" class="line-style" /> +<path d="M 66,70.5 l -10,-5 l 0,10 z" class="fill-style" /> +</svg> diff --git a/src/corelib/doc/images/modelview-move-rows-1.svg b/src/corelib/doc/images/modelview-move-rows-1.svg new file mode 100644 index 00000000000..1c90c42f730 --- /dev/null +++ b/src/corelib/doc/images/modelview-move-rows-1.svg @@ -0,0 +1,169 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="200" + height="440" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + svg .faded-text-style { font: 20px arial; fill: #808080 } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + svg.dark .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="dark"] svg .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .faded-text-style { font: 20px arial; fill: #808080 } +</style> + +<g transform="translate(10,10)"> +<path d="m 0.5,0.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 0.5,30.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 0.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="82" font-family="arial" font-size="20px" + class="text-style">2</text> +<path d="m 0.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="112" font-family="arial" font-size="20px" + class="text-style">3</text> +<path d="m 0.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 0.5,180.5 h 30 v 30 h -30 z" stroke="black" fill="white" + stroke-dasharray="5, 5" + class="box-style" /> +<path d="m 0.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="m 0.5,240.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="262" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 0.5,270.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="292" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 0.5,300.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="322" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 0.5,330.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="352" font-family="arial" font-size="20px" + class="high-text-style">3</text> +<path d="m 0.5,360.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="382" font-family="arial" font-size="20px" + class="high-text-style">4</text> +<path d="m 0.5,390.5 h 30 V 420.5 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="412" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="m 58.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="82" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 58.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="112" font-family="arial" font-size="20px" + class="high-text-style">3</text> +<path d="m 58.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="142" font-family="arial" font-size="20px" + class="high-text-style">4</text> + +<path d="m 145.5,0.5 h 30 v 30.956 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 145.5,31.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 145.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="82" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 145.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="112" font-family="arial" font-size="20px" + class="high-text-style">3</text> +<path d="m 145.5,180.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="202" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">3</text> +<path d="m 145.5,210.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="232" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">4</text> +<path d="m 145.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="142" font-family="arial" font-size="20px" + class="high-text-style">4</text> +<path d="m 145.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="172" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">2</text> +<path d="m 145.5,240.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="262" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">5</text> + +<path d="m 145.5,330.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="352" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 145.5,360.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="382" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 145.5,390.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="412" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">5</text> + +<path d="M 58.5,60.5 h -25" stroke="black" + class="line-style" /> +<path d="M 31.5,60.5 l 10,-5 l 0,10 z" stroke="none" fill="black" + class="fill-style" /> +<path d="M 31.5,315.5 h 42 v -163" stroke="black" fill="none" + class="line-style" /> +<path d="M 73.5,151.5 l -5,10 l 10,0 z" stroke="none" fill="black" + class="fill-style" /> +</g> +</svg> diff --git a/src/corelib/doc/images/modelview-move-rows-2.svg b/src/corelib/doc/images/modelview-move-rows-2.svg new file mode 100644 index 00000000000..12ebfc43a16 --- /dev/null +++ b/src/corelib/doc/images/modelview-move-rows-2.svg @@ -0,0 +1,169 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="200" + height="440" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + svg .faded-text-style { font: 20px arial; fill: #808080 } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + svg.dark .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="dark"] svg .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .faded-text-style { font: 20px arial; fill: #808080 } +</style> + +<g transform="translate(10,10)"> +<path d="m 0.5,0.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 0.5,30.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 0.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="82" font-family="arial" font-size="20px" + class="text-style">2</text> +<path d="m 0.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="112" font-family="arial" font-size="20px" + class="text-style">3</text> +<path d="m 0.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 0.5,180.5 h 30 v 30 h -30 z" stroke="black" fill="white" + stroke-dasharray="5, 5" + class="box-style" /> +<path d="m 0.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="m 0.5,240.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="262" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 0.5,270.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="292" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 0.5,300.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="322" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 0.5,330.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="352" font-family="arial" font-size="20px" + class="high-text-style">3</text> +<path d="m 0.5,360.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="382" font-family="arial" font-size="20px" + class="high-text-style">4</text> +<path d="m 0.5,390.5 h 30 V 420.5 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="412" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="m 58.5,180.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="202" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 58.5,210.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="232" font-family="arial" font-size="20px" + class="high-text-style">3</text> +<path d="m 58.5,240.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="262" font-family="arial" font-size="20px" + class="high-text-style">4</text> + +<path d="m 145.5,0.5 h 30 v 30.956 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 145.5,31.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 145.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="82" font-family="arial" font-size="20px" + class="text-style">2</text> +<path d="m 145.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="112" font-family="arial" font-size="20px" + class="text-style">3</text> +<path d="m 145.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 145.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> +<path d="m 145.5,180.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="202" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 145.5,210.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="232" font-family="arial" font-size="20px" + class="high-text-style">3</text> +<path d="m 145.5,240.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="262" font-family="arial" font-size="20px" + class="high-text-style">4</text> + +<path d="m 145.5,330.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="352" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 145.5,360.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="382" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 145.5,390.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="412" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">5</text> + +<path d="M 58.5,180.5 h -25" stroke="black" + class="line-style" /> +<path d="M 31.5,180.5 l 10,-5 l 0,10 z" stroke="none" fill="black" + class="fill-style" /> +<path d="M 31.5,315.5 h 42 v -43" stroke="black" fill="none" + class="line-style" /> +<path d="M 73.5,271.5 l -5,10 l 10,0 z" stroke="none" fill="black" + class="fill-style" /> +</g> +</svg> diff --git a/src/corelib/doc/images/modelview-move-rows-3.svg b/src/corelib/doc/images/modelview-move-rows-3.svg new file mode 100644 index 00000000000..21d9803eb91 --- /dev/null +++ b/src/corelib/doc/images/modelview-move-rows-3.svg @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="200" + height="200" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + svg .faded-text-style { font: 20px arial; fill: #808080 } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + svg.dark .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="dark"] svg .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .faded-text-style { font: 20px arial; fill: #808080 } +</style> + +<g transform="translate(10,10)"> +<path d="m 0.5,0.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 0.5,30.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 0.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="82" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 0.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="112" font-family="arial" font-size="20px" + class="text-style">3</text> +<path d="m 0.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 0.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="m 58.5,0.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="22" font-family="arial" font-size="20px" + class="high-text-style">2</text> + +<path d="m 145.5,0.5 h 30 v 30.956 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="22" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 145.5,31.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="52" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">0</text> +<path d="m 145.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="82" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">1</text> +<path d="m 145.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="112" font-family="arial" font-size="20px" + class="text-style">3</text> +<path d="m 145.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 145.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="M 58.5,0.5 h -25" stroke="black" fill="none" + class="line-style" /> +<path d="M 31.5,0.5 l 10,-5 l 0,10 z" stroke="none" fill="black" + class="fill-style" /> +<path d="M 31.5,75.5 h 42 v -43" stroke="black" fill="none" + class="line-style" /> +<path d="M 73.5,31.5 l -5,10 l 10,0 z" stroke="black" fill="black" + class="fill-style" /> +</g> +</svg> diff --git a/src/corelib/doc/images/modelview-move-rows-4.svg b/src/corelib/doc/images/modelview-move-rows-4.svg new file mode 100644 index 00000000000..708eb71f440 --- /dev/null +++ b/src/corelib/doc/images/modelview-move-rows-4.svg @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="200" + height="200" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + +<style> + svg .box-style { stroke: black; fill: white } + svg .highlighted-style { stroke: black; fill: #c0ffc0 } + svg .fill-style { stroke: none; fill: black } + svg .line-style { stroke: black; fill: none } + svg .text-style { font: 20px arial; fill: black } + svg .high-text-style { font: 20px arial; fill: black } + svg .faded-text-style { font: 20px arial; fill: #808080 } + + svg.dark .box-style { stroke: #f2f2f2; fill: black } + svg.dark .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + svg.dark .fill-style { stroke: none; fill: #f2f2f2 } + svg.dark .line-style { stroke: #f2f2f2; fill: none } + svg.dark .text-style { font: 20px arial; fill: #f2f2f2 } + svg.dark .high-text-style { font: 20px arial; fill: black } + svg.dark .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="dark"] svg .box-style { stroke: #f2f2f2; fill: black } + [data-theme="dark"] svg .highlighted-style { stroke: #f2f2f2; fill: #c0ffc0 } + [data-theme="dark"] svg .fill-style { stroke: none; fill: #f2f2f2 } + [data-theme="dark"] svg .line-style { stroke: #f2f2f2; fill: none } + [data-theme="dark"] svg .text-style { font: 20px arial; fill: #f2f2f2 } + [data-theme="dark"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="dark"] svg .faded-text-style { font: 20px arial; fill: #808080 } + + [data-theme="light"] svg .box-style { stroke: black; fill: white } + [data-theme="light"] svg .highlighted-style { stroke: black; fill: #c0ffc0 } + [data-theme="light"] svg .fill-style { stroke: none; fill: black } + [data-theme="light"] svg .line-style { stroke: black; fill: none } + [data-theme="light"] svg .text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .high-text-style { font: 20px arial; fill: black } + [data-theme="light"] svg .faded-text-style { font: 20px arial; fill: #808080 } +</style> + +<g transform="translate(10,10)"> +<path d="m 0.5,0.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 0.5,30.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 0.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="10" y="82" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 0.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="112" font-family="arial" font-size="20px" + class="text-style">3</text> +<path d="m 0.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 0.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="10" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="m 58.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="67" y="142" font-family="arial" font-size="20px" + class="high-text-style">2</text> + +<path d="m 145.5,0.5 h 30 v 30.956 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="22" font-family="arial" font-size="20px" + class="text-style">0</text> +<path d="m 145.5,31.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="52" font-family="arial" font-size="20px" + class="text-style">1</text> +<path d="m 145.5,60.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="82" font-family="arial" font-size="20px" fill="#808080" + class="faded-text-style">3</text> +<path d="m 145.5,90.5 h 30 v 30 h -30 z" stroke="black" fill="#c0ffc0" + class="highlighted-style" /> +<text x="155" y="112" font-family="arial" font-size="20px" + class="high-text-style">2</text> +<path d="m 145.5,120.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="142" font-family="arial" font-size="20px" + class="text-style">4</text> +<path d="m 145.5,150.5 h 30 v 30 h -30 z" stroke="black" fill="white" + class="box-style" /> +<text x="155" y="172" font-family="arial" font-size="20px" + class="text-style">5</text> + +<path d="M 58.5,120.5 h -25" stroke="black" fill="none" + class="line-style" /> +<path d="M 31.5,120.5 l 10,-5 l 0,10 z" stroke="black" fill="black" + class="fill-style" /> +<path d="M 31.5,75.5 h 42 v 43" stroke="black" fill="none" + class="line-style" /> +<path d="M 73.5,119.5 l -5,-10 l 10,0 z" stroke="black" fill="black" + class="fill-style" /> +</g> +</svg> diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp index c960e11f6bb..58a057009ff 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.cpp +++ b/src/corelib/itemmodels/qabstractitemmodel.cpp @@ -2867,7 +2867,7 @@ bool QAbstractItemModel::decodeData(int row, int column, const QModelIndex &pare \table 80% \row - \li \inlineimage modelview-begin-insert-rows.png Inserting rows + \li \inlineimage modelview-begin-insert-rows.svg Inserting rows \li Specify the first and last row numbers for the span of rows you want to insert into an item in a model. @@ -2878,7 +2878,7 @@ bool QAbstractItemModel::decodeData(int row, int column, const QModelIndex &pare This inserts the three new rows as rows 2, 3, and 4. \row - \li \inlineimage modelview-begin-append-rows.png Appending rows + \li \inlineimage modelview-begin-append-rows.svg Appending rows \li To append rows, insert them after the last row. For example, as shown in the diagram, we append two rows to a @@ -2934,7 +2934,7 @@ void QAbstractItemModel::endInsertRows() \table 80% \row - \li \inlineimage modelview-begin-remove-rows.png Removing rows + \li \inlineimage modelview-begin-remove-rows.svg Removing rows \li Specify the first and last row numbers for the span of rows you want to remove from an item in a model. @@ -3055,7 +3055,7 @@ void QAbstractItemModelPrivate::executePendingOperations() const { } \table 80% \row - \li \inlineimage modelview-move-rows-1.png Moving rows to another parent + \li \inlineimage modelview-move-rows-1.svg Moving rows to another parent \li Specify the first and last row numbers for the span of rows in the source parent you want to move in the model. Also specify the row in the destination parent to move the span to. @@ -3069,7 +3069,7 @@ void QAbstractItemModelPrivate::executePendingOperations() const { } This moves the three rows rows 2, 3, and 4 in the source to become 2, 3 and 4 in the destination. Other affected siblings are displaced accordingly. \row - \li \inlineimage modelview-move-rows-2.png Moving rows to append to another parent + \li \inlineimage modelview-move-rows-2.svg Moving rows to append to another parent \li To append rows to another parent, move them to after the last row. For example, as shown in the diagram, we move three rows to a @@ -3079,7 +3079,7 @@ void QAbstractItemModelPrivate::executePendingOperations() const { } This moves the target rows to the end of the target parent as 6, 7 and 8. \row - \li \inlineimage modelview-move-rows-3.png Moving rows in the same parent up + \li \inlineimage modelview-move-rows-3.svg Moving rows in the same parent up \li To move rows within the same parent, specify the row to move them to. For example, as shown in the diagram, we move one item from row 2 to row 0, @@ -3094,7 +3094,7 @@ void QAbstractItemModelPrivate::executePendingOperations() const { } it is already) \row - \li \inlineimage modelview-move-rows-4.png Moving rows in the same parent down + \li \inlineimage modelview-move-rows-4.svg Moving rows in the same parent down \li To move rows within the same parent, specify the row to move them to. For example, as shown in the diagram, we move one item from row 2 to row 4, @@ -3176,7 +3176,7 @@ void QAbstractItemModel::endMoveRows() \table 80% \row - \li \inlineimage modelview-begin-insert-columns.png Inserting columns + \li \inlineimage modelview-begin-insert-columns.svg Inserting columns \li Specify the first and last column numbers for the span of columns you want to insert into an item in a model. @@ -3187,7 +3187,7 @@ void QAbstractItemModel::endMoveRows() This inserts the three new columns as columns 4, 5, and 6. \row - \li \inlineimage modelview-begin-append-columns.png Appending columns + \li \inlineimage modelview-begin-append-columns.svg Appending columns \li To append columns, insert them after the last column. For example, as shown in the diagram, we append three columns to a @@ -3245,7 +3245,7 @@ void QAbstractItemModel::endInsertColumns() \table 80% \row - \li \inlineimage modelview-begin-remove-columns.png Removing columns + \li \inlineimage modelview-begin-remove-columns.svg Removing columns \li Specify the first and last column numbers for the span of columns you want to remove from an item in a model. diff --git a/src/corelib/text/qstringconverter_p.h b/src/corelib/text/qstringconverter_p.h index 3ac60ce8c70..3923c2f302f 100644 --- a/src/corelib/text/qstringconverter_p.h +++ b/src/corelib/text/qstringconverter_p.h @@ -334,6 +334,7 @@ struct QUtf8 static char16_t *convertToUnicode(char16_t *dst, QByteArrayView in, QStringConverter::State *state); + Q_CORE_EXPORT static char *convertFromUnicode(char *dst, QStringView in) noexcept; Q_CORE_EXPORT static QByteArray convertFromUnicode(QStringView in); Q_CORE_EXPORT static QByteArray convertFromUnicode(QStringView in, QStringConverter::State *state); diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 2ef1c31ce1c..7be1d7fe3aa 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -365,7 +365,7 @@ bool QAuthenticator::isNull() const state. */ -void QAuthenticator::clear() noexcept +void QAuthenticator::clear() { *d = QAuthenticatorPrivate(); d->phase = QAuthenticatorPrivate::Done; diff --git a/src/network/kernel/qauthenticator.h b/src/network/kernel/qauthenticator.h index db309fb87ad..c4993ff0fc7 100644 --- a/src/network/kernel/qauthenticator.h +++ b/src/network/kernel/qauthenticator.h @@ -44,7 +44,7 @@ public: bool isNull() const; void detach(); - void clear() noexcept; + void clear(); private: friend class QAuthenticatorPrivate; QAuthenticatorPrivate *d; diff --git a/src/widgets/widgets/qlcdnumber.cpp b/src/widgets/widgets/qlcdnumber.cpp index 2c4b4e334d5..ac8e00af95e 100644 --- a/src/widgets/widgets/qlcdnumber.cpp +++ b/src/widgets/widgets/qlcdnumber.cpp @@ -5,6 +5,7 @@ #include "qlcdnumber.h" #include "qbitarray.h" +#include "qnumeric.h" #include "qpainter.h" #include "private/qframe_p.h" @@ -110,22 +111,17 @@ public: */ -static QString int2string(int num, int base, int ndigits, bool *oflow) +static QString int2string(int number, int base, int ndigits, bool *oflow) { QString s; - bool negative; - if (num < 0) { - negative = true; - num = -num; - } else { - negative = false; - } + const bool negative = number < 0; + const uint num = QtPrivate::qUnsignedAbs(number); switch(base) { case QLCDNumber::Hex: s = QString::asprintf("%*x", ndigits, num); break; case QLCDNumber::Dec: - s = QString::asprintf("%*i", ndigits, num); + s = QString::asprintf("%*u", ndigits, num); break; case QLCDNumber::Oct: s = QString::asprintf("%*o", ndigits, num); diff --git a/tests/auto/corelib/io/qioring/tst_qioring.cpp b/tests/auto/corelib/io/qioring/tst_qioring.cpp index 75d4fe68c55..5d5662cd9b4 100644 --- a/tests/auto/corelib/io/qioring/tst_qioring.cpp +++ b/tests/auto/corelib/io/qioring/tst_qioring.cpp @@ -20,6 +20,7 @@ class tst_QIORing : public QObject Q_OBJECT private slots: + void initTestCase(); void construct(); void sharedInstance(); void open(); @@ -33,6 +34,12 @@ private: static qintptr openHelper(QIORing *ring, const QString &path, QIODevice::OpenMode flags); }; +void tst_QIORing::initTestCase() +{ + if (QIORing::sharedInstance() == nullptr) + QSKIP("QIORing wasn't able to initialize on this platform. Test will be skipped."); +} + void tst_QIORing::closeFile(qintptr fd) { #ifdef Q_OS_WIN diff --git a/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp b/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp index 8fcf9c49fe6..88e67b34a2d 100644 --- a/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp +++ b/tests/auto/widgets/widgets/qlcdnumber/tst_qlcdnumber.cpp @@ -18,6 +18,9 @@ public: private slots: void getSetCheck(); + + void displayEdgeCases_data(); + void displayEdgeCases(); }; tst_QLCDNumber::tst_QLCDNumber() @@ -42,5 +45,30 @@ void tst_QLCDNumber::getSetCheck() QCOMPARE(99, obj1.digitCount()); // Range<0, 99> } +// Test case for undefined behavior when displaying INT_MIN +void tst_QLCDNumber::displayEdgeCases_data() +{ + QTest::addColumn<int>("number"); + QTest::addColumn<QString>("expected"); + + // INT_MIN previously caused UB due to -INT_MIN overflow in int2string(). + QTest::newRow("INT_MIN") << INT_MIN << QString::number(INT_MIN); + QTest::newRow("INT_MAX") << INT_MAX << QString::number(INT_MAX); + QTest::newRow("Zero") << 0 << QStringLiteral("0"); +} + +void tst_QLCDNumber::displayEdgeCases() +{ + QFETCH(int, number); + QFETCH(QString, expected); + + QLCDNumber lcd; + lcd.setDigitCount(12); + lcd.display(number); + + QString result = QString::number(lcd.intValue()); + QCOMPARE(result, expected); +} + QTEST_MAIN(tst_QLCDNumber) #include "tst_qlcdnumber.moc" |
