qt4: pull upstream fix for gcc-11 (#147555)

Without the change the build on `gcc-11` fails as:

$ nix build --impure --expr 'with import ./. {}; qt4.override { stdenv = gcc11Stdenv; }' -L
...
messagemodel.cpp: In function 'int calcMergeScore(const DataModel*, const DataModel*)':
messagemodel.cpp:186:61: error: ordered comparison of pointer with integer zero ('MessageItem*' and 'int')
186 | if (c->findMessage(m->text(), m->comment()) >= 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~

authored by Sergei Trofimovich and committed by GitHub 2d4606a3 d57f82e3

+10
+10
pkgs/development/libraries/qt-4.x/4.8/default.nix
··· 97 + "0d4a3dd61ccb156dee556c214dbe91c04d44a717/debian/patches/gcc9-qforeach.patch"; 98 sha256 = "0dzn6qxrgxb75rvck9kmy5gspawdn970wsjw56026dhkih8cp3pg"; 99 }) 100 ] 101 ++ lib.optional gtkStyle (substituteAll ({ 102 src = ./dlopen-gtkstyle.diff;
··· 97 + "0d4a3dd61ccb156dee556c214dbe91c04d44a717/debian/patches/gcc9-qforeach.patch"; 98 sha256 = "0dzn6qxrgxb75rvck9kmy5gspawdn970wsjw56026dhkih8cp3pg"; 99 }) 100 + 101 + # Pull upstream fix for gcc-11 support. 102 + (fetchpatch { 103 + name = "gcc11-ptr-cmp.patch"; 104 + url = "https://github.com/qt/qttools/commit/7138c963f9d1258bc1b49cb4d63c3e2b7d0ccfda.patch"; 105 + sha256 = "1a9g05r267c94qpw3ssb6k4lci200vla3vm5hri1nna6xwdsmrhc"; 106 + # "src/" -> "tools/" 107 + stripLen = 2; 108 + extraPrefix = "tools/"; 109 + }) 110 ] 111 ++ lib.optional gtkStyle (substituteAll ({ 112 src = ./dlopen-gtkstyle.diff;