diff options
Diffstat (limited to 'src/kdesvnview.cpp')
-rw-r--r-- | src/kdesvnview.cpp | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/src/kdesvnview.cpp b/src/kdesvnview.cpp index 2312730..4814b9a 100644 --- a/src/kdesvnview.cpp +++ b/src/kdesvnview.cpp @@ -33,15 +33,15 @@ #include "src/svnqt/version_check.hpp" #include "src/svnqt/svnqttypes.hpp" -#include <qpainter.h> -#include <qlayout.h> -#include <qfileinfo.h> -#include <qheader.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qsplitter.h> -#include <qlayout.h> -#include <qvbox.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqfileinfo.h> +#include <tqheader.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqsplitter.h> +#include <tqlayout.h> +#include <tqvbox.h> #include <kurl.h> #include <ktrader.h> @@ -58,79 +58,79 @@ #include <kdialogbase.h> #include <kprogress.h> -kdesvnView::kdesvnView(KActionCollection*aCollection,QWidget *parent,const char*name,bool full) - : QWidget(parent,name),svn::repository::RepositoryListener(),m_Collection(aCollection), +kdesvnView::kdesvnView(KActionCollection*aCollection,TQWidget *tqparent,const char*name,bool full) + : TQWidget(tqparent,name),svn::repository::RepositoryListener(),m_Collection(aCollection), m_currentURL("") { Q_UNUSED(full); setupActions(); m_CacheProgressBar=0; - m_topLayout = new QVBoxLayout(this); + m_topLayout = new TQVBoxLayout(this); - m_Splitter = new QSplitter( this, "m_Splitter" ); - m_Splitter->setOrientation( QSplitter::Vertical ); + m_Splitter = new TQSplitter( this, "m_Splitter" ); + m_Splitter->setOrientation( Qt::Vertical ); m_flist=new kdesvnfilelist(m_Collection,m_Splitter); - m_infoSplitter = new QSplitter(m_Splitter); - m_infoSplitter->setOrientation( QSplitter::Horizontal ); - m_infoSplitter->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 1, m_infoSplitter->sizePolicy().hasHeightForWidth() ) ); + m_infoSplitter = new TQSplitter(m_Splitter); + m_infoSplitter->setOrientation( Qt::Horizontal ); + m_infoSplitter->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 1, m_infoSplitter->sizePolicy().hasHeightForWidth() ) ); m_LogWindow=new KTextBrowser(m_infoSplitter); Propertylist*pl = new Propertylist(m_infoSplitter); pl->setCommitchanges(true); - pl->addCallback(m_flist); - connect(m_flist,SIGNAL(sigProplist(const svn::PathPropertiesMapListPtr&,bool,const QString&)), - pl,SLOT(displayList(const svn::PathPropertiesMapListPtr&,bool,const QString&))); + pl->addCallback(TQT_TQOBJECT(m_flist)); + connect(m_flist,TQT_SIGNAL(sigProplist(const svn::PathPropertiesMapListPtr&,bool,const TQString&)), + pl,TQT_SLOT(displayList(const svn::PathPropertiesMapListPtr&,bool,const TQString&))); - m_flist->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 1, m_flist->sizePolicy().hasHeightForWidth() ) ); + m_flist->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 1, m_flist->sizePolicy().hasHeightForWidth() ) ); m_topLayout->addWidget(m_Splitter); - connect(m_flist,SIGNAL(sigLogMessage(const QString&)),this,SLOT(slotAppendLog(const QString&))); - connect(m_flist,SIGNAL(changeCaption(const QString&)),this,SLOT(slotSetTitle(const QString&))); - connect(m_flist,SIGNAL(sigShowPopup(const QString&,QWidget**)),this,SLOT(slotDispPopup(const QString&,QWidget**))); - connect(m_flist,SIGNAL(sigUrlOpend(bool)),parent,SLOT(slotUrlOpened(bool))); - connect(m_flist,SIGNAL(sigSwitchUrl(const KURL&)),this,SIGNAL(sigSwitchUrl(const KURL&))); - connect(m_flist,SIGNAL(sigUrlChanged( const QString& )),this,SLOT(slotUrlChanged(const QString&))); - connect(m_flist,SIGNAL(sigCacheStatus(Q_LONG,Q_LONG)),this,SLOT(fillCacheStatus(Q_LONG,Q_LONG))); - connect(this,SIGNAL(sigMakeBaseDirs()),m_flist,SLOT(slotMkBaseDirs())); - KConfigGroup cs(Kdesvnsettings::self()->config(),"kdesvn-mainlayout"); - QString t1 = cs.readEntry("split1",QString::null); + connect(m_flist,TQT_SIGNAL(sigLogMessage(const TQString&)),this,TQT_SLOT(slotAppendLog(const TQString&))); + connect(m_flist,TQT_SIGNAL(changeCaption(const TQString&)),this,TQT_SLOT(slotSetTitle(const TQString&))); + connect(m_flist,TQT_SIGNAL(sigShowPopup(const TQString&,TQWidget**)),this,TQT_SLOT(slotDispPopup(const TQString&,TQWidget**))); + connect(m_flist,TQT_SIGNAL(sigUrlOpend(bool)),tqparent,TQT_SLOT(slotUrlOpened(bool))); + connect(m_flist,TQT_SIGNAL(sigSwitchUrl(const KURL&)),this,TQT_SIGNAL(sigSwitchUrl(const KURL&))); + connect(m_flist,TQT_SIGNAL(sigUrlChanged( const TQString& )),this,TQT_SLOT(slotUrlChanged(const TQString&))); + connect(m_flist,TQT_SIGNAL(sigCachetqStatus(TQ_LONG,TQ_LONG)),this,TQT_SLOT(fillCachetqStatus(TQ_LONG,TQ_LONG))); + connect(this,TQT_SIGNAL(sigMakeBaseDirs()),m_flist,TQT_SLOT(slotMkBaseDirs())); + KConfigGroup cs(Kdesvnsettings::self()->config(),"kdesvn-maintqlayout"); + TQString t1 = cs.readEntry("split1",TQString()); if (!t1.isEmpty()) { - QTextStream st1(&t1,IO_ReadOnly); + TQTextStream st1(&t1,IO_ReadOnly); st1 >> *m_Splitter; } if (m_infoSplitter) { - t1 = cs.readEntry("infosplit",QString::null); + t1 = cs.readEntry("infosplit",TQString()); if (!t1.isEmpty()) { - QTextStream st2(&t1,IO_ReadOnly); + TQTextStream st2(&t1,IO_ReadOnly); st2 >> *m_infoSplitter; } } } -void kdesvnView::slotAppendLog(const QString& text) +void kdesvnView::slotAppendLog(const TQString& text) { m_LogWindow->append(text); } kdesvnView::~kdesvnView() { - KConfigGroup cs(Kdesvnsettings::self()->config(),"kdesvn-mainlayout"); - QString t1,t2; - QTextStream st1(&t1,IO_WriteOnly); + KConfigGroup cs(Kdesvnsettings::self()->config(),"kdesvn-maintqlayout"); + TQString t1,t2; + TQTextStream st1(&t1,IO_WriteOnly); st1 << *m_Splitter; cs.writeEntry("split1",t1); if (m_infoSplitter) { t2=""; - QTextStream st2(&t2,IO_WriteOnly); + TQTextStream st2(&t2,IO_WriteOnly); st2 << *m_infoSplitter; cs.writeEntry("infosplit",t2); } } -void kdesvnView::slotUrlChanged(const QString&url) +void kdesvnView::slotUrlChanged(const TQString&url) { m_currentURL=url; slotSetTitle(url); @@ -138,12 +138,12 @@ void kdesvnView::slotUrlChanged(const QString&url) slotOnURL(i18n("Repository opened")); } -QString kdesvnView::currentURL() +TQString kdesvnView::currentURL() { return m_currentURL; } -bool kdesvnView::openURL(QString url) +bool kdesvnView::openURL(TQString url) { return openURL(KURL(url)); } @@ -156,10 +156,10 @@ bool kdesvnView::openURL(const KURL& url) bool open = false; _url = url; if (_url.isLocalFile()) { - QString query = _url.query(); + TQString query = _url.query(); _url.setQuery(""); - QString _f = _url.path(); - QFileInfo f(_f); + TQString _f = _url.path(); + TQFileInfo f(_f); if (!f.isDir()) { m_currentURL=""; return open; @@ -179,7 +179,7 @@ bool kdesvnView::openURL(const KURL& url) m_currentURL=url.url(); open = true; } else { - QString t = m_flist->lastError(); + TQString t = m_flist->lastError(); if (t.isEmpty()) { t = i18n("Could not open repository"); } @@ -188,12 +188,12 @@ bool kdesvnView::openURL(const KURL& url) return open; } -void kdesvnView::slotOnURL(const QString& url) +void kdesvnView::slotOnURL(const TQString& url) { emit signalChangeStatusbar(url); } -void kdesvnView::slotSetTitle(const QString& title) +void kdesvnView::slotSetTitle(const TQString& title) { //emit signalChangeCaption(title); emit setWindowCaption(title); @@ -210,7 +210,7 @@ void kdesvnView::closeMe() slotOnURL(i18n("No repository open")); } -void kdesvnView::slotDispPopup(const QString&item,QWidget**target) +void kdesvnView::slotDispPopup(const TQString&item,TQWidget**target) { emit sigShowPopup(item,target); } @@ -239,13 +239,13 @@ void kdesvnView::slotSettingsChanged() void kdesvnView::slotCreateRepo() { KDialogBase * dlg = new KDialogBase( - KApplication::activeModalWidget(), + TQT_TQWIDGET(KApplication::activeModalWidget()), "create_repository", true, i18n("Create new repository"), KDialogBase::Ok|KDialogBase::Cancel); if (!dlg) return; - QWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); bool compatneeded = svn::Version::version_major()>1||svn::Version::version_minor()>3; bool compat14 = svn::Version::version_major()>1||svn::Version::version_minor()>4; Createrepo_impl*ptr = new Createrepo_impl(compatneeded,compat14,Dialog1Layout); @@ -253,14 +253,14 @@ void kdesvnView::slotCreateRepo() int i = dlg->exec(); dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"create_repo_size",false); - if (i!=QDialog::Accepted) { + if (i!=TQDialog::Accepted) { delete dlg; return; } svn::repository::Repository*_rep = new svn::repository::Repository(this); bool ok = true; bool createdirs; - QString path = ptr->targetDir(); + TQString path = ptr->targetDir(); closeMe(); kdDebug()<<"Creating "<<path << endl; try { @@ -287,25 +287,25 @@ void kdesvnView::slotCreateRepo() void kdesvnView::slotHotcopy() { KDialogBase * dlg = new KDialogBase( - KApplication::activeModalWidget(), + TQT_TQWIDGET(KApplication::activeModalWidget()), "hotcopy_repository", true, i18n("Hotcopy a repository"), KDialogBase::Ok|KDialogBase::Cancel); if (!dlg) return; - QWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); HotcopyDlg_impl * ptr = new HotcopyDlg_impl(Dialog1Layout); dlg->resize(dlg->configDialogSize(*(Kdesvnsettings::self()->config()),"hotcopy_repo_size")); int i = dlg->exec(); dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"hotcopy_repo_size",false); - if (i!=QDialog::Accepted) { + if (i!=TQDialog::Accepted) { delete dlg; return; } bool cleanlogs = ptr->cleanLogs(); - QString src = ptr->srcPath(); - QString dest = ptr->destPath(); + TQString src = ptr->srcPath(); + TQString dest = ptr->destPath(); delete dlg; if (src.isEmpty()||dest.isEmpty()) { return; @@ -322,17 +322,17 @@ void kdesvnView::slotHotcopy() void kdesvnView::slotLoaddump() { KDialogBase dlg( - KApplication::activeModalWidget(), + TQT_TQWIDGET(KApplication::activeModalWidget()), "hotcopy_repository", true, i18n("Hotcopy a repository"), KDialogBase::Ok|KDialogBase::Cancel); - QWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg.makeVBoxMainWidget(); LoadDmpDlg_impl * ptr = new LoadDmpDlg_impl(Dialog1Layout); dlg.resize(dlg.configDialogSize(*(Kdesvnsettings::self()->config()),"loaddump_repo_size")); int i = dlg.exec(); dlg.saveDialogSize(*(Kdesvnsettings::self()->config()),"loaddump_repo_size",false); - if (i!=QDialog::Accepted) { + if (i!=TQDialog::Accepted) { return; } svn::repository::Repository _rep(this); @@ -360,8 +360,8 @@ void kdesvnView::slotLoaddump() break; } try { - StopDlg sdlg(this,this,0,"Load Dump",i18n("Loading a dump into a repository.")); - _rep.loaddump(ptr->dumpFile(),_act,ptr->parentPath(),ptr->usePre(),ptr->usePost()); + StopDlg sdlg(TQT_TQOBJECT(this),this,0,"Load Dump",i18n("Loading a dump into a repository.")); + _rep.loaddump(ptr->dumpFile(),_act,ptr->tqparentPath(),ptr->usePre(),ptr->usePost()); slotAppendLog(i18n("Loading dump finished.")); }catch (const svn::ClientException&e) { slotAppendLog(e.msg()); @@ -372,24 +372,24 @@ void kdesvnView::slotLoaddump() void kdesvnView::slotDumpRepo() { KDialogBase * dlg = new KDialogBase( - KApplication::activeModalWidget(), + TQT_TQWIDGET(KApplication::activeModalWidget()), "dump_repository", true, i18n("Dump a repository"), KDialogBase::Ok|KDialogBase::Cancel); if (!dlg) return; - QWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); + TQWidget* Dialog1Layout = dlg->makeVBoxMainWidget(); DumpRepo_impl*ptr = new DumpRepo_impl(Dialog1Layout); dlg->resize(dlg->configDialogSize(*(Kdesvnsettings::self()->config()),"dump_repo_size")); int i = dlg->exec(); dlg->saveDialogSize(*(Kdesvnsettings::self()->config()),"dump_repo_size",false); - if (i!=QDialog::Accepted) { + if (i!=TQDialog::Accepted) { delete dlg; return; } svn::repository::Repository*_rep = new svn::repository::Repository(this); - QString re,out; + TQString re,out; bool incr,diffs; re = ptr->reposPath(); out = ptr->targetFile(); @@ -421,7 +421,7 @@ void kdesvnView::slotDumpRepo() } try { - StopDlg sdlg(this,this,0,"Dump",i18n("Dumping a repository")); + StopDlg sdlg(TQT_TQOBJECT(this),this,0,"Dump",i18n("Dumping a repository")); _rep->dump(out,st,en,incr,diffs); slotAppendLog(i18n("Dump finished.")); }catch (const svn::ClientException&e) { @@ -438,12 +438,12 @@ void kdesvnView::setupActions() { } -void kdesvnView::sendWarning(const QString&aMsg) +void kdesvnView::sendWarning(const TQString&aMsg) { slotAppendLog(aMsg); } -void kdesvnView::sendError(const QString&aMsg) +void kdesvnView::sendError(const TQString&aMsg) { slotAppendLog(aMsg); } @@ -462,7 +462,7 @@ void kdesvnView::setCanceled(bool how) m_ReposCancel = how; } -void kdesvnView::fillCacheStatus(Q_LONG current,Q_LONG max) +void kdesvnView::fillCachetqStatus(TQ_LONG current,TQ_LONG max) { if (current>-1 && max>-1) { kdDebug()<<"Fillcache "<<current<<" von "<<max<<endl; |