diff options
Diffstat (limited to 'tqt/kqt3.cpp')
-rw-r--r-- | tqt/kqt3.cpp | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/tqt/kqt3.cpp b/tqt/kqt3.cpp index 8ceb265..2149882 100644 --- a/tqt/kqt3.cpp +++ b/tqt/kqt3.cpp @@ -120,19 +120,25 @@ static const char * getAppName(bool useTQt=true) int TQApplication::exec() { - static bool init=false; - - if(!init) - { - connectToKDialogD(getAppName(false)); - init=true; - } - - static int (*realFunction)(void *); - - if(!realFunction) - realFunction = (int (*)(void *)) dlsym(RTLD_NEXT, KQT_QAPPLICATION_EXEC); - return (int)realFunction(this); + static bool init=false; + + if(!init) + { + connectToKDialogD(getAppName(false)); + init=true; + } + + static int (*realFunction)(void *); + + if(!realFunction) + realFunction = (int (*)(void *)) dlsym(RTLD_NEXT, KQT_QAPPLICATION_EXEC); + if (realFunction) + return (int)realFunction(this); + else + { + tqWarning("kgtk-qt3 tqt TQApplication::exec() realFunction not found!!"); + return 255; + } }; static TQString qt2KdeFilter(const TQString &f) @@ -232,7 +238,7 @@ static const TQString getFilters(TQFileDialog *dlg, bool scribusSave=false) end(children.end()); for(; it!=end; ++it) - if(::tqqt_cast<TQComboBox *>(*it) && 0==qstrcmp((*it)->name(), "file types")) + if(::tqt_cast<TQComboBox *>(*it) && 0==qstrcmp((*it)->name(), "file types")) { TQComboBox *types=(TQComboBox *)(*it); TQTextOStream str(&filter); @@ -269,7 +275,7 @@ static TQString getCurrentFileName(TQFileDialog *dlg) end(children.end()); for(; it!=end; ++it) - if(::tqqt_cast<TQLineEdit *>(*it)) // && 0==qstrcmp((*it)->name(), "name/filter editor")) + if(::tqt_cast<TQLineEdit *>(*it)) // && 0==qstrcmp((*it)->name(), "name/filter editor")) return ((TQLineEdit *)(*it))->text(); } } |