summaryrefslogtreecommitdiffstats
path: root/kandy/src/modem.cpp
diff options
context:
space:
mode:
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 ) ) );
}
}