mirror-chatterino2/src/messages/Link.cpp

28 lines
351 B
C++
Raw Normal View History

2018-06-26 14:09:39 +02:00
#include "messages/Link.hpp"
2017-01-18 21:30:23 +01:00
2017-04-14 17:52:22 +02:00
namespace chatterino {
2017-01-05 16:07:20 +01:00
Link::Link()
2017-01-18 04:33:30 +01:00
: type(None)
, value(QString())
2017-01-05 20:49:33 +01:00
{
}
2017-09-21 12:15:01 +02:00
Link::Link(Type _type, const QString &_value)
: type(_type)
, value(_value)
2017-01-05 16:07:20 +01:00
{
}
2017-09-21 12:15:01 +02:00
bool Link::isValid() const
{
return this->type != None;
}
bool Link::isUrl() const
{
return this->type == Url;
}
} // namespace chatterino