diff options
Diffstat (limited to 'languages/cpp/subclassingdlg.cpp')
-rw-r--r-- | languages/cpp/subclassingdlg.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/languages/cpp/subclassingdlg.cpp b/languages/cpp/subclassingdlg.cpp index 562cd010..62b154da 100644 --- a/languages/cpp/subclassingdlg.cpp +++ b/languages/cpp/subclassingdlg.cpp @@ -54,11 +54,11 @@ #define SLOT_HELP SlotItem(m_slotView,"help()","virtual","protected","void",false,true) -SlotItem::SlotItem(TQListView *parent,const TQString &methodName, +SlotItem::SlotItem(TQListView *tqparent,const TQString &methodName, const TQString &specifier, const TQString &access, const TQString &returnType, bool isFunc,bool callBaseClass) -: TQCheckListItem(parent,methodName,TQCheckListItem::CheckBox) +: TQCheckListItem(tqparent,methodName,TQCheckListItem::CheckBox) { setOn(true); m_methodName = methodName; @@ -94,9 +94,9 @@ void SlotItem::setAllreadyInSubclass() SubclassingDlg::SubclassingDlg(CppSupportPart* cppSupport, const TQString &formFile, - TQStringList &newFileNames, TQWidget* parent, + TQStringList &newFileNames, TQWidget* tqparent, const char* name,bool modal, WFlags fl) -: SubclassingDlgBase(parent,name,modal,fl), +: SubclassingDlgBase(tqparent,name,modal,fl), m_newFileNames(newFileNames), m_cppSupport( cppSupport ) { @@ -117,8 +117,8 @@ m_newFileNames(newFileNames), m_cppSupport( cppSupport ) SubclassingDlg::SubclassingDlg(CppSupportPart* cppSupport, const TQString &formFile, const TQString &filename, TQStringList &dummy, - TQWidget* parent, const char* name, bool modal, WFlags fl) -: SubclassingDlgBase(parent, name, modal, fl), + TQWidget* tqparent, const char* name, bool modal, WFlags fl) +: SubclassingDlgBase(tqparent, name, modal, fl), m_newFileNames(dummy), m_cppSupport( cppSupport ) { @@ -144,8 +144,8 @@ m_newFileNames(dummy), m_cppSupport( cppSupport ) for (ClassList::const_iterator classIt = myClasses.begin(); classIt != myClasses.end(); ++classIt) { kdDebug() << "base class " << baseClass << " class " << (*classIt)->name() - << " parents " << (*classIt)->baseClassList().join(",") << endl; - if ( (*classIt)->baseClassList().findIndex(baseClass) != -1 ) + << " tqparents " << (*classIt)->baseClassList().join(",") << endl; + if ( (*classIt)->baseClassList().tqfindIndex(baseClass) != -1 ) { kdDebug() << "base class matched " << endl; m_edClassName->setText((*classIt)->name()); @@ -167,7 +167,7 @@ bool SubclassingDlg::alreadyInSubclass(const TQString &method) { for (uint i=0;i<m_parsedMethods.count();i++) { - if (method.find(m_parsedMethods[i])==0) + if (method.tqfind(m_parsedMethods[i])==0) return true; } return false; @@ -191,13 +191,13 @@ void SubclassingDlg::readUiFile() // Special widget specific slots SlotItem *newSlot; - m_qtBaseClassName = DomUtil::elementByPathExt(doc,"widget").attribute("class","TQDialog"); + m_qtBaseClassName = DomUtil::elementByPathExt(doc,"widget").attribute("class",TQDIALOG_OBJECT_NAME_STRING); - if ( (m_qtBaseClassName=="TQMainWindow") || (m_qtBaseClassName=="TQWidget") ) + if ( (m_qtBaseClassName==TQMAINWINDOW_OBJECT_NAME_STRING) || (m_qtBaseClassName==TQWIDGET_OBJECT_NAME_STRING) ) m_canBeModal = false; else m_canBeModal = true; - if (m_qtBaseClassName != "TQWidget") + if (m_qtBaseClassName != TQWIDGET_OBJECT_NAME_STRING) { newSlot = new SLOT_ACCEPT; newSlot->setOn(false); @@ -214,7 +214,7 @@ void SubclassingDlg::readUiFile() m_slots << newSlot; } - if (m_qtBaseClassName == "TQWizard") + if (m_qtBaseClassName == TQWIZARD_OBJECT_NAME_STRING) { newSlot = new SLOT_NEXT; m_slotView->insertItem(newSlot); @@ -276,14 +276,14 @@ void SubclassingDlg::updateDlg() { } -void SubclassingDlg::replace(TQString &string, const TQString& search, const TQString& replace) +void SubclassingDlg::tqreplace(TQString &string, const TQString& search, const TQString& tqreplace) { - int nextPos = string.find(search); + int nextPos = string.tqfind(search); unsigned int searchLength = search.length(); while (nextPos>-1) { - string = string.replace(nextPos,searchLength,replace); - nextPos = string.find(search,nextPos+replace.length()); + string = string.tqreplace(nextPos,searchLength,tqreplace); + nextPos = string.tqfind(search,nextPos+tqreplace.length()); } } @@ -304,24 +304,24 @@ bool SubclassingDlg::loadBuffer(TQString &buffer, const TQString& filename) bool SubclassingDlg::replaceKeywords(TQString &buffer,bool canBeModal) { - replace(buffer,"$NEWFILENAMEUC$",m_edFileName->text().upper()); - replace(buffer,"$BASEFILENAMELC$",m_formName.lower()); - replace(buffer,"$BASEFILENAME$",m_formName); - replace(buffer,"$NEWCLASS$",m_edClassName->text()); - replace(buffer,"$QTBASECLASS$", m_qtBaseClassName ); - replace(buffer,"$BASECLASS$",m_baseClassName); - replace(buffer,"$NEWFILENAMELC$",m_edFileName->text().lower()); + tqreplace(buffer,"$NEWFILENAMEUC$",m_edFileName->text().upper()); + tqreplace(buffer,"$BASEFILENAMELC$",m_formName.lower()); + tqreplace(buffer,"$BASEFILENAME$",m_formName); + tqreplace(buffer,"$NEWCLASS$",m_edClassName->text()); + tqreplace(buffer,"$TQTBASECLASS$", m_qtBaseClassName ); + tqreplace(buffer,"$BASECLASS$",m_baseClassName); + tqreplace(buffer,"$NEWFILENAMELC$",m_edFileName->text().lower()); if (canBeModal) { - replace(buffer,"$CAN_BE_MODAL_H$",", bool modal = FALSE"); - replace(buffer,"$CAN_BE_MODAL_CPP1$",", bool modal"); - replace(buffer,"$CAN_BE_MODAL_CPP2$",", modal"); + tqreplace(buffer,"$CAN_BE_MODAL_H$",", bool modal = FALSE"); + tqreplace(buffer,"$CAN_BE_MODAL_CPP1$",", bool modal"); + tqreplace(buffer,"$CAN_BE_MODAL_CPP2$",", modal"); } else { - replace(buffer,"$CAN_BE_MODAL_H$",""); - replace(buffer,"$CAN_BE_MODAL_CPP1$",""); - replace(buffer,"$CAN_BE_MODAL_CPP2$",""); + tqreplace(buffer,"$CAN_BE_MODAL_H$",""); + tqreplace(buffer,"$CAN_BE_MODAL_CPP1$",""); + tqreplace(buffer,"$CAN_BE_MODAL_CPP2$",""); } return true; @@ -378,8 +378,8 @@ void SubclassingDlg::accept() TQFileInfo fi(m_filename + ".h"); TQString module = fi.baseName(); TQString basefilename = fi.baseName(true); - buffer.replace(TQRegExp("\\$MODULE\\$"),module); - buffer.replace(TQRegExp("\\$FILENAME\\$"),basefilename); + buffer.tqreplace(TQRegExp("\\$MODULE\\$"),module); + buffer.tqreplace(TQRegExp("\\$FILENAME\\$"),basefilename); } else loadBuffer(buffer,m_filename+".h"); @@ -411,12 +411,12 @@ void SubclassingDlg::accept() if (!slitem->m_isFunc) { declBuild += spacer.fill(' ',43-declBuild.length()) + slitem->m_methodName + ";"; - replace(buffer,"/*$PUBLIC_SLOTS$*/",declBuild); + tqreplace(buffer,"/*$PUBLIC_SLOTS$*/",declBuild); } else { declBuild += spacer.fill(' ',47-declBuild.length()) + slitem->m_methodName + ";"; - replace(buffer,"/*$PUBLIC_FUNCTIONS$*/",declBuild); + tqreplace(buffer,"/*$PUBLIC_FUNCTIONS$*/",declBuild); } } if (slitem->m_access=="protected") @@ -424,12 +424,12 @@ void SubclassingDlg::accept() if (!slitem->m_isFunc) { declBuild += spacer.fill(' ',46-declBuild.length()) + slitem->m_methodName + ";"; - replace(buffer,"/*$PROTECTED_SLOTS$*/",declBuild); + tqreplace(buffer,"/*$PROTECTED_SLOTS$*/",declBuild); } else { declBuild += spacer.fill(' ',50-declBuild.length()) + slitem->m_methodName + ";"; - replace(buffer,"/*$PROTECTED_FUNCTIONS$*/",declBuild); + tqreplace(buffer,"/*$PROTECTED_FUNCTIONS$*/",declBuild); } } } @@ -458,7 +458,7 @@ void SubclassingDlg::accept() "/*$SPECIALIZATION$*/\n" "$RETURNTYPE$ $NEWCLASS$::$METHOD$\n" "{\n" - " $QTBASECLASS$::$METHOD$;\n" + " $TQTBASECLASS$::$METHOD$;\n" "}\n"; @@ -473,10 +473,10 @@ void SubclassingDlg::accept() TQFileInfo fi(m_filename + ".cpp"); TQString module = fi.baseName(); TQString basefilename = fi.baseName(true); - buffer.replace(TQRegExp("\\$MODULE\\$"),module); - buffer.replace(TQRegExp("\\$FILENAME\\$"),basefilename); + buffer.tqreplace(TQRegExp("\\$MODULE\\$"),module); + buffer.tqreplace(TQRegExp("\\$FILENAME\\$"),basefilename); if ( (m_cppSupport->project()) && (m_cppSupport->project()->options() & KDevProject::UsesAutotoolsBuildSystem)) - buffer += "\n#include \"$NEWFILENAMELC$.moc\"\n"; + buffer += "\n#include \"$NEWFILENAMELC$.tqmoc\"\n"; } else loadBuffer(buffer,m_filename+".cpp"); @@ -489,11 +489,11 @@ void SubclassingDlg::accept() slitem->m_alreadyInSubclass) continue; TQString impl = slitem->m_callBaseClass ? implementation_callbase : implementation; - replace(impl,"$RETURNTYPE$",slitem->m_returnType); - replace(impl,"$NEWCLASS$",m_edClassName->text()); - replace(impl,"$METHOD$", slitem->m_methodName); - replace(impl,"$QTBASECLASS$", m_qtBaseClassName); - replace(buffer,"/*$SPECIALIZATION$*/",impl); + tqreplace(impl,"$RETURNTYPE$",slitem->m_returnType); + tqreplace(impl,"$NEWCLASS$",m_edClassName->text()); + tqreplace(impl,"$METHOD$", slitem->m_methodName); + tqreplace(impl,"$TQTBASECLASS$", m_qtBaseClassName); + tqreplace(buffer,"/*$SPECIALIZATION$*/",impl); } if (reformat_box->isChecked()) |