summaryrefslogtreecommitdiffstats
path: root/kdat/TapeDrive.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
commitb09bffed6b43262948018dfb0f11890850ddf7c1 (patch)
tree138696bfcc7ac01070d0e8ecaa1cdf94611a2bd8 /kdat/TapeDrive.cpp
parent6d43944a7130b9d1b4ae3fba37b774aced8612cf (diff)
downloadtdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.tar.gz
tdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.zip
TQt4 port kdeadmin
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1237416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdat/TapeDrive.cpp')
-rw-r--r--kdat/TapeDrive.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/kdat/TapeDrive.cpp b/kdat/TapeDrive.cpp
index 2e4c59b..4fbcb25 100644
--- a/kdat/TapeDrive.cpp
+++ b/kdat/TapeDrive.cpp
@@ -170,15 +170,15 @@ bool TapeDrive::isTapePresent()
}
// Get tape status.
- struct mtget tapeStatus;
- int ret = ioctl( _fd, MTIOCGET, &tapeStatus );
+ struct mtget tapetqStatus;
+ int ret = ioctl( _fd, MTIOCGET, &tapetqStatus );
if ( ret < 0 ) {
return FALSE;
}
// Check for the presence of a tape.
-// if ( !GMT_DR_OPEN( tapeStatus.mt_gstat ) ) {
- if ( GMT_ONLINE( tapeStatus.mt_gstat ) ) {
+// if ( !GMT_DR_OPEN( tapetqStatus.mt_gstat ) ) {
+ if ( GMT_ONLINE( tapetqStatus.mt_gstat ) ) {
// Lock the tape drive door.
//struct mtop tapeOp;
//tapeOp.mt_op = MTLOCK;
@@ -189,9 +189,9 @@ bool TapeDrive::isTapePresent()
//}
if ( _readOnly ) {
- emit sigStatus( i18n( "Tape mounted readonly." ) );
+ emit sigtqStatus( i18n( "Tape mounted readonly." ) );
} else {
- emit sigStatus( i18n( "Tape mounted read/write." ) );
+ emit sigtqStatus( i18n( "Tape mounted read/write." ) );
}
return TRUE;
} else {
@@ -221,14 +221,14 @@ Tape* TapeDrive::readHeader()
_tape = NULL;
// Rewind tape.
- emit sigStatus( "Rewinding tape..." );
+ emit sigtqStatus( "Rewinding tape..." );
if ( !rewind() ) {
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Rewinding tape failed." ));
return NULL;
}
// KDat magic string.
- emit sigStatus( i18n( "Reading magic string..." ) );
+ emit sigtqStatus( i18n( "Reading magic string..." ) );
char magic[9];
if ( read( magic, 9 ) < 9 ) {
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading magic string failed." ));
@@ -240,7 +240,7 @@ Tape* TapeDrive::readHeader()
}
// Read version number.
- emit sigStatus( i18n( "Reading version number..." ) );
+ emit sigtqStatus( i18n( "Reading version number..." ) );
int version;
if ( read( (char*)&version, 4 ) < 4 ) {
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading version number failed." ));
@@ -252,7 +252,7 @@ Tape* TapeDrive::readHeader()
}
// Read tape ID.
- emit sigStatus( i18n( "Reading tape ID..." ) );
+ emit sigtqStatus( i18n( "Reading tape ID..." ) );
int len;
if ( read( (char*)&len, 4 ) < 4 ) {
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading tape ID length failed." ));
@@ -517,12 +517,12 @@ bool TapeDrive::seek( int file, int tarBlock )
flush();
// Go to the desired archive.
- emit sigStatus( i18n( "Skipping to archive..." ) );
+ emit sigtqStatus( i18n( "Skipping to archive..." ) );
int curFile = getFile();
// printf( "TapeDrive::seek() -- curFile = %d\n", curFile );
if ( curFile < 0 ) {
- emit sigStatus( i18n( "Rewinding tape..." ) );
+ emit sigtqStatus( i18n( "Rewinding tape..." ) );
rewind();
curFile = 0;
}
@@ -539,11 +539,11 @@ bool TapeDrive::seek( int file, int tarBlock )
// printf( "TapeDrive::seek() -- desired tapeBlock = %d\n", tapeBlock );
// Go to the desired record within the archive.
- emit sigStatus( i18n( "Skipping to block..." ) );
+ emit sigtqStatus( i18n( "Skipping to block..." ) );
int curBlock = getBlock();
// printf( "TapeDrive::seek() -- curBlock = %d\n", curBlock );
if ( curBlock < 0 ) {
- emit sigStatus( i18n( "Rewinding tape..." ) );
+ emit sigtqStatus( i18n( "Rewinding tape..." ) );
rewind();
nextFile( file );
if ( ( curBlock = getBlock() ) < 0 ) {
@@ -597,13 +597,13 @@ bool TapeDrive::pastEOF()
return FALSE;
}
- struct mtget tapeStatus;
- if ( ioctl( _fd, MTIOCGET, &tapeStatus ) < 0 ) {
+ struct mtget tapetqStatus;
+ if ( ioctl( _fd, MTIOCGET, &tapetqStatus ) < 0 ) {
printf( "TapeDrive::pastEOF() -- ioctl( MTIOCGET ) failed!\n" );
return FALSE;
}
- return GMT_EOF( tapeStatus.mt_gstat );
+ return GMT_EOF( tapetqStatus.mt_gstat );
}
bool TapeDrive::setBlockSize( int blockSize )