Clean up warnings

This commit is contained in:
Rasmus Karlsson 2018-05-06 14:16:41 +02:00
parent d9c0d37bd2
commit 5efc2c38d8
7 changed files with 8 additions and 9 deletions

View file

@ -374,6 +374,7 @@ win32-msvc* {
QMAKE_CXXFLAGS_WARN_ON += -Wno-switch
QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-declarations
QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-variable
# Disabling strict-aliasing warnings for now, although we probably want to re-enable this in the future
QMAKE_CXXFLAGS_WARN_ON += -Wno-strict-aliasing

View file

@ -21,9 +21,9 @@ using namespace chatterino::messages;
namespace chatterino {
Channel::Channel(const QString &_name, Type _type)
: type(_type)
, name(_name)
: name(_name)
, completionModel(this->name)
, type(_type)
{
this->clearCompletionModelTimer = new QTimer;
QObject::connect(this->clearCompletionModelTimer, &QTimer::timeout, [this]() {

View file

@ -1,4 +1,4 @@
#pragma
#pragma once
#include "controllers/accounts/account.hpp"
#include "util/signalvectormodel.hpp"

View file

@ -682,8 +682,6 @@ void PubSub::handleListenResponse(const rapidjson::Document &msg)
if (rj::getSafe(msg, "error", error)) {
std::string nonce;
rj::getSafe(msg, "nonce", nonce);
const auto &xd = sentMessages;
const auto &payload = sentMessages[nonce];
if (error.empty()) {
debug::Log("Successfully listened to nonce {}", nonce);

View file

@ -1,6 +1,6 @@
#pragma once
#include <QString>;
#include <QString>
#include <pajlada/signals/signal.hpp>
namespace chatterino {

View file

@ -16,9 +16,9 @@ namespace chatterino {
namespace widgets {
AttachedWindow::AttachedWindow(void *_target, int _yOffset)
: target(_target)
: QWidget(nullptr, Qt::FramelessWindowHint | Qt::Window)
, target(_target)
, yOffset(_yOffset)
, QWidget(nullptr, Qt::FramelessWindowHint | Qt::Window)
{
QLayout *layout = new QVBoxLayout(this);
layout->setMargin(0);

View file

@ -233,7 +233,7 @@ bool SelectChannelDialog::EventFilter::eventFilter(QObject *watched, QEvent *eve
return true;
} else if (((event_key->key() == Qt::Key_Tab || event_key->key() == Qt::Key_Backtab) &&
event_key->modifiers() == Qt::ShiftModifier) ||
(event_key->key() == Qt::Key_Up) && event_key->modifiers() == Qt::NoModifier) {
((event_key->key() == Qt::Key_Up) && event_key->modifiers() == Qt::NoModifier)) {
if (widget == this->dialog->ui.twitch.channelName) {
this->dialog->ui.twitch.watching->setFocus();
return true;