mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-28 00:16:04 +01:00
qt: Replace objc_msgSend with native syntax
This commit is contained in:
@@ -58,9 +58,10 @@
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include <objc/objc-runtime.h>
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#include <QProcess>
|
||||
|
||||
void ForceActivation();
|
||||
#endif
|
||||
|
||||
namespace GUIUtil {
|
||||
@@ -360,10 +361,7 @@ bool isObscured(QWidget *w)
|
||||
void bringToFront(QWidget* w)
|
||||
{
|
||||
#ifdef Q_OS_MAC
|
||||
// Force application activation on macOS. With Qt 5.4 this is required when
|
||||
// an action in the dock menu is triggered.
|
||||
id app = objc_msgSend((id) objc_getClass("NSApplication"), sel_registerName("sharedApplication"));
|
||||
objc_msgSend(app, sel_registerName("activateIgnoringOtherApps:"), YES);
|
||||
ForceActivation();
|
||||
#endif
|
||||
|
||||
if (w) {
|
||||
|
||||
Reference in New Issue
Block a user