summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2024-02-18 01:24:48 +0300
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-03-16 19:21:11 +0900
commit57f90016c3e337a52a27cd7171467bf3d39ccd1c (patch)
treee5ce797ef6db7a47962bc57720cec3e14061bc92 /src
parent590a2e043496fc58d4bf8c3ab51cfad6d080e2db (diff)
downloadtqt3-57f90016c3e337a52a27cd7171467bf3d39ccd1c.tar.gz
tqt3-57f90016c3e337a52a27cd7171467bf3d39ccd1c.zip
Add explicit declaration TQChar&TQCharRef default constructor/destructor
This suppresses -Wdeprecated-copy warning. Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 87129eac9a6efa5a3f0b23dd5e2f94c716c2bfa7)
Diffstat (limited to 'src')
-rw-r--r--src/tools/ntqstring.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/ntqstring.h b/src/tools/ntqstring.h
index c2ef2a5e..ce9ccf10 100644
--- a/src/tools/ntqstring.h
+++ b/src/tools/ntqstring.h
@@ -244,6 +244,12 @@ public:
friend inline bool operator<=( char ch, TQChar c );
friend inline bool operator<=( TQChar c1, TQChar c2 );
+#if defined(__cplusplus) && __cplusplus >= 201103L
+ // Explicit declarations to suppress warnings
+ // This could be removed when TQChar( const TQChar& c ) is removed
+ TQChar& operator=(const TQChar& other) = default;
+ ~TQChar() = default;
+#endif
private:
ushort ucs;
#if defined(QT_QSTRING_UCS_4)
@@ -769,6 +775,12 @@ public:
// all this is not documented: We just say "like TQChar" and let it be.
#ifndef Q_QDOC
+#if defined(__cplusplus) && __cplusplus >= 201103L
+ // tells compiler that we know what we are doing and suppresses -Wdeprecated-copy warnings
+ TQCharRef(const TQCharRef&) = default;
+ ~TQCharRef() = default;
+#endif
+
ushort unicode() const { return s.constref(p).unicode(); }
char latin1() const { return s.constref(p).latin1(); }