summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2015-04-17 10:39:30 +0200
committerMichal Kubecek <mkubecek@suse.cz>2015-04-17 10:59:41 +0200
commit60fb764bd8c1bac1c178bd470aa1bf5fa6d3851e (patch)
tree829557353b72e3d1efc7dd29076e234a028922d4 /src
parent26b6507eb1d53b5dee19e16d5ab18d82cd32d74b (diff)
downloadtwinkle-60fb764bd8c1bac1c178bd470aa1bf5fa6d3851e.tar
twinkle-60fb764bd8c1bac1c178bd470aa1bf5fa6d3851e.tar.gz
twinkle-60fb764bd8c1bac1c178bd470aa1bf5fa6d3851e.tar.lz
twinkle-60fb764bd8c1bac1c178bd470aa1bf5fa6d3851e.tar.xz
twinkle-60fb764bd8c1bac1c178bd470aa1bf5fa6d3851e.zip
replace more GUI accesses from non-GUI threads
There are more methods of MPhoneForm that must not be called from non-GUI threads but were called directly via t_gui callbacks: updateLog() updateCallHistory() updateMissedCallStatus() Again, replace direct calls with (queued) signal/slot connections.
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui.cpp15
-rw-r--r--src/gui/gui.h3
2 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 74fc0a4..6a50bf3 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -655,6 +655,9 @@ t_gui::t_gui(t_phone *_phone) : t_userintf(_phone), timerUpdateMessageSessions(N
connect(this, SIGNAL(update_state()), mainWindow, SLOT(updateState()));
connect(this, SIGNAL(mw_display(const QString&)), mainWindow, SLOT(display(const QString&)));
connect(this, SIGNAL(mw_display_header()), mainWindow, SLOT(displayHeader()));
+ connect(this, SIGNAL(mw_update_log(bool)), mainWindow, SLOT(updateLog(bool)));
+ connect(this, SIGNAL(mw_update_call_history()), mainWindow, SLOT(updateCallHistory()));
+ connect(this, SIGNAL(mw_update_missed_call_status(int)), mainWindow, SLOT(updateMissedCallStatus(int)));
}
t_gui::~t_gui() {
@@ -2278,21 +2281,15 @@ void t_gui::cb_display_msg(const string &msg, t_msg_priority prio) {
}
void t_gui::cb_log_updated(bool log_zapped) {
- lock();
- mainWindow->updateLog(log_zapped);
- unlock();
+ emit mw_update_log(log_zapped);
}
void t_gui::cb_call_history_updated(void) {
- lock();
- mainWindow->updateCallHistory();
- unlock();
+ emit mw_update_call_history();
}
void t_gui::cb_missed_call(int num_missed_calls) {
- lock();
- mainWindow->updateMissedCallStatus(num_missed_calls);
- unlock();
+ emit mw_update_missed_call_status(num_missed_calls);
}
void t_gui::cb_nat_discovery_progress_start(int num_steps) {
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 36302cf..9c0cb3b 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -391,6 +391,9 @@ signals:
void update_state();
void mw_display(const QString& s);
void mw_display_header();
+ void mw_update_log(bool log_zapped);
+ void mw_update_call_history();
+ void mw_update_missed_call_status(int num_missed_calls);
private slots:
/**