Added a new setting to channels to enable/disable threaded loading.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7484 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2014-08-06 17:41:22 +00:00
parent 27c2ed0a97
commit f60b37a213
7 changed files with 83 additions and 24 deletions

View file

@ -311,6 +311,9 @@ bool UIStateHelper::isWidgetVisible(QWidget *widget)
}
if (visible) {
int visibleCount = 0;
int invisibleCount = 0;
QMap<long, UIStateHelperData*>::iterator dataIt;
for (dataIt = mData.begin(); dataIt != mData.end(); ++dataIt) {
UIStateHelperData *data = dataIt.value();
@ -323,32 +326,42 @@ bool UIStateHelper::isWidgetVisible(QWidget *widget)
if (states & (UISTATE_LOADING_VISIBLE | UISTATE_LOADING_INVISIBLE)) {
if (states & UISTATE_LOADING_VISIBLE) {
if (!data->mLoading) {
visible = false;
break;
if (data->mLoading) {
++visibleCount;
} else {
++invisibleCount;
}
} else if (states & UISTATE_LOADING_INVISIBLE) {
if (data->mLoading) {
visible = false;
break;
++invisibleCount;
} else {
++visibleCount;
}
}
}
if (states & (UISTATE_ACTIVE_VISIBLE | UISTATE_ACTIVE_INVISIBLE)) {
if (states & UISTATE_ACTIVE_VISIBLE) {
if (!data->mActive) {
visible = false;
break;
if (data->mActive) {
++visibleCount;
} else {
++invisibleCount;
}
} else if (states & UISTATE_ACTIVE_INVISIBLE) {
if (data->mActive) {
visible = false;
break;
++invisibleCount;
} else {
++visibleCount;
}
}
}
}
if (visibleCount + invisibleCount) {
if (!visibleCount) {
visible = false;
}
}
}
return visible;