Qt 4.8
Classes | Functions | Variables
qclipboard_mac.cpp File Reference
#include "qclipboard.h"
#include "qapplication.h"
#include "qbitmap.h"
#include "qdatetime.h"
#include "qdebug.h"
#include "qapplication_p.h"
#include <private/qt_mac_p.h>
#include "qevent.h"
#include "qurl.h"
#include <stdlib.h>
#include <string.h>
#include "qt_cocoa_helpers_mac_p.h"

Go to the source code of this file.

Classes

class  QMacMimeData
 
class  QMacPasteboardMimeSource
 

Functions

static void qt_mac_cleanupPasteboard ()
 
static QMacPasteboardqt_mac_pasteboard (QClipboard::Mode mode)
 
static bool qt_mac_updateScrap (QClipboard::Mode mode)
 

Variables

static QMacPasteboardqt_mac_pasteboards [2] = {0, 0}
 

Function Documentation

◆ qt_mac_cleanupPasteboard()

static void qt_mac_cleanupPasteboard ( )
static

Definition at line 81 of file qclipboard_mac.cpp.

Referenced by qt_mac_updateScrap().

81  {
82  delete qt_mac_pasteboards[0];
83  delete qt_mac_pasteboards[1];
84  qt_mac_pasteboards[0] = 0;
85  qt_mac_pasteboards[1] = 0;
86 }
static QMacPasteboard * qt_mac_pasteboards[2]

◆ qt_mac_pasteboard()

static QMacPasteboard* qt_mac_pasteboard ( QClipboard::Mode  mode)
inlinestatic

Definition at line 72 of file qclipboard_mac.cpp.

Referenced by QClipboard::clear(), QClipboard::mimeData(), qt_mac_updateScrap(), and QClipboard::setMimeData().

73 {
75  if (mode == QClipboard::Clipboard)
76  return qt_mac_pasteboards[0];
77  else
78  return qt_mac_pasteboards[1];
79 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
static QMacPasteboard * qt_mac_pasteboards[2]

◆ qt_mac_updateScrap()

static bool qt_mac_updateScrap ( QClipboard::Mode  mode)
static

Definition at line 88 of file qclipboard_mac.cpp.

Referenced by QClipboard::clear(), QClipboard::event(), QClipboard::mimeData(), and QClipboard::setMimeData().

89 {
90  if(!qt_mac_pasteboards[0]) {
91  qt_mac_pasteboards[0] = new QMacPasteboard(kPasteboardClipboard, QMacPasteboardMime::MIME_CLIP);
94  return true;
95  }
96  return qt_mac_pasteboard(mode)->sync();
97 }
static QMacPasteboard * qt_mac_pasteboards[2]
static void qt_mac_cleanupPasteboard()
static QMacPasteboard * qt_mac_pasteboard(QClipboard::Mode mode)
bool sync() const
void qAddPostRoutine(QtCleanUpFunction ptr)
Adds a global routine that will be called from the QApplication destructor.

Variable Documentation

◆ qt_mac_pasteboards

QMacPasteboard* qt_mac_pasteboards[2] = {0, 0}
static

Definition at line 70 of file qclipboard_mac.cpp.