> Am 19.01.2016 um 08:09 schrieb Stephan Witt <st.w...@gmx.net>: > > Am 19.01.2016 um 07:56 schrieb Peter Kümmel <syntheti...@gmx.net>: >> >> Am 18. Januar 2016 23:25:03 MEZ, schrieb Pavel Sanda <sa...@lyx.org>: >> Stephan Witt wrote: >> The attached patch fixes the broken detection of GIT version control. >> It seems so that Qt is caching the file meta data and fools the test >> of file emptiness. Perhaps this has changed with Qt5 and didn???t happen >> with Qt4??? >> >> Bad news, if your analysis is correct, we might encounter the same problem >> in other parts of the code as well. I don't have easy access to qt5 to test. >> >> Quick check says we use is FileEmpty also in: >> Buffer.cpp: enable = (d->preview_file_).exists() && >> !(d->preview_file_).isFileEmpty(); >> LaTeX.cpp: rerun = idxfile.exists() && idxfile.isFileEmpty(); >> LaTeX.cpp: if (head.haschanged(nlofile) || (nlofile.exists() && >> nlofile.isFileEmpty())) >> >> Pavel >> >> I did not follow this git stuff, but I assume current implementation tries >> to use system git calls via Qt classes, am I right? > > No. It is hand crafted stuff. The problem is the temporary file to collect > the output of system calls. > After creation it’s empty - of course. The system call changes this and the > next call to QFileInfo::size() returns 0 on my system.
This is documented here: http://doc.qt.io/qt-5/qfileinfo.html I don’t know when this was changed and/or if this is/was platform dependent. Stephan > This I couldn’t debug further because of... I don’t know. In the past I’ve > been able to step into the Qt code. > After doing an upgrade of my OS and of the development system I have to get > it working again :( > > Stephan > >> I really could imagine this makes problems, because of Qt. >> >> Afaik QtCreator tries the same, is any code used from there in LyX? >> >> Had someone the idea to use libgit2 instead of the system git? Was it >> evaluated? > > No, this would add another external library to the list of dependencies…