summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-12 12:53:13 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-12 12:53:13 +0200
commitaa3754d1058c08b18dc5c3f38ca9496ce152c584 (patch)
treef2df5de02aab5d82a75e63c54f1bb9882ff89583 /src/corelib
parenta12a67c820fb010bc0396233528d652b717842e6 (diff)
parent8c81b282f8e18897257b93cb3fc149d74441c40e (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/Qt5CTestMacros.cmake45
-rw-r--r--src/corelib/Qt5Config.cmake.in6
-rw-r--r--src/corelib/Qt5CoreMacros.cmake3
-rw-r--r--src/corelib/global/qlogging.cpp8
-rw-r--r--src/corelib/kernel/qtcore_eval.cpp1
-rw-r--r--src/corelib/tools/qvector.h2
6 files changed, 41 insertions, 24 deletions
diff --git a/src/corelib/Qt5CTestMacros.cmake b/src/corelib/Qt5CTestMacros.cmake
index e507c8009e..126a348b47 100644
--- a/src/corelib/Qt5CTestMacros.cmake
+++ b/src/corelib/Qt5CTestMacros.cmake
@@ -19,6 +19,10 @@ if (CMAKE_TOOLCHAIN_FILE)
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
endif()
+if (CMAKE_VERBOSE_MAKEFILE)
+ list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_VERBOSE_MAKEFILE=1")
+endif()
+
if (NO_WIDGETS)
list(APPEND BUILD_OPTIONS_LIST "-DNO_WIDGETS=True")
endif()
@@ -110,24 +114,29 @@ function(test_module_includes)
"${packages_string}
find_package(Qt5${qtmodule} 5.0.0 REQUIRED)
include_directories(\${Qt5${qtmodule}_INCLUDE_DIRS})
- add_definitions(\${Qt5${qtmodule}_DEFINITIONS})
-
- if(NOT \"\${Qt5${qtmodule}_VERSION}\" VERSION_EQUAL ${CMAKE_MODULE_VERSION})
- message(SEND_ERROR \"Qt5${qtmodule}_VERSION variable was not ${CMAKE_MODULE_VERSION}. Got \${Qt5${qtmodule}_VERSION} instead.\")
- endif()
- if(NOT \"\${Qt5${qtmodule}_VERSION_MAJOR}\" VERSION_EQUAL ${CMAKE_${qtmodule}_MODULE_MAJOR_VERSION})
- message(SEND_ERROR \"Qt5${qtmodule}_VERSION_MAJOR variable was not ${CMAKE_${qtmodule}_MODULE_MAJOR_VERSION}. Got \${Qt5${qtmodule}_VERSION_MAJOR} instead.\")
- endif()
- if(NOT \"\${Qt5${qtmodule}_VERSION_MINOR}\" VERSION_EQUAL ${CMAKE_${qtmodule}_MODULE_MINOR_VERSION})
- message(SEND_ERROR \"Qt5${qtmodule}_VERSION_MINOR variable was not ${CMAKE_${qtmodule}_MODULE_MINOR_VERSION}. Got \${Qt5${qtmodule}_VERSION_MINOR} instead.\")
- endif()
- if(NOT \"\${Qt5${qtmodule}_VERSION_PATCH}\" VERSION_EQUAL ${CMAKE_${qtmodule}_MODULE_PATCH_VERSION})
- message(SEND_ERROR \"Qt5${qtmodule}_VERSION_PATCH variable was not ${CMAKE_${qtmodule}_MODULE_PATCH_VERSION}. Got \${Qt5${qtmodule}_VERSION_PATCH} instead.\")
- endif()
- if(NOT \"\${Qt5${qtmodule}_VERSION_STRING}\" VERSION_EQUAL ${CMAKE_MODULE_VERSION})
- message(SEND_ERROR \"Qt5${qtmodule}_VERSION_STRING variable was not ${CMAKE_MODULE_VERSION}. Got \${Qt5${qtmodule}_VERSION_STRING} instead.\")
- endif()\n"
- )
+ add_definitions(\${Qt5${qtmodule}_DEFINITIONS})\n")
+
+ list(FIND CMAKE_MODULES_UNDER_TEST ${qtmodule} _findIndex)
+ if (NOT _findIndex STREQUAL -1)
+ set(packages_string
+ "${packages_string}
+ if(NOT \"\${Qt5${qtmodule}_VERSION}\" VERSION_EQUAL ${CMAKE_MODULE_VERSION})
+ message(SEND_ERROR \"Qt5${qtmodule}_VERSION variable was not ${CMAKE_MODULE_VERSION}. Got \${Qt5${qtmodule}_VERSION} instead.\")
+ endif()
+ if(NOT \"\${Qt5${qtmodule}_VERSION_MAJOR}\" VERSION_EQUAL ${CMAKE_${qtmodule}_MODULE_MAJOR_VERSION})
+ message(SEND_ERROR \"Qt5${qtmodule}_VERSION_MAJOR variable was not ${CMAKE_${qtmodule}_MODULE_MAJOR_VERSION}. Got \${Qt5${qtmodule}_VERSION_MAJOR} instead.\")
+ endif()
+ if(NOT \"\${Qt5${qtmodule}_VERSION_MINOR}\" VERSION_EQUAL ${CMAKE_${qtmodule}_MODULE_MINOR_VERSION})
+ message(SEND_ERROR \"Qt5${qtmodule}_VERSION_MINOR variable was not ${CMAKE_${qtmodule}_MODULE_MINOR_VERSION}. Got \${Qt5${qtmodule}_VERSION_MINOR} instead.\")
+ endif()
+ if(NOT \"\${Qt5${qtmodule}_VERSION_PATCH}\" VERSION_EQUAL ${CMAKE_${qtmodule}_MODULE_PATCH_VERSION})
+ message(SEND_ERROR \"Qt5${qtmodule}_VERSION_PATCH variable was not ${CMAKE_${qtmodule}_MODULE_PATCH_VERSION}. Got \${Qt5${qtmodule}_VERSION_PATCH} instead.\")
+ endif()
+ if(NOT \"\${Qt5${qtmodule}_VERSION_STRING}\" VERSION_EQUAL ${CMAKE_MODULE_VERSION})
+ message(SEND_ERROR \"Qt5${qtmodule}_VERSION_STRING variable was not ${CMAKE_MODULE_VERSION}. Got \${Qt5${qtmodule}_VERSION_STRING} instead.\")
+ endif()\n"
+ )
+ endif()
set(libraries_string "${libraries_string} Qt5::${qtmodule}")
endwhile()
diff --git a/src/corelib/Qt5Config.cmake.in b/src/corelib/Qt5Config.cmake.in
index 408dd64496..a7e9a042e8 100644
--- a/src/corelib/Qt5Config.cmake.in
+++ b/src/corelib/Qt5Config.cmake.in
@@ -18,7 +18,7 @@ if (Qt5_FIND_QUIETLY)
set(_Qt5_FIND_PARTS_QUIET QUIET)
endif()
-get_filename_component(_qt5_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
+get_filename_component(_qt5_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/..\" ABSOLUTE)
set(_Qt5_NOTFOUND_MESSAGE)
@@ -30,9 +30,9 @@ foreach(module ${Qt5_FIND_COMPONENTS})
)
if (NOT Qt5${module}_FOUND)
if (Qt5_FIND_REQUIRED_${module})
- set(_Qt5_NOTFOUND_MESSAGE \"${_Qt5_NOTFOUND_MESSAGE}Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_qt5_install_prefix}/lib/cmake/Qt5${module}/Qt5${module}Config.cmake\\\"\\n\")
+ set(_Qt5_NOTFOUND_MESSAGE \"${_Qt5_NOTFOUND_MESSAGE}Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_qt5_install_prefix}/Qt5${module}/Qt5${module}Config.cmake\\\"\\n\")
elseif(NOT Qt5_FIND_QUIETLY)
- message(WARNING \"Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_qt5_install_prefix}/lib/cmake/Qt5${module}/Qt5${module}Config.cmake\\\"\")
+ message(WARNING \"Failed to find Qt5 component \\\"${module}\\\" config file at \\\"${_qt5_install_prefix}/Qt5${module}/Qt5${module}Config.cmake\\\"\")
endif()
endif()
endforeach()
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index e3115db8ee..b6124b40cd 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -215,6 +215,7 @@ function(QT5_ADD_RESOURCES outfiles )
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
endfunction()
+set(_Qt5_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..")
if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
macro(qt5_use_modules _target _link_type)
@@ -234,7 +235,7 @@ if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
foreach(_module ${_qt5_modules})
if (NOT Qt5${_module}_FOUND)
- find_package(Qt5${_module} PATHS ${_qt5Core_install_prefix} NO_DEFAULT_PATH)
+ find_package(Qt5${_module} PATHS "${_Qt5_COMPONENT_PATH}" NO_DEFAULT_PATH)
if (NOT Qt5${_module}_FOUND)
message(FATAL_ERROR "Can not use \"${_module}\" module which has not yet been found.")
endif()
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index f95e1e9447..c8293beb4e 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -876,7 +876,13 @@ static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &con
#if defined(QT_USE_SLOG2)
slog2_default_handler(type, logMessage.toLocal8Bit().constData());
#elif defined(Q_OS_ANDROID)
- android_default_message_handler(type, context, logMessage);
+ static bool logToAndroid = qEnvironmentVariableIsEmpty("QT_ANDROID_PLAIN_LOG");
+ if (logToAndroid) {
+ android_default_message_handler(type, context, logMessage);
+ } else {
+ fprintf(stderr, "%s", logMessage.toLocal8Bit().constData());
+ fflush(stderr);
+ }
#else
fprintf(stderr, "%s", logMessage.toLocal8Bit().constData());
fflush(stderr);
diff --git a/src/corelib/kernel/qtcore_eval.cpp b/src/corelib/kernel/qtcore_eval.cpp
index ab575371c8..e9ff786074 100644
--- a/src/corelib/kernel/qtcore_eval.cpp
+++ b/src/corelib/kernel/qtcore_eval.cpp
@@ -496,6 +496,7 @@ public:
setParent(parentWidget(), Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
QTimer::singleShot(7000, this, SLOT(close()));
setAttribute(Qt::WA_DeleteOnClose);
+ setAttribute(Qt::WA_QuitOnClose, false);
}
setFixedSize(sizeHint());
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index a06fb7b4eb..816e1f15f6 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -493,7 +493,7 @@ void QVector<T>::reallocData(const int asize, const int aalloc, QArrayData::Allo
}
x->capacityReserved = d->capacityReserved;
} else {
- Q_ASSERT(d->alloc == aalloc); // resize, without changing allocation size
+ Q_ASSERT(int(d->alloc) == aalloc); // resize, without changing allocation size
Q_ASSERT(isDetached()); // can be done only on detached d
Q_ASSERT(x == d); // in this case we do not need to allocate anything
if (asize <= d->size) {