From 48d4a26399959121f33d2bc3bfe51c7827b654fc Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 14 Jun 2011 16:45:05 +0000 Subject: 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 --- src/profileengine/editor/addprofilewidget.ui | 24 ++++---- src/profileengine/editor/profileeditor.cpp | 44 +++++++------- src/profileengine/editor/profileeditor.h | 3 +- src/profileengine/editor/profileeditorbase.ui | 86 +++++++++++++-------------- 4 files changed, 79 insertions(+), 78 deletions(-) (limited to 'src/profileengine/editor') diff --git a/src/profileengine/editor/addprofilewidget.ui b/src/profileengine/editor/addprofilewidget.ui index 56a46f1d..dccb234e 100644 --- a/src/profileengine/editor/addprofilewidget.ui +++ b/src/profileengine/editor/addprofilewidget.ui @@ -1,6 +1,6 @@ AddProfileWidget - + AddProfileWidget @@ -19,9 +19,9 @@ unnamed - + - layout6 + tqlayout6 @@ -33,7 +33,7 @@ 0 - + textLabel1 @@ -51,9 +51,9 @@ - + - layout7 + tqlayout7 @@ -65,7 +65,7 @@ 0 - + textLabel2 @@ -83,9 +83,9 @@ - + - layout8 + tqlayout8 @@ -97,7 +97,7 @@ 0 - + textLabel3 @@ -108,7 +108,7 @@ descriptionEdit - + descriptionEdit @@ -117,5 +117,5 @@ - + diff --git a/src/profileengine/editor/profileeditor.cpp b/src/profileengine/editor/profileeditor.cpp index 903403de..0e3fb5d4 100644 --- a/src/profileengine/editor/profileeditor.cpp +++ b/src/profileengine/editor/profileeditor.cpp @@ -40,15 +40,15 @@ class ProfileItem: public KListViewItem { public: - ProfileItem(KListView *parent, Profile *profile) - :KListViewItem(parent), m_profile(profile) + ProfileItem(KListView *tqparent, Profile *profile) + :KListViewItem(tqparent), m_profile(profile) { setText(0, profile->genericName()); setText(1, profile->description()); } - ProfileItem(KListViewItem *parent, Profile *profile) - : KListViewItem(parent), m_profile(profile) + ProfileItem(KListViewItem *tqparent, Profile *profile) + : KListViewItem(tqparent), m_profile(profile) { setText(0, profile->genericName()); setText(1, profile->description()); @@ -62,19 +62,19 @@ private: class EDListItem: public KListViewItem{ public: - EDListItem(KListView *parent, const TQString &text, bool derived) - : KListViewItem(parent, text), m_derived(derived) + EDListItem(KListView *tqparent, const TQString &text, bool derived) + : KListViewItem(tqparent, text), m_derived(derived) { } bool isDerived() const { return m_derived; } - virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { TQColorGroup cgNew = cg; if (m_derived) cgNew.setColor(TQColorGroup::Text, KGlobalSettings::inactiveTextColor()); - KListViewItem::paintCell(p, cgNew, column, width, alignment); + KListViewItem::paintCell(p, cgNew, column, width, tqalignment); } private: @@ -84,16 +84,16 @@ private: class ProfileListBuilding { public: - ProfileItem * operator() (ProfileItem *parent, Profile *profile) + ProfileItem * operator() (ProfileItem *tqparent, Profile *profile) { - parent->setOpen(true); - return new ProfileItem(parent, profile); + tqparent->setOpen(true); + return new ProfileItem(tqparent, profile); } }; -ProfileEditor::ProfileEditor(TQWidget *parent, const char *name) - :ProfileEditorBase(parent, name) +ProfileEditor::ProfileEditor(TQWidget *tqparent, const char *name) + :ProfileEditorBase(tqparent, name) { refresh(); } @@ -115,14 +115,14 @@ void ProfileEditor::refresh() void ProfileEditor::refreshPropertyCombo() { - KTrader::OfferList list = KTrader::self()->query(TQString::fromLatin1("KDevelop/Plugin")); + KTrader::OfferList list = KTrader::self()->query(TQString::tqfromLatin1("KDevelop/Plugin")); TQStringList props; for (KTrader::OfferList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it) { TQStringList currProps = (*it)->property("X-KDevelop-Properties").toStringList(); for (TQStringList::const_iterator p = currProps.constBegin(); p != currProps.constEnd(); ++p) - if (!props.contains(*p)) + if (!props.tqcontains(*p)) props.append(*p); } props.sort(); @@ -258,7 +258,7 @@ void ProfileEditor::removeProfile() if (profile->remove()) { TQListViewItem *item = profilesList->currentItem(); - profilesList->setCurrentItem(item->parent()); + profilesList->setCurrentItem(item->tqparent()); profile->detachFromParent(); delete profile; delete item; @@ -271,8 +271,8 @@ void ProfileEditor::removeProfile() void ProfileEditor::addProperty() { if ( (!propertyCombo->currentText().isEmpty()) && - (ownPropertiesBox->findItem(propertyCombo->currentText()) == 0) && - (derivedPropertiesBox->findItem(propertyCombo->currentText()) == 0) ) + (ownPropertiesBox->tqfindItem(propertyCombo->currentText()) == 0) && + (derivedPropertiesBox->tqfindItem(propertyCombo->currentText()) == 0) ) { ownPropertiesBox->insertItem(propertyCombo->currentText()); @@ -322,9 +322,9 @@ void ProfileEditor::addEnabled() text = allList->currentItem()->text(0); } - if (enabledList->findItem(text, 0) != 0) + if (enabledList->tqfindItem(text, 0) != 0) return; - if (disabledList->findItem(text, 0) != 0) + if (disabledList->tqfindItem(text, 0) != 0) { KMessageBox::error(this, i18n("This plugin is already contained in the list of disabled plugins."), i18n("Enable Plugin")); @@ -368,9 +368,9 @@ void ProfileEditor::addDisabled() text = allList->currentItem()->text(0); } - if (disabledList->findItem(text, 0) != 0) + if (disabledList->tqfindItem(text, 0) != 0) return; - if (enabledList->findItem(text, 0) != 0) + if (enabledList->tqfindItem(text, 0) != 0) { KMessageBox::error(this, i18n("This plugin is already contained in the list of enabled plugins."), i18n("Disable Plugin")); diff --git a/src/profileengine/editor/profileeditor.h b/src/profileengine/editor/profileeditor.h index 182195f4..aae785b1 100644 --- a/src/profileengine/editor/profileeditor.h +++ b/src/profileengine/editor/profileeditor.h @@ -29,8 +29,9 @@ class KListViewItem; class ProfileEditor : public ProfileEditorBase { Q_OBJECT + TQ_OBJECT public: - ProfileEditor(TQWidget *parent = 0, const char *name = 0); + ProfileEditor(TQWidget *tqparent = 0, const char *name = 0); public slots: virtual void removeProperty(); diff --git a/src/profileengine/editor/profileeditorbase.ui b/src/profileengine/editor/profileeditorbase.ui index e91fd13d..094eeffd 100644 --- a/src/profileengine/editor/profileeditorbase.ui +++ b/src/profileengine/editor/profileeditorbase.ui @@ -1,6 +1,6 @@ ProfileEditorBase - + ProfileEditorBase @@ -19,18 +19,18 @@ unnamed - + splitter2 Vertical - + widgetStack1 - + WStackPage @@ -47,9 +47,9 @@ 0 - + - layout11 + tqlayout11 @@ -73,7 +73,7 @@ Expanding - + 20 142 @@ -137,11 +137,11 @@ - + tabWidget2 - + tab @@ -190,9 +190,9 @@ Remove - + - layout7 + tqlayout7 @@ -204,7 +204,7 @@ 0 - + textLabel1 @@ -219,9 +219,9 @@ - + - layout8 + tqlayout8 @@ -233,7 +233,7 @@ 0 - + textLabel1_2 @@ -250,7 +250,7 @@ - + tab @@ -261,9 +261,9 @@ unnamed - + - layout5 + tqlayout5 @@ -275,7 +275,7 @@ 0 - + textLabel2 @@ -301,9 +301,9 @@ - + - layout6 + tqlayout6 @@ -315,7 +315,7 @@ 0 - + textLabel2_2 @@ -359,7 +359,7 @@ Expanding - + 20 16 @@ -376,7 +376,7 @@ Expanding - + 20 16 @@ -401,16 +401,16 @@ Expanding - + 20 16 - + - layout10 + tqlayout10 @@ -422,7 +422,7 @@ 0 - + textLabel2_3 @@ -474,7 +474,7 @@ Expanding - + 20 16 @@ -499,7 +499,7 @@ - + TabPage @@ -560,15 +560,15 @@ profilesList - currentChanged(QListViewItem*) + currentChanged(TQListViewItem*) ProfileEditorBase - profileExecuted(QListViewItem*) + profileExecuted(TQListViewItem*) ownPropertiesBox - currentChanged(QListBoxItem*) + currentChanged(TQListBoxItem*) ProfileEditorBase - propertyExecuted(QListBoxItem*) + propertyExecuted(TQListBoxItem*) addProfileButton @@ -596,15 +596,15 @@ profilesList - executed(QListViewItem*) + executed(TQListViewItem*) ProfileEditorBase - profileExecuted(QListViewItem*) + profileExecuted(TQListViewItem*) profilesList - selectionChanged(QListViewItem*) + selectionChanged(TQListViewItem*) ProfileEditorBase - profileExecuted(QListViewItem*) + profileExecuted(TQListViewItem*) addEnabledButton @@ -645,9 +645,9 @@ disabledList pluginsView - - profileExecuted(QListViewItem *item) - propertyExecuted(QListBoxItem *item) + + profileExecuted(TQListViewItem *item) + propertyExecuted(TQListBoxItem *item) addProfile() removeProfile() addProperty() @@ -656,8 +656,8 @@ delEnabled() addDisabled() delDisabled() - - + + kpushbutton.h klistview.h -- cgit v1.2.1