diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
commit | 99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch) | |
tree | eff34cf0762227f6baf2a93e8fef48d4bed2651c /kioslave/svn/ksvnd | |
parent | 1c104292188541106338d4940b0f04beeb4301a0 (diff) | |
download | tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip |
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslave/svn/ksvnd')
-rw-r--r-- | kioslave/svn/ksvnd/commitdlg.ui | 24 | ||||
-rw-r--r-- | kioslave/svn/ksvnd/ksvnd.cpp | 50 | ||||
-rw-r--r-- | kioslave/svn/ksvnd/ksvnd.h | 7 |
3 files changed, 41 insertions, 40 deletions
diff --git a/kioslave/svn/ksvnd/commitdlg.ui b/kioslave/svn/ksvnd/commitdlg.ui index 7425e5c9..da6f4978 100644 --- a/kioslave/svn/ksvnd/commitdlg.ui +++ b/kioslave/svn/ksvnd/commitdlg.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>CommitDlg</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>CommitDlg</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,9 +19,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <vbox> <property name="name"> @@ -40,9 +40,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -58,14 +58,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>220</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushButton1</cstring> </property> @@ -73,7 +73,7 @@ <string>&OK</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushButton2</cstring> </property> @@ -105,10 +105,10 @@ <include location="local" impldecl="in implementation">commitdlg.ui.h</include> </includes> <functions> - <function>setLog( const QString & comment )</function> - <function returnType="QString">logMessage() const</function> + <function>setLog( const TQString & comment )</function> + <function returnType="TQString">logMessage() const</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>ktextedit.h</includehint> <includehint>ktextedit.h</includehint> diff --git a/kioslave/svn/ksvnd/ksvnd.cpp b/kioslave/svn/ksvnd/ksvnd.cpp index 5da4d9d9..82777818 100644 --- a/kioslave/svn/ksvnd/ksvnd.cpp +++ b/kioslave/svn/ksvnd/ksvnd.cpp @@ -50,7 +50,7 @@ TQString KSvnd::commitDialog(TQString modifiedFiles) { if ( result == TQDialog::Accepted ) { return commitDlg.logMessage(); } else - return TQString::null; + return TQString(); } bool KSvnd::AreAnyFilesInSvn( const KURL::List& wclist ) { @@ -196,9 +196,9 @@ bool KSvnd::anyValidWorkingCopy( const KURL::List& wclist ) { return false; } -int KSvnd::getStatus( const KURL::List& list ) { +int KSvnd::gettqStatus( const KURL::List& list ) { int result = 0; - uint files = 0, folders = 0, parentsentries = 0, parentshavesvn = 0, subdirhavesvn = 0, external = 0; + uint files = 0, folders = 0, tqparentsentries = 0, tqparentshavesvn = 0, subdirhavesvn = 0, external = 0; for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { if ( isFolder ( ( *it ) ) ) { folders++; @@ -206,7 +206,7 @@ int KSvnd::getStatus( const KURL::List& list ) { files++; } if ( isFileInSvnEntries ( (*it).filename(),( *it ).directory() + "/.svn/entries" ) ) { // normal subdir known in the working copy - parentsentries++; + tqparentsentries++; } else if ( isFolder( *it ) ) { // other subfolders (either another module checkouted or an external, or something not known at all) if ( TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) subdirhavesvn++; @@ -214,8 +214,8 @@ int KSvnd::getStatus( const KURL::List& list ) { external++; } } - if ( ( isFolder( ( *it ) ) && TQFile::exists( ( *it ).directory() + "../.svn/entries" ) ) || TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) //parent has a .svn ? - parentshavesvn++; + if ( ( isFolder( ( *it ) ) && TQFile::exists( ( *it ).directory() + "../.svn/entries" ) ) || TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) //tqparent has a .svn ? + tqparentshavesvn++; } if ( files > 0 ) result |= SomeAreFiles; @@ -225,15 +225,15 @@ int KSvnd::getStatus( const KURL::List& list ) { } if ( folders > 0 ) result |= SomeAreFolders; - if ( parentsentries == list.count() ) { + if ( tqparentsentries == list.count() ) { result |= AllAreInParentsEntries; result |= SomeAreInParentsEntries; - } else if ( parentsentries != 0 ) + } else if ( tqparentsentries != 0 ) result |= SomeAreInParentsEntries; - if ( parentshavesvn == list.count() ) { + if ( tqparentshavesvn == list.count() ) { result |= AllParentsHaveSvn; result |= SomeParentsHaveSvn; - } else if ( parentshavesvn > 0 ) + } else if ( tqparentshavesvn > 0 ) result |= SomeParentsHaveSvn; if ( subdirhavesvn == list.count() ) { result |= AllHaveSvn; @@ -256,18 +256,18 @@ bool KSvnd::isFolder( const KURL& url ) { TQStringList KSvnd::getActionMenu ( const KURL::List &list ) { TQStringList result; - int listStatus = getStatus( list ); + int listtqStatus = gettqStatus( list ); - if ( !(listStatus & SomeAreInParentsEntries) && - !(listStatus & SomeAreExternalToParent) && - !(listStatus & SomeHaveSvn)) { - if( list.size() == 1 && listStatus & SomeAreFolders) { + if ( !(listtqStatus & SomeAreInParentsEntries) && + !(listtqStatus & SomeAreExternalToParent) && + !(listtqStatus & SomeHaveSvn)) { + if( list.size() == 1 && listtqStatus & SomeAreFolders) { result << "Checkout"; result << "Export"; // result << "CreateRepository"; result << "Import"; } - } else if ( (listStatus & AllAreInParentsEntries) ) { + } else if ( (listtqStatus & AllAreInParentsEntries) ) { result << "Diff"; //In SVN // result << "ShowLog"; @@ -277,7 +277,7 @@ TQStringList KSvnd::getActionMenu ( const KURL::List &list ) { // result << "Update to revision..." result << "Rename"; result << "Delete"; - if( listStatus & SomeAreFolders && !(listStatus & SomeAreFiles)) { + if( listtqStatus & SomeAreFolders && !(listtqStatus & SomeAreFiles)) { result << "Revert"; // result << "Cleanup"; } @@ -285,19 +285,19 @@ TQStringList KSvnd::getActionMenu ( const KURL::List &list ) { // result << "BranchTag"; result << "Switch"; result << "Merge"; - if( listStatus & SomeAreFolders && !(listStatus & SomeAreFiles)) { + if( listtqStatus & SomeAreFolders && !(listtqStatus & SomeAreFiles)) { // result << "Export"; // result << "Relocate"; result << "_SEPARATOR_"; result << "Add"; } result << "_SEPARATOR_"; - if( listStatus & SomeAreFiles && !(listStatus & SomeAreFolders)) { + if( listtqStatus & SomeAreFiles && !(listtqStatus & SomeAreFolders)) { result << "Blame"; } result << "CreatePatch"; - if( list.size() == 1 && listStatus & SomeAreFolders) { + if( list.size() == 1 && listtqStatus & SomeAreFolders) { // result << "ApplyPatchToFolder"; } } @@ -306,12 +306,12 @@ TQStringList KSvnd::getActionMenu ( const KURL::List &list ) { TQStringList KSvnd::getTopLevelActionMenu ( const KURL::List &list ) { TQStringList result; - int listStatus = getStatus( list ); + int listtqStatus = gettqStatus( list ); - if ( ( listStatus & AllParentsHaveSvn && - ( ( listStatus & SomeAreExternalToParent ) || ( listStatus & SomeAreInParentsEntries ) ) - || ( listStatus & SomeHaveSvn ) ) + if ( ( listtqStatus & AllParentsHaveSvn && + ( ( listtqStatus & SomeAreExternalToParent ) || ( listtqStatus & SomeAreInParentsEntries ) ) + || ( listtqStatus & SomeHaveSvn ) ) ) { result << "Update"; result << "Commit"; @@ -339,7 +339,7 @@ void KSvnd::status(const TQString& path, int text_status, int prop_status, int r TQDataStream stream(params, IO_WriteOnly); stream << path << text_status << prop_status << repos_text_status << repos_prop_status << rev; - emitDCOPSignal( "subversionStatus(TQString,int,int,int,int,long int)", params ); + emitDCOPSignal( "subversiontqStatus(TQString,int,int,int,int,long int)", params ); } void KSvnd::popupMessage( const TQString& message ) { diff --git a/kioslave/svn/ksvnd/ksvnd.h b/kioslave/svn/ksvnd/ksvnd.h index edb1073e..78583e02 100644 --- a/kioslave/svn/ksvnd/ksvnd.h +++ b/kioslave/svn/ksvnd/ksvnd.h @@ -29,9 +29,10 @@ class KSvnd : public KDEDModule { Q_OBJECT +// TQ_OBJECT K_DCOP - //note: InSVN means parent is added. InRepos means itself is added + //note: InSVN means tqparent is added. InRepos means itself is added enum { SomeAreFiles = 1, SomeAreFolders = 2, SomeAreInParentsEntries = 4, SomeParentsHaveSvn = 8, SomeHaveSvn = 16, SomeAreExternalToParent = 32, AllAreInParentsEntries = 64, AllParentsHaveSvn = 128, AllHaveSvn = 256, AllAreExternalToParent = 512, AllAreFolders = 1024 }; public: KSvnd(const TQCString &); @@ -55,7 +56,7 @@ k_dcop: k_dcop_signals: //emitted whenever something happens using subversion ;) // void subversionNotify(const TQString&, int ,int, const TQString& , int , int, long int, const TQString&); -// void subversionStatus(const TQString&,int,int,int,int,long int); +// void subversiontqStatus(const TQString&,int,int,int,int,long int); public slots: @@ -63,7 +64,7 @@ protected: bool isFileInSvnEntries ( const TQString filename, const TQString entfile ); bool isFileInExternals ( const TQString filename, const TQString propfile ); bool isFolder( const KURL& url ); - int getStatus( const KURL::List& list ); + int gettqStatus( const KURL::List& list ); }; #endif |