From 8ac0e970e4464d9f8f73c0fb34a178ff135be8c3 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 2 Jun 2024 23:07:22 +0900 Subject: Rename ntqwidget* related files to equivalent tqwidget* Signed-off-by: Michele Calgaro --- tools/designer/shared/widgetdatabase.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tools/designer/shared/widgetdatabase.cpp') diff --git a/tools/designer/shared/widgetdatabase.cpp b/tools/designer/shared/widgetdatabase.cpp index 6cbc34ac0..4a753d3ef 100644 --- a/tools/designer/shared/widgetdatabase.cpp +++ b/tools/designer/shared/widgetdatabase.cpp @@ -60,6 +60,14 @@ static TQPluginManager *widgetPluginManager = 0; static bool plugins_set_up = FALSE; static bool was_in_setup = FALSE; +// This is temporary code required till the integration of tqtinterface into tqt3 is completed. +// It will be removed afterwards +static TQString converted_widgets[] = +{ + "TQWidget", "TQWidgetStack", +}; +size_t converted_widgets_size = sizeof(converted_widgets) / sizeof(TQString); + TQCleanupHandler > cleanup_manager; WidgetDatabaseRecord::WidgetDatabaseRecord() @@ -721,6 +729,13 @@ TQString WidgetDatabase::includeFile( int id ) return TQString::null; if ( r->includeFile.isNull() ) { TQString rq = r->name; + for (size_t i = 0; i < converted_widgets_size; ++i) + { + if (rq == converted_widgets[i]) + { + return rq.lower() + ".h"; + } + } if ( rq[ 0 ] == 'T' && rq[ 1 ] == 'Q') rq = rq.mid(1); return "nt" + rq.lower() + ".h"; -- cgit v1.2.3