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