protected void Init(VersionInformation versionInfo) { string filename = versionInfo.qtDir + "\\mkspecs\\default\\qmake.conf"; fileInfo = new FileInfo(filename); // Starting from Qt5 beta2 there is no more "\\mkspecs\\default" folder available // To find location of "qmake.conf" there is a need to run "qmake -query" command // This is what happens below. if (!fileInfo.Exists) { QMakeQuery qmakeQuery = new QMakeQuery(versionInfo); qmakeQuery.ReadyEvent += new QMakeQuery.EventHandler(this.CloseEventHandler); System.Threading.Thread qmakeThread = new System.Threading.Thread(new ThreadStart(qmakeQuery.RunQMakeQuery)); qmakeThread.Start(); qmakeThread.Join(); if (qmakeQuery.ErrorValue != 0) { throw new QtVSException("qmake.conf not found"); } if (qmakespecFolder.Length > 0) { filename = versionInfo.qtDir + "\\mkspecs\\" + qmakespecFolder + "\\qmake.conf"; } } Init(filename); }
protected void Init(VersionInformation versionInfo) { string filename = versionInfo.qtDir + "\\mkspecs\\default\\qmake.conf"; fileInfo = new FileInfo(filename); // Starting from Qt5 beta2 there is no more "\\mkspecs\\default" folder available // To find location of "qmake.conf" there is a need to run "qmake -query" command // This is what happens below. if (!fileInfo.Exists) { QMakeQuery qmakeQuery = new QMakeQuery(versionInfo); qmakeQuery.ReadyEvent += new QMakeQuery.EventHandler(this.CloseEventHandler); System.Threading.Thread qmakeThread = new System.Threading.Thread(new ThreadStart(qmakeQuery.RunQMakeQuery)); qmakeThread.Start(); qmakeThread.Join(); if (qmakeQuery.ErrorValue == 0 && qmakespecFolder.Length > 0) { filename = versionInfo.qtDir + "\\mkspecs\\" + qmakespecFolder + "\\qmake.conf"; fileInfo = new FileInfo(filename); } if (qmakeQuery.ErrorValue != 0 || !fileInfo.Exists) throw new QtVSException("qmake.conf expected at " + filename + " not found"); } Init(filename); }