Some more clazy fixes
This commit is contained in:
@@ -126,8 +126,8 @@ void ActionsHandler::postMessage(const QString &text,
|
||||
static const QString lennyPrefix = QStringLiteral("/lenny");
|
||||
static const QString tableflipPrefix = QStringLiteral("/tableflip");
|
||||
static const QString unflipPrefix = QStringLiteral("/unflip");
|
||||
static const QString plainPrefix = QStringLiteral("/plain "); // TODO
|
||||
static const QString htmlPrefix = QStringLiteral("/html "); // TODO
|
||||
//static const QString plainPrefix = QStringLiteral("/plain "); // TODO
|
||||
//static const QString htmlPrefix = QStringLiteral("/html "); // TODO
|
||||
static const QString rainbowPrefix = QStringLiteral("/rainbow ");
|
||||
static const QString rainbowmePrefix = QStringLiteral("/rainbowme ");
|
||||
static const QString spoilerPrefix = QStringLiteral("/spoiler ");
|
||||
@@ -135,12 +135,12 @@ void ActionsHandler::postMessage(const QString &text,
|
||||
static const QString noticePrefix = QStringLiteral("/notice ");
|
||||
|
||||
// Actions commands
|
||||
static const QString ddgPrefix = QStringLiteral("/ddg "); // TODO
|
||||
static const QString nickPrefix = QStringLiteral("/nick "); // TODO
|
||||
static const QString meroomnickPrefix = QStringLiteral("/myroomnick "); // TODO
|
||||
static const QString roomavatarPrefix = QStringLiteral("/roomavatar "); // TODO
|
||||
static const QString myroomavatarPrefix = QStringLiteral("/myroomavatar "); // TODO
|
||||
static const QString myavatarPrefix = QStringLiteral("/myavatar "); // TODO
|
||||
//static const QString ddgPrefix = QStringLiteral("/ddg "); // TODO
|
||||
//static const QString nickPrefix = QStringLiteral("/nick "); // TODO
|
||||
//static const QString meroomnickPrefix = QStringLiteral("/myroomnick "); // TODO
|
||||
//static const QString roomavatarPrefix = QStringLiteral("/roomavatar "); // TODO
|
||||
//static const QString myroomavatarPrefix = QStringLiteral("/myroomavatar "); // TODO
|
||||
//static const QString myavatarPrefix = QStringLiteral("/myavatar "); // TODO
|
||||
static const QString invitePrefix = QStringLiteral("/invite ");
|
||||
static const QString joinPrefix = QStringLiteral("/join ");
|
||||
static const QString joinShortPrefix = QStringLiteral("/j ");
|
||||
@@ -148,8 +148,8 @@ void ActionsHandler::postMessage(const QString &text,
|
||||
static const QString leavePrefix = QStringLiteral("/leave");
|
||||
static const QString ignorePrefix = QStringLiteral("/ignore ");
|
||||
static const QString unignorePrefix = QStringLiteral("/unignore ");
|
||||
static const QString queryPrefix = QStringLiteral("/query "); // TODO
|
||||
static const QString msgPrefix = QStringLiteral("/msg "); // TODO
|
||||
//static const QString queryPrefix = QStringLiteral("/query "); // TODO
|
||||
//static const QString msgPrefix = QStringLiteral("/msg "); // TODO
|
||||
static const QString reactPrefix = QStringLiteral("/react ");
|
||||
|
||||
// Admin commands
|
||||
|
||||
@@ -55,7 +55,7 @@ void NotificationsManager::postNotification(NeoChatRoom *room,
|
||||
notification->setPixmap(img);
|
||||
|
||||
notification->setDefaultAction(i18n("Open NeoChat in this room"));
|
||||
connect(notification, &KNotification::defaultActivated, this, [this, room]() {
|
||||
connect(notification, &KNotification::defaultActivated, this, [&]() {
|
||||
RoomManager::instance().enterRoom(room);
|
||||
Q_EMIT Controller::instance().showWindow();
|
||||
});
|
||||
@@ -63,7 +63,7 @@ void NotificationsManager::postNotification(NeoChatRoom *room,
|
||||
#if KNOTIFICATIONS_VERSION >= QT_VERSION_CHECK(5, 81, 0)
|
||||
std::unique_ptr<KNotificationReplyAction> replyAction(new KNotificationReplyAction(i18n("Reply")));
|
||||
replyAction->setPlaceholderText(i18n("Reply..."));
|
||||
QObject::connect(replyAction.get(), &KNotificationReplyAction::replied, [room, replyEventId](const QString &text) {
|
||||
connect(replyAction.get(), &KNotificationReplyAction::replied, this, [room, replyEventId](const QString &text) {
|
||||
room->postMessage(text, room->preprocessText(text), RoomMessageEvent::MsgType::Text, replyEventId, QString());
|
||||
});
|
||||
notification->setReplyAction(std::move(replyAction));
|
||||
|
||||
@@ -477,7 +477,7 @@ bool RoomListModel::categoryVisible(int category) const
|
||||
|
||||
NeoChatRoom *RoomListModel::roomByAliasOrId(const QString &aliasOrId)
|
||||
{
|
||||
for (const auto &room : m_rooms) {
|
||||
for (const auto &room : qAsConst(m_rooms)) {
|
||||
if (room->aliases().contains(aliasOrId) || room->id() == aliasOrId) {
|
||||
return room;
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ void KWebShortcutModel::setSelectedText(const QString &selectedText)
|
||||
|
||||
int KWebShortcutModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
#ifdef HAVE_KIO
|
||||
if (d->selectedText.count() > 0) {
|
||||
return d->searchProviders.count();
|
||||
|
||||
Reference in New Issue
Block a user