[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [ruqola] /: Coding style
From: Laurent Montel <null () kde ! org>
Date: 2018-01-31 21:23:36
Message-ID: E1egzqy-0002ZK-Rm () code ! kde ! org
[Download RAW message or body]
Git commit c48860f00d842668ac6d3d9cacdebd9035c8535e by Laurent Montel.
Committed on 31/01/2018 at 21:22.
Pushed by mlaurent into branch 'master'.
Coding style
M +0 -2 autotests/emojimanagertest.cpp
M +4 -2 autotests/textconvertertest.cpp
M +6 -6 src/emoji.cpp
M +0 -1 src/rocketchataccount.cpp
M +2 -0 src/rocketchatmessage.cpp
M +1 -1 src/user.cpp
M +0 -1 src/user.h
M +0 -1 src/utils.cpp
https://commits.kde.org/ruqola/c48860f00d842668ac6d3d9cacdebd9035c8535e
diff --git a/autotests/emojimanagertest.cpp b/autotests/emojimanagertest.cpp
index 7018946..2873f1e 100644
--- a/autotests/emojimanagertest.cpp
+++ b/autotests/emojimanagertest.cpp
@@ -84,7 +84,6 @@ void EmojiManagerTest::shouldGenerateHtml()
//It exists
QCOMPARE(manager.html(QStringLiteral(":react_rocket:")), QStringLiteral("<img \
height='22' width='22' src='http://www.kde.org/emoji-custom/react_rocket.png'/>"));
-
QCOMPARE(manager.html(QStringLiteral(":totoro:")), QStringLiteral("<img \
height='22' width='22' src='http://www.kde.org/emoji-custom/totoro.gif'/>"));
//Test aliases
@@ -113,5 +112,4 @@ void EmojiManagerTest::shouldChangeServerUrl()
serverUrl = QStringLiteral("www.bla.org");
manager.setServerUrl(serverUrl);
QCOMPARE(manager.html(QStringLiteral(":react_rocket:")), QStringLiteral("<img \
height='22' width='22' \
src='http://%1/emoji-custom/react_rocket.png'/>").arg(serverUrl));
-
}
diff --git a/autotests/textconvertertest.cpp b/autotests/textconvertertest.cpp
index baf6740..45ab78c 100644
--- a/autotests/textconvertertest.cpp
+++ b/autotests/textconvertertest.cpp
@@ -60,12 +60,14 @@ void TextConverterTest::shouldConvertTextWithEmoji_data()
<< QStringLiteral("<img height='22' \
width='22' src='http://www.kde.org/emoji-custom/totoro.gif'/>")
<< QStringLiteral("www.kde.org");
QTest::newRow("customemojiwithmanager2") << QStringLiteral(":totoro::totoro:")
- << QStringLiteral("<img height='22' \
width='22' src='http://www.kde.org/emoji-custom/totoro.gif'/><img height='22' \
width='22' src='http://www.kde.org/emoji-custom/totoro.gif'/>") + \
<< QStringLiteral( + "<img height='22' width='22' \
src='http://www.kde.org/emoji-custom/totoro.gif'/><img height='22' width='22' \
src='http://www.kde.org/emoji-custom/totoro.gif'/>")
<< QStringLiteral("www.kde.org");
//Use server with http://
QTest::newRow("customemojiwithmanager2") << QStringLiteral(":totoro::totoro:")
- << QStringLiteral("<img height='22' \
width='22' src='http://www.kde.org/emoji-custom/totoro.gif'/><img height='22' \
width='22' src='http://www.kde.org/emoji-custom/totoro.gif'/>") + \
<< QStringLiteral( + "<img height='22' width='22' \
src='http://www.kde.org/emoji-custom/totoro.gif'/><img height='22' width='22' \
src='http://www.kde.org/emoji-custom/totoro.gif'/>")
<< \
QStringLiteral("http://www.kde.org"); //TODO add alias support too
}
diff --git a/src/emoji.cpp b/src/emoji.cpp
index bcb7879..d78d0ff 100644
--- a/src/emoji.cpp
+++ b/src/emoji.cpp
@@ -33,7 +33,7 @@ Emoji::~Emoji()
bool Emoji::hasEmoji(const QString &identifier) const
{
- return ((mEmojiIdentifier == identifier) || mAliases.contains(identifier));
+ return (mEmojiIdentifier == identifier) || mAliases.contains(identifier);
}
void Emoji::parseEmoji(const QJsonObject &emoji)
@@ -138,11 +138,11 @@ QString Emoji::name() const
bool Emoji::operator==(const Emoji &other) const
{
- return (mName == other.name()) &&
- (mExtension == other.extension()) &&
- (mIdentifier == other.identifier() &&
- (mAliases == other.aliases()) &&
- (mEmojiIdentifier == other.emojiIdentifier()));
+ return (mName == other.name())
+ && (mExtension == other.extension())
+ && (mIdentifier == other.identifier()
+ && (mAliases == other.aliases())
+ && (mEmojiIdentifier == other.emojiIdentifier()));
}
Emoji &Emoji::operator=(const Emoji &other)
diff --git a/src/rocketchataccount.cpp b/src/rocketchataccount.cpp
index 8cdc72b..e498748 100644
--- a/src/rocketchataccount.cpp
+++ b/src/rocketchataccount.cpp
@@ -658,7 +658,6 @@ void RocketChatAccount::parseOtr(const QJsonArray &contents)
const Otr t = mOtrManager->parseOtr(contents);
qDebug() << " void RocketChatAccount::parseOtr(const QJsonArray &contents)"<<t;
//TODO add notification ?
-
}
void RocketChatAccount::sendNotification(const QJsonArray &contents)
diff --git a/src/rocketchatmessage.cpp b/src/rocketchatmessage.cpp
index 7c07b14..070763e 100644
--- a/src/rocketchatmessage.cpp
+++ b/src/rocketchatmessage.cpp
@@ -226,6 +226,7 @@ RocketChatMessage::RocketChatMessageResult \
RocketChatMessage::setRoomJoinCode(co {
return saveRoomSettings(QStringLiteral("joinCode"), roomId, joinCode, id);
}
+
//TODO verify
RocketChatMessage::RocketChatMessageResult RocketChatMessage::blockUser(const \
QString &userId, quint64 id) {
@@ -234,6 +235,7 @@ RocketChatMessage::RocketChatMessageResult \
RocketChatMessage::blockUser(const QS }};
return generateMethod(QStringLiteral("unblockUser"), QJsonDocument(params), id);
}
+
//TODO verify
RocketChatMessage::RocketChatMessageResult RocketChatMessage::unblockUser(const \
QString &userId, quint64 id) {
diff --git a/src/user.cpp b/src/user.cpp
index 3cc8b91..c06b950 100644
--- a/src/user.cpp
+++ b/src/user.cpp
@@ -74,7 +74,7 @@ bool User::operator ==(const User &other) const
return (mName == other.name())
&& (mUserId == other.userId())
&& (mStatus == other.status())
- && (mUserName == other.userName());
+ && (mUserName == other.userName());
}
bool User::operator !=(const User &other) const
diff --git a/src/user.h b/src/user.h
index da6dcb0..01b8862 100644
--- a/src/user.h
+++ b/src/user.h
@@ -54,7 +54,6 @@ public:
QString status() const;
void setStatus(const QString &status);
-
void parseUser(const QJsonObject &json);
Q_INVOKABLE QString iconFromStatus() const;
diff --git a/src/utils.cpp b/src/utils.cpp
index d9d41fd..dea1d93 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -134,4 +134,3 @@ void Utils::parseNotification(const QJsonArray &contents, QString \
&message, QStr
qCDebug(RUQOLA_LOG) << "Problem with notication json: missing payload";
}
}
-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic