diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/gui.cpp | 25 | ||||
-rw-r--r-- | src/gui/gui.h | 4 |
2 files changed, 23 insertions, 6 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 160f982..bee6b0a 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -744,6 +744,7 @@ t_gui::t_gui(t_phone *_phone) : t_userintf(_phone), timerUpdateMessageSessions(N qRegisterMetaType<t_register_type>("t_register_type"); qRegisterMetaType<t_transfer_type>("t_transfer_type"); qRegisterMetaType<t_cf_type>("t_cf_type"); + qRegisterMetaType<string>("string"); qRegisterMetaType<std::list<std::string>>("std::list<std::string>"); mainWindow = new MphoneForm; @@ -2289,16 +2290,17 @@ bool t_gui::do_cb_ask_user_to_redirect_request(t_user *user_config, const t_url return permission; } -void t_gui::cb_ask_user_to_refer(t_user *user_config, const t_url &refer_to_uri, +void t_gui::do_cb_ask_user_to_refer(t_user *user_config, const string &refer_to_uri_str, const string &refer_to_display, - const t_url &referred_by_uri, + const string &referred_by_uri_str, const string &referred_by_display) { + t_url refer_to_uri(refer_to_uri_str); + t_url referred_by_uri(referred_by_uri_str); + QString s; QString title; - lock(); - title = PRODUCT_NAME; title.append(" - ").append(qApp->translate("GUI", "Transferring call")); @@ -2333,8 +2335,19 @@ void t_gui::cb_ask_user_to_refer(t_user *user_config, const t_url &refer_to_uri, ReferPermissionDialog *dialog = new ReferPermissionDialog(mainWindow, title, s); // Do not report to MEMMAN as Qt will auto destruct this dialog on close. dialog->show(); - - unlock(); +} + +void t_gui::cb_ask_user_to_refer(t_user *user_config, const t_url &refer_to_uri, + const string &refer_to_display, + const t_url &referred_by_uri, + const string &referred_by_display) +{ + QMetaObject::invokeMethod(this, "do_cb_ask_user_to_refer", + Q_ARG(t_user*, user_config), + Q_ARG(const string&, refer_to_uri.encode()), + Q_ARG(const string&, refer_to_display), + Q_ARG(const string&, referred_by_uri.encode()), + Q_ARG(const string&, referred_by_display)); } void t_gui::cb_show_msg(const string &msg, t_msg_priority prio) { diff --git a/src/gui/gui.h b/src/gui/gui.h index db27ad0..d0cada0 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -436,6 +436,10 @@ private slots: const string &display, t_method method); bool do_cb_ask_credentials(t_user *user_config, const string &realm, string &username, string &password); + void do_cb_ask_user_to_refer(t_user *user_config, const string &refer_to_uri_str, + const string &refer_to_display, + const string &referred_by_uri_str, + const string &referred_by_display); void do_cb_register_inprog(t_user *user_config, t_register_type register_type); }; |