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/kde4app/kapp4.cpp | 10 +++++----- languages/cpp/app_templates/kde4app/kapp4.h | 1 + languages/cpp/app_templates/kde4app/kapp4view.cpp | 2 +- languages/cpp/app_templates/kde4app/kapp4view.h | 5 +++-- .../cpp/app_templates/kde4app/kapp4view_base.ui | 12 ++++++------ .../app_templates/kde4app/kde4app-CMakeLists.txt | 2 +- languages/cpp/app_templates/kde4app/prefs_base.ui | 22 +++++++++++----------- 7 files changed, 28 insertions(+), 26 deletions(-) (limited to 'languages/cpp/app_templates/kde4app') diff --git a/languages/cpp/app_templates/kde4app/kapp4.cpp b/languages/cpp/app_templates/kde4app/kapp4.cpp index b73c02cb..bb91d42e 100644 --- a/languages/cpp/app_templates/kde4app/kapp4.cpp +++ b/languages/cpp/app_templates/kde4app/kapp4.cpp @@ -4,8 +4,8 @@ #include "%{APPNAMELC}view.h" #include "settings.h" -#include -#include +#include +#include #include #include @@ -48,13 +48,13 @@ void %{APPNAME}::setupActions() { KStandardAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); - KStandardAction::quit(qApp, TQT_SLOT(quit()), actionCollection()); + KStandardAction::quit(tqApp, TQT_SLOT(quit()), actionCollection()); KStandardAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection()); // custom menu and menu item - the slot is in the class %{APPNAME}View KAction *custom = new KAction(KIcon("colorize"), i18n("Swi&tch Colors"), this); - actionCollection()->addAction( QLatin1String("switch_action"), custom ); + actionCollection()->addAction( TQLatin1String("switch_action"), custom ); connect(custom, TQT_SIGNAL(triggered(bool)), m_view, TQT_SLOT(switchColors())); } @@ -83,7 +83,7 @@ void %{APPNAME}::optionsPreferences() ui_prefs_base.setupUi(generalSettingsDlg); dialog->addPage(generalSettingsDlg, i18n("General"), "package_setting"); connect(dialog, TQT_SIGNAL(settingsChanged(TQString)), m_view, TQT_SLOT(settingsChanged())); - dialog->setAttribute( Qt::WA_DeleteOnClose ); + dialog->setAttribute( TQt::WA_DeleteOnClose ); dialog->show(); } diff --git a/languages/cpp/app_templates/kde4app/kapp4.h b/languages/cpp/app_templates/kde4app/kapp4.h index fb059fde..1a15a7c7 100644 --- a/languages/cpp/app_templates/kde4app/kapp4.h +++ b/languages/cpp/app_templates/kde4app/kapp4.h @@ -23,6 +23,7 @@ class KUrl; class %{APPNAME} : public KXmlGuiWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor diff --git a/languages/cpp/app_templates/kde4app/kapp4view.cpp b/languages/cpp/app_templates/kde4app/kapp4view.cpp index 785a6858..9d9e482a 100644 --- a/languages/cpp/app_templates/kde4app/kapp4view.cpp +++ b/languages/cpp/app_templates/kde4app/kapp4view.cpp @@ -3,7 +3,7 @@ #include "settings.h" #include -#include +#include %{APPNAME}View::%{APPNAME}View(TQWidget *) { diff --git a/languages/cpp/app_templates/kde4app/kapp4view.h b/languages/cpp/app_templates/kde4app/kapp4view.h index 40749696..c4ce6517 100644 --- a/languages/cpp/app_templates/kde4app/kapp4view.h +++ b/languages/cpp/app_templates/kde4app/kapp4view.h @@ -2,7 +2,7 @@ #ifndef %{APPNAMELC}VIEW_H #define %{APPNAMELC}VIEW_H -#include +#include #include "ui_%{APPNAMELC}view_base.h" @@ -22,11 +22,12 @@ class KUrl; class %{APPNAME}View : public TQWidget, public Ui::%{APPNAMELC}view_base { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - %{APPNAME}View(TQWidget *parent); + %{APPNAME}View(TQWidget *tqparent); /** * Destructor diff --git a/languages/cpp/app_templates/kde4app/kapp4view_base.ui b/languages/cpp/app_templates/kde4app/kapp4view_base.ui index eb6a254a..92a83f43 100644 --- a/languages/cpp/app_templates/kde4app/kapp4view_base.ui +++ b/languages/cpp/app_templates/kde4app/kapp4view_base.ui @@ -1,6 +1,6 @@ %{APPNAMELC}view_base - + 0 @@ -15,7 +15,7 @@ true - + 11 @@ -35,7 +35,7 @@ 6 - + @@ -196,7 +196,7 @@ true - + Qt::AlignCenter @@ -204,9 +204,9 @@ - + - + qPixmapFromMimeSource diff --git a/languages/cpp/app_templates/kde4app/kde4app-CMakeLists.txt b/languages/cpp/app_templates/kde4app/kde4app-CMakeLists.txt index 2544a271..c29d33da 100644 --- a/languages/cpp/app_templates/kde4app/kde4app-CMakeLists.txt +++ b/languages/cpp/app_templates/kde4app/kde4app-CMakeLists.txt @@ -9,7 +9,7 @@ set(%{APPNAMELC}_SRCS %{APPNAMELC}view.cpp ) -#kde4_automoc(${%{APPNAMELC}_SRCS}) +#kde4_autotqmoc(${%{APPNAMELC}_SRCS}) kde4_add_ui_files(%{APPNAMELC}_SRCS %{APPNAMELC}view_base.ui prefs_base.ui) diff --git a/languages/cpp/app_templates/kde4app/prefs_base.ui b/languages/cpp/app_templates/kde4app/prefs_base.ui index ea400f02..98bf5f19 100644 --- a/languages/cpp/app_templates/kde4app/prefs_base.ui +++ b/languages/cpp/app_templates/kde4app/prefs_base.ui @@ -1,6 +1,6 @@ prefs_base - + 0 @@ -9,9 +9,9 @@ 156 - + - + Background color: @@ -37,7 +37,7 @@ p, li { white-space: pre-wrap; } - + Project age: @@ -47,7 +47,7 @@ p, li { white-space: pre-wrap; } - + Foreground color: @@ -80,7 +80,7 @@ p, li { white-space: pre-wrap; } QSizePolicy::Expanding - + 41 20 @@ -96,7 +96,7 @@ p, li { white-space: pre-wrap; } QSizePolicy::Expanding - + 41 20 @@ -105,7 +105,7 @@ p, li { white-space: pre-wrap; } - + Set the project age (in days) @@ -128,7 +128,7 @@ p, li { white-space: pre-wrap; } QSizePolicy::Expanding - + 41 20 @@ -136,9 +136,9 @@ p, li { white-space: pre-wrap; } - + - + qPixmapFromMimeSource -- cgit v1.2.1