diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
commit | f7e71d47719ab6094cf4a9fafffa5ea351973522 (patch) | |
tree | 30834aa632d442019e14f88685001d94657d060b /kdecore/kclipboard.cpp | |
parent | b31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff) | |
download | tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip |
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems
with dependent modules such as kdebase. If it does then it needs to be fixed!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/kclipboard.cpp')
-rw-r--r-- | kdecore/kclipboard.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kdecore/kclipboard.cpp b/kdecore/kclipboard.cpp index 50073cc6a..244b43541 100644 --- a/kdecore/kclipboard.cpp +++ b/kdecore/kclipboard.cpp @@ -38,7 +38,7 @@ * especially the second one. */ -class KClipboardSynchronizer::MimeSource : public QMimeSource +class KClipboardSynchronizer::MimeSource : public TQMimeSource { public: MimeSource( const TQMimeSource * src ) @@ -56,7 +56,7 @@ public: while ( (format = src->format( i++ )) ) { byteArray = new TQByteArray(); - *byteArray = src->encodedData( format ).copy(); + *byteArray = src->tqencodedData( format ).copy(); m_data.append( byteArray ); m_formats.append( format ); } @@ -72,11 +72,11 @@ public: return 0L; } virtual bool provides( const char *mimeType ) const { - return ( m_formats.find( mimeType ) > -1 ); + return ( m_formats.tqfind( mimeType ) > -1 ); } - virtual TQByteArray encodedData( const char *format ) const + virtual TQByteArray tqencodedData( const char *format ) const { - int index = m_formats.find( format ); + int index = m_formats.tqfind( format ); if ( index > -1 ) return *(m_data.at( index )); @@ -97,7 +97,7 @@ bool KClipboardSynchronizer::s_blocked = false; KClipboardSynchronizer * KClipboardSynchronizer::self() { if ( !s_self ) - s_self = new KClipboardSynchronizer( kapp, "KDE Clipboard" ); + s_self = new KClipboardSynchronizer( TQT_TQOBJECT(kapp), "KDE Clipboard" ); return s_self; } @@ -123,7 +123,7 @@ KClipboardSynchronizer::~KClipboardSynchronizer() void KClipboardSynchronizer::setupSignals() { - QClipboard *clip = TQApplication::clipboard(); + TQClipboard *clip = TQApplication::tqclipboard(); disconnect( clip, NULL, this, NULL ); if( s_sync ) connect( clip, TQT_SIGNAL( selectionChanged() ), @@ -135,43 +135,43 @@ void KClipboardSynchronizer::setupSignals() void KClipboardSynchronizer::slotSelectionChanged() { - QClipboard *clip = TQApplication::clipboard(); + TQClipboard *clip = TQApplication::tqclipboard(); // qDebug("*** sel changed: %i", s_blocked); if ( s_blocked || !clip->ownsSelection() ) return; - setClipboard( new MimeSource( clip->data( QClipboard::Selection) ), - QClipboard::Clipboard ); + setClipboard( new MimeSource( clip->data( TQClipboard::Selection) ), + TQClipboard::Clipboard ); } void KClipboardSynchronizer::slotClipboardChanged() { - QClipboard *clip = TQApplication::clipboard(); + TQClipboard *clip = TQApplication::tqclipboard(); // qDebug("*** clip changed : %i (implicit: %i, ownz: clip: %i, selection: %i)", s_blocked, s_implicitSelection, clip->ownsClipboard(), clip->ownsSelection()); if ( s_blocked || !clip->ownsClipboard() ) return; - setClipboard( new MimeSource( clip->data( QClipboard::Clipboard ) ), - QClipboard::Selection ); + setClipboard( new MimeSource( clip->data( TQClipboard::Clipboard ) ), + TQClipboard::Selection ); } -void KClipboardSynchronizer::setClipboard( TQMimeSource *data, QClipboard::Mode mode ) +void KClipboardSynchronizer::setClipboard( TQMimeSource *data, TQClipboard::Mode mode ) { // qDebug("---> setting clipboard: %p", data); - QClipboard *clip = TQApplication::clipboard(); + TQClipboard *clip = TQApplication::tqclipboard(); s_blocked = true; - if ( mode == QClipboard::Clipboard ) + if ( mode == TQClipboard::Clipboard ) { - clip->setData( data, QClipboard::Clipboard ); + clip->setData( data, TQClipboard::Clipboard ); } - else if ( mode == QClipboard::Selection ) + else if ( mode == TQClipboard::Selection ) { - clip->setData( data, QClipboard::Selection ); + clip->setData( data, TQClipboard::Selection ); } s_blocked = false; |