treeitem.cpp
changeset 823 0bba81dde1bc
parent 822 c2ce9944148c
child 841 46553c106c52
     1.1 --- a/treeitem.cpp	Wed Feb 10 13:48:42 2010 +0000
     1.2 +++ b/treeitem.cpp	Fri Feb 19 13:47:03 2010 +0000
     1.3 @@ -52,7 +52,7 @@
     1.4  {
     1.5  	model=NULL;
     1.6  
     1.7 -	// Reset ID  //FIXME-2 compare objID (string), so far only used for xLinks during load/save (Id=selString)
     1.8 +	// Assign ID  
     1.9  	idLast++;
    1.10  	id=idLast;
    1.11  
    1.12 @@ -342,9 +342,26 @@
    1.13  {
    1.14  	url=u;
    1.15  	if (!url.isEmpty())
    1.16 -		systemFlags.activate ("system-url");
    1.17 +	{
    1.18 +		if (url.contains ("bugzilla.novell.com"))
    1.19 +		{
    1.20 +			systemFlags.activate ("system-url-bugzilla-novell");
    1.21 +			if (systemFlags.isActive ("system-url"))
    1.22 +				systemFlags.deactivate ("system-url");
    1.23 +		} else
    1.24 +		{
    1.25 +			systemFlags.activate ("system-url");
    1.26 +			if (systemFlags.isActive ("system-url-bugzilla-novell"))
    1.27 +				systemFlags.deactivate ("system-url-bugzilla-novell");
    1.28 +		}
    1.29 +	}
    1.30  	else
    1.31 -		systemFlags.deactivate ("system-url");
    1.32 +	{
    1.33 +		if (systemFlags.isActive ("system-url"))
    1.34 +			systemFlags.deactivate ("system-url");
    1.35 +		if (systemFlags.isActive ("system-url-bugzilla-novell"))
    1.36 +			systemFlags.deactivate ("system-url-bugzilla-novell");
    1.37 +	}
    1.38  }
    1.39  
    1.40  QString TreeItem::getURL ()
    1.41 @@ -520,14 +537,10 @@
    1.42  
    1.43  TreeItem* TreeItem::findID (const uint &n)
    1.44  {
    1.45 -	if (n>=0 && n<childItems.count() )
    1.46 -	{
    1.47 -		for (int i=0;i<childItems.count(); i++)
    1.48 -			if (n==childItems.at(i)->id)
    1.49 -				return childItems.at(n);
    1.50 -	}
    1.51 -	else
    1.52 -		return NULL;
    1.53 +	for (int i=0;i<childItems.count(); i++)
    1.54 +		if (n==childItems.at(i)->id)
    1.55 +			return childItems.at(n);
    1.56 +	return NULL;
    1.57  }
    1.58  
    1.59  
    1.60 @@ -635,14 +648,14 @@
    1.61  }
    1.62  
    1.63  
    1.64 -void TreeItem::setHideTmp (HideTmpMode mode)  //FIXME-2	update visibility in derived objects
    1.65 +void TreeItem::setHideTmp (HideTmpMode mode)  //FIXME-3	update visibility in derived objects
    1.66  {
    1.67  	if (type==Image || type==Branch || type==MapCenter)
    1.68  //		((ImageItem*)this)->updateVisibility();
    1.69  	{
    1.70  		LinkableMapObj* lmo=((MapItem*)this)->getLMO();
    1.71  
    1.72 -		if (mode==HideExport && (hideExport || hasHiddenExportParent() ) ) // FIXME-2  try to avoid calling hasScrolledParent repeatedly
    1.73 +		if (mode==HideExport && (hideExport || hasHiddenExportParent() ) ) // FIXME-3  try to avoid calling hasScrolledParent repeatedly
    1.74  
    1.75  		{
    1.76  			// Hide stuff according to hideExport flag and parents