Solving the uploading different source of file problem

add disconnect method for qsensor thread.

call more function to stop the thread and set the handler to other
state.