Skip to content
Snippets Groups Projects
Unverified Commit e326a1c1 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

misc: fix build dbus

Change-Id: Ic74e3a79ff5c79d48f4c4ab76eb0be690d296a0b
parent e7a23695
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,7 @@ LRCInstance::LRCInstance(migrateCallback willMigrateCb, ...@@ -36,6 +36,7 @@ LRCInstance::LRCInstance(migrateCallback willMigrateCb,
, updateManager_(std::make_unique<UpdateManager>(updateUrl, connectivityMonitor, this)) , updateManager_(std::make_unique<UpdateManager>(updateUrl, connectivityMonitor, this))
, threadPool_(new QThreadPool(this)) , threadPool_(new QThreadPool(this))
{ {
debugMode_ = !muteDring;
threadPool_->setMaxThreadCount(1); threadPool_->setMaxThreadCount(1);
connect(this, &LRCInstance::currentAccountIdChanged, [this] { connect(this, &LRCInstance::currentAccountIdChanged, [this] {
......
...@@ -125,6 +125,11 @@ public: ...@@ -125,6 +125,11 @@ public:
void set_selectedConvUid(QString selectedConvUid = ""); void set_selectedConvUid(QString selectedConvUid = "");
Q_INVOKABLE bool debugMode() const
{
return debugMode_;
}
Q_SIGNALS: Q_SIGNALS:
void accountListChanged(); void accountListChanged();
void selectedConvUidChanged(); void selectedConvUidChanged();
...@@ -145,6 +150,8 @@ private: ...@@ -145,6 +150,8 @@ private:
conversation::Info invalid {}; conversation::Info invalid {};
bool debugMode_ {false};
QThreadPool* threadPool_; QThreadPool* threadPool_;
}; };
Q_DECLARE_METATYPE(LRCInstance*) Q_DECLARE_METATYPE(LRCInstance*)
...@@ -40,7 +40,7 @@ Rectangle { ...@@ -40,7 +40,7 @@ Rectangle {
errorLabel.text = CurrentConversation.errors[0] errorLabel.text = CurrentConversation.errors[0]
backendErrorToolTip.text = JamiStrings.backendError.arg(CurrentConversation.backendErrors[0]) backendErrorToolTip.text = JamiStrings.backendError.arg(CurrentConversation.backendErrors[0])
} }
errorRect.visible = CurrentConversation.errors.length > 0 errorRect.visible = CurrentConversation.errors.length > 0 // If too much noise: && LRCInstance.debugMode()
} }
} }
......
...@@ -341,7 +341,7 @@ CallbacksHandler::CallbacksHandler(const Lrc& parent) ...@@ -341,7 +341,7 @@ CallbacksHandler::CallbacksHandler(const Lrc& parent)
&CallbacksHandler::slotConversationMemberEvent, &CallbacksHandler::slotConversationMemberEvent,
Qt::QueuedConnection); Qt::QueuedConnection);
connect(&ConfigurationManager::instance(), connect(&ConfigurationManager::instance(),
&ConfigurationManagerInterface::conversationError, &ConfigurationManagerInterface::onConversationError,
this, this,
&CallbacksHandler::slotOnConversationError, &CallbacksHandler::slotOnConversationError,
Qt::QueuedConnection); Qt::QueuedConnection);
...@@ -536,7 +536,8 @@ CallbacksHandler::slotIncomingMessage(const QString& accountId, ...@@ -536,7 +536,8 @@ CallbacksHandler::slotIncomingMessage(const QString& accountId,
for (auto& e : interaction.toStdMap()) { for (auto& e : interaction.toStdMap()) {
if (e.first.contains("x-ring/ring.profile.vcard")) { if (e.first.contains("x-ring/ring.profile.vcard")) {
auto decodedHead = QUrl::fromPercentEncoding(e.first.toLatin1()); auto decodedHead = QUrl::fromPercentEncoding(e.first.toLatin1());
QRegularExpression re("x-ring/ring.profile.vcard;id=([A-z0-9]+),part=([0-9]+),of=([0-9]+)"); QRegularExpression re(
"x-ring/ring.profile.vcard;id=([A-z0-9]+),part=([0-9]+),of=([0-9]+)");
auto match = re.match(decodedHead); auto match = re.match(decodedHead);
if (!match.hasMatch()) if (!match.hasMatch())
...@@ -798,9 +799,9 @@ CallbacksHandler::slotConversationMemberEvent(const QString& accountId, ...@@ -798,9 +799,9 @@ CallbacksHandler::slotConversationMemberEvent(const QString& accountId,
void void
CallbacksHandler::slotOnConversationError(const QString& accountId, CallbacksHandler::slotOnConversationError(const QString& accountId,
const QString& conversationId, const QString& conversationId,
int code, int code,
const QString& what) const QString& what)
{ {
Q_EMIT conversationError(accountId, conversationId, code, what); Q_EMIT conversationError(accountId, conversationId, code, what);
} }
......
...@@ -334,10 +334,10 @@ public: ...@@ -334,10 +334,10 @@ public:
const std::string& conversationId, const std::string& conversationId,
int code, int code,
const std::string& what) { const std::string& what) {
Q_EMIT conversationError(QString(accountId.c_str()), Q_EMIT onConversationError(QString(accountId.c_str()),
QString(conversationId.c_str()), QString(conversationId.c_str()),
code, code,
QString(what.c_str())); QString(what.c_str()));
})}; })};
} }
...@@ -1200,10 +1200,10 @@ Q_SIGNALS: // SIGNALS ...@@ -1200,10 +1200,10 @@ Q_SIGNALS: // SIGNALS
const QString& conversationId, const QString& conversationId,
const QString& memberId, const QString& memberId,
int event); int event);
void conversationError(const QString& accountId, void onConversationError(const QString& accountId,
const QString& conversationId, const QString& conversationId,
int code, int code,
const QString& what); const QString& what);
}; };
namespace org { namespace org {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment