Replace the temporary file hack currently used to change Bitcoin-Qt's dock icon (OS X) with a buffer-based solution.
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-
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. bd0aa10519
-
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.
- laanwj added the label Mac on Jul 31, 2014
- laanwj added the label GUI on Jul 31, 2014
-
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.
-
theuni commented at 6:25 PM on July 31, 2014: member
will do.
-
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 ?
-
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.
-
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.
-
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.
-
fanquake commented at 7:35 AM on August 2, 2014: member
ACK
- laanwj merged this on Aug 4, 2014
- laanwj closed this on Aug 4, 2014
- laanwj referenced this in commit 8d0d512bde on Aug 4, 2014
- droark deleted the branch on Aug 14, 2014
- DrahtBot locked this on Sep 8, 2021