2022-05-10 10:06:48 +00:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2014-01-17 12:49:41 +00:00
|
|
|
|
|
|
|
#ifndef SINGLE_FUNCTION_KEYWORD_H
|
|
|
|
#define SINGLE_FUNCTION_KEYWORD_H
|
2011-04-27 10:05:43 +00:00
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
class SingleFunctionKeywordBeforeReturnType : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
inline SingleFunctionKeywordBeforeReturnType() {}
|
|
|
|
|
|
|
|
Q_SIGNAL void mySignal();
|
|
|
|
|
|
|
|
Q_SLOT void mySlot() { mySignal(); }
|
|
|
|
};
|
|
|
|
|
|
|
|
class SingleFunctionKeywordBeforeInline : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
inline SingleFunctionKeywordBeforeInline() {}
|
|
|
|
|
2020-08-21 15:22:03 +00:00
|
|
|
QT_WARNING_PUSH
|
|
|
|
QT_WARNING_DISABLE_CLANG("-Wundefined-inline")
|
2011-04-27 10:05:43 +00:00
|
|
|
Q_SIGNAL inline void mySignal();
|
2020-08-21 15:22:03 +00:00
|
|
|
QT_WARNING_POP
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
Q_SLOT inline void mySlot() { emit mySignal(); }
|
|
|
|
};
|
|
|
|
|
|
|
|
class SingleFunctionKeywordAfterInline : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
inline SingleFunctionKeywordAfterInline() {}
|
|
|
|
|
2020-08-21 15:22:03 +00:00
|
|
|
QT_WARNING_PUSH
|
|
|
|
QT_WARNING_DISABLE_CLANG("-Wundefined-inline")
|
2011-04-27 10:05:43 +00:00
|
|
|
inline Q_SIGNAL void mySignal();
|
2020-08-21 15:22:03 +00:00
|
|
|
QT_WARNING_POP
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
inline Q_SLOT void mySlot() { emit mySignal(); }
|
|
|
|
};
|
|
|
|
|
2014-01-17 12:49:41 +00:00
|
|
|
#endif // SINGLE_FUNCTION_KEYWORD_H
|