summaryrefslogtreecommitdiffstats
path: root/kppp/accounting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kppp/accounting.cpp')
-rw-r--r--kppp/accounting.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/kppp/accounting.cpp b/kppp/accounting.cpp
index 76c5f02e..b9280eda 100644
--- a/kppp/accounting.cpp
+++ b/kppp/accounting.cpp
@@ -67,15 +67,15 @@ static TQString timet2qstring(time_t t) {
// accounting is accomplished withing it's derived classes
//
/////////////////////////////////////////////////////////////////////////////
-AccountingBase::AccountingBase(TQObject *parent) :
- TQObject(parent),
+AccountingBase::AccountingBase(TQObject *tqparent) :
+ TQObject(tqparent),
_total(0),
_session(0)
{
- TQDate dt = TQDate::currentDate();
+ TQDate dt = TQDate::tqcurrentDate();
LogFileName = TQString("%1-%2.log")
- .arg(TQDate::shortMonthName(dt.month()))
- .arg(dt.year(), 4);
+ .tqarg(TQDate::shortMonthName(dt.month()))
+ .tqarg(dt.year(), 4);
LogFileName = KGlobal::dirs()->saveLocation("appdata", "Log")
+ "/" + LogFileName;
@@ -212,8 +212,8 @@ TQString AccountingBase::getAccountingFile(const TQString &accountname) {
// Accounting class for ruleset files
//
/////////////////////////////////////////////////////////////////////////////
-Accounting::Accounting(TQObject *parent, PPPStats *st) :
- AccountingBase(parent),
+Accounting::Accounting(TQObject *tqparent, PPPStats *st) :
+ AccountingBase(tqparent),
acct_timer_id(0),
update_timer_id(0),
stats(st)
@@ -233,7 +233,7 @@ void Accounting::timerEvent(TQTimerEvent *t) {
double newLen;
double connect_time = difftime(time(0), start_time);
- rules.getActiveRule(TQDateTime::currentDateTime(), connect_time, newCosts, newLen);
+ rules.getActiveRule(TQDateTime::tqcurrentDateTime(), connect_time, newCosts, newLen);
if(newLen < 1) { // changed to < 1
slotStop();
return; // no default rule found
@@ -279,7 +279,7 @@ void Accounting::slotStart() {
_lastcosts = 0.0;
_lastlen = 0.0;
_session = rules.perConnectionCosts();
- rules.setStartTime(TQDateTime::currentDateTime());
+ rules.setStartTime(TQDateTime::tqcurrentDateTime());
acct_timer_id = startTimer(1);
if(UPDATE_TIME > 0)
update_timer_id = startTimer(UPDATE_TIME);
@@ -358,8 +358,8 @@ double Accounting::session() const {
-ExecutableAccounting::ExecutableAccounting(PPPStats *st, TQObject *parent) :
- AccountingBase(parent),
+ExecutableAccounting::ExecutableAccounting(PPPStats *st, TQObject *tqparent) :
+ AccountingBase(tqparent),
proc(0),
stats(st)
{
@@ -384,11 +384,11 @@ void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*bufle
// split string
TQString b(buffer);
- pos = b.find(':');
+ pos = b.tqfind(':');
while(pos != -1 && nFields < 8) {
field[nFields++] = b.mid(last_pos, pos-last_pos);
last_pos = pos+1;
- pos = b.find(':', last_pos);
+ pos = b.tqfind(':', last_pos);
}
for(int i = 0; i < nFields;i++)
@@ -398,9 +398,9 @@ void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*bufle
TQString s(buffer);
int del1, del2, del3;
- del1 = s.find(':');
- del2 = s.find(':', del1+1);
- del3 = s.find(':', del2+1);
+ del1 = s.tqfind(':');
+ del2 = s.tqfind(':', del1+1);
+ del3 = s.tqfind(':', del2+1);
if(del1 == -1 || del2 == -1 || del3 == -1) {
// TODO: do something usefull here
return;