From a8723871ee7125b97ce5467b94198e93a528c960 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 3 Nov 2014 14:47:40 +0100 Subject: [PATCH] QFrame: add an autotest for visual appearance Change-Id: I97c24902c9f8dfabd9ececbae868d42ea262653b Reviewed-by: Friedemann Kleint Reviewed-by: David Faure --- .../qframe/images/box_noshadow_0_0.png | Bin 0 -> 103 bytes .../qframe/images/box_noshadow_0_1.png | Bin 0 -> 103 bytes .../qframe/images/box_noshadow_0_2.png | Bin 0 -> 103 bytes .../qframe/images/box_noshadow_1_0.png | Bin 0 -> 114 bytes .../qframe/images/box_noshadow_1_1.png | Bin 0 -> 114 bytes .../qframe/images/box_noshadow_1_2.png | Bin 0 -> 114 bytes .../qframe/images/box_noshadow_2_0.png | Bin 0 -> 114 bytes .../qframe/images/box_noshadow_2_1.png | Bin 0 -> 114 bytes .../qframe/images/box_noshadow_2_2.png | Bin 0 -> 114 bytes .../widgets/qframe/images/box_plain_0_0.png | Bin 0 -> 103 bytes .../widgets/qframe/images/box_plain_0_1.png | Bin 0 -> 103 bytes .../widgets/qframe/images/box_plain_0_2.png | Bin 0 -> 103 bytes .../widgets/qframe/images/box_plain_1_0.png | Bin 0 -> 114 bytes .../widgets/qframe/images/box_plain_1_1.png | Bin 0 -> 114 bytes .../widgets/qframe/images/box_plain_1_2.png | Bin 0 -> 114 bytes .../widgets/qframe/images/box_plain_2_0.png | Bin 0 -> 114 bytes .../widgets/qframe/images/box_plain_2_1.png | Bin 0 -> 114 bytes .../widgets/qframe/images/box_plain_2_2.png | Bin 0 -> 114 bytes .../widgets/qframe/images/box_raised_0_0.png | Bin 0 -> 103 bytes .../widgets/qframe/images/box_raised_0_1.png | Bin 0 -> 129 bytes .../widgets/qframe/images/box_raised_0_2.png | Bin 0 -> 126 bytes .../widgets/qframe/images/box_raised_1_0.png | Bin 0 -> 135 bytes .../widgets/qframe/images/box_raised_1_1.png | Bin 0 -> 158 bytes .../widgets/qframe/images/box_raised_1_2.png | Bin 0 -> 162 bytes .../widgets/qframe/images/box_raised_2_0.png | Bin 0 -> 148 bytes .../widgets/qframe/images/box_raised_2_1.png | Bin 0 -> 182 bytes .../widgets/qframe/images/box_raised_2_2.png | Bin 0 -> 182 bytes .../widgets/qframe/images/box_sunken_0_0.png | Bin 0 -> 103 bytes .../widgets/qframe/images/box_sunken_0_1.png | Bin 0 -> 129 bytes .../widgets/qframe/images/box_sunken_0_2.png | Bin 0 -> 126 bytes .../widgets/qframe/images/box_sunken_1_0.png | Bin 0 -> 138 bytes .../widgets/qframe/images/box_sunken_1_1.png | Bin 0 -> 159 bytes .../widgets/qframe/images/box_sunken_1_2.png | Bin 0 -> 163 bytes .../widgets/qframe/images/box_sunken_2_0.png | Bin 0 -> 148 bytes .../widgets/qframe/images/box_sunken_2_1.png | Bin 0 -> 182 bytes .../widgets/qframe/images/box_sunken_2_2.png | Bin 0 -> 182 bytes .../qframe/images/winpanel_noshadow_0_0.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_noshadow_0_1.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_noshadow_0_2.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_noshadow_1_0.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_noshadow_1_1.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_noshadow_1_2.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_noshadow_2_0.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_noshadow_2_1.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_noshadow_2_2.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_plain_0_0.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_plain_0_1.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_plain_0_2.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_plain_1_0.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_plain_1_1.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_plain_1_2.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_plain_2_0.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_plain_2_1.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_plain_2_2.png | Bin 0 -> 114 bytes .../qframe/images/winpanel_raised_0_0.png | Bin 0 -> 148 bytes .../qframe/images/winpanel_raised_0_1.png | Bin 0 -> 148 bytes .../qframe/images/winpanel_raised_0_2.png | Bin 0 -> 148 bytes .../qframe/images/winpanel_raised_1_0.png | Bin 0 -> 148 bytes .../qframe/images/winpanel_raised_1_1.png | Bin 0 -> 148 bytes .../qframe/images/winpanel_raised_1_2.png | Bin 0 -> 148 bytes .../qframe/images/winpanel_raised_2_0.png | Bin 0 -> 148 bytes .../qframe/images/winpanel_raised_2_1.png | Bin 0 -> 148 bytes .../qframe/images/winpanel_raised_2_2.png | Bin 0 -> 148 bytes .../qframe/images/winpanel_sunken_0_0.png | Bin 0 -> 154 bytes .../qframe/images/winpanel_sunken_0_1.png | Bin 0 -> 154 bytes .../qframe/images/winpanel_sunken_0_2.png | Bin 0 -> 154 bytes .../qframe/images/winpanel_sunken_1_0.png | Bin 0 -> 154 bytes .../qframe/images/winpanel_sunken_1_1.png | Bin 0 -> 154 bytes .../qframe/images/winpanel_sunken_1_2.png | Bin 0 -> 154 bytes .../qframe/images/winpanel_sunken_2_0.png | Bin 0 -> 154 bytes .../qframe/images/winpanel_sunken_2_1.png | Bin 0 -> 154 bytes .../qframe/images/winpanel_sunken_2_2.png | Bin 0 -> 154 bytes .../widgets/widgets/qframe/tst_qframe.cpp | 57 +++++++++++++++--- 73 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 tests/auto/widgets/widgets/qframe/images/box_noshadow_0_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_noshadow_0_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_noshadow_0_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_noshadow_1_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_noshadow_1_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_noshadow_1_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_noshadow_2_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_noshadow_2_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_noshadow_2_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_plain_0_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_plain_0_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_plain_0_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_plain_1_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_plain_1_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_plain_1_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_plain_2_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_plain_2_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_plain_2_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_raised_0_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_raised_0_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_raised_0_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_raised_1_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_raised_1_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_raised_1_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_raised_2_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_raised_2_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_raised_2_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_sunken_0_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_sunken_0_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_sunken_0_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_sunken_1_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_sunken_1_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_sunken_1_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_sunken_2_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_sunken_2_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/box_sunken_2_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_noshadow_0_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_noshadow_0_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_noshadow_0_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_noshadow_1_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_noshadow_1_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_noshadow_1_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_noshadow_2_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_noshadow_2_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_noshadow_2_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_plain_0_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_plain_0_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_plain_0_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_plain_1_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_plain_1_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_plain_1_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_plain_2_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_plain_2_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_plain_2_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_raised_0_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_raised_0_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_raised_0_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_raised_1_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_raised_1_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_raised_1_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_raised_2_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_raised_2_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_raised_2_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_sunken_0_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_sunken_0_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_sunken_0_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_sunken_1_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_sunken_1_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_sunken_1_2.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_sunken_2_0.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_sunken_2_1.png create mode 100644 tests/auto/widgets/widgets/qframe/images/winpanel_sunken_2_2.png diff --git a/tests/auto/widgets/widgets/qframe/images/box_noshadow_0_0.png b/tests/auto/widgets/widgets/qframe/images/box_noshadow_0_0.png new file mode 100644 index 0000000000000000000000000000000000000000..f1d63927790c788661dcfe456604ba2a713d5184 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*Bp- w#W6%mdKI;Vst00j>i761SM literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_noshadow_0_1.png b/tests/auto/widgets/widgets/qframe/images/box_noshadow_0_1.png new file mode 100644 index 0000000000000000000000000000000000000000..f1d63927790c788661dcfe456604ba2a713d5184 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*Bp- w#W6%mdKI;Vst00j>i761SM literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_noshadow_0_2.png b/tests/auto/widgets/widgets/qframe/images/box_noshadow_0_2.png new file mode 100644 index 0000000000000000000000000000000000000000..f1d63927790c788661dcfe456604ba2a713d5184 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*Bp- w#W6%mdKI;Vst00j>i761SM literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_noshadow_1_0.png b/tests/auto/widgets/widgets/qframe/images/box_noshadow_1_0.png new file mode 100644 index 0000000000000000000000000000000000000000..0cc9090e3bd4a0a9cca74931f22e7f1dd32df6fb GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*BCw z#W6%FVdQ I&MBb@099NaUH||9 literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_noshadow_1_1.png b/tests/auto/widgets/widgets/qframe/images/box_noshadow_1_1.png new file mode 100644 index 0000000000000000000000000000000000000000..0cc9090e3bd4a0a9cca74931f22e7f1dd32df6fb GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*BCw z#W6%FVdQ I&MBb@099NaUH||9 literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_noshadow_1_2.png b/tests/auto/widgets/widgets/qframe/images/box_noshadow_1_2.png new file mode 100644 index 0000000000000000000000000000000000000000..0cc9090e3bd4a0a9cca74931f22e7f1dd32df6fb GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*BCw z#W6%FVdQ I&MBb@099NaUH||9 literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_noshadow_2_0.png b/tests/auto/widgets/widgets/qframe/images/box_noshadow_2_0.png new file mode 100644 index 0000000000000000000000000000000000000000..61f683df526ff50fc53ff30c6f822c1baa9df2ab GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*BCw z#W6%mdKI;Vst00j>i761SM literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_plain_0_1.png b/tests/auto/widgets/widgets/qframe/images/box_plain_0_1.png new file mode 100644 index 0000000000000000000000000000000000000000..f1d63927790c788661dcfe456604ba2a713d5184 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*Bp- w#W6%mdKI;Vst00j>i761SM literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_plain_0_2.png b/tests/auto/widgets/widgets/qframe/images/box_plain_0_2.png new file mode 100644 index 0000000000000000000000000000000000000000..f1d63927790c788661dcfe456604ba2a713d5184 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*Bp- w#W6%mdKI;Vst00j>i761SM literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_plain_1_0.png b/tests/auto/widgets/widgets/qframe/images/box_plain_1_0.png new file mode 100644 index 0000000000000000000000000000000000000000..0cc9090e3bd4a0a9cca74931f22e7f1dd32df6fb GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*BCw z#W6%FVdQ I&MBb@099NaUH||9 literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_plain_1_1.png b/tests/auto/widgets/widgets/qframe/images/box_plain_1_1.png new file mode 100644 index 0000000000000000000000000000000000000000..0cc9090e3bd4a0a9cca74931f22e7f1dd32df6fb GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*BCw z#W6%FVdQ I&MBb@099NaUH||9 literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_plain_1_2.png b/tests/auto/widgets/widgets/qframe/images/box_plain_1_2.png new file mode 100644 index 0000000000000000000000000000000000000000..0cc9090e3bd4a0a9cca74931f22e7f1dd32df6fb GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*BCw z#W6%FVdQ I&MBb@099NaUH||9 literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_plain_2_0.png b/tests/auto/widgets/widgets/qframe/images/box_plain_2_0.png new file mode 100644 index 0000000000000000000000000000000000000000..61f683df526ff50fc53ff30c6f822c1baa9df2ab GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*BCw z#W6%mdKI;Vst00j>i761SM literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_raised_0_1.png b/tests/auto/widgets/widgets/qframe/images/box_raised_0_1.png new file mode 100644 index 0000000000000000000000000000000000000000..b2ab941d304046685ccd66a4bff8d5f70f8fa548 GIT binary patch literal 129 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP|(=Z z#W6%$0lu-y>G;Ij#X)m$a~4VdLQV@cHQCCpDoL(HjWW`^tAg;&mBy?-sxYz9wPKbLh*2~7YZ C)G{Fe literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_raised_1_2.png b/tests/auto/widgets/widgets/qframe/images/box_raised_1_2.png new file mode 100644 index 0000000000000000000000000000000000000000..51a7899d05a7b434fe996a264585203450dcde7a GIT binary patch literal 162 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP%y;P z#W6%$0lu-y>FG&tuNH4X=+a_6u@iie+YIc5axjA9j^V zNvI%w@|z`ryhj+OR0s%6RB&uw(!yfc*`=fY(BCzKfkEoL@XE%*+M7W089ZJ6T-G@y GGywqG4Kf-4 literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_raised_2_0.png b/tests/auto/widgets/widgets/qframe/images/box_raised_2_0.png new file mode 100644 index 0000000000000000000000000000000000000000..8c3769c32d0c5556a56549cfb576a94dd3c39ff2 GIT binary patch literal 148 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP|(fO z#W6%>&a5!TyTWB rs6u!fqulf(w;WQ6l9b{!Sr{11X7E{6KQ9sin#kbk>gTe~DWM4fASNtO literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_raised_2_1.png b/tests/auto/widgets/widgets/qframe/images/box_raised_2_1.png new file mode 100644 index 0000000000000000000000000000000000000000..81e0c2a152c287cc4120959209a334b2e501b6c5 GIT binary patch literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP%y*O z#W6%F4F))w((I z!V{)HH5Xl2TvR6PTvAyzBg27Tb&G*w0&`J?@HWRFr=}S!OjjH1V;5Lw9^7-&WmQ^2 b0s}+i8u9iEai{MA?PTzD^>bP0l+XkK>*qbA literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_raised_2_2.png b/tests/auto/widgets/widgets/qframe/images/box_raised_2_2.png new file mode 100644 index 0000000000000000000000000000000000000000..107272d0b9f58e8486f789a82676049bd947ff8c GIT binary patch literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP%y*O z#W6%pH)kJx?6A8%&V_2IYyROo1M>f~4Ebr#3+4mVY9?%dAE Yp!Pt#{YZ962hdIiPgg&ebxsLQ0Cd4Tga7~l literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_sunken_0_0.png b/tests/auto/widgets/widgets/qframe/images/box_sunken_0_0.png new file mode 100644 index 0000000000000000000000000000000000000000..f1d63927790c788661dcfe456604ba2a713d5184 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*Bp- w#W6%mdKI;Vst00j>i761SM literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_sunken_0_1.png b/tests/auto/widgets/widgets/qframe/images/box_sunken_0_1.png new file mode 100644 index 0000000000000000000000000000000000000000..b2ab941d304046685ccd66a4bff8d5f70f8fa548 GIT binary patch literal 129 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP|(=Z z#W6%5;OXk;vd$@?2>`RsD8m2% literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_sunken_1_1.png b/tests/auto/widgets/widgets/qframe/images/box_sunken_1_1.png new file mode 100644 index 0000000000000000000000000000000000000000..9d5440b3aaec56462988740d9628f02d0bbb63d3 GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP%zNb z#W6%b6o&$@k4lg?^&~703 zQo=&ws)2=xLJ~+sCF91mdKI;Vst0NCp> A0ssI2 literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_sunken_1_2.png b/tests/auto/widgets/widgets/qframe/images/box_sunken_1_2.png new file mode 100644 index 0000000000000000000000000000000000000000..17eb7f59c0cabe25d991c892894c31854b0586ae GIT binary patch literal 163 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP%zZf z#W6%rT75{skAaoLfC-RL@>M?8027v9OhsQF_AR*&BGRx96&7GQOoeZ9?elF{r5}E*dTR1%c literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/box_sunken_2_2.png b/tests/auto/widgets/widgets/qframe/images/box_sunken_2_2.png new file mode 100644 index 0000000000000000000000000000000000000000..5750751c58ced468b7d2a95cb41737a3b1aa4247 GIT binary patch literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP%y*O z#W6% literal 0 HcmV?d00001 diff --git a/tests/auto/widgets/widgets/qframe/images/winpanel_noshadow_0_0.png b/tests/auto/widgets/widgets/qframe/images/winpanel_noshadow_0_0.png new file mode 100644 index 0000000000000000000000000000000000000000..61f683df526ff50fc53ff30c6f822c1baa9df2ab GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F5M?jcysy3fAP*BCw z#W6%#<0VeRhK*~Mbf`!(7`O>7#<0VeRhK*~Mbf`!(7`O>7#<0VeRhK*~Mbf`!(7`O>7#<0VeRhK*~Mbf`!(7`O>7#<0VeRhK*~Mbf`!(7`O>7#<0VeRhK*~Mbf`!(7`O>7#<0VeRhK*~Mbf`!(7`O>7#<0VeRhK*~Mbf`!(7`O>7#<0VeRhK*~Mbf`!(7`O>7ZP~9mUV}n3ZP~9mUV}n3ZP~9mUV}n3ZP~9mUV}n3ZP~9mUV}n3ZP~9mUV}n3ZP~9mUV}n3ZP~9mUV}n3ZP~9mUV}n3 #include #include +#include +#include +#include class tst_QFrame : public QObject { @@ -43,6 +46,8 @@ private slots: void testDefaults(); void testInitStyleOption_data(); void testInitStyleOption(); + void testPainting_data(); + void testPainting(); }; Q_DECLARE_METATYPE(QFrame::Shape) @@ -58,13 +63,7 @@ void tst_QFrame::testDefaults() QCOMPARE(frame.frameStyle(), int(QFrame::Box)); } -class Frame : public QFrame -{ -public: - using QFrame::initStyleOption; -}; - -void tst_QFrame::testInitStyleOption_data() +static void provideFrameData() { QTest::addColumn("basename"); QTest::addColumn("lineWidth"); @@ -95,6 +94,17 @@ void tst_QFrame::testInitStyleOption_data() } } +class Frame : public QFrame +{ +public: + using QFrame::initStyleOption; +}; + +void tst_QFrame::testInitStyleOption_data() +{ + provideFrameData(); +} + void tst_QFrame::testInitStyleOption() { QFETCH(QString, basename); @@ -137,6 +147,39 @@ void tst_QFrame::testInitStyleOption() QVERIFY(styleOption.state & QStyle::State_Raised); } +QT_BEGIN_NAMESPACE +Q_GUI_EXPORT QPalette qt_fusionPalette(); +QT_END_NAMESPACE + +void tst_QFrame::testPainting_data() +{ + provideFrameData(); +} + +void tst_QFrame::testPainting() +{ + QFETCH(QString, basename); + QFETCH(int, lineWidth); + QFETCH(int, midLineWidth); + QFETCH(QFrame::Shape, shape); + QFETCH(QFrame::Shadow, shadow); + + QFrame frame; + frame.setStyle(QStyleFactory::create(QStringLiteral("fusion"))); + frame.setPalette(qt_fusionPalette()); + frame.setFrameStyle(shape | shadow); + frame.setLineWidth(lineWidth); + frame.setMidLineWidth(midLineWidth); + frame.resize(16, 16); + + const QPixmap pixmap = frame.grab(); + + const QString referenceFilePath = QFINDTESTDATA(QStringLiteral("images/%1_%2_%3.png").arg(basename).arg(lineWidth).arg(midLineWidth)); + const QPixmap referencePixmap(referenceFilePath); + QVERIFY2(!referencePixmap.isNull(), qPrintable(QStringLiteral("Could not load reference pixmap %1").arg(referenceFilePath))); + QCOMPARE(pixmap, referencePixmap); +} + QTEST_MAIN(tst_QFrame) #include "tst_qframe.moc"