Browse Source

qt -> tqt conversion:

QT_NO_ASCII_CAST -> TQT_NO_ASCII_CAST
QT_NO_STL -> TQT_NO_STL
QT_NO_COMPAT -> TQT_NO_COMPAT
QT_NO_TRANSLATION -> TQT_NO_TRANSLATION

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Michele Calgaro 7 months ago
parent
commit
65ff0e19f4
Signed by: Michele Calgaro <michele.calgaro@yahoo.it> GPG Key ID: 2A75B7CA8ADED5CF

+ 1
- 1
ConfigureChecks.cmake View File

@@ -169,7 +169,7 @@ endif( )
169 169
 # definitions
170 170
 if( QT_VERSION STREQUAL "3" )
171 171
   if( HAVE_REAL_TQT )
172
-    set( QT_DEFINITIONS "-DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT" )
172
+    set( QT_DEFINITIONS "-DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT -DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT" )
173 173
   else( )
174 174
     set( QT_DEFINITIONS "-DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT" )
175 175
   endif( )

+ 2
- 2
qtinterface/TODO View File

@@ -14,7 +14,7 @@ qguardedptr (TQGuardedPtr, weird compilation failure)
14 14
 qinputdialog
15 15
 qnetworkprotocol (QNetworkProtocolFactory, weird compilation failure)
16 16
 qsessionmanager
17
-qtranslator (QT_NO_TRANSLATION is set, MOC does not honor #ifdef)
17
+qtranslator (TQT_NO_TRANSLATION is set, MOC does not honor #ifdef)
18 18
 qwidgetplugin (TQWidgetContainerPlugin, weird compilation failure)
19 19
 
20 20
 
@@ -57,4 +57,4 @@ All of Trinity now uses TQ<something>, e.g. QTimer is now TQTimer.  Depending on
57 57
 #define TQCString QCString (for Qt3)
58 58
 #define TQCString Q3CString (for Qt4)
59 59
 
60
-If needed, the TQ function can subclass the Q or Q3 function and reimplement the missing features.  However, the vast majority of classes (those that have not changed much) will be handled with the simple #define statements, greatly simplifying and speeding implementation.
60
+If needed, the TQ function can subclass the Q or Q3 function and reimplement the missing features.  However, the vast majority of classes (those that have not changed much) will be handled with the simple #define statements, greatly simplifying and speeding implementation.

+ 1
- 1
qtinterface/interface_tqt3/tmoc.cmake View File

@@ -12,7 +12,7 @@ if [ -f @BIN_INSTALL_DIR@/tqt-replace-stream ]; then
12 12
 		out_file="$3"
13 13
 		@BIN_INSTALL_DIR@/tqt-replace-stream "${input_file}" | \
14 14
 	        @MOC_EXECUTABLE@ | \
15
-	        sed "/#include <ntqmetaobject.h>/ i #undef QT_NO_COMPAT\n#include \"${input_file}\"" \
15
+	        sed "/#include <ntqmetaobject.h>/ i #undef TQT_NO_COMPAT\n#include \"${input_file}\"" \
16 16
 		> "${out_file}"
17 17
 	fi
18 18
 else

+ 8
- 8
qtinterface/interface_tqt3/tqmap.h View File

@@ -130,11 +130,11 @@ class TQMapIterator
130 130
      * Typedefs
131 131
      */
132 132
     typedef TQMapNode< K, T >* NodePtr;
133
-#ifndef QT_NO_STL
133
+#ifndef TQT_NO_STL
134 134
     typedef std::bidirectional_iterator_tag  iterator_category;
135 135
 #endif
136 136
     typedef T          value_type;
137
-#ifndef QT_NO_STL
137
+#ifndef TQT_NO_STL
138 138
     typedef ptrdiff_t  difference_type;
139 139
 #else
140 140
     typedef int difference_type;
@@ -246,11 +246,11 @@ class TQMapConstIterator
246 246
      * Typedefs
247 247
      */
248 248
     typedef TQMapNode< K, T >* NodePtr;
249
-#ifndef QT_NO_STL
249
+#ifndef TQT_NO_STL
250 250
     typedef std::bidirectional_iterator_tag  iterator_category;
251 251
 #endif
252 252
     typedef T          value_type;
253
-#ifndef QT_NO_STL
253
+#ifndef TQT_NO_STL
254 254
     typedef ptrdiff_t  difference_type;
255 255
 #else
256 256
     typedef int difference_type;
@@ -631,7 +631,7 @@ public:
631 631
     typedef const value_type* const_pointer;
632 632
     typedef value_type& reference;
633 633
     typedef const value_type& const_reference;
634
-#ifndef QT_NO_STL
634
+#ifndef TQT_NO_STL
635 635
     typedef ptrdiff_t  difference_type;
636 636
 #else
637 637
     typedef int difference_type;
@@ -658,7 +658,7 @@ public:
658 658
 	sh = m.sh; sh->ref();
659 659
     }
660 660
 
661
-#ifndef QT_NO_STL
661
+#ifndef TQT_NO_STL
662 662
     TQMap( const std::map<Key,T>& m )
663 663
     {
664 664
 	sh = new TQMapPrivate<Key,T>;
@@ -675,7 +675,7 @@ public:
675 675
 	    delete sh;
676 676
     }
677 677
     TQMap<Key,T>& operator= ( const TQMap<Key,T>& m );
678
-#ifndef QT_NO_STL
678
+#ifndef TQT_NO_STL
679 679
     TQMap<Key,T>& operator= ( const std::map<Key,T>& m )
680 680
     {
681 681
 	clear();
@@ -787,7 +787,7 @@ public:
787 787
 
788 788
 #if defined(Q_FULL_TEMPLATE_INSTANTIATION)
789 789
     bool operator==( const TQMap<Key,T>& ) const { return FALSE; }
790
-#ifndef QT_NO_STL
790
+#ifndef TQT_NO_STL
791 791
     bool operator==( const std::map<Key,T>& ) const { return FALSE; }
792 792
 #endif
793 793
 #endif

+ 1
- 1
qtinterface/interface_tqt3/tqptrlist.h View File

@@ -245,7 +245,7 @@ public:
245 245
 			      { Q3GListIterator::operator=(it); return *this; }
246 246
 };
247 247
 
248
-#ifndef QT_NO_COMPAT
248
+#ifndef TQT_NO_COMPAT
249 249
 #define TQT_TQList TQPtrList
250 250
 #define TQT_TQListIterator TQPtrListIterator
251 251
 #endif

+ 7
- 7
qtinterface/interface_tqt3/tqvaluelist.h View File

@@ -110,12 +110,12 @@ class TQValueListIterator
110 110
      * Typedefs
111 111
      */
112 112
     typedef TQValueListNode<T>* NodePtr;
113
-#ifndef QT_NO_STL
113
+#ifndef TQT_NO_STL
114 114
     typedef std::bidirectional_iterator_tag  iterator_category;
115 115
 #endif
116 116
     typedef T        value_type;
117 117
     typedef size_t size_type;
118
-#ifndef QT_NO_STL
118
+#ifndef TQT_NO_STL
119 119
     typedef ptrdiff_t  difference_type;
120 120
 #else
121 121
     typedef int difference_type;
@@ -186,12 +186,12 @@ class TQValueListConstIterator
186 186
      * Typedefs
187 187
      */
188 188
     typedef TQValueListNode<T>* NodePtr;
189
-#ifndef QT_NO_STL
189
+#ifndef TQT_NO_STL
190 190
     typedef std::bidirectional_iterator_tag  iterator_category;
191 191
 #endif
192 192
     typedef T        value_type;
193 193
     typedef size_t size_type;
194
-#ifndef QT_NO_STL
194
+#ifndef TQT_NO_STL
195 195
     typedef ptrdiff_t  difference_type;
196 196
 #else
197 197
     typedef int difference_type;
@@ -451,7 +451,7 @@ public:
451 451
     typedef value_type& reference;
452 452
     typedef const value_type& const_reference;
453 453
     typedef size_t size_type;
454
-#ifndef QT_NO_STL
454
+#ifndef TQT_NO_STL
455 455
     typedef ptrdiff_t  difference_type;
456 456
 #else
457 457
     typedef int difference_type;
@@ -462,7 +462,7 @@ public:
462 462
      */
463 463
     TQValueList() { sh = new TQValueListPrivate<T>; }
464 464
     TQValueList( const TQValueList<T>& l ) { sh = l.sh; sh->ref(); }
465
-#ifndef QT_NO_STL
465
+#ifndef TQT_NO_STL
466 466
     TQValueList( const std::list<T>& l )
467 467
     {
468 468
 	sh = new TQValueListPrivate<T>;
@@ -478,7 +478,7 @@ public:
478 478
 	sh = l.sh;
479 479
 	return *this;
480 480
     }
481
-#ifndef QT_NO_STL
481
+#ifndef TQT_NO_STL
482 482
     TQValueList<T>& operator= ( const std::list<T>& l )
483 483
     {
484 484
 	detach();

+ 3
- 3
qtinterface/tqt4/Qt/qglobal.h View File

@@ -473,7 +473,7 @@ namespace QT_NAMESPACE {}
473 473
 /* GCC 2.95 knows "using" but does not support it correctly */
474 474
 #  if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
475 475
 #    define Q_NO_USING_KEYWORD
476
-#    define QT_NO_STL_WCHAR
476
+#    define TQT_NO_STL_WCHAR
477 477
 #  endif
478 478
 #  if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
479 479
 #    define Q_ALIGNOF(type)   __alignof__(type)
@@ -2346,7 +2346,7 @@ template <typename Wrapper> static inline typename Wrapper::pointer qGetPtrHelpe
2346 2346
 #define QT_TRANSLATE_NOOP3(scope, x, comment) {x, comment}
2347 2347
 #define QT_TRANSLATE_NOOP3_UTF8(scope, x, comment) {x, comment}
2348 2348
 
2349
-#ifndef QT_NO_TRANSLATION // ### This should enclose the NOOPs above
2349
+#ifndef TQT_NO_TRANSLATION // ### This should enclose the NOOPs above
2350 2350
 
2351 2351
 // Defined in qcoreapplication.cpp
2352 2352
 // The better name qTrId() is reserved for an upcoming function which would
@@ -2355,7 +2355,7 @@ Q_CORE_EXPORT QString qtTrId(const char *id, int n = -1);
2355 2355
 
2356 2356
 #define QT_TRID_NOOP(id) id
2357 2357
 
2358
-#endif // QT_NO_TRANSLATION
2358
+#endif // TQT_NO_TRANSLATION
2359 2359
 
2360 2360
 #define QDOC_PROPERTY(text)
2361 2361
 

+ 2
- 2
qtinterface/tqt4/Qt/qlist.h View File

@@ -46,7 +46,7 @@
46 46
 #include <QtCore/qatomic.h>
47 47
 #include <QtCore/qalgorithms.h>
48 48
 
49
-#ifndef QT_NO_STL
49
+#ifndef TQT_NO_STL
50 50
 #include <iterator>
51 51
 #include <list>
52 52
 #endif
@@ -332,7 +332,7 @@ public:
332 332
     static QList<T> fromVector(const QVector<T> &vector);
333 333
     static QList<T> fromSet(const QSet<T> &set);
334 334
 
335
-#ifndef QT_NO_STL
335
+#ifndef TQT_NO_STL
336 336
     static inline QList<T> fromStdList(const std::list<T> &list)
337 337
     { QList<T> tmp; qCopy(list.begin(), list.end(), std::back_inserter(tmp)); return tmp; }
338 338
     inline std::list<T> toStdList() const

+ 2
- 2
qtinterface/tqt4/Qt/qobject.h View File

@@ -137,7 +137,7 @@ public:
137 137
     virtual const QMetaObject *metaObject() const;
138 138
     static const QMetaObject staticMetaObject;
139 139
 #endif
140
-#ifdef QT_NO_TRANSLATION
140
+#ifdef TQT_NO_TRANSLATION
141 141
     static QString tr(const char *sourceText, const char *, int)
142 142
         { return QString::fromLatin1(sourceText); }
143 143
     static QString tr(const char *sourceText, const char * = 0)
@@ -148,7 +148,7 @@ public:
148 148
     static QString trUtf8(const char *sourceText, const char * = 0)
149 149
         { return QString::fromUtf8(sourceText); }
150 150
 #endif
151
-#endif //QT_NO_TRANSLATION
151
+#endif //TQT_NO_TRANSLATION
152 152
 
153 153
     QString objectName() const;
154 154
     void setObjectName(const QString &name);

+ 3
- 3
qtinterface/tqt4/Qt/qobjectdefs.h View File

@@ -90,7 +90,7 @@ class QStringList;
90 90
 #define Q_SIGNAL
91 91
 #define Q_SLOT
92 92
 
93
-#ifndef QT_NO_TRANSLATION
93
+#ifndef TQT_NO_TRANSLATION
94 94
 # ifndef QT_NO_TEXTCODEC
95 95
 // full set of tr functions
96 96
 // ### Qt 5: merge overloads
@@ -290,13 +290,13 @@ struct Q_CORE_EXPORT QMetaObject
290 290
 
291 291
     QObject *cast(QObject *obj) const;
292 292
 
293
-#ifndef QT_NO_TRANSLATION
293
+#ifndef TQT_NO_TRANSLATION
294 294
     // ### Qt 4: Merge overloads
295 295
     QString tr(const char *s, const char *c) const;
296 296
     QString trUtf8(const char *s, const char *c) const;
297 297
     QString tr(const char *s, const char *c, int n) const;
298 298
     QString trUtf8(const char *s, const char *c, int n) const;
299
-#endif // QT_NO_TRANSLATION
299
+#endif // TQT_NO_TRANSLATION
300 300
 
301 301
     int methodOffset() const;
302 302
     int enumeratorOffset() const;

+ 9
- 9
qtinterface/tqt4/Qt/qstring.h View File

@@ -50,7 +50,7 @@
50 50
 #include <Qt3Support/q3cstring.h>
51 51
 #endif
52 52
 
53
-#ifndef QT_NO_STL
53
+#ifndef TQT_NO_STL
54 54
 #  if defined (Q_CC_MSVC_NET) && _MSC_VER < 1310 // Avoids nasty warning for xlocale, line 450
55 55
 #    pragma warning (push)
56 56
 #    pragma warning (disable : 4189)
@@ -60,12 +60,12 @@
60 60
 #    include <string>
61 61
 #  endif
62 62
 
63
-#  ifndef QT_NO_STL_WCHAR
63
+#  ifndef TQT_NO_STL_WCHAR
64 64
 // workaround for some headers not typedef'ing std::wstring
65 65
 typedef std::basic_string<wchar_t> QStdWString;
66
-#  endif // QT_NO_STL_WCHAR
66
+#  endif // TQT_NO_STL_WCHAR
67 67
 
68
-#endif // QT_NO_STL
68
+#endif // TQT_NO_STL
69 69
 
70 70
 #include <stdarg.h>
71 71
 
@@ -476,17 +476,17 @@ public:
476 476
     inline void push_front(QChar c) { prepend(c); }
477 477
     inline void push_front(const QString &s) { prepend(s); }
478 478
 
479
-#ifndef QT_NO_STL
479
+#ifndef TQT_NO_STL
480 480
     static inline QString fromStdString(const std::string &s);
481 481
     inline std::string toStdString() const;
482 482
 # ifdef qdoc
483 483
     static inline QString fromStdWString(const std::wstring &s);
484 484
     inline std::wstring toStdWString() const;
485 485
 # else
486
-#  ifndef QT_NO_STL_WCHAR
486
+#  ifndef TQT_NO_STL_WCHAR
487 487
     static inline QString fromStdWString(const QStdWString &s);
488 488
     inline QStdWString toStdWString() const;
489
-#  endif // QT_NO_STL_WCHAR
489
+#  endif // TQT_NO_STL_WCHAR
490 490
 # endif // qdoc
491 491
 #endif
492 492
 
@@ -1031,14 +1031,14 @@ inline QT_ASCII_CAST_WARN const QString operator+(const QString &s, const QByteA
1031 1031
 # endif // QT_USE_FAST_CONCATENATION
1032 1032
 #endif // QT_USE_FAST_OPERATOR_PLUS
1033 1033
 
1034
-#ifndef QT_NO_STL
1034
+#ifndef TQT_NO_STL
1035 1035
 inline std::string QString::toStdString() const
1036 1036
 { const QByteArray asc = toAscii(); return std::string(asc.constData(), asc.length()); }
1037 1037
 
1038 1038
 inline QString QString::fromStdString(const std::string &s)
1039 1039
 { return fromAscii(s.data(), int(s.size())); }
1040 1040
 
1041
-# ifndef QT_NO_STL_WCHAR
1041
+# ifndef TQT_NO_STL_WCHAR
1042 1042
 inline QStdWString QString::toStdWString() const
1043 1043
 {
1044 1044
     QStdWString str;

+ 2
- 2
qtinterface/tqt4/Qt/qvector.h View File

@@ -47,7 +47,7 @@
47 47
 #include <QtCore/qalgorithms.h>
48 48
 #include <QtCore/qlist.h>
49 49
 
50
-#ifndef QT_NO_STL
50
+#ifndef TQT_NO_STL
51 51
 #include <iterator>
52 52
 #include <vector>
53 53
 #endif
@@ -292,7 +292,7 @@ public:
292 292
 
293 293
     static QVector<T> fromList(const QList<T> &list);
294 294
 
295
-#ifndef QT_NO_STL
295
+#ifndef TQT_NO_STL
296 296
     static inline QVector<T> fromStdVector(const std::vector<T> &vector)
297 297
     { QVector<T> tmp; qCopy(vector.begin(), vector.end(), std::back_inserter(tmp)); return tmp; }
298 298
     inline std::vector<T> toStdVector() const

Loading…
Cancel
Save