For each QT-Creator one signal emitted
-
Hi,
I have a general understanding problem:I have an application with two different user roles student/teacher. Both of them use QfileSystemwatcher to watch out for changes in some CSV-Files.
Because both of them use the file in a different way, I wanted to run the app in two QT-Creator instances for debugging simultaneously.For every file which is changed, ann own signal is emitted by the watcher-class and I show for myself a qDebug() << "file xy was changed";
My understanding-problem:
If I have only one QT-Creator instance I see in this instance for each file change only one emitted signal .
But if I have 2 QT-Creator instances I see every signal two times in one Qt-creator instance and with three instances I see every signal three times (in one QT-Creator instance). Why is this happening? I thought every signal would be only visible for the actual app in the actual QT-Creator instance and not in every QT-creator instance...This is for example my output in one QT-Creator debugger but 3 QT-Creators are running
"CSVResults/results_per_user.csv was changed" "CSVResults/dfActivity.csv was changed" "CSVResults/TeacherProcAct.csv was changed" "CSVResults/TeacherProcAct.csv was changed" "CSVResults/assignments_overview.csv was changed" "CSVResults/results_per_user.csv was changed" "CSVResults/TeacherDiaTheoryTask.csv was changed" "CSVResults/dfActivity.csv was changed" "CSVResults/TeacherProcAct.csv was changed" "CSVResults/assignments_overview.csv was changed" "CSVResults/TeacherDiaTheoryTask.csv was changed" "CSVResults/TeacherDiaTheoryTask.csv was changed" "CSVResults/results_per_user.csv was changed" "CSVResults/dfActivity.csv was changed" "CSVResults/dfActivity.csv was changed" "CSVResults/TeacherProcAct.csv was changed" "CSVResults/assignments_overview.csv was changed" "CSVResults/TeacherDiaTheoryTask.csv was changed" "CSVResults/TeacherDiaTheoryTask.csv was changed"
And now I see it is sometimes even more but it seems that it could be normal that it is not always one file change and one emitted signal be qfilesystemwatcher https://forum.qt.io/topic/124818/qfilesystemwatcher-sends-2-signals-is-there-anyway-to-avoid-that/6
-
Hi,
Is your application modifying these files in response to the signals coming from QFilesystemWatcher ?
-
@SGaist the teacher role starts a process who writes into the csv-files and both user roles (student and teacher) get different responses. They present the csv-content in different qml-diagrams.
In this process each file is only written ones and not several times.
-
Are you sure that this process is not started by all the instances of your application ?