summaryrefslogtreecommitdiffstats
path: root/qt3-tqt3/tqt3_fixups.diff
blob: 5a5d4a5759df63832e371b6623c1b40f1d5967df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
diff -ur src/moc/moc.y src/moc/moc.y
--- src/moc/moc.y	2011-08-23 02:50:57.000000000 -0500
+++ src/moc/moc.y	2011-08-24 01:46:17.000000000 -0500
@@ -3422,8 +3422,8 @@
 		else if ( type == "Q_ULLONG" )
 		    fprintf( out, "v->asULongLong()" );
 		else if ( isVariantType( type ) ) {
-		    if ( type[0] == 'Q' )
-			type = type.mid(1);
+		    if (( type[0] == 'T' ) && ( type[1] == 'Q' ))
+			type = type.mid(2);
 		    else
 			type[0] = toupper( type[0] );
 		    fprintf( out, "v->as%s()", type.data() );
diff -ur src/moc/moc_yacc.cpp src/moc/moc_yacc.cpp
--- src/moc/moc_yacc.cpp	2011-08-23 02:03:46.000000000 -0500
+++ src/moc/moc_yacc.cpp	2011-08-24 01:46:45.000000000 -0500
@@ -3462,8 +3462,8 @@
 		else if ( type == "Q_ULLONG" )
 		    fprintf( out, "v->asULongLong()" );
 		else if ( isVariantType( type ) ) {
-		    if ( type[0] == 'Q' )
-			type = type.mid(1);
+		    if (( type[0] == 'T' ) && ( type[1] == 'Q' ))
+			type = type.mid(2);
 		    else
 			type[0] = toupper( type[0] );
 		    fprintf( out, "v->as%s()", type.data() );
diff -ur tools/designer/designer/mainwindowactions.cpp tools/designer/designer/mainwindowactions.cpp
--- tools/designer/designer/mainwindowactions.cpp	2011-08-30 16:14:24.000000000 -0500
+++ tools/designer/designer/mainwindowactions.cpp	2011-08-30 17:06:52.000000000 -0500
@@ -539,8 +539,8 @@
 		new WidgetAction( grp, actionGroupTools, TQString::number( i ).latin1() );
 	    a->setToggleAction( TRUE );
 	    TQString atext = WidgetDatabase::className( i );
-	    if ( atext[0] == 'Q' )
-		atext = atext.mid(1);
+	    if (( atext[0] == 'T' ) && ( atext[1] == 'Q' ))
+		atext = atext.mid(2);
 	    while ( atext.length() && atext[0] >= 'a' && atext[0] <= 'z' )
 		atext = atext.mid(1);
 	    if ( atext.isEmpty() )
diff -ur tools/designer/plugins/dlg/dlg2ui.cpp tools/designer/plugins/dlg/dlg2ui.cpp
--- tools/designer/plugins/dlg/dlg2ui.cpp	2011-08-30 16:14:25.000000000 -0500
+++ tools/designer/plugins/dlg/dlg2ui.cpp	2011-08-30 17:07:13.000000000 -0500
@@ -382,7 +382,7 @@
     } else if ( e.tagName() == TQString("DlgWidget") ) {
 	return TQString( "TQWidget" );
     } else {
-	return TQChar( 'Q' ) + e.tagName();
+	return TQString( "TQ" ).append( e.tagName() );
     }
 }
 
diff -ur tools/designer/tools/createcw/main.cpp tools/designer/tools/createcw/main.cpp
--- tools/designer/tools/createcw/main.cpp	2011-08-30 16:14:24.000000000 -0500
+++ tools/designer/tools/createcw/main.cpp	2011-08-30 17:05:45.000000000 -0500
@@ -76,8 +76,8 @@
 static TQString convert_type( const TQString &s )
 {
     TQString str( s );
-    if ( str[ 0 ] == 'Q' )
-	str.remove( 0, 1 );
+    if (( str[ 0 ] == 'T' ) && ( str[ 1 ] == 'Q' ))
+	str.remove( 0, 2 );
     str[ 0 ] = str[ 0 ].upper();
     return str;
 }
diff -ur tools/designer/uic/object.cpp tools/designer/uic/object.cpp
--- tools/designer/uic/object.cpp	2011-08-30 16:14:24.000000000 -0500
+++ tools/designer/uic/object.cpp	2011-08-30 17:05:16.000000000 -0500
@@ -116,8 +116,8 @@
     TQString definedName = objName;
     bool isTmpObject = objName.isEmpty() || objClass == "TQLayoutWidget";
     if ( isTmpObject ) {
-	if ( objClass[0] == 'Q' )
-	    objName = objClass.mid(1);
+	if (( objClass[0] == 'T' ) && ( objClass[1] == 'Q' ))
+	    objName = objClass.mid(2);
 	else
 	    objName = objClass.lower();
 	objName.prepend( "private" );
diff -ur tools/designer/shared/widgetdatabase.cpp tools/designer/shared/widgetdatabase.cpp
--- tools/designer/shared/widgetdatabase.cpp
+++ tools/designer/shared/widgetdatabase.cpp
@@ -719,8 +719,12 @@
     WidgetDatabaseRecord *r = at( id );
     if ( !r )
 	return TQString::null;
-    if ( r->includeFile.isNull() )
-	return r->name.lower() + ".h";
+    if ( r->includeFile.isNull() ) {
+	TQString rq = r->name;
+	if ( rq[ 0 ] == 'T' && rq[ 1 ] == 'Q')
+	    rq = rq.mid(1);
+	return rq.lower() + ".h";
+    }
     return r->includeFile;
 }
 
@@ -762,8 +766,8 @@
     TQString n = className( id );
     if ( n == "TQLayoutWidget" )
 	n = "Layout";
-    if ( n[ 0 ] == 'Q' && n[ 1 ].lower() != n[ 1 ] )
-	n = n.mid( 1 );
+    if ( n[ 0 ] == 'T' && n[ 1 ] == 'Q' && n[ 2 ].lower() != n[ 2 ] )
+	n = n.mid( 2 );
     int colonColon = n.findRev( "::" );
     if ( colonColon != -1 )
 	n = n.mid( colonColon + 2 );
diff -ur tools/designer/uic/form.cpp tools/designer/uic/form.cpp
--- tools/designer/uic/form.cpp
+++ tools/designer/uic/form.cpp
@@ -294,8 +294,8 @@
 		s = "TQFrame";
 	    if ( !(nofwd && customWidgets.contains(s)) )
 		forwardDecl += s;
-	    if ( s.mid( 1 ) == "ListBox" || s.mid( 1 ) == "ListView" || s.mid( 1 ) == "IconView" )
-		forwardDecl += "Q" + s.mid( 1 ) + "Item";
+	    if ( (s.mid( 2 ) == "ListBox") || (s.mid( 2 ) == "ListView") || (s.mid( 2 ) == "IconView") )
+		forwardDecl += "TQ" + s.mid( 2 ) + "Item";
 	    if ( s == "TQDataTable" ) { // other convenience classes which are used in TQDataTable signals, and thus should be forward-declared by uic for us
 		forwardDecl += "TQSqlRecord";
 	    }
@@ -807,7 +807,7 @@
 		globalIncludes += "qapplication.h";
 		continue;
 	    }
-	    if ( name.mid( 1 ) == "ListView" )
+	    if (( name.mid( 1 ) == "ListView" ) || ( name.mid( 2 ) == "ListView" ))
 		globalIncludes += "qheader.h";
 	    if ( name != objClass ) {
 		int wid = WidgetDatabase::idFromClassName( name );
diff -ur src/tools/qglobal.h src/tools/qglobal.h
--- src/tools/qglobal.h
+++ src/tools/qglobal.h
@@ -41,6 +41,8 @@
 #ifndef TQGLOBAL_H
 #define TQGLOBAL_H
 
+#define TQT_REAL_TQT 1
+
 #define QT_VERSION_STR   "3.5.0"
 /*
    QT_VERSION is (major << 16) + (minor << 8) + patch.