compiler warning fixes

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-06-01 12:07:02 +00:00
parent 2c0f725221
commit 2f501f8a92
7 changed files with 8 additions and 17 deletions

View file

@ -343,7 +343,7 @@ union qt_semun {
Returns the difference between msecs and elapsed. If msecs is -1, Returns the difference between msecs and elapsed. If msecs is -1,
however, -1 is returned. however, -1 is returned.
*/ */
static int qt_timeout_value(int msecs, int elapsed) inline static int qt_timeout_value(int msecs, int elapsed)
{ {
if (msecs == -1) if (msecs == -1)
return -1; return -1;

View file

@ -117,7 +117,6 @@ static inline int bm_find(const uchar *cc, int l, int index, const uchar *puc, u
Call setPattern() to give it a pattern to match. Call setPattern() to give it a pattern to match.
*/ */
QByteArrayMatcher::QByteArrayMatcher() QByteArrayMatcher::QByteArrayMatcher()
: d(0)
{ {
p.p = 0; p.p = 0;
p.l = 0; p.l = 0;
@ -130,7 +129,6 @@ QByteArrayMatcher::QByteArrayMatcher()
the destructor does not delete \a pattern. the destructor does not delete \a pattern.
*/ */
QByteArrayMatcher::QByteArrayMatcher(const char *pattern, int length) QByteArrayMatcher::QByteArrayMatcher(const char *pattern, int length)
: d(0)
{ {
p.p = reinterpret_cast<const uchar *>(pattern); p.p = reinterpret_cast<const uchar *>(pattern);
p.l = length; p.l = length;
@ -142,7 +140,7 @@ QByteArrayMatcher::QByteArrayMatcher(const char *pattern, int length)
Call indexIn() to perform a search. Call indexIn() to perform a search.
*/ */
QByteArrayMatcher::QByteArrayMatcher(const QByteArray &pattern) QByteArrayMatcher::QByteArrayMatcher(const QByteArray &pattern)
: d(0), q_pattern(pattern) : q_pattern(pattern)
{ {
p.p = reinterpret_cast<const uchar *>(pattern.constData()); p.p = reinterpret_cast<const uchar *>(pattern.constData());
p.l = pattern.size(); p.l = pattern.size();
@ -153,7 +151,6 @@ QByteArrayMatcher::QByteArrayMatcher(const QByteArray &pattern)
Copies the \a other byte array matcher to this byte array matcher. Copies the \a other byte array matcher to this byte array matcher.
*/ */
QByteArrayMatcher::QByteArrayMatcher(const QByteArrayMatcher &other) QByteArrayMatcher::QByteArrayMatcher(const QByteArrayMatcher &other)
: d(0)
{ {
operator=(other); operator=(other);
} }

View file

@ -48,8 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QByteArrayMatcherPrivate;
class Q_CORE_EXPORT QByteArrayMatcher class Q_CORE_EXPORT QByteArrayMatcher
{ {
public: public:
@ -73,7 +71,6 @@ public:
} }
private: private:
QByteArrayMatcherPrivate *d;
QByteArray q_pattern; QByteArray q_pattern;
struct Data { struct Data {
uchar q_skiptable[256]; uchar q_skiptable[256];

View file

@ -439,7 +439,6 @@ void QApplicationPrivate::process_cmdline()
continue; continue;
} }
QByteArray arg = argv[i]; QByteArray arg = argv[i];
arg = arg;
QString s; QString s;
if (arg.indexOf("-style=", 0) != -1) { if (arg.indexOf("-style=", 0) != -1) {
s = QString::fromLocal8Bit(arg.right(arg.length() - 7).toLower()); s = QString::fromLocal8Bit(arg.right(arg.length() - 7).toLower());

View file

@ -706,9 +706,9 @@ QKeyEvent::QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, const
QKeyEvent::QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, QKeyEvent::QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers,
quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers,
const QString &text, bool autorep, int count) const QString &text, bool autorep, int count)
: QInputEvent(type, modifiers), txt(text), k(key), : QInputEvent(type, modifiers), txt(text), k(key), c(count),
nScanCode(nativeScanCode), nVirtualKey(nativeVirtualKey), nModifiers(nativeModifiers), nScanCode(nativeScanCode), nVirtualKey(nativeVirtualKey), nModifiers(nativeModifiers),
c(count), autor(autorep) autor(autorep)
{ {
} }

View file

@ -9,7 +9,7 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50) inline static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50)
{ {
const int maxFactor = 100; const int maxFactor = 100;
QColor tmp = colorA; QColor tmp = colorA;
@ -42,7 +42,7 @@ inline static bool verticalTabs(QTabBar::Shape shape)
#endif // QT_NO_TABBAR #endif // QT_NO_TABBAR
#ifndef QT_NO_DOCKWIDGET #ifndef QT_NO_DOCKWIDGET
static Qt::DockWidgetArea toDockWidgetArea(QInternal::DockPosition pos) inline static Qt::DockWidgetArea toDockWidgetArea(QInternal::DockPosition pos)
{ {
switch (pos) { switch (pos) {
case QInternal::LeftDock: return Qt::LeftDockWidgetArea; case QInternal::LeftDock: return Qt::LeftDockWidgetArea;
@ -56,7 +56,7 @@ static Qt::DockWidgetArea toDockWidgetArea(QInternal::DockPosition pos)
#endif #endif
#ifndef QT_NO_TABWIDGET #ifndef QT_NO_TABWIDGET
static inline QTabBar::Shape tabBarShapeFrom(QTabWidget::TabShape shape, QTabWidget::TabPosition position) inline static QTabBar::Shape tabBarShapeFrom(QTabWidget::TabShape shape, QTabWidget::TabPosition position)
{ {
const bool rounded = (shape == QTabWidget::Rounded); const bool rounded = (shape == QTabWidget::Rounded);
if (position == QTabWidget::North) if (position == QTabWidget::North)
@ -72,7 +72,7 @@ static inline QTabBar::Shape tabBarShapeFrom(QTabWidget::TabShape shape, QTabWid
#endif // QT_NO_TABWIDGET #endif // QT_NO_TABWIDGET
// Returns position of lowest set bit in 'v' as an integer (0-31), or -1 // Returns position of lowest set bit in 'v' as an integer (0-31), or -1
static int lowest_bit(uint v) inline static int lowest_bit(uint v)
{ {
int i; int i;
ulong lb; ulong lb;

View file

@ -71,8 +71,6 @@ public:
~Value(); ~Value();
QScriptValue toScriptValue(QScriptEngine *) const; QScriptValue toScriptValue(QScriptEngine *) const;
private:
char dummy[8];
}; };
typedef void* Identifier; typedef void* Identifier;