Reduce warnings for yaml-cpp
- Use only utils/YamlUtils.h to pull in yaml-cpp and supporting code. - When compiling with clang, turn off warnings that the system header for yaml-cpp would generate.
This commit is contained in:
parent
27140ff5bb
commit
c83395ff6d
@ -27,8 +27,6 @@
|
||||
#include <QFile>
|
||||
#include <QPair>
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
static bool
|
||||
hasValue( const YAML::Node& v )
|
||||
{
|
||||
|
@ -20,8 +20,6 @@
|
||||
|
||||
#include "utils/Logger.h"
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
|
@ -26,11 +26,21 @@
|
||||
class QByteArray;
|
||||
class QFileInfo;
|
||||
|
||||
namespace YAML
|
||||
{
|
||||
class Node;
|
||||
class Exception;
|
||||
}
|
||||
// The yaml-cpp headers are not C++11 warning-proof, especially
|
||||
// with picky compilers like Clang 8. Since we use Clang for the
|
||||
// find-all-the-warnings case, switch those warnings off for
|
||||
// the we-can't-change-them system headers.
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
|
||||
#pragma clang diagnostic ignored "-Wshadow"
|
||||
#endif
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
/// @brief Appends all te elements of @p node to the string list @p v
|
||||
void operator>>( const YAML::Node& node, QStringList& v );
|
||||
|
@ -32,9 +32,6 @@
|
||||
#include <QPixmap>
|
||||
#include <QVariantMap>
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
|
||||
namespace Calamares
|
||||
{
|
||||
|
||||
|
@ -36,8 +36,6 @@
|
||||
#include "PythonQtViewModule.h"
|
||||
#endif
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
|
@ -28,8 +28,6 @@
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/YamlUtils.h"
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
#include <QTimer>
|
||||
|
@ -22,8 +22,6 @@
|
||||
#include "utils/CommandList.h"
|
||||
#include "utils/YamlUtils.h"
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <QFileInfo>
|
||||
|
@ -25,8 +25,6 @@
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/YamlUtils.h"
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <QFileInfo>
|
||||
|
@ -25,8 +25,6 @@
|
||||
|
||||
#include <QByteArray>
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
GeoIPJSON::GeoIPJSON(const QString& attribute)
|
||||
: GeoIP( attribute.isEmpty() ? QStringLiteral( "time_zone" ) : attribute )
|
||||
{
|
||||
|
@ -42,8 +42,6 @@
|
||||
#include <QNetworkReply>
|
||||
#include <QtConcurrent/QtConcurrentRun>
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
|
||||
CALAMARES_PLUGIN_FACTORY_DEFINITION( LocaleViewStepFactory, registerPlugin<LocaleViewStep>(); )
|
||||
|
||||
|
@ -36,8 +36,6 @@
|
||||
|
||||
#include <QHeaderView>
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
using CalamaresUtils::yamlToVariant;
|
||||
|
||||
NetInstallPage::NetInstallPage( QWidget* parent )
|
||||
|
@ -27,7 +27,10 @@
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
namespace YAML
|
||||
{
|
||||
class Node;
|
||||
}
|
||||
|
||||
class PackageModel : public QAbstractItemModel
|
||||
{
|
||||
|
@ -26,8 +26,6 @@
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/YamlUtils.h"
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <QFileInfo>
|
||||
|
@ -21,13 +21,13 @@
|
||||
* shipped with each module for correctness -- well, for parseability.
|
||||
*/
|
||||
|
||||
#include "utils/YamlUtils.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
#include <QFile>
|
||||
#include <QByteArray>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user