qmake vc(x)proj generator: don't create bogus directories

When creating the temporary project object,
Option::output_dir must be adjusted temporarily.

Task-number: QTBUG-22788
Change-Id: Ibf8897a46b63f48b9e33d7e2168b09e559cecec7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Joerg Bornemann 2012-04-16 16:09:18 +02:00 committed by Qt by Nokia
parent 8987e5d2cb
commit ac7dd2782f

View File

@ -476,10 +476,13 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
// and to be able to extract all the dependencies
Option::QMAKE_MODE old_mode = Option::qmake_mode;
Option::qmake_mode = Option::QMAKE_GENERATE_NOTHING;
QString old_output_dir = Option::output_dir;
Option::output_dir = QFileInfo(fileFixify(dir, qmake_getpwd(), Option::output_dir)).canonicalFilePath();
VcprojGenerator tmp_vcproj;
tmp_vcproj.setNoIO(true);
tmp_vcproj.setProjectFile(&tmp_proj);
Option::qmake_mode = old_mode;
Option::output_dir = old_output_dir;
if(Option::debug_level) {
debug_msg(1, "Dumping all variables:");
QHash<QString, QStringList> &vars = tmp_proj.variables();