Skip to content
Permalink
Browse files

Compiles locally with g++-5

  • Loading branch information...
richelbilderbeek committed Oct 8, 2016
1 parent 3889956 commit 5f6c7f01953a24636bd5cfe1c6613532e7d965fd
Showing with 23 additions and 8 deletions.
  1. +5 −6 Desktop/CityOfThievesDesktop.pro
  2. +4 −0 Desktop/qtmain.cpp
  3. +8 −1 QtClasses/qtgamedialog.cpp
  4. +6 −1 QtClasses/qtgamedialog.h
@@ -1,21 +1,20 @@
# -Weffc++ does not go with apfloat, Qwt

# Use a new version
win32 {
QMAKE_CXXFLAGS += -Wall -Wextra -Werror -std=c++1y

INCLUDEPATH += C:/Boost/include

INCLUDEPATH += C:/Boost
LIBS += C:/Boost/stage/lib/libboost_filesystem-mgw49-mt-1_59.a
LIBS += C:/Boost/stage/lib/libboost_system-mgw49-mt-d-1_59.a

# Using Qt and a resource file does not work with -Weffc++
QMAKE_CXXFLAGS += -Wall -Wextra -Werror -std=c++1y
}

unix:!macx {
QMAKE_CXX = g++-5
QMAKE_LINK = g++-5
QMAKE_CC = gcc-5
QMAKE_CXXFLAGS += -Wall -Wextra -Weffc++ -Werror -std=c++14
QMAKE_CXXFLAGS += -Wall -Wextra -Werror -std=c++14
# Using Qt and a resource file does not work with -Weffc++
}

QT += core gui
@@ -1,4 +1,8 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#include <QApplication>
#pragma GCC diagnostic pop

#include "qtgamedialog.h"

int main(int argc, char *argv[])
@@ -1,17 +1,24 @@
#include "qtgamedialog.h"

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#include <QKeyEvent>
#include <QTimer>
#include <QTextCursor>
#pragma GCC diagnostic pop

#include <boost/lexical_cast.hpp>

#include "ui_qtgamedialog.h"
#include "chapter.h"
#include "menudialog.h"
#include "helper.h"
#include "dice.h"

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#include "ui_qtgamedialog.h"
#pragma GCC diagnostic pop

QtGameDialog::QtGameDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::QtGameDialog),
@@ -1,7 +1,10 @@
#ifndef QTGAMEDIALOG_H
#define QTGAMEDIALOG_H

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#include <QDialog>
#pragma GCC diagnostic pop
#include "observer.h"
#include "option.h"
#include "character.h"
@@ -10,10 +13,12 @@ namespace Ui { class QtGameDialog; }

class QtGameDialog : public QDialog, public Observer
{
Q_OBJECT
Q_OBJECT //!OCLINT

public:
explicit QtGameDialog(QWidget *parent = 0);
QtGameDialog(const QtGameDialog&) = delete;
QtGameDialog& operator=(const QtGameDialog&) = delete;
~QtGameDialog();


0 comments on commit 5f6c7f0

Please sign in to comment.
You can’t perform that action at this time.