QFileDialog only works once after a reboot (otherwise it prints an error)

Problem

I am using QFileDialog. This worked very well, and I hardly raised the question.

After a reboot, the code below works as expected. Then, if I close the application and restart it, the modal window will take a lot of time and never display folders.

After a while (5-10 seconds), a pop-up window appears that says something like this: "[Error] The process associated with the file protocol stopped unexpectedly" (Mine is written in French)

Has anyone experienced this?

EDIT: Last line of debug before error

When it works (after reboot), I launch the application, and when I leave it, debugging reads

Cancelled FAM (Req 2) for "/media/Donnees/Videos_tmp" Cancelled FAM (Req 1) for "/media/Donnees" 

I think the problem is in these two lines.

System

ArchLinux 3.16.1

Code example:

 int main(int argc, char *argv[]) { QApplication app(argc, argv); MainWindow l_mainWindow; l_mainWindow.show(); QString l_folder = QFileDialog::getOpenFileName(); qDebug() << l_folder; return app.exec(); } 

Console information

 QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Aucun fichier ou dossier de ce type QObject::connect: No such signal org::freedesktop::UPower::DeviceAdded(QString) QObject::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QString) "L'URL ne peut être listée trash:/" "L'URL ne peut être listée trash:/" Added Dir "/media/Donnees/Documents/Projets/" for "" ["KDirWatch-1"] Setup FAM (Req 1) for "/media/Donnees/Documents/Projets/" Added Dir "/media/Donnees/Documents/Projets/subfold" for "" ["KDirWatch-1"] Setup FAM (Req 2) for "/media/Donnees/Documents/Projets/subfold" Cancelled FAM (Req 1) for "/media/Donnees/Documents/Projets/" QFileInfo::absolutePath: Constructed with empty filename QFileInfo::absolutePath: Constructed with empty filename QFileInfo::absolutePath: Constructed with empty filename QFileInfo::absolutePath: Constructed with empty filename QFileInfo::absolutePath: Constructed with empty filename QFileInfo::absolutePath: Constructed with empty filename QFileInfo::absolutePath: Constructed with empty filename QFileInfo::absolutePath: Constructed with empty filename QFileInfo::absolutePath: Constructed with empty filename Trying to open ksycoca from "/home/olivier/.cache/ksycoca5" KServiceTypeTrader: serviceType "KNotify/NotifyMethod" not found Got configs "knotifications5/plasma_workspace.notifyrc" "plasma_workspace.notifyrc" Got groups () Got notification " "messageCritical" " with actions: "" QFileInfo::absolutePath: Constructed with empty filename QFileInfo::absolutePath: Constructed with empty filename QFileInfo::absolutePath: Constructed with empty filename QFileInfo::absolutePath: Constructed with empty filename QFileInfo::absolutePath: Constructed with empty filename QFileInfo::absolutePath: Constructed with empty filename 
+5
source share
1 answer

Ok, that was ...

I had kf5 (= kde5) and kde4 which were in conflict. Since I removed the kf5 framework, the error went away.

Thank you guys for your time.

0
source

Source: https://habr.com/ru/post/1202060/


All Articles