summaryrefslogtreecommitdiffstats
path: root/languages/kjssupport
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
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')
-rw-r--r--languages/kjssupport/jscodecompletion.cpp4
-rw-r--r--languages/kjssupport/jscodecompletion.h5
-rw-r--r--languages/kjssupport/kjsproblems.cpp10
-rw-r--r--languages/kjssupport/kjsproblems.h3
-rw-r--r--languages/kjssupport/kjssupport_part.cpp12
-rw-r--r--languages/kjssupport/kjssupport_part.h3
-rw-r--r--languages/kjssupport/subclassingdlg.cpp70
-rw-r--r--languages/kjssupport/subclassingdlg.h10
-rw-r--r--languages/kjssupport/subclassingdlgbase.ui36
9 files changed, 78 insertions, 75 deletions
diff --git a/languages/kjssupport/jscodecompletion.cpp b/languages/kjssupport/jscodecompletion.cpp
index 5717858a..6d290532 100644
--- a/languages/kjssupport/jscodecompletion.cpp
+++ b/languages/kjssupport/jscodecompletion.cpp
@@ -37,8 +37,8 @@
#include <kdevelop/domutil.h>
#include <kdevelop/codemodel.h>
-JSCodeCompletion::JSCodeCompletion(TQObject *parent, const char *name)
- : TQObject(parent, name)
+JSCodeCompletion::JSCodeCompletion(TQObject *tqparent, const char *name)
+ : TQObject(tqparent, name)
{
m_argWidgetShow = false;
m_completionBoxShow=false;
diff --git a/languages/kjssupport/jscodecompletion.h b/languages/kjssupport/jscodecompletion.h
index 03247917..4586836f 100644
--- a/languages/kjssupport/jscodecompletion.h
+++ b/languages/kjssupport/jscodecompletion.h
@@ -26,11 +26,12 @@ The code completion engine for Javascript.
@author ian reinhart geiser
*/
-class JSCodeCompletion : public QObject
+class JSCodeCompletion : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- JSCodeCompletion(TQObject *parent = 0, const char *name = 0);
+ JSCodeCompletion(TQObject *tqparent = 0, const char *name = 0);
~JSCodeCompletion();
void setActiveEditorPart(KParts::Part* editorPart);
diff --git a/languages/kjssupport/kjsproblems.cpp b/languages/kjssupport/kjsproblems.cpp
index 31882e7c..318ff44e 100644
--- a/languages/kjssupport/kjsproblems.cpp
+++ b/languages/kjssupport/kjsproblems.cpp
@@ -23,14 +23,14 @@
class KJSProblemItem: public KListViewItem
{
public:
- KJSProblemItem( TQListView* parent, const TQString& level, const TQString& problem,
+ KJSProblemItem( TQListView* tqparent, const TQString& level, const TQString& problem,
const TQString& file, const TQString& line, const TQString& column )
- : KListViewItem( parent, level, problem, file, line, column )
+ : KListViewItem( tqparent, level, problem, file, line, column )
{}
- KJSProblemItem( TQListViewItem* parent, const TQString& level, const TQString& problem,
+ KJSProblemItem( TQListViewItem* tqparent, const TQString& level, const TQString& problem,
const TQString& file, const TQString& line, const TQString& column )
- : KListViewItem( parent, level, problem, file, line, column )
+ : KListViewItem( tqparent, level, problem, file, line, column )
{}
int compare( TQListViewItem* item, int column, bool ascending ) const
@@ -48,7 +48,7 @@ class KJSProblemItem: public KListViewItem
};
-KJSProblems::KJSProblems(kjsSupportPart *part, TQWidget *parent, const char *name) : KListView(parent,name), m_part(part)
+KJSProblems::KJSProblems(kjsSupportPart *part, TQWidget *tqparent, const char *name) : KListView(tqparent,name), m_part(part)
{
addColumn ("File");
addColumn ("Line #");
diff --git a/languages/kjssupport/kjsproblems.h b/languages/kjssupport/kjsproblems.h
index 7ca0d3ee..8c5d37a1 100644
--- a/languages/kjssupport/kjsproblems.h
+++ b/languages/kjssupport/kjsproblems.h
@@ -28,9 +28,10 @@ class kjsSupportPart;
class KJSProblems : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KJSProblems(kjsSupportPart *part, TQWidget *parent = 0L, const char *name = 0L);
+ KJSProblems(kjsSupportPart *part, TQWidget *tqparent = 0L, const char *name = 0L);
~KJSProblems();
void clearItems();
diff --git a/languages/kjssupport/kjssupport_part.cpp b/languages/kjssupport/kjssupport_part.cpp
index dcb8c1e3..8f6afda3 100644
--- a/languages/kjssupport/kjssupport_part.cpp
+++ b/languages/kjssupport/kjssupport_part.cpp
@@ -62,8 +62,8 @@ class typeProperty
int depth;
};
-kjsSupportPart::kjsSupportPart(TQObject *parent, const char *name, const TQStringList& )
-: KDevLanguageSupport(&data, parent, name ? name : "kjsSupportPart" )
+kjsSupportPart::kjsSupportPart(TQObject *tqparent, const char *name, const TQStringList& )
+: KDevLanguageSupport(&data, tqparent, name ? name : "kjsSupportPart" )
{
setInstance(kjsSupportFactory::instance());
setXMLFile("kdevkjssupport.rc");
@@ -157,7 +157,7 @@ void kjsSupportPart::savedFile(const TQString &fileName)
{
- if (project()->allFiles().contains(fileName.mid ( project()->projectDirectory().length() + 1 )))
+ if (project()->allFiles().tqcontains(fileName.mid ( project()->projectDirectory().length() + 1 )))
{
kdDebug(9014) << "parse file " << fileName << endl;
parse( fileName );
@@ -326,10 +326,10 @@ void kjsSupportPart::parse(const TQString &fileName)
m_problemReporter->addLine(m_file->fileName(), lineNo, errorMessage.qstring());
}
- if( line.contains("{") )
+ if( line.tqcontains("{") )
++depth;
- if( line.contains("}") )
+ if( line.tqcontains("}") )
--depth;
++lineNo;
@@ -429,7 +429,7 @@ void kjsSupportPart::contextMenu(TQPopupMenu * popupMenu, const Context *context
int id = popupMenu->insertItem(i18n("Implement Slots"),
this, TQT_SLOT(implementSlots()));
else
- m_selectedUI = TQString::null;
+ m_selectedUI = TQString();
}
void kjsSupportPart::implementSlots()
diff --git a/languages/kjssupport/kjssupport_part.h b/languages/kjssupport/kjssupport_part.h
index 5e7ccdfc..3ea2b5da 100644
--- a/languages/kjssupport/kjssupport_part.h
+++ b/languages/kjssupport/kjssupport_part.h
@@ -46,8 +46,9 @@ class typeProperty;
class kjsSupportPart : public KDevLanguageSupport
{
Q_OBJECT
+ TQ_OBJECT
public:
- kjsSupportPart(TQObject *parent, const char *name, const TQStringList &);
+ kjsSupportPart(TQObject *tqparent, const char *name, const TQStringList &);
~kjsSupportPart();
protected:
virtual Features features();
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;
diff --git a/languages/kjssupport/subclassingdlg.h b/languages/kjssupport/subclassingdlg.h
index 7d168ec0..c3573643 100644
--- a/languages/kjssupport/subclassingdlg.h
+++ b/languages/kjssupport/subclassingdlg.h
@@ -20,10 +20,10 @@ class TQStringList;
class TQDomDocument;
class kjsSupportPart;
-class SlotItem : public QCheckListItem
+class SlotItem : public TQCheckListItem
{
public:
- SlotItem(TQListView *parent,const TQString &text,
+ SlotItem(TQListView *tqparent,const TQString &text,
const TQString &specifier, const TQString &Access,
const TQString &returnType,bool isFunc,
bool callBaseClass=false);
@@ -42,10 +42,10 @@ class SubclassingDlg : public SubclassingDlgBase
{
public:
SubclassingDlg(kjsSupportPart* kjsSupport, const TQString &formFile,TQStringList &newFileNames,
- TQWidget* parent = 0, const char* name = 0,
+ TQWidget* tqparent = 0, const char* name = 0,
bool modal = FALSE, WFlags fl = 0 );
/* SubclassingDlg(CppSupportPart* kjsSupport, const TQString &formFile,const TQString &filename,TQStringList &dummy,
- TQWidget* parent = 0, const char* name = 0,
+ TQWidget* tqparent = 0, const char* name = 0,
bool modal = FALSE, WFlags fl = 0 );*/
~SubclassingDlg();
@@ -54,7 +54,7 @@ private:
TQString readBaseClassName();
void updateDlg();
bool replaceKeywords(TQString &buffer, bool canBeModal=true);
- void replace(TQString &string, const TQString& search, const TQString& replace);
+ void tqreplace(TQString &string, const TQString& search, const TQString& tqreplace);
bool saveBuffer(TQString &buffer, const TQString& filename);
bool loadBuffer(TQString &buffer, const TQString& filename);
bool alreadyInSubclass(const TQString &method);
diff --git a/languages/kjssupport/subclassingdlgbase.ui b/languages/kjssupport/subclassingdlgbase.ui
index fea5ef6d..711250bd 100644
--- a/languages/kjssupport/subclassingdlgbase.ui
+++ b/languages/kjssupport/subclassingdlgbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>SubclassingDlgBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>SubclassingDlgBase</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="3">
+ <widget class="TQGroupBox" row="0" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -30,7 +30,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>reformat_box</cstring>
</property>
@@ -38,7 +38,7 @@
<string>Re&amp;format source</string>
</property>
</widget>
- <widget class="QCheckBox" row="4" column="2">
+ <widget class="TQCheckBox" row="4" column="2">
<property name="name">
<cstring>reformatDefault_box</cstring>
</property>
@@ -54,7 +54,7 @@
<string>Reformat source by &amp;default</string>
</property>
</widget>
- <widget class="QListView" row="3" column="0" rowspan="1" colspan="3">
+ <widget class="TQListView" row="3" column="0" rowspan="1" colspan="3">
<column>
<property name="text">
<string>Method</string>
@@ -114,23 +114,23 @@
<cstring>m_slotView</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="0" rowspan="1" colspan="3">
+ <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
- <string>&amp;Specialize following slots:</string>
+ <string>&amp;Specialize following Q_SLOTS:</string>
</property>
<property name="buddy" stdset="0">
<cstring>m_slotView</cstring>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="2">
+ <widget class="TQLineEdit" row="1" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>m_edFileName</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -149,7 +149,7 @@
<cstring>m_edFileName</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -168,14 +168,14 @@
<cstring>m_edClassName</cstring>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="2">
+ <widget class="TQLineEdit" row="0" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>m_edClassName</cstring>
</property>
</widget>
</grid>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>m_btnOk</cstring>
</property>
@@ -186,7 +186,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton" row="1" column="2">
+ <widget class="TQPushButton" row="1" column="2">
<property name="name">
<cstring>m_btnCancel</cstring>
</property>
@@ -204,7 +204,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>110</width>
<height>20</height>
@@ -245,9 +245,9 @@
<includes>
<include location="global" impldecl="in implementation">kdialog.h</include>
</includes>
-<slots>
+<Q_SLOTS>
<slot>onChangedClassName()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI>