Commit 9b6075a9 authored by Christian Loose's avatar Christian Loose
Browse files

left(x) == "..." --> startsWith("...")

svn path=/trunk/kdesdk/cervisia/; revision=196215
parent cdb2057e
......@@ -45,7 +45,7 @@ public:
QString rsh() const
{
QString str = text(1);
return (str.left(5) == "ext (")? str.mid(5, str.length()-6) : QString::null;
return (str.startsWith("ext (")? str.mid(5, str.length()-6) : QString::null);
}
int compression() const
{
......@@ -60,7 +60,7 @@ RepositoryListItem::RepositoryListItem(QListView *parent, const QString &repo, b
setText(0, repo);
QString status;
if (repo.left(9) == ":pserver:")
if (repo.startsWith(":pserver:"))
status = loggedin? i18n("Logged in") : i18n("Not logged in");
else
status = i18n("No login required");
......@@ -73,7 +73,7 @@ void RepositoryListItem::setRsh(const QString &rsh)
QString repo = repository();
QString method;
if (repo.left(9) == ":pserver:")
if (repo.startsWith(":pserver:"))
method = "pserver";
else if (repo.contains(':'))
{
......@@ -449,7 +449,7 @@ void AddRepositoryDialog::setRepository(const QString &repo)
void AddRepositoryDialog::repoChanged()
{
QString repo = repository();
rsh_edit->setEnabled(repo.left(9) != ":pserver:"
rsh_edit->setEnabled((!repo.startsWith(":pserver:"))
&& repo.contains(":"));
compression_group->setEnabled(repo.contains(":"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment