888 void CpDivertPluginGroup::updateDependentDivertOptions(bool fetchFromNetwork) |
894 void CpDivertPluginGroup::updateDependentDivertOptions(bool fetchFromNetwork) |
889 { |
895 { |
890 DPRINT << ": IN"; |
896 DPRINT << ": IN"; |
891 |
897 |
892 // all calls divert activation deactivates automatically other diverts |
898 // all calls divert activation deactivates automatically other diverts |
893 QVariant itemState = m_DataItemVoiceAllCalls->contentWidgetData("checkState"); |
899 QVariant itemState = |
894 if ((itemState.isValid()) && |
900 m_DataItemVoiceAllCalls->contentWidgetData("checkState"); |
895 (itemState.toInt() == Qt::Checked) && |
901 if(ServiceGroupVoice & m_serviceGroup){ |
896 (m_DataItemVoiceAllCalls->contentWidgetData("text") != "")) { |
902 if ((itemState.isValid()) && |
897 deactivateDependentDivertOption(m_DataItemVoiceIfBusy); |
903 (itemState.toInt() == Qt::Checked) && |
898 deactivateDependentDivertOption(m_DataItemVoiceIfNotAnswered); |
904 (m_DataItemVoiceAllCalls->contentWidgetData("text") != "")) { |
899 deactivateDependentDivertOption(m_DataItemVoiceIfOutOfReach); |
905 deactivateDependentDivertOption(m_DataItemVoiceIfBusy); |
900 } else { |
906 deactivateDependentDivertOption(m_DataItemVoiceIfNotAnswered); |
901 // Must query data for diverts depending on all calls divert, because |
907 deactivateDependentDivertOption(m_DataItemVoiceIfOutOfReach); |
902 // data may have been lost for registered diverts, which were |
908 } else { |
903 // automatically deactivated due to the activation of all calls divert. |
909 // Must query data for diverts depending on all calls divert, |
904 activateDependentDivertOption(m_DataItemVoiceIfBusy, fetchFromNetwork); |
910 // because data may have been lost for registered diverts, |
905 activateDependentDivertOption(m_DataItemVoiceIfNotAnswered, fetchFromNetwork); |
911 // which were automatically deactivated due to the activation |
906 activateDependentDivertOption(m_DataItemVoiceIfOutOfReach, fetchFromNetwork); |
912 // of all calls divert. |
907 } |
913 activateDependentDivertOption( |
908 |
914 m_DataItemVoiceIfBusy, fetchFromNetwork); |
909 // all calls divert activation deactivates automatically other diverts |
915 activateDependentDivertOption( |
910 itemState = m_DataItemVideoAllCalls->contentWidgetData("checkState"); |
916 m_DataItemVoiceIfNotAnswered, fetchFromNetwork); |
911 if ((itemState.isValid()) && |
917 activateDependentDivertOption( |
912 (itemState.toInt() == Qt::Checked) && |
918 m_DataItemVoiceIfOutOfReach, fetchFromNetwork); |
913 (m_DataItemVideoAllCalls->contentWidgetData("text") != "")) { |
919 } |
914 deactivateDependentDivertOption(m_DataItemVideoIfBusy); |
920 } |
915 deactivateDependentDivertOption(m_DataItemVideoIfNotAnswered); |
921 if (ServiceGroupData & m_serviceGroup){ |
916 deactivateDependentDivertOption(m_DataItemVideoIfOutOfReach); |
922 // all calls divert activation deactivates automatically other diverts |
917 } else { |
923 itemState = m_DataItemVideoAllCalls->contentWidgetData("checkState"); |
918 // Must query data for diverts depending on all calls divert, because |
924 if ((itemState.isValid()) && |
919 // data may have been lost for registered diverts, which were |
925 (itemState.toInt() == Qt::Checked) && |
920 // automatically deactivated due to the activation of all calls divert. |
926 (m_DataItemVideoAllCalls->contentWidgetData("text") != "")) { |
921 activateDependentDivertOption(m_DataItemVideoIfBusy, fetchFromNetwork); |
927 deactivateDependentDivertOption(m_DataItemVideoIfBusy); |
922 activateDependentDivertOption(m_DataItemVideoIfNotAnswered, fetchFromNetwork); |
928 deactivateDependentDivertOption(m_DataItemVideoIfNotAnswered); |
923 activateDependentDivertOption(m_DataItemVideoIfOutOfReach, fetchFromNetwork); |
929 deactivateDependentDivertOption(m_DataItemVideoIfOutOfReach); |
924 } |
930 } else { |
925 |
931 // Must query data for diverts depending on all calls divert, |
|
932 // because data may have been lost for registered diverts, |
|
933 // which were automatically deactivated due to the activation |
|
934 // of all calls divert. |
|
935 activateDependentDivertOption( |
|
936 m_DataItemVideoIfBusy, fetchFromNetwork); |
|
937 activateDependentDivertOption( |
|
938 m_DataItemVideoIfNotAnswered, fetchFromNetwork); |
|
939 activateDependentDivertOption( |
|
940 m_DataItemVideoIfOutOfReach, fetchFromNetwork); |
|
941 } |
|
942 } |
926 // update not available divert option |
943 // update not available divert option |
927 updateNotAvailableDivertOption(); |
944 updateNotAvailableDivertOption(); |
928 |
945 |
929 DPRINT << ": OUT"; |
946 DPRINT << ": OUT"; |
930 } |
947 } |