| 13 | #include <QDebug> |
| 14 | |
| 15 | CICE::CICE(QObject *parent) |
| 16 | : QObject{parent}, |
| 17 | m_Log("Channel.ICE") |
| 18 | { |
| 19 | bool check = false; |
| 20 | QString szTranslatorFile = RabbitCommon::CDir::Instance()->GetDirTranslations() |
| 21 | + "/Channel_" + QLocale::system().name() + ".qm"; |
| 22 | if(!m_Translator.load(szTranslatorFile)) |
| 23 | qCritical(m_Log) << "Open translator file fail:" << szTranslatorFile; |
| 24 | qApp->installTranslator(&m_Translator); |
| 25 | |
| 26 | #ifdef HAVE_QXMPP |
| 27 | m_Signal = QSharedPointer<CIceSignal>(new CIceSignalQxmpp(this)); |
| 28 | if(m_Signal) |
| 29 | { |
| 30 | check = connect(m_Signal.data(), SIGNAL(sigConnected()), |
| 31 | this, SLOT(slotConnected())); |
| 32 | Q_ASSERT(check); |
| 33 | check = connect(m_Signal.data(), SIGNAL(sigDisconnected()), |
| 34 | this, SLOT(slotDisconnected())); |
| 35 | Q_ASSERT(check); |
| 36 | check = connect(m_Signal.data(), SIGNAL(sigError(int, const QString&)), |
| 37 | this, SLOT(slotError(int, const QString&))); |
| 38 | Q_ASSERT(check); |
| 39 | } |
| 40 | #endif |
| 41 | |
| 42 | #ifdef HAVE_ICE |
| 43 | check = connect(GetParameter(), SIGNAL(sigIceDebugChanged(bool)), |
| 44 | &g_LogCallback, SLOT(slotEnable(bool))); |
| 45 | Q_ASSERT(check); |
| 46 | g_LogCallback.slotEnable(GetParameter()->GetIceDebug()); |
| 47 | #endif |
| 48 | } |
| 49 | |
| 50 | CICE::~CICE() |
| 51 | { |
nothing calls this directly
no test coverage detected