Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to apply patch .diff file?
Taytoo last edited by
I was hoping this bug fix (https://bugreports.qt.io/browse/QTBUG-53022) will make it to 5.12 LTS branch but looks like that's not happening, so I have to manually apply the .diff file someone shared in comment section.
Never applied a patch before. Is there a tutorial anywhere on how to apply .diff file? I couldn't find one. Working with VS2017 on Windows 10.
You can go to the Gerrit page of the patch you want to apply and then select cherry-pick. Go into you cloned source and copy paste the commands given.
Or if you download the file, check the git apply documentation.
Taytoo last edited by Taytoo
@SGaist I've been trying to apply the patch as below:
- Download and unzip Qt Source code in folder 5.12.5
- cd to 5.12.5\qtbase
- git init
- git add . (I see lots of LF -> CRLF warning message)
- git apply --stat <patch filename> (Shows several lines of changes)
- git apply --check <patch filename> (No output)
- git apply <patch filename> (No output)
- git apply --check <patch filename> (Shows several lines of error patch does not apply, so assuming patch applied successfully?)
- run the Exact same configure command that I successfully used on code without patch applied, it starts and then after 10-15 seconds fails with error:
Info: creating super cache file C:\Qt\Static\5.12.5_build.qmake.super
Info: creating cache file C:\Qt\Static\5.12.5_build.qmake.cache
ERROR: Unknown command line option '-commercial'.
'-commercial' is the first argument after configure, if I remove commerical, then it fails showing the next argument in error message "-static".
if you want to apply patches, you should not download the source zip file, but rather build Qt directly from Git.