From d1fb20943d556db63c43d9bca9ebe2c9df6c11a3 Mon Sep 17 00:00:00 2001 From: sh kim Date: Thu, 15 Mar 2012 11:11:51 +0900 Subject: Add IDENTITYPROXYMODEL feature Change-Id: Ic92165b2ab06e5b5f733bfaf2f7fe908861c0efa Reviewed-by: Oswald Buddenhagen --- src/corelib/global/qfeatures.h | 5 +++++ src/corelib/global/qfeatures.txt | 7 +++++++ 2 files changed, 12 insertions(+) (limited to 'src/corelib/global') 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 -- cgit v1.2.3 From 18ddad191e157d741d9ced12b3d42c3a315f5457 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 20 Mar 2012 19:18:51 +0100 Subject: permit explicitly empty qt.conf entries this allows expressing "no SettingsPath" cleanly, and makes the internals cleaner. this is marginally behavior-incompatible in that if somebody had Prefix or Data set to an empty string (rather than a dot, which is hinted at by the documentation and commanded by common sense), he would have gotten the binary's directory resp. Prefix, while now it will be just empty. Change-Id: I3c11cc4e8671ffb604d4889389764a9ba9c2e7e6 Reviewed-by: Thiago Macieira Reviewed-by: Joerg Bornemann --- src/corelib/global/qlibraryinfo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index cb4e0e753f..dc68ea760c 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 }; @@ -309,7 +309,7 @@ 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) { -- cgit v1.2.3 From 3f3dd8f1d3219b63582986996cd01e8bb6effc9c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 21 Mar 2012 10:15:01 +0100 Subject: Show correct origin of Q_ASSERT in Windows dialog Display the actual file and line where the Q_ASSERT statement was triggered. Change-Id: I54d72f4c4bd9edee744c0f6e08f31b8e3120f454 Reviewed-by: David Faure --- src/corelib/global/qlogging.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/global') 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 ( QString::fromLatin1(buf).utf16())); #endif -- cgit v1.2.3 From a985fa5c51d67473a5c8a6f5aae678a3de613c0d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 20 Mar 2012 18:55:28 +0100 Subject: make unspecified/empty HostPrefix fall back to Prefix this is needed for backwards-compatibility, and generally makes sense. Task-number: QTBUG-24839 Change-Id: I42b008a9dfb43cc2ebe49c8baa2c29f5d6a75897 Reviewed-by: Joerg Bornemann --- src/corelib/global/qlibraryinfo.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index dc68ea760c..d319b2e948 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -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("\\$\\(.*\\)")); -- cgit v1.2.3 From 8d28fba3edc9fa749ecf4b89badd8a936bb449fb Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 20 Mar 2012 19:34:41 +0100 Subject: support relative Sysroot specification in qt.conf permits relocatable qmake installations in, say, $sysroot/hosttools/. note that it makes patently no sense to have a relative Prefix when using a relative Sysroot. Change-Id: I36e5149acb20a885c3cd244bc9d67aa48b01a56f Reviewed-by: Joerg Bornemann --- src/corelib/global/qlibraryinfo.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index d319b2e948..801b4d94cd 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -318,13 +318,11 @@ QLibraryInfo::rawLocation(LibraryLocation loc) 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); -- cgit v1.2.3