summaryrefslogtreecommitdiffstats
path: root/klipper
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-02 02:13:02 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-02 02:13:02 -0600
commit8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96 (patch)
treebf71d4bfa94d0561e80456400ae5fe2bb501fbd8 /klipper
parente8a1cdc01d38125bea12d5494db977ae6429919a (diff)
downloadtdebase-8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96.tar.gz
tdebase-8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96.zip
Rename additional global functions and variables for tqt3
Diffstat (limited to 'klipper')
-rw-r--r--klipper/clipboardpoll.cpp24
-rw-r--r--klipper/toplevel.cpp24
-rw-r--r--klipper/urlgrabber.cpp2
3 files changed, 25 insertions, 25 deletions
diff --git a/klipper/clipboardpoll.cpp b/klipper/clipboardpoll.cpp
index 2f7ce4ddb..75d901446 100644
--- a/klipper/clipboardpoll.cpp
+++ b/klipper/clipboardpoll.cpp
@@ -71,7 +71,7 @@ ClipboardPoll::ClipboardPoll( TQWidget* parent )
"KLIPPER_SELECTION_TIMESTAMP",
"KLIPPER_CLIPBOARD_TIMESTAMP" };
Atom atoms[ 6 ];
- XInternAtoms( qt_xdisplay(), const_cast< char** >( names ), 6, False, atoms );
+ XInternAtoms( tqt_xdisplay(), const_cast< char** >( names ), 6, False, atoms );
selection.sentinel_atom = atoms[ 0 ];
clipboard.sentinel_atom = atoms[ 1 ];
xa_clipboard = atoms[ 2 ];
@@ -82,13 +82,13 @@ ClipboardPoll::ClipboardPoll( TQWidget* parent )
kapp->installX11EventFilter( this );
#ifdef HAVE_XFIXES
int dummy;
- if( XFixesQueryExtension( qt_xdisplay(), &xfixes_event_base, &dummy ))
+ if( XFixesQueryExtension( tqt_xdisplay(), &xfixes_event_base, &dummy ))
{
- XFixesSelectSelectionInput( qt_xdisplay(), qt_xrootwin( 0 ), XA_PRIMARY,
+ XFixesSelectSelectionInput( tqt_xdisplay(), tqt_xrootwin( 0 ), XA_PRIMARY,
XFixesSetSelectionOwnerNotifyMask |
XFixesSelectionWindowDestroyNotifyMask |
XFixesSelectionClientCloseNotifyMask );
- XFixesSelectSelectionInput( qt_xdisplay(), qt_xrootwin( 0 ), xa_clipboard,
+ XFixesSelectSelectionInput( tqt_xdisplay(), tqt_xrootwin( 0 ), xa_clipboard,
XFixesSetSelectionOwnerNotifyMask |
XFixesSelectionWindowDestroyNotifyMask |
XFixesSelectionClientCloseNotifyMask );
@@ -116,11 +116,11 @@ void ClipboardPoll::initPolling()
selection.atom = XA_PRIMARY;
clipboard.atom = xa_clipboard;
selection.last_change = clipboard.last_change = GET_QT_X_TIME(); // don't trigger right after startup
- selection.last_owner = XGetSelectionOwner( qt_xdisplay(), XA_PRIMARY );
+ selection.last_owner = XGetSelectionOwner( tqt_xdisplay(), XA_PRIMARY );
#ifdef NOISY_KLIPPER_
kdDebug() << "(1) Setting last_owner for =" << "selection" << ":" << selection.last_owner << endl;
#endif
- clipboard.last_owner = XGetSelectionOwner( qt_xdisplay(), xa_clipboard );
+ clipboard.last_owner = XGetSelectionOwner( tqt_xdisplay(), xa_clipboard );
#ifdef NOISY_KLIPPER_
kdDebug() << "(2) Setting last_owner for =" << "clipboard" << ":" << clipboard.last_owner << endl;
#endif
@@ -193,7 +193,7 @@ void ClipboardPoll::updateQtOwnership( SelectionData& data )
unsigned long nitems;
unsigned long after;
unsigned char* prop = NULL;
- if( XGetWindowProperty( qt_xdisplay(), qt_xrootwin( 0 ), data.sentinel_atom, 0, 2, False,
+ if( XGetWindowProperty( tqt_xdisplay(), tqt_xrootwin( 0 ), data.sentinel_atom, 0, 2, False,
XA_WINDOW, &type, &format, &nitems, &after, &prop ) != Success
|| type != XA_WINDOW || format != 32 || nitems != 2 || prop == NULL )
{
@@ -207,7 +207,7 @@ void ClipboardPoll::updateQtOwnership( SelectionData& data )
}
Window owner = reinterpret_cast< long* >( prop )[ 0 ]; // [0] is new owner, [1] is previous
XFree( prop );
- Window current_owner = XGetSelectionOwner( qt_xdisplay(), data.atom );
+ Window current_owner = XGetSelectionOwner( tqt_xdisplay(), data.atom );
data.owner_is_qt = ( owner == current_owner );
#ifdef REALLY_NOISY_KLIPPER_
kdDebug() << "owner=" << owner << "; current_owner=" << current_owner << endl;
@@ -235,7 +235,7 @@ void ClipboardPoll::timeout()
bool ClipboardPoll::checkTimestamp( SelectionData& data )
{
- Window current_owner = XGetSelectionOwner( qt_xdisplay(), data.atom );
+ Window current_owner = XGetSelectionOwner( tqt_xdisplay(), data.atom );
bool signal = false;
updateQtOwnership( data );
if( data.owner_is_qt )
@@ -269,8 +269,8 @@ bool ClipboardPoll::checkTimestamp( SelectionData& data )
// We're already waiting for the timestamp of the last check
return false;
}
- XDeleteProperty( qt_xdisplay(), winId(), data.timestamp_atom );
- XConvertSelection( qt_xdisplay(), data.atom, xa_timestamp, data.timestamp_atom, winId(), GET_QT_X_TIME() );
+ XDeleteProperty( tqt_xdisplay(), winId(), data.timestamp_atom );
+ XConvertSelection( tqt_xdisplay(), data.atom, xa_timestamp, data.timestamp_atom, winId(), GET_QT_X_TIME() );
data.waiting_for_timestamp = true;
data.waiting_x_time = GET_QT_X_TIME();
#ifdef REALLY_NOISY_KLIPPER_
@@ -300,7 +300,7 @@ bool ClipboardPoll::changedTimestamp( SelectionData& data, const XEvent& ev )
unsigned long nitems;
unsigned long after;
unsigned char* prop = NULL;
- if( XGetWindowProperty( qt_xdisplay(), winId(), ev.xselection.property, 0, 1, False,
+ if( XGetWindowProperty( tqt_xdisplay(), winId(), ev.xselection.property, 0, 1, False,
AnyPropertyType, &type, &format, &nitems, &after, &prop ) != Success
|| format != 32 || nitems != 1 || prop == NULL )
{
diff --git a/klipper/toplevel.cpp b/klipper/toplevel.cpp
index 3c75502af..712745a86 100644
--- a/klipper/toplevel.cpp
+++ b/klipper/toplevel.cpp
@@ -118,7 +118,7 @@ private:
KlipperWidget* klipper;
};
-extern bool qt_qclipboard_bailout_hack;
+extern bool tqt_qclipboard_bailout_hack;
#if KDE_IS_VERSION( 15, 0, 0 )
#error Check status of #80072 with Qt4.
#endif
@@ -135,7 +135,7 @@ KlipperWidget::KlipperWidget( TQWidget *parent, KConfig* config )
, m_pendingContentsCheck( false )
, session_managed( new KlipperSessionManaged( this ))
{
- qt_qclipboard_bailout_hack = true;
+ tqt_qclipboard_bailout_hack = true;
// We don't use the clipboardsynchronizer anymore, and it confuses Klipper
ensureGlobalSyncOff(m_config);
@@ -240,7 +240,7 @@ KlipperWidget::~KlipperWidget()
delete myURLGrabber;
if( m_config != kapp->config())
delete m_config;
- qt_qclipboard_bailout_hack = false;
+ tqt_qclipboard_bailout_hack = false;
}
void KlipperWidget::adjustSize()
@@ -1028,11 +1028,11 @@ bool KlipperWidget::ignoreClipboardChanges() const
return false;
}
-// TQClipboard uses qt_x_time as the timestamp for selection operations.
+// TQClipboard uses tqt_x_time as the timestamp for selection operations.
// It is updated mainly from user actions, but Klipper polls the clipboard
-// without any user action triggering it, so qt_x_time may be old,
+// without any user action triggering it, so tqt_x_time may be old,
// which could possibly lead to TQClipboard reporting empty clipboard.
-// Therefore, qt_x_time needs to be updated to current X server timestamp.
+// Therefore, tqt_x_time needs to be updated to current X server timestamp.
// Call KApplication::updateUserTime() only from functions that are
// called from outside (DCOP), or from TQTimer timeout !
@@ -1074,7 +1074,7 @@ static Bool update_x_time_predicate( Display*, XEvent* event, XPointer )
}
void KlipperWidget::updateTimestamp()
-{ // Qt3.3.0 and 3.3.1 use qt_x_user_time for clipboard operations
+{ // Qt3.3.0 and 3.3.1 use tqt_x_user_time for clipboard operations
Time time = ( strcmp( tqVersion(), "3.3.1" ) == 0
|| strcmp( tqVersion(), "3.3.0" ) == 0 )
? GET_QT_X_USER_TIME() : GET_QT_X_TIME();
@@ -1082,19 +1082,19 @@ void KlipperWidget::updateTimestamp()
if ( !w )
w = new TQWidget;
unsigned char data[ 1 ];
- XChangeProperty( qt_xdisplay(), w->winId(), XA_ATOM, XA_ATOM, 8, PropModeAppend, data, 1 );
+ XChangeProperty( tqt_xdisplay(), w->winId(), XA_ATOM, XA_ATOM, 8, PropModeAppend, data, 1 );
next_x_time = CurrentTime;
XEvent dummy;
- XCheckIfEvent( qt_xdisplay(), &dummy, update_x_time_predicate, NULL );
+ XCheckIfEvent( tqt_xdisplay(), &dummy, update_x_time_predicate, NULL );
if( next_x_time == CurrentTime )
{
- XSync( qt_xdisplay(), False );
- XCheckIfEvent( qt_xdisplay(), &dummy, update_x_time_predicate, NULL );
+ XSync( tqt_xdisplay(), False );
+ XCheckIfEvent( tqt_xdisplay(), &dummy, update_x_time_predicate, NULL );
}
Q_ASSERT( next_x_time != CurrentTime );
time = next_x_time;
XEvent ev; // remove the PropertyNotify event from the events queue
- XWindowEvent( qt_xdisplay(), w->winId(), PropertyChangeMask, &ev );
+ XWindowEvent( tqt_xdisplay(), w->winId(), PropertyChangeMask, &ev );
}
static const char * const description =
diff --git a/klipper/urlgrabber.cpp b/klipper/urlgrabber.cpp
index dfe5d80e5..7e2cc6bd4 100644
--- a/klipper/urlgrabber.cpp
+++ b/klipper/urlgrabber.cpp
@@ -334,7 +334,7 @@ void URLGrabber::writeConfiguration( KConfig *kc )
// digged a little bit in netwm.cpp
bool URLGrabber::isAvoidedWindow() const
{
- Display *d = qt_xdisplay();
+ Display *d = tqt_xdisplay();
static Atom wm_class = XInternAtom( d, "WM_CLASS", true );
static Atom active_window = XInternAtom( d, "_NET_ACTIVE_WINDOW", true );
Atom type_ret;