summaryrefslogtreecommitdiffstats
path: root/kmailcvt/filter_oe.cxx
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kmailcvt/filter_oe.cxx
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmailcvt/filter_oe.cxx')
-rw-r--r--kmailcvt/filter_oe.cxx58
1 files changed, 29 insertions, 29 deletions
diff --git a/kmailcvt/filter_oe.cxx b/kmailcvt/filter_oe.cxx
index c60eced6..fb9d552a 100644
--- a/kmailcvt/filter_oe.cxx
+++ b/kmailcvt/filter_oe.cxx
@@ -55,7 +55,7 @@ FilterOE::~FilterOE()
void FilterOE::import(FilterInfo *info)
{
// Select directory containing plain text emails
- mailDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(),info->parent());
+ mailDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(),info->tqparent());
if (mailDir.isEmpty()) { // No directory selected
info->alert(i18n("No directory selected."));
return;
@@ -167,7 +167,7 @@ void FilterOE::mbxImport( FilterInfo *info, TQDataStream& ds)
// Read the header
ds >> msgCount >> lastMsgNum >> fileSize;
- ds.device()->at( ds.device()->at() + 64 ); // Skip 0's
+ ds.tqdevice()->at( ds.tqdevice()->at() + 64 ); // Skip 0's
kdDebug() << "This mailbox has " << msgCount << " messages" << endl;
if (msgCount == 0)
return; // Don't import empty mailbox
@@ -212,9 +212,9 @@ void FilterOE::dbxImport( FilterInfo *info, TQDataStream& ds)
{
// Get item count & offset of index
TQ_UINT32 itemCount, indexPtr;
- ds.device()->at(0xc4);
+ ds.tqdevice()->at(0xc4);
ds >> itemCount;
- ds.device()->at(0xe4);
+ ds.tqdevice()->at(0xe4);
ds >> indexPtr;
kdDebug() << "Item count is " << itemCount << ", Index at " << indexPtr << endl;
@@ -223,7 +223,7 @@ void FilterOE::dbxImport( FilterInfo *info, TQDataStream& ds)
totalEmails = itemCount;
currentEmail = 0;
// Parse the indexes
- ds.device()->at(indexPtr);
+ ds.tqdevice()->at(indexPtr);
dbxReadIndex(info, ds, indexPtr);
}
@@ -231,15 +231,15 @@ void FilterOE::dbxReadIndex( FilterInfo *info, TQDataStream& ds, int filePos)
{
if(info->shouldTerminate()) return;
- TQ_UINT32 self, unknown, nextIndexPtr, parent, indexCount;
+ TQ_UINT32 self, unknown, nextIndexPtr, tqparent, indexCount;
TQ_UINT8 unknown2, ptrCount;
TQ_UINT16 unknown3;
- int wasAt = ds.device()->at();
- ds.device()->at(filePos);
+ int wasAt = ds.tqdevice()->at();
+ ds.tqdevice()->at(filePos);
kdDebug() << "Reading index of file " << folderName << endl;
- ds >> self >> unknown >> nextIndexPtr >> parent >> unknown2 >> ptrCount >> unknown3 >> indexCount; // _dbx_tableindexstruct
+ ds >> self >> unknown >> nextIndexPtr >> tqparent >> unknown2 >> ptrCount >> unknown3 >> indexCount; // _dbx_tableindexstruct
kdDebug() << "This index has " << (int) ptrCount << " data pointers" << endl;
for (int count = 0; count < ptrCount; count++) {
@@ -260,7 +260,7 @@ void FilterOE::dbxReadIndex( FilterInfo *info, TQDataStream& ds, int filePos)
dbxReadIndex(info, ds, nextIndexPtr);
}
- ds.device()->at(wasAt); // Restore file position to same as when function called
+ ds.tqdevice()->at(wasAt); // Restore file position to same as when function called
}
void FilterOE::dbxReadDataBlock( FilterInfo *info, TQDataStream& ds, int filePos)
@@ -268,11 +268,11 @@ void FilterOE::dbxReadDataBlock( FilterInfo *info, TQDataStream& ds, int filePos
TQ_UINT32 curOffset, blockSize;
TQ_UINT16 unknown;
TQ_UINT8 count, unknown2;
- int wasAt = ds.device()->at();
+ int wasAt = ds.tqdevice()->at();
TQString folderEntry[4];
- ds.device()->at(filePos);
+ ds.tqdevice()->at(filePos);
ds >> curOffset >> blockSize >> unknown >> count >> unknown2; // _dbx_email_headerstruct
kdDebug() << "Data block has " << (int) count << " elements" << endl;
@@ -284,7 +284,7 @@ void FilterOE::dbxReadDataBlock( FilterInfo *info, TQDataStream& ds, int filePos
ds >> type >> value;
value &= 0xffffff;
- ds.device()->at(ds.device()->at() - 1); // We only wanted 3 bytes
+ ds.tqdevice()->at(ds.tqdevice()->at() - 1); // We only wanted 3 bytes
if(!currentIsFolderFile) {
if (type == 0x84) { // It's an email!
@@ -292,12 +292,12 @@ void FilterOE::dbxReadDataBlock( FilterInfo *info, TQDataStream& ds, int filePos
dbxReadEmail(info, ds, value);
++count0x84;
} else if( type == 0x04) {
- int currentFilePos = ds.device()->at();
- ds.device()->at(filePos + 12 + value + (count*4) );
+ int currentFilePos = ds.tqdevice()->at();
+ ds.tqdevice()->at(filePos + 12 + value + (count*4) );
TQ_UINT32 newOFF;
ds >> newOFF;
kdDebug() << "**** Offset of emaildata (0x04) " << newOFF << endl;
- ds.device()->at(currentFilePos);
+ ds.tqdevice()->at(currentFilePos);
dbxReadEmail(info, ds, newOFF);
++count0x04;
}
@@ -316,7 +316,7 @@ void FilterOE::dbxReadDataBlock( FilterInfo *info, TQDataStream& ds, int filePos
folderEntry[2] = TQString::number(value);
} else if (type == 0x81) {
- // kdDebug() << "**** FOLDER: parent ID ****" << endl;
+ // kdDebug() << "**** FOLDER: tqparent ID ****" << endl;
folderEntry[3] = TQString::number(value);
}
}
@@ -324,7 +324,7 @@ void FilterOE::dbxReadDataBlock( FilterInfo *info, TQDataStream& ds, int filePos
if(currentIsFolderFile) {
folderStructure.append(folderEntry);
}
- ds.device()->at(wasAt); // Restore file position to same as when function called
+ ds.tqdevice()->at(wasAt); // Restore file position to same as when function called
}
void FilterOE::dbxReadEmail( FilterInfo *info, TQDataStream& ds, int filePos)
@@ -335,8 +335,8 @@ void FilterOE::dbxReadEmail( FilterInfo *info, TQDataStream& ds, int filePos)
TQ_UINT8 intCount, unknown;
KTempFile tmp;
bool _break = false;
- int wasAt = ds.device()->at();
- ds.device()->at(filePos);
+ int wasAt = ds.tqdevice()->at();
+ ds.tqdevice()->at(filePos);
do {
ds >> self >> nextAddressOffset >> blockSize >> intCount >> unknown >> nextAddress; // _dbx_block_hdrstruct
@@ -348,7 +348,7 @@ void FilterOE::dbxReadEmail( FilterInfo *info, TQDataStream& ds, int filePos)
_break = true;
break;
}
- ds.device()->at(nextAddress);
+ ds.tqdevice()->at(nextAddress);
} while (nextAddress != 0);
tmp.close();
@@ -361,7 +361,7 @@ void FilterOE::dbxReadEmail( FilterInfo *info, TQDataStream& ds, int filePos)
currentEmail++;
int currentPercentage = (int) ( ( (float) currentEmail / totalEmails ) * 100 );
info->setCurrent(currentPercentage);
- ds.device()->at(wasAt);
+ ds.tqdevice()->at(wasAt);
}
tmp.unlink();
}
@@ -371,18 +371,18 @@ TQString FilterOE::parseFolderString( TQDataStream& ds, int filePos )
{
char tmp;
TQString returnString;
- int wasAt = ds.device()->at();
- ds.device()->at(filePos);
+ int wasAt = ds.tqdevice()->at();
+ ds.tqdevice()->at(filePos);
// read while != 0x00
- while( !ds.device()->atEnd() ) {
- tmp = ds.device()->getch();
+ while( !ds.tqdevice()->atEnd() ) {
+ tmp = ds.tqdevice()->getch();
if( tmp != 0x00) {
returnString += tmp;
}
else break;
}
- ds.device()->at(wasAt);
+ ds.tqdevice()->at(wasAt);
return returnString;
}
@@ -410,9 +410,9 @@ TQString FilterOE::getFolderName(TQString filename)
}
} else {
TQString _currentID = tmp[2];
- TQString _parentID = tmp[3];
+ TQString _tqparentID = tmp[3];
if(_currentID == search) {
- if(_parentID.isEmpty()) { // this is the root of the folder
+ if(_tqparentID.isEmpty()) { // this is the root of the folder
found = true;
break;
} else {