summaryrefslogtreecommitdiffstats
path: root/kdpkg-install/install.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit6bb0f6dafc28bba6a75f17f947f7fef051a87c5a (patch)
tree6d0c7a85124cbd70533b3727f6dcb6a12f82f789 /kdpkg-install/install.cpp
parent48371ee0afa4611d75357d7343cb739bde898582 (diff)
downloadkdpkg-6bb0f6dafc28bba6a75f17f947f7fef051a87c5a.tar.gz
kdpkg-6bb0f6dafc28bba6a75f17f947f7fef051a87c5a.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdpkg@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdpkg-install/install.cpp')
-rw-r--r--kdpkg-install/install.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/kdpkg-install/install.cpp b/kdpkg-install/install.cpp
index 8e3efe8..1c738ec 100644
--- a/kdpkg-install/install.cpp
+++ b/kdpkg-install/install.cpp
@@ -222,16 +222,16 @@ TQStringList install::getVersions(TQString package)
TQStringList input = TQStringList::split( "\n", this->shell->getBuffer().stripWhiteSpace() );
TQString sysVersion = input[1];
- sysVersion = TQStringList::split( ":", sysVersion)[1].tqreplace(" ","");
+ sysVersion = TQStringList::split( ":", sysVersion)[1].replace(" ","");
- if( sysVersion.tqcontains("(") || sysVersion == "" )
+ if( sysVersion.contains("(") || sysVersion == "" )
sysVersion = i18n("not installed");
TQString repVersion = input[2];
- repVersion = TQStringList::split( ":", repVersion)[1].tqreplace(" ","");
+ repVersion = TQStringList::split( ":", repVersion)[1].replace(" ","");
- if( repVersion.tqcontains("(") || repVersion == "" )
+ if( repVersion.contains("(") || repVersion == "" )
repVersion = i18n("not available");
@@ -275,7 +275,7 @@ void install::showDependencies()
for(uint i = 0; i < allDepends.count(); i++)
{
- if( allDepends[i].tqcontains("|") ) {
+ if( allDepends[i].contains("|") ) {
tmp = TQStringList::split( " | ", allDepends[i] );
uint j = 0;
bool exit = FALSE;
@@ -294,10 +294,10 @@ void install::showDependencies()
}
}
- while (missingDepends.tqfind("(") != -1) {
- start_index = missingDepends.tqfind("(");
- stop_index = missingDepends.tqfind(")", start_index);
- missingDepends.tqreplace(start_index, stop_index-start_index+1, "");
+ while (missingDepends.find("(") != -1) {
+ start_index = missingDepends.find("(");
+ stop_index = missingDepends.find(")", start_index);
+ missingDepends.replace(start_index, stop_index-start_index+1, "");
}
this->shell->setCommand("apt-get -s install "+missingDepends);
this->shell->start(true);
@@ -309,10 +309,10 @@ void install::showDependencies()
TQString name = TQStringList::split( " ", installList[i] )[1];
TQString pkgVersion;
TQString sysVersion;
- if( installList[i].tqcontains("[") )
+ if( installList[i].contains("[") )
{
pkgVersion = TQStringList::split( " ", installList[i] )[3].mid(1);
- sysVersion = TQStringList::split( " ", installList[i] )[2].mid(1).tqreplace("]", "");
+ sysVersion = TQStringList::split( " ", installList[i] )[2].mid(1).replace("]", "");
}
else
pkgVersion = TQStringList::split( " ", installList[i] )[2].mid(1);
@@ -339,14 +339,14 @@ void install::showDependencies()
for(uint i = 0; i < input1.count(); i++)
{
- if( input1[i].tqcontains(pkgName) )
+ if( input1[i].contains(pkgName) )
{
TQStringList input2 = TQStringList::split( "\n", input1[i] );
TQString name = TQStringList::split( " ", input2.grep("Package:")[0] )[1];
TQString cVersion = input2.grep("Conflicts:")[0].mid(11); // conflictVersion
cVersion = TQStringList::split( ",", cVersion ).grep(pkgName)[0];
cVersion = TQStringList::split( "(", cVersion )[1];
- cVersion = cVersion.tqreplace(")", "");
+ cVersion = cVersion.replace(")", "");
TQString op = TQStringList::split( " ", cVersion )[0];
cVersion = TQStringList::split( " ", cVersion )[1];
@@ -370,12 +370,12 @@ void install::showDependencies()
// show packages which will be removed
TQString conflicts = fields.grep( "Conflicts" )[0].mid(11);
- conflicts = conflicts.tqreplace( ",", "" );
+ conflicts = conflicts.replace( ",", "" );
conflicts = conflicts+" "+rconflicts;
- while (conflicts.tqfind("(") != -1) {
- start_index = conflicts.tqfind("(");
- stop_index = conflicts.tqfind(")", start_index);
- conflicts.tqreplace(start_index, stop_index-start_index+1, "");
+ while (conflicts.find("(") != -1) {
+ start_index = conflicts.find("(");
+ stop_index = conflicts.find(")", start_index);
+ conflicts.replace(start_index, stop_index-start_index+1, "");
}
this->shell->setCommand("apt-get -s remove "+conflicts);
@@ -386,7 +386,7 @@ void install::showDependencies()
for(uint i = 0; i < removeList.count(); i++)
{
TQString name = TQStringList::split( " ", removeList[i] )[1];
- TQString sysVersion = TQStringList::split( " [", removeList[i] )[1].tqreplace("]", "");
+ TQString sysVersion = TQStringList::split( " [", removeList[i] )[1].replace("]", "");
TQListViewItem * item = new TQListViewItem( dependenciesListView, 0 );
item->setPixmap( 0, TQPixmap( m_kdePrefix + "/share/kdpkg/icons/remove.png") );
@@ -404,16 +404,16 @@ void install::showDependencies()
bool install::isInstalled(TQString input)
{
TQString package = TQStringList::split( " ", input )[0];
- TQString version = TQStringList::split( " (", input )[1].tqreplace(")", "");
+ TQString version = TQStringList::split( " (", input )[1].replace(")", "");
this->shell->setCommand("apt-cache policy "+package);
this->shell->start(true);
TQString sysVersion = TQStringList::split( "\n", this->shell->getBuffer().stripWhiteSpace() )[1];
- sysVersion = TQStringList::split( ":", sysVersion)[1].tqreplace(" ","");
+ sysVersion = TQStringList::split( ":", sysVersion)[1].replace(" ","");
- if( sysVersion.tqcontains("(") || sysVersion == "" )
+ if( sysVersion.contains("(") || sysVersion == "" )
return FALSE;
else if( version != "" )
{
@@ -468,7 +468,7 @@ bool install::isLocked()
{
this->shell->setCommand("apt-get install -s" );
this->shell->start(true);
- if( this->shell->getBuffer().stripWhiteSpace().tqcontains("...") )
+ if( this->shell->getBuffer().stripWhiteSpace().contains("...") )
return FALSE;
else
return TRUE;