Browse Source

Fix compiler warnings in external libs when using clang 3.x

tags/1.9.8
falkTX 7 years ago
parent
commit
08fb2b790f
5 changed files with 28 additions and 13 deletions
  1. +2
    -2
      source/modules/hylia/hylia.cpp
  2. +11
    -3
      source/theme/CarlaStyle.cpp
  3. +9
    -2
      source/theme/CarlaStyle.hpp
  4. +4
    -4
      source/theme/CarlaStyleAnimations.hpp
  5. +2
    -2
      source/theme/CarlaStylePrivate.hpp

+ 2
- 2
source/modules/hylia/hylia.cpp View File

@@ -17,14 +17,14 @@

#include "hylia.h"

#if defined(__clang__)
#if defined(__clang_major__) && __clang_major__ >= 4
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunused-local-typedef"
#endif

#include "AudioEngine.hpp"

#if defined(__clang__)
#if defined(__clang_major__) && __clang_major__ >= 4
# pragma clang diagnostic pop
#endif



+ 11
- 3
source/theme/CarlaStyle.cpp View File

@@ -20,10 +20,9 @@
#include <QtCore/qmath.h>
#include <QtCore/QStringBuilder>

#include <QtGui/QPainter>
#include <QtGui/QPixmapCache>

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtGui/QPainter>
# include <QtGui/QPixmapCache>
# include <QtWidgets/qdrawutil.h>
# include <QtWidgets/QApplication>
# include <QtWidgets/QComboBox>
@@ -39,6 +38,12 @@
# define QStyleOptionFrameV3 QStyleOptionFrame
# define QStyleOptionProgressBarV2 QStyleOptionProgressBar
#else
# ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-register"
# endif
# include <QtGui/QPainter>
# include <QtGui/QPixmapCache>
# include <QtGui/QApplication>
# include <QtGui/QComboBox>
# include <QtGui/QGroupBox>
@@ -50,6 +55,9 @@
# include <QtGui/QSpinBox>
# include <QtGui/QSplitter>
# include <QtGui/QWizard>
# ifdef __clang__
# pragma clang diagnostic pop
# endif
#endif

#include <cstdio>


+ 9
- 2
source/theme/CarlaStyle.hpp View File

@@ -36,19 +36,26 @@
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
# include <QtWidgets/QCommonStyle>
#else
# ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-register"
# endif
# include <QtGui/QCommonStyle>
# ifdef __clang__
# pragma clang diagnostic pop
# endif
#endif

class CarlaStylePrivate;

class CarlaStyle : public QCommonStyle
{
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang__)
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang_major__) && __clang_major__ >= 4
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
Q_OBJECT
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang__)
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang_major__) && __clang_major__ >= 4
# pragma clang diagnostic pop
#endif



+ 4
- 4
source/theme/CarlaStyleAnimations.hpp View File

@@ -33,12 +33,12 @@

class CarlaStyleAnimation : public QAbstractAnimation
{
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang__)
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang_major__) && __clang_major__ >= 4
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
Q_OBJECT
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang__)
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang_major__) && __clang_major__ >= 4
# pragma clang diagnostic pop
#endif

@@ -129,12 +129,12 @@ private:

class CarlaProgressStyleAnimation : public CarlaStyleAnimation
{
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang__)
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang_major__) && __clang_major__ >= 4
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
Q_OBJECT
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang__)
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang_major__) && __clang_major__ >= 4
# pragma clang diagnostic pop
#endif



+ 2
- 2
source/theme/CarlaStylePrivate.hpp View File

@@ -27,12 +27,12 @@ class QStyleAnimation;

class CarlaStylePrivate : public QObject
{
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang__)
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang_major__) && __clang_major__ >= 4
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
Q_OBJECT
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang__)
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && defined(__clang_major__) && __clang_major__ >= 4
# pragma clang diagnostic pop
#endif



Loading…
Cancel
Save