Replace an OS X-only temporary file hack. #4606

pull droark wants to merge 1 commits into bitcoin:master from droark:macmod changing 1 files +8 −8
  1. droark commented at 8:07 PM on July 30, 2014: contributor

    Replace the temporary file hack currently used to change Bitcoin-Qt's dock icon (OS X) with a buffer-based solution.

  2. Replace the temporary file hack currently used to change Bitcoin-Qt's dock icon (OS X) with a buffer-based solution. bd0aa10519
  3. BitcoinPullTester commented at 8:20 PM on July 30, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4606_bd0aa105198d3cc12751dc4645877af70cac6258/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  4. laanwj added the label Mac on Jul 31, 2014
  5. laanwj added the label GUI on Jul 31, 2014
  6. laanwj commented at 7:44 AM on July 31, 2014: member

    @theuni can you do a test run with this on MacOSX when you have some time?

  7. droark commented at 2:08 PM on July 31, 2014: contributor

    Actually, looking through the code a bit more, I found the hack in at least one other piece of code. I'm going to fix it later today and will submit a revised pull request at that time. In the meantime, feel free to look at what I've already posted. I have no plans to revise it unless somebody makes a request.

    EDIT: After looking at the code more closely, the only other QTemporaryFile instance deals with Growl (an OS X notification system). I don't know enough about Growl to know if the string that mentions the file's location is important. So, for now at least, I'll leave alone my pull request.

  8. theuni commented at 6:25 PM on July 31, 2014: member

    will do.

  9. theuni commented at 6:51 PM on July 31, 2014: member

    Any reason for not using icon.pixmap().toMacCGImageRef() and cutting out the middle-man ?

  10. droark commented at 7:25 PM on July 31, 2014: contributor

    Not really. I'm happy to give that a shot and revise the request.

    EDIT: Actually, I take that back. Looking at the documentation, it looks like that call was removed from Qt5. As I understand things from pull request #2721, Bitcoin-Qt is supposed to be compatible with Qt4 and Qt5. In fact, that's the pull request where this particular code was committed in the first place. I suppose I could use a Qt4/Qt5 switch and see what happens.

  11. droark commented at 9:05 PM on July 31, 2014: contributor

    Okay. After doing some more digging, I think the patch should stay as is. The QPixmap::toMacCGImageRef() call was pulled from Qt5 and appears to have been reinstated in Qt5.2 as QtMac::toCGImageRef(). (See http://qt-project.org/doc/qt-5/qtmac.html for more info.) Writing a patch with three paths (Qt4, Qt5.0/5.1, and Qt5.2+) seems a bit silly when we already have a path that should work across Qt4 & Qt5.

  12. laanwj commented at 5:49 AM on August 1, 2014: member

    @droark Agreed. Instead of three #ifdef paths where this solution is used in a subset of qt versions, it's better to just use it for all so that it gets testing.

  13. theuni commented at 4:23 PM on August 1, 2014: member

    ACK. Works fine on 10.9.

    We'll likely not be using QT < 5.2 for OSX at any point in the future, but there may be a few devs still building against it. At some point we can remove this and use the platform API if we stumble upon it again.

  14. fanquake commented at 7:35 AM on August 2, 2014: member

    ACK

  15. laanwj merged this on Aug 4, 2014
  16. laanwj closed this on Aug 4, 2014

  17. laanwj referenced this in commit 8d0d512bde on Aug 4, 2014
  18. droark deleted the branch on Aug 14, 2014
  19. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me