Remove some UUID remnants
This commit is contained in:
Rasmus Karlsson 2018-04-07 12:53:10 +02:00
parent 945d500701
commit c82254aa9e
6 changed files with 22 additions and 27 deletions

View file

@ -103,7 +103,7 @@ void Notebook::removePage(SplitContainer *page)
this->pages.removeOne(page);
if (this->pages.size() == 0) {
if (this->pages.empty()) {
this->addNewPage();
}

View file

@ -74,11 +74,11 @@ public:
void drag();
protected:
void paintEvent(QPaintEvent *) override;
void mouseMoveEvent(QMouseEvent *) override;
void paintEvent(QPaintEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
void mousePressEvent(QMouseEvent *event) override;
void keyPressEvent(QKeyEvent *) override;
void keyReleaseEvent(QKeyEvent *) override;
void keyPressEvent(QKeyEvent *event) override;
void keyReleaseEvent(QKeyEvent *event) override;
private:
SplitContainer &parentPage;

View file

@ -212,12 +212,9 @@ NotebookTab *SplitContainer::getTab() const
return this->tab;
}
void SplitContainer::addChat(bool openChannelNameDialog, std::string chatUUID)
void SplitContainer::addChat(bool openChannelNameDialog)
{
if (chatUUID.empty()) {
chatUUID = CreateUUID().toStdString();
}
Split *w = this->createChatWidget(chatUUID);
Split *w = this->createChatWidget();
if (openChannelNameDialog) {
bool ret = w->showChangeChannelPopup("Open channel name", true);
@ -505,7 +502,7 @@ std::pair<int, int> SplitContainer::getChatPosition(const Split *chatWidget)
return getWidgetPositionInLayout(layout, chatWidget);
}
Split *SplitContainer::createChatWidget(const std::string &uuid)
Split *SplitContainer::createChatWidget()
{
auto split = new Split(this);

View file

@ -29,7 +29,7 @@ public:
std::vector<std::vector<Split *>> getColumns() const;
NotebookTab *getTab() const;
void addChat(bool openChannelNameDialog = false, std::string chatUUID = std::string());
void addChat(bool openChannelNameDialog = false);
static bool isDraggingSplit;
static Split *draggingSplit;
@ -46,19 +46,19 @@ public:
int splitCount() const;
protected:
virtual bool eventFilter(QObject *object, QEvent *event) override;
virtual void paintEvent(QPaintEvent *) override;
bool eventFilter(QObject *object, QEvent *event) override;
void paintEvent(QPaintEvent *event) override;
virtual void showEvent(QShowEvent *) override;
void showEvent(QShowEvent *event) override;
virtual void enterEvent(QEvent *) override;
virtual void leaveEvent(QEvent *) override;
virtual void mouseReleaseEvent(QMouseEvent *event) override;
void enterEvent(QEvent *event) override;
void leaveEvent(QEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
virtual void dragEnterEvent(QDragEnterEvent *event) override;
virtual void dragMoveEvent(QDragMoveEvent *event) override;
virtual void dragLeaveEvent(QDragLeaveEvent *event) override;
virtual void dropEvent(QDropEvent *event) override;
void dragEnterEvent(QDragEnterEvent *event) override;
void dragMoveEvent(QDragMoveEvent *event) override;
void dragLeaveEvent(QDragLeaveEvent *event) override;
void dropEvent(QDropEvent *event) override;
private:
struct DropRegion {
@ -89,7 +89,7 @@ private:
std::pair<int, int> getChatPosition(const Split *chatWidget);
Split *createChatWidget(const std::string &uuid);
Split *createChatWidget();
public:
void refreshTitle();

View file

@ -12,7 +12,7 @@
namespace chatterino {
namespace widgets {
StreamView::StreamView(ChannelPtr channel, QUrl url)
StreamView::StreamView(ChannelPtr channel, const QUrl &url)
{
util::LayoutCreator<StreamView> layoutCreator(this);
@ -22,8 +22,6 @@ StreamView::StreamView(ChannelPtr channel, QUrl url)
web->settings()->setAttribute(QWebEngineSettings::FullScreenSupportEnabled, true);
#endif
// QString uuid = CreateUUID();
auto chat = layoutCreator.emplace<ChannelView>();
chat->setFixedWidth(300);
chat->setChannel(channel);

View file

@ -16,7 +16,7 @@ namespace widgets {
class StreamView : public QWidget
{
public:
StreamView(std::shared_ptr<Channel> channel, QUrl url);
StreamView(std::shared_ptr<Channel> channel, const QUrl &url);
private:
QWebEngineView *stream;