1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor(chatmessage): Delete duplicate enum MarkdownType

This commit is contained in:
Diadlo 2016-04-13 23:26:50 +03:00
parent ad2726802f
commit 446626dabe
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
2 changed files with 2 additions and 9 deletions

View File

@ -57,7 +57,7 @@ ChatMessage::Ptr ChatMessage::createChatMessage(const QString &sender, const QSt
text = detectQuotes(detectAnchors(text), type);
//markdown
if (Settings::getInstance().getMarkdownPreference() != MarkdownType::NONE)
if (Settings::getInstance().getMarkdownPreference() != NONE)
text = detectMarkdown(text);
switch(type)
@ -209,7 +209,7 @@ QString ChatMessage::detectMarkdown(const QString &str)
{
int mul = 0; // Determines how many characters to strip from markdown text
// Set mul depending on markdownPreference
if (Settings::getInstance().getMarkdownPreference() == MarkdownType::WITHOUT_CHARS)
if (Settings::getInstance().getMarkdownPreference() == WITHOUT_CHARS)
mul = 2;
// Match captured string to corresponding md format

View File

@ -45,13 +45,6 @@ public:
ALERT,
};
enum MarkdownType
{
NONE,
WITH_CHARS,
WITHOUT_CHARS,
};
ChatMessage();
static ChatMessage::Ptr createChatMessage(const QString& sender, const QString& rawMessage, MessageType type, bool isMe, const QDateTime& date = QDateTime());