diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/abbrev | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-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 'parts/abbrev')
-rw-r--r-- | parts/abbrev/abbrevconfigwidget.cpp | 4 | ||||
-rw-r--r-- | parts/abbrev/abbrevconfigwidget.h | 3 | ||||
-rw-r--r-- | parts/abbrev/abbrevconfigwidgetbase.ui | 30 | ||||
-rw-r--r-- | parts/abbrev/abbrevpart.cpp | 36 | ||||
-rw-r--r-- | parts/abbrev/abbrevpart.h | 3 | ||||
-rw-r--r-- | parts/abbrev/addtemplatedlg.cpp | 4 | ||||
-rw-r--r-- | parts/abbrev/addtemplatedlg.h | 3 | ||||
-rw-r--r-- | parts/abbrev/addtemplatedlgbase.ui | 24 | ||||
-rw-r--r-- | parts/abbrev/cpp_keywords | 6 |
9 files changed, 58 insertions, 55 deletions
diff --git a/parts/abbrev/abbrevconfigwidget.cpp b/parts/abbrev/abbrevconfigwidget.cpp index 6e174603..675145b5 100644 --- a/parts/abbrev/abbrevconfigwidget.cpp +++ b/parts/abbrev/abbrevconfigwidget.cpp @@ -25,8 +25,8 @@ #include "addtemplatedlg.h" #include "abbrevpart.h" -AbbrevConfigWidget::AbbrevConfigWidget(AbbrevPart *part, TQWidget *parent, const char *name) - : AbbrevConfigWidgetBase(parent, name) +AbbrevConfigWidget::AbbrevConfigWidget(AbbrevPart *part, TQWidget *tqparent, const char *name) + : AbbrevConfigWidgetBase(tqparent, name) { m_part = part; diff --git a/parts/abbrev/abbrevconfigwidget.h b/parts/abbrev/abbrevconfigwidget.h index 818aa3ba..514c53c4 100644 --- a/parts/abbrev/abbrevconfigwidget.h +++ b/parts/abbrev/abbrevconfigwidget.h @@ -23,9 +23,10 @@ class AbbrevConfigWidget : public AbbrevConfigWidgetBase { Q_OBJECT + TQ_OBJECT public: - AbbrevConfigWidget(AbbrevPart *part, TQWidget *parent=0, const char *name=0); + AbbrevConfigWidget(AbbrevPart *part, TQWidget *tqparent=0, const char *name=0); ~AbbrevConfigWidget(); public slots: diff --git a/parts/abbrev/abbrevconfigwidgetbase.ui b/parts/abbrev/abbrevconfigwidgetbase.ui index fd432a3e..15bf9940 100644 --- a/parts/abbrev/abbrevconfigwidgetbase.ui +++ b/parts/abbrev/abbrevconfigwidgetbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>AbbrevConfigWidgetBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>abbrev_config_widget</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -30,12 +30,12 @@ <cstring>editCode</cstring> </property> </widget> - <widget class="QMultiLineEdit" row="3" column="0"> + <widget class="TQMultiLineEdit" row="3" column="0"> <property name="name"> <cstring>editCode</cstring> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>checkWordCompletion</cstring> </property> @@ -43,15 +43,15 @@ <string>&Enable automatic word completion</string> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="2" column="1"> + <widget class="TQPushButton" row="2" column="1"> <property name="name"> <cstring>buttonRemoveTemplate</cstring> </property> @@ -59,7 +59,7 @@ <string>&Remove</string> </property> </widget> - <widget class="QListView" row="1" column="0" rowspan="3" colspan="1"> + <widget class="TQListView" row="1" column="0" rowspan="3" colspan="1"> <column> <property name="text"> <string>Template</string> @@ -103,7 +103,7 @@ <enum>AllColumns</enum> </property> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>buttonAddTemplate</cstring> </property> @@ -111,7 +111,7 @@ <string>&Add...</string> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -132,7 +132,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> @@ -179,12 +179,12 @@ <includes> <include location="global" impldecl="in implementation">kdialog.h</include> </includes> -<slots> +<Q_SLOTS> <slot access="protected">addTemplate()</slot> <slot access="protected">codeChanged()</slot> <slot access="protected">removeTemplate()</slot> <slot access="protected">selectionChanged()</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> diff --git a/parts/abbrev/abbrevpart.cpp b/parts/abbrev/abbrevpart.cpp index a86d98f8..33660069 100644 --- a/parts/abbrev/abbrevpart.cpp +++ b/parts/abbrev/abbrevpart.cpp @@ -65,8 +65,8 @@ public: K_EXPORT_COMPONENT_FACTORY( libkdevabbrev, AbbrevFactory ) -AbbrevPart::AbbrevPart(TQObject *parent, const char *name, const TQStringList &) - : KDevPlugin(&data, parent, name ? name : "AbbrevPart") +AbbrevPart::AbbrevPart(TQObject *tqparent, const char *name, const TQStringList &) + : KDevPlugin(&data, tqparent, name ? name : "AbbrevPart") { setInstance(AbbrevFactory::instance()); setXMLFile("kdevabbrev.rc"); @@ -158,17 +158,17 @@ void AbbrevPart::load() if (TQFileInfo(localTemplatesFile).exists()) files << localTemplatesFile; else - files = dirs->findAllResources("codetemplates", TQString::null, false, true); + files = dirs->findAllResources("codetemplates", TQString(), false, true); TQString localSourcesFile = locateLocal("sources", "sources", AbbrevFactory::instance()); TQStringList sourceFiles; if (TQFileInfo(localSourcesFile).exists()) sourceFiles << localSourcesFile; else - sourceFiles = dirs->findAllResources("sources", TQString::null, false, true); + sourceFiles = dirs->findAllResources("sources", TQString(), false, true); kdDebug(9028) << "=========> sourceFiles: " << sourceFiles.join(" ") << endl; - this->m_completionFile = TQString::null; + this->m_completionFile = TQString(); for( TQStringList::Iterator it=sourceFiles.begin(); it!=sourceFiles.end(); ++it ) { TQString fn = *it; kdDebug(9028) << "===> load file: " << fn << endl; @@ -284,7 +284,7 @@ TQValueList<KTextEditor::CompletionEntry> AbbrevPart::findAllWords(const TQStrin } TQString suffix = part->url().url(); - int pos = suffix.findRev('.'); + int pos = suffix.tqfindRev('.'); if (pos != -1) suffix.remove(0, pos+1); kdDebug(9028) << "AbbrevPart::findAllWords with suffix " << suffix << endl; @@ -298,7 +298,7 @@ TQValueList<KTextEditor::CompletionEntry> AbbrevPart::findAllWords(const TQStrin while ( (pos = rx.search(text, idx)) != -1 ) { len = rx.matchedLength(); TQString word = text.mid(pos, len); - if (map.find(word) == map.end()) { + if (map.tqfind(word) == map.end()) { KTextEditor::CompletionEntry e; e.text = word; entries << e; @@ -313,7 +313,7 @@ TQValueList<KTextEditor::CompletionEntry> AbbrevPart::findAllWords(const TQStrin while ( (pos = rx.search(m_completionFile, idx)) != -1 ) { len = rx.matchedLength(); TQString word = m_completionFile.mid(pos, len); - if (map.find(word) == map.end()) { + if (map.tqfind(word) == map.end()) { KTextEditor::CompletionEntry e; e.text = word; entries << e; @@ -345,7 +345,7 @@ void AbbrevPart::slotExpandAbbrev() } TQString suffix = part->url().url(); - int pos = suffix.findRev('.'); + int pos = suffix.tqfindRev('.'); if (pos != -1) suffix.remove(0, pos+1); @@ -374,7 +374,7 @@ void AbbrevPart::slotExpandAbbrev() cursoriface->cursorPositionReal(&line, &col); TQString linestr = editIface->textLine(line); - int startPos = QMAX( QMIN( (int)col, (int)linestr.length()-1 ), 0 ); + int startPos = TQMAX( TQMIN( (int)col, (int)linestr.length()-1 ), 0 ); int endPos = startPos; startPos--; while (startPos >= 0 && ( linestr[startPos].isLetterOrNumber() || linestr[startPos] == '_' || linestr[startPos] == '~') ) @@ -417,7 +417,7 @@ void AbbrevPart::insertChars( const TQString &chars ) currentCol += spaces.length(); } - int idx = lineText.find( '|' ); + int idx = lineText.tqfind( '|' ); if( idx != -1 ){ stream << lineText.left( idx ) << lineText.mid( idx+1 ); if( !foundPipe ){ @@ -562,7 +562,7 @@ void AbbrevPart::slotFilterInsertString( KTextEditor::CompletionEntry* entry, TQ } TQString suffix = part->url().url(); - int pos = suffix.findRev('.'); + int pos = suffix.tqfindRev('.'); if (pos != -1) suffix.remove(0, pos+1); kdDebug(9028) << "AbbrevPart::slotFilterInsertString with suffix " << suffix << endl; @@ -621,9 +621,9 @@ TQMap< TQString, CodeTemplate * > CodeTemplateList::operator [ ]( TQString suffi for (TQMap<TQString, TQMap<TQString, CodeTemplate* > >::const_iterator it = templates.begin(); it != templates.end(); ++it) { kdDebug(9028) << "CodeTemplateList::operator [] - suffixes " << it.key() << endl; - if (TQStringList::split(",", it.key()).contains(suffix)) + if (TQStringList::split(",", it.key()).tqcontains(suffix)) { - kdDebug(9028) << "CodeTemplateList::operator [] - suffixes " << it.key() << " contains " << suffix << endl; + kdDebug(9028) << "CodeTemplateList::operator [] - suffixes " << it.key() << " tqcontains " << suffix << endl; TQMap<TQString, CodeTemplate* > m = it.data(); for (TQMap<TQString, CodeTemplate* >::const_iterator itt = m.begin(); itt != m.end(); ++itt) @@ -640,18 +640,18 @@ void CodeTemplateList::insert( TQString name, TQString description, TQString cod { TQString origSuffixes = suffixes; // TQStringList suffixList; - int pos = suffixes.find('('); + int pos = suffixes.tqfind('('); if (pos == -1) return; suffixes.remove(0, pos+1); - pos = suffixes.find(')'); + pos = suffixes.tqfind(')'); if (pos == -1) return; suffixes.remove(pos, suffixes.length()-pos); // suffixList = TQStringList::split(",", suffixes); CodeTemplate *t; - if (templates.contains(suffixes) && templates[suffixes].contains(name)) + if (templates.tqcontains(suffixes) && templates[suffixes].tqcontains(name)) { kdDebug(9028) << "found template for suffixes " << suffixes << " and name " << name << endl; t = templates[suffixes][name]; @@ -667,7 +667,7 @@ void CodeTemplateList::insert( TQString name, TQString description, TQString cod t->description = description; t->code = code; t->suffixes = origSuffixes; - if (!m_suffixes.contains(origSuffixes)) + if (!m_suffixes.tqcontains(origSuffixes)) m_suffixes.append(origSuffixes); } diff --git a/parts/abbrev/abbrevpart.h b/parts/abbrev/abbrevpart.h index d1c1bc7c..566e7896 100644 --- a/parts/abbrev/abbrevpart.h +++ b/parts/abbrev/abbrevpart.h @@ -63,9 +63,10 @@ private: class AbbrevPart : public KDevPlugin { Q_OBJECT + TQ_OBJECT public: - AbbrevPart( TQObject *parent, const char *name, const TQStringList & ); + AbbrevPart( TQObject *tqparent, const char *name, const TQStringList & ); ~AbbrevPart(); bool autoWordCompletionEnabled() const; diff --git a/parts/abbrev/addtemplatedlg.cpp b/parts/abbrev/addtemplatedlg.cpp index a837c08a..6be8c703 100644 --- a/parts/abbrev/addtemplatedlg.cpp +++ b/parts/abbrev/addtemplatedlg.cpp @@ -22,8 +22,8 @@ #include <klineedit.h> #include <tqpushbutton.h> -AddTemplateDialog::AddTemplateDialog( TQStringList suffixesList, TQWidget *parent, const char *name ) - : AddTemplateDialogBase( parent, name ) +AddTemplateDialog::AddTemplateDialog( TQStringList suffixesList, TQWidget *tqparent, const char *name ) + : AddTemplateDialogBase( tqparent, name ) { setFocusProxy( editTemplate ); comboSuffixes->insertStringList(suffixesList); diff --git a/parts/abbrev/addtemplatedlg.h b/parts/abbrev/addtemplatedlg.h index 64bcc24e..04298214 100644 --- a/parts/abbrev/addtemplatedlg.h +++ b/parts/abbrev/addtemplatedlg.h @@ -26,9 +26,10 @@ class AddTemplateDialog: public AddTemplateDialogBase { Q_OBJECT + TQ_OBJECT public: - AddTemplateDialog( TQStringList suffixesList, TQWidget *parent=0, const char *name=0 ); + AddTemplateDialog( TQStringList suffixesList, TQWidget *tqparent=0, const char *name=0 ); virtual ~AddTemplateDialog(); TQString templ() const; diff --git a/parts/abbrev/addtemplatedlgbase.ui b/parts/abbrev/addtemplatedlgbase.ui index bfe5f0bb..93e72d4b 100644 --- a/parts/abbrev/addtemplatedlgbase.ui +++ b/parts/abbrev/addtemplatedlgbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>AddTemplateDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>AddTemplateDialog</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -43,14 +43,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -64,7 +64,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -77,7 +77,7 @@ </widget> </hbox> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -88,7 +88,7 @@ <cstring>editTemplate</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel4</cstring> </property> @@ -119,19 +119,19 @@ <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>10</height> </size> </property> </spacer> - <widget class="QComboBox" row="2" column="1"> + <widget class="TQComboBox" row="2" column="1"> <property name="name"> <cstring>comboSuffixes</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>labelSuffixes</cstring> </property> @@ -168,8 +168,8 @@ <includes> <include location="global" impldecl="in implementation">kdialog.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>klineedit.h</includehint> </includehints> diff --git a/parts/abbrev/cpp_keywords b/parts/abbrev/cpp_keywords index 72d96901..e84d0cf1 100644 --- a/parts/abbrev/cpp_keywords +++ b/parts/abbrev/cpp_keywords @@ -1,9 +1,9 @@ K_DCOP k_dcop -k_dcop_signals +k_dcop_Q_SIGNALS Q_OBJECT -signals -slots +Q_SIGNALS +Q_SLOTS emit __int64 __asm__ |