From 089118c18533dfa3e6ce5065dbebdd4db94051f1 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:33:51 -0600 Subject: Rename old tq methods that no longer need a unique name --- kopete/plugins/statistics/statisticscontact.cpp | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'kopete/plugins/statistics/statisticscontact.cpp') diff --git a/kopete/plugins/statistics/statisticscontact.cpp b/kopete/plugins/statistics/statisticscontact.cpp index c178b39b..3a03b7bc 100644 --- a/kopete/plugins/statistics/statisticscontact.cpp +++ b/kopete/plugins/statistics/statisticscontact.cpp @@ -28,10 +28,10 @@ #include "statisticscontact.h" #include "statisticsdb.h" -StatisticsContact::StatisticsContact(Kopete::MetaContact *mc, StatisticsDB *db) : m_metaContact(mc),m_db(db), m_oldtqStatus(Kopete::OnlineStatus::Unknown) +StatisticsContact::StatisticsContact(Kopete::MetaContact *mc, StatisticsDB *db) : m_metaContact(mc),m_db(db), m_oldStatus(Kopete::OnlineStatus::Unknown) { m_isChatWindowOpen = false; - m_oldStatusDateTime = TQDateTime::tqcurrentDateTime(); + m_oldStatusDateTime = TQDateTime::currentDateTime(); // Last*Changed are always false at start m_timeBetweenTwoMessagesChanged = false; @@ -107,7 +107,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) // Get last time a message was received - m_lastMessageReceived = TQDateTime::tqcurrentDateTime(); + m_lastMessageReceived = TQDateTime::currentDateTime(); // Check for lastPresent @@ -234,18 +234,18 @@ void StatisticsContact::commonStatsCheck(const TQString name, TQString& statVar1 void StatisticsContact::newMessageReceived(Kopete::Message& m) { kdDebug() << "statistics: new message received" << endl; - TQDateTime tqcurrentDateTime = TQDateTime::tqcurrentDateTime(); + TQDateTime currentDateTime = TQDateTime::currentDateTime(); if (m_timeBetweenTwoMessagesOn != -1 && m_isChatWindowOpen) { - m_timeBetweenTwoMessages = (m_timeBetweenTwoMessages*m_timeBetweenTwoMessagesOn + m_lastMessageReceived.secsTo(tqcurrentDateTime))/(1 + m_timeBetweenTwoMessagesOn); + m_timeBetweenTwoMessages = (m_timeBetweenTwoMessages*m_timeBetweenTwoMessagesOn + m_lastMessageReceived.secsTo(currentDateTime))/(1 + m_timeBetweenTwoMessagesOn); } setIsChatWindowOpen(true); m_timeBetweenTwoMessagesOn += 1; - m_lastMessageReceived = tqcurrentDateTime; + m_lastMessageReceived = currentDateTime; // Message lenght @@ -254,7 +254,7 @@ void StatisticsContact::newMessageReceived(Kopete::Message& m) // Last talked /// @todo do this in message sent too. So we need setLastTalk() - m_lastTalk = tqcurrentDateTime; + m_lastTalk = currentDateTime; m_messageLengthChanged = true; m_lastTalkChanged = true; @@ -269,32 +269,32 @@ void StatisticsContact::onlineStatusChanged(Kopete::OnlineStatus::StatusType sta if (m_statisticsContactId.isEmpty()) return; - TQDateTime tqcurrentDateTime = TQDateTime::tqcurrentDateTime(); + TQDateTime currentDateTime = TQDateTime::currentDateTime(); - /// We don't want to log if oldtqStatus is unknown + /// We don't want to log if oldStatus is unknown /// the change could not be a real one; see StatisticsPlugin::slotMySelfOnlineStatusChanged - if (m_oldtqStatus != Kopete::OnlineStatus::Unknown) + if (m_oldStatus != Kopete::OnlineStatus::Unknown) { - kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< TQString::number(m_oldtqStatus) << endl; + kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< TQString::number(m_oldStatus) << endl; m_db->query(TQString("INSERT INTO contactstatus " "(metacontactid, status, datetimebegin, datetimeend) " - "VALUES('%1', '%2', '%3', '%4'" ");").tqarg(m_statisticsContactId).tqarg(Kopete::OnlineStatus::statusTypeToString(m_oldtqStatus)).tqarg(TQString::number(m_oldStatusDateTime.toTime_t())).tqarg(TQString::number(tqcurrentDateTime.toTime_t()))); + "VALUES('%1', '%2', '%3', '%4'" ");").tqarg(m_statisticsContactId).tqarg(Kopete::OnlineStatus::statusTypeToString(m_oldStatus)).tqarg(TQString::number(m_oldStatusDateTime.toTime_t())).tqarg(TQString::number(currentDateTime.toTime_t()))); } - if (m_oldtqStatus == Kopete::OnlineStatus::Online || m_oldtqStatus == Kopete::OnlineStatus::Away) + if (m_oldStatus == Kopete::OnlineStatus::Online || m_oldStatus == Kopete::OnlineStatus::Away) // If the last status was Online or Away, the last time contact was present is the time he goes offline { - m_lastPresent = tqcurrentDateTime; + m_lastPresent = currentDateTime; m_lastPresentChanged = true; } - m_oldtqStatus = status; - m_oldStatusDateTime = tqcurrentDateTime; + m_oldStatus = status; + m_oldStatusDateTime = currentDateTime; } -bool StatisticsContact::wastqStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status) +bool StatisticsContact::wasStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status) { if (m_statisticsContactId.isEmpty()) return false; @@ -389,7 +389,7 @@ TQValueList StatisticsContact::mainEvents(const Kopete::OnlineStatus::St if (m_statisticsContactId.isEmpty()) return mainEvents; - TQDateTime tqcurrentDateTime = TQDateTime::tqcurrentDateTime(); + TQDateTime currentDateTime = TQDateTime::currentDateTime(); buffer = m_db->query(TQString("SELECT datetimebegin, datetimeend, status FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin").tqarg(m_statisticsContactId)); -- cgit v1.2.1