summaryrefslogtreecommitdiffstats
path: root/tools/designer/shared/widgetdatabase.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-06-02 23:07:22 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-06-02 23:22:42 +0900
commit8ac0e970e4464d9f8f73c0fb34a178ff135be8c3 (patch)
treeb95884617b9a37accc843676d5d42be4116a3f54 /tools/designer/shared/widgetdatabase.cpp
parent68b81013e8668f50fc18b7e26a520ec93a7a1251 (diff)
downloadtqt-8ac0e970.tar.gz
tqt-8ac0e970.zip
Rename ntqwidget* related files to equivalent tqwidget*
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tools/designer/shared/widgetdatabase.cpp')
-rw-r--r--tools/designer/shared/widgetdatabase.cpp15
1 files changed, 15 insertions, 0 deletions
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<WidgetInterface> *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<TQPluginManager<WidgetInterface> > 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";