summaryrefslogtreecommitdiffstats
path: root/languages/kjssupport/subclassingdlg.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /languages/kjssupport/subclassingdlg.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/kjssupport/subclassingdlg.cpp')
-rw-r--r--languages/kjssupport/subclassingdlg.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/languages/kjssupport/subclassingdlg.cpp b/languages/kjssupport/subclassingdlg.cpp
index 284d0471..c9393f00 100644
--- a/languages/kjssupport/subclassingdlg.cpp
+++ b/languages/kjssupport/subclassingdlg.cpp
@@ -53,11 +53,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,8 +94,8 @@ void SlotItem::setAllreadyInSubclass()
SubclassingDlg::SubclassingDlg(kjsSupportPart* kjsSupport, const TQString &formFile,TQStringList &newFileNames,
- 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(newFileNames), m_kjsSupport( kjsSupport )
//=================================================
{
@@ -116,8 +116,8 @@ m_newFileNames(newFileNames), m_kjsSupport( kjsSupport )
/*SubclassingDlg::SubclassingDlg(kjsSupportPart* kjsSupport, 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_kjsSupport( kjsSupport )
//=================================================
{
@@ -143,7 +143,7 @@ m_newFileNames(dummy), m_kjsSupport( kjsSupport )
for (ClassList::const_iterator classIt = myClasses.begin(); classIt != myClasses.end(); ++classIt)
{
kdDebug() << "base class " << baseClass << " class " << (*classIt)->name()
- << " parents " << (*classIt)->baseClassList().join(",") << endl;
+ << " tqparents " << (*classIt)->baseClassList().join(",") << endl;
if ( (*classIt)->baseClassList().findIndex(baseClass) != -1 )
{
kdDebug() << "base class matched " << endl;
@@ -165,7 +165,7 @@ m_newFileNames(dummy), m_kjsSupport( kjsSupport )
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;
}
@@ -188,13 +188,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);
@@ -211,7 +211,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);
@@ -293,15 +293,15 @@ 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());
}
}
@@ -324,23 +324,23 @@ 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,"$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,"$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;
@@ -397,8 +397,8 @@ void SubclassingDlg::accept()
TQFileInfo fi(m_filename + ".js");
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+".js");
@@ -419,11 +419,11 @@ void SubclassingDlg::accept()
slitem->m_alreadyInSubclass)
continue;
TQString impl = 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);
}
kdDebug() << buffer << endl;