Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个从CBase、MConnectionMonitorObserver和QObject(用于信号)派生的自定义观察者类,我用它来观察来自RConnectionMonitor.
CBase
MConnectionMonitorObserver
QObject
RConnectionMonitor
当我调用RConnectionMonitor::NotifyEventL传递的观察者实例时,应用程序崩溃说线程已经恐慌。
RConnectionMonitor::NotifyEventL
我在这里要做的是在不阻塞主线程的情况下异步监听网络事件。
编辑:我应该使用活动对象来保存 RConnectionMonitor 对象吗?
此致
正如@James 评论的那样,问题是我在建立与连接监视器服务器的连接之前正在注册事件。