Hide warnings, complite return to support Qt 5.0.2.

--HG--
branch : develop
This commit is contained in:
kate@dismine-F3Ke 2014-09-25 21:03:02 +03:00
parent 7e6cfe9f70
commit c3b8b06787
6 changed files with 47 additions and 8 deletions

View File

@ -40,12 +40,17 @@
**
****************************************************************************/
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 1)
#include "qcommandlineoption.h"
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 1)
#include <QSet>
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
class QCommandLineOptionPrivate : public QSharedData
{
public:
@ -68,6 +73,10 @@ public:
QStringList defaultValues;
};
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
/*!
\since 5.2
\class QCommandLineOption

View File

@ -42,11 +42,18 @@
#ifndef QCOMMANDLINEOPTION_H
#define QCOMMANDLINEOPTION_H
#include <QtGlobal>
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 1)
#include <QStringList>
#include <QSharedData>
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
class QCommandLineOptionPrivate;
class QCommandLineOption
@ -80,6 +87,10 @@ private:
QSharedDataPointer<QCommandLineOptionPrivate> d;
};
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
#endif //QT_VERSION < QT_VERSION_CHECK(5, 2, 1)
#endif // QCOMMANDLINEOPTION_H

View File

@ -40,10 +40,10 @@
**
****************************************************************************/
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 1)
#include "qcommandlineparser.h"
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 1)
#include <QCoreApplication>
#include <QHash>
#include <QVector>
@ -52,6 +52,13 @@
typedef QHash<QString, int> NameHash_t;
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wswitch-default"
#pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn"
#endif
class QCommandLineParserPrivate
{
public:
@ -945,4 +952,8 @@ QString QCommandLineParserPrivate::helpText() const
return text;
}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
#endif //QT_VERSION < QT_VERSION_CHECK(5, 2, 1)

View File

@ -42,6 +42,8 @@
#ifndef QCOMMANDLINEPARSER_H
#define QCOMMANDLINEPARSER_H
#include <QtGlobal>
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 1)
#include <QStringList>
@ -49,6 +51,11 @@
#include "qcommandlineoption.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
class QCommandLineParserPrivate;
class QCoreApplication;
@ -101,6 +108,10 @@ private:
QCommandLineParserPrivate * const d;
};
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
#endif //QT_VERSION < QT_VERSION_CHECK(5, 2, 1)
#endif // QCOMMANDLINEPARSER_H

View File

@ -188,9 +188,6 @@
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum>
</property>
<property name="autoFormatting">
<set>QTextEdit::AutoNone</set>
</property>

View File

@ -129,7 +129,7 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(schema);
Q_INIT_RESOURCE(theme);
QT_REQUIRE_VERSION(argc, argv, "5.2.1");
QT_REQUIRE_VERSION(argc, argv, "5.0.2");
VApplication app(argc, argv);
#ifdef QT_DEBUG