Refactoring.
Code style.
This commit is contained in:
parent
ecf93f8d31
commit
5f60af68ca
|
@ -34,16 +34,16 @@ constexpr qreal PrintDPI = 96.0;
|
|||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
// this adds const to non-const objects (like std::as_const)
|
||||
template <typename T>
|
||||
Q_DECL_CONSTEXPR typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
|
||||
template <typename T> Q_DECL_CONSTEXPR typename std::add_const<T>::type &qAsConst(T &t) noexcept
|
||||
{
|
||||
return t;
|
||||
}
|
||||
// prevent rvalue arguments:
|
||||
template <typename T>
|
||||
void qAsConst(const T &&) Q_DECL_EQ_DELETE;
|
||||
template <typename T> void qAsConst(const T &&) Q_DECL_EQ_DELETE;
|
||||
#endif
|
||||
|
||||
#ifndef Q_DISABLE_ASSIGN
|
||||
#define Q_DISABLE_ASSIGN(Class) \
|
||||
Class &operator=(const Class &) = delete;
|
||||
#define Q_DISABLE_ASSIGN(Class) Class &operator=(const Class &) = delete;
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||
|
@ -60,11 +60,11 @@ void qAsConst(const T &&) Q_DECL_EQ_DELETE;
|
|||
Class &operator=(Class &&) = delete;
|
||||
#endif
|
||||
|
||||
#define SUFFIX_APPEND(x, y) x ## y // NOLINT(cppcoreguidelines-macro-usage)
|
||||
#define SUFFIX_APPEND(x, y) x##y // NOLINT(cppcoreguidelines-macro-usage)
|
||||
|
||||
#define HOURS_INT(x) ((x) * 3600000) // NOLINT(cppcoreguidelines-macro-usage)
|
||||
#define MINUTES_INT(x) ((x) * 60000) // NOLINT(cppcoreguidelines-macro-usage)
|
||||
#define SECONDS_INT(x) ((x) * 1000) // NOLINT(cppcoreguidelines-macro-usage)
|
||||
#define HOURS_INT(x) ((x)*3600000) // NOLINT(cppcoreguidelines-macro-usage)
|
||||
#define MINUTES_INT(x) ((x)*60000) // NOLINT(cppcoreguidelines-macro-usage)
|
||||
#define SECONDS_INT(x) ((x)*1000) // NOLINT(cppcoreguidelines-macro-usage)
|
||||
#define MSECONDS_INT(x) (x) // NOLINT(cppcoreguidelines-macro-usage)
|
||||
#define MICSECONDS_INT(x) (x) // NOLINT(cppcoreguidelines-macro-usage)
|
||||
#define NANOSECONDS_INT(x) (x) // NOLINT(cppcoreguidelines-macro-usage)
|
||||
|
|
Loading…
Reference in New Issue
Block a user