diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-12-31 11:50:33 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-12-31 11:50:33 +0900 |
| commit | a6243818ff68187f789c2e8ce449c78fcadfbbe7 (patch) | |
| tree | 07dc25beb40ff2a2c906d3c0ab37b785c29a619d /src | |
| parent | c7a23a1e570b12c633b0e47c661935c36c038711 (diff) | |
| download | tqt-remove/full-template-instantionation.tar.gz tqt-remove/full-template-instantionation.zip | |
Remove use of TQ_FULL_TEMPLATE_INSTANTIATION and TQ_DUMMY_COMPARISON_OPERATOR.remove/full-template-instantionation
The #defines were used for some very old compilers which had issues with template instantiation.
We are now using c++17 compilers, so this is unnecessary.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src')
| -rw-r--r-- | src/kernel/tqiconset.cpp | 2 | ||||
| -rw-r--r-- | src/kernel/tqiconset.h | 4 | ||||
| -rw-r--r-- | src/kernel/tqpixmap.h | 4 | ||||
| -rw-r--r-- | src/kernel/tqrichtext.cpp | 3 | ||||
| -rw-r--r-- | src/kernel/tqrichtext_p.h | 2 | ||||
| -rw-r--r-- | src/kernel/tqtranslator.cpp | 1 | ||||
| -rw-r--r-- | src/network/tqdns.h | 2 | ||||
| -rw-r--r-- | src/sql/tqsqlextension_p.h | 1 | ||||
| -rw-r--r-- | src/sql/tqsqlrecord.cpp | 1 | ||||
| -rw-r--r-- | src/tools/tqglobal.h | 28 | ||||
| -rw-r--r-- | src/tools/tqmap.h | 7 | ||||
| -rw-r--r-- | src/widgets/tqdatetimeedit.cpp | 1 | ||||
| -rw-r--r-- | src/widgets/tqdockarea.cpp | 2 | ||||
| -rw-r--r-- | src/xml/tqsvgdevice.cpp | 3 | ||||
| -rw-r--r-- | src/xml/tqxml.cpp | 3 |
15 files changed, 0 insertions, 64 deletions
diff --git a/src/kernel/tqiconset.cpp b/src/kernel/tqiconset.cpp index d22116207..71b71ffee 100644 --- a/src/kernel/tqiconset.cpp +++ b/src/kernel/tqiconset.cpp @@ -156,8 +156,6 @@ public: delete factory; factory = newFactory; } - - TQ_DUMMY_COMPARISON_OPERATOR( TQIconSetPrivate ) }; TQIconSetIcon *TQIconSetPrivate::icon( const TQIconSet *iconSet, diff --git a/src/kernel/tqiconset.h b/src/kernel/tqiconset.h index 7caa24b74..798c4bbe5 100644 --- a/src/kernel/tqiconset.h +++ b/src/kernel/tqiconset.h @@ -89,10 +89,6 @@ public: static void setIconSize( Size which, const TQSize& size ); static const TQSize& iconSize( Size which ); -#ifndef Q_QDOC - TQ_DUMMY_COMPARISON_OPERATOR(TQIconSet) -#endif - private: void normalize( Size& which, const TQSize& pixSize ); TQPixmap *createScaled( Size size, const TQPixmap *suppliedPix ) const; diff --git a/src/kernel/tqpixmap.h b/src/kernel/tqpixmap.h index 0a89e98bf..4af4a451b 100644 --- a/src/kernel/tqpixmap.h +++ b/src/kernel/tqpixmap.h @@ -168,10 +168,6 @@ public: void x11SetScreen( int screen ); #endif -#ifndef Q_QDOC - TQ_DUMMY_COMPARISON_OPERATOR(TQPixmap) -#endif - protected: TQPixmap( int w, int h, const uchar *data, bool isXbitmap ); int metric( int ) const; diff --git a/src/kernel/tqrichtext.cpp b/src/kernel/tqrichtext.cpp index eddb23761..a4a80e0dd 100644 --- a/src/kernel/tqrichtext.cpp +++ b/src/kernel/tqrichtext.cpp @@ -1567,8 +1567,6 @@ struct TQ_EXPORT TQTextDocumentTag { liststyle = t.liststyle; return *this; } - - TQ_DUMMY_COMPARISON_OPERATOR(TQTextDocumentTag) }; @@ -6584,7 +6582,6 @@ struct TQPixmapInt TQPixmapInt() : ref( 0 ) {} TQPixmap pm; int ref; - TQ_DUMMY_COMPARISON_OPERATOR(TQPixmapInt) }; static TQMap<TQString, TQPixmapInt> *pixmap_map = 0; diff --git a/src/kernel/tqrichtext_p.h b/src/kernel/tqrichtext_p.h index 2d75c779b..d2219b562 100644 --- a/src/kernel/tqrichtext_p.h +++ b/src/kernel/tqrichtext_p.h @@ -760,7 +760,6 @@ struct TQ_EXPORT TQTextDocumentSelection { TQTextCursor startCursor, endCursor; bool swapped; - TQ_DUMMY_COMPARISON_OPERATOR(TQTextDocumentSelection) }; #if defined(Q_TEMPLATEDLL) @@ -1128,7 +1127,6 @@ struct TQ_EXPORT TQTextParagraphSelection { TQTextParagraphSelection() : start(0), end(0) { } int start, end; - TQ_DUMMY_COMPARISON_OPERATOR(TQTextParagraphSelection) }; struct TQ_EXPORT TQTextLineStart diff --git a/src/kernel/tqtranslator.cpp b/src/kernel/tqtranslator.cpp index 59444c327..2d22dfff1 100644 --- a/src/kernel/tqtranslator.cpp +++ b/src/kernel/tqtranslator.cpp @@ -182,7 +182,6 @@ public: bool operator<( const Offset&k ) const { return ( h != k.h ) ? h < k.h : o < k.o; } - TQ_DUMMY_COMPARISON_OPERATOR(TQTranslatorPrivate::Offset) uint h; uint o; }; diff --git a/src/network/tqdns.h b/src/network/tqdns.h index 703edb229..65058c4f3 100644 --- a/src/network/tqdns.h +++ b/src/network/tqdns.h @@ -97,7 +97,6 @@ public: :name(n), priority(p) {} TQString name; TQ_UINT16 priority; - TQ_DUMMY_COMPARISON_OPERATOR(MailServer) }; TQValueList<MailServer> mailServers() const; @@ -109,7 +108,6 @@ public: TQ_UINT16 priority; TQ_UINT16 weight; TQ_UINT16 port; - TQ_DUMMY_COMPARISON_OPERATOR(Server) }; TQValueList<Server> servers() const; diff --git a/src/sql/tqsqlextension_p.h b/src/sql/tqsqlextension_p.h index 76cb27337..2723b0d4b 100644 --- a/src/sql/tqsqlextension_p.h +++ b/src/sql/tqsqlextension_p.h @@ -75,7 +75,6 @@ struct TQSqlParam { TQSqlParam( const TQVariant& v = TQVariant(), TQSql::ParameterType t = TQSql::In ): value( v ), typ( t ) {} TQVariant value; TQSql::ParameterType typ; - TQ_DUMMY_COMPARISON_OPERATOR(TQSqlParam) }; struct Holder { diff --git a/src/sql/tqsqlrecord.cpp b/src/sql/tqsqlrecord.cpp index 72b8e4867..ad8773a9d 100644 --- a/src/sql/tqsqlrecord.cpp +++ b/src/sql/tqsqlrecord.cpp @@ -68,7 +68,6 @@ public: { return !field.name().isNull(); } - TQ_DUMMY_COMPARISON_OPERATOR(info) TQSqlField field; bool nogen; }; diff --git a/src/tools/tqglobal.h b/src/tools/tqglobal.h index e74c87f91..1fe63f2d3 100644 --- a/src/tools/tqglobal.h +++ b/src/tools/tqglobal.h @@ -244,11 +244,6 @@ # define mutable /* no template classes in TQVariant */ # define TQT_NO_TEMPLATE_VARIANT -/* Wcc does not fill in functions needed by valuelists, maps, and - valuestacks implicitly */ -# define TQ_FULL_TEMPLATE_INSTANTIATION -/* can we just compare the structures? */ -# define TQ_FULL_TEMPLATE_INSTANTIATION_MEMCMP /* these are not useful to our customers */ # define TQT_NO_SQL # endif @@ -256,9 +251,6 @@ #elif defined(__GNUC__) # define Q_CC_GNU # define Q_C_CALLBACKS -# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 -# define TQ_FULL_TEMPLATE_INSTANTIATION -# endif /* GCC 2.95 knows "using" but does not support it correctly */ # if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 # define Q_NO_USING_KEYWORD @@ -307,7 +299,6 @@ but it is not defined on older compilers like C Set 3.1 */ #elif defined(__xlC__) # define Q_CC_XLC -# define TQ_FULL_TEMPLATE_INSTANTIATION # if __xlC__ < 0x400 # define Q_NO_USING_KEYWORD # define TQ_TYPENAME @@ -413,7 +404,6 @@ # define Q_CC_HPACC # else # define Q_CC_HP -# define TQ_FULL_TEMPLATE_INSTANTIATION # endif # define Q_NO_USING_KEYWORD /* ### check "using" status */ @@ -854,24 +844,6 @@ TQ_EXPORT const char *tqInstallPathShare(); #endif /* __cplusplus */ -/* - compilers which follow outdated template instantiation rules - require a class to have a comparison operator to exist when - a TQValueList of this type is instantiated. It's not actually - used in the list, though. Hence the dummy implementation. - Just in case other code relies on it we better trigger a warning - mandating a real implementation. -*/ -#ifdef TQ_FULL_TEMPLATE_INSTANTIATION -# define TQ_DUMMY_COMPARISON_OPERATOR(C) \ - bool operator==( const C& ) const { \ - tqWarning( #C"::operator==( const "#C"& ) got called." ); \ - return false; \ - } -#else -# define TQ_DUMMY_COMPARISON_OPERATOR(C) -#endif - #endif /* TQGLOBAL_H */ /* diff --git a/src/tools/tqmap.h b/src/tools/tqmap.h index 8689e17ee..05a30f5ca 100644 --- a/src/tools/tqmap.h +++ b/src/tools/tqmap.h @@ -733,13 +733,6 @@ public: void remove( iterator it ) { detach(); sh->remove( it ); } void remove( const Key& k ); -#if defined(TQ_FULL_TEMPLATE_INSTANTIATION) - bool operator==( const TQMap<Key,T>& ) const { return false; } -#ifndef TQT_NO_STL - bool operator==( const std::map<Key,T>& ) const { return false; } -#endif -#endif - protected: /** * Helpers diff --git a/src/widgets/tqdatetimeedit.cpp b/src/widgets/tqdatetimeedit.cpp index 2531dd732..4159f66e8 100644 --- a/src/widgets/tqdatetimeedit.cpp +++ b/src/widgets/tqdatetimeedit.cpp @@ -70,7 +70,6 @@ public: int width() const { return selend - selstart; } int index() const { return act; } bool separator() const { return sep; } - TQ_DUMMY_COMPARISON_OPERATOR( TQNumberSection ) private: int selstart :12; int selend :12; diff --git a/src/widgets/tqdockarea.cpp b/src/widgets/tqdockarea.cpp index 83b202971..9a2e429cc 100644 --- a/src/widgets/tqdockarea.cpp +++ b/src/widgets/tqdockarea.cpp @@ -58,8 +58,6 @@ struct TQ_EXPORT DockData DockData( TQDockWindow *dw, const TQRect &r ) : w( dw ), rect( r ) {} TQDockWindow *w; TQRect rect; - - TQ_DUMMY_COMPARISON_OPERATOR( DockData ) }; static int fix_x( TQDockWindow* w, int width = -1 ) { diff --git a/src/xml/tqsvgdevice.cpp b/src/xml/tqsvgdevice.cpp index 51c48179c..3aec30c7a 100644 --- a/src/xml/tqsvgdevice.cpp +++ b/src/xml/tqsvgdevice.cpp @@ -60,19 +60,16 @@ const char systemId[] = "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001 struct TQM_EXPORT_SVG ImgElement { TQDomElement element; TQImage image; - TQ_DUMMY_COMPARISON_OPERATOR( ImgElement ) }; struct TQM_EXPORT_SVG PixElement { TQDomElement element; TQPixmap pixmap; - TQ_DUMMY_COMPARISON_OPERATOR( PixElement ) }; struct TQSvgDeviceState { int textx, texty; // current text position int textalign; // text alignment - TQ_DUMMY_COMPARISON_OPERATOR( TQSvgDeviceState ) }; typedef TQValueList<ImgElement> ImageList; diff --git a/src/xml/tqxml.cpp b/src/xml/tqxml.cpp index 591890976..eab061cb0 100644 --- a/src/xml/tqxml.cpp +++ b/src/xml/tqxml.cpp @@ -2248,8 +2248,6 @@ private: : publicId(p), systemId(s) {} TQString publicId; TQString systemId; - - TQ_DUMMY_COMPARISON_OPERATOR(ExternParameterEntity) }; struct ExternEntity { @@ -2259,7 +2257,6 @@ private: TQString publicId; TQString systemId; TQString notation; - TQ_DUMMY_COMPARISON_OPERATOR(ExternEntity) }; TQMap<TQString,ExternParameterEntity> externParameterEntities; TQMap<TQString,TQString> parameterEntities; |
