зеркало из https://github.com/mozilla/pjs.git
work on favorite folders backend, make NotifyPropertyChanged virtual so it can be overridden sr=mscott 251296
This commit is contained in:
Родитель
8a55025a38
Коммит
faa39a9d7c
|
@ -438,30 +438,29 @@ nsMsgRDFDataSource::changeEnumFunc(nsISupports *aElement, void *aData)
|
|||
nsresult
|
||||
nsMsgRDFDataSource::GetTransactionManager(nsISupportsArray *aSources, nsITransactionManager **aTransactionManager)
|
||||
{
|
||||
if(!aTransactionManager)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
*aTransactionManager = nsnull;
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsITransactionManager> transactionManager;
|
||||
|
||||
PRUint32 cnt;
|
||||
|
||||
rv = aSources->Count(&cnt);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (cnt > 0)
|
||||
{
|
||||
transactionManager = do_QueryElementAt(aSources, 0, &rv);
|
||||
if (NS_SUCCEEDED(rv) && transactionManager)
|
||||
{
|
||||
aSources->RemoveElementAt(0);
|
||||
*aTransactionManager = transactionManager;
|
||||
NS_IF_ADDREF(*aTransactionManager);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
if(!aTransactionManager)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
*aTransactionManager = nsnull;
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsCOMPtr<nsITransactionManager> transactionManager;
|
||||
|
||||
PRUint32 cnt;
|
||||
|
||||
rv = aSources->Count(&cnt);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (cnt > 0)
|
||||
{
|
||||
transactionManager = do_QueryElementAt(aSources, 0, &rv);
|
||||
if (NS_SUCCEEDED(rv) && transactionManager)
|
||||
{
|
||||
aSources->RemoveElementAt(0);
|
||||
NS_IF_ADDREF(*aTransactionManager = transactionManager);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
class nsMsgRDFDataSource : public nsIRDFDataSource,
|
||||
public nsIObserver,
|
||||
public nsSupportsWeakReference,
|
||||
public nsIMsgRDFDataSource
|
||||
public nsIMsgRDFDataSource
|
||||
{
|
||||
public:
|
||||
nsMsgRDFDataSource();
|
||||
|
@ -78,7 +78,7 @@ class nsMsgRDFDataSource : public nsIRDFDataSource,
|
|||
nsIRDFNode *newObject, nsIRDFNode *oldObject,
|
||||
PRBool assert, PRBool change);
|
||||
|
||||
nsresult NotifyPropertyChanged(nsIRDFResource *resource,
|
||||
virtual nsresult NotifyPropertyChanged(nsIRDFResource *resource,
|
||||
nsIRDFResource *propertyResource, nsIRDFNode *newNode,
|
||||
nsIRDFNode *oldNode = nsnull);
|
||||
nsresult GetTransactionManager(nsISupportsArray *sources, nsITransactionManager **aTransactionManager);
|
||||
|
|
Загрузка…
Ссылка в новой задаче