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 --- languages/cpp/app_templates/kapp/app.cpp | 8 ++++---- languages/cpp/app_templates/kapp/app.h | 3 ++- languages/cpp/app_templates/kapp/appview.cpp | 6 +++--- languages/cpp/app_templates/kapp/appview.h | 3 ++- languages/cpp/app_templates/kapp/pref.cpp | 16 ++++++++-------- languages/cpp/app_templates/kapp/pref.h | 11 +++++++---- languages/cpp/app_templates/kapp/src-Makefile.am | 4 ++-- 7 files changed, 28 insertions(+), 23 deletions(-) (limited to 'languages/cpp/app_templates/kapp') diff --git a/languages/cpp/app_templates/kapp/app.cpp b/languages/cpp/app_templates/kapp/app.cpp index 6388f452..10046641 100644 --- a/languages/cpp/app_templates/kapp/app.cpp +++ b/languages/cpp/app_templates/kapp/app.cpp @@ -141,7 +141,7 @@ void %{APPNAME}::dragEnterEvent(TQDragEnterEvent *event) void %{APPNAME}::dropEvent(TQDropEvent *event) { // this is a very simplistic implementation of a drop event. we - // will only accept a dropped URL. the Qt dnd code can do *much* + // will only accept a dropped URL. the TQt dnd code can do *much* // much more, so please read the docs there KURL::List urls; @@ -173,10 +173,10 @@ void %{APPNAME}::fileOpen() // button is clicked /* // this brings up the generic open dialog - KURL url = KURLRequesterDlg::getURL(TQString::null, this, i18n("Open Location") ); + KURL url = KURLRequesterDlg::getURL(TQString(), this, i18n("Open Location") ); */ // standard filedialog - KURL url = KFileDialog::getOpenURL(TQString::null, TQString::null, this, i18n("Open Location")); + KURL url = KFileDialog::getOpenURL(TQString(), TQString(), this, i18n("Open Location")); if (!url.isEmpty()) m_view->openURL(url); } @@ -208,7 +208,7 @@ void %{APPNAME}::filePrint() if (!m_printer) m_printer = new KPrinter; if (m_printer->setup(this)) { - // setup the printer. with Qt, you always "print" to a + // setup the printer. with TQt, you always "print" to a // TQPainter.. whether the output medium is a pixmap, a screen, // or paper TQPainter p; diff --git a/languages/cpp/app_templates/kapp/app.h b/languages/cpp/app_templates/kapp/app.h index 1c92feb8..762d8791 100644 --- a/languages/cpp/app_templates/kapp/app.h +++ b/languages/cpp/app_templates/kapp/app.h @@ -26,6 +26,7 @@ class KURL; class %{APPNAME} : public KMainWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor @@ -44,7 +45,7 @@ public: protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ virtual void dragEnterEvent(TQDragEnterEvent *event); virtual void dropEvent(TQDropEvent *event); diff --git a/languages/cpp/app_templates/kapp/appview.cpp b/languages/cpp/app_templates/kapp/appview.cpp index 32afca2e..5b42a36a 100644 --- a/languages/cpp/app_templates/kapp/appview.cpp +++ b/languages/cpp/app_templates/kapp/appview.cpp @@ -13,11 +13,11 @@ #include #include -%{APPNAME}View::%{APPNAME}View(TQWidget *parent) - : TQWidget(parent), +%{APPNAME}View::%{APPNAME}View(TQWidget *tqparent) + : TQWidget(tqparent), DCOPObject("%{APPNAME}Iface") { - // setup our layout manager to automatically add our widgets + // setup our tqlayout manager to automatically add our widgets TQHBoxLayout *top_layout = new TQHBoxLayout(this); top_layout->setAutoAdd(true); diff --git a/languages/cpp/app_templates/kapp/appview.h b/languages/cpp/app_templates/kapp/appview.h index a4f0b2e6..2eab2322 100644 --- a/languages/cpp/app_templates/kapp/appview.h +++ b/languages/cpp/app_templates/kapp/appview.h @@ -24,11 +24,12 @@ class KURL; class %{APPNAME}View : public TQWidget, public %{APPNAME}Iface { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - %{APPNAME}View(TQWidget *parent); + %{APPNAME}View(TQWidget *tqparent); /** * Destructor diff --git a/languages/cpp/app_templates/kapp/pref.cpp b/languages/cpp/app_templates/kapp/pref.cpp index ff83190f..3d720a65 100644 --- a/languages/cpp/app_templates/kapp/pref.cpp +++ b/languages/cpp/app_templates/kapp/pref.cpp @@ -22,20 +22,20 @@ m_pageTwo = new %{APPNAME}PrefPageTwo(frame); } -%{APPNAME}PrefPageOne::%{APPNAME}PrefPageOne(TQWidget *parent) - : TQFrame(parent) +%{APPNAME}PrefPageOne::%{APPNAME}PrefPageOne(TQWidget *tqparent) + : TQFrame(tqparent) { - TQHBoxLayout *layout = new TQHBoxLayout(this); - layout->setAutoAdd(true); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + tqlayout->setAutoAdd(true); new TQLabel(i18n("Add something here"), this); } -%{APPNAME}PrefPageTwo::%{APPNAME}PrefPageTwo(TQWidget *parent) - : TQFrame(parent) +%{APPNAME}PrefPageTwo::%{APPNAME}PrefPageTwo(TQWidget *tqparent) + : TQFrame(tqparent) { - TQHBoxLayout *layout = new TQHBoxLayout(this); - layout->setAutoAdd(true); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + tqlayout->setAutoAdd(true); new TQLabel(i18n("Add something here"), this); } diff --git a/languages/cpp/app_templates/kapp/pref.h b/languages/cpp/app_templates/kapp/pref.h index 93859cfd..23798000 100644 --- a/languages/cpp/app_templates/kapp/pref.h +++ b/languages/cpp/app_templates/kapp/pref.h @@ -12,6 +12,7 @@ class %{APPNAME}PrefPageTwo; class %{APPNAME}Preferences : public KDialogBase { Q_OBJECT + TQ_OBJECT public: %{APPNAME}Preferences(); @@ -20,18 +21,20 @@ private: %{APPNAME}PrefPageTwo *m_pageTwo; }; -class %{APPNAME}PrefPageOne : public QFrame +class %{APPNAME}PrefPageOne : public TQFrame { Q_OBJECT + TQ_OBJECT public: - %{APPNAME}PrefPageOne(TQWidget *parent = 0); + %{APPNAME}PrefPageOne(TQWidget *tqparent = 0); }; -class %{APPNAME}PrefPageTwo : public QFrame +class %{APPNAME}PrefPageTwo : public TQFrame { Q_OBJECT + TQ_OBJECT public: - %{APPNAME}PrefPageTwo(TQWidget *parent = 0); + %{APPNAME}PrefPageTwo(TQWidget *tqparent = 0); }; #endif // _%{APPNAMEUC}PREF_H_ diff --git a/languages/cpp/app_templates/kapp/src-Makefile.am b/languages/cpp/app_templates/kapp/src-Makefile.am index 51cb1973..f118ee10 100644 --- a/languages/cpp/app_templates/kapp/src-Makefile.am +++ b/languages/cpp/app_templates/kapp/src-Makefile.am @@ -25,11 +25,11 @@ noinst_HEADERS = %{APPNAMELC}.h %{APPNAMELC}view.h pref.h %{APPNAMELC}_client_LDADD = $(LIB_KDECORE) %{APPNAMELC}_client_SOURCES = %{APPNAMELC}_client.cpp -# let automoc handle all of the meta source files (moc) +# let autotqmoc handle all of the meta source files (tqmoc) METASOURCES = AUTO messages: rc.cpp - $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp + $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot KDE_ICON = AUTO -- cgit v1.2.1