summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-03-23 14:31:28 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-23 14:31:28 +0100
commit425b38ef95f6f4478ffbd4ada0d3046fae2c95e7 (patch)
tree0347dd701ace8ab022cf6c86edbb61be9795a668 /src/corelib/global
parent2f2b78321427daa8c7f0702140c297d22b0bf3c8 (diff)
parent3b512ae142017f105f297467f74dc28d3cb9030a (diff)
Merge "Merge master into api_changes" into refs/staging/api_changes
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qfeatures.h5
-rw-r--r--src/corelib/global/qfeatures.txt7
-rw-r--r--src/corelib/global/qlibraryinfo.cpp22
-rw-r--r--src/corelib/global/qlogging.cpp6
4 files changed, 28 insertions, 12 deletions
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h
index de45437959..ff6a8af873 100644
--- a/src/corelib/global/qfeatures.h
+++ b/src/corelib/global/qfeatures.h
@@ -597,6 +597,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 56ad9a6fea..c2f5f7f61d 100644
--- a/src/corelib/global/qfeatures.txt
+++ b/src/corelib/global/qfeatures.txt
@@ -690,6 +690,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