diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-03-23 13:36:29 +0100 |
---|---|---|
committer | Kent Hansen <kent.hansen@nokia.com> | 2012-03-23 14:10:58 +0100 |
commit | 3b512ae142017f105f297467f74dc28d3cb9030a (patch) | |
tree | 9e131e23c01537f051851a1da9576c1e1ddf5ba2 /src/corelib/global | |
parent | e20c4730192f312881591fb50e571af0a88fe421 (diff) | |
parent | f956f9a83603a3df5651e3238c24e8df37558d6e (diff) |
Merge master into api_changes
Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qfeatures.h | 5 | ||||
-rw-r--r-- | src/corelib/global/qfeatures.txt | 7 | ||||
-rw-r--r-- | src/corelib/global/qlibraryinfo.cpp | 22 | ||||
-rw-r--r-- | src/corelib/global/qlogging.cpp | 6 |
4 files changed, 28 insertions, 12 deletions
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h index db7ff04bb2..15d5a9db66 100644 --- a/src/corelib/global/qfeatures.h +++ b/src/corelib/global/qfeatures.h @@ -602,6 +602,11 @@ #define QT_NO_DATAWIDGETMAPPER #endif +// QIdentityProxyModel +#if !defined(QT_NO_IDENTITYPROXYMODEL) && (defined(QT_NO_PROXYMODEL)) +#define QT_NO_IDENTITYPROXYMODEL +#endif + // QListWidget #if !defined(QT_NO_LISTWIDGET) && (defined(QT_NO_LISTVIEW)) #define QT_NO_LISTWIDGET diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index 444a23b0e3..cc0594b62a 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -704,6 +704,13 @@ Requires: PROXYMODEL Name: QSortFilterProxyModel SeeAlso: ??? +Feature: IDENTITYPROXYMODEL +Description: Supports proxying a source model unmodified. +Section: ItemViews +Requires: PROXYMODEL +Name: QIdentityProxyModel +SeeAlso: ??? + Feature: STRINGLISTMODEL Description: Supports a model that supplies strings to views. Section: ItemViews diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index cb4e0e753f..801b4d94cd 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -217,14 +217,14 @@ QLibraryInfo::isDebugBuild() static const struct { char key[14], value[13]; } qtConfEntries[] = { - { "Prefix", "" }, + { "Prefix", "." }, { "Documentation", "doc" }, { "Headers", "include" }, { "Libraries", "lib" }, { "Binaries", "bin" }, { "Plugins", "plugins" }, { "Imports", "imports" }, - { "Data", "" }, + { "Data", "." }, { "Translations", "translations" }, { "Examples", "examples" }, { "Tests", "tests" }, @@ -232,7 +232,7 @@ static const struct { { "Sysroot", "" }, { "HostPrefix", "" }, { "HostBinaries", "bin" }, - { "HostData", "" }, + { "HostData", "." }, #endif }; @@ -295,6 +295,12 @@ QLibraryInfo::rawLocation(LibraryLocation loc) ret = config->value(key, defaultValue).toString(); +#ifdef QT_BUILD_QMAKE + if (ret.isEmpty() && loc == HostPrefixPath) + ret = config->value(QLatin1String(qtConfEntries[PrefixPath].key), + QLatin1String(qtConfEntries[PrefixPath].value)).toString(); +#endif + // expand environment variables in the form $(ENVVAR) int rep; QRegExp reg_var(QLatin1String("\\$\\(.*\\)")); @@ -309,16 +315,14 @@ QLibraryInfo::rawLocation(LibraryLocation loc) } } - if (QDir::isRelativePath(ret)) { + if (!ret.isEmpty() && QDir::isRelativePath(ret)) { QString baseDir; #ifdef QT_BUILD_QMAKE - if (loc == HostPrefixPath || loc == PrefixPath) { - // We make the prefix path absolute to the executable's directory. + if (loc == HostPrefixPath || loc == PrefixPath || loc == SysrootPath) { + // We make the prefix/sysroot path absolute to the executable's directory. // loc == PrefixPath while a sysroot is set would make no sense here. + // loc == SysrootPath only makes sense if qmake lives inside the sysroot itself. baseDir = QFileInfo(qmake_libraryInfoFile()).absolutePath(); - } else if (loc == SysrootPath) { - // The sysroot is bare - return ret; } else if (loc > SysrootPath && loc <= LastHostPath) { // We make any other host path absolute to the host prefix directory. baseDir = rawLocation(HostPrefixPath); diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 8cbd4528dc..fedc5eb9ec 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -717,10 +717,10 @@ void qt_message_output(QtMsgType msgType, const QMessageLogContext &context, con int reportMode = _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW); _CrtSetReportMode(_CRT_ERROR, reportMode); #if !defined(Q_OS_WINCE) - int ret = _CrtDbgReport(_CRT_ERROR, __FILE__, __LINE__, QT_VERSION_STR, buf); + int ret = _CrtDbgReport(_CRT_ERROR, context.file, context.line, QT_VERSION_STR, buf); #else - int ret = _CrtDbgReportW(_CRT_ERROR, _CRT_WIDE(__FILE__), - __LINE__, _CRT_WIDE(QT_VERSION_STR), + int ret = _CrtDbgReportW(_CRT_ERROR, _CRT_WIDE(context.file), + context.line, _CRT_WIDE(QT_VERSION_STR), reinterpret_cast<const wchar_t *> ( QString::fromLatin1(buf).utf16())); #endif |