diff options
author | Michele Calgaro <[email protected]> | 2023-08-24 21:28:39 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-08-31 10:03:10 +0900 |
commit | 030a2248f3630fd0404df98beffc78b5b5ca4c31 (patch) | |
tree | 75d55e7e177ca48e69d59f74181ce37841ecd51b /src/modules/objects/class_wrapper.cpp | |
parent | 17118265cf93b35b0b68e450ea5f43046c1d81c3 (diff) | |
download | kvirc-030a2248f3630fd0404df98beffc78b5b5ca4c31.tar.gz kvirc-030a2248f3630fd0404df98beffc78b5b5ca4c31.zip |
Drop USE_QT4 code
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/modules/objects/class_wrapper.cpp')
-rw-r--r-- | src/modules/objects/class_wrapper.cpp | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/src/modules/objects/class_wrapper.cpp b/src/modules/objects/class_wrapper.cpp index 57a2ef59..261b041f 100644 --- a/src/modules/objects/class_wrapper.cpp +++ b/src/modules/objects/class_wrapper.cpp @@ -30,10 +30,8 @@ #include "class_widget.h" #include <tqwidget.h> -#ifndef COMPILE_USE_QT4 - #include <tqobjectlist.h> - #include <tqwidgetlist.h> -#endif +#include <tqobjectlist.h> +#include <tqwidgetlist.h> #include "kvi_app.h" #include "kvi_frame.h" @@ -182,28 +180,6 @@ bool KviKvsObject_wrapper::init(KviKvsRunTimeContext * pContext,KviKvsVariantLis } TQWidget *KviKvsObject_wrapper::findTopLevelWidgetToWrap(const TQString szClass, const TQString szName) { -#ifdef COMPILE_USE_QT4 - TQWidgetList list = g_pApp->topLevelWidgets(); - if( !list.count() ) return 0; - for(int idx=0;idx<list.count();idx++) - { - bool bNameMatch = false; - bool bClassMatch = false; - if( !szName.isEmpty() ) - bNameMatch = KviTQString::equalCI(list.at(idx)->name(), szName); - else - bNameMatch = true; - if( !szClass.isEmpty()) - bClassMatch = KviTQString::equalCI(list.at(idx)->className(), szClass); - else - bClassMatch = true; - if( bNameMatch && bClassMatch ) { - TQWidget *w = list.at(idx); - return w; - } - } - return 0; -#else TQWidgetList *list = g_pApp->topLevelWidgets(); if( !list ) return 0; @@ -230,24 +206,10 @@ TQWidget *KviKvsObject_wrapper::findTopLevelWidgetToWrap(const TQString szClass, delete list; return 0; -#endif } TQWidget *KviKvsObject_wrapper::findWidgetToWrap(const char *szClass, const char *szName, TQWidget *childOf) { -#ifdef COMPILE_USE_QT4 - TQObjectList list = childOf->queryList(szClass ? szClass : 0, szName ? szName : 0, false, true); - if( !list.count() ) return 0; - for(int idx=0;idx<list.count();idx++) - { - if( list.at(idx)->isWidgetType() ) { - TQWidget *w = (TQWidget *)list.at(idx); - return w; - } - - } - return 0; -#else TQObjectList *list = childOf->queryList(szClass ? szClass : 0, szName ? szName : 0, false, true); if( !list ) return 0; @@ -263,7 +225,6 @@ TQWidget *KviKvsObject_wrapper::findWidgetToWrap(const char *szClass, const char } delete list; return 0; -#endif } #include "m_class_wrapper.moc" |