summaryrefslogtreecommitdiffstats
path: root/kandy/src/modem.cpp
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 /kandy/src/modem.cpp
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 'kandy/src/modem.cpp')
-rw-r--r--kandy/src/modem.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kandy/src/modem.cpp b/kandy/src/modem.cpp
index 3341ad589..a7d246950 100644
--- a/kandy/src/modem.cpp
+++ b/kandy/src/modem.cpp
@@ -40,7 +40,7 @@
#include <pwd.h>
#include <errno.h>
-#include <qglobal.h>
+#include <tqglobal.h>
#include <klocale.h>
#include <kdebug.h>
@@ -74,16 +74,16 @@
-Modem::Modem( KandyPrefs *kprefs, QObject *parent, const char *name ) :
- QObject(parent, name)
+Modem::Modem( KandyPrefs *kprefs, TQObject *parent, const char *name ) :
+ TQObject(parent, name)
{
mOpen = false;
prefs = kprefs;
- timer = new QTimer( this, "modemtimer" );
+ timer = new TQTimer( this, "modemtimer" );
Q_CHECK_PTR( timer );
- connect( timer, SIGNAL( timeout() ), SLOT( timerDone() ) );
+ connect( timer, TQT_SIGNAL( timeout() ), TQT_SLOT( timerDone() ) );
init();
xreset();
@@ -191,7 +191,7 @@ bool Modem::open()
if ( !lockDevice() )
return false;
- QCString dev = QFile::encodeName( (*prefs).serialDevice() );
+ TQCString dev = TQFile::encodeName( (*prefs).serialDevice() );
const char *fdev = dev.data();
if ( ( fd = ::open( fdev, O_RDWR | O_NOCTTY | O_NONBLOCK ) ) == -1 ) {
emit errorMessage( i18n( "Unable to open device '%1'. "
@@ -226,10 +226,10 @@ bool Modem::open()
return false;
}
- sn = new QSocketNotifier( fd, QSocketNotifier::Read, this,
+ sn = new TQSocketNotifier( fd, TQSocketNotifier::Read, this,
"modemsocketnotifier" );
Q_CHECK_PTR( sn );
- connect( sn, SIGNAL( activated( int ) ), SLOT( readChar( int ) ) );
+ connect( sn, TQT_SIGNAL( activated( int ) ), TQT_SLOT( readChar( int ) ) );
mOpen = true;
@@ -287,17 +287,17 @@ bool Modem::lockDevice()
pid_t pid;
int lfd;
struct passwd *pw;
- QStringList pathList;
- QString fileName, content;
+ TQStringList pathList;
+ TQString fileName, content;
- pathList = QStringList::split( "/", (*prefs).serialDevice() );
+ pathList = TQStringList::split( "/", (*prefs).serialDevice() );
fileName = (*prefs).lockDirectory() + "/LCK.." + pathList.last();
- if ( !access( QFile::encodeName( fileName ).data(), F_OK ) ) {
+ if ( !access( TQFile::encodeName( fileName ).data(), F_OK ) ) {
char buf[256];
- if ( ( lfd = ::open( QFile::encodeName( fileName ), O_RDONLY ) ) < 0 ) {
+ if ( ( lfd = ::open( TQFile::encodeName( fileName ), O_RDONLY ) ) < 0 ) {
emit errorMessage( i18n( "Unable to open lock file '%1'.")
.arg( fileName ) );
return false;
@@ -333,7 +333,7 @@ bool Modem::lockDevice()
}
}
- if ( ( lfd = creat( QFile::encodeName( fileName ).data(), 0644 ) ) == -1 ) {
+ if ( ( lfd = creat( TQFile::encodeName( fileName ).data(), 0644 ) ) == -1 ) {
emit errorMessage( i18n( "Unable to create lock file '%1'. "
"Please check that you have sufficient permissions.")
.arg( fileName ) );
@@ -343,7 +343,7 @@ bool Modem::lockDevice()
pid = (int) getpid();
pw = getpwuid( getuid() );
content.sprintf( "%08d %s %s", pid, "kandy", pw->pw_name );
- write( lfd, QFile::encodeName( content ).data(), content.length() );
+ write( lfd, TQFile::encodeName( content ).data(), content.length() );
::close( lfd );
is_locked = true;
@@ -359,9 +359,9 @@ void Modem::unlockDevice()
dev_unlock( (*prefs).serialDevice().local8Bit(), getpid() );
#else
if ( is_locked ) {
- QStringList pathList = QStringList::split( "/", (*prefs).serialDevice() );
+ TQStringList pathList = TQStringList::split( "/", (*prefs).serialDevice() );
- QFile::remove( (*prefs).lockDirectory() + "/LCK.." + pathList.last() );
+ TQFile::remove( (*prefs).lockDirectory() + "/LCK.." + pathList.last() );
is_locked = false;
}
#endif
@@ -438,7 +438,7 @@ void Modem::timerStart( int msec )
void Modem::receiveXModem( bool crc )
{
disconnect( sn, 0, this, 0 );
- connect( sn, SIGNAL( activated( int ) ), SLOT( readXChar( int ) ) );
+ connect( sn, TQT_SIGNAL( activated( int ) ), TQT_SLOT( readXChar( int ) ) );
xcrc = crc;
@@ -664,7 +664,7 @@ void Modem::xreset()
if ( sn ) {
disconnect( sn, 0, this, 0 );
- connect( sn, SIGNAL( activated( int ) ), SLOT( readChar( int ) ) );
+ connect( sn, TQT_SIGNAL( activated( int ) ), TQT_SLOT( readChar( int ) ) );
}
}