From d7633c195a464e4d344ada9eea61afd10110598a Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 4 May 2011 19:54:24 +0000 Subject: Port kdesvn to TQt4 This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdesvn@1230412 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/kdesvn.cpp | 72 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'src/kdesvn.cpp') diff --git a/src/kdesvn.cpp b/src/kdesvn.cpp index 3f2e269..9921ffb 100644 --- a/src/kdesvn.cpp +++ b/src/kdesvn.cpp @@ -23,11 +23,11 @@ #include "urldlg.h" #include "kdesvn_part.h" -#include +#include #include -#include -#include -#include +#include +#include +#include #include #include @@ -81,11 +81,11 @@ kdesvn::kdesvn() // and a status bar statusBar()->show(); - m_bookmarkFile = locateLocal("appdata",QString::fromLatin1("bookmarks.xml"),true); + m_bookmarkFile = locateLocal("appdata",TQString::tqfromLatin1("bookmarks.xml"),true); m_BookmarkManager = KBookmarkManager::managerForFile(m_bookmarkFile,false); m_BookmarkManager->setShowNSBookmarks(false); - m_BookmarkManager->setEditorOptions(QString::fromLatin1("KDE Svn"),false); + m_BookmarkManager->setEditorOptions(TQString::tqfromLatin1("KDE Svn"),false); m_BookmarksActionmenu = new KActionMenu(i18n("&Bookmarks"),"bookmark",actionCollection(),"bookmarks"); m_BookmarksActionmenu->setDelayed(false); @@ -104,7 +104,7 @@ kdesvn::kdesvn() if (factory) { - if (QCString(factory->className())!="cFactory") { + if (TQCString(factory->className())!="cFactory") { kdDebug()<<"wrong factory"<quit(); @@ -114,7 +114,7 @@ kdesvn::kdesvn() // now that the Part is loaded, we cast it to a Part to get // our hands on it - m_part = static_cast(cfa->createAppPart(this,"kdesvn_part", this, "kdesvn_part", "KParts::ReadOnlyPart",QStringList())); + m_part = static_cast(cfa->createAppPart(this,"kdesvn_part", TQT_TQOBJECT(this), "kdesvn_part", "KParts::ReadOnlyPart",TQStringList())); if (m_part) { @@ -123,22 +123,22 @@ kdesvn::kdesvn() KAction*tmpAction; tmpAction = new KAction(i18n("Create and open new repository"),"filenew", - KShortcut(),m_part->widget(),SLOT(slotCreateRepo()),actionCollection(),"subversion_create_repo"); + KShortcut(),TQT_TQOBJECT(m_part->widget()),TQT_SLOT(slotCreateRepo()),actionCollection(),"subversion_create_repo"); tmpAction->setToolTip(i18n("Create and opens a new local subversion repository")); tmpAction = new KAction(i18n("Dump repository to file"),"filenew", - KShortcut(),m_part->widget(),SLOT(slotDumpRepo()),actionCollection(),"subversion_dump_repo"); + KShortcut(),TQT_TQOBJECT(m_part->widget()),TQT_SLOT(slotDumpRepo()),actionCollection(),"subversion_dump_repo"); tmpAction->setToolTip(i18n("Dump a subversion repository to a file")); tmpAction = new KAction(i18n("Hotcopy a repository"),"filenew", - KShortcut(),m_part->widget(),SLOT(slotHotcopy()),actionCollection(),"subversion_hotcopy_repo"); + KShortcut(),TQT_TQOBJECT(m_part->widget()),TQT_SLOT(slotHotcopy()),actionCollection(),"subversion_hotcopy_repo"); tmpAction->setToolTip(i18n("Hotcopy a subversion repository to a new folder")); tmpAction = new KAction(i18n("Load dump into repository"),"filenew", - KShortcut(),m_part->widget(),SLOT(slotLoaddump()),actionCollection(),"subversion_load_repo"); + KShortcut(),TQT_TQOBJECT(m_part->widget()),TQT_SLOT(slotLoaddump()),actionCollection(),"subversion_load_repo"); tmpAction->setToolTip(i18n("Load a dump file into a repository.")); tmpAction = new KAction(i18n("Add ssh identities to ssh-agent"),"password", - KShortcut(),m_part,SLOT(slotSshAdd()),actionCollection(),"kdesvn_ssh_add"); + KShortcut(),TQT_TQOBJECT(m_part),TQT_SLOT(slotSshAdd()),actionCollection(),"kdesvn_ssh_add"); tmpAction->setToolTip(i18n("Force add ssh-identities to ssh-agent for future use.")); tmpAction = new KAction(i18n("Info about kdesvn part"), "kdesvn", - KShortcut(), m_part, SLOT(showAboutApplication()), actionCollection(), "help_about_kdesvnpart"); + KShortcut(), TQT_TQOBJECT(m_part), TQT_SLOT(showAboutApplication()), actionCollection(), "help_about_kdesvnpart"); tmpAction->setToolTip(i18n("Shows info about the kdesvn plugin not the standalone app.")); /* enable tooltips in statusbar for menu */ @@ -157,7 +157,7 @@ kdesvn::kdesvn() { // if we couldn't find our Part, we exit since the Shell by // itself can't do anything useful - KMessageBox::error(this, i18n("Could not find our part")+QString(":\n")+KLibLoader::self()->lastErrorMessage()); + KMessageBox::error(this, i18n("Could not find our part")+TQString(":\n")+KLibLoader::self()->lastErrorMessage()); kapp->quit(); // we return here, cause kapp->quit() only means "exit the // next time we enter the event loop... @@ -169,10 +169,10 @@ kdesvn::kdesvn() void kdesvn::connectActionCollection( KActionCollection *coll ) { if (!coll)return; - connect( coll, SIGNAL( actionStatusText( const QString & ) ), - this, SLOT( changeStatusbar( const QString & ) ) ); - connect( coll, SIGNAL( clearStatusText() ), - this, SLOT( resetStatusBar() ) ); + connect( coll, TQT_SIGNAL( actionStatusText( const TQString & ) ), + this, TQT_SLOT( changeStatusbar( const TQString & ) ) ); + connect( coll, TQT_SIGNAL( clearStatusText() ), + this, TQT_SLOT( resetStatusBar() ) ); } void kdesvn::disconnectActionCollection( KActionCollection *coll ) @@ -201,7 +201,7 @@ void kdesvn::load(const KURL& url,bool addRescent) } } if (!ret) { - changeStatusbar(i18n("Could not open url %1").arg(url.prettyURL())); + changeStatusbar(i18n("Could not open url %1").tqarg(url.prettyURL())); if (rac) { rac->removeURL(url); } @@ -220,13 +220,13 @@ void kdesvn::load(const KURL& url,bool addRescent) void kdesvn::setupActions() { KAction*ac; - KStdAction::open(this, SLOT(fileOpen()), actionCollection()); - KStdAction::openNew(this,SLOT(fileNew()),actionCollection()); - ac = KStdAction::close(this,SLOT(fileClose()),actionCollection()); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection()); + KStdAction::openNew(TQT_TQOBJECT(this),TQT_SLOT(fileNew()),actionCollection()); + ac = KStdAction::close(TQT_TQOBJECT(this),TQT_SLOT(fileClose()),actionCollection()); ac->setEnabled(getMemberList()->count()>1); - KStdAction::quit(kapp, SLOT(quit()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); - KRecentFilesAction*rac = KStdAction::openRecent(this,SLOT(loadRescent(const KURL&)),actionCollection()); + KRecentFilesAction*rac = KStdAction::openRecent(TQT_TQOBJECT(this),TQT_SLOT(loadRescent(const KURL&)),actionCollection()); if (rac) { rac->setMaxItems(8); @@ -234,10 +234,10 @@ void kdesvn::setupActions() rac->setText(i18n("Recent opened URLs")); } - KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection()); + m_statusbarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowStatusbar()), actionCollection()); KToggleAction *toggletemp; toggletemp = new KToggleAction(i18n("Load last opened URL on start"),KShortcut(), @@ -245,7 +245,7 @@ void kdesvn::setupActions() toggletemp->setToolTip(i18n("Reload last opened url if no one is given on commandline")); KConfigGroup cs(KGlobal::config(),"startup"); toggletemp->setChecked(cs.readBoolEntry("load_last_on_start",false)); - connect(toggletemp,SIGNAL(toggled(bool)),this,SLOT(slotLoadLast(bool))); + connect(toggletemp,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotLoadLast(bool))); } void kdesvn::optionsShowStatusbar() @@ -290,7 +290,7 @@ void kdesvn::readProperties(KConfig *config) // the app is being restored. read in here whatever you wrote // in 'saveProperties' - QString url = config->readPathEntry("lastURL"); + TQString url = config->readPathEntry("lastURL"); if (!url.isEmpty() && m_part) m_part->openURL(KURL(url)); @@ -314,7 +314,7 @@ void kdesvn::fileOpen() load(url,true); } -void kdesvn::changeStatusbar(const QString& text) +void kdesvn::changeStatusbar(const TQString& text) { // display the text on the statusbar statusBar()->message(text); @@ -325,13 +325,13 @@ void kdesvn::resetStatusBar() statusBar()->message(i18n("Ready")); } -void kdesvn::openBookmarkURL (const QString &_url) +void kdesvn::openBookmarkURL (const TQString &_url) { if (!_url.isEmpty() && m_part) load(_url,false); } -QString kdesvn::currentURL () const +TQString kdesvn::currentURL () const { if (!m_part) return ""; return m_part->url().prettyURL(); @@ -371,8 +371,8 @@ void kdesvn::optionsConfigureToolbars() // use the standard toolbar editor KEditToolbar dlg(factory()); - connect(&dlg, SIGNAL(newToolbarConfig()), - this, SLOT(applyNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + this, TQT_SLOT(applyNewToolbarConfig())); dlg.exec(); } @@ -431,7 +431,7 @@ void kdesvn::checkReload() if (!cs.readBoolEntry("load_last_on_start",false)) return; - QString url = cs.readPathEntry("lastURL"); + TQString url = cs.readPathEntry("lastURL"); if (!url.isEmpty() && m_part) load(KURL(url),false); -- cgit v1.2.1