reformat code

This commit is contained in:
Rasmus Karlsson
2017-07-31 00:57:42 +02:00
parent 0088374694
commit 626002c8ff
11 changed files with 149 additions and 127 deletions
+9 -5
View File
@@ -16,7 +16,7 @@ MessageBuilder::MessageBuilder()
SharedMessage MessageBuilder::build()
{
return SharedMessage(new Message(this->originalMessage, _words,highlight));
return SharedMessage(new Message(this->originalMessage, _words, highlight));
}
void MessageBuilder::appendWord(const Word &word)
@@ -31,7 +31,8 @@ void MessageBuilder::appendTimestamp()
appendTimestamp(t);
}
void MessageBuilder::setHighlight(const bool &value){
void MessageBuilder::setHighlight(const bool &value)
{
highlight = value;
}
@@ -58,9 +59,12 @@ void MessageBuilder::appendTimestamp(time_t time)
QString MessageBuilder::matchLink(const QString &string)
{
QString match = regex.match(string,0,QRegularExpression::PartialPreferCompleteMatch,QRegularExpression::NoMatchOption).captured();
if(!match.contains(QRegularExpression("\\bhttps?:\/\/"))){
match.insert(0,"https://");
QString match = regex
.match(string, 0, QRegularExpression::PartialPreferCompleteMatch,
QRegularExpression::NoMatchOption)
.captured();
if (!match.contains(QRegularExpression("\\bhttps?:\/\/"))) {
match.insert(0, "https://");
}
return match;
}