Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to apply patch .diff file?
Forum Updated to NodeBB v4.3 + New Features

How to apply patch .diff file?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 3 Posters 1.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Taytoo
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      T 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        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.

        T Offline
        T Offline
        Taytoo
        wrote on last edited by Taytoo
        #3

        @SGaist I've been trying to apply the patch as below:

        1. Download and unzip Qt Source code in folder 5.12.5
        2. cd to 5.12.5\qtbase
        3. git init
        4. git add . (I see lots of LF -> CRLF warning message)
        5. git apply --stat <patch filename> (Shows several lines of changes)
        6. git apply --check <patch filename> (No output)
        7. git apply <patch filename> (No output)
        8. git apply --check <patch filename> (Shows several lines of error patch does not apply, so assuming patch applied successfully?)
        9. 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".

        aha_1980A 1 Reply Last reply
        0
        • T Taytoo

          @SGaist I've been trying to apply the patch as below:

          1. Download and unzip Qt Source code in folder 5.12.5
          2. cd to 5.12.5\qtbase
          3. git init
          4. git add . (I see lots of LF -> CRLF warning message)
          5. git apply --stat <patch filename> (Shows several lines of changes)
          6. git apply --check <patch filename> (No output)
          7. git apply <patch filename> (No output)
          8. git apply --check <patch filename> (Shows several lines of error patch does not apply, so assuming patch applied successfully?)
          9. 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".

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi @Taytoo,

          if you want to apply patches, you should not download the source zip file, but rather build Qt directly from Git.

          Regards

          Qt has to stay free or it will die.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved