From 753013079c2e2d2db82dd096c642c5140f1de772 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 28 Mar 2019 08:35:21 +0100 Subject: compat/tr: make header-only for the api header --- compat/tr.cpp | 12 ------------ compat/tr.hpp | 12 ++++-------- 2 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 compat/tr.cpp (limited to 'compat') diff --git a/compat/tr.cpp b/compat/tr.cpp deleted file mode 100644 index 58f0a71a..00000000 --- a/compat/tr.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "tr.hpp" - - -TR::TR() : QObject(nullptr) {} - -TR::TR(const TR&) : QObject(nullptr) {} - -TR& TR::operator=(const TR&) -{ - return *this; -} - diff --git a/compat/tr.hpp b/compat/tr.hpp index 6af45161..4504f791 100644 --- a/compat/tr.hpp +++ b/compat/tr.hpp @@ -1,18 +1,14 @@ #pragma once #include -#include "export.hpp" // The class does nothing except provide a fake assignment operator for QObject // It's meant to be used inside classes that need i18n support but are returned by value. -class OTR_COMPAT_EXPORT TR : public QObject +struct TR : QObject { - Q_OBJECT + TR() = default; + TR(const TR&) {} -public: - TR(); - TR(const TR&); - - TR& operator=(const TR& other); + TR& operator=(const TR&) { return *this; } }; -- cgit v1.2.3