summaryrefslogtreecommitdiffstats
path: root/src/kernel/qclipboard_x11.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-28 22:31:39 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-28 22:31:39 -0600
commit41bb408dde90e755b07cd2ab8a9bdec7548c84b0 (patch)
tree6d4d5407c000add30aa78630e009c0e5d633e440 /src/kernel/qclipboard_x11.cpp
parent1740cd279522c060e738bbbffacab83355d2b794 (diff)
downloadtqt3-41bb408dde90e755b07cd2ab8a9bdec7548c84b0.tar.gz
tqt3-41bb408dde90e755b07cd2ab8a9bdec7548c84b0.zip
Automated conversion from qt3
Diffstat (limited to 'src/kernel/qclipboard_x11.cpp')
-rw-r--r--src/kernel/qclipboard_x11.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/kernel/qclipboard_x11.cpp b/src/kernel/qclipboard_x11.cpp
index 32f428fcf..b80e86987 100644
--- a/src/kernel/qclipboard_x11.cpp
+++ b/src/kernel/qclipboard_x11.cpp
@@ -42,15 +42,15 @@
// #define TQCLIPBOARD_DEBUG_VERBOSE
#ifdef TQCLIPBOARD_DEBUG
-# define TQDEBUG qDebug
+# define TQDEBUG tqDebug
#else
-# define TQDEBUG if (FALSE) qDebug
+# define TQDEBUG if (FALSE) tqDebug
#endif
#ifdef TQCLIPBOARD_DEBUG_VERBOSE
-# define VTQDEBUG qDebug
+# define VTQDEBUG tqDebug
#else
-# define VTQDEBUG if (FALSE) qDebug
+# define VTQDEBUG if (FALSE) tqDebug
#endif
#include "qplatformdefs.h"
@@ -85,9 +85,9 @@
// from qapplication_x11.cpp
typedef int (*QX11EventFilter) (XEvent*);
-extern QX11EventFilter qt_set_x11_event_filter (QX11EventFilter filter);
+extern QX11EventFilter tqt_set_x11_event_filter (QX11EventFilter filter);
-extern Time qt_x_time; // def. in qapplication_x11.cpp
+extern Time tqt_x_time; // def. in qapplication_x11.cpp
extern Time qt_x_incr; // def. in qapplication_x11.cpp
extern Atom qt_xa_clipboard;
extern Atom qt_selection_property;
@@ -112,7 +112,7 @@ static int pending_timer_id = 0;
static bool pending_clipboard_changed = FALSE;
static bool pending_selection_changed = FALSE;
-Q_EXPORT bool qt_qclipboard_bailout_hack = false;
+Q_EXPORT bool tqt_qclipboard_bailout_hack = false;
// event capture mechanism for qt_xclb_wait_for_event
static bool waiting_for_data = FALSE;
@@ -140,7 +140,7 @@ void setupOwner()
return;
owner = new TQWidget( 0, "internal clipboard owner" );
requestor = new TQWidget(0, "internal clipboard requestor");
- qAddPostRoutine( cleanup );
+ tqAddPostRoutine( cleanup );
}
static
@@ -239,7 +239,7 @@ static TQClipboardData *clipboardData()
if ( internalCbData == 0 ) {
internalCbData = new TQClipboardData;
TQ_CHECK_PTR( internalCbData );
- qAddPostRoutine( cleanupClipboardData );
+ tqAddPostRoutine( cleanupClipboardData );
}
return internalCbData;
}
@@ -261,7 +261,7 @@ static TQClipboardData *selectionData()
if (internalSelData == 0) {
internalSelData = new TQClipboardData;
TQ_CHECK_PTR(internalSelData);
- qAddPostRoutine(cleanupSelectionData);
+ tqAddPostRoutine(cleanupSelectionData);
}
return internalSelData;
}
@@ -306,7 +306,7 @@ static int qt_xclb_transation_event_handler(XEvent *event)
*/
static void qt_xclb_incr_timeout(void)
{
- qWarning("TQClipboard: timed out while sending data");
+ tqWarning("TQClipboard: timed out while sending data");
while (transactions)
delete *transactions->begin();
@@ -323,7 +323,7 @@ TQClipboardINCRTransaction::TQClipboardINCRTransaction(Window w, Atom p, Atom t,
if (! transactions) {
VTQDEBUG("TQClipboard: created INCR transaction map");
transactions = new TransactionMap;
- prev_x11_event_filter = qt_set_x11_event_filter(qt_xclb_transation_event_handler);
+ prev_x11_event_filter = tqt_set_x11_event_filter(qt_xclb_transation_event_handler);
incr_timer_id = TQApplication::clipboard()->startTimer(clipboard_timeout);
}
@@ -341,7 +341,7 @@ TQClipboardINCRTransaction::~TQClipboardINCRTransaction(void)
VTQDEBUG("TQClipboard: no more INCR transations");
delete transactions;
transactions = 0;
- (void)qt_set_x11_event_filter(prev_x11_event_filter);
+ (void)tqt_set_x11_event_filter(prev_x11_event_filter);
if (incr_timer_id != 0) {
TQApplication::clipboard()->killTimer(incr_timer_id);
@@ -482,19 +482,19 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
if (tqApp->eventLoop()->inherits("TQMotif")) { // yes yes, evil hack, we know
if ( waiting_for_data )
- qFatal( "TQClipboard: internal error, qt_xclb_wait_for_event recursed" );
+ tqFatal( "TQClipboard: internal error, qt_xclb_wait_for_event recursed" );
waiting_for_data = TRUE;
has_captured_event = FALSE;
capture_event_win = win;
capture_event_type = type;
- QX11EventFilter old_event_filter = qt_set_x11_event_filter(qt_xclb_event_filter);
+ QX11EventFilter old_event_filter = tqt_set_x11_event_filter(qt_xclb_event_filter);
do {
if ( XCheckTypedWindowEvent(dpy,win,type,event) ) {
waiting_for_data = FALSE;
- qt_set_x11_event_filter(old_event_filter);
+ tqt_set_x11_event_filter(old_event_filter);
return TRUE;
}
@@ -510,13 +510,13 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
if ( has_captured_event ) {
waiting_for_data = FALSE;
*event = captured_event;
- qt_set_x11_event_filter(old_event_filter);
+ tqt_set_x11_event_filter(old_event_filter);
return TRUE;
}
} while ( started.msecsTo(now) < timeout );
waiting_for_data = FALSE;
- qt_set_x11_event_filter(old_event_filter);
+ tqt_set_x11_event_filter(old_event_filter);
return FALSE;
}
@@ -525,7 +525,7 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
do {
if ( XCheckTypedWindowEvent(dpy,win,type,event) )
return TRUE;
- if( qt_qclipboard_bailout_hack ) {
+ if( tqt_qclipboard_bailout_hack ) {
XEvent dummy;
selection_request_pending = false;
if ( owner != NULL )
@@ -1061,7 +1061,7 @@ bool TQClipboard::event( TQEvent *e )
}
} else {
#ifdef QT_CHECK_STATE
- qWarning("TQClipboard: Unknown SelectionClear event received.");
+ tqWarning("TQClipboard: Unknown SelectionClear event received.");
#endif
return FALSE;
}
@@ -1110,7 +1110,7 @@ bool TQClipboard::event( TQEvent *e )
d = clipboardData();
} else {
#ifdef QT_CHECK_RANGE
- qWarning("TQClipboard: unknown selection '%lx'", req->selection);
+ tqWarning("TQClipboard: unknown selection '%lx'", req->selection);
#endif // QT_CHECK_RANGE
XSendEvent(dpy, req->requestor, False, NoEventMask, &event);
@@ -1119,7 +1119,7 @@ bool TQClipboard::event( TQEvent *e )
if (! d->source()) {
#ifdef QT_CHECK_STATE
- qWarning("TQClipboard: cannot transfer data, no data available");
+ tqWarning("TQClipboard: cannot transfer data, no data available");
#endif // QT_CHECK_STATE
XSendEvent(dpy, req->requestor, False, NoEventMask, &event);
@@ -1190,7 +1190,7 @@ bool TQClipboard::event( TQEvent *e )
} else {
#ifdef QT_CHECK_STATE
- qWarning("TQClipboard: invalid data timestamp");
+ tqWarning("TQClipboard: invalid data timestamp");
#endif // QT_CHECK_STATE
}
} else if (target == xa_targets) {
@@ -1262,7 +1262,7 @@ TQClipboardWatcher::TQClipboardWatcher( TQClipboard::Mode mode )
#ifdef QT_CHECK_RANGE
default:
- qWarning( "TQClipboardWatcher: internal error, unknown clipboard mode" );
+ tqWarning( "TQClipboardWatcher: internal error, unknown clipboard mode" );
break;
#endif // QT_CHECK_RANGE
}
@@ -1285,7 +1285,7 @@ bool TQClipboardWatcher::empty() const
#ifdef QT_CHECK_STATE
if( win == requestor->winId()) {
- qWarning( "TQClipboardWatcher::empty: internal error, app owns the selection" );
+ tqWarning( "TQClipboardWatcher::empty: internal error, app owns the selection" );
return TRUE;
}
#endif // QT_CHECK_STATE
@@ -1371,10 +1371,10 @@ TQByteArray TQClipboardWatcher::encodedData( const char* fmt ) const
Atom fmtatom = 0;
- if ( 0==qstricmp(fmt,"text/plain;charset=iso-8859-1") ) {
+ if ( 0==tqstricmp(fmt,"text/plain;charset=iso-8859-1") ) {
// ICCCM section 2.6.2 says STRING is latin1 text
fmtatom = XA_STRING;
- } else if ( 0==qstricmp(fmt,"text/plain;charset=utf-8") ) {
+ } else if ( 0==tqstricmp(fmt,"text/plain;charset=utf-8") ) {
// proprosed UTF8_STRING conversion type
fmtatom = *qt_xdnd_str_to_atom( "UTF8_STRING" );
} else if ( 0==qstrcmp(fmt,"text/plain") ) {
@@ -1432,7 +1432,7 @@ TQByteArray TQClipboardWatcher::getDataInFormat(Atom fmtatom) const
XSelectInput(dpy, win, NoEventMask); // don't listen for any events
XDeleteProperty(dpy, win, qt_selection_property);
- XConvertSelection(dpy, atom, fmtatom, qt_selection_property, win, qt_x_time);
+ XConvertSelection(dpy, atom, fmtatom, qt_selection_property, win, tqt_x_time);
XSync(dpy, FALSE);
VTQDEBUG("TQClipboardWatcher::getDataInFormat: waiting for SelectionNotify event");
@@ -1476,7 +1476,7 @@ TQMimeSource* TQClipboard::data( Mode mode ) const
default:
#ifdef QT_CHECK_RANGE
- qWarning( "TQClipboard::data: invalid mode '%d'", mode );
+ tqWarning( "TQClipboard::data: invalid mode '%d'", mode );
#endif // QT_CHECK_RANGE
return 0;
}
@@ -1526,7 +1526,7 @@ void TQClipboard::setData( TQMimeSource* src, Mode mode )
default:
#ifdef QT_CHECK_RANGE
- qWarning( "TQClipboard::data: invalid mode '%d'", mode );
+ tqWarning( "TQClipboard::data: invalid mode '%d'", mode );
#endif // QT_CHECK_RANGE
return;
}
@@ -1543,12 +1543,12 @@ void TQClipboard::setData( TQMimeSource* src, Mode mode )
newOwner = owner->winId();
d->setSource(src);
- d->timestamp = qt_x_time;
+ d->timestamp = tqt_x_time;
}
Window prevOwner = XGetSelectionOwner( dpy, atom );
- // use qt_x_time, since d->timestamp == CurrentTime when clearing
- XSetSelectionOwner(dpy, atom, newOwner, qt_x_time);
+ // use tqt_x_time, since d->timestamp == CurrentTime when clearing
+ XSetSelectionOwner(dpy, atom, newOwner, tqt_x_time);
if ( mode == Selection )
emit selectionChanged();
@@ -1557,7 +1557,7 @@ void TQClipboard::setData( TQMimeSource* src, Mode mode )
if (XGetSelectionOwner(dpy, atom) != newOwner) {
#ifdef QT_CHECK_STATE
- qWarning("TQClipboard::setData: Cannot set X11 selection owner for %s",
+ tqWarning("TQClipboard::setData: Cannot set X11 selection owner for %s",
qt_xdnd_atom_to_str(atom));
#endif // QT_CHECK_STATE