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

View File

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

View File

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

View File

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

View File

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

View File

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