Remove workaround for potentially unavailable pasteboard in macOS
This was added in 2006 (when Tiger was the latest version of macOS) in order to work around an issue where the pasteboard would not be available when running under a non-graphical session. The latest supported version of macOS is currently 10.10 on which this is not expected to be an issue, so this workaround and therefore the Carbon dependency can be removed. Change-Id: Id5ed0a7e531dda71ce461c8bbbaebd5d4cadbd0e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>bb10
parent
c1058cfd7b
commit
b181da9885
|
|
@ -31,22 +31,12 @@
|
|||
|
||||
#include <qglobal.h>
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
#include <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
struct PlatformClipboard
|
||||
{
|
||||
static inline bool isAvailable()
|
||||
{
|
||||
#if defined(QT_NO_CLIPBOARD)
|
||||
return false;
|
||||
#elif defined(Q_OS_OSX)
|
||||
PasteboardRef pasteboard;
|
||||
OSStatus status = PasteboardCreate(0, &pasteboard);
|
||||
if (status == noErr)
|
||||
CFRelease(pasteboard);
|
||||
return status == noErr;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue