Commit 40782679 authored by Christian Loose's avatar Christian Loose

Pass TagInfo to tagSelected() method instead of going

through the list of tags again.

svn path=/trunk/kdesdk/cervisia/; revision=199037
parent 08668f3d
......@@ -435,32 +435,26 @@ void LogDialog::revisionSelected(QString rev, bool rmb)
}
void LogDialog::tagSelected(QString tag, bool rmb)
void LogDialog::tagSelected(TagInfo* tag, bool rmb)
{
QPtrListIterator<TagInfo> it(tags);
for (; it.current(); ++it)
if (tag == it.current()->tag)
{
if (it.current()->branchpoint.isEmpty())
revisionSelected(it.current()->rev, rmb);
else
revisionSelected(it.current()->branchpoint, rmb);
return;
}
if (tag->branchpoint.isEmpty())
revisionSelected(tag->rev, rmb);
else
revisionSelected(tag->branchpoint, rmb);
}
void LogDialog::tagASelected(int n)
{
if (n)
tagSelected(tags.at(n-1)->tag, false);
tagSelected(tags.at(n-1), false);
}
void LogDialog::tagBSelected(int n)
{
if (n)
tagSelected(tags.at(n-1)->tag, true);
tagSelected(tags.at(n-1), true);
}
#include "logdlg.moc"
......
......@@ -71,11 +71,12 @@ private slots:
void diffClicked();
void annotateClicked();
void revisionSelected(QString rev, bool rmb);
void tagSelected(QString rev, bool rmb);
void tagASelected(int n);
void tagBSelected(int n);
private:
void tagSelected(TagInfo* tag, bool rmb);
struct Options {
QSize size;
bool showlisttab;
......
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