summaryrefslogtreecommitdiffstats
path: root/libkdenetwork
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /libkdenetwork
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdenetwork')
-rw-r--r--libkdenetwork/gpgmepp/eventloopinteractor.h6
-rw-r--r--libkdenetwork/qgpgme/dataprovider.cpp6
-rw-r--r--libkdenetwork/qgpgme/dataprovider.h8
-rw-r--r--libkdenetwork/qgpgme/eventloopinteractor.cpp24
-rw-r--r--libkdenetwork/qgpgme/eventloopinteractor.h6
-rw-r--r--libkdenetwork/qgpgme/tests/dataprovidertest.cpp10
6 files changed, 30 insertions, 30 deletions
diff --git a/libkdenetwork/gpgmepp/eventloopinteractor.h b/libkdenetwork/gpgmepp/eventloopinteractor.h
index fb0778489..5a07490da 100644
--- a/libkdenetwork/gpgmepp/eventloopinteractor.h
+++ b/libkdenetwork/gpgmepp/eventloopinteractor.h
@@ -67,11 +67,11 @@ namespace GpgME {
and return a tag identifying that particular watching process
uniquely. This could be the index into an array of objects you
use for that purpose or the address of such an object. E.g. in
- Qt, you'd essentially just create a new \c QSocketNotifier:
+ Qt, you'd essentially just create a new \c TQSocketNotifier:
\verbatim
void * registerWatcher( int fd, Direction dir ) {
- return new QSocketNotifier( fd, dir == Read ? QSocketNotifier::Read : QSocketNotifier::Write );
+ return new TQSocketNotifier( fd, dir == Read ? TQSocketNotifier::Read : TQSocketNotifier::Write );
// misses connecting to the activated() signal...
}
\endverbatim
@@ -84,7 +84,7 @@ namespace GpgME {
\verbatim
void unregisterWatcher( void * tag ) {
- delete static_cast<QSocketNotifier*>( tag );
+ delete static_cast<TQSocketNotifier*>( tag );
}
\endverbatim
diff --git a/libkdenetwork/qgpgme/dataprovider.cpp b/libkdenetwork/qgpgme/dataprovider.cpp
index 8b3ae2857..3fe991d95 100644
--- a/libkdenetwork/qgpgme/dataprovider.cpp
+++ b/libkdenetwork/qgpgme/dataprovider.cpp
@@ -28,7 +28,7 @@
#include <assert.h>
#include <unistd.h>
-static bool resizeAndInit( QByteArray & ba, size_t newSize ) {
+static bool resizeAndInit( TQByteArray & ba, size_t newSize ) {
const size_t oldSize = ba.size();
bool ok = ba.resize( newSize );
if ( ok )
@@ -39,7 +39,7 @@ static bool resizeAndInit( QByteArray & ba, size_t newSize ) {
QGpgME::QByteArrayDataProvider::QByteArrayDataProvider()
: GpgME::DataProvider(), mOff( 0 ) {}
-QGpgME::QByteArrayDataProvider::QByteArrayDataProvider( const QByteArray & initialData )
+QGpgME::QByteArrayDataProvider::QByteArrayDataProvider( const TQByteArray & initialData )
: GpgME::DataProvider(), mArray( initialData ), mOff( 0 ) {}
QGpgME::QByteArrayDataProvider::~QByteArrayDataProvider() {}
@@ -103,5 +103,5 @@ void QGpgME::QByteArrayDataProvider::release() {
#ifndef NDEBUG
qDebug( "QGpgME::QByteArrayDataProvider::release()" );
#endif
- mArray = QByteArray();
+ mArray = TQByteArray();
}
diff --git a/libkdenetwork/qgpgme/dataprovider.h b/libkdenetwork/qgpgme/dataprovider.h
index c784fa8d9..52957afa5 100644
--- a/libkdenetwork/qgpgme/dataprovider.h
+++ b/libkdenetwork/qgpgme/dataprovider.h
@@ -23,7 +23,7 @@
#include <gpgmepp/interfaces/dataprovider.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kdepimmacros.h>
namespace QGpgME {
@@ -31,10 +31,10 @@ namespace QGpgME {
class KDE_EXPORT QByteArrayDataProvider : public GpgME::DataProvider {
public:
QByteArrayDataProvider();
- QByteArrayDataProvider( const QByteArray & initialData );
+ QByteArrayDataProvider( const TQByteArray & initialData );
~QByteArrayDataProvider();
- const QByteArray & data() const { return mArray; }
+ const TQByteArray & data() const { return mArray; }
private:
// these shall only be accessed through the dataprovider
@@ -51,7 +51,7 @@ namespace QGpgME {
void release();
private:
- QByteArray mArray;
+ TQByteArray mArray;
off_t mOff;
};
diff --git a/libkdenetwork/qgpgme/eventloopinteractor.cpp b/libkdenetwork/qgpgme/eventloopinteractor.cpp
index 40b81664e..9396385b7 100644
--- a/libkdenetwork/qgpgme/eventloopinteractor.cpp
+++ b/libkdenetwork/qgpgme/eventloopinteractor.cpp
@@ -27,18 +27,18 @@
#include <gpgmepp/context.h>
-#include <qsocketnotifier.h>
-#include <qapplication.h>
+#include <tqsocketnotifier.h>
+#include <tqapplication.h>
using namespace GpgME;
-QGpgME::EventLoopInteractor::EventLoopInteractor( QObject * parent, const char * name )
- : QObject( parent, name ), GpgME::EventLoopInteractor()
+QGpgME::EventLoopInteractor::EventLoopInteractor( TQObject * parent, const char * name )
+ : TQObject( parent, name ), GpgME::EventLoopInteractor()
{
if ( !parent )
if ( qApp ) {
- connect( qApp, SIGNAL(aboutToQuit()), SLOT(deleteLater()) );
- connect( qApp, SIGNAL(aboutToQuit()), SIGNAL(aboutToDestroy()) );
+ connect( qApp, TQT_SIGNAL(aboutToQuit()), TQT_SLOT(deleteLater()) );
+ connect( qApp, TQT_SIGNAL(aboutToQuit()), TQT_SIGNAL(aboutToDestroy()) );
}
mSelf = this;
}
@@ -54,7 +54,7 @@ QGpgME::EventLoopInteractor * QGpgME::EventLoopInteractor::instance() {
if ( !mSelf )
#ifndef NDEBUG
if ( !qApp )
- qWarning( "QGpgME::EventLoopInteractor: Need a QApplication object before calling instance()!" );
+ qWarning( "QGpgME::EventLoopInteractor: Need a TQApplication object before calling instance()!" );
else
#endif
(void)new EventLoopInteractor( 0, "QGpgME::EventLoopInteractor::instance()" );
@@ -62,18 +62,18 @@ QGpgME::EventLoopInteractor * QGpgME::EventLoopInteractor::instance() {
}
void * QGpgME::EventLoopInteractor::registerWatcher( int fd, Direction dir, bool & ok ) {
- QSocketNotifier * sn = new QSocketNotifier( fd,
- dir == Read ? QSocketNotifier::Read : QSocketNotifier::Write );
+ TQSocketNotifier * sn = new TQSocketNotifier( fd,
+ dir == Read ? TQSocketNotifier::Read : TQSocketNotifier::Write );
if ( dir == Read )
- connect( sn, SIGNAL(activated(int)), SLOT(slotReadActivity(int)) );
+ connect( sn, TQT_SIGNAL(activated(int)), TQT_SLOT(slotReadActivity(int)) );
else
- connect( sn, SIGNAL(activated(int)), SLOT(slotWriteActivity(int)) );
+ connect( sn, TQT_SIGNAL(activated(int)), TQT_SLOT(slotWriteActivity(int)) );
ok = true; // Can above operations fails?
return sn;
}
void QGpgME::EventLoopInteractor::unregisterWatcher( void * tag ) {
- delete static_cast<QSocketNotifier*>( tag );
+ delete static_cast<TQSocketNotifier*>( tag );
}
void QGpgME::EventLoopInteractor::slotWriteActivity( int socket ) {
diff --git a/libkdenetwork/qgpgme/eventloopinteractor.h b/libkdenetwork/qgpgme/eventloopinteractor.h
index 7ac264eeb..73d9a1778 100644
--- a/libkdenetwork/qgpgme/eventloopinteractor.h
+++ b/libkdenetwork/qgpgme/eventloopinteractor.h
@@ -23,7 +23,7 @@
#include <gpgmepp/eventloopinteractor.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kdepimmacros.h>
namespace GpgME {
@@ -35,10 +35,10 @@ namespace GpgME {
namespace QGpgME {
- class KDE_EXPORT EventLoopInteractor : public QObject, public GpgME::EventLoopInteractor {
+ class KDE_EXPORT EventLoopInteractor : public TQObject, public GpgME::EventLoopInteractor {
Q_OBJECT
protected:
- EventLoopInteractor( QObject * parent, const char * name=0 );
+ EventLoopInteractor( TQObject * parent, const char * name=0 );
public:
virtual ~EventLoopInteractor();
diff --git a/libkdenetwork/qgpgme/tests/dataprovidertest.cpp b/libkdenetwork/qgpgme/tests/dataprovidertest.cpp
index da87b0300..2493c5860 100644
--- a/libkdenetwork/qgpgme/tests/dataprovidertest.cpp
+++ b/libkdenetwork/qgpgme/tests/dataprovidertest.cpp
@@ -69,7 +69,7 @@ int main( int, char** ) {
assertEqual( data.write( input, inputSize ), inputSize );
- const QByteArray ba1 = qba_dp.data();
+ const TQByteArray ba1 = qba_dp.data();
assertEqual( ba1.size(), inputSize );
assertEqual( memcmp( ba1.data(), input, inputSize ), 0 );
@@ -90,7 +90,7 @@ int main( int, char** ) {
// writing single char at end:
assertEqual( data.seek( 0, SEEK_END ), inputSize );
assertEqual( data.write( &ch, 1 ) , 1 );
- const QByteArray ba2 = qba_dp.data();
+ const TQByteArray ba2 = qba_dp.data();
assertEqual( ba2.size(), inputSize + 1 );
assertEqual( memcmp( ba2.data(), input, inputSize ), 0 );
assertEqual( ba2[inputSize], ch );
@@ -98,7 +98,7 @@ int main( int, char** ) {
// writing past end of buffer:
assertEqual( data.seek( 10, SEEK_END ), inputSize + 11 );
assertEqual( data.write( &ch, 1 ), 1 );
- const QByteArray ba3 = qba_dp.data();
+ const TQByteArray ba3 = qba_dp.data();
assertEqual( ba3.size(), inputSize + 12 );
assertEqual( memcmp( ba3.data(), input, inputSize ), 0 );
assertEqual( ba3[inputSize], ch );
@@ -110,14 +110,14 @@ int main( int, char** ) {
//
// QByteArrayDataProvider with initial data:
//
- QByteArray ba;
+ TQByteArray ba;
ba.duplicate( input, inputSize );
QGpgME::QByteArrayDataProvider qba_dp( ba );
Data data( &qba_dp );
assertEqual( data.seek( 0, SEEK_END ), inputSize );
assertEqual( data.seek( 0, SEEK_SET ), 0 );
- const QByteArray ba1 = qba_dp.data();
+ const TQByteArray ba1 = qba_dp.data();
assertEqual( ba1.size(), inputSize );
assertEqual( memcmp( ba1.data(), input, inputSize ), 0 );
}