diff options
author | Sami Lempinen <sami.lempinen@nokia.com> | 2011-09-20 12:59:45 +0300 |
---|---|---|
committer | Sami Lempinen <sami.lempinen@nokia.com> | 2011-09-20 12:59:45 +0300 |
commit | 03645fccea8f2bf997ed4191d7a67a0e93a977d6 (patch) | |
tree | b9f1490bacd05aea265783bfb5d9e40fe6b2b0dc /qmake | |
parent | a0ad54acd33873316908080f432768fdf3e3bfc2 (diff) | |
parent | 367a89cf5cb1282d2e966c83869a56fd22745779 (diff) |
Merge remote-tracking branch 'qt/4.8'
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.cpp | 4 | ||||
-rw-r--r-- | qmake/option.cpp | 59 |
2 files changed, 5 insertions, 58 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index f50afc3684..0b201b8723 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -1524,8 +1524,8 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCEventTool &tool) { xml << tag(tool.EventName) - << attrTagS(_Command, tool.CommandLine.join(vcxCommandSeparator())) - << attrTagS(_Message, tool.Description) + << tag(_Command) << valueTag(tool.CommandLine.join(vcxCommandSeparator())) + << tag(_Message) << valueTag(tool.Description) << closetag(tool.EventName); } diff --git a/qmake/option.cpp b/qmake/option.cpp index 31372ab815..c3e89de818 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -750,64 +750,11 @@ qmakeAddCacheClear(qmakeCacheClearFunc func, void **data) cache_items.append(new QMakeCacheClearItem(func, data)); } -#ifdef Q_OS_WIN -# include <windows.h> - -QT_USE_NAMESPACE -#endif - QString qmake_libraryInfoFile() { - QString ret; -#if defined( Q_OS_WIN ) - wchar_t module_name[MAX_PATH]; - GetModuleFileName(0, module_name, MAX_PATH); - QFileInfo filePath = QString::fromWCharArray(module_name); - ret = filePath.filePath(); -#else - QString argv0 = QFile::decodeName(QByteArray(Option::application_argv0)); - QString absPath; - - if (!argv0.isEmpty() && argv0.at(0) == QLatin1Char('/')) { - /* - If argv0 starts with a slash, it is already an absolute - file path. - */ - absPath = argv0; - } else if (argv0.contains(QLatin1Char('/'))) { - /* - If argv0 contains one or more slashes, it is a file path - relative to the current directory. - */ - absPath = QDir::current().absoluteFilePath(argv0); - } else { - /* - Otherwise, the file path has to be determined using the - PATH environment variable. - */ - QByteArray pEnv = qgetenv("PATH"); - QDir currentDir = QDir::current(); - QStringList paths = QString::fromLocal8Bit(pEnv.constData()).split(QLatin1String(":")); - for (QStringList::const_iterator p = paths.constBegin(); p != paths.constEnd(); ++p) { - if ((*p).isEmpty()) - continue; - QString candidate = currentDir.absoluteFilePath(*p + QLatin1Char('/') + argv0); - QFileInfo candidate_fi(candidate); - if (candidate_fi.exists() && !candidate_fi.isDir()) { - absPath = candidate; - break; - } - } - } - - absPath = QDir::cleanPath(absPath); - - QFileInfo fi(absPath); - ret = fi.exists() ? fi.canonicalFilePath() : QString(); -#endif - if(!ret.isEmpty()) - ret = QDir(QFileInfo(ret).absolutePath()).filePath("qt.conf"); - return ret; + if(!Option::qmake_abslocation.isEmpty()) + return QDir(QFileInfo(Option::qmake_abslocation).absolutePath()).filePath("qt.conf"); + return QString(); } QT_END_NAMESPACE |