Skip to content

Instantly share code, notes, and snippets.

@dubslow
Created October 19, 2014 15:39
Show Gist options
  • Save dubslow/45d8842ad3269a2b8cf1 to your computer and use it in GitHub Desktop.
Save dubslow/45d8842ad3269a2b8cf1 to your computer and use it in GitHub Desktop.
diff --git a/src/widget/form/settings/identityform.cpp b/src/widget/form/settings/identityform.cpp
index 691aa4d..491a650 100644
--- a/src/widget/form/settings/identityform.cpp
+++ b/src/widget/form/settings/identityform.cpp
@@ -108,8 +108,11 @@ void IdentityForm::onLoadClicked()
if (bodyUI->profiles->currentText() != Settings::getInstance().getCurrentProfile())
{
if (Core::getInstance()->anyActiveCalls())
+ {
+ prtinf("Detected a call, can't switch!\n");
QMessageBox::warning(this, tr("Call active", "popup title"),
tr("You can't switch profiles while a call is active!", "popup text"));
+ }
else
emit Widget::getInstance()->changeProfile(bodyUI->profiles->currentText());
// I think by directly calling the function, I may have been causing thread issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment