summaryrefslogtreecommitdiffstats
path: root/conversions/qt3-tqt3/tqt3_fixups_batch2.diff
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-04-05 00:23:54 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-04-05 00:23:54 +0900
commita7c35253fa86ccaba568822a967af03ea263bbc0 (patch)
tree95de61c9fac1dc45624f731377ebf44cdd1b26da /conversions/qt3-tqt3/tqt3_fixups_batch2.diff
parent428c2d88b4ac80df001d25973a1511d6a3d424c6 (diff)
downloadscripts-a7c35253fa86ccaba568822a967af03ea263bbc0.tar.gz
scripts-a7c35253fa86ccaba568822a967af03ea263bbc0.zip
Moved conversion scripts from experimental repository.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'conversions/qt3-tqt3/tqt3_fixups_batch2.diff')
-rw-r--r--conversions/qt3-tqt3/tqt3_fixups_batch2.diff47
1 files changed, 47 insertions, 0 deletions
diff --git a/conversions/qt3-tqt3/tqt3_fixups_batch2.diff b/conversions/qt3-tqt3/tqt3_fixups_batch2.diff
new file mode 100644
index 0000000..1e8d4dd
--- /dev/null
+++ b/conversions/qt3-tqt3/tqt3_fixups_batch2.diff
@@ -0,0 +1,47 @@
+diff --git tools/designer/shared/widgetdatabase.cpp tools/designer/shared/widgetdatabase.cpp
+--- tools/designer/shared/widgetdatabase.cpp
++++ tools/designer/shared/widgetdatabase.cpp
+@@ -723,7 +723,7 @@ TQString WidgetDatabase::includeFile( int id )
+ TQString rq = r->name;
+ if ( rq[ 0 ] == 'T' && rq[ 1 ] == 'Q')
+ rq = rq.mid(1);
+- return rq.lower() + ".h";
++ return "nt" + rq.lower() + ".h";
+ }
+ return r->includeFile;
+ }
+diff --git tools/designer/uic/uic.cpp tools/designer/uic/uic.cpp
+--- tools/designer/uic/uic.cpp
++++ tools/designer/uic/uic.cpp
+@@ -1114,7 +1114,7 @@ TQStringList Uic::unique( const TQStringList& list )
+ TQString Uic::createObjectInstance( const TQString& objClass, const TQString& parent, const TQString& objName )
+ {
+
+- if ( objClass.mid( 1 ) == "ComboBox" ) {
++ if (( objClass.mid( 1 ) == "ComboBox" ) || ( objClass.mid( 2 ) == "ComboBox" )) {
+ return objClass + "( FALSE, " + parent + ", \"" + objName + "\" )";
+ }
+ return objClass + "( " + parent + ", \"" + objName + "\" )";
+diff --git qmake/generators/makefile.cpp qmake/generators/makefile.cpp
+--- qmake/generators/makefile.cpp
++++ qmake/generators/makefile.cpp
+@@ -135,8 +135,8 @@
+ bool ignore_qobject = FALSE;
+ int line_count = 1;
+ /* qmake ignore Q_OBJECT */
+-#define COMP_LEN 8 //strlen("Q_OBJECT")
+-#define OBJ_LEN 8 //strlen("Q_OBJECT")
++#define COMP_LEN 9 //strlen("TQ_OBJECT")
++#define OBJ_LEN 9 //strlen("TQ_OBJECT")
+ #define DIS_LEN 10 //strlen("Q_DISPATCH")
+ int x;
+ for(x = 0; x < (total_size_read-COMP_LEN); x++) {
+@@ -172,7 +172,7 @@
+ #define SYMBOL_CHAR(x) ((x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z') || \
+ (x <= '0' && x >= '9') || x == '_')
+
+- bool interesting = *(big_buffer+x) == 'Q' && (!strncmp(big_buffer+x, "Q_OBJECT", OBJ_LEN) ||
++ bool interesting = ((*(big_buffer+x) == 'T') || (*(big_buffer+x) == 'Q')) && (!strncmp(big_buffer+x, "TQ_OBJECT", OBJ_LEN) ||
+ !strncmp(big_buffer+x, "Q_DISPATCH", DIS_LEN));
+ if(interesting) {
+ int len = 0;