From 6313d19ee81cc7b6a9a225634d06c21fa611e8d1 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage <emmanuel.lepage@savoirfairelinux.com> Date: Wed, 14 Dec 2011 11:52:33 -0500 Subject: [PATCH] [ #7876 ] qDebug -> kDebug (to be able to disable them using KDE gui) --- kde/src/AccountListModel.cpp | 4 -- kde/src/AccountView.cpp | 16 ++--- kde/src/AccountWizard.cpp | 9 ++- kde/src/AkonadiBackend.cpp | 9 +-- kde/src/CallView.cpp | 78 +++++++++++------------ kde/src/SFLPhone.cpp | 5 +- kde/src/SFLPhoneView.cpp | 86 +++++++++++--------------- kde/src/SFLPhoneapplication.cpp | 1 - kde/src/conf/ConfigAccountList.cpp | 16 ++--- kde/src/conf/ConfigurationDialog.cpp | 13 ++-- kde/src/conf/ConfigurationSkeleton.cpp | 51 +++++++-------- kde/src/conf/dlgaccounts.cpp | 44 ++++++------- kde/src/conf/dlgaudio.cpp | 3 - kde/src/conf/dlggeneral.cpp | 1 - kde/src/lib/Account.cpp | 5 +- kde/src/lib/Call.cpp | 4 +- kde/src/lib/CallModel.hpp | 2 +- kde/src/lib/Contact.cpp | 1 - kde/src/lib/Contact.h | 26 ++++---- kde/src/main.cpp | 44 ++++++++++--- kde/src/widgets/AccountItemWidget.cpp | 6 +- kde/src/widgets/CallTreeItem.cpp | 4 +- kde/src/widgets/ContactDock.cpp | 11 ++-- kde/src/widgets/ContactItemWidget.cpp | 12 ++-- kde/src/widgets/HistoryDock.cpp | 8 +-- kde/src/widgets/HistoryTreeItem.cpp | 11 ++-- kde/src/widgets/SFLPhoneTray.cpp | 4 +- 27 files changed, 236 insertions(+), 238 deletions(-) diff --git a/kde/src/AccountListModel.cpp b/kde/src/AccountListModel.cpp index e1b1b3d273..62be15d278 100755 --- a/kde/src/AccountListModel.cpp +++ b/kde/src/AccountListModel.cpp @@ -28,9 +28,6 @@ //SFLPhone #include "conf/ConfigAccountList.h" -//Qt -#include <QtCore/QDebug> - ///Constructor AccountListModel::AccountListModel(QObject *parent) : QAbstractListModel(parent) @@ -96,7 +93,6 @@ QString AccountListModel::getOrderedList() const ///Set model data bool AccountListModel::setData(const QModelIndex & index, const QVariant &value, int role) { - qDebug() << "setData"; if (index.isValid() && index.column() == 0 && role == Qt::CheckStateRole) { (*accounts)[index.row()]->setEnabled(value.toBool()); emit dataChanged(index, index); diff --git a/kde/src/AccountView.cpp b/kde/src/AccountView.cpp index 7d0b0ddd7d..c70da2b969 100644 --- a/kde/src/AccountView.cpp +++ b/kde/src/AccountView.cpp @@ -23,9 +23,11 @@ //Qt -#include <QtCore/QDebug> #include <QtGui/QListWidgetItem> +//KDE +#include <KDebug> + //SFLPhone library #include "lib/sflphone_const.h" #include "lib/configurationmanager_interface_singleton.h" @@ -99,9 +101,9 @@ QColor AccountView::getStateColor() ///Get the color name const QString& AccountView::getStateColorName() { - static const QString black("black"); - static const QString darkGreen("darkGreen"); - static const QString red("red"); + static const QString black ( "black" ); + static const QString darkGreen( "darkGreen" ); + static const QString red ( "red" ); if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_UNREGISTERED) return black; if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED || getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_READY) @@ -153,15 +155,15 @@ void AccountView::updateState() AccountItemWidget * m_pWidget = getItemWidget(); if(getAccountDetail(ACCOUNT_ENABLED) != ACCOUNT_ENABLED_TRUE ) { - qDebug() << "Changing account state to Unregistered"; + kDebug() << "Changing account state to Unregistered"; m_pWidget->setState(AccountItemWidget::Unregistered); } else if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED || getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_READY) { - qDebug() << "Changing account state to Registered"; + kDebug() << "Changing account state to Registered"; m_pWidget->setState(AccountItemWidget::Registered); } else { - qDebug() << "Changing account state to NotWorking"; + kDebug() << "Changing account state to NotWorking"; m_pWidget->setState(AccountItemWidget::NotWorking); } } diff --git a/kde/src/AccountWizard.cpp b/kde/src/AccountWizard.cpp index 4449f8fb88..9df923005a 100755 --- a/kde/src/AccountWizard.cpp +++ b/kde/src/AccountWizard.cpp @@ -33,6 +33,9 @@ #include <netdb.h> +//KDE +#include <KDebug> + #define FIELD_SFL_ACCOUNT "SFL" #define FIELD_OTHER_ACCOUNT "OTHER" @@ -142,7 +145,7 @@ rest_account get_rest_account(QString host, QString email) QString req = "GET /rest/accountcreator?email=" + email; QString ret; rest_account ra; - qDebug() << "HOST: " << host; + kDebug() << "HOST: " << host; int res = sendRequest(host, 80, req, ret); if (res != -1) { QStringList list = ret.split("\n"); @@ -153,7 +156,7 @@ rest_account get_rest_account(QString host, QString email) ra.success = false; ra.reason = ret; } - qDebug() << ret; + kDebug() << ret; return ra; } @@ -320,7 +323,7 @@ void AccountWizard::accept() if(is_create_account) { QString accountId = configurationManager.addAccount(accountDetails); } - qDebug() << ret; + kDebug() << ret; QDialog::accept(); restart(); } diff --git a/kde/src/AkonadiBackend.cpp b/kde/src/AkonadiBackend.cpp index 32f62a93f8..a265001a79 100644 --- a/kde/src/AkonadiBackend.cpp +++ b/kde/src/AkonadiBackend.cpp @@ -26,6 +26,7 @@ #include <QtCore/QObject> //KDE +#include <KDebug> #include <kdialog.h> #include <akonadi/control.h> #include <akonadi/collectionfilterproxymodel.h> @@ -110,7 +111,7 @@ ContactList AkonadiBackend::update(Akonadi::Collection collection) m_Collection = collection; ContactList contacts; if ( !collection.isValid() ) { - qDebug() << "The current collection is not valid"; + kDebug() << "The current collection is not valid"; return contacts; } @@ -122,7 +123,7 @@ ContactList AkonadiBackend::update(Akonadi::Collection collection) foreach ( const Akonadi::Item &item, items ) { if ( item.hasPayload<KABC::ContactGroup>() ) { - qDebug() << "Group:" << item.payload<KABC::ContactGroup>().name(); + kDebug() << "Group:" << item.payload<KABC::ContactGroup>().name(); } if ( item.hasPayload<KABC::Addressee>() ) { @@ -163,7 +164,7 @@ void AkonadiBackend::editContact(Contact* contact) { KABC::Addressee ct = m_AddrHash[contact->getUid()]; if (ct.uid() != contact->getUid()) { - qDebug() << "Contact not found"; + kDebug() << "Contact not found"; return; } Akonadi::ContactEditor *editor = new Akonadi::ContactEditor( Akonadi::ContactEditor::EditMode, SFLPhone::app()->view() ); @@ -219,7 +220,7 @@ void AkonadiBackend::addNewContact(Contact* contact) dlg->exec(); if ( !editor->saveContact() ) { - qDebug() << "Unable to save new contact to storage"; + kDebug() << "Unable to save new contact to storage"; return; } } diff --git a/kde/src/CallView.cpp b/kde/src/CallView.cpp index c14a5211b2..63ef4cb656 100644 --- a/kde/src/CallView.cpp +++ b/kde/src/CallView.cpp @@ -26,6 +26,8 @@ #include <QtGui/QTreeWidget> #include <QtGui/QTreeWidgetItem> +//KDE +#include <KDebug> //SFLPhone library #include "lib/Contact.h" @@ -79,31 +81,31 @@ bool CallView::callToCall(QTreeWidgetItem *parent, int index, const QMimeData *d clearArtefact(SFLPhone::model()->getIndex(encodedCallId)); if (!parent) { - qDebug() << "Call dropped on empty space"; + kDebug() << "Call dropped on empty space"; if (SFLPhone::model()->getIndex(encodedCallId)->parent()) { - qDebug() << "Detaching participant"; + kDebug() << "Detaching participant"; SFLPhone::model()->detachParticipant(SFLPhone::model()->getCall(encodedCallId)); } else - qDebug() << "The call is not in a conversation (doing nothing)"; + kDebug() << "The call is not in a conversation (doing nothing)"; return true; } if (SFLPhone::model()->getCall(parent)->getCallId() == QString(encodedCallId)) { - qDebug() << "Call dropped on itself (doing nothing)"; + kDebug() << "Call dropped on itself (doing nothing)"; return true; } if ((parent->childCount()) && (SFLPhone::model()->getIndex(encodedCallId)->childCount())) { - qDebug() << "Merging two conferences"; + kDebug() << "Merging two conferences"; SFLPhone::model()->mergeConferences(SFLPhone::model()->getCall(parent),SFLPhone::model()->getCall(encodedCallId)); return true; } else if ((parent->parent()) || (parent->childCount())) { - qDebug() << "Call dropped on a conference"; + kDebug() << "Call dropped on a conference"; if ((SFLPhone::model()->getIndex(encodedCallId)->childCount()) && (!parent->childCount())) { - qDebug() << "Conference dropped on a call (doing nothing)"; + kDebug() << "Conference dropped on a call (doing nothing)"; return true; } @@ -111,21 +113,21 @@ bool CallView::callToCall(QTreeWidgetItem *parent, int index, const QMimeData *d QTreeWidgetItem* call2 = (parent->parent())?parent->parent():parent; if (call1->parent()) { - qDebug() << "Call 1 is part of a conference"; + kDebug() << "Call 1 is part of a conference"; if (call1->parent() == call2) { - qDebug() << "Call dropped on it's own conference (doing nothing)"; + kDebug() << "Call dropped on it's own conference (doing nothing)"; return true; } else if (SFLPhone::model()->getIndex(call1)->childCount()) { - qDebug() << "Merging two conferences"; + kDebug() << "Merging two conferences"; SFLPhone::model()->mergeConferences(SFLPhone::model()->getCall(call1),SFLPhone::model()->getCall(call2)); } else if (call1->parent()) { - qDebug() << "Moving call from a conference to an other"; + kDebug() << "Moving call from a conference to an other"; SFLPhone::model()->detachParticipant(SFLPhone::model()->getCall(encodedCallId)); } } - qDebug() << "Adding participant"; + kDebug() << "Adding participant"; int state = SFLPhone::model()->getCall(call1)->getState(); if(state == CALL_STATE_INCOMING || state == CALL_STATE_DIALING || state == CALL_STATE_TRANSFER || state == CALL_STATE_TRANSF_HOLD) { SFLPhone::model()->getCall(call1)->actionPerformed(CALL_ACTION_ACCEPT); @@ -138,13 +140,11 @@ bool CallView::callToCall(QTreeWidgetItem *parent, int index, const QMimeData *d return true; } else if ((SFLPhone::model()->getIndex(encodedCallId)->childCount()) && (!parent->childCount())) { - qDebug() << "Call dropped on it's own conference (doing nothing)"; + kDebug() << "Call dropped on it's own conference (doing nothing)"; return true; } - - - qDebug() << "Call dropped on another call"; + kDebug() << "Call dropped on another call"; SFLPhone::model()->createConferenceFromCall(SFLPhone::model()->getCall(encodedCallId),SFLPhone::model()->getCall(parent)); return true; } @@ -168,7 +168,7 @@ bool CallView::phoneNumberToCall(QTreeWidgetItem *parent, int index, const QMime call2->appendText(QString(encodedPhoneNumber)); if (!parent) { //Dropped on free space - qDebug() << "Adding new dialing call"; + kDebug() << "Adding new dialing call"; } else if (parent->childCount() || parent->parent()) { //Dropped on a conversation @@ -191,7 +191,7 @@ bool CallView::phoneNumberToCall(QTreeWidgetItem *parent, int index, const QMime ///A contact ID is dropped on a call bool CallView::contactToCall(QTreeWidgetItem *parent, int index, const QMimeData *data, Qt::DropAction action) { - qDebug() << "contactToCall"; + kDebug() << "contactToCall"; Q_UNUSED( index ) Q_UNUSED( action ) QByteArray encodedContact = data->data( MIME_CONTACT ); @@ -217,17 +217,17 @@ bool CallView::contactToCall(QTreeWidgetItem *parent, int index, const QMimeData call2->appendText(map[result]); } else { - qDebug() << "Operation cancelled"; + kDebug() << "Operation cancelled"; return false; } } else { - qDebug() << "This contact have no valid phone number"; + kDebug() << "This contact have no valid phone number"; return false; } if (!parent) { //Dropped on free space - qDebug() << "Adding new dialing call"; + kDebug() << "Adding new dialing call"; } else if (parent->childCount() || parent->parent()) { //Dropped on a conversation @@ -259,15 +259,15 @@ bool CallView::dropMimeData(QTreeWidgetItem *parent, int index, const QMimeData QByteArray encodedContact = data->data( MIME_CONTACT ); if (!QString(encodedCallId).isEmpty()) { - qDebug() << "CallId dropped"<< QString(encodedCallId); + kDebug() << "CallId dropped"<< QString(encodedCallId); callToCall(parent, index, data, action); } else if (!QString(encodedPhoneNumber).isEmpty()) { - qDebug() << "PhoneNumber dropped"<< QString(encodedPhoneNumber); + kDebug() << "PhoneNumber dropped"<< QString(encodedPhoneNumber); phoneNumberToCall(parent, index, data, action); } else if (!QString(encodedContact).isEmpty()) { - qDebug() << "Contact dropped"<< QString(encodedContact); + kDebug() << "Contact dropped"<< QString(encodedContact); contactToCall(parent, index, data, action); } return false; @@ -276,7 +276,7 @@ bool CallView::dropMimeData(QTreeWidgetItem *parent, int index, const QMimeData ///Encode data to be tranported during the drag n' drop operation QMimeData* CallView::mimeData( const QList<QTreeWidgetItem *> items) const { - qDebug() << "A call is being dragged"; + kDebug() << "A call is being dragged"; if (items.size() < 1) { return NULL; } @@ -382,7 +382,7 @@ QTreeWidgetItem* CallView::extractItem(QTreeWidgetItem* item) if (parentItem) { if ((indexOfTopLevelItem(parentItem) == -1 ) || (parentItem->indexOfChild(item) == -1)) { - qDebug() << "The conversation does not exist"; + kDebug() << "The conversation does not exist"; return 0; } @@ -404,7 +404,7 @@ CallTreeItem* CallView::insertItem(QTreeWidgetItem* item, Call* parent) CallTreeItem* CallView::insertItem(QTreeWidgetItem* item, QTreeWidgetItem* parent) { if (!item) { - qDebug() << "This is not a valid call"; + kDebug() << "This is not a valid call"; return 0; } @@ -430,13 +430,13 @@ void CallView::destroyCall(Call* toDestroy) setCurrentItem(0); if (!SFLPhone::model()->getIndex(toDestroy)) - qDebug() << "Call not found"; + kDebug() << "Call not found"; else if (indexOfTopLevelItem(SFLPhone::model()->getIndex(toDestroy)) != -1) takeTopLevelItem(indexOfTopLevelItem(SFLPhone::model()->getIndex(toDestroy))); else if (SFLPhone::model()->getIndex(toDestroy)->parent()) //May crash here SFLPhone::model()->getIndex(toDestroy)->parent()->removeChild(SFLPhone::model()->getIndex(toDestroy)); else - qDebug() << "Call not found"; + kDebug() << "Call not found"; } /// @todo Remove the text partially covering the TreeView item widget when it is being dragged, a beter implementation is needed @@ -455,7 +455,7 @@ void CallView::clearArtefact(QTreeWidgetItem* item) void CallView::itemDoubleClicked(QTreeWidgetItem* item, int column) { Q_UNUSED(column) - qDebug() << "Item doubleclicked" << SFLPhone::model()->getCall(item)->getState(); + kDebug() << "Item doubleclicked" << SFLPhone::model()->getCall(item)->getState(); switch(SFLPhone::model()->getCall(item)->getState()) { case CALL_STATE_INCOMING: SFLPhone::model()->getCall(item)->actionPerformed(CALL_ACTION_ACCEPT); @@ -467,14 +467,14 @@ void CallView::itemDoubleClicked(QTreeWidgetItem* item, int column) { SFLPhone::model()->getCall(item)->actionPerformed(CALL_ACTION_ACCEPT); break; default: - qDebug() << "Double clicked an item with no action on double click."; + kDebug() << "Double clicked an item with no action on double click."; } } void CallView::itemClicked(QTreeWidgetItem* item, int column) { Q_UNUSED(column) emit itemChanged(SFLPhone::model()->getCall(item)); - qDebug() << "Item clicked"; + kDebug() << "Item clicked"; } @@ -487,7 +487,7 @@ void CallView::itemClicked(QTreeWidgetItem* item, int column) { ///Add a new conference, get the call list and update the interface as needed Call* CallView::addConference(Call* conf) { - qDebug() << "Conference created"; + kDebug() << "Conference created"; Call* newConf = conf;//SFLPhone::model()->addConference(confID);//TODO ELV? QTreeWidgetItem* confItem = new QTreeWidgetItem(); @@ -502,7 +502,7 @@ Call* CallView::addConference(Call* conf) QStringList callList = callManager.getParticipantList(conf->getConfId()); foreach (QString callId, callList) { - qDebug() << "Adding " << callId << "to the conversation"; + kDebug() << "Adding " << callId << "to the conversation"; insertItem(extractItem(SFLPhone::model()->getIndex(callId)),confItem); } @@ -513,7 +513,7 @@ Call* CallView::addConference(Call* conf) ///Executed when the daemon signal a modification in an existing conference. Update the call list and update the TreeView bool CallView::conferenceChanged(Call* conf) { - qDebug() << "Conference changed"; + kDebug() << "Conference changed"; //if (!SFLPhone::model()->conferenceChanged(confId, state)) // return false; @@ -528,7 +528,7 @@ bool CallView::conferenceChanged(Call* conf) buffer << SFLPhone::model()->getIndex(callId); } else - qDebug() << "Call " << callId << " does not exist"; + kDebug() << "Call " << callId << " does not exist"; } for (int j =0; j < SFLPhone::model()->getIndex(conf)->childCount();j++) { @@ -544,7 +544,7 @@ bool CallView::conferenceChanged(Call* conf) ///Remove a conference from the model and the TreeView void CallView::conferenceRemoved(Call* conf) { - qDebug() << "Attempting to remove conference"; + kDebug() << "Attempting to remove conference"; QTreeWidgetItem* idx = SFLPhone::model()->getIndex(conf); if (idx) { while (idx->childCount()) { @@ -552,10 +552,10 @@ void CallView::conferenceRemoved(Call* conf) } takeTopLevelItem(indexOfTopLevelItem(SFLPhone::model()->getIndex(conf))); //SFLPhone::model()->conferenceRemoved(confId); - qDebug() << "Conference removed"; + kDebug() << "Conference removed"; } else { - qDebug() << "Conference not found"; + kDebug() << "Conference not found"; } } diff --git a/kde/src/SFLPhone.cpp b/kde/src/SFLPhone.cpp index 76da8768b5..31f6f4c293 100755 --- a/kde/src/SFLPhone.cpp +++ b/kde/src/SFLPhone.cpp @@ -32,6 +32,7 @@ #include <QtGui/QCursor> //KDE +#include <KDebug> #include <KStandardAction> #include <KAction> #include <KStatusBar> @@ -78,7 +79,7 @@ SFLPhone::~SFLPhone() bool SFLPhone::initialize() { if ( m_pInitialized ) { - qDebug() << "Already initialized."; + kDebug() << "Already initialized."; return false; } @@ -158,7 +159,7 @@ bool SFLPhone::initialize() ///Setup evry actions void SFLPhone::setupActions() { - qDebug() << "setupActions"; + kDebug() << "setupActions"; action_accept = new KAction(this); action_refuse = new KAction(this); diff --git a/kde/src/SFLPhoneView.cpp b/kde/src/SFLPhoneView.cpp index 9a116f9c1e..1f7f5b5434 100755 --- a/kde/src/SFLPhoneView.cpp +++ b/kde/src/SFLPhoneView.cpp @@ -55,7 +55,7 @@ ///Constructor SFLPhoneView::SFLPhoneView(QWidget *parent) : QWidget(parent), - wizard(0) + wizard(0), errorWindow(0) { setupUi(this); @@ -148,7 +148,7 @@ void SFLPhoneView::typeString(QString str) } if(!currentCall && !candidate) { - qDebug() << "Typing when no item is selected. Opening an item."; + kDebug() << "Typing when no item is selected. Opening an item."; candidate = SFLPhone::model()->addDialingCall(); } @@ -160,11 +160,10 @@ void SFLPhoneView::typeString(QString str) ///Called when a backspace is detected void SFLPhoneView::backspace() { - qDebug() << "backspace"; - qDebug() << "In call list."; + kDebug() << "backspace"; Call* call = callTreeModel->getCurrentItem(); if(!call) { - qDebug() << "Error : Backspace on unexisting call."; + kDebug() << "Error : Backspace on unexisting call."; } else { call->backspaceItemText(); @@ -178,10 +177,10 @@ void SFLPhoneView::backspace() ///Called when escape is detected void SFLPhoneView::escape() { - qDebug() << "escape"; + kDebug() << "escape"; Call* call = callTreeModel->getCurrentItem(); if(!call) { - qDebug() << "Escape when no item is selected. Doing nothing."; + kDebug() << "Escape when no item is selected. Doing nothing."; } else { if(call->getState() == CALL_STATE_TRANSFER || call->getState() == CALL_STATE_TRANSF_HOLD) { @@ -196,10 +195,10 @@ void SFLPhoneView::escape() ///Called when enter is detected void SFLPhoneView::enter() { - qDebug() << "enter"; + kDebug() << "enter"; Call* call = callTreeModel->getCurrentItem(); if(!call) { - qDebug() << "Error : Enter on unexisting call."; + kDebug() << "Error : Enter on unexisting call."; } else { int state = call->getState(); @@ -207,7 +206,7 @@ void SFLPhoneView::enter() action(call, CALL_ACTION_ACCEPT); } else { - qDebug() << "Enter when call selected not in appropriate state. Doing nothing."; + kDebug() << "Enter when call selected not in appropriate state. Doing nothing."; } } } @@ -223,7 +222,7 @@ void SFLPhoneView::enter() void SFLPhoneView::action(Call* call, call_action action) { if(! call) { - qDebug() << "Error : action " << action << "applied on null object call. Should not happen."; + kDebug() << "Error : action " << action << "applied on null object call. Should not happen."; } else { try { @@ -237,8 +236,6 @@ void SFLPhoneView::action(Call* call, call_action action) } - - /***************************************************************************** * * * Update display related code * @@ -249,8 +246,6 @@ void SFLPhoneView::action(Call* call, call_action action) ///Change GUI icons void SFLPhoneView::updateWindowCallState() { - qDebug() << "updateWindowCallState"; - bool enabledActions[6]= {true,true,true,true,true,true}; QString buttonIconFiles[6] = {ICON_CALL, ICON_HANGUP, ICON_HOLD, ICON_TRANSFER, ICON_REC_DEL_OFF, ICON_MAILBOX}; QString actionTexts[6] = {ACTION_LABEL_CALL, ACTION_LABEL_HANG_UP, ACTION_LABEL_HOLD, ACTION_LABEL_TRANSFER, ACTION_LABEL_RECORD, ACTION_LABEL_MAILBOX}; @@ -264,7 +259,7 @@ void SFLPhoneView::updateWindowCallState() call = callTreeModel->getCurrentItem(); if (!call) { - qDebug() << "No item selected."; + kDebug() << "No item selected."; enabledActions[ SFLPhone::Refuse ] = false; enabledActions[ SFLPhone::Hold ] = false; enabledActions[ SFLPhone::Transfer ] = false; @@ -274,7 +269,7 @@ void SFLPhoneView::updateWindowCallState() call_state state = call->getState(); recordActivated = call->getRecording(); - qDebug() << "Reached State" << state << " with call" << call->getCallId(); + kDebug() << "Reached State" << state << " with call" << call->getCallId(); switch (state) { case CALL_STATE_INCOMING: @@ -327,18 +322,18 @@ void SFLPhoneView::updateWindowCallState() transfer = true; break; case CALL_STATE_OVER: - qDebug() << "Error : Reached CALL_STATE_OVER with call " << call->getCallId() << "!"; + kDebug() << "Error : Reached CALL_STATE_OVER with call " << call->getCallId() << "!"; break; case CALL_STATE_ERROR: - qDebug() << "Error : Reached CALL_STATE_ERROR with call " << call->getCallId() << "!"; + kDebug() << "Error : Reached CALL_STATE_ERROR with call " << call->getCallId() << "!"; break; default: - qDebug() << "Error : Reached unexisting state for call " << call->getCallId() << "!"; + kDebug() << "Error : Reached unexisting state for call " << call->getCallId() << "!"; break; } } - qDebug() << "Updating Window."; + kDebug() << "Updating Window."; emit enabledActionsChangeAsked ( enabledActions ); emit actionIconsChangeAsked ( buttonIconFiles ); @@ -346,7 +341,7 @@ void SFLPhoneView::updateWindowCallState() emit transferCheckStateChangeAsked ( transfer ); emit recordCheckStateChangeAsked ( recordActivated ); - qDebug() << "Window updated."; + kDebug() << "Window updated."; } ///Deprecated? @@ -373,7 +368,7 @@ int SFLPhoneView::phoneNumberTypesDisplayed() ///Change icon of the record button void SFLPhoneView::updateRecordButton() { - qDebug() << "updateRecordButton"; + kDebug() << "updateRecordButton"; CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); double recVol = callManager.getVolume(RECORD_DEVICE); if(recVol == 0.00) { @@ -397,7 +392,7 @@ void SFLPhoneView::updateRecordButton() ///Update the colume button icon void SFLPhoneView::updateVolumeButton() { - qDebug() << "updateVolumeButton"; + kDebug() << "updateVolumeButton"; CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); double sndVol = callManager.getVolume(SOUND_DEVICE); @@ -424,7 +419,7 @@ void SFLPhoneView::updateRecordBar(double _value) { CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); double recVol = callManager.getVolume(RECORD_DEVICE); - qDebug() << "updateRecordBar" << recVol; + kDebug() << "updateRecordBar" << recVol; int value = (_value > 0)?_value:(int)(recVol * 100); slider_recVol->setValue(value); } @@ -432,7 +427,7 @@ void SFLPhoneView::updateVolumeBar(double _value) { CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); double sndVol = callManager.getVolume(SOUND_DEVICE); - qDebug() << "updateVolumeBar" << sndVol; + kDebug() << "updateVolumeBar" << sndVol; int value = (_value > 0)?_value:(int)(sndVol * 100); slider_sndVol->setValue(value); } @@ -459,7 +454,6 @@ void SFLPhoneView::updateDialpad() ///Change the statusbar message void SFLPhoneView::updateStatusMessage() { - qDebug() << "updateStatusMessage"; Account * account = SFLPhone::model()->getCurrentAccount(); if(account == NULL) { @@ -492,7 +486,6 @@ void SFLPhoneView::displayVolumeControls(bool checked) ///@TODO is it still needed? <elepage 2011> void SFLPhoneView::displayDialpad(bool checked) { - qDebug() << "Max res2: " << ConfigurationSkeleton::displayDialpad(); ConfigurationSkeleton::setDisplayDialpad(checked); updateDialpad(); } @@ -506,7 +499,7 @@ void SFLPhoneView::on_widget_dialpad_typed(QString text) ///The value on the slider changed void SFLPhoneView::on_slider_recVol_valueChanged(int value) { - qDebug() << "on_slider_recVol_valueChanged(" << value << ")"; + kDebug() << "on_slider_recVol_valueChanged(" << value << ")"; CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); callManager.setVolume(RECORD_DEVICE, (double)value / 100.0); updateRecordButton(); @@ -515,7 +508,7 @@ void SFLPhoneView::on_slider_recVol_valueChanged(int value) ///The value on the slider changed void SFLPhoneView::on_slider_sndVol_valueChanged(int value) { - qDebug() << "on_slider_sndVol_valueChanged(" << value << ")"; + kDebug() << "on_slider_sndVol_valueChanged(" << value << ")"; CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); callManager.setVolume(SOUND_DEVICE, (double)value / 100.0); updateVolumeButton(); @@ -525,15 +518,13 @@ void SFLPhoneView::on_slider_sndVol_valueChanged(int value) void SFLPhoneView::on_toolButton_recVol_clicked(bool checked) { CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); - qDebug() << "on_toolButton_recVol_clicked()."; + kDebug() << "on_toolButton_recVol_clicked()."; if(!checked) { - qDebug() << "checked"; toolButton_recVol->setChecked(false); slider_recVol->setEnabled(true); callManager.setVolume(RECORD_DEVICE, (double)slider_recVol->value() / 100.0); } else { - qDebug() << "unchecked"; toolButton_recVol->setChecked(true); slider_recVol->setEnabled(false); callManager.setVolume(RECORD_DEVICE, 0.0); @@ -545,15 +536,13 @@ void SFLPhoneView::on_toolButton_recVol_clicked(bool checked) void SFLPhoneView::on_toolButton_sndVol_clicked(bool checked) { CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); - qDebug() << "on_toolButton_sndVol_clicked()."; + kDebug() << "on_toolButton_sndVol_clicked()."; if(!checked) { - qDebug() << "checked"; toolButton_sndVol->setChecked(false); slider_sndVol->setEnabled(true); callManager.setVolume(SOUND_DEVICE, (double)slider_sndVol->value() / 100.0); } else { - qDebug() << "unchecked"; toolButton_sndVol->setChecked(true); slider_sndVol->setEnabled(false); callManager.setVolume(SOUND_DEVICE, 0.0); @@ -596,7 +585,6 @@ void SFLPhoneView::contextMenuEvent(QContextMenuEvent *event) /// void SFLPhoneView::editBeforeCall() { - qDebug() << "editBeforeCall"; QString name; QString number; @@ -613,14 +601,14 @@ void SFLPhoneView::editBeforeCall() ///Pick the default account and load it void SFLPhoneView::setAccountFirst(Account * account) { - qDebug() << "setAccountFirst : " << (account ? account->getAlias() : QString()) << (account ? account->getAccountId() : QString()); + kDebug() << "setAccountFirst : " << (account ? account->getAlias() : QString()) << (account ? account->getAccountId() : QString()); if(account) { SFLPhone::model()->setPriorAccountId(account->getAccountId()); } else { SFLPhone::model()->setPriorAccountId(QString()); } - qDebug() << "Current account id" << SFLPhone::model()->getCurrentAccountId(); + kDebug() << "Current account id" << SFLPhone::model()->getCurrentAccountId(); updateStatusMessage(); } @@ -652,14 +640,14 @@ void SFLPhoneView::accept() { Call* call = callTreeModel->getCurrentItem(); if(!call) { - qDebug() << "Calling when no item is selected. Opening an item."; + kDebug() << "Calling when no item is selected. Opening an item."; SFLPhone::model()->addDialingCall(); } else { int state = call->getState(); if(state == CALL_STATE_RINGING || state == CALL_STATE_CURRENT || state == CALL_STATE_HOLD || state == CALL_STATE_BUSY) { - qDebug() << "Calling when item currently ringing, current, hold or busy. Opening an item."; + kDebug() << "Calling when item currently ringing, current, hold or busy. Opening an item."; SFLPhone::model()->addDialingCall(); } else { @@ -673,7 +661,7 @@ void SFLPhoneView::refuse() { Call* call = callTreeModel->getCurrentItem(); if(!call) { - qDebug() << "Error : Hanging up when no item selected. Should not happen."; + kDebug() << "Error : Hanging up when no item selected. Should not happen."; } else { action(call, CALL_ACTION_REFUSE); @@ -685,7 +673,7 @@ void SFLPhoneView::hold() { Call* call = callTreeModel->getCurrentItem(); if(!call) { - qDebug() << "Error : Holding when no item selected. Should not happen."; + kDebug() << "Error : Holding when no item selected. Should not happen."; } else { action(call, CALL_ACTION_HOLD); @@ -697,7 +685,7 @@ void SFLPhoneView::transfer() { Call* call = callTreeModel->getCurrentItem(); if(!call) { - qDebug() << "Error : Transfering when no item selected. Should not happen."; + kDebug() << "Error : Transfering when no item selected. Should not happen."; } else { action(call, CALL_ACTION_TRANSFER); @@ -709,7 +697,7 @@ void SFLPhoneView::record() { Call* call = callTreeModel->getCurrentItem(); if(!call) { - qDebug() << "Error : Recording when no item selected. Should not happen."; + kDebug() << "Error : Recording when no item selected. Should not happen."; } else { action(call, CALL_ACTION_RECORD); @@ -729,13 +717,13 @@ void SFLPhoneView::mailBox() ///Called the there is an error (dbus) void SFLPhoneView::on1_error(MapStringString details) { - qDebug() << "Signal : Daemon error : " << details; + kDebug() << "Signal : Daemon error : " << details; } ///When a call is comming (dbus) void SFLPhoneView::on1_incomingCall(Call* call) { - qDebug() << "Signal : Incoming Call ! ID = " << call->getCallId(); + kDebug() << "Signal : Incoming Call ! ID = " << call->getCallId(); updateWindowCallState(); @@ -749,13 +737,13 @@ void SFLPhoneView::on1_incomingCall(Call* call) ///When a new voice mail is comming void SFLPhoneView::on1_voiceMailNotify(const QString &accountID, int count) { - qDebug() << "Signal : VoiceMail Notify ! " << count << " new voice mails for account " << accountID; + kDebug() << "Signal : VoiceMail Notify ! " << count << " new voice mails for account " << accountID; } ///When the volume change void SFLPhoneView::on1_volumeChanged(const QString & /*device*/, double value) { - qDebug() << "Signal : Volume Changed !" << value; + kDebug() << "Signal : Volume Changed !" << value; if(! (toolButton_recVol->isChecked() && value == 0.0)) updateRecordBar(value); if(! (toolButton_sndVol->isChecked() && value == 0.0)) diff --git a/kde/src/SFLPhoneapplication.cpp b/kde/src/SFLPhoneapplication.cpp index 1938b4638b..cdaf6472ab 100755 --- a/kde/src/SFLPhoneapplication.cpp +++ b/kde/src/SFLPhoneapplication.cpp @@ -124,7 +124,6 @@ void SFLPhoneApplication::initializePaths() KGlobal::dirs() -> addPrefix( QString(DATA_INSTALL_DIR) ); KIconLoader::global() -> addAppDir( QString(DATA_INSTALL_DIR) + "/share" ); - qDebug() << "KGlobal::dirs" << QString(DATA_INSTALL_DIR); } Q_NOREPLY void SFLPhoneApplication::quit2() diff --git a/kde/src/conf/ConfigAccountList.cpp b/kde/src/conf/ConfigAccountList.cpp index 3aee086dbc..f41399054b 100644 --- a/kde/src/conf/ConfigAccountList.cpp +++ b/kde/src/conf/ConfigAccountList.cpp @@ -1,6 +1,7 @@ #include "ConfigAccountList.h" -#include <QDebug> +//KDE +#include <KDebug> #include "lib/sflphone_const.h" #include "lib/configurationmanager_interface_singleton.h" @@ -39,11 +40,11 @@ AccountView* ConfigAccountList::addAccount(const QString& alias) void ConfigAccountList::removeAccount(QListWidgetItem* item) { if(!item) - qDebug() << "Attempting to remove an account from a NULL item."; return; + kDebug() << "Attempting to remove an account from a NULL item."; return; AccountView* a = (AccountView*) getAccountByItem(item); if(!a) - qDebug() << "Attempting to remove an unexisting account."; return; + kDebug() << "Attempting to remove an unexisting account."; return; accounts->remove(accounts->indexOf(a)); } @@ -118,7 +119,7 @@ void ConfigAccountList::update() void ConfigAccountList::updateAccounts() { - qDebug() << "updateAccounts"; + kDebug() << "updateAccounts"; ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); QStringList accountIds = configurationManager.getAccountList().value(); accounts->clear(); @@ -131,7 +132,7 @@ void ConfigAccountList::updateAccounts() void ConfigAccountList::upAccount(int index) { if(index <= 0 || index >= size()) { - qDebug() << "Error : index or future index out of range in upAccount."; + kDebug() << "Error : index or future index out of range in upAccount."; return; } AccountView* account = getAccountAt(index); @@ -142,7 +143,7 @@ void ConfigAccountList::upAccount(int index) void ConfigAccountList::downAccount(int index) { if(index < 0 || index >= size() - 1) { - qDebug() << "Error : index or future index out of range in upAccount."; + kDebug() << "Error : index or future index out of range in upAccount."; return; } AccountView* account = getAccountAt(index); @@ -162,13 +163,12 @@ QString ConfigAccountList::getOrderedList() const QVector<AccountView*> ConfigAccountList::registeredAccounts() const { - qDebug() << "registeredAccounts"; QVector<AccountView*> registeredAccounts; AccountView* current; for (int i = 0; i < accounts->count(); ++i) { current = (*accounts)[i]; if(current->getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED) { - qDebug() << current->getAlias() << " : " << current; + kDebug() << current->getAlias() << " : " << current; registeredAccounts.append(current); } } diff --git a/kde/src/conf/ConfigurationDialog.cpp b/kde/src/conf/ConfigurationDialog.cpp index 4ae18615da..b8c184ae3d 100755 --- a/kde/src/conf/ConfigurationDialog.cpp +++ b/kde/src/conf/ConfigurationDialog.cpp @@ -20,6 +20,10 @@ **************************************************************************/ #include "ConfigurationDialog.h" +//KDE +#include <KDebug> + + #include "conf/ConfigurationSkeleton.h" #include "dlggeneral.h" @@ -63,14 +67,12 @@ ConfigurationDialog::~ConfigurationDialog() void ConfigurationDialog::updateWidgets() { - qDebug() << "\nupdateWidgets"; dlgAudio->updateWidgets(); dlgAccounts->updateWidgets(); } void ConfigurationDialog::updateSettings() { - qDebug() << "\nupdateSettings"; dlgAudio->updateSettings(); dlgAccounts->updateSettings(); } @@ -78,20 +80,19 @@ void ConfigurationDialog::updateSettings() bool ConfigurationDialog::hasChanged() { bool res = dlgAudio->hasChanged() || dlgAccounts->hasChanged(); - qDebug() << "hasChanged" << res; + kDebug() << "Config has Changed" << res; return res; } void ConfigurationDialog::updateButtons() { bool changed = hasChanged(); - qDebug() << "updateButtons , hasChanged = " << changed; + kDebug() << "updateButtons , hasChanged = " << changed; enableButtonApply( changed ); } void ConfigurationDialog::applyCustomSettings() { - qDebug() << "\napplyCustomSettings"; if(hasChanged()) { ConfigurationSkeleton::self()->writeConfig(); } @@ -103,7 +104,7 @@ void ConfigurationDialog::applyCustomSettings() void ConfigurationDialog::reload() { - qDebug() << "reload"; + kDebug() << "Reloading config"; ConfigurationSkeleton::self()->readConfig(); updateWidgets(); updateButtons(); diff --git a/kde/src/conf/ConfigurationSkeleton.cpp b/kde/src/conf/ConfigurationSkeleton.cpp index f426057e33..683e29d945 100755 --- a/kde/src/conf/ConfigurationSkeleton.cpp +++ b/kde/src/conf/ConfigurationSkeleton.cpp @@ -23,10 +23,13 @@ #include "lib/configurationmanager_interface_singleton.h" #include "lib/sflphone_const.h" +//KDE +#include <KDebug> + ConfigurationSkeleton::ConfigurationSkeleton() : ConfigurationSkeletonBase() { - qDebug() << "Building ConfigurationSkeleton"; + kDebug() << "Building ConfigurationSkeleton"; //codecListModel = new CodecListModel(); readConfig(); } @@ -53,7 +56,7 @@ ConfigurationSkeleton::~ConfigurationSkeleton() void ConfigurationSkeleton::readConfig() { //ConfigurationSkeleton::readConfig(); - qDebug() << "\nReading config"; + kDebug() << "Reading config"; ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); @@ -90,7 +93,7 @@ void ConfigurationSkeleton::readConfig() //Audio Interface settings QString audioManager = configurationManager.getAudioManager(); - qDebug() << "audioManager = " << audioManager; + kDebug() << "audioManager = " << audioManager; //setInterface(audioManager); //TODO //ringtones settings @@ -106,26 +109,26 @@ void ConfigurationSkeleton::readConfig() //codecs settings //setActiveCodecList(configurationManager.getActiveCodecList()); //Outdated - qDebug() << "configurationManager.getCurrentAudioOutputPlugin() = " << configurationManager.getCurrentAudioOutputPlugin(); + kDebug() << "configurationManager.getCurrentAudioOutputPlugin() = " << configurationManager.getCurrentAudioOutputPlugin(); setAlsaPlugin(configurationManager.getCurrentAudioOutputPlugin()); bool ok; QStringList devices = configurationManager.getCurrentAudioDevicesIndex(); int inputDevice =0; if (devices.size() > 1) { - qDebug() << "inputDevice = " << devices[1]; + kDebug() << "inputDevice = " << devices[1]; inputDevice = devices[1].toInt(& ok); } else - qDebug() << "Fatal: Too few audio devices"; + kDebug() << "Fatal: Too few audio devices"; if(!ok) - qDebug() << "inputDevice is not a number"; + kDebug() << "inputDevice is not a number"; setAlsaInputDevice(inputDevice); - //qDebug() << "outputDevice = " << devices[0]; + //kDebug() << "outputDevice = " << devices[0]; //int outputDevice = devices[0].toInt(& ok); - //if(!ok) qDebug() << "outputDevice is not a number"; + //if(!ok) kDebug() << "outputDevice is not a number"; //setAlsaOutputDevice(outputDevice); /////////////////////// @@ -147,7 +150,6 @@ void ConfigurationSkeleton::readConfig() ///////////////////////////// MapStringInt addressBookSettings = configurationManager.getAddressbookSettings().value(); - qDebug() << "getAddressbookSettings() : " << addressBookSettings; setEnableAddressBook(addressBookSettings[ADDRESSBOOK_ENABLE]); setMaxResults(addressBookSettings[ADDRESSBOOK_MAX_RESULTS]); setDisplayPhoto(addressBookSettings[ADDRESSBOOK_DISPLAY_CONTACT_PHOTO]); @@ -160,7 +162,6 @@ void ConfigurationSkeleton::readConfig() ///////////////////////////// MapStringString hooksSettings = configurationManager.getHookSettings().value(); - qDebug() << "getHooksSettings() : " << hooksSettings; setAddPrefix(hooksSettings[HOOKS_ENABLED]=="1"); setPrepend(hooksSettings[HOOKS_ADD_PREFIX]); setEnableHooksSIP(hooksSettings[HOOKS_SIP_ENABLED]=="1"); @@ -168,13 +169,13 @@ void ConfigurationSkeleton::readConfig() setHooksSIPHeader(hooksSettings[HOOKS_SIP_FIELD]); setHooksCommand(hooksSettings[HOOKS_COMMAND]); - qDebug() << "Finished to read config\n"; + kDebug() << "Finished to read config"; } void ConfigurationSkeleton::writeConfig() { //ConfigurationSkeleton::writeConfig(); - qDebug() << "\nWriting config"; + kDebug() << "Writing config"; /*ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); @@ -182,7 +183,7 @@ void ConfigurationSkeleton::writeConfig() ////General settings//// //////////////////////// - qDebug() << "Writing General settings"; + kDebug() << "Writing General settings"; //Call history settings //if(enableHistory() != QVariant(configurationManager.getHistoryEnabled()).toBool() ) { @@ -195,7 +196,7 @@ void ConfigurationSkeleton::writeConfig() ////Display settings//// //////////////////////// - qDebug() << "Writing Display settings"; + kDebug() << "Writing Display settings"; //Notification settings //if(notifOnCalls() != configurationManager.getNotify()) configurationManager.setNotify(); @@ -210,7 +211,7 @@ void ConfigurationSkeleton::writeConfig() ////Accounts settings//// ///////////////////////// - qDebug() << "Writing Accounts settings"; + kDebug() << "Writing Accounts settings"; // saveAccountList(); @@ -218,7 +219,7 @@ void ConfigurationSkeleton::writeConfig() ////Audio settings//// ////////////////////// - qDebug() << "Writing Audio settings"; + kDebug() << "Writing Audio settings"; //Audio Interface settings int prevManager = configurationManager.getAudioManager(); @@ -232,13 +233,13 @@ void ConfigurationSkeleton::writeConfig() configurationManager.setRingtoneChoice(ringtone()); //codecs settings - //qDebug() << "activeCodecList = " << activeCodecList(); + //kDebug() << "activeCodecList = " << activeCodecList(); //configurationManager.setActiveCodecList(activeCodecList()); //alsa settings if(prevManager == CONST_ALSA && newManager == EnumInterface::ALSA) { - qDebug() << "setting alsa settings"; + kDebug() << "setting alsa settings"; configurationManager.setOutputAudioPlugin(alsaPlugin()); configurationManager.setAudioInputDevice(alsaInputDevice()); configurationManager.setAudioOutputDevice(alsaOutputDevice()); @@ -249,7 +250,7 @@ void ConfigurationSkeleton::writeConfig() ////Record settings//// /////////////////////// - qDebug() << "Writing Record settings"; + kDebug() << "Writing Record settings"; QString destination = destinationFolder(); configurationManager.setRecordPath(destination); @@ -259,7 +260,7 @@ void ConfigurationSkeleton::writeConfig() ////Address Book settings//// ///////////////////////////// - qDebug() << "Writing Address Book settings"; + kDebug() << "Writing Address Book settings"; MapStringInt addressBookSettings = MapStringInt(); addressBookSettings[ADDRESSBOOK_ENABLE] = enableAddressBook(); @@ -274,7 +275,7 @@ void ConfigurationSkeleton::writeConfig() ///////Hooks settings//////// ///////////////////////////// - qDebug() << "Writing Hooks settings"; + kDebug() << "Writing Hooks settings"; MapStringString hooksSettings = MapStringString(); hooksSettings[HOOKS_ENABLED] = addPrefix() ? "1" : "0"; @@ -285,9 +286,7 @@ void ConfigurationSkeleton::writeConfig() hooksSettings[HOOKS_COMMAND] = hooksCommand(); configurationManager.setHookSettings(hooksSettings); - qDebug() << "Finished to write config\n";*/ - qDebug() << "Max res: " << displayDialpad() << "\n\n\n\n\n\n"; - qDebug() << "Max res3: " << ConfigurationSkeletonBase::displayDialpad() << "\n\n\n\n\n\n"; + kDebug() << "Finished to write config\n";*/ ConfigurationSkeletonBase::writeConfig(); } @@ -303,8 +302,6 @@ void ConfigurationSkeleton::writeConfig() // void ConfigurationSkeleton::writeConfig() // { -// qDebug() << "Max res4: " << displayDialpad() << "\n\n\n\n\n\n"; -// qDebug() << "Max res5: " << ConfigurationSkeletonBase::displayDialpad() << "\n\n\n\n\n\n"; // // ConfigurationSkeletonBase::writeConfig(); // } \ No newline at end of file diff --git a/kde/src/conf/dlgaccounts.cpp b/kde/src/conf/dlgaccounts.cpp index 2937bb81c9..f5d27aca18 100755 --- a/kde/src/conf/dlgaccounts.cpp +++ b/kde/src/conf/dlgaccounts.cpp @@ -31,7 +31,8 @@ #include <QListWidgetItem> #include "conf/ConfigurationDialog.h" #include <QWidget> -#include <QDebug> +//KDE +#include <KDebug> Private_AddCodecDialog::Private_AddCodecDialog(QList< StringHash > itemList, QStringList currentItems ,QWidget* parent) : KDialog(parent) { codecTable = new QTableWidget(this); @@ -164,7 +165,7 @@ void DlgAccounts::saveAccountList() //if the account has an instanciated id but it's not in configurationManager else { if(! accountIds.contains(current->getAccountId())) { - qDebug() << "The account with id " << current->getAccountId() << " doesn't exist. It might have been removed by another SFLphone client."; + kDebug() << "The account with id " << current->getAccountId() << " doesn't exist. It might have been removed by another SFLphone client."; currentId = QString(); } else { @@ -176,7 +177,7 @@ void DlgAccounts::saveAccountList() //remove accounts that are in the configurationManager but not in the client for (int i = 0; i < accountIds.size(); i++) { if(! accountList->getAccountById(accountIds[i])) { - qDebug() << "remove account " << accountIds[i]; + kDebug() << "remove account " << accountIds[i]; configurationManager.removeAccount(accountIds[i]); } } @@ -186,7 +187,7 @@ void DlgAccounts::saveAccountList() void DlgAccounts::connectAccountsChangedSignal() { - qDebug() << "connectAccountsChangedSignal"; + kDebug() << "connectAccountsChangedSignal"; ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); connect(&configurationManager, SIGNAL(accountsChanged()), this, SLOT(updateAccountStates())); @@ -194,7 +195,7 @@ void DlgAccounts::connectAccountsChangedSignal() void DlgAccounts::disconnectAccountsChangedSignal() { - qDebug() << "disconnectAccountsChangedSignal"; + kDebug() << "disconnectAccountsChangedSignal"; ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); disconnect(&configurationManager, SIGNAL(accountsChanged()), this, SLOT(updateAccountStates())); @@ -206,13 +207,13 @@ void DlgAccounts::saveAccount(QListWidgetItem * item) QString protocolsTab[] = ACCOUNT_TYPES_TAB; if(! item) { - qDebug() << "Attempting to save details of an account from a NULL item"; - return; + kDebug() << "Attempting to save details of an account from a NULL item"; + return; } AccountView* account = accountList->getAccountByItem(item); if(!account) { - qDebug() << "Attempting to save details of an unexisting account : " << item->text(); + kDebug() << "Attempting to save details of an unexisting account : " << item->text(); return; } //ACCOUNT DETAILS @@ -266,7 +267,7 @@ void DlgAccounts::saveAccount(QListWidgetItem * item) ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); configurationManager.setActiveAudioCodecList(_codecList, account->getAccountDetail(ACCOUNT_ID)); - qDebug() << "Account codec have been saved" << _codecList << account->getAccountDetail(ACCOUNT_ID); + kDebug() << "Account codec have been saved" << _codecList << account->getAccountDetail(ACCOUNT_ID); saveCredential(account->getAccountDetail(ACCOUNT_ID)); } @@ -274,13 +275,13 @@ void DlgAccounts::saveAccount(QListWidgetItem * item) void DlgAccounts::loadAccount(QListWidgetItem * item) { if(! item ) { - qDebug() << "Attempting to load details of an account from a NULL item"; + kDebug() << "Attempting to load details of an account from a NULL item"; return; } AccountView* account = accountList->getAccountByItem(item); if(! account ) { - qDebug() << "Attempting to load details of an unexisting account"; + kDebug() << "Attempting to load details of an unexisting account"; return; } @@ -413,7 +414,6 @@ void DlgAccounts::loadAccount(QListWidgetItem * item) void DlgAccounts::loadAccountList() { - qDebug() << "loadAccountList"; accountList->updateAccounts(); listWidget_accountList->clear(); for (int i = 0; i < accountList->size(); ++i) { @@ -436,7 +436,6 @@ void DlgAccounts::addAccountToAccountList(AccountView* account) void DlgAccounts::changedAccountList() { - qDebug() << "changedAccountList"; accountListHasChanged = true; emit updateButtons(); } @@ -445,7 +444,7 @@ void DlgAccounts::changedAccountList() void DlgAccounts::on_listWidget_accountList_currentItemChanged ( QListWidgetItem * current, QListWidgetItem * previous ) { - qDebug() << "on_listWidget_accountList_currentItemChanged"; + kDebug() << "on_listWidget_accountList_currentItemChanged"; saveAccount(previous); loadAccount(current); updateAccountListCommands(); @@ -453,7 +452,7 @@ void DlgAccounts::on_listWidget_accountList_currentItemChanged ( QListWidgetItem void DlgAccounts::on_button_accountUp_clicked() { - qDebug() << "on_button_accountUp_clicked"; + kDebug() << "on_button_accountUp_clicked"; int currentRow = listWidget_accountList->currentRow(); QListWidgetItem * prevItem = listWidget_accountList->takeItem(currentRow); AccountView* account = accountList->getAccountByItem(prevItem); @@ -469,7 +468,7 @@ void DlgAccounts::on_button_accountUp_clicked() void DlgAccounts::on_button_accountDown_clicked() { - qDebug() << "on_button_accountDown_clicked"; + kDebug() << "on_button_accountDown_clicked"; int currentRow = listWidget_accountList->currentRow(); QListWidgetItem * prevItem = listWidget_accountList->takeItem(currentRow); AccountView* account = accountList->getAccountByItem(prevItem); @@ -485,7 +484,7 @@ void DlgAccounts::on_button_accountDown_clicked() void DlgAccounts::on_button_accountAdd_clicked() { - qDebug() << "on_button_accountAdd_clicked"; + kDebug() << "on_button_accountAdd_clicked"; QString itemName = QInputDialog::getText(this, "New account", "Enter new account's alias"); itemName = itemName.simplified(); if (!itemName.isEmpty()) { @@ -499,7 +498,7 @@ void DlgAccounts::on_button_accountAdd_clicked() void DlgAccounts::on_button_accountRemove_clicked() { - qDebug() << "on_button_accountRemove_clicked"; + kDebug() << "on_button_accountRemove_clicked"; int r = listWidget_accountList->currentRow(); QListWidgetItem * item = listWidget_accountList->takeItem(r); accountList->removeAccount(item); @@ -508,14 +507,14 @@ void DlgAccounts::on_button_accountRemove_clicked() void DlgAccounts::on_edit1_alias_textChanged(const QString & text) { - qDebug() << "on_edit1_alias_textChanged"; + kDebug() << "on_edit1_alias_textChanged"; AccountItemWidget * widget = (AccountItemWidget *) listWidget_accountList->itemWidget(listWidget_accountList->currentItem()); widget->setAccountText(text); } void DlgAccounts::updateAccountListCommands() { - qDebug() << "updateAccountListCommands"; + kDebug() << "updateAccountListCommands"; bool buttonsEnabled[4] = {true,true,true,true}; if(! listWidget_accountList->currentItem()) { buttonsEnabled[0] = false; @@ -537,7 +536,7 @@ void DlgAccounts::updateAccountListCommands() void DlgAccounts::updateAccountStates() { - qDebug() << "updateAccountStates"; + kDebug() << "updateAccountStates"; for (int i = 0; i < accountList->size(); i++) { AccountView* current = accountList->getAccountAt(i); current->updateState(); @@ -566,14 +565,12 @@ void DlgAccounts::updateStatusLabel(AccountView* account) bool DlgAccounts::hasChanged() { bool res = accountListHasChanged; - qDebug() << "DlgAccounts::hasChanged " << res; return res; } void DlgAccounts::updateSettings() { - qDebug() << "DlgAccounts::updateSettings"; if(accountListHasChanged) { saveAccountList(); //toolButton_accountsApply->setEnabled(false); @@ -583,7 +580,6 @@ void DlgAccounts::updateSettings() void DlgAccounts::updateWidgets() { - qDebug() << "DlgAccounts::updateWidgets"; loadAccountList(); //toolButton_accountsApply->setEnabled(false); accountListHasChanged = false; diff --git a/kde/src/conf/dlgaudio.cpp b/kde/src/conf/dlgaudio.cpp index 90c989f72b..adf36b85eb 100755 --- a/kde/src/conf/dlgaudio.cpp +++ b/kde/src/conf/dlgaudio.cpp @@ -60,7 +60,6 @@ void DlgAudio::updateWidgets() void DlgAudio::updateSettings() { - qDebug() << "DlgAudio::updateSettings"; //alsaPlugin ConfigurationSkeleton * skeleton = ConfigurationSkeleton::self(); skeleton->setAlsaPlugin(box_alsaPlugin->currentText()); @@ -70,7 +69,6 @@ void DlgAudio::updateSettings() bool DlgAudio::hasChanged() { - qDebug() << "DlgAudio::hasChanged"; ConfigurationSkeleton * skeleton = ConfigurationSkeleton::self(); bool alsaPluginHasChanged = skeleton->interface() == ConfigurationSkeleton::EnumInterface::ALSA && skeleton->alsaPlugin() != box_alsaPlugin->currentText(); return alsaPluginHasChanged ; @@ -78,7 +76,6 @@ bool DlgAudio::hasChanged() void DlgAudio::loadAlsaSettings() { - qDebug() << "DlgAudio::loadAlsaSettings"; ConfigurationManagerInterface& configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); if(QString(configurationManager.getAudioManager()) == "alsa") { ConfigurationSkeleton* skeleton = ConfigurationSkeleton::self(); diff --git a/kde/src/conf/dlggeneral.cpp b/kde/src/conf/dlggeneral.cpp index 6a64b2c8c5..c99d01b61c 100755 --- a/kde/src/conf/dlggeneral.cpp +++ b/kde/src/conf/dlggeneral.cpp @@ -19,7 +19,6 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "dlggeneral.h" -#include <QDebug> #include <QToolButton> #include <QAction> diff --git a/kde/src/lib/Account.cpp b/kde/src/lib/Account.cpp index 0f82149ed8..2bd6e0e9d4 100644 --- a/kde/src/lib/Account.cpp +++ b/kde/src/lib/Account.cpp @@ -167,14 +167,12 @@ const QString& Account::getAlias() const ///Is this account enabled bool Account::isEnabled() const { - qDebug() << "isEnabled = " << getAccountDetail(ACCOUNT_ENABLED); return (getAccountDetail(ACCOUNT_ENABLED) == ACCOUNT_ENABLED_TRUE); } ///Is this account registered bool Account::isRegistered() const { - qDebug() << "isRegistered = " << getAccountDetail(ACCOUNT_STATUS); return (getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED); } @@ -200,7 +198,7 @@ void Account::setAccountDetail(const QString& param, const QString& val) ///Set the account id void Account::setAccountId(const QString& id) { - qDebug() << "accountId = " << m_pAccountId; + qDebug() << "Setting accountId = " << m_pAccountId; if (! isNew()) qDebug() << "Error : setting AccountId of an existing account."; m_pAccountId = new QString(id); @@ -221,7 +219,6 @@ void Account::setEnabled(bool checked) ///Update the account void Account::updateState() { - qDebug() << "updateState"; if(! isNew()) { ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); MapStringString details = configurationManager.getAccountDetails(getAccountId()).value(); diff --git a/kde/src/lib/Call.cpp b/kde/src/lib/Call.cpp index 4d8b0b6deb..d049db8b11 100644 --- a/kde/src/lib/Call.cpp +++ b/kde/src/lib/Call.cpp @@ -176,8 +176,6 @@ Call* Call::buildIncomingCall(const QString & callId) CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); MapStringString details = callManager.getCallDetails(callId).value(); - qDebug() << "details = " << details; - QString from = details[ CALL_PEER_NUMBER ]; QString account = details[ CALL_ACCOUNTID ]; QString peerName = details[ CALL_PEER_NAME ]; @@ -607,7 +605,7 @@ void Call::call() CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); qDebug() << "account = " << m_Account; if(m_Account.isEmpty()) { - qDebug() << "account is not set, taking the first registered."; + qDebug() << "Account is not set, taking the first registered."; this->m_Account = CallModelConvenience::getCurrentAccountId(); } if(!m_Account.isEmpty()) { diff --git a/kde/src/lib/CallModel.hpp b/kde/src/lib/CallModel.hpp index c138ea263b..11e51f8336 100644 --- a/kde/src/lib/CallModel.hpp +++ b/kde/src/lib/CallModel.hpp @@ -341,7 +341,7 @@ template<typename CallWidget, typename Index> bool CallModel<CallWidget,Index>:: ///Executed when the daemon signal a modification in an existing conference. Update the call list and update the TreeView template<typename CallWidget, typename Index> bool CallModel<CallWidget,Index>::changeConference(const QString& confId, const QString& state) { - qDebug() << "Conf changed2"; + qDebug() << "Conf changed"; Q_UNUSED(state) if (!m_sPrivateCallList_callId[confId]) { diff --git a/kde/src/lib/Contact.cpp b/kde/src/lib/Contact.cpp index 557cf07abd..3f4069c8c2 100644 --- a/kde/src/lib/Contact.cpp +++ b/kde/src/lib/Contact.cpp @@ -23,7 +23,6 @@ #include "Contact.h" //Qt -#include <QtCore/QDebug> #include <QtGui/QPixmap> //SFLPhone library diff --git a/kde/src/lib/Contact.h b/kde/src/lib/Contact.h index 87fa55c902..169ddf0b60 100644 --- a/kde/src/lib/Contact.h +++ b/kde/src/lib/Contact.h @@ -37,11 +37,7 @@ namespace KABC { #include "typedefs.h" -/** - * @class Contact Abstract version of a contact - @author Jérémy Quentin <jeremy.quentin@savoirfairelinux.com> - @author Emmanuel Lepage <emmanuel.lepage@savoirfairelinux.com> -*/ +///@class Contact Abstract version of a contact class LIB_EXPORT Contact : public QObject{ Q_OBJECT public: @@ -83,16 +79,16 @@ public: virtual void initItem(); //Getters - virtual PhoneNumbers getPhoneNumbers() const; - virtual const QString& getNickName() const; - virtual const QString& getFirstName() const; - virtual const QString& getSecondName() const; - virtual const QString& getFormattedName() const; - virtual const QString& getOrganization() const; - virtual const QString& getUid() const; - virtual const QString& getPreferredEmail() const; - virtual const QPixmap* getPhoto() const; - virtual const QString& getType() const; + virtual PhoneNumbers getPhoneNumbers() const; + virtual const QString& getNickName() const; + virtual const QString& getFirstName() const; + virtual const QString& getSecondName() const; + virtual const QString& getFormattedName() const; + virtual const QString& getOrganization() const; + virtual const QString& getUid() const; + virtual const QString& getPreferredEmail() const; + virtual const QPixmap* getPhoto() const; + virtual const QString& getType() const; //Setters virtual void setPhoneNumbers (PhoneNumbers ); diff --git a/kde/src/main.cpp b/kde/src/main.cpp index b302b605f5..dec3123eb8 100755 --- a/kde/src/main.cpp +++ b/kde/src/main.cpp @@ -1,28 +1,54 @@ +/*************************************************************************** + * Copyright (C) 2009-2012 by Savoir-Faire Linux * + * Author : Jérémy Quentin <jeremy.quentin@savoirfairelinux.com> * + * Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>* + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + **************************************************************************/ + +//System #include <unistd.h> + +//Qt +#include <QtGui/QAction> #include <QApplication> #include <QtCore/QString> #include <QtGui/QMenu> -//#include <QtGui/QMenuBar> -#include <QtGui/QAction> +#include <QTableView> +#include <QListView> +//KDE +#include <KDebug> #include <kcmdlineargs.h> #include <kaboutdata.h> #include <klocale.h> #include <KNotification> +//SFLPhone #include "AccountWizard.h" -#include "lib/instance_interface_singleton.h" -#include "lib/sflphone_const.h" #include "SFLPhoneapplication.h" #include "conf/ConfigurationDialog.h" #include "conf/ConfigurationSkeleton.h" #include "CallView.h" #include "SFLPhone.h" - -#include <QTableView> -#include <QListView> #include "AccountListModel.h" +//SFLPhone library +#include "lib/instance_interface_singleton.h" +#include "lib/sflphone_const.h" static const char description[] = "A KDE 4 Client for SFLphone"; @@ -75,10 +101,10 @@ int main(int argc, char **argv) } catch(const char * msg) { - qDebug() << msg; + kDebug() << msg; } catch(QString msg) { - qDebug() << msg; + kDebug() << msg; } } diff --git a/kde/src/widgets/AccountItemWidget.cpp b/kde/src/widgets/AccountItemWidget.cpp index 0b42723945..1adfabc300 100755 --- a/kde/src/widgets/AccountItemWidget.cpp +++ b/kde/src/widgets/AccountItemWidget.cpp @@ -24,7 +24,9 @@ //Qt #include <QtGui/QHBoxLayout> -#include <QtCore/QDebug> + +//KDE +#include <KDebug> //SFLPhone library #include "lib/sflphone_const.h" @@ -85,7 +87,7 @@ void AccountItemWidget::updateStateDisplay() m_pLed->setPixmap(QPixmap(ICON_ACCOUNT_LED_RED)); break; default: - qDebug() << "Calling AccountItemWidget::setState with value " << m_State << ", not part of enum AccountItemWidget::State."; + kDebug() << "Calling AccountItemWidget::setState with value " << m_State << ", not part of enum AccountItemWidget::State."; } } diff --git a/kde/src/widgets/CallTreeItem.cpp b/kde/src/widgets/CallTreeItem.cpp index 164688e65f..724bb117d1 100644 --- a/kde/src/widgets/CallTreeItem.cpp +++ b/kde/src/widgets/CallTreeItem.cpp @@ -149,7 +149,7 @@ void CallTreeItem::setCall(Call *call) ///Update data void CallTreeItem::updated() { - qDebug() << "Updating tree item"; + kDebug() << "Updating tree item"; Contact* contact = AkonadiBackend::getInstance()->getContactByPhone(m_pItemCall->getPeerPhoneNumber()); if (contact) { m_pIconL->setPixmap(*contact->getPhoto()); @@ -196,6 +196,6 @@ void CallTreeItem::updated() } } else { - //qDebug() << "Updating item of call of state OVER. Doing nothing."; + //kDebug() << "Updating item of call of state OVER. Doing nothing."; } } diff --git a/kde/src/widgets/ContactDock.cpp b/kde/src/widgets/ContactDock.cpp index d7f408bbd1..cf95ee6cc4 100644 --- a/kde/src/widgets/ContactDock.cpp +++ b/kde/src/widgets/ContactDock.cpp @@ -33,6 +33,7 @@ #include <QtGui/QComboBox> //KDE +#include <KDebug> #include <KLineEdit> #include <KLocalizedString> #include <KIcon> @@ -162,7 +163,7 @@ void ContactDock::reloadContact() aContact->setContact(cont); PhoneNumbers numbers = aContact->getContact()->getPhoneNumbers(); - qDebug() << "Phone count" << numbers.count(); + kDebug() << "Phone count" << numbers.count(); if (numbers.count() > 1) { foreach (Contact::PhoneNumber* number, numbers) { QNumericTreeWidgetItem_hist* item2 = new QNumericTreeWidgetItem_hist(item); @@ -228,7 +229,7 @@ void ContactDock::filter(const QString& text) ///Serialize informations to be used for drag and drop QMimeData* ContactTree::mimeData( const QList<QTreeWidgetItem *> items) const { - qDebug() << "An history call is being dragged"; + kDebug() << "An history call is being dragged"; if (items.size() < 1) { return NULL; } @@ -246,7 +247,7 @@ QMimeData* ContactTree::mimeData( const QList<QTreeWidgetItem *> items) const } } else { - qDebug() << "the item is not a call"; + kDebug() << "the item is not a call"; } return mimeData; } @@ -260,7 +261,7 @@ bool ContactTree::dropMimeData(QTreeWidgetItem *parent, int index, const QMimeDa QByteArray encodedData = data->data(MIME_CALLID); - qDebug() << "In history import"<< QString(encodedData); + kDebug() << "In history import"<< QString(encodedData); return false; } @@ -275,7 +276,7 @@ bool ContactTree::dropMimeData(QTreeWidgetItem *parent, int index, const QMimeDa ///Show or hide the history list void ContactDock::setHistoryVisible(bool visible) { - qDebug() << "Toggling history visibility"; + kDebug() << "Toggling history visibility"; m_pCallView->setVisible(visible); ConfigurationSkeleton::setDisplayContactCallHistory(visible); } diff --git a/kde/src/widgets/ContactItemWidget.cpp b/kde/src/widgets/ContactItemWidget.cpp index ae2537980e..a59ee82c4c 100644 --- a/kde/src/widgets/ContactItemWidget.cpp +++ b/kde/src/widgets/ContactItemWidget.cpp @@ -173,7 +173,7 @@ void ContactItemWidget::updated() PhoneNumbers numbers = m_pContactKA->getPhoneNumbers(); foreach (Contact::PhoneNumber* number, numbers) { - qDebug() << "Phone:" << number->getNumber() << number->getType(); + kDebug() << "Phone:" << number->getNumber() << number->getType(); } if (getCallNumbers().count() == 1) @@ -264,20 +264,20 @@ void ContactItemWidget::showContext(const QPoint& pos) //TODO void ContactItemWidget::sendEmail() { - qDebug() << "Sending email"; + kDebug() << "Sending email"; } ///Call the same number again //TODO void ContactItemWidget::callAgain() { - qDebug() << "Calling "; + kDebug() << "Calling "; } ///Copy contact to clipboard void ContactItemWidget::copy() { - qDebug() << "Copying contact"; + kDebug() << "Copying contact"; QMimeData* mimeData = new QMimeData(); mimeData->setData(MIME_CONTACT, m_pContactKA->getUid().toUtf8()); QClipboard* clipboard = QApplication::clipboard(); @@ -287,7 +287,7 @@ void ContactItemWidget::copy() ///Edit this contact void ContactItemWidget::editContact() { - qDebug() << "Edit contact"; + kDebug() << "Edit contact"; AkonadiBackend::getInstance()->editContact(m_pContactKA); } @@ -295,7 +295,7 @@ void ContactItemWidget::editContact() //TODO void ContactItemWidget::addPhone() { - qDebug() << "Adding to contact"; + kDebug() << "Adding to contact"; } ///Add this contact to the bookmark list diff --git a/kde/src/widgets/HistoryDock.cpp b/kde/src/widgets/HistoryDock.cpp index de3831e56c..b13754fdc8 100644 --- a/kde/src/widgets/HistoryDock.cpp +++ b/kde/src/widgets/HistoryDock.cpp @@ -22,7 +22,6 @@ #include "HistoryDock.h" //Qt -#include <QtCore/QDebug> #include <QtCore/QString> #include <QtCore/QDate> #include <QtGui/QTreeWidget> @@ -35,6 +34,7 @@ #include <QtGui/QHeaderView> //KDE +#include <KDebug> #include <KIcon> #include <KLineEdit> #include <KDateWidget> @@ -332,7 +332,7 @@ void HistoryDock::updateLinkedToDate(QDate date) ///Generate serializerd version of the content QMimeData* HistoryTree::mimeData( const QList<QTreeWidgetItem *> items) const { - qDebug() << "An history call is being dragged"; + kDebug() << "An history call is being dragged"; if (items.size() < 1) { return NULL; } @@ -347,7 +347,7 @@ QMimeData* HistoryTree::mimeData( const QList<QTreeWidgetItem *> items) const } } else { - qDebug() << "the item is not a call"; + kDebug() << "the item is not a call"; } return mimeData; } @@ -361,7 +361,7 @@ bool HistoryTree::dropMimeData(QTreeWidgetItem *parent, int index, const QMimeDa QByteArray encodedData = data->data(MIME_CALLID); - qDebug() << "In history import"<< QString(encodedData); + kDebug() << "In history import"<< QString(encodedData); return false; } diff --git a/kde/src/widgets/HistoryTreeItem.cpp b/kde/src/widgets/HistoryTreeItem.cpp index ca2e03a1a2..f082620898 100644 --- a/kde/src/widgets/HistoryTreeItem.cpp +++ b/kde/src/widgets/HistoryTreeItem.cpp @@ -186,14 +186,14 @@ void HistoryTreeItem::showContext(const QPoint& pos) void HistoryTreeItem::sendEmail() { //TODO - qDebug() << "Sending email"; + kDebug() << "Sending email"; } ///Call the caller again void HistoryTreeItem::callAgain() { if (m_pItemCall) { - qDebug() << "Calling "<< m_pItemCall->getPeerPhoneNumber(); + kDebug() << "Calling "<< m_pItemCall->getPeerPhoneNumber(); } SFLPhone::model()->addDialingCall(m_Name, SFLPhone::app()->model()->getCurrentAccountId())->setCallNumber(m_PhoneNumber); } @@ -202,13 +202,13 @@ void HistoryTreeItem::callAgain() void HistoryTreeItem::copy() { //TODO - qDebug() << "Copying contact"; + kDebug() << "Copying contact"; } ///Create a contact from those informations void HistoryTreeItem::addContact() { - qDebug() << "Adding contact"; + kDebug() << "Adding contact"; Contact* aContact = new Contact(); aContact->setPhoneNumbers(PhoneNumbers() << new Contact::PhoneNumber(m_PhoneNumber, "Home")); aContact->setFormattedName(m_Name); @@ -219,13 +219,12 @@ void HistoryTreeItem::addContact() void HistoryTreeItem::addToContact() { //TODO - qDebug() << "Adding to contact"; + kDebug() << "Adding to contact"; } ///Bookmark this contact void HistoryTreeItem::bookmark() { - qDebug() << "bookmark"; SFLPhone::app()->bookmarkDock()->addBookmark(m_PhoneNumber); } diff --git a/kde/src/widgets/SFLPhoneTray.cpp b/kde/src/widgets/SFLPhoneTray.cpp index 26115577bf..01e72c3ee6 100755 --- a/kde/src/widgets/SFLPhoneTray.cpp +++ b/kde/src/widgets/SFLPhoneTray.cpp @@ -23,11 +23,11 @@ #include "SFLPhoneTray.h" //Qt -#include <QtCore/QDebug> #include <QtGui/QMenu> #include <QtGui/QIcon> //KDE +#include <KDebug> #include <KAction> ///Constructor @@ -47,7 +47,7 @@ SFLPhoneTray::~SFLPhoneTray() bool SFLPhoneTray::initialize() { if ( m_Init ) { - qDebug() << "Already initialized."; + kDebug() << "Already initialized."; return false; } -- GitLab