diff --git a/src/devicesmodel.cpp b/src/devicesmodel.cpp index a829cf141..14a3a3d9b 100644 --- a/src/devicesmodel.cpp +++ b/src/devicesmodel.cpp @@ -74,9 +74,9 @@ void DevicesModel::logout(int index, const QString &password) authData["identifier"] = identifier; auto *innerJob = Controller::instance().activeConnection()->callApi(m_devices[index].deviceId, authData); connect(innerJob, &BaseJob::success, this, [this, index]() { - Q_EMIT beginRemoveRows(QModelIndex(), index, index); + beginRemoveRows(QModelIndex(), index, index); m_devices.remove(index); - Q_EMIT endRemoveRows(); + endRemoveRows(); }); } }); @@ -86,12 +86,12 @@ void DevicesModel::setName(int index, const QString &name) { auto job = Controller::instance().activeConnection()->callApi(m_devices[index].deviceId, name); QString oldName = m_devices[index].displayName; - Q_EMIT beginResetModel(); + beginResetModel(); m_devices[index].displayName = name; - Q_EMIT endResetModel(); + endResetModel(); connect(job, &BaseJob::failure, this, [=]() { - Q_EMIT beginResetModel(); + beginResetModel(); m_devices[index].displayName = oldName; - Q_EMIT endResetModel(); + endResetModel(); }); } diff --git a/src/spellcheckhighlighter.cpp b/src/spellcheckhighlighter.cpp index 3aac861a5..f844cc672 100644 --- a/src/spellcheckhighlighter.cpp +++ b/src/spellcheckhighlighter.cpp @@ -85,10 +85,10 @@ SpellcheckHighlighter::SpellcheckHighlighter(QObject *parent) , m_cursorPosition(-1) { // Danger red from our color scheme - mErrorFormat.setForeground(QColor{"#ed1515"}); - mErrorFormat.setUnderlineColor(QColor{"#ed1515"}); + mErrorFormat.setForeground(QColor(0xED, 0x15, 0x15)); + mErrorFormat.setUnderlineColor(QColor(0xED, 0x15, 0x15)); mErrorFormat.setUnderlineStyle(QTextCharFormat::SingleUnderline); - mQuoteFormat.setForeground(QColor{"#7f8c8d"}); + mQuoteFormat.setForeground(QColor(0x7F, 0x8C, 0x8D)); #ifndef Q_OS_ANDROID if (!mSpellchecker->isValid()) { qWarning() << "Spellchecker is invalid";