diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-14 15:49:56 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-14 15:49:56 (GMT) |
commit | 8fd9cbc859346d758bb730e85c679635f00940df (patch) | |
tree | bc3b10d79a458933b1f481bd7e88d1a633e7bc1e /qmake | |
parent | 65b788014759fa06d65d1677b3dbd5cc4b596f6b (diff) | |
parent | 06af27069497a693f5b1a867b29d96297f68eb75 (diff) | |
download | Qt-8fd9cbc859346d758bb730e85c679635f00940df.zip Qt-8fd9cbc859346d758bb730e85c679635f00940df.tar.gz Qt-8fd9cbc859346d758bb730e85c679635f00940df.tar.bz2 |
Merge branch 'qtwebkit-4.6-staging' into qtscript-jsc-backend
Conflicts:
src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
src/script/qscriptecmafunction.cpp
src/script/qscriptecmaglobal.cpp
src/script/qscriptengine.cpp
src/script/qscriptengine_p.cpp
src/script/qscriptenginefwd_p.h
src/script/qscriptextqobject.cpp
src/script/qscriptextqobject_p.h
tests/auto/qscriptqobject/tst_qscriptqobject.cpp
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/metamakefile.cpp | 9 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 46 | ||||
-rw-r--r-- | qmake/option.cpp | 13 | ||||
-rw-r--r-- | qmake/project.cpp | 6 |
4 files changed, 21 insertions, 53 deletions
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index 233e8e5..7f4e914 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -136,7 +136,12 @@ BuildsMetaMakefileGenerator::init() Build *build = new Build; build->name = name; build->makefile = createMakefileGenerator(project, false); - makefiles += build; + if (build->makefile){ + makefiles += build; + }else { + delete build; + return false; + } } return true; } @@ -437,7 +442,7 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO) QString gen = proj->first("MAKEFILE_GENERATOR"); if(gen.isEmpty()) { - fprintf(stderr, "No generator specified in config file: %s\n", + fprintf(stderr, "MAKEFILE_GENERATOR variable not set as a result of parsing : %s. Possibly qmake was not able to find files included using \"include(..)\" - enable qmake debugging to investigate more.\n", proj->projectFile().toLatin1().constData()); } else if(gen == "UNIX") { mkfile = new UnixMakefileGenerator; diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 079aa9f..5f250bf 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -120,14 +120,7 @@ static QString readRegistryKey(HKEY parentHandle, const QString &rSubkey) QString rSubkeyPath = keyPath(rSubkey); HKEY handle = 0; - LONG res; - QT_WA( { - res = RegOpenKeyExW(parentHandle, (WCHAR*)rSubkeyPath.utf16(), - 0, KEY_READ, &handle); - } , { - res = RegOpenKeyExA(parentHandle, rSubkeyPath.toLocal8Bit(), - 0, KEY_READ, &handle); - } ); + LONG res = RegOpenKeyEx(parentHandle, (wchar_t*)rSubkeyPath.utf16(), 0, KEY_READ, &handle); if (res != ERROR_SUCCESS) return QString(); @@ -135,11 +128,7 @@ static QString readRegistryKey(HKEY parentHandle, const QString &rSubkey) // get the size and type of the value DWORD dataType; DWORD dataSize; - QT_WA( { - res = RegQueryValueExW(handle, (WCHAR*)rSubkeyName.utf16(), 0, &dataType, 0, &dataSize); - }, { - res = RegQueryValueExA(handle, rSubkeyName.toLocal8Bit(), 0, &dataType, 0, &dataSize); - } ); + res = RegQueryValueEx(handle, (wchar_t*)rSubkeyName.utf16(), 0, &dataType, 0, &dataSize); if (res != ERROR_SUCCESS) { RegCloseKey(handle); return QString(); @@ -147,13 +136,8 @@ static QString readRegistryKey(HKEY parentHandle, const QString &rSubkey) // get the value QByteArray data(dataSize, 0); - QT_WA( { - res = RegQueryValueExW(handle, (WCHAR*)rSubkeyName.utf16(), 0, 0, - reinterpret_cast<unsigned char*>(data.data()), &dataSize); - }, { - res = RegQueryValueExA(handle, rSubkeyName.toLocal8Bit(), 0, 0, - reinterpret_cast<unsigned char*>(data.data()), &dataSize); - } ); + res = RegQueryValueEx(handle, (wchar_t*)rSubkeyName.utf16(), 0, 0, + reinterpret_cast<unsigned char*>(data.data()), &dataSize); if (res != ERROR_SUCCESS) { RegCloseKey(handle); return QString(); @@ -163,11 +147,7 @@ static QString readRegistryKey(HKEY parentHandle, const QString &rSubkey) switch (dataType) { case REG_EXPAND_SZ: case REG_SZ: { - QT_WA( { - result = QString::fromUtf16(((const ushort*)data.constData())); - }, { - result = QString::fromLatin1(data.constData()); - } ); + result = QString::fromWCharArray(((const wchar_t *)data.constData())); break; } @@ -175,12 +155,7 @@ static QString readRegistryKey(HKEY parentHandle, const QString &rSubkey) QStringList l; int i = 0; for (;;) { - QString s; - QT_WA( { - s = QString::fromUtf16((const ushort*)data.constData() + i); - }, { - s = QString::fromLatin1(data.constData() + i); - } ); + QString s = QString::fromWCharArray((const wchar_t *)data.constData() + i); i += s.length() + 1; if (s.isEmpty()) @@ -193,11 +168,7 @@ static QString readRegistryKey(HKEY parentHandle, const QString &rSubkey) case REG_NONE: case REG_BINARY: { - QT_WA( { - result = QString::fromUtf16((const ushort*)data.constData(), data.size()/2); - }, { - result = QString::fromLatin1(data.constData(), data.size()); - } ); + result = QString::fromWCharArray((const wchar_t *)data.constData(), data.size() / 2); break; } @@ -1268,9 +1239,8 @@ void VcprojGenerator::initDeploymentTool() foreach(QString item, project->values("DEPLOYMENT")) { // get item.path QString devicePath = project->first(item + ".path"); - // if the path does not exist, skip it if (devicePath.isEmpty()) - continue; + devicePath = targetPath; // check if item.path is relative (! either /,\ or %) if (!(devicePath.at(0) == QLatin1Char('/') || devicePath.at(0) == QLatin1Char('\\') diff --git a/qmake/option.cpp b/qmake/option.cpp index 0e4a608..5f8c4f4 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -716,16 +716,9 @@ QString qmake_libraryInfoFile() { QString ret; #if defined( Q_OS_WIN ) - QFileInfo filePath; - QT_WA({ - unsigned short module_name[256]; - GetModuleFileNameW(0, reinterpret_cast<wchar_t *>(module_name), sizeof(module_name)); - filePath = QString::fromUtf16(module_name); - }, { - char module_name[256]; - GetModuleFileNameA(0, module_name, sizeof(module_name)); - filePath = QString::fromLocal8Bit(module_name); - }); + 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)); diff --git a/qmake/project.cpp b/qmake/project.cpp index 047a5e3..704d8a6 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -3117,9 +3117,9 @@ QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList ret = "Windows"; } else if(type == "name") { DWORD name_length = 1024; - TCHAR name[1024]; - if(GetComputerName(name, &name_length)) - ret = QString::fromUtf16((ushort*)name, name_length); + wchar_t name[1024]; + if (GetComputerName(name, &name_length)) + ret = QString::fromWCharArray(name); } else if(type == "version" || type == "version_string") { QSysInfo::WinVersion ver = QSysInfo::WindowsVersion; if(type == "version") |