mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Switch some c-style includes to c++-style includes (i.e. stdint.h to
cstdint) Make MessageElement to a class to fit better with the derived classes. Make MessageLayoutElement to a class to fit better with the derived classes. Remove virtual from override functions Replace all instances of boost::signals2 with pajlada::Signals. This lets us properly use clang code model to check for issues. Add missing virtual destructor to AbstractIrcServer Add missing virtual destructor to MessageLayoutElement Remove unused "connectedConnection" connection in TwitchChannel Fix typo in TrimChannelName function Fix typo in MessageParseArgs Replace some raw pointers with unique pointers where it made more sense. This allowed us to remove some manually written destructors whose only purpose was to delete that raw pointer. Reformat: Add namespace comments Reformat: Add empty empty lines between main namespace beginning and end Reformat: Re-order includes Reformat: Fix some includes that used quotes where they should use angle brackets Reformat: Replace some typedef's with using's Filter out more useless warnings
This commit is contained in:
parent
5bcb561eb2
commit
adf3ff3075
|
@ -313,12 +313,16 @@ win32-msvc* {
|
|||
# 4127 - conditional expression is constant
|
||||
# 4503 - decorated name length exceeded, name was truncated
|
||||
# 4100 - unreferences formal parameter
|
||||
# 4305 - possible truncation of data
|
||||
# 4267 - possible loss of data in return
|
||||
QMAKE_CXXFLAGS_WARN_ON += /wd4714
|
||||
QMAKE_CXXFLAGS_WARN_ON += /wd4996
|
||||
QMAKE_CXXFLAGS_WARN_ON += /wd4505
|
||||
QMAKE_CXXFLAGS_WARN_ON += /wd4127
|
||||
QMAKE_CXXFLAGS_WARN_ON += /wd4503
|
||||
QMAKE_CXXFLAGS_WARN_ON += /wd4100
|
||||
QMAKE_CXXFLAGS_WARN_ON += /wd4305
|
||||
QMAKE_CXXFLAGS_WARN_ON += /wd4267
|
||||
|
||||
} else {
|
||||
QMAKE_CXXFLAGS_WARN_ON = -Wall
|
||||
|
|
|
@ -61,10 +61,10 @@ void Channel::addMessage(MessagePtr message)
|
|||
singletons::LoggingManager::getInstance().addMessage(this->name, message);
|
||||
|
||||
if (this->messages.pushBack(message, deleted)) {
|
||||
this->messageRemovedFromStart(deleted);
|
||||
this->messageRemovedFromStart.invoke(deleted);
|
||||
}
|
||||
|
||||
this->messageAppended(message);
|
||||
this->messageAppended.invoke(message);
|
||||
}
|
||||
|
||||
void Channel::addMessagesAtStart(std::vector<messages::MessagePtr> &_messages)
|
||||
|
@ -72,7 +72,7 @@ void Channel::addMessagesAtStart(std::vector<messages::MessagePtr> &_messages)
|
|||
std::vector<messages::MessagePtr> addedMessages = this->messages.pushFront(_messages);
|
||||
|
||||
if (addedMessages.size() != 0) {
|
||||
this->messagesAddedAtStart(addedMessages);
|
||||
this->messagesAddedAtStart.invoke(addedMessages);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ void Channel::replaceMessage(messages::MessagePtr message, messages::MessagePtr
|
|||
int index = this->messages.replaceItem(message, replacement);
|
||||
|
||||
if (index >= 0) {
|
||||
this->messageReplaced((size_t)index, replacement);
|
||||
this->messageReplaced.invoke((size_t)index, replacement);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
#include <boost/signals2.hpp>
|
||||
#include <pajlada/signals/signal.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
struct Message;
|
||||
}
|
||||
} // namespace messages
|
||||
|
||||
class Channel : public std::enable_shared_from_this<Channel>
|
||||
{
|
||||
|
@ -27,10 +27,10 @@ public:
|
|||
|
||||
pajlada::Signals::Signal<const QString &, const QString &> sendMessageSignal;
|
||||
|
||||
boost::signals2::signal<void(messages::MessagePtr &)> messageRemovedFromStart;
|
||||
boost::signals2::signal<void(messages::MessagePtr &)> messageAppended;
|
||||
boost::signals2::signal<void(std::vector<messages::MessagePtr> &)> messagesAddedAtStart;
|
||||
boost::signals2::signal<void(size_t index, messages::MessagePtr &)> messageReplaced;
|
||||
pajlada::Signals::Signal<messages::MessagePtr &> messageRemovedFromStart;
|
||||
pajlada::Signals::Signal<messages::MessagePtr &> messageAppended;
|
||||
pajlada::Signals::Signal<std::vector<messages::MessagePtr> &> messagesAddedAtStart;
|
||||
pajlada::Signals::Signal<size_t, messages::MessagePtr &> messageReplaced;
|
||||
pajlada::Signals::NoArgSignal destroyed;
|
||||
|
||||
virtual bool isEmpty() const;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#include "debug/log.hpp"
|
||||
|
||||
#include <QString>
|
||||
#include <boost/preprocessor.hpp>
|
||||
#include <string>
|
||||
|
||||
#include "debug/log.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <QByteArray>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
inline QByteArray getDefaultClientID()
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include <boost/noncopyable.hpp>
|
||||
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace chatterino {
|
|||
namespace messages {
|
||||
|
||||
namespace layouts {
|
||||
struct MessageLayoutElement;
|
||||
class MessageLayoutElement;
|
||||
|
||||
struct Margin {
|
||||
int top;
|
||||
|
|
|
@ -102,9 +102,9 @@ void ImageLayoutElement::paintAnimated(QPainter &painter, int yOffset)
|
|||
|
||||
if (pixmap != nullptr) {
|
||||
// fourtf: make it use qreal values
|
||||
QRect rect = this->getRect();
|
||||
rect.moveTop(rect.y() + yOffset);
|
||||
painter.drawPixmap(QRectF(rect), *pixmap, QRectF());
|
||||
QRect _rect = this->getRect();
|
||||
_rect.moveTop(_rect.y() + yOffset);
|
||||
painter.drawPixmap(QRectF(_rect), *pixmap, QRectF());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -240,8 +240,8 @@ void TextIconLayoutElement::paint(QPainter &painter)
|
|||
option.setAlignment(Qt::AlignHCenter);
|
||||
|
||||
if (this->line2.isEmpty()) {
|
||||
QRect rect(this->getRect());
|
||||
painter.drawText(rect, this->line1, option);
|
||||
QRect _rect(this->getRect());
|
||||
painter.drawText(_rect, this->line1, option);
|
||||
} else {
|
||||
painter.drawText(
|
||||
QPoint(this->getRect().x(), this->getRect().y() + this->getRect().height() / 2),
|
||||
|
|
|
@ -15,14 +15,16 @@ class QPainter;
|
|||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
struct MessageElement;
|
||||
class MessageElement;
|
||||
class Image;
|
||||
|
||||
namespace layouts {
|
||||
|
||||
struct MessageLayoutElement : boost::noncopyable {
|
||||
class MessageLayoutElement : boost::noncopyable
|
||||
{
|
||||
public:
|
||||
MessageLayoutElement(MessageElement &creator, const QSize &size);
|
||||
virtual ~MessageLayoutElement() = default;
|
||||
|
||||
const QRect &getRect() const;
|
||||
MessageElement &getCreator() const;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "QDebug"
|
||||
|
||||
#include "messages/limitedqueuesnapshot.hpp"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
|
|
@ -11,10 +11,7 @@ template <typename T>
|
|||
class LimitedQueueSnapshot
|
||||
{
|
||||
public:
|
||||
LimitedQueueSnapshot()
|
||||
: length(0)
|
||||
{
|
||||
}
|
||||
LimitedQueueSnapshot() = default;
|
||||
|
||||
LimitedQueueSnapshot(std::shared_ptr<std::vector<std::shared_ptr<std::vector<T>>>> _chunks,
|
||||
size_t _length, size_t _firstChunkOffset, size_t _lastChunkEnd)
|
||||
|
@ -53,9 +50,9 @@ public:
|
|||
private:
|
||||
std::shared_ptr<std::vector<std::shared_ptr<std::vector<T>>>> chunks;
|
||||
|
||||
size_t length;
|
||||
size_t firstChunkOffset;
|
||||
size_t lastChunkEnd;
|
||||
size_t length = 0;
|
||||
size_t firstChunkOffset = 0;
|
||||
size_t lastChunkEnd = 0;
|
||||
};
|
||||
|
||||
} // namespace messages
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
|
||||
Link::Link()
|
||||
: type(None)
|
||||
, value(QString())
|
||||
|
@ -18,5 +19,6 @@ bool Link::isValid() const
|
|||
{
|
||||
return this->type != None;
|
||||
}
|
||||
|
||||
} // namespace messages
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
|
||||
struct Link {
|
||||
public:
|
||||
enum Type {
|
||||
|
@ -26,5 +27,6 @@ public:
|
|||
|
||||
bool isValid() const;
|
||||
};
|
||||
|
||||
} // namespace messages
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "messageelement.hpp"
|
||||
#include "util/irchelpers.hpp"
|
||||
|
||||
typedef chatterino::widgets::ScrollbarHighlight SBHighlight;
|
||||
using SBHighlight = chatterino::widgets::ScrollbarHighlight;
|
||||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
#include "util/flagsenum.hpp"
|
||||
#include "widgets/helper/scrollbarhighlight.hpp"
|
||||
|
||||
#include <QTime>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <QTime>
|
||||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
|
||||
MessageColor::MessageColor(const QColor &_color)
|
||||
: type(Type::Custom)
|
||||
, customColor(_color)
|
||||
|
@ -29,5 +30,6 @@ const QColor &MessageColor::getColor(singletons::ThemeManager &themeManager) con
|
|||
static QColor _default;
|
||||
return _default;
|
||||
}
|
||||
|
||||
} // namespace messages
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <QColor>
|
||||
|
||||
#include "singletons/thememanager.hpp"
|
||||
|
||||
#include <QColor>
|
||||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
|
||||
struct MessageColor {
|
||||
enum Type { Custom, Text, Link, System };
|
||||
|
||||
|
@ -18,5 +19,6 @@ private:
|
|||
Type type;
|
||||
QColor customColor;
|
||||
};
|
||||
|
||||
} // namespace messages
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -74,18 +74,10 @@ void ImageElement::addToContainer(MessageLayoutContainer &container, MessageElem
|
|||
EmoteElement::EmoteElement(const util::EmoteData &_data, MessageElement::Flags flags)
|
||||
: MessageElement(flags)
|
||||
, data(_data)
|
||||
, textElement(nullptr)
|
||||
{
|
||||
if (_data.isValid()) {
|
||||
this->setTooltip(data.image1x->getTooltip());
|
||||
this->textElement = new TextElement(_data.image1x->getName(), MessageElement::Misc);
|
||||
}
|
||||
}
|
||||
|
||||
EmoteElement::~EmoteElement()
|
||||
{
|
||||
if (this->textElement != nullptr) {
|
||||
delete this->textElement;
|
||||
this->textElement.reset(new TextElement(_data.image1x->getName(), MessageElement::Misc));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,7 +106,7 @@ void EmoteElement::addToContainer(MessageLayoutContainer &container, MessageElem
|
|||
container.addElement(
|
||||
(new ImageLayoutElement(*this, _image, size))->setLink(this->getLink()));
|
||||
} else {
|
||||
if (this->textElement != nullptr) {
|
||||
if (this->textElement) {
|
||||
this->textElement->addToContainer(container, MessageElement::Misc);
|
||||
}
|
||||
}
|
||||
|
@ -130,7 +122,7 @@ TextElement::TextElement(const QString &text, MessageElement::Flags flags,
|
|||
{
|
||||
for (QString word : text.split(' ')) {
|
||||
this->words.push_back({word, -1});
|
||||
// fourtf: add logic to store mutliple spaces after message
|
||||
// fourtf: add logic to store multiple spaces after message
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -213,32 +205,21 @@ void TextElement::addToContainer(MessageLayoutContainer &container, MessageEleme
|
|||
}
|
||||
|
||||
// TIMESTAMP
|
||||
TimestampElement::TimestampElement()
|
||||
: TimestampElement(QTime::currentTime())
|
||||
{
|
||||
}
|
||||
|
||||
TimestampElement::TimestampElement(QTime _time)
|
||||
: MessageElement(MessageElement::Timestamp)
|
||||
, time(_time)
|
||||
, element(formatTime(_time))
|
||||
, element(this->formatTime(_time))
|
||||
{
|
||||
assert(this->element != nullptr);
|
||||
}
|
||||
|
||||
TimestampElement::~TimestampElement()
|
||||
{
|
||||
delete this->element;
|
||||
}
|
||||
|
||||
void TimestampElement::addToContainer(MessageLayoutContainer &container,
|
||||
MessageElement::Flags _flags)
|
||||
{
|
||||
if (_flags & this->getFlags()) {
|
||||
if (singletons::SettingManager::getInstance().timestampFormat != this->format) {
|
||||
this->format = singletons::SettingManager::getInstance().timestampFormat.getValue();
|
||||
delete this->element;
|
||||
this->element = TimestampElement::formatTime(this->time);
|
||||
this->element.reset(this->formatTime(this->time));
|
||||
}
|
||||
|
||||
this->element->addToContainer(container, _flags);
|
||||
|
|
|
@ -4,28 +4,29 @@
|
|||
#include "messages/link.hpp"
|
||||
#include "messages/messagecolor.hpp"
|
||||
#include "singletons/fontmanager.hpp"
|
||||
#include "util/emotemap.hpp"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <QRect>
|
||||
#include <QString>
|
||||
#include <QTime>
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include "util/emotemap.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
namespace chatterino {
|
||||
class Channel;
|
||||
namespace util {
|
||||
struct EmoteData;
|
||||
}
|
||||
} // namespace util
|
||||
namespace messages {
|
||||
namespace layouts {
|
||||
struct MessageLayoutContainer;
|
||||
}
|
||||
} // namespace layouts
|
||||
|
||||
using namespace chatterino::messages::layouts;
|
||||
|
||||
struct MessageElement : boost::noncopyable
|
||||
class MessageElement : boost::noncopyable
|
||||
{
|
||||
public:
|
||||
enum Flags : uint32_t {
|
||||
|
@ -109,9 +110,7 @@ public:
|
|||
Update_All = Update_Text | Update_Emotes | Update_Images
|
||||
};
|
||||
|
||||
virtual ~MessageElement()
|
||||
{
|
||||
}
|
||||
virtual ~MessageElement() = default;
|
||||
|
||||
MessageElement *setLink(const Link &link);
|
||||
MessageElement *setTooltip(const QString &tooltip);
|
||||
|
@ -141,8 +140,7 @@ class ImageElement : public MessageElement
|
|||
public:
|
||||
ImageElement(Image *image, MessageElement::Flags flags);
|
||||
|
||||
virtual void addToContainer(MessageLayoutContainer &container,
|
||||
MessageElement::Flags flags) override;
|
||||
void addToContainer(MessageLayoutContainer &container, MessageElement::Flags flags) override;
|
||||
};
|
||||
|
||||
// contains a text, it will split it into words
|
||||
|
@ -161,9 +159,9 @@ public:
|
|||
TextElement(const QString &text, MessageElement::Flags flags,
|
||||
const MessageColor &color = MessageColor::Text,
|
||||
FontStyle style = FontStyle::Medium);
|
||||
~TextElement() override = default;
|
||||
|
||||
virtual void addToContainer(MessageLayoutContainer &container,
|
||||
MessageElement::Flags flags) override;
|
||||
void addToContainer(MessageLayoutContainer &container, MessageElement::Flags flags) override;
|
||||
};
|
||||
|
||||
// contains emote data and will pick the emote based on :
|
||||
|
@ -172,30 +170,27 @@ public:
|
|||
class EmoteElement : public MessageElement
|
||||
{
|
||||
const util::EmoteData data;
|
||||
TextElement *textElement;
|
||||
std::unique_ptr<TextElement> textElement;
|
||||
|
||||
public:
|
||||
EmoteElement(const util::EmoteData &data, MessageElement::Flags flags);
|
||||
~EmoteElement();
|
||||
~EmoteElement() override = default;
|
||||
|
||||
virtual void addToContainer(MessageLayoutContainer &container,
|
||||
MessageElement::Flags flags) override;
|
||||
void addToContainer(MessageLayoutContainer &container, MessageElement::Flags flags) override;
|
||||
};
|
||||
|
||||
// contains a text, formated depending on the preferences
|
||||
class TimestampElement : public MessageElement
|
||||
{
|
||||
QTime time;
|
||||
TextElement *element;
|
||||
std::unique_ptr<TextElement> element;
|
||||
QString format;
|
||||
|
||||
public:
|
||||
TimestampElement();
|
||||
TimestampElement(QTime time);
|
||||
virtual ~TimestampElement();
|
||||
TimestampElement(QTime time = QTime::currentTime());
|
||||
~TimestampElement() override = default;
|
||||
|
||||
virtual void addToContainer(MessageLayoutContainer &container,
|
||||
MessageElement::Flags flags) override;
|
||||
void addToContainer(MessageLayoutContainer &container, MessageElement::Flags flags) override;
|
||||
|
||||
TextElement *formatTime(const QTime &time);
|
||||
};
|
||||
|
@ -207,8 +202,8 @@ class TwitchModerationElement : public MessageElement
|
|||
public:
|
||||
TwitchModerationElement();
|
||||
|
||||
virtual void addToContainer(MessageLayoutContainer &container,
|
||||
MessageElement::Flags flags) override;
|
||||
void addToContainer(MessageLayoutContainer &container, MessageElement::Flags flags) override;
|
||||
};
|
||||
|
||||
} // namespace messages
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -4,8 +4,7 @@ namespace chatterino {
|
|||
namespace messages {
|
||||
|
||||
struct MessageParseArgs {
|
||||
public:
|
||||
bool disablePingSoungs = false;
|
||||
bool disablePingSounds = false;
|
||||
bool isReceivedWhisper = false;
|
||||
bool isSentWhisper = false;
|
||||
};
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
|
||||
struct SelectionItem {
|
||||
int messageIndex;
|
||||
int charIndex;
|
||||
|
@ -47,9 +50,7 @@ struct Selection {
|
|||
SelectionItem min;
|
||||
SelectionItem max;
|
||||
|
||||
Selection()
|
||||
{
|
||||
}
|
||||
Selection() = default;
|
||||
|
||||
Selection(const SelectionItem &start, const SelectionItem &end)
|
||||
: start(start)
|
||||
|
@ -72,5 +73,6 @@ struct Selection {
|
|||
return this->min.messageIndex == this->max.messageIndex;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace messages
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -2,11 +2,9 @@
|
|||
#include <fmt/format.h>
|
||||
#include <irccommand.h>
|
||||
#include <ircconnection.h>
|
||||
#include <math.h>
|
||||
#include <rapidjson/document.h>
|
||||
#include <rapidjson/error/en.h>
|
||||
#include <rapidjson/error/error.h>
|
||||
#include <stdint.h>
|
||||
#include <IrcMessage>
|
||||
#include <QAbstractListModel>
|
||||
#include <QAbstractNativeEventFilter>
|
||||
|
@ -127,13 +125,12 @@
|
|||
#include <boost/foreach.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
#include <boost/signals2/connection.hpp>
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <cinttypes>
|
||||
#include <climits>
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <ctime>
|
||||
#include <functional>
|
||||
#include <future>
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
|
||||
#include "channel.hpp"
|
||||
|
||||
#include <IrcConnection>
|
||||
#include <IrcMessage>
|
||||
#include <pajlada/signals/signal.hpp>
|
||||
|
||||
#include <functional>
|
||||
#include <mutex>
|
||||
#include <pajlada/signals/signal.hpp>
|
||||
|
||||
namespace chatterino {
|
||||
namespace providers {
|
||||
|
@ -14,6 +16,8 @@ namespace irc {
|
|||
class AbstractIrcServer
|
||||
{
|
||||
public:
|
||||
virtual ~AbstractIrcServer() = default;
|
||||
|
||||
// connection
|
||||
Communi::IrcConnection *getReadConnection() const;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "QString"
|
||||
#include <QString>
|
||||
|
||||
namespace chatterino {
|
||||
namespace providers {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#include "ircmessagehandler.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "debug/log.hpp"
|
||||
#include "messages/limitedqueue.hpp"
|
||||
#include "messages/message.hpp"
|
||||
|
@ -12,6 +10,8 @@
|
|||
#include "singletons/resourcemanager.hpp"
|
||||
#include "singletons/windowmanager.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
using namespace chatterino::singletons;
|
||||
using namespace chatterino::messages;
|
||||
|
||||
|
@ -233,6 +233,7 @@ void IrcMessageHandler::handleWriteConnectionNoticeMessage(Communi::IrcNoticeMes
|
|||
|
||||
this->handleNoticeMessage(message);
|
||||
}
|
||||
|
||||
} // namespace twitch
|
||||
} // namespace providers
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -13,11 +13,14 @@
|
|||
//
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
namespace singletons {
|
||||
class AccountManager;
|
||||
}
|
||||
} // namespace singletons
|
||||
|
||||
namespace providers {
|
||||
namespace twitch {
|
||||
|
||||
class TwitchAccountManager
|
||||
{
|
||||
TwitchAccountManager();
|
||||
|
@ -62,6 +65,7 @@ private:
|
|||
|
||||
friend class chatterino::singletons::AccountManager;
|
||||
};
|
||||
|
||||
} // namespace twitch
|
||||
} // namespace providers
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -81,8 +81,6 @@ TwitchChannel::TwitchChannel(const QString &channelName, Communi::IrcConnection
|
|||
|
||||
TwitchChannel::~TwitchChannel()
|
||||
{
|
||||
this->connectedConnection.disconnect();
|
||||
|
||||
this->liveStatusTimer->stop();
|
||||
this->liveStatusTimer->deleteLater();
|
||||
|
||||
|
@ -103,7 +101,7 @@ bool TwitchChannel::canSendMessage() const
|
|||
void TwitchChannel::setRoomID(const QString &_roomID)
|
||||
{
|
||||
this->roomID = _roomID;
|
||||
this->roomIDchanged();
|
||||
this->roomIDchanged.invoke();
|
||||
this->fetchMessages.invoke();
|
||||
}
|
||||
|
||||
|
@ -155,7 +153,7 @@ void TwitchChannel::setMod(bool value)
|
|||
if (this->mod != value) {
|
||||
this->mod = value;
|
||||
|
||||
this->userStateChanged();
|
||||
this->userStateChanged.invoke();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,7 +192,7 @@ void TwitchChannel::setLive(bool newLiveStatus)
|
|||
this->streamStatus.live = newLiveStatus;
|
||||
}
|
||||
|
||||
this->onlineStatusChanged();
|
||||
this->onlineStatusChanged.invoke();
|
||||
}
|
||||
|
||||
void TwitchChannel::refreshLiveStatus()
|
||||
|
|
|
@ -53,11 +53,11 @@ public:
|
|||
const QString popoutPlayerURL;
|
||||
|
||||
void setRoomID(const QString &_roomID);
|
||||
boost::signals2::signal<void()> roomIDchanged;
|
||||
boost::signals2::signal<void()> onlineStatusChanged;
|
||||
pajlada::Signals::NoArgSignal roomIDchanged;
|
||||
pajlada::Signals::NoArgSignal onlineStatusChanged;
|
||||
|
||||
pajlada::Signals::NoArgBoltSignal fetchMessages;
|
||||
boost::signals2::signal<void()> userStateChanged;
|
||||
pajlada::Signals::NoArgSignal userStateChanged;
|
||||
|
||||
QString roomID;
|
||||
|
||||
|
@ -89,8 +89,6 @@ private:
|
|||
|
||||
void fetchRecentMessages();
|
||||
|
||||
boost::signals2::connection connectedConnection;
|
||||
|
||||
bool mod;
|
||||
QByteArray messageSuffix;
|
||||
QString lastSentMessage;
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace twitch {
|
|||
bool TrimChannelName(const QString &channelName, QString &outChannelName)
|
||||
{
|
||||
if (channelName.length() < 3) {
|
||||
debug::Log("channel name length below 2");
|
||||
debug::Log("channel name length below 3");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -552,7 +552,7 @@ util::EmoteData EmoteManager::getCheerImage(long long amount, bool animated)
|
|||
return util::EmoteData();
|
||||
}
|
||||
|
||||
boost::signals2::signal<void()> &EmoteManager::getGifUpdateSignal()
|
||||
pajlada::Signals::NoArgSignal &EmoteManager::getGifUpdateSignal()
|
||||
{
|
||||
if (!this->gifUpdateTimerInitiated) {
|
||||
this->gifUpdateTimerInitiated = true;
|
||||
|
@ -571,7 +571,7 @@ boost::signals2::signal<void()> &EmoteManager::getGifUpdateSignal()
|
|||
});
|
||||
|
||||
QObject::connect(&this->gifUpdateTimer, &QTimer::timeout, [this] {
|
||||
this->gifUpdateTimerSignal();
|
||||
this->gifUpdateTimerSignal.invoke();
|
||||
// fourtf:
|
||||
auto &windowManager = singletons::WindowManager::getInstance();
|
||||
windowManager.repaintGifEmotes();
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <QRegularExpression>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
#include <boost/signals2.hpp>
|
||||
#include <pajlada/signals/signal.hpp>
|
||||
|
||||
namespace chatterino {
|
||||
namespace singletons {
|
||||
|
@ -56,7 +56,7 @@ public:
|
|||
_generation++;
|
||||
}
|
||||
|
||||
boost::signals2::signal<void()> &getGifUpdateSignal();
|
||||
pajlada::Signals::NoArgSignal &getGifUpdateSignal();
|
||||
|
||||
// Bit badge/emotes?
|
||||
util::ConcurrentMap<QString, messages::Image *> miscImageCache;
|
||||
|
@ -140,7 +140,7 @@ private:
|
|||
/// Chatterino emotes
|
||||
util::EmoteMap _chatterinoEmotes;
|
||||
|
||||
boost::signals2::signal<void()> gifUpdateTimerSignal;
|
||||
pajlada::Signals::NoArgSignal gifUpdateTimerSignal;
|
||||
QTimer gifUpdateTimer;
|
||||
bool gifUpdateTimerInitiated = false;
|
||||
|
||||
|
|
|
@ -105,5 +105,6 @@ FontManager::Font &FontManager::getCurrentFont(float scale)
|
|||
|
||||
return this->currentFontByScale.back().second;
|
||||
}
|
||||
|
||||
} // namespace singletons
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -137,7 +137,9 @@ private:
|
|||
|
||||
int generation = 0;
|
||||
};
|
||||
|
||||
} // namespace singletons
|
||||
|
||||
typedef singletons::FontManager::Type FontStyle;
|
||||
using FontStyle = singletons::FontManager::Type;
|
||||
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace chatterino {
|
||||
namespace singletons {
|
||||
|
||||
static void _registerSetting(std::weak_ptr<pajlada::Settings::ISettingData> setting);
|
||||
|
||||
template <typename Type>
|
||||
|
@ -71,5 +72,6 @@ public:
|
|||
return this->getValue();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace singletons
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -46,5 +46,6 @@ const QString &ModerationAction::getAction() const
|
|||
{
|
||||
return this->action;
|
||||
}
|
||||
|
||||
} // namespace singletons
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
#include <QString>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
namespace messages {
|
||||
class Image;
|
||||
}
|
||||
} // namespace messages
|
||||
|
||||
namespace singletons {
|
||||
|
||||
class ModerationAction
|
||||
|
@ -27,5 +29,6 @@ private:
|
|||
QString line2;
|
||||
QString action;
|
||||
};
|
||||
|
||||
} // namespace singletons
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include <QColor>
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
namespace chatterino {
|
||||
namespace singletons {
|
||||
|
@ -156,7 +156,7 @@ void ThemeManager::actuallyUpdate(double hue, double multiplier)
|
|||
// Selection
|
||||
this->messages.selection = isLightTheme() ? QColor(0, 0, 0, 64) : QColor(255, 255, 255, 64);
|
||||
|
||||
this->updated();
|
||||
this->updated.invoke();
|
||||
}
|
||||
|
||||
QColor ThemeManager::blendColors(const QColor &color1, const QColor &color2, qreal ratio)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include "util/serialize-custom.hpp"
|
||||
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <boost/signals2.hpp>
|
||||
#include <pajlada/settings/setting.hpp>
|
||||
#include "util/serialize-custom.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
namespace singletons {
|
||||
|
@ -105,7 +105,7 @@ public:
|
|||
|
||||
void update();
|
||||
|
||||
boost::signals2::signal<void()> updated;
|
||||
pajlada::Signals::NoArgSignal updated;
|
||||
|
||||
pajlada::Settings::Setting<QString> themeName;
|
||||
pajlada::Settings::Setting<double> themeHue;
|
||||
|
|
|
@ -58,7 +58,7 @@ void WindowManager::initMainWindow()
|
|||
|
||||
void WindowManager::layoutVisibleChatWidgets(Channel *channel)
|
||||
{
|
||||
this->layout(channel);
|
||||
this->layout.invoke(channel);
|
||||
}
|
||||
|
||||
void WindowManager::repaintVisibleChatWidgets(Channel *channel)
|
||||
|
@ -70,7 +70,7 @@ void WindowManager::repaintVisibleChatWidgets(Channel *channel)
|
|||
|
||||
void WindowManager::repaintGifEmotes()
|
||||
{
|
||||
this->repaintGifs();
|
||||
this->repaintGifs.invoke();
|
||||
}
|
||||
|
||||
// void WindowManager::updateAll()
|
||||
|
|
|
@ -32,8 +32,8 @@ public:
|
|||
|
||||
void save();
|
||||
|
||||
boost::signals2::signal<void()> repaintGifs;
|
||||
boost::signals2::signal<void(Channel *)> layout;
|
||||
pajlada::Signals::NoArgSignal repaintGifs;
|
||||
pajlada::Signals::Signal<Channel *> layout;
|
||||
|
||||
private:
|
||||
ThemeManager &themeManager;
|
||||
|
|
|
@ -126,5 +126,6 @@ private:
|
|||
return this->item->layout();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace util
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
namespace chatterino {
|
||||
namespace util {
|
||||
|
||||
static boost::optional<UINT> getWindowDpi(quintptr ptr)
|
||||
{
|
||||
typedef UINT(WINAPI * GetDpiForWindow)(HWND);
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include "util/networkrequester.hpp"
|
||||
#include "util/networkworker.hpp"
|
||||
|
||||
#include <rapidjson/document.h>
|
||||
#include <rapidjson/error/en.h>
|
||||
#include <QCryptographicHash>
|
||||
#include <QFile>
|
||||
|
||||
|
@ -152,7 +154,7 @@ public:
|
|||
|
||||
if (this->data.caller != nullptr) {
|
||||
QObject::connect(worker, &NetworkWorker::doneUrl, this->data.caller,
|
||||
[ onFinished, data = this->data ](auto reply) mutable {
|
||||
[onFinished, data = this->data](auto reply) mutable {
|
||||
if (reply->error() != QNetworkReply::NetworkError::NoError) {
|
||||
// TODO: We might want to call an onError callback here
|
||||
return;
|
||||
|
@ -172,7 +174,7 @@ public:
|
|||
|
||||
QObject::connect(
|
||||
&requester, &NetworkRequester::requestUrl, worker,
|
||||
[ timer, data = std::move(this->data), worker, onFinished{std::move(onFinished)} ]() {
|
||||
[timer, data = std::move(this->data), worker, onFinished{std::move(onFinished)}]() {
|
||||
QNetworkReply *reply = NetworkManager::NaM.get(data.request);
|
||||
|
||||
if (timer != nullptr) {
|
||||
|
@ -187,9 +189,9 @@ public:
|
|||
data.onReplyCreated(reply);
|
||||
}
|
||||
|
||||
QObject::connect(reply, &QNetworkReply::finished, worker, [
|
||||
data = std::move(data), worker, reply, onFinished = std::move(onFinished)
|
||||
]() mutable {
|
||||
QObject::connect(reply, &QNetworkReply::finished, worker,
|
||||
[data = std::move(data), worker, reply,
|
||||
onFinished = std::move(onFinished)]() mutable {
|
||||
if (data.caller == nullptr) {
|
||||
QByteArray bytes = reply->readAll();
|
||||
data.writeToCache(bytes);
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include <QObject>
|
||||
|
||||
class QNetworkReply;
|
||||
|
||||
namespace chatterino {
|
||||
namespace util {
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
namespace chatterino {
|
||||
namespace util {
|
||||
|
||||
class LambdaRunnable : public QRunnable
|
||||
{
|
||||
public:
|
||||
|
@ -47,12 +48,13 @@ static void postToThread(F &&fun, QObject *obj = qApp)
|
|||
, fun(fun)
|
||||
{
|
||||
}
|
||||
~Event()
|
||||
~Event() override
|
||||
{
|
||||
fun();
|
||||
}
|
||||
};
|
||||
QCoreApplication::postEvent(obj, new Event(std::forward<F>(fun)));
|
||||
}
|
||||
|
||||
} // namespace util
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
namespace chatterino {
|
||||
namespace util {
|
||||
|
||||
template <typename T>
|
||||
class Property final : boost::noncopyable
|
||||
{
|
||||
|
@ -30,5 +31,6 @@ public:
|
|||
protected:
|
||||
T value;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace util
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <rapidjson/document.h>
|
||||
#include <rapidjson/error/en.h>
|
||||
#include <rapidjson/error/error.h>
|
||||
#include <QByteArray>
|
||||
#include <QEventLoop>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Ui {
|
||||
class AccountPopup;
|
||||
}
|
||||
} // namespace Ui
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
@ -35,7 +35,7 @@ signals:
|
|||
void refreshButtons();
|
||||
|
||||
protected:
|
||||
virtual void scaleChangedEvent(float newDpi) override;
|
||||
void scaleChangedEvent(float newDpi) override;
|
||||
|
||||
private:
|
||||
Ui::AccountPopup *ui;
|
||||
|
@ -76,8 +76,8 @@ private:
|
|||
} relationship;
|
||||
|
||||
protected:
|
||||
virtual void focusOutEvent(QFocusEvent *event) override;
|
||||
virtual void showEvent(QShowEvent *event) override;
|
||||
void focusOutEvent(QFocusEvent *event) override;
|
||||
void showEvent(QShowEvent *event) override;
|
||||
};
|
||||
|
||||
} // namespace widgets
|
||||
|
|
|
@ -54,5 +54,6 @@ void AccountSwitchPopupWidget::paintEvent(QPaintEvent *event)
|
|||
|
||||
painter.fillRect(this->rect(), QColor(255, 255, 255));
|
||||
}
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -17,8 +17,8 @@ public:
|
|||
void refresh();
|
||||
|
||||
protected:
|
||||
virtual void focusOutEvent(QFocusEvent *event) override final;
|
||||
virtual void paintEvent(QPaintEvent *event) override;
|
||||
void focusOutEvent(QFocusEvent *event) final;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
private:
|
||||
struct {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "widgets/basewidget.hpp"
|
||||
#include "debug/log.hpp"
|
||||
#include "singletons/settingsmanager.hpp"
|
||||
#include "singletons/thememanager.hpp"
|
||||
|
||||
|
@ -7,7 +8,6 @@
|
|||
#include <QIcon>
|
||||
#include <QLayout>
|
||||
#include <QtGlobal>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
|
@ -82,13 +82,13 @@ void BaseWidget::setScaleIndependantHeight(int value)
|
|||
|
||||
void BaseWidget::init()
|
||||
{
|
||||
auto connection = this->themeManager.updated.connect([this]() {
|
||||
pajlada::Signals::Connection connection = this->themeManager.updated.connect([this]() {
|
||||
this->themeRefreshEvent();
|
||||
|
||||
this->update();
|
||||
});
|
||||
|
||||
QObject::connect(this, &QObject::destroyed, [connection] {
|
||||
QObject::connect(this, &QObject::destroyed, [connection]() mutable {
|
||||
connection.disconnect(); //
|
||||
});
|
||||
}
|
||||
|
|
|
@ -6,9 +6,10 @@
|
|||
namespace chatterino {
|
||||
namespace singletons {
|
||||
class ThemeManager;
|
||||
}
|
||||
} // namespace singletons
|
||||
|
||||
namespace widgets {
|
||||
|
||||
class BaseWindow;
|
||||
|
||||
class BaseWidget : public QWidget
|
||||
|
@ -34,7 +35,7 @@ public:
|
|||
void setScaleIndependantHeight(int value);
|
||||
|
||||
protected:
|
||||
virtual void childEvent(QChildEvent *) override;
|
||||
void childEvent(QChildEvent *) override;
|
||||
|
||||
virtual void scaleChangedEvent(float newScale);
|
||||
virtual void themeRefreshEvent();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "basewindow.hpp"
|
||||
|
||||
#include "debug/log.hpp"
|
||||
#include "singletons/settingsmanager.hpp"
|
||||
#include "util/nativeeventhelper.hpp"
|
||||
#include "widgets/helper/rippleeffectlabel.hpp"
|
||||
|
@ -11,10 +12,10 @@
|
|||
#include <QIcon>
|
||||
|
||||
#ifdef USEWINSDK
|
||||
#include <ObjIdl.h>
|
||||
#include <Windows.h>
|
||||
#include <dwmapi.h>
|
||||
#include <gdiplus.h>
|
||||
#include <objidl.h>
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#pragma comment(lib, "Dwmapi.lib")
|
||||
|
||||
|
|
|
@ -9,12 +9,15 @@ class QHBoxLayout;
|
|||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
|
||||
class RippleEffectButton;
|
||||
class RippleEffectLabel;
|
||||
class TitleBarButton;
|
||||
|
||||
class BaseWindow : public BaseWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BaseWindow(singletons::ThemeManager &_themeManager, QWidget *parent,
|
||||
bool enableCustomFrame = false);
|
||||
|
@ -60,5 +63,6 @@ private:
|
|||
QWidget *layoutBase;
|
||||
std::vector<RippleEffectButton *> buttons;
|
||||
};
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
#include <QGraphicsBlurEffect>
|
||||
#include <QPainter>
|
||||
|
||||
#include <math.h>
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
|
@ -461,7 +461,7 @@ void ChannelView::setSelection(const SelectionItem &start, const SelectionItem &
|
|||
// selections
|
||||
this->selection = Selection(start, end);
|
||||
|
||||
this->selectionChanged();
|
||||
this->selectionChanged.invoke();
|
||||
}
|
||||
|
||||
messages::MessageElement::Flags ChannelView::getFlags() const
|
||||
|
@ -729,7 +729,7 @@ void ChannelView::mousePressEvent(QMouseEvent *event)
|
|||
QPoint relativePos;
|
||||
int messageIndex;
|
||||
|
||||
this->mouseDown(event);
|
||||
this->mouseDown.invoke(event);
|
||||
|
||||
if (!tryGetMessageAt(event->pos(), layout, relativePos, messageIndex)) {
|
||||
setCursor(Qt::ArrowCursor);
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
#include <QTimer>
|
||||
#include <QWheelEvent>
|
||||
#include <QWidget>
|
||||
#include <boost/signals2.hpp>
|
||||
#include <pajlada/signals/signal.hpp>
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
namespace chatterino {
|
||||
|
@ -28,7 +28,7 @@ class ChannelView : public BaseWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ChannelView(BaseWidget *parent = 0);
|
||||
explicit ChannelView(BaseWidget *parent = nullptr);
|
||||
virtual ~ChannelView();
|
||||
|
||||
void queueUpdate();
|
||||
|
@ -49,26 +49,26 @@ public:
|
|||
|
||||
void clearMessages();
|
||||
|
||||
boost::signals2::signal<void(QMouseEvent *)> mouseDown;
|
||||
boost::signals2::signal<void()> selectionChanged;
|
||||
pajlada::Signals::Signal<QMouseEvent *> mouseDown;
|
||||
pajlada::Signals::NoArgSignal selectionChanged;
|
||||
pajlada::Signals::NoArgSignal highlightedMessageReceived;
|
||||
pajlada::Signals::Signal<const messages::Link &> linkClicked;
|
||||
|
||||
protected:
|
||||
virtual void themeRefreshEvent() override;
|
||||
void themeRefreshEvent() override;
|
||||
|
||||
virtual void resizeEvent(QResizeEvent *) override;
|
||||
void resizeEvent(QResizeEvent *) override;
|
||||
|
||||
virtual void paintEvent(QPaintEvent *) override;
|
||||
virtual void wheelEvent(QWheelEvent *event) override;
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
|
||||
virtual void enterEvent(QEvent *) override;
|
||||
virtual void leaveEvent(QEvent *) override;
|
||||
void enterEvent(QEvent *) override;
|
||||
void leaveEvent(QEvent *) override;
|
||||
|
||||
virtual void mouseMoveEvent(QMouseEvent *event) override;
|
||||
virtual void mousePressEvent(QMouseEvent *event) override;
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||
|
||||
void handleLinkClick(QMouseEvent *event, const messages::Link &link,
|
||||
messages::MessageLayout *layout);
|
||||
|
@ -116,12 +116,12 @@ private:
|
|||
|
||||
messages::LimitedQueue<messages::MessageLayoutPtr> messages;
|
||||
|
||||
boost::signals2::connection messageAppendedConnection;
|
||||
boost::signals2::connection messageAddedAtStartConnection;
|
||||
boost::signals2::connection messageRemovedConnection;
|
||||
boost::signals2::connection messageReplacedConnection;
|
||||
boost::signals2::connection repaintGifsConnection;
|
||||
boost::signals2::connection layoutConnection;
|
||||
pajlada::Signals::Connection messageAppendedConnection;
|
||||
pajlada::Signals::Connection messageAddedAtStartConnection;
|
||||
pajlada::Signals::Connection messageRemovedConnection;
|
||||
pajlada::Signals::Connection messageReplacedConnection;
|
||||
pajlada::Signals::Connection repaintGifsConnection;
|
||||
pajlada::Signals::Connection layoutConnection;
|
||||
|
||||
std::vector<pajlada::Signals::ScopedConnection> managedConnections;
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@ public:
|
|||
void setBounds(const QRect &rect);
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent *) override;
|
||||
virtual void hideEvent(QHideEvent *) override;
|
||||
void paintEvent(QPaintEvent *) override;
|
||||
void hideEvent(QHideEvent *) override;
|
||||
|
||||
QPropertyAnimation positionAnimation;
|
||||
QRect desiredGeometry;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
|
||||
Label::Label(BaseWidget *parent)
|
||||
: BaseWidget(parent)
|
||||
{
|
||||
|
@ -74,5 +75,6 @@ void Label::paintEvent(QPaintEvent *)
|
|||
|
||||
painter.drawText(this->rect(), flags, this->text);
|
||||
}
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -29,5 +29,6 @@ private:
|
|||
QString text;
|
||||
FontStyle fontStyle = FontStyle::Medium;
|
||||
};
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -144,5 +144,6 @@ void NotebookButton::dropEvent(QDropEvent *event)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <QDebug>
|
||||
#include <QLinearGradient>
|
||||
#include <QPainter>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <pajlada/signals/connection.hpp>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
namespace widgets {
|
||||
|
||||
class Notebook;
|
||||
|
|
|
@ -73,7 +73,7 @@ void ResizingTextEdit::keyPressEvent(QKeyEvent *event)
|
|||
{
|
||||
event->ignore();
|
||||
|
||||
this->keyPressed(event);
|
||||
this->keyPressed.invoke(event);
|
||||
|
||||
if (event->key() == Qt::Key_Backtab) {
|
||||
// Ignore for now. We want to use it for autocomplete later
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <QCompleter>
|
||||
#include <QKeyEvent>
|
||||
#include <QTextEdit>
|
||||
#include <boost/signals2.hpp>
|
||||
#include <pajlada/signals/signal.hpp>
|
||||
|
||||
class ResizingTextEdit : public QTextEdit
|
||||
{
|
||||
|
@ -14,14 +14,14 @@ public:
|
|||
|
||||
bool hasHeightForWidth() const override;
|
||||
|
||||
boost::signals2::signal<void(QKeyEvent *)> keyPressed;
|
||||
pajlada::Signals::Signal<QKeyEvent *> keyPressed;
|
||||
|
||||
void setCompleter(QCompleter *c);
|
||||
QCompleter *getCompleter() const;
|
||||
|
||||
protected:
|
||||
virtual int heightForWidth(int) const override;
|
||||
virtual void keyPressEvent(QKeyEvent *event) override;
|
||||
int heightForWidth(int) const override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
|
||||
private:
|
||||
QCompleter *completer = nullptr;
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include "QString"
|
||||
#include <QString>
|
||||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
|
||||
class ScrollbarHighlight
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "messages/limitedqueuesnapshot.hpp"
|
||||
#include "messages/message.hpp"
|
||||
#include "widgets/basewindow.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
class QLineEdit;
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class Channel;
|
||||
|
||||
namespace widgets {
|
||||
|
||||
class ChannelView;
|
||||
|
||||
class SearchPopup : public BaseWindow
|
||||
|
@ -27,5 +31,6 @@ private:
|
|||
void initLayout();
|
||||
void performSearch();
|
||||
};
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include "widgets/basewidget.hpp"
|
||||
|
||||
#include <QIcon>
|
||||
#include <QPaintEvent>
|
||||
#include <QWidget>
|
||||
|
||||
#include "widgets/basewidget.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
class SettingsPage;
|
||||
}
|
||||
} // namespace settingspages
|
||||
|
||||
class SettingsDialog;
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
namespace chatterino {
|
||||
namespace helper {
|
||||
SplitColumn::SplitColumn()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace helper
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "widgets/split.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace chatterino {
|
||||
namespace helper {
|
||||
|
||||
class SplitColumn
|
||||
{
|
||||
public:
|
||||
SplitColumn();
|
||||
SplitColumn() = default;
|
||||
|
||||
void insert(widgets::Split *split, int index = -1);
|
||||
void remove(int index);
|
||||
|
@ -19,5 +20,6 @@ public:
|
|||
private:
|
||||
std::vector<widgets::Split> items;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace helper
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -57,7 +57,8 @@ SplitHeader::SplitHeader(Split *_split)
|
|||
title->setMouseTracking(true);
|
||||
QObject::connect(this->titleLabel, &SignalLabel::mouseDoubleClick, this,
|
||||
&SplitHeader::mouseDoubleClickEvent);
|
||||
QObject::connect(this->titleLabel, &SignalLabel::mouseMove, this, &SplitHeader::mouseMoveEvent);
|
||||
QObject::connect(this->titleLabel, &SignalLabel::mouseMove, this,
|
||||
&SplitHeader::mouseMoveEvent);
|
||||
|
||||
layout->addStretch(1);
|
||||
|
||||
|
|
|
@ -13,11 +13,9 @@
|
|||
#include <QPaintEvent>
|
||||
#include <QPoint>
|
||||
#include <QWidget>
|
||||
#include <boost/signals2/connection.hpp>
|
||||
#include <pajlada/settings/setting.hpp>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
namespace widgets {
|
||||
|
||||
class Split;
|
||||
|
@ -50,7 +48,7 @@ private:
|
|||
QPoint dragStart;
|
||||
bool dragging = false;
|
||||
|
||||
boost::signals2::connection onlineStatusChangedConnection;
|
||||
pajlada::Signals::Connection onlineStatusChangedConnection;
|
||||
|
||||
RippleEffectButton *dropdownButton;
|
||||
// Label *titleLabel;
|
||||
|
|
|
@ -162,7 +162,7 @@ void Scrollbar::offset(qreal value)
|
|||
}
|
||||
}
|
||||
|
||||
boost::signals2::signal<void()> &Scrollbar::getCurrentValueChanged()
|
||||
pajlada::Signals::NoArgSignal &Scrollbar::getCurrentValueChanged()
|
||||
{
|
||||
return this->currentValueChanged;
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ void Scrollbar::setCurrentValue(qreal value)
|
|||
this->currentValue = value;
|
||||
|
||||
this->updateScroll();
|
||||
this->currentValueChanged();
|
||||
this->currentValueChanged.invoke();
|
||||
|
||||
this->update();
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <QMutex>
|
||||
#include <QPropertyAnimation>
|
||||
#include <QWidget>
|
||||
#include <boost/signals2.hpp>
|
||||
#include <pajlada/signals/signal.hpp>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
@ -43,7 +43,7 @@ public:
|
|||
qreal getCurrentValue() const;
|
||||
// offset the desired value without breaking smooth scolling
|
||||
void offset(qreal value);
|
||||
boost::signals2::signal<void()> &getCurrentValueChanged();
|
||||
pajlada::Signals::NoArgSignal &getCurrentValueChanged();
|
||||
void setCurrentValue(qreal value);
|
||||
|
||||
void printCurrentState(const QString &prefix = QString()) const;
|
||||
|
@ -86,7 +86,7 @@ private:
|
|||
qreal currentValue = 0;
|
||||
qreal smoothScrollingOffset = 0;
|
||||
|
||||
boost::signals2::signal<void()> currentValueChanged;
|
||||
pajlada::Signals::NoArgSignal currentValueChanged;
|
||||
|
||||
pajlada::Settings::Setting<bool> &smoothScrollingSetting;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace widgets {
|
|||
|
||||
namespace settingspages {
|
||||
class SettingsPage;
|
||||
}
|
||||
} // namespace settingspages
|
||||
|
||||
class SettingsDialogTab;
|
||||
|
||||
|
@ -32,7 +32,7 @@ public:
|
|||
static void showDialog(PreferredTab preferredTab = PreferredTab::NoPreference);
|
||||
|
||||
protected:
|
||||
virtual void scaleChangedEvent(float newDpi) override;
|
||||
void scaleChangedEvent(float newDpi) override;
|
||||
|
||||
private:
|
||||
void refresh();
|
||||
|
|
|
@ -53,6 +53,7 @@ AboutPage::AboutPage()
|
|||
}
|
||||
layout->addStretch(1);
|
||||
}
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -16,6 +16,7 @@ public:
|
|||
private:
|
||||
QLabel *logo;
|
||||
};
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
||||
AccountsPage::AccountsPage()
|
||||
: SettingsPage("Accounts", ":/images/accounts.svg")
|
||||
{
|
||||
|
@ -41,6 +42,7 @@ AccountsPage::AccountsPage()
|
|||
singletons::AccountManager::getInstance().Twitch.removeUser(selectedUser);
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
#include "widgets/accountswitchwidget.hpp"
|
||||
#include "widgets/settingspages/settingspage.hpp"
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
@ -19,6 +19,7 @@ private:
|
|||
QPushButton *removeButton;
|
||||
AccountSwitchWidget *accSwitchWidget;
|
||||
};
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <QGroupBox>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QSlider>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "util/layoutcreator.hpp"
|
||||
|
@ -65,7 +66,8 @@ AppearancePage::AppearancePage()
|
|||
}
|
||||
messages.append(this->createCheckBox("Show badges", settings.showBadges));
|
||||
messages.append(this->createCheckBox("Seperate messages", settings.seperateMessages));
|
||||
messages.append(this->createCheckBox("Show message length while typing", settings.showMessageLength));
|
||||
messages.append(
|
||||
this->createCheckBox("Show message length while typing", settings.showMessageLength));
|
||||
}
|
||||
|
||||
layout->addStretch(1);
|
||||
|
@ -148,6 +150,7 @@ QLayout *AppearancePage::createFontChanger()
|
|||
|
||||
return layout;
|
||||
}
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
#include "widgets/settingspages/settingspage.hpp"
|
||||
|
||||
#include <QSlider>
|
||||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
||||
BehaviourPage::BehaviourPage()
|
||||
: SettingsPage("Behaviour", ":/images/behave.svg")
|
||||
{
|
||||
|
@ -80,6 +81,7 @@ QSlider *BehaviourPage::createMouseScrollSlider()
|
|||
|
||||
return slider;
|
||||
}
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -11,6 +11,7 @@ class EmotesPage : public SettingsPage
|
|||
public:
|
||||
EmotesPage();
|
||||
};
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
||||
HighlightingPage::HighlightingPage()
|
||||
: SettingsPage("Highlights", ":/images/notifications.svg")
|
||||
{
|
||||
|
@ -239,6 +240,7 @@ void HighlightingPage::addHighlightTabSignals()
|
|||
delete selectedHighlight;
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
#include "widgets/settingspages/settingspage.hpp"
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
class QPushButton;
|
||||
class QListWidget;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
||||
IgnoreMessagesPage::IgnoreMessagesPage()
|
||||
: SettingsPage("Ignore Messages", "")
|
||||
{
|
||||
|
@ -32,6 +33,7 @@ IgnoreMessagesPage::IgnoreMessagesPage()
|
|||
// ---- misc
|
||||
this->keywordsUpdated.setSingleShot(true);
|
||||
}
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <QTimer>
|
||||
#include "widgets/settingspages/settingspage.hpp"
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
@ -14,6 +15,7 @@ public:
|
|||
|
||||
QTimer keywordsUpdated;
|
||||
};
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
||||
IgnoreUsersPage::IgnoreUsersPage()
|
||||
: SettingsPage("Ignore Users", "")
|
||||
{
|
||||
|
@ -50,6 +51,7 @@ IgnoreUsersPage::IgnoreUsersPage()
|
|||
auto userList = group.emplace<QListView>();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -5,11 +5,13 @@
|
|||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
||||
class IgnoreUsersPage : public SettingsPage
|
||||
{
|
||||
public:
|
||||
IgnoreUsersPage();
|
||||
};
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
||||
KeyboardSettingsPage::KeyboardSettingsPage()
|
||||
: SettingsPage("Keybindings", "")
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -5,11 +5,13 @@
|
|||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
||||
class KeyboardSettingsPage : public SettingsPage
|
||||
{
|
||||
public:
|
||||
KeyboardSettingsPage();
|
||||
};
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -11,6 +11,7 @@ class LogsPage : public SettingsPage
|
|||
public:
|
||||
LogsPage();
|
||||
};
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
||||
SpecialChannelsPage::SpecialChannelsPage()
|
||||
: SettingsPage("Special channels", "")
|
||||
{
|
||||
|
@ -30,6 +31,7 @@ SpecialChannelsPage::SpecialChannelsPage()
|
|||
|
||||
layout->addStretch(1);
|
||||
}
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -5,11 +5,13 @@
|
|||
namespace chatterino {
|
||||
namespace widgets {
|
||||
namespace settingspages {
|
||||
|
||||
class SpecialChannelsPage : public SettingsPage
|
||||
{
|
||||
public:
|
||||
SpecialChannelsPage();
|
||||
};
|
||||
|
||||
} // namespace settingspages
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <QMimeData>
|
||||
#include <QPainter>
|
||||
#include <QVBoxLayout>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
#include <functional>
|
||||
#include <random>
|
||||
|
@ -150,7 +149,7 @@ void Split::setChannel(ChannelPtr _newChannel)
|
|||
|
||||
this->header.updateModerationModeIcon();
|
||||
|
||||
this->channelChanged();
|
||||
this->channelChanged.invoke();
|
||||
}
|
||||
|
||||
void Split::setFlexSizeX(double x)
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include <QShortcut>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <boost/signals2/connection.hpp>
|
||||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
|
@ -47,7 +46,7 @@ public:
|
|||
~Split() override;
|
||||
|
||||
pajlada::Settings::Setting<QString> channelName;
|
||||
boost::signals2::signal<void()> channelChanged;
|
||||
pajlada::Signals::NoArgSignal channelChanged;
|
||||
|
||||
ChannelView &getChannelView()
|
||||
{
|
||||
|
@ -93,8 +92,8 @@ private:
|
|||
|
||||
bool moderationMode;
|
||||
|
||||
boost::signals2::connection channelIDChangedConnection;
|
||||
boost::signals2::connection usermodeChangedConnection;
|
||||
pajlada::Signals::Connection channelIDChangedConnection;
|
||||
pajlada::Signals::Connection usermodeChangedConnection;
|
||||
|
||||
void setChannel(ChannelPtr newChannel);
|
||||
void doOpenAccountPopupWidget(AccountPopupWidget *widget, QString user);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
|
||||
StreamView::StreamView(ChannelPtr channel, QUrl url)
|
||||
{
|
||||
util::LayoutCreator<StreamView> layoutCreator(this);
|
||||
|
@ -30,5 +31,6 @@ StreamView::StreamView(ChannelPtr channel, QUrl url)
|
|||
this->layout()->setSpacing(0);
|
||||
this->layout()->setMargin(0);
|
||||
}
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -2,14 +2,17 @@
|
|||
|
||||
#include <QUrl>
|
||||
#include <QWidget>
|
||||
|
||||
#include <memory>
|
||||
|
||||
class QWebEngineView;
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
class Channel;
|
||||
|
||||
namespace widgets {
|
||||
|
||||
class StreamView : public QWidget
|
||||
{
|
||||
public:
|
||||
|
@ -18,5 +21,6 @@ public:
|
|||
private:
|
||||
QWebEngineView *stream;
|
||||
};
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
|
@ -7,8 +7,6 @@ namespace widgets {
|
|||
TextInputDialog::TextInputDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, _vbox(this)
|
||||
, _lineEdit()
|
||||
, _buttonBox()
|
||||
, _okButton("OK")
|
||||
, _cancelButton("Cancel")
|
||||
{
|
||||
|
|
|
@ -65,5 +65,6 @@ void TooltipWidget::leaveEvent(QEvent *)
|
|||
{
|
||||
// clear parents event
|
||||
}
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue