ircconnection and about page

This commit is contained in:
fourtf 2018-06-04 21:05:18 +02:00
parent 5e7fc909e7
commit 8de0a59533
8 changed files with 516 additions and 485 deletions

View file

@ -1,427 +1,429 @@
#------------------------------------------------- #-------------------------------------------------
# #
# Project created by QtCreator 2016-12-28T18:23:35 # Project created by QtCreator 2016-12-28T18:23:35
# #
#------------------------------------------------- #-------------------------------------------------
message(----) message(----)
QT += widgets core gui network multimedia svg QT += widgets core gui network multimedia svg
CONFIG += communi CONFIG += communi
COMMUNI += core model util COMMUNI += core model util
CONFIG += c++14 CONFIG += c++14
INCLUDEPATH += src/ INCLUDEPATH += src/
TARGET = chatterino TARGET = chatterino
TEMPLATE = app TEMPLATE = app
DEFINES += QT_DEPRECATED_WARNINGS DEFINES += QT_DEPRECATED_WARNINGS
PRECOMPILED_HEADER = src/precompiled_header.hpp PRECOMPILED_HEADER = src/precompiled_header.hpp
CONFIG += precompile_header CONFIG += precompile_header
# https://bugreports.qt.io/browse/QTBUG-27018 # https://bugreports.qt.io/browse/QTBUG-27018
equals(QMAKE_CXX, "clang++")|equals(QMAKE_CXX, "g++") { equals(QMAKE_CXX, "clang++")|equals(QMAKE_CXX, "g++") {
TARGET = bin/chatterino TARGET = bin/chatterino
} }
# Icons # Icons
macx:ICON = resources/images/chatterino2.icns macx:ICON = resources/images/chatterino2.icns
win32:RC_FILE = resources/windows.rc win32:RC_FILE = resources/windows.rc
macx { macx {
LIBS += -L/usr/local/lib LIBS += -L/usr/local/lib
} }
# Submodules # Submodules
include(dependencies/rapidjson.pri) include(dependencies/rapidjson.pri)
include(dependencies/settings.pri) include(dependencies/settings.pri)
include(dependencies/signals.pri) include(dependencies/signals.pri)
include(dependencies/humanize.pri) include(dependencies/humanize.pri)
include(dependencies/fmt.pri) include(dependencies/fmt.pri)
DEFINES += IRC_NAMESPACE=Communi DEFINES += IRC_NAMESPACE=Communi
include(dependencies/libcommuni.pri) include(dependencies/libcommuni.pri)
include(dependencies/websocketpp.pri) include(dependencies/websocketpp.pri)
include(dependencies/openssl.pri) include(dependencies/openssl.pri)
include(dependencies/boost.pri) include(dependencies/boost.pri)
# Optional feature: QtWebEngine # Optional feature: QtWebEngine
#exists ($(QTDIR)/include/QtWebEngine/QtWebEngine) { #exists ($(QTDIR)/include/QtWebEngine/QtWebEngine) {
# message(Using QWebEngine) # message(Using QWebEngine)
# QT += webenginewidgets # QT += webenginewidgets
# DEFINES += "USEWEBENGINE" # DEFINES += "USEWEBENGINE"
#} #}
linux { linux {
LIBS += -lrt LIBS += -lrt
} }
win32 { win32 {
LIBS += -luser32 LIBS += -luser32
} }
# OSX include directory # OSX include directory
macx { macx {
INCLUDEPATH += /usr/local/include INCLUDEPATH += /usr/local/include
} }
# Optional dependency on Windows SDK 7 # Optional dependency on Windows SDK 7
!contains(QMAKE_TARGET.arch, x86_64) { !contains(QMAKE_TARGET.arch, x86_64) {
win32:exists(C:\Program Files\Microsoft SDKs\Windows\v7.1\Include\Windows.h) { win32:exists(C:\Program Files\Microsoft SDKs\Windows\v7.1\Include\Windows.h) {
LIBS += -L"C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib" \ LIBS += -L"C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib" \
-ldwmapi -ldwmapi
DEFINES += "USEWINSDK" DEFINES += "USEWINSDK"
message(Using Windows SDK 7) message(Using Windows SDK 7)
} }
} }
# Optional dependency on Windows SDK 10 # Optional dependency on Windows SDK 10
contains(QMAKE_TARGET.arch, x86_64) { contains(QMAKE_TARGET.arch, x86_64) {
WIN_SDK_VERSION = $$(WindowsSDKVersion) WIN_SDK_VERSION = $$(WindowsSDKVersion)
!isEmpty(WIN_SDK_VERSION) { !isEmpty(WIN_SDK_VERSION) {
!equals(WIN_SDK_VERSION, "\\") { !equals(WIN_SDK_VERSION, "\\") {
DEFINES += "USEWINSDK" DEFINES += "USEWINSDK"
message(Using Windows SDK 10) message(Using Windows SDK 10)
} }
} }
} }
werr { werr {
QMAKE_CXXFLAGS += -Werror QMAKE_CXXFLAGS += -Werror
message("Enabling error on warning") message("Enabling error on warning")
} }
# src # src
SOURCES += \ SOURCES += \
src/main.cpp \ src/main.cpp \
src/application.cpp \ src/application.cpp \
src/channel.cpp \ src/channel.cpp \
src/channeldata.cpp \ src/channeldata.cpp \
src/messages/image.cpp \ src/messages/image.cpp \
src/messages/layouts/messagelayout.cpp \ src/messages/layouts/messagelayout.cpp \
src/messages/layouts/messagelayoutcontainer.cpp \ src/messages/layouts/messagelayoutcontainer.cpp \
src/messages/layouts/messagelayoutelement.cpp \ src/messages/layouts/messagelayoutelement.cpp \
src/messages/link.cpp \ src/messages/link.cpp \
src/messages/message.cpp \ src/messages/message.cpp \
src/messages/messagebuilder.cpp \ src/messages/messagebuilder.cpp \
src/messages/messagecolor.cpp \ src/messages/messagecolor.cpp \
src/messages/messageelement.cpp \ src/messages/messageelement.cpp \
src/providers/irc/abstractircserver.cpp \ src/providers/irc/abstractircserver.cpp \
src/providers/twitch/ircmessagehandler.cpp \ src/providers/twitch/ircmessagehandler.cpp \
src/providers/twitch/twitchaccount.cpp \ src/providers/twitch/twitchaccount.cpp \
src/providers/twitch/twitchaccountmanager.cpp \ src/providers/twitch/twitchaccountmanager.cpp \
src/providers/twitch/twitchchannel.cpp \ src/providers/twitch/twitchchannel.cpp \
src/providers/twitch/twitchmessagebuilder.cpp \ src/providers/twitch/twitchmessagebuilder.cpp \
src/providers/twitch/twitchserver.cpp \ src/providers/twitch/twitchserver.cpp \
src/providers/twitch/pubsub.cpp \ src/providers/twitch/pubsub.cpp \
src/singletons/commandmanager.cpp \ src/singletons/commandmanager.cpp \
src/singletons/emotemanager.cpp \ src/singletons/emotemanager.cpp \
src/singletons/fontmanager.cpp \ src/singletons/fontmanager.cpp \
src/util/completionmodel.cpp \ src/util/completionmodel.cpp \
src/singletons/helper/loggingchannel.cpp \ src/singletons/helper/loggingchannel.cpp \
src/singletons/helper/moderationaction.cpp \ src/singletons/helper/moderationaction.cpp \
src/singletons/helper/chatterinosetting.cpp \ src/singletons/helper/chatterinosetting.cpp \
src/singletons/loggingmanager.cpp \ src/singletons/loggingmanager.cpp \
src/singletons/pathmanager.cpp \ src/singletons/pathmanager.cpp \
src/singletons/resourcemanager.cpp \ src/singletons/resourcemanager.cpp \
src/singletons/settingsmanager.cpp \ src/singletons/settingsmanager.cpp \
src/singletons/thememanager.cpp \ src/singletons/thememanager.cpp \
src/singletons/windowmanager.cpp \ src/singletons/windowmanager.cpp \
src/util/networkmanager.cpp \ src/util/networkmanager.cpp \
src/util/networkrequest.cpp \ src/util/networkrequest.cpp \
src/widgets/accountpopup.cpp \ src/widgets/accountpopup.cpp \
src/widgets/accountswitchpopupwidget.cpp \ src/widgets/accountswitchpopupwidget.cpp \
src/widgets/accountswitchwidget.cpp \ src/widgets/accountswitchwidget.cpp \
src/widgets/basewidget.cpp \ src/widgets/basewidget.cpp \
src/widgets/basewindow.cpp \ src/widgets/basewindow.cpp \
src/widgets/emotepopup.cpp \ src/widgets/emotepopup.cpp \
src/widgets/helper/channelview.cpp \ src/widgets/helper/channelview.cpp \
src/widgets/helper/droppreview.cpp \ src/widgets/helper/droppreview.cpp \
src/widgets/helper/label.cpp \ src/widgets/helper/label.cpp \
src/widgets/helper/notebookbutton.cpp \ src/widgets/helper/notebookbutton.cpp \
src/widgets/helper/notebooktab.cpp \ src/widgets/helper/notebooktab.cpp \
src/widgets/helper/resizingtextedit.cpp \ src/widgets/helper/resizingtextedit.cpp \
src/widgets/helper/rippleeffectbutton.cpp \ src/widgets/helper/rippleeffectbutton.cpp \
src/widgets/helper/rippleeffectlabel.cpp \ src/widgets/helper/rippleeffectlabel.cpp \
src/widgets/helper/scrollbarhighlight.cpp \ src/widgets/helper/scrollbarhighlight.cpp \
src/widgets/helper/searchpopup.cpp \ src/widgets/helper/searchpopup.cpp \
src/widgets/helper/settingsdialogtab.cpp \ src/widgets/helper/settingsdialogtab.cpp \
src/widgets/helper/splitcolumn.cpp \ src/widgets/helper/splitcolumn.cpp \
src/widgets/helper/splitheader.cpp \ src/widgets/helper/splitheader.cpp \
src/widgets/helper/splitinput.cpp \ src/widgets/helper/splitinput.cpp \
src/widgets/helper/titlebarbutton.cpp \ src/widgets/helper/titlebarbutton.cpp \
src/widgets/logindialog.cpp \ src/widgets/logindialog.cpp \
src/widgets/notebook.cpp \ src/widgets/notebook.cpp \
src/widgets/qualitypopup.cpp \ src/widgets/qualitypopup.cpp \
src/widgets/scrollbar.cpp \ src/widgets/scrollbar.cpp \
src/widgets/settingsdialog.cpp \ src/widgets/settingsdialog.cpp \
src/widgets/settingspages/aboutpage.cpp \ src/widgets/settingspages/aboutpage.cpp \
src/widgets/settingspages/accountspage.cpp \ src/widgets/settingspages/accountspage.cpp \
src/widgets/settingspages/appearancepage.cpp \ src/widgets/settingspages/appearancepage.cpp \
src/widgets/settingspages/behaviourpage.cpp \ src/widgets/settingspages/behaviourpage.cpp \
src/widgets/settingspages/commandpage.cpp \ src/widgets/settingspages/commandpage.cpp \
src/widgets/settingspages/emotespage.cpp \ src/widgets/settingspages/emotespage.cpp \
src/widgets/settingspages/highlightingpage.cpp \ src/widgets/settingspages/highlightingpage.cpp \
src/widgets/settingspages/ignoreuserspage.cpp \ src/widgets/settingspages/ignoreuserspage.cpp \
src/widgets/settingspages/keyboardsettingspage.cpp \ src/widgets/settingspages/keyboardsettingspage.cpp \
src/widgets/settingspages/logspage.cpp \ src/widgets/settingspages/logspage.cpp \
src/widgets/settingspages/moderationpage.cpp \ src/widgets/settingspages/moderationpage.cpp \
src/widgets/settingspages/settingspage.cpp \ src/widgets/settingspages/settingspage.cpp \
src/widgets/settingspages/specialchannelspage.cpp \ src/widgets/settingspages/specialchannelspage.cpp \
src/widgets/split.cpp \ src/widgets/split.cpp \
src/widgets/splitcontainer.cpp \ src/widgets/splitcontainer.cpp \
src/widgets/streamview.cpp \ src/widgets/streamview.cpp \
src/widgets/textinputdialog.cpp \ src/widgets/textinputdialog.cpp \
src/widgets/tooltipwidget.cpp \ src/widgets/tooltipwidget.cpp \
src/widgets/window.cpp \ src/widgets/window.cpp \
src/providers/irc/ircaccount.cpp \ src/providers/irc/ircaccount.cpp \
src/providers/irc/ircserver.cpp \ src/providers/irc/ircserver.cpp \
src/providers/irc/ircchannel2.cpp \ src/providers/irc/ircchannel2.cpp \
src/util/streamlink.cpp \ src/util/streamlink.cpp \
src/providers/twitch/twitchhelpers.cpp \ src/providers/twitch/twitchhelpers.cpp \
src/widgets/helper/signallabel.cpp \ src/widgets/helper/signallabel.cpp \
src/widgets/helper/debugpopup.cpp \ src/widgets/helper/debugpopup.cpp \
src/util/debugcount.cpp \ src/util/debugcount.cpp \
src/singletons/nativemessagingmanager.cpp \ src/singletons/nativemessagingmanager.cpp \
src/util/rapidjson-helpers.cpp \ src/util/rapidjson-helpers.cpp \
src/providers/twitch/pubsubhelpers.cpp \ src/providers/twitch/pubsubhelpers.cpp \
src/providers/twitch/pubsubactions.cpp \ src/providers/twitch/pubsubactions.cpp \
src/providers/twitch/twitchuser.cpp \ src/providers/twitch/twitchuser.cpp \
src/widgets/selectchanneldialog.cpp \ src/widgets/selectchanneldialog.cpp \
src/singletons/updatemanager.cpp \ src/singletons/updatemanager.cpp \
src/widgets/lastruncrashdialog.cpp \ src/widgets/lastruncrashdialog.cpp \
src/widgets/attachedwindow.cpp \ src/widgets/attachedwindow.cpp \
src/widgets/settingspages/externaltoolspage.cpp \ src/widgets/settingspages/externaltoolspage.cpp \
src/widgets/helper/comboboxitemdelegate.cpp \ src/widgets/helper/comboboxitemdelegate.cpp \
src/controllers/commands/command.cpp \ src/controllers/commands/command.cpp \
src/controllers/commands/commandmodel.cpp \ src/controllers/commands/commandmodel.cpp \
src/controllers/commands/commandcontroller.cpp \ src/controllers/commands/commandcontroller.cpp \
src/controllers/highlights/highlightcontroller.cpp \ src/controllers/highlights/highlightcontroller.cpp \
src/controllers/highlights/highlightmodel.cpp \ src/controllers/highlights/highlightmodel.cpp \
src/controllers/ignores/ignorecontroller.cpp \ src/controllers/ignores/ignorecontroller.cpp \
src/controllers/ignores/ignoremodel.cpp \ src/controllers/ignores/ignoremodel.cpp \
src/widgets/helper/editablemodelview.cpp \ src/widgets/helper/editablemodelview.cpp \
src/controllers/accounts/accountcontroller.cpp \ src/controllers/accounts/accountcontroller.cpp \
src/controllers/accounts/accountmodel.cpp \ src/controllers/accounts/accountmodel.cpp \
src/controllers/accounts/account.cpp \ src/controllers/accounts/account.cpp \
src/widgets/helper/splitoverlay.cpp \ src/widgets/helper/splitoverlay.cpp \
src/widgets/helper/dropoverlay.cpp \ src/widgets/helper/dropoverlay.cpp \
src/widgets/helper/splitnode.cpp \ src/widgets/helper/splitnode.cpp \
src/widgets/notificationpopup.cpp \ src/widgets/notificationpopup.cpp \
src/controllers/taggedusers/taggeduserscontroller.cpp \ src/controllers/taggedusers/taggeduserscontroller.cpp \
src/controllers/taggedusers/taggeduser.cpp \ src/controllers/taggedusers/taggeduser.cpp \
src/controllers/taggedusers/taggedusersmodel.cpp \ src/controllers/taggedusers/taggedusersmodel.cpp \
src/util/emotemap.cpp src/util/emotemap.cpp \
src/providers/irc/ircconnection2.cpp
HEADERS += \
src/precompiled_header.hpp \ HEADERS += \
src/channel.hpp \ src/precompiled_header.hpp \
src/const.hpp \ src/channel.hpp \
src/debug/log.hpp \ src/const.hpp \
src/emojis.hpp \ src/debug/log.hpp \
src/messages/image.hpp \ src/emojis.hpp \
src/messages/layouts/messagelayout.hpp \ src/messages/image.hpp \
src/messages/layouts/messagelayoutcontainer.hpp \ src/messages/layouts/messagelayout.hpp \
src/messages/layouts/messagelayoutelement.hpp \ src/messages/layouts/messagelayoutcontainer.hpp \
src/messages/limitedqueue.hpp \ src/messages/layouts/messagelayoutelement.hpp \
src/messages/limitedqueuesnapshot.hpp \ src/messages/limitedqueue.hpp \
src/messages/link.hpp \ src/messages/limitedqueuesnapshot.hpp \
src/messages/message.hpp \ src/messages/link.hpp \
src/messages/messagebuilder.hpp \ src/messages/message.hpp \
src/messages/messagecolor.hpp \ src/messages/messagebuilder.hpp \
src/messages/messageelement.hpp \ src/messages/messagecolor.hpp \
src/messages/messageparseargs.hpp \ src/messages/messageelement.hpp \
src/messages/selection.hpp \ src/messages/messageparseargs.hpp \
src/providers/twitch/emotevalue.hpp \ src/messages/selection.hpp \
src/providers/twitch/ircmessagehandler.hpp \ src/providers/twitch/emotevalue.hpp \
src/providers/twitch/twitchaccount.hpp \ src/providers/twitch/ircmessagehandler.hpp \
src/providers/twitch/twitchaccountmanager.hpp \ src/providers/twitch/twitchaccount.hpp \
src/providers/twitch/twitchchannel.hpp \ src/providers/twitch/twitchaccountmanager.hpp \
src/providers/twitch/twitchmessagebuilder.hpp \ src/providers/twitch/twitchchannel.hpp \
src/providers/twitch/twitchserver.hpp \ src/providers/twitch/twitchmessagebuilder.hpp \
src/providers/twitch/pubsub.hpp \ src/providers/twitch/twitchserver.hpp \
src/singletons/commandmanager.hpp \ src/providers/twitch/pubsub.hpp \
src/singletons/emotemanager.hpp \ src/singletons/commandmanager.hpp \
src/singletons/fontmanager.hpp \ src/singletons/emotemanager.hpp \
src/singletons/helper/chatterinosetting.hpp \ src/singletons/fontmanager.hpp \
src/util/completionmodel.hpp \ src/singletons/helper/chatterinosetting.hpp \
src/singletons/helper/loggingchannel.hpp \ src/util/completionmodel.hpp \
src/singletons/helper/moderationaction.hpp \ src/singletons/helper/loggingchannel.hpp \
src/singletons/loggingmanager.hpp \ src/singletons/helper/moderationaction.hpp \
src/singletons/pathmanager.hpp \ src/singletons/loggingmanager.hpp \
src/singletons/resourcemanager.hpp \ src/singletons/pathmanager.hpp \
src/singletons/thememanager.hpp \ src/singletons/resourcemanager.hpp \
src/singletons/windowmanager.hpp \ src/singletons/thememanager.hpp \
src/util/benchmark.hpp \ src/singletons/windowmanager.hpp \
src/util/concurrentmap.hpp \ src/util/benchmark.hpp \
src/util/distancebetweenpoints.hpp \ src/util/concurrentmap.hpp \
src/util/emotemap.hpp \ src/util/distancebetweenpoints.hpp \
src/util/flagsenum.hpp \ src/util/emotemap.hpp \
src/util/helpers.hpp \ src/util/flagsenum.hpp \
src/util/irchelpers.hpp \ src/util/helpers.hpp \
src/util/layoutcreator.hpp \ src/util/irchelpers.hpp \
src/util/nativeeventhelper.hpp \ src/util/layoutcreator.hpp \
src/util/networkmanager.hpp \ src/util/nativeeventhelper.hpp \
src/util/networkrequest.hpp \ src/util/networkmanager.hpp \
src/util/networkrequester.hpp \ src/util/networkrequest.hpp \
src/util/networkworker.hpp \ src/util/networkrequester.hpp \
src/util/posttothread.hpp \ src/util/networkworker.hpp \
src/util/property.hpp \ src/util/posttothread.hpp \
src/util/serialize-custom.hpp \ src/util/property.hpp \
src/util/urlfetch.hpp \ src/util/serialize-custom.hpp \
src/widgets/accountpopup.hpp \ src/util/urlfetch.hpp \
src/widgets/accountswitchpopupwidget.hpp \ src/widgets/accountpopup.hpp \
src/widgets/accountswitchwidget.hpp \ src/widgets/accountswitchpopupwidget.hpp \
src/widgets/basewidget.hpp \ src/widgets/accountswitchwidget.hpp \
src/widgets/basewindow.hpp \ src/widgets/basewidget.hpp \
src/widgets/emotepopup.hpp \ src/widgets/basewindow.hpp \
src/widgets/helper/channelview.hpp \ src/widgets/emotepopup.hpp \
src/widgets/helper/droppreview.hpp \ src/widgets/helper/channelview.hpp \
src/widgets/helper/label.hpp \ src/widgets/helper/droppreview.hpp \
src/widgets/helper/notebookbutton.hpp \ src/widgets/helper/label.hpp \
src/widgets/helper/notebooktab.hpp \ src/widgets/helper/notebookbutton.hpp \
src/widgets/helper/resizingtextedit.hpp \ src/widgets/helper/notebooktab.hpp \
src/widgets/helper/rippleeffectbutton.hpp \ src/widgets/helper/resizingtextedit.hpp \
src/widgets/helper/rippleeffectlabel.hpp \ src/widgets/helper/rippleeffectbutton.hpp \
src/widgets/helper/scrollbarhighlight.hpp \ src/widgets/helper/rippleeffectlabel.hpp \
src/widgets/helper/searchpopup.hpp \ src/widgets/helper/scrollbarhighlight.hpp \
src/widgets/helper/settingsdialogtab.hpp \ src/widgets/helper/searchpopup.hpp \
src/widgets/helper/shortcut.hpp \ src/widgets/helper/settingsdialogtab.hpp \
src/widgets/helper/signallabel.hpp \ src/widgets/helper/shortcut.hpp \
src/widgets/helper/splitcolumn.hpp \ src/widgets/helper/signallabel.hpp \
src/widgets/helper/splitheader.hpp \ src/widgets/helper/splitcolumn.hpp \
src/widgets/helper/splitinput.hpp \ src/widgets/helper/splitheader.hpp \
src/widgets/helper/titlebarbutton.hpp \ src/widgets/helper/splitinput.hpp \
src/widgets/notebook.hpp \ src/widgets/helper/titlebarbutton.hpp \
src/widgets/qualitypopup.hpp \ src/widgets/notebook.hpp \
src/widgets/scrollbar.hpp \ src/widgets/qualitypopup.hpp \
src/widgets/settingsdialog.hpp \ src/widgets/scrollbar.hpp \
src/widgets/settingspages/aboutpage.hpp \ src/widgets/settingsdialog.hpp \
src/widgets/settingspages/accountspage.hpp \ src/widgets/settingspages/aboutpage.hpp \
src/widgets/settingspages/appearancepage.hpp \ src/widgets/settingspages/accountspage.hpp \
src/widgets/settingspages/behaviourpage.hpp \ src/widgets/settingspages/appearancepage.hpp \
src/widgets/settingspages/commandpage.hpp \ src/widgets/settingspages/behaviourpage.hpp \
src/widgets/settingspages/emotespage.hpp \ src/widgets/settingspages/commandpage.hpp \
src/widgets/settingspages/highlightingpage.hpp \ src/widgets/settingspages/emotespage.hpp \
src/widgets/settingspages/ignoreuserspage.hpp \ src/widgets/settingspages/highlightingpage.hpp \
src/widgets/settingspages/keyboardsettingspage.hpp \ src/widgets/settingspages/ignoreuserspage.hpp \
src/widgets/settingspages/logspage.hpp \ src/widgets/settingspages/keyboardsettingspage.hpp \
src/widgets/settingspages/moderationpage.hpp \ src/widgets/settingspages/logspage.hpp \
src/widgets/settingspages/settingspage.hpp \ src/widgets/settingspages/moderationpage.hpp \
src/widgets/settingspages/specialchannelspage.hpp \ src/widgets/settingspages/settingspage.hpp \
src/widgets/split.hpp \ src/widgets/settingspages/specialchannelspage.hpp \
src/widgets/splitcontainer.hpp \ src/widgets/split.hpp \
src/widgets/streamview.hpp \ src/widgets/splitcontainer.hpp \
src/widgets/textinputdialog.hpp \ src/widgets/streamview.hpp \
src/widgets/tooltipwidget.hpp \ src/widgets/textinputdialog.hpp \
src/widgets/window.hpp \ src/widgets/tooltipwidget.hpp \
src/common.hpp \ src/widgets/window.hpp \
src/providers/irc/abstractircserver.hpp \ src/common.hpp \
src/providers/irc/ircaccount.hpp \ src/providers/irc/abstractircserver.hpp \
src/providers/irc/ircserver.hpp \ src/providers/irc/ircaccount.hpp \
src/providers/irc/ircchannel2.hpp \ src/providers/irc/ircserver.hpp \
src/util/streamlink.hpp \ src/providers/irc/ircchannel2.hpp \
src/providers/twitch/twitchhelpers.hpp \ src/util/streamlink.hpp \
src/util/debugcount.hpp \ src/providers/twitch/twitchhelpers.hpp \
src/widgets/helper/debugpopup.hpp \ src/util/debugcount.hpp \
src/version.hpp \ src/widgets/helper/debugpopup.hpp \
src/singletons/settingsmanager.hpp \ src/version.hpp \
src/singletons/nativemessagingmanager.hpp \ src/singletons/settingsmanager.hpp \
src/util/rapidjson-helpers.hpp \ src/singletons/nativemessagingmanager.hpp \
src/providers/twitch/pubsubhelpers.hpp \ src/util/rapidjson-helpers.hpp \
src/providers/twitch/pubsubactions.hpp \ src/providers/twitch/pubsubhelpers.hpp \
src/providers/twitch/twitchuser.hpp \ src/providers/twitch/pubsubactions.hpp \
src/widgets/selectchanneldialog.hpp \ src/providers/twitch/twitchuser.hpp \
src/singletons/updatemanager.hpp \ src/widgets/selectchanneldialog.hpp \
src/widgets/lastruncrashdialog.hpp \ src/singletons/updatemanager.hpp \
src/widgets/attachedwindow.hpp \ src/widgets/lastruncrashdialog.hpp \
src/widgets/settingspages/externaltoolspage.hpp \ src/widgets/attachedwindow.hpp \
src/util/removescrollareabackground.hpp \ src/widgets/settingspages/externaltoolspage.hpp \
src/util/standarditemhelper.hpp \ src/util/removescrollareabackground.hpp \
src/widgets/helper/comboboxitemdelegate.hpp \ src/util/standarditemhelper.hpp \
src/util/assertinguithread.hpp \ src/widgets/helper/comboboxitemdelegate.hpp \
src/util/signalvector2.hpp \ src/util/assertinguithread.hpp \
src/util/signalvectormodel.hpp \ src/util/signalvector2.hpp \
src/controllers/commands/command.hpp \ src/util/signalvectormodel.hpp \
src/controllers/commands/commandmodel.hpp \ src/controllers/commands/command.hpp \
src/controllers/commands/commandcontroller.hpp \ src/controllers/commands/commandmodel.hpp \
src/controllers/highlights/highlightcontroller.hpp \ src/controllers/commands/commandcontroller.hpp \
src/controllers/highlights/highlightphrase.hpp \ src/controllers/highlights/highlightcontroller.hpp \
src/controllers/highlights/highlightmodel.hpp \ src/controllers/highlights/highlightphrase.hpp \
src/controllers/ignores/ignorecontroller.hpp \ src/controllers/highlights/highlightmodel.hpp \
src/controllers/ignores/ignorephrase.hpp \ src/controllers/ignores/ignorecontroller.hpp \
src/controllers/ignores/ignoremodel.hpp \ src/controllers/ignores/ignorephrase.hpp \
src/widgets/helper/editablemodelview.hpp \ src/controllers/ignores/ignoremodel.hpp \
src/controllers/accounts/accountcontroller.hpp \ src/widgets/helper/editablemodelview.hpp \
src/controllers/accounts/accountmodel.hpp \ src/controllers/accounts/accountcontroller.hpp \
src/controllers/accounts/account.hpp \ src/controllers/accounts/accountmodel.hpp \
src/util/sharedptrelementless.hpp \ src/controllers/accounts/account.hpp \
src/widgets/helper/splitoverlay.hpp \ src/util/sharedptrelementless.hpp \
src/widgets/helper/dropoverlay.hpp \ src/widgets/helper/splitoverlay.hpp \
src/widgets/helper/splitnode.hpp \ src/widgets/helper/dropoverlay.hpp \
src/widgets/notificationpopup.hpp \ src/widgets/helper/splitnode.hpp \
src/controllers/taggedusers/taggeduserscontroller.hpp \ src/widgets/notificationpopup.hpp \
src/controllers/taggedusers/taggeduser.hpp \ src/controllers/taggedusers/taggeduserscontroller.hpp \
src/providerid.hpp \ src/controllers/taggedusers/taggeduser.hpp \
src/controllers/taggedusers/taggedusersmodel.hpp \ src/providerid.hpp \
src/util/qstringhash.hpp \ src/controllers/taggedusers/taggedusersmodel.hpp \
src/util/mutexvalue.hpp src/util/qstringhash.hpp \
src/util/mutexvalue.hpp \
RESOURCES += \ src/providers/irc/ircconnection2.hpp
resources/resources.qrc
RESOURCES += \
DISTFILES += resources/resources.qrc
FORMS += \ DISTFILES +=
forms/accountpopupform.ui
FORMS += \
# Define warning flags for Chatterino forms/accountpopupform.ui
win32-msvc* {
QMAKE_CXXFLAGS_WARN_ON = /W4 # Define warning flags for Chatterino
# 4714 - function marked as __forceinline not inlined win32-msvc* {
# 4996 - occurs when the compiler encounters a function or variable that is marked as deprecated. QMAKE_CXXFLAGS_WARN_ON = /W4
# These functions may have a different preferred name, may be insecure or have # 4714 - function marked as __forceinline not inlined
# a more secure variant, or may be obsolete. # 4996 - occurs when the compiler encounters a function or variable that is marked as deprecated.
# 4505 - unreferenced local version has been removed # These functions may have a different preferred name, may be insecure or have
# 4127 - conditional expression is constant # a more secure variant, or may be obsolete.
# 4503 - decorated name length exceeded, name was truncated # 4505 - unreferenced local version has been removed
# 4100 - unreferences formal parameter # 4127 - conditional expression is constant
# 4305 - possible truncation of data # 4503 - decorated name length exceeded, name was truncated
# 4267 - possible loss of data in return # 4100 - unreferences formal parameter
QMAKE_CXXFLAGS_WARN_ON += /wd4714 # 4305 - possible truncation of data
QMAKE_CXXFLAGS_WARN_ON += /wd4996 # 4267 - possible loss of data in return
QMAKE_CXXFLAGS_WARN_ON += /wd4505 QMAKE_CXXFLAGS_WARN_ON += /wd4714
QMAKE_CXXFLAGS_WARN_ON += /wd4127 QMAKE_CXXFLAGS_WARN_ON += /wd4996
QMAKE_CXXFLAGS_WARN_ON += /wd4503 QMAKE_CXXFLAGS_WARN_ON += /wd4505
QMAKE_CXXFLAGS_WARN_ON += /wd4100 QMAKE_CXXFLAGS_WARN_ON += /wd4127
QMAKE_CXXFLAGS_WARN_ON += /wd4305 QMAKE_CXXFLAGS_WARN_ON += /wd4503
QMAKE_CXXFLAGS_WARN_ON += /wd4267 QMAKE_CXXFLAGS_WARN_ON += /wd4100
QMAKE_CXXFLAGS_WARN_ON += /wd4305
} else { QMAKE_CXXFLAGS_WARN_ON += /wd4267
QMAKE_CXXFLAGS_WARN_ON = -Wall
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function } else {
QMAKE_CXXFLAGS_WARN_ON += -Wno-switch QMAKE_CXXFLAGS_WARN_ON = -Wall
QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-function
QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare QMAKE_CXXFLAGS_WARN_ON += -Wno-switch
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-variable QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations
QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare
# Disabling strict-aliasing warnings for now, although we probably want to re-enable this in the future QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-variable
QMAKE_CXXFLAGS_WARN_ON += -Wno-strict-aliasing
# Disabling strict-aliasing warnings for now, although we probably want to re-enable this in the future
equals(QMAKE_CXX, "clang++") { QMAKE_CXXFLAGS_WARN_ON += -Wno-strict-aliasing
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedef
} else { equals(QMAKE_CXX, "clang++") {
QMAKE_CXXFLAGS_WARN_ON += -Wno-class-memaccess QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-local-typedef
} } else {
} QMAKE_CXXFLAGS_WARN_ON += -Wno-class-memaccess
}
# do not use windows min/max macros }
#win32 {
# DEFINES += NOMINMAX # do not use windows min/max macros
#} #win32 {
# DEFINES += NOMINMAX
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 #}
linux { #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
QMAKE_LFLAGS += -lrt
} linux {
QMAKE_LFLAGS += -lrt
}

View file

@ -4,6 +4,8 @@
#include "messages/limitedqueuesnapshot.hpp" #include "messages/limitedqueuesnapshot.hpp"
#include "messages/message.hpp" #include "messages/message.hpp"
#include <QCoreApplication>
using namespace chatterino::messages; using namespace chatterino::messages;
namespace chatterino { namespace chatterino {
@ -13,14 +15,14 @@ namespace irc {
AbstractIrcServer::AbstractIrcServer() AbstractIrcServer::AbstractIrcServer()
{ {
// Initialize the connections // Initialize the connections
this->writeConnection.reset(new Communi::IrcConnection); this->writeConnection.reset(new IrcConnection);
this->writeConnection->moveToThread(QCoreApplication::instance()->thread()); this->writeConnection->moveToThread(QCoreApplication::instance()->thread());
QObject::connect(this->writeConnection.get(), &Communi::IrcConnection::messageReceived, QObject::connect(this->writeConnection.get(), &Communi::IrcConnection::messageReceived,
[this](auto msg) { this->writeConnectionMessageReceived(msg); }); [this](auto msg) { this->writeConnectionMessageReceived(msg); });
// Listen to read connection message signals // Listen to read connection message signals
this->readConnection.reset(new Communi::IrcConnection); this->readConnection.reset(new IrcConnection);
this->readConnection->moveToThread(QCoreApplication::instance()->thread()); this->readConnection->moveToThread(QCoreApplication::instance()->thread());
QObject::connect(this->readConnection.get(), &Communi::IrcConnection::messageReceived, QObject::connect(this->readConnection.get(), &Communi::IrcConnection::messageReceived,
@ -33,7 +35,7 @@ AbstractIrcServer::AbstractIrcServer()
[this] { this->onDisconnected(); }); [this] { this->onDisconnected(); });
} }
Communi::IrcConnection *AbstractIrcServer::getReadConnection() const IrcConnection *AbstractIrcServer::getReadConnection() const
{ {
return this->readConnection.get(); return this->readConnection.get();
} }

View file

@ -2,9 +2,9 @@
#include "channel.hpp" #include "channel.hpp"
#include <IrcConnection>
#include <IrcMessage> #include <IrcMessage>
#include <pajlada/signals/signal.hpp> #include <pajlada/signals/signal.hpp>
#include <providers/irc/ircconnection2.hpp>
#include <functional> #include <functional>
#include <mutex> #include <mutex>
@ -19,7 +19,7 @@ public:
virtual ~AbstractIrcServer() = default; virtual ~AbstractIrcServer() = default;
// connection // connection
Communi::IrcConnection *getReadConnection() const; IrcConnection *getReadConnection() const;
void connect(); void connect();
void disconnect(); void disconnect();
@ -43,8 +43,7 @@ public:
protected: protected:
AbstractIrcServer(); AbstractIrcServer();
virtual void initializeConnection(Communi::IrcConnection *connection, bool isRead, virtual void initializeConnection(IrcConnection *connection, bool isRead, bool isWrite) = 0;
bool isWrite) = 0;
virtual std::shared_ptr<Channel> createChannel(const QString &channelName) = 0; virtual std::shared_ptr<Channel> createChannel(const QString &channelName) = 0;
virtual void privateMessageReceived(Communi::IrcPrivateMessage *message); virtual void privateMessageReceived(Communi::IrcPrivateMessage *message);
@ -64,10 +63,12 @@ protected:
private: private:
void initConnection(); void initConnection();
std::unique_ptr<Communi::IrcConnection> writeConnection = nullptr; std::unique_ptr<IrcConnection> writeConnection = nullptr;
std::unique_ptr<Communi::IrcConnection> readConnection = nullptr; std::unique_ptr<IrcConnection> readConnection = nullptr;
std::mutex connectionMutex; std::mutex connectionMutex;
QTimer pingTimer;
}; };
} // namespace irc } // namespace irc

View file

@ -0,0 +1,14 @@
#include "ircconnection2.hpp"
namespace chatterino {
namespace providers {
namespace irc {
IrcConnection::IrcConnection(QObject *parent)
: Communi::IrcConnection(parent)
{
}
} // namespace irc
} // namespace providers
} // namespace chatterino

View file

@ -0,0 +1,17 @@
#pragma once
#include <IrcConnection>
namespace chatterino {
namespace providers {
namespace irc {
class IrcConnection : public Communi::IrcConnection
{
public:
IrcConnection(QObject *parent = nullptr);
};
} // namespace irc
} // namespace providers
} // namespace chatterino

View file

@ -9,9 +9,10 @@
#include "providers/twitch/twitchmessagebuilder.hpp" #include "providers/twitch/twitchmessagebuilder.hpp"
#include "util/posttothread.hpp" #include "util/posttothread.hpp"
#include <IrcCommand>
#include <cassert> #include <cassert>
using namespace Communi; // using namespace Communi;
using namespace chatterino::singletons; using namespace chatterino::singletons;
namespace chatterino { namespace chatterino {
@ -32,7 +33,8 @@ void TwitchServer::initialize()
[this]() { util::postToThread([this] { this->connect(); }); }); [this]() { util::postToThread([this] { this->connect(); }); });
} }
void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead, bool isWrite) void TwitchServer::initializeConnection(providers::irc::IrcConnection *connection, bool isRead,
bool isWrite)
{ {
std::shared_ptr<TwitchAccount> account = getApp()->accounts->twitch.getCurrent(); std::shared_ptr<TwitchAccount> account = getApp()->accounts->twitch.getCurrent();
@ -57,9 +59,9 @@ void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead,
// this->refreshIgnoredUsers(username, oauthClient, oauthToken); // this->refreshIgnoredUsers(username, oauthClient, oauthToken);
} }
connection->sendCommand(IrcCommand::createCapability("REQ", "twitch.tv/membership")); connection->sendCommand(Communi::IrcCommand::createCapability("REQ", "twitch.tv/membership"));
connection->sendCommand(IrcCommand::createCapability("REQ", "twitch.tv/commands")); connection->sendCommand(Communi::IrcCommand::createCapability("REQ", "twitch.tv/commands"));
connection->sendCommand(IrcCommand::createCapability("REQ", "twitch.tv/tags")); connection->sendCommand(Communi::IrcCommand::createCapability("REQ", "twitch.tv/tags"));
connection->setHost("irc.chat.twitch.tv"); connection->setHost("irc.chat.twitch.tv");
connection->setPort(6667); connection->setPort(6667);
@ -75,15 +77,15 @@ std::shared_ptr<Channel> TwitchServer::createChannel(const QString &channelName)
return std::shared_ptr<Channel>(channel); return std::shared_ptr<Channel>(channel);
} }
void TwitchServer::privateMessageReceived(IrcPrivateMessage *message) void TwitchServer::privateMessageReceived(Communi::IrcPrivateMessage *message)
{ {
IrcMessageHandler::getInstance().handlePrivMessage(message, *this); IrcMessageHandler::getInstance().handlePrivMessage(message, *this);
} }
void TwitchServer::messageReceived(IrcMessage *message) void TwitchServer::messageReceived(Communi::IrcMessage *message)
{ {
// this->readConnection // this->readConnection
if (message->type() == IrcMessage::Type::Private) { if (message->type() == Communi::IrcMessage::Type::Private) {
// We already have a handler for private messages // We already have a handler for private messages
return; return;
} }
@ -105,7 +107,7 @@ void TwitchServer::messageReceived(IrcMessage *message)
} else if (command == "MODE") { } else if (command == "MODE") {
handler.handleModeMessage(message); handler.handleModeMessage(message);
} else if (command == "NOTICE") { } else if (command == "NOTICE") {
handler.handleNoticeMessage(static_cast<IrcNoticeMessage *>(message)); handler.handleNoticeMessage(static_cast<Communi::IrcNoticeMessage *>(message));
} else if (command == "JOIN") { } else if (command == "JOIN") {
handler.handleJoinMessage(message); handler.handleJoinMessage(message);
} else if (command == "PART") { } else if (command == "PART") {
@ -113,13 +115,15 @@ void TwitchServer::messageReceived(IrcMessage *message)
} }
} }
void TwitchServer::writeConnectionMessageReceived(IrcMessage *message) void TwitchServer::writeConnectionMessageReceived(Communi::IrcMessage *message)
{ {
switch (message->type()) { switch (message->type()) {
case IrcMessage::Type::Notice: { case Communi::IrcMessage::Type::Notice: {
IrcMessageHandler::getInstance().handleWriteConnectionNoticeMessage( IrcMessageHandler::getInstance().handleWriteConnectionNoticeMessage(
static_cast<IrcNoticeMessage *>(message)); static_cast<Communi::IrcNoticeMessage *>(message));
} break; } break;
default:;
} }
} }
@ -178,20 +182,6 @@ std::shared_ptr<Channel> TwitchServer::getChannelOrEmptyByID(const QString &chan
return Channel::getEmpty(); return Channel::getEmpty();
} }
// QString TwitchServer::getLastWhisperedPerson() const
//{
// std::lock_guard<std::mutex> guard(this->lastWhisperedPersonMutex);
// return this->lastWhisperedPerson;
//}
// void TwitchServer::setLastWhisperedPerson(const QString &person)
//{
// std::lock_guard<std::mutex> guard(this->lastWhisperedPersonMutex);
// this->lastWhisperedPerson = person;
//}
QString TwitchServer::cleanChannelName(const QString &dirtyChannelName) QString TwitchServer::cleanChannelName(const QString &dirtyChannelName)
{ {
return dirtyChannelName.toLower(); return dirtyChannelName.toLower();

View file

@ -33,7 +33,7 @@ public:
IndirectChannel watchingChannel; IndirectChannel watchingChannel;
protected: protected:
void initializeConnection(Communi::IrcConnection *connection, bool isRead, void initializeConnection(providers::irc::IrcConnection *connection, bool isRead,
bool isWrite) override; bool isWrite) override;
std::shared_ptr<Channel> createChannel(const QString &channelName) override; std::shared_ptr<Channel> createChannel(const QString &channelName) override;

View file

@ -36,31 +36,35 @@ AboutPage::AboutPage()
// palette.setColor(QPalette::Link, "#a5cdff"); // palette.setColor(QPalette::Link, "#a5cdff");
// palette.setColor(QPalette::LinkVisited, "#a5cdff"); // palette.setColor(QPalette::LinkVisited, "#a5cdff");
auto created = layout.emplace<QLabel>(); /*auto xd = layout.emplace<QGroupBox>("Created by...");
{ {
created->setText( auto created = xd.emplace<QLabel>();
"Twitch Chat Client created by <a href=\"https://github.com/fourtf\">fourtf</a>"); {
created->setTextFormat(Qt::RichText); created->setText("Created by <a href=\"https://github.com/fourtf\">fourtf</a><br>"
created->setTextInteractionFlags(Qt::TextBrowserInteraction | "with big help from pajlada.");
Qt::LinksAccessibleByKeyboard | created->setTextFormat(Qt::RichText);
Qt::LinksAccessibleByKeyboard); created->setTextInteractionFlags(Qt::TextBrowserInteraction |
created->setOpenExternalLinks(true); Qt::LinksAccessibleByKeyboard |
// created->setPalette(palette); Qt::LinksAccessibleByKeyboard);
} created->setOpenExternalLinks(true);
// created->setPalette(palette);
}
auto github = layout.emplace<QLabel>(); // auto github = xd.emplace<QLabel>();
{ // {
github->setText( // github->setText(
"<a href=\"https://github.com/fourtf/chatterino2\">Chatterino on Github</a>"); // "<a href=\"https://github.com/fourtf/chatterino2\">Chatterino on
github->setTextFormat(Qt::RichText); // Github</a>");
github->setTextInteractionFlags(Qt::TextBrowserInteraction | // github->setTextFormat(Qt::RichText);
Qt::LinksAccessibleByKeyboard | // github->setTextInteractionFlags(Qt::TextBrowserInteraction |
Qt::LinksAccessibleByKeyboard); // Qt::LinksAccessibleByKeyboard |
github->setOpenExternalLinks(true); // Qt::LinksAccessibleByKeyboard);
// github->setPalette(palette); // github->setOpenExternalLinks(true);
} // // github->setPalette(palette);
// }
}*/
auto licenses = layout.emplace<QGroupBox>("Open source software used"); auto licenses = layout.emplace<QGroupBox>("Open source software used...");
{ {
auto form = licenses.emplace<QFormLayout>(); auto form = licenses.emplace<QFormLayout>();
@ -90,6 +94,7 @@ void AboutPage::addLicense(QFormLayout *form, const QString &name, const QString
a->setOpenExternalLinks(true); a->setOpenExternalLinks(true);
auto *b = new SignalLabel(); auto *b = new SignalLabel();
b->setText("<a href=\"" + licenseLink + "\">show license</a>"); b->setText("<a href=\"" + licenseLink + "\">show license</a>");
b->setCursor(Qt::PointingHandCursor);
QObject::connect(b, &SignalLabel::mouseUp, [licenseLink] { QObject::connect(b, &SignalLabel::mouseUp, [licenseLink] {
auto *edit = new QTextEdit; auto *edit = new QTextEdit;