X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=tpsession-0.1%2Ftpsession%2Ftpsession.cpp;h=93a2989547c10ec48117aa6e17c5abacac0b0dd1;hb=f07bfbb28b7f1e02e46f7fc94cd500f47c9bf822;hp=20a69cdc2b463883e91e576a6c17c580e15a68c5;hpb=e7bf1c2870de918858d82eb2f8f13c991a1ac7ff;p=tpsession diff --git a/tpsession-0.1/tpsession/tpsession.cpp b/tpsession-0.1/tpsession/tpsession.cpp index 20a69cd..93a2989 100644 --- a/tpsession-0.1/tpsession/tpsession.cpp +++ b/tpsession-0.1/tpsession/tpsession.cpp @@ -71,6 +71,10 @@ TpSession::TpSession(QString cmname,bool synchronous) Tp::enableDebug(false); Tp::enableWarnings(false); + QProcessEnvironment env; + tpsdebug=env.systemEnvironment().contains("TPSESSION_DEBUG"); + if(tpsdebug) qDebug() << "Tpsession debug:" << tpsDebug(); + mAM = Tp::AccountManager::create(); reqCm=cmname; sync=synchronous; @@ -87,6 +91,7 @@ TpSession::TpSession(QString cmname,bool synchronous) } TpSession* TpSession::instancePtr=NULL; +bool TpSession::tpsdebug=false; /** * Returns pointer to TpSession singleton. If there is not yet TpSession Object, creates it with "Ring" connection manager as default * @@ -99,6 +104,11 @@ TpSession* TpSession::instance(bool synchronous) return instancePtr; }; +bool TpSession::tpsDebug() +{ + return tpsdebug; +} + void TpSession::onAMReady(Tp::PendingOperation *op) { Q_UNUSED(op);