Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Iee73c93067c5822d8dd51a8692e6da9df4ba49f5
This commit is contained in:
Frederik Gladhorn 2013-04-12 12:53:13 +02:00
commit aa3754d105
49 changed files with 348 additions and 210 deletions

14
INSTALL
View File

@ -1,12 +1,10 @@
INSTALLING Qt Source Package Version %VERSION%.
For full installation instructions for each supported platform, please
see http://qt-project.org/doc/qt-%SHORTVERSION%/installation.html, the file
doc/html/installation.html in this package, or follow one of the following
links:
see http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/installation.html,
or follow one of these links:
Embedded Linux: http://qt-project.org/doc/qt-%SHORTVERSION%/qt-embedded-install.html
Mac OS X: http://qt-project.org/doc/qt-%SHORTVERSION%/install-mac.html
Windows: http://qt-project.org/doc/qt-%SHORTVERSION%/install-win.html
Windows CE: http://qt-project.org/doc/qt-%SHORTVERSION%/install-wince.html
X11 Platforms: http://qt-project.org/doc/qt-%SHORTVERSION%/install-x11.html
Mac OS X: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-mac.html
Windows: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-win.html
Windows CE: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-wince.html
X11 Platforms: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-x11.html

9
configure vendored
View File

@ -2565,14 +2565,7 @@ if [ -z "$PLATFORM" ]; then
"
;;
Linux:*)
case "$UNAME_MACHINE" in
x86_64|s390x|ppc64)
PLATFORM=linux-g++-64
;;
*)
PLATFORM=linux-g++
;;
esac
PLATFORM=linux-g++
PLATFORM_NOTES="
- Also available for Linux: linux-kcc linux-icc linux-cxx
"

42
dist/changes-5.0.2 vendored
View File

@ -22,18 +22,12 @@ information about a particular change.
General Improvements
--------------------
Third party components
----------------------
Legal
-----
- Lots of fixes to enable static builds on Windows, Linux and Mac.
****************************************************************************
* Library *
****************************************************************************
QtCore
-----
@ -44,29 +38,35 @@ QtCore
QtGui
-----
- [QTBUG-14766] Fixed potential access violation in QPixmap::copy() for <32 bit pixmaps.
- [QTBUG-24762] Fixed dashes being rendered differently depending on system clip.
- [QTBUG-25036] Fixed artifacts when drawing same line with different clips.
- [QTBUG-29643] Fixed crashes when using QImage in combination with QCoreApplication.
QtWidgets
---------
- [QTBUG-28817] Fixed QColorDialog::setOption(), QFontDialog::setOption().
- [QTBUG-28817] Fixed QColorDialog::setOption(), QFontDialog::setOption().
- [QTBUG-29680] Fix mouse double click events not bubbling up to parent widgets.
QtNetwork
---------
QtDBus
------
- [QTBUG-29103] Toggle on demand loading of root certs properly.
QtConcurrent
------------
QtOpenGL
--------
QtTest
------
- [QTBUG-28984] Fix compilation of Qt Concurrent with gcc 4.3.
QtSql
-----
- Fix QSqlTableModel:revert() for OnFieldChange.
- [QTBUG-29102] Support refreshing inserted rows with auto columns.
- [QTBUG-29108] Fix QSqlTableModel::headerData() for empty query with inserted row.
- [QTBUG-29217] Fix QSqlTableModel::setData() for non-change detection.
****************************************************************************
* Database Drivers *
****************************************************************************
@ -84,16 +84,23 @@ postgres
Qt for Linux/X11
----------------
- Fix focus handling of native child widgets in xcb.
- Fixed crash when VNCing and trying to use non-present XFixes extension.
Qt for Windows
--------------
- [QTBUG-30185] Fixed adding of suffixes in Window native file save dialog.
- [QTBUG-28439] Implement QPlatformWindow::isExposed() on Windows.
- [QTBUG-29010, QTBUG-28531] Fixed handling of layered windows required for
translucent or non-opaque windows.
- [QTBUG-30185] Fixed adding of suffixes in Window native file save dialog.
Qt for Mac OS X
---------------
- [QTBUG-29389] Fix transient scroll bar appearance before the proper one.
- [QTBUG-25297, QTBUG-29434] Add QMdiSubWindow size grip back.
Qt for BlackBerry
-----------------
@ -103,11 +110,14 @@ Qt for Embedded Linux
Qt for Windows CE
-----------------
- Removed User32.dll usage.
- Fix compilation with QT_NO_CURSOR.
****************************************************************************
* Compiler Specific Changes *
****************************************************************************
- [QTBUG-29099] Fix gcc OOM error when compiling in release mode.
****************************************************************************
* Tools *

View File

@ -6,10 +6,11 @@ QMAKE_COMPILER = gcc
CONFIG += android_install
DEFINES += QT_NO_PRINTDIALOG
include(../qdevice.pri)
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
load(device_config)
# Passing in -win32 to qmake (from NQTC) causes this condition to pass, however
# qmake complains that -win32 is deprecated; should find another way, Q_OS_WIN
# should really be all QMAKE_HOST.os needs to depend on?

View File

@ -38,6 +38,10 @@ isEmpty(CMAKE_VERSION) {
CMAKE_BUILD_TYPE = Debug
CONFIG(release, debug|release):CMAKE_BUILD_TYPE = Release
win32-g++*:CMAKE_GENERATOR = -G \"MinGW Makefiles\"
win32:equals(QT_ARCH, x86_64) {
win32-msvc2010:CMAKE_GENERATOR = -G \"Visual Studio 10 Win64\"
win32-msvc2012:CMAKE_GENERATOR = -G \"Visual Studio 11 Win64\"
}
BUILD_DIR = $$replace($$list($$OUT_PWD/build), /, $$QMAKE_DIR_SEP)
@ -53,9 +57,6 @@ isEmpty(CMAKE_VERSION) {
dependentmodules -= $$CMAKE_QT_MODULES_UNDER_TEST
dependentmodules = $$cmakeModuleList($$dependentmodules)
SET = set
equals(QMAKE_DIR_SEP, "/"):SET = export
CMAKE_MODULE_VERSIONS =
CMAKE_MODULES_UNDER_TEST =
for (MODULE_UNDER_TEST, CMAKE_QT_MODULES_UNDER_TEST) {
@ -69,8 +70,9 @@ isEmpty(CMAKE_VERSION) {
CMAKE_MODULES_UNDER_TEST = $$join(CMAKE_MODULES_UNDER_TEST, ;)
check.commands = \
$(MKDIR) $$BUILD_DIR && cd $$BUILD_DIR && $$SET VERBOSE=1 && \
$(MKDIR) $$BUILD_DIR && cd $$BUILD_DIR && \
cmake $$_PRO_FILE_PWD_ $$CMAKE_GENERATOR \
-DCMAKE_VERBOSE_MAKEFILE=1 \
$$CMAKE_MODULE_DEFINES \
-DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} \
-DCMAKE_PREFIX_PATH=$$CMAKE_PREFIX_PATH \

View File

@ -45,22 +45,23 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!IF !no_module_headers
!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\")
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\")
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}\"
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}/$${MODULE_INCNAME}\"
)
!!ELSE
set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\" \"$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}\")
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\" \"$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}\")
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
\"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}\"
\"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}/$${MODULE_INCNAME}\"
)
!!ENDIF
!!ELSE
set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS)
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS)
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS)
!!ENDIF
set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
set(Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS -D$${MODULE_DEFINE})
set(Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS $${MODULE_DEFINE})
@ -122,7 +123,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ENDIF
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS})
INTERFACE_INCLUDE_DIRECTORIES ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINE})

View File

@ -221,7 +221,11 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
do_incremental = false;
t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << endl;
t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl;
t << "DESTDIR = " << var("DESTDIR") << endl;
// The comment is important for mingw32-make.exe on Windows as otherwise trailing slashes
// would be interpreted as line continuation. The lack of spacing between the value and the
// comment is also important as otherwise quoted use of "$(DESTDIR)" would include this
// spacing.
t << "DESTDIR = " << var("DESTDIR") << "#avoid trailing-slash linebreak" << endl;
if(project->isActiveConfig("compile_libtool"))
t << "TARGETL = " << var("TARGET_la") << endl;
t << "TARGET = " << escapeFilePath(var("TARGET")) << endl;
@ -546,7 +550,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< var("QMAKE_LINK_SHLIB_CMD");
if(!destdir.isEmpty())
t << "\n\t"
<< "-$(MOVE) $(TARGET) " << destdir;
<< "-$(MOVE) $(TARGET) " << destdir << " ";
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK");
t << endl << endl;
@ -579,10 +583,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< "-$(DEL_FILE) " << destdir << "$(TARGET0)\n\t"
<< "-$(DEL_FILE) " << destdir << "$(TARGET1)\n\t"
<< "-$(DEL_FILE) " << destdir << "$(TARGET2)\n\t"
<< "-$(MOVE) $(TARGET) " << destdir << "\n\t"
<< "-$(MOVE) $(TARGET0) " << destdir << "\n\t"
<< "-$(MOVE) $(TARGET1) " << destdir << "\n\t"
<< "-$(MOVE) $(TARGET2) " << destdir << "\n\t";
<< "-$(MOVE) $(TARGET) " << destdir << " \n\t"
<< "-$(MOVE) $(TARGET0) " << destdir << " \n\t"
<< "-$(MOVE) $(TARGET1) " << destdir << " \n\t"
<< "-$(MOVE) $(TARGET2) " << destdir << " \n\t";
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK");
t << endl << endl;
@ -595,8 +599,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "\n\t"
<< "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t"
<< "-$(DEL_FILE) " << destdir << "$(TARGET0)\n\t"
<< "-$(MOVE) $(TARGET) " << destdir << "\n\t"
<< "-$(MOVE) $(TARGET0) " << destdir << "\n\t";
<< "-$(MOVE) $(TARGET) " << destdir << " \n\t"
<< "-$(MOVE) $(TARGET0) " << destdir << " \n\t";
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK");
t << endl << endl;
@ -635,7 +639,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "\t" << "$(RANLIB) $(TARGET)" << "\n";
if(!destdir.isEmpty())
t << "\t" << "-$(DEL_FILE) " << destdir << "$(TARGET)" << "\n"
<< "\t" << "-$(MOVE) $(TARGET) " << destdir << "\n";
<< "\t" << "-$(MOVE) $(TARGET) " << destdir << " \n";
} else {
int max_files = project->first("QMAKE_MAX_FILES_PER_AR").toInt();
ProStringList objs = project->values("OBJECTS") + project->values("OBJCOMP"),
@ -666,7 +670,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "\t" << "$(RANLIB) " << (*libit) << "\n";
if(!destdir.isEmpty())
t << "\t" << "-$(DEL_FILE) " << destdir << (*libit) << "\n"
<< "\t" << "-$(MOVE) " << (*libit) << " " << destdir << "\n";
<< "\t" << "-$(MOVE) " << (*libit) << " " << destdir << " \n";
}
}
t << endl << endl;

View File

@ -87,6 +87,7 @@ const char _CompileOnly[] = "CompileOnly";
const char _ConfigurationType[] = "ConfigurationType";
const char _Culture[] = "Culture";
const char _DLLDataFileName[] = "DLLDataFileName";
const char _DataExecutionPrevention[] = "DataExecutionPrevention";
const char _DebugInformationFormat[] = "DebugInformationFormat";
const char _DefaultCharIsUnsigned[] = "DefaultCharIsUnsigned";
const char _DefaultCharType[] = "DefaultCharType";
@ -179,6 +180,7 @@ const char _ProgramDatabase[] = "ProgramDatabase";
const char _ProgramDataBaseFileName[] = "ProgramDataBaseFileName";
const char _ProgramDatabaseFile[] = "ProgramDatabaseFile";
const char _ProxyFileName[] = "ProxyFileName";
const char _RandomizedBaseAddress[] = "RandomizedBaseAddress";
const char _RedirectOutputAndErrors[] = "RedirectOutputAndErrors";
const char _RegisterOutput[] = "RegisterOutput";
const char _RelativePath[] = "RelativePath";
@ -2560,6 +2562,7 @@ void VCProjectWriter::write(XmlOutput &xml, const VCLinkerTool &tool)
<< attrX(_AdditionalOptions, tool.AdditionalOptions, " ")
<< attrX(_AddModuleNamesToAssembly, tool.AddModuleNamesToAssembly)
<< attrS(_BaseAddress, tool.BaseAddress)
<< attrT(_DataExecutionPrevention, tool.DataExecutionPrevention)
<< attrX(_DelayLoadDLLs, tool.DelayLoadDLLs)
<< attrE(_EnableCOMDATFolding, tool.EnableCOMDATFolding, /*ifNot*/ optFoldingDefault)
<< attrS(_EntryPointSymbol, tool.EntryPointSymbol)
@ -2590,6 +2593,7 @@ void VCProjectWriter::write(XmlOutput &xml, const VCLinkerTool &tool)
<< attrE(_OptimizeReferences, tool.OptimizeReferences, /*ifNot*/ optReferencesDefault)
<< attrS(_OutputFile, tool.OutputFile)
<< attr(_ProgramDatabaseFile, tool.ProgramDatabaseFile)
<< attrT(_RandomizedBaseAddress, tool.RandomizedBaseAddress)
<< attrT(_RegisterOutput, tool.RegisterOutput)
<< attrT(_ResourceOnlyDLL, tool.ResourceOnlyDLL)
<< attrT(_SetChecksum, tool.SetChecksum)

View File

@ -54,12 +54,13 @@ angle_d3d11 {
CONFIG(debug, debug|release) {
DEFINES += _DEBUG
} else {
CONFIG += rtti_off
DEFINES += NDEBUG
}
# c++11 is needed by MinGW to get support for unordered_map.
CONFIG -= qt
CONFIG += stl rtti_off exceptions c++11
CONFIG += stl exceptions c++11
contains(QT_CONFIG, debug_and_release):CONFIG += debug_and_release
contains(QT_CONFIG, build_all):CONFIG += build_all

View File

@ -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})
add_definitions(\${Qt5${qtmodule}_DEFINITIONS})\n")
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"
)
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()

View File

@ -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()

View File

@ -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()

View File

@ -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);

View File

@ -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());

View File

@ -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) {

View File

@ -1507,7 +1507,7 @@ QAccessibleInterface *QAccessibleEvent::accessibleInterface() const
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object);
if (!iface || !iface->isValid()) {
static bool hasWarned = false;
if (!hasWarned) {
if (!iface && !hasWarned) {
qWarning() << "Problem creating accessible interface for: " << m_object << endl
<< "Make sure to deploy Qt with accessibility plugins.";
hasWarned = true;

View File

@ -602,6 +602,12 @@ bool QGuiApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blocking
return false;
}
bool QGuiApplicationPrivate::synthesizeMouseFromTouchEventsEnabled()
{
return QCoreApplication::testAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents)
&& QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::SynthesizeMouseFromTouchEvents).toBool();
}
/*!
Returns the QWindow that receives events tied to focus,
such as key events.
@ -2054,7 +2060,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
}
QGuiApplication::sendSpontaneousEvent(w, &touchEvent);
if (!e->synthetic && !touchEvent.isAccepted() && qApp->testAttribute(Qt::AA_SynthesizeMouseForUnhandledTouchEvents)) {
if (!e->synthetic && !touchEvent.isAccepted() && synthesizeMouseFromTouchEventsEnabled()) {
// exclude touchpads as those generate their own mouse events
if (touchEvent.device()->type() != QTouchDevice::TouchPad) {
Qt::MouseButtons b = eventType == QEvent::TouchEnd ? Qt::NoButton : Qt::LeftButton;

View File

@ -191,6 +191,8 @@ public:
static void updateBlockedStatus(QWindow *window);
virtual bool isWindowBlocked(QWindow *window, QWindow **blockingWindow = 0) const;
static bool synthesizeMouseFromTouchEventsEnabled();
static Qt::MouseButtons buttons;
static ulong mousePressTime;
static Qt::MouseButton mousePressButton;

View File

@ -191,8 +191,8 @@ QFontPrivate::QFontPrivate(const QFontPrivate &other)
QFontPrivate::~QFontPrivate()
{
if (engineData)
engineData->ref.deref();
if (engineData && !engineData->ref.deref())
delete engineData;
engineData = 0;
if (scFont && scFont != this)
scFont->ref.deref();
@ -210,7 +210,8 @@ QFontEngine *QFontPrivate::engineForScript(int script) const
script = QChar::Script_Common;
if (engineData && engineData->fontCache != QFontCache::instance()) {
// throw out engineData that came from a different thread
engineData->ref.deref();
if (!engineData->ref.deref())
delete engineData;
engineData = 0;
}
if (!engineData || !QT_FONT_ENGINE_FROM_DATA(engineData, script))
@ -316,13 +317,14 @@ void QFontPrivate::resolve(uint mask, const QFontPrivate *other)
QFontEngineData::QFontEngineData()
: ref(1), fontCache(QFontCache::instance())
: ref(0), fontCache(QFontCache::instance())
{
memset(engines, 0, QChar::ScriptCount * sizeof(QFontEngine *));
}
QFontEngineData::~QFontEngineData()
{
Q_ASSERT(ref.load() == 0);
for (int i = 0; i < QChar::ScriptCount; ++i) {
if (engines[i]) {
if (!engines[i]->ref.deref())
@ -637,8 +639,8 @@ QFont::QFont(QFontPrivate *data)
void QFont::detach()
{
if (d->ref.load() == 1) {
if (d->engineData)
d->engineData->ref.deref();
if (d->engineData && !d->engineData->ref.deref())
delete d->engineData;
d->engineData = 0;
if (d->scFont && d->scFont != d.data())
d->scFont->ref.deref();
@ -2641,7 +2643,7 @@ QFontCache::~QFontCache()
EngineDataCache::ConstIterator it = engineDataCache.constBegin(),
end = engineDataCache.constEnd();
while (it != end) {
if (it.value()->ref.load() == 0)
if (!it.value()->ref.deref())
delete it.value();
else
FC_DEBUG("QFontCache::~QFontCache: engineData %p still has refcount %d",
@ -2713,7 +2715,9 @@ void QFontCache::insertEngineData(const QFontDef &def, QFontEngineData *engineDa
def.pixelSize, def.weight, def.style, def.fixedPitch);
}
#endif
Q_ASSERT(!engineDataCache.contains(def));
engineData->ref.ref();
engineDataCache.insert(def, engineData);
increaseCost(sizeof(QFontEngineData));
}
@ -2829,7 +2833,7 @@ void QFontCache::timerEvent(QTimerEvent *)
for (; it != end; ++it) {
FC_DEBUG(" %p: ref %2d", it.value(), int(it.value()->ref.load()));
if (it.value()->ref.load() != 0)
if (it.value()->ref.load() != 1)
in_use_cost += engine_data_cost;
}
}
@ -2894,9 +2898,10 @@ void QFontCache::timerEvent(QTimerEvent *)
// clean out all unused engine data
EngineDataCache::Iterator it = engineDataCache.begin();
while (it != engineDataCache.end()) {
if (it.value()->ref.load() == 0) {
if (it.value()->ref.load() == 1) {
FC_DEBUG(" %p", it.value());
decreaseCost(sizeof(QFontEngineData));
it.value()->ref.deref();
delete it.value();
it = engineDataCache.erase(it);
} else {

View File

@ -143,6 +143,9 @@ public:
QFontCache *fontCache;
QFontEngine *engines[QChar::ScriptCount];
private:
Q_DISABLE_COPY(QFontEngineData)
};

View File

@ -344,6 +344,7 @@ struct QtFontFamily
bool askedForFallback;
unsigned char writingSystems[QFontDatabase::WritingSystemsCount];
bool matchesFamilyName(const QString &familyName) const;
QtFontFoundry *foundry(const QString &f, bool = false);
};
@ -383,6 +384,11 @@ QtFontFoundry *QtFontFamily::foundry(const QString &f, bool create)
return foundries[count++];
}
bool QtFontFamily::matchesFamilyName(const QString &familyName) const
{
return name.compare(familyName, Qt::CaseInsensitive) == 0 || aliases.contains(familyName, Qt::CaseInsensitive);
}
class QFontDatabasePrivate
{
@ -613,9 +619,8 @@ static void getEngineData(const QFontPrivate *d, const QFontDef &def)
// create a new one
d->engineData = new QFontEngineData;
QFontCache::instance()->insertEngineData(def, d->engineData);
} else {
d->engineData->ref.ref();
}
d->engineData->ref.ref();
}
static QStringList familyList(const QFontDef &req)
@ -852,19 +857,7 @@ static bool matchFamilyName(const QString &familyName, QtFontFamily *f)
{
if (familyName.isEmpty())
return true;
if (f->name.compare(familyName, Qt::CaseInsensitive) == 0)
return true;
QStringList::const_iterator it = f->aliases.constBegin();
while (it != f->aliases.constEnd()) {
if ((*it).compare(familyName, Qt::CaseInsensitive) == 0)
return true;
++it;
}
return false;
return f->matchesFamilyName(familyName);
}
/*!

View File

@ -110,8 +110,7 @@ static QStringList fallbackFamilies(const QString &family, QFont::Style style, Q
for (i = retList.begin(); i != retList.end(); ++i) {
bool contains = false;
for (int j = 0; j < db->count; j++) {
QtFontFamily *qtFamily = db->families[j];
if (!(i->compare(qtFamily->name,Qt::CaseInsensitive))) {
if (db->families[j]->matchesFamilyName(*i)) {
contains = true;
break;
}

View File

@ -232,7 +232,7 @@ QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id,
QScopedPointer<QFreetypeFace> newFreetype(new QFreetypeFace);
FT_Face face;
if (!face_id.filename.isEmpty()) {
QString fileName = QString::fromUtf8(face_id.filename);
QString fileName = QFile::decodeName(face_id.filename);
if (face_id.filename.startsWith(":qmemoryfonts/")) {
// from qfontdatabase.cpp
QByteArray idx = face_id.filename;

View File

@ -234,7 +234,7 @@ bool QLocalSocket::open(OpenMode openMode)
}
const QLatin1String prefix("QLocalServer/");
if (name.startsWith(prefix))
if (d->serverName.startsWith(prefix))
d->fullServerName = d->serverName;
else
d->fullServerName = prefix + d->serverName;

View File

@ -123,7 +123,7 @@ QFontEngine *QBasicFontDatabase::fontEngine(const QFontDef &fontDef, QChar::Scri
QFontEngineFT *engine;
FontFile *fontfile = static_cast<FontFile *> (usrPtr);
QFontEngine::FaceId fid;
fid.filename = fontfile->fileName.toLocal8Bit();
fid.filename = QFile::encodeName(fontfile->fileName);
fid.index = fontfile->indexValue;
engine = new QFontEngineFT(fontDef);

View File

@ -356,7 +356,7 @@ static bool isSymbolFont(FontFile *fontFile)
return false;
QFontEngine::FaceId id;
id.filename = fontFile->fileName.toLocal8Bit();
id.filename = QFile::encodeName(fontFile->fileName);
id.index = fontFile->indexValue;
QFreetypeFace *f = QFreetypeFace::getFace(id);
@ -370,6 +370,8 @@ static bool isSymbolFont(FontFile *fontFile)
return hasSymbolMap;
}
Q_GUI_EXPORT void qt_registerAliasToFontFamily(const QString &familyName, const QString &alias);
void QFontconfigDatabase::populateFontDatabase()
{
FcFontSet *fonts;
@ -511,6 +513,9 @@ void QFontconfigDatabase::populateFontDatabase()
QString styleName = style_value ? QString::fromUtf8((const char *) style_value) : QString();
QPlatformFontDatabase::registerFont(familyName,styleName,QLatin1String((const char *)foundry_value),weight,style,stretch,antialias,scalable,pixel_size,fixedPitch,writingSystems,fontFile);
// qDebug() << familyName << (const char *)foundry_value << weight << style << &writingSystems << scalable << true << pixel_size;
for (int k = 1; FcPatternGetString(fonts->fonts[i], FC_FAMILY, k, &value) == FcResultMatch; ++k)
qt_registerAliasToFontFamily(familyName, QString::fromUtf8((const char *)value));
}
FcFontSetDestroy (fonts);
@ -562,7 +567,7 @@ QFontEngine *QFontconfigDatabase::fontEngine(const QFontDef &f, QChar::Script sc
QFontEngineFT *engine;
FontFile *fontfile = static_cast<FontFile *> (usrPtr);
QFontEngine::FaceId fid;
fid.filename = fontfile->fileName.toLocal8Bit();
fid.filename = QFile::encodeName(fontfile->fileName);
fid.index = fontfile->indexValue;
bool antialias = !(fontDef.styleStrategy & QFont::NoAntialias);

View File

@ -211,7 +211,7 @@ static QString strippedText(QString s)
- (void)closePanel
{
*mCurrentSelection = QT_PREPEND_NAMESPACE(QCFString::toQString)([[mSavePanel URL] path]);
*mCurrentSelection = QT_PREPEND_NAMESPACE(QCFString::toQString)([[mSavePanel URL] path]).normalized(QString::NormalizationForm_C);
if ([mSavePanel respondsToSelector:@selector(close)])
[mSavePanel close];
if ([mSavePanel isSheet])
@ -376,11 +376,11 @@ static QString strippedText(QString s)
QStringList result;
NSArray* array = [mOpenPanel URLs];
for (NSUInteger i=0; i<[array count]; ++i)
result << QCFString::toQString([[array objectAtIndex:i] path]);
result << QCFString::toQString([[array objectAtIndex:i] path]).normalized(QString::NormalizationForm_C);
return result;
} else {
QStringList result;
QString filename = QT_PREPEND_NAMESPACE(QCFString::toQString)([[mSavePanel URL] path]);
QString filename = QT_PREPEND_NAMESPACE(QCFString::toQString)([[mSavePanel URL] path]).normalized(QString::NormalizationForm_C);
result << filename.remove(QLatin1String("___qt_very_unlikely_prefix_"));
return result;
}
@ -586,7 +586,7 @@ QString QCocoaFileDialogHelper::directory() const
{
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
if (delegate)
return QCFString::toQString([[delegate->mSavePanel directoryURL] path]);
return QCFString::toQString([[delegate->mSavePanel directoryURL] path]).normalized(QString::NormalizationForm_C);
return QString();
}

View File

@ -507,6 +507,7 @@ void QQnxIntegration::createDisplay(screen_display_t display, bool isPrimary)
QQnxScreen *screen = new QQnxScreen(m_screenContext, display, isPrimary);
m_screens.append(screen);
screenAdded(screen);
screen->adjustOrientation();
QObject::connect(m_screenEventHandler, SIGNAL(newWindowCreated(void*)),
screen, SLOT(newWindowCreated(void*)));

View File

@ -498,6 +498,18 @@ void QQnxScreen::onWindowPost(QQnxWindow *window)
}
}
void QQnxScreen::adjustOrientation()
{
if (!m_primaryScreen)
return;
bool ok = false;
const int rotation = qgetenv("ORIENTATION").toInt(&ok);
if (ok)
setRotation(rotation);
}
QPlatformCursor * QQnxScreen::cursor() const
{
return m_cursor;

View File

@ -92,6 +92,7 @@ public:
void updateHierarchy();
void onWindowPost(QQnxWindow *window);
void adjustOrientation();
QSharedPointer<QQnxRootWindow> rootWindow() const;

View File

@ -271,22 +271,19 @@ QWindowsContextPrivate::QWindowsContextPrivate() :
m_eventType(QByteArrayLiteral("windows_generic_MSG")),
m_lastActiveWindow(0), m_asyncExpose(0)
{
const QSysInfo::WinVersion ver = QSysInfo::windowsVersion();
#ifndef Q_OS_WINCE
QWindowsContext::user32dll.init();
QWindowsContext::shell32dll.init();
#endif
// Ensure metrics functions report correct data, QTBUG-30063.
if (QWindowsContext::user32dll.setProcessDPIAware)
QWindowsContext::user32dll.setProcessDPIAware();
m_displayContext = GetDC(0);
m_defaultDPI = GetDeviceCaps(m_displayContext, LOGPIXELSY);
const QSysInfo::WinVersion ver = QSysInfo::windowsVersion();
#ifndef Q_OS_WINCE
if (hasTouchSupport(ver) && QWindowsContext::user32dll.initTouch())
m_systemInfo |= QWindowsContext::SI_SupportsTouch;
#endif
#endif // !Q_OS_WINCE
m_displayContext = GetDC(0);
m_defaultDPI = GetDeviceCaps(m_displayContext, LOGPIXELSY);
if (useRTL_Extensions(ver)) {
m_systemInfo |= QWindowsContext::SI_RTL_Extensions;
m_keyMapper.setUseRTLExtensions(true);
@ -417,10 +414,7 @@ QString QWindowsContext::registerWindowClass(const QWindow *w, bool isGL)
if (icon)
cname += QStringLiteral("Icon");
HBRUSH brush = 0;
if (!isGL)
brush = GetSysColorBrush(COLOR_WINDOW);
return registerWindowClass(cname, qWindowsWndProc, style, brush, icon);
return registerWindowClass(cname, qWindowsWndProc, style, GetSysColorBrush(COLOR_WINDOW), icon);
}
QString QWindowsContext::registerWindowClass(QString cname,

View File

@ -285,7 +285,7 @@ static bool addFontToDatabase(const QString &familyName, uchar charSet,
return false;
if (!QDir::isAbsolutePath(value))
value.prepend(QString::fromLocal8Bit(qgetenv("windir") + "\\Fonts\\"));
value.prepend(QFile::decodeName(qgetenv("windir") + "\\Fonts\\"));
QPlatformFontDatabase::registerFont(faceName, QString(), foundryName, weight, style, stretch,
antialias, scalable, size, fixed, writingSystems, createFontFile(value, index));

View File

@ -190,7 +190,7 @@ void QWindowsFontEngine::getCMap()
unitsPerEm = otm->otmEMSquare;
x_height = (int)otm->otmsXHeight;
loadKerningPairs(designToDevice);
_faceId.filename = QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFullName)).toLatin1();
_faceId.filename = QFile::encodeName(QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFullName)));
lineWidth = otm->otmsUnderscoreSize;
fsType = otm->otmfsType;
free(otm);

View File

@ -84,6 +84,9 @@ namespace QTest
QTEST_ASSERT(window);
extern int Q_TESTLIB_EXPORT defaultMouseDelay();
if (!window->geometry().contains(pos))
QTest::qWarn("Mouse event occurs outside of target window.");
static Qt::MouseButton lastButton = Qt::NoButton;
if (delay == -1 || delay < defaultMouseDelay())

View File

@ -83,7 +83,6 @@ private:
int unindent = 0);
bool silent;
bool validRegExp;
QStringList plainLines;
QStringList markedLines;
Location codeLocation;

View File

@ -46,8 +46,7 @@
QT_BEGIN_NAMESPACE
DatabaseInfo::DatabaseInfo(Driver *drv)
: driver(drv)
DatabaseInfo::DatabaseInfo()
{
}

View File

@ -53,7 +53,7 @@ class Driver;
class DatabaseInfo : public TreeWalker
{
public:
DatabaseInfo(Driver *driver);
DatabaseInfo();
void acceptUI(DomUI *node);
void acceptWidget(DomWidget *node);
@ -68,7 +68,6 @@ public:
{ return m_fields.value(connection); }
private:
Driver *driver;
QStringList m_connections;
QMap<QString, QStringList> m_cursors;
QMap<QString, QStringList> m_fields;

View File

@ -67,7 +67,6 @@ Uic::Uic(Driver *d)
: drv(d),
out(d->output()),
opt(d->option()),
info(d),
externalPix(true)
{
}

View File

@ -3210,7 +3210,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
res = acceptTouchEvents && d->notify_helper(widget, touchEvent);
// If the touch event wasn't accepted, synthesize a mouse event and see if the widget wants it.
if (!touchEvent->isAccepted())
if (!touchEvent->isAccepted() && QGuiApplicationPrivate::synthesizeMouseFromTouchEventsEnabled())
res = d->translateTouchToMouse(widget, touchEvent);
break;
}
@ -3237,7 +3237,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
res = acceptTouchEvents && d->notify_helper(widget, touchEvent);
// If the touch event wasn't accepted, synthesize a mouse event and see if the widget wants it.
if (!touchEvent->isAccepted()) {
if (!touchEvent->isAccepted() && QGuiApplicationPrivate::synthesizeMouseFromTouchEventsEnabled()) {
res = d->translateTouchToMouse(widget, touchEvent);
eventAccepted = touchEvent->isAccepted();
if (eventAccepted)
@ -3801,10 +3801,6 @@ private:
bool QApplicationPrivate::translateTouchToMouse(QWidget *widget, QTouchEvent *event)
{
// Check if the platform wants synthesized mouse events.
if (!QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::SynthesizeMouseFromTouchEvents).toBool())
return false;
Q_FOREACH (const QTouchEvent::TouchPoint &p, event->touchPoints()) {
const QEvent::Type eventType = (p.state() & Qt::TouchPointPressed) ? QEvent::MouseButtonPress
: (p.state() & Qt::TouchPointReleased) ? QEvent::MouseButtonRelease
@ -3841,7 +3837,7 @@ bool QApplicationPrivate::translateTouchToMouse(QWidget *widget, QTouchEvent *ev
return false;
}
void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
bool QApplicationPrivate::translateRawTouchEvent(QWidget *window,
QTouchDevice *device,
const QList<QTouchEvent::TouchPoint> &touchPoints,
ulong timestamp)
@ -3903,8 +3899,9 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
}
if (widgetsNeedingEvents.isEmpty())
return;
return false;
bool accepted = false;
QHash<QWidget *, StatesAndTouchPoints>::ConstIterator it = widgetsNeedingEvents.constBegin();
const QHash<QWidget *, StatesAndTouchPoints>::ConstIterator end = widgetsNeedingEvents.constEnd();
for (; it != end; ++it) {
@ -3943,19 +3940,23 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window,
{
// if the TouchBegin handler recurses, we assume that means the event
// has been implicitly accepted and continue to send touch events
widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent);
(void ) QApplication::sendSpontaneousEvent(widget, &touchEvent);
if (QApplication::sendSpontaneousEvent(widget, &touchEvent) && touchEvent.isAccepted()) {
accepted = true;
widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent);
}
break;
}
default:
if (widget->testAttribute(Qt::WA_WState_AcceptedTouchBeginEvent)) {
if (touchEvent.type() == QEvent::TouchEnd)
widget->setAttribute(Qt::WA_WState_AcceptedTouchBeginEvent, false);
(void) QApplication::sendSpontaneousEvent(widget, &touchEvent);
if (QApplication::sendSpontaneousEvent(widget, &touchEvent) && touchEvent.isAccepted())
accepted = true;
}
break;
}
}
return accepted;
}
void QApplicationPrivate::translateTouchCancel(QTouchDevice *device, ulong timestamp)

View File

@ -284,7 +284,7 @@ public:
void appendTouchPoint(const QTouchEvent::TouchPoint &touchPoint);
void removeTouchPoint(int touchPointId);
bool translateTouchToMouse(QWidget *widget, QTouchEvent *event);
static void translateRawTouchEvent(QWidget *widget,
static bool translateRawTouchEvent(QWidget *widget,
QTouchDevice *device,
const QList<QTouchEvent::TouchPoint> &touchPoints,
ulong timestamp);

View File

@ -473,10 +473,12 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
void QWidgetWindow::handleTouchEvent(QTouchEvent *event)
{
if (event->type() == QEvent::TouchCancel)
if (event->type() == QEvent::TouchCancel) {
QApplicationPrivate::translateTouchCancel(event->device(), event->timestamp());
else
QApplicationPrivate::translateRawTouchEvent(m_widget, event->device(), event->touchPoints(), event->timestamp());
event->accept();
} else {
event->setAccepted(QApplicationPrivate::translateRawTouchEvent(m_widget, event->device(), event->touchPoints(), event->timestamp()));
}
}
void QWidgetWindow::handleKeyEvent(QKeyEvent *event)

View File

@ -39,8 +39,6 @@
**
****************************************************************************/
#define QT_DEPRECATED
#define QT_DISABLE_DEPRECATED_BEFORE 0
#include "private/qdataurl_p.h"
#include <QtTest/QtTest>
#include <QtCore/QDebug>

View File

@ -2,4 +2,3 @@ CONFIG += testcase parallel_test
TARGET = tst_qcoreapplication
QT = core testlib core-private
SOURCES = tst_qcoreapplication.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

View File

@ -643,7 +643,7 @@ void tst_QCoreApplication::customEventDispatcher()
QCOMPARE(QCoreApplication::eventDispatcher(), ed);
// test the alternative API of QAbstractEventDispatcher
QCOMPARE(QAbstractEventDispatcher::instance(), ed);
QWeakPointer<DummyEventDispatcher> weak_ed(ed);
QPointer<DummyEventDispatcher> weak_ed(ed);
QVERIFY(!weak_ed.isNull());
{
int argc = 1;

View File

@ -5,4 +5,3 @@ SOURCES = tst_qtranslator.cpp
RESOURCES += qtranslator.qrc
TESTDATA += hellotr_la.qm msgfmt_from_po.qm
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

View File

@ -200,10 +200,9 @@ void tst_QTranslator::plural()
tor.load("hellotr_la");
QVERIFY(!tor.isEmpty());
QCoreApplication::installTranslator(&tor);
QCoreApplication::Encoding e = QCoreApplication::UnicodeUTF8;
QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, e, 0), QString::fromLatin1("Hallo 0 Welten!"));
QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, e, 1), QString::fromLatin1("Hallo 1 Welt!"));
QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, e, 2), QString::fromLatin1("Hallo 2 Welten!"));
QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 0), QString::fromLatin1("Hallo 0 Welten!"));
QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 1), QString::fromLatin1("Hallo 1 Welt!"));
QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 2), QString::fromLatin1("Hallo 2 Welten!"));
}
void tst_QTranslator::translate_qm_file_generated_with_msgfmt()
@ -253,10 +252,9 @@ void tst_QTranslator::dependencies()
// plural
QCoreApplication::installTranslator(&tor);
QCoreApplication::Encoding e = QCoreApplication::UnicodeUTF8;
QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, e, 0), QString::fromLatin1("Hallo 0 Welten!"));
QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, e, 1), QString::fromLatin1("Hallo 1 Welt!"));
QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, e, 2), QString::fromLatin1("Hallo 2 Welten!"));
QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 0), QString::fromLatin1("Hallo 0 Welten!"));
QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 1), QString::fromLatin1("Hallo 1 Welt!"));
QCOMPARE(QCoreApplication::translate("QPushButton", "Hello %n world(s)!", 0, 2), QString::fromLatin1("Hallo 2 Welten!"));
// pick up translation from the file with dependencies
QCOMPARE(tor.translate("QPushButton", "It's a small world"), QString::fromLatin1("Es ist eine kleine Welt"));

View File

@ -41,6 +41,8 @@
#include <qwindow.h>
#include <qpa/qwindowsysteminterface.h>
#include <qpa/qplatformintegration.h>
#include <private/qguiapplication_p.h>
#include <QtTest/QtTest>
@ -484,6 +486,8 @@ void tst_QWindow::testInputEvents()
void tst_QWindow::touchToMouseTranslation()
{
if (!QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::SynthesizeMouseFromTouchEvents).toBool())
QSKIP("Mouse events are synthesized by the system on this platform.");
InputTestWindow window;
window.ignoreTouch = true;
window.setGeometry(80, 80, 40, 40);
@ -684,6 +688,8 @@ void tst_QWindow::touchCancel()
void tst_QWindow::touchCancelWithTouchToMouse()
{
if (!QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::SynthesizeMouseFromTouchEvents).toBool())
QSKIP("Mouse events are synthesized by the system on this platform.");
InputTestWindow window;
window.ignoreTouch = true;
window.setGeometry(80, 80, 40, 40);

View File

@ -690,33 +690,36 @@ void tst_QFont::defaultFamily()
void tst_QFont::sharing()
{
// QFontCache references the engineData
int refs_by_cache = 1;
QFont f;
f.setStyleHint(QFont::Serif);
f.exactMatch(); // loads engine
QCOMPARE(QFontPrivate::get(f)->ref.load(), 1);
QVERIFY(QFontPrivate::get(f)->engineData);
QCOMPARE(QFontPrivate::get(f)->engineData->ref.load(), 1);
QCOMPARE(QFontPrivate::get(f)->engineData->ref.load(), 1 + refs_by_cache);
QFont f2(f);
QVERIFY(QFontPrivate::get(f2) == QFontPrivate::get(f));
QCOMPARE(QFontPrivate::get(f2)->ref.load(), 2);
QVERIFY(QFontPrivate::get(f2)->engineData);
QVERIFY(QFontPrivate::get(f2)->engineData == QFontPrivate::get(f)->engineData);
QCOMPARE(QFontPrivate::get(f2)->engineData->ref.load(), 1);
QCOMPARE(QFontPrivate::get(f2)->engineData->ref.load(), 1 + refs_by_cache);
f2.setKerning(!f.kerning());
QVERIFY(QFontPrivate::get(f2) != QFontPrivate::get(f));
QCOMPARE(QFontPrivate::get(f2)->ref.load(), 1);
QVERIFY(QFontPrivate::get(f2)->engineData);
QVERIFY(QFontPrivate::get(f2)->engineData == QFontPrivate::get(f)->engineData);
QCOMPARE(QFontPrivate::get(f2)->engineData->ref.load(), 2);
QCOMPARE(QFontPrivate::get(f2)->engineData->ref.load(), 2 + refs_by_cache);
f2 = f;
QVERIFY(QFontPrivate::get(f2) == QFontPrivate::get(f));
QCOMPARE(QFontPrivate::get(f2)->ref.load(), 2);
QVERIFY(QFontPrivate::get(f2)->engineData);
QVERIFY(QFontPrivate::get(f2)->engineData == QFontPrivate::get(f)->engineData);
QCOMPARE(QFontPrivate::get(f2)->engineData->ref.load(), 1);
QCOMPARE(QFontPrivate::get(f2)->engineData->ref.load(), 1 + refs_by_cache);
if (f.pointSize() > 0)
f2.setPointSize(f.pointSize() * 2 / 3);

View File

@ -74,19 +74,23 @@
#include <qstyleditemdelegate.h>
#include <qproxystyle.h>
static inline void setFrameless(QWidget *w)
{
Qt::WindowFlags flags = w->windowFlags();
flags |= Qt::FramelessWindowHint;
flags &= ~(Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
w->setWindowFlags(flags);
}
class tst_QComboBox : public QObject
{
Q_OBJECT
public:
tst_QComboBox();
~tst_QComboBox();
tst_QComboBox() {}
public slots:
void initTestCase();
void cleanupTestCase();
void init();
void cleanup();
private slots:
void getSetCheck();
@ -156,11 +160,6 @@ private slots:
void maxVisibleItems();
void task_QTBUG_10491_currentIndexAndModelColumn();
void highlightedSignal();
private:
QComboBox *testWidget;
QWidget *parent;
QPushButton* ok;
};
class MyAbstractItemDelegate : public QAbstractItemDelegate
@ -373,53 +372,40 @@ typedef QList<QIcon> IconList;
Q_DECLARE_METATYPE(QComboBox::InsertPolicy)
tst_QComboBox::tst_QComboBox()
class TestWidget : public QWidget
{
parent = 0;
}
public:
TestWidget() : QWidget(0, Qt::Window), m_comboBox(new QComboBox(this))
{
setObjectName("parent");
move(200, 200);
resize(400, 400);
m_comboBox->setGeometry(0, 0, 100, 100);
m_comboBox->setObjectName("testObject");
m_comboBox->setEditable(false);
}
tst_QComboBox::~tst_QComboBox()
{
}
QComboBox *comboBox() const { return m_comboBox; }
private:
QComboBox *m_comboBox;
void tst_QComboBox::initTestCase()
{
// Create the test class
parent = new QWidget(0, Qt::Window);
parent->setObjectName("parent");
parent->resize(400, 400);
testWidget = new QComboBox(parent);
testWidget->setObjectName("testObject");
testWidget->setGeometry(0, 0, 100, 100);
parent->show();
}
void tst_QComboBox::cleanupTestCase()
{
delete parent;
parent = 0;
}
};
void tst_QComboBox::init()
{
// all tests starts with a clean non-editable combobox
testWidget->setEditable(false);
testWidget->clear();
#ifdef Q_OS_WINCE //disable magic for WindowsCE
qApp->setAutoMaximizeThreshold(-1);
#endif
}
void tst_QComboBox::cleanup()
{
//nothing
}
void tst_QComboBox::setEditable()
{
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
// make sure we have no lineedit
QVERIFY(!testWidget->lineEdit());
// test setEditable(true)
@ -442,10 +428,14 @@ void tst_QComboBox::setEditable()
void tst_QComboBox::setPalette()
{
#ifdef Q_OS_MAC
if (testWidget->style()->inherits("QMacStyle")) {
if (QApplication::style()->inherits("QMacStyle")) {
QSKIP("This test doesn't make sense for pixmap-based styles");
}
#endif
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
QPalette pal = testWidget->palette();
pal.setColor(QPalette::Base, Qt::red);
testWidget->setPalette(pal);
@ -477,6 +467,10 @@ void tst_QComboBox::setPalette()
void tst_QComboBox::sizeAdjustPolicy()
{
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
// test that adding new items will not change the sizehint for AdjustToContentsOnFirstShow
QVERIFY(!testWidget->count());
QVERIFY(testWidget->sizeAdjustPolicy() == QComboBox::AdjustToContentsOnFirstShow);
@ -537,6 +531,10 @@ void tst_QComboBox::sizeAdjustPolicy()
void tst_QComboBox::clear()
{
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
// first non editable combobox
testWidget->addItem("foo");
testWidget->addItem("bar");
@ -711,6 +709,10 @@ void tst_QComboBox::insertPolicy()
QFETCH(QString, userInput);
QFETCH(QStringList, result);
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
testWidget->clear();
testWidget->setInsertPolicy(insertPolicy);
testWidget->addItems(initialEntries);
@ -740,6 +742,10 @@ void tst_QComboBox::insertPolicy()
// Apps running with valgrind are not fast enough.
void tst_QComboBox::virtualAutocompletion()
{
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
testWidget->clear();
testWidget->setAutoCompletion(true);
testWidget->addItem("Foo");
@ -792,9 +798,13 @@ void tst_QComboBox::autoCompletionCaseSensitivity()
{
//we have put the focus because the completer
//is only used when the widget actually has the focus
TestWidget topLevel;
topLevel.show();
QComboBox *testWidget = topLevel.comboBox();
qApp->setActiveWindow(&topLevel);
testWidget->setFocus();
qApp->setActiveWindow(testWidget);
QTRY_COMPARE(qApp->focusWidget(), (QWidget *)testWidget);
QVERIFY(QTest::qWaitForWindowActive(&topLevel));
QCOMPARE(qApp->focusWidget(), (QWidget *)testWidget);
testWidget->clear();
testWidget->setAutoCompletion(true);
@ -886,6 +896,10 @@ void tst_QComboBox::autoCompletionCaseSensitivity()
void tst_QComboBox::hide()
{
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
testWidget->addItem("foo");
testWidget->showPopup();
//allow combobox effect to complete
@ -1101,6 +1115,10 @@ void tst_QComboBox::currentIndex()
QFETCH(QString, expectedCurrentText);
QFETCH(int, expectedSignalCount);
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
// test both editable/non-editable combobox
for (int edit = 0; edit < 2; ++edit) {
testWidget->clear();
@ -1196,6 +1214,10 @@ void tst_QComboBox::insertItems()
QFETCH(int, insertIndex);
QFETCH(int, expectedIndex);
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
testWidget->insertItems(0, initialItems);
QCOMPARE(testWidget->count(), initialItems.count());
@ -1234,6 +1256,10 @@ void tst_QComboBox::insertItem()
QFETCH(int, expectedIndex);
QFETCH(bool, editable);
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
testWidget->insertItems(0, initialItems);
QCOMPARE(testWidget->count(), initialItems.count());
@ -1251,6 +1277,10 @@ void tst_QComboBox::insertItem()
void tst_QComboBox::insertOnCurrentIndex()
{
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
testWidget->setEditable(true);
testWidget->addItem("first item");
testWidget->setCurrentIndex(0);
@ -1308,6 +1338,10 @@ void tst_QComboBox::textpixmapdata()
QVERIFY(text.count() == icons.count() && text.count() == variant.count());
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
for (int i = 0; i<text.count(); ++i) {
testWidget->insertItem(i, text.at(i));
testWidget->setItemIcon(i, icons.at(i));
@ -1333,6 +1367,10 @@ void tst_QComboBox::textpixmapdata()
void tst_QComboBox::setCurrentIndex()
{
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
QCOMPARE(testWidget->count(), 0);
testWidget->addItem("foo");
testWidget->addItem("bar");
@ -1360,6 +1398,10 @@ void tst_QComboBox::setCurrentText()
{
QFETCH(bool, editable);
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
QCOMPARE(testWidget->count(), 0);
testWidget->addItems(QStringList() << "foo" << "bar");
QCOMPARE(testWidget->count(), 2);
@ -1411,6 +1453,10 @@ void tst_QComboBox::currentTextChanged()
{
QFETCH(bool, editable);
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
QCOMPARE(testWidget->count(), 0);
testWidget->addItems(QStringList() << "foo" << "bar");
QCOMPARE(testWidget->count(), 2);
@ -1455,6 +1501,10 @@ void tst_QComboBox::currentTextChanged()
void tst_QComboBox::editTextChanged()
{
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
QCOMPARE(testWidget->count(), 0);
testWidget->addItem("foo");
testWidget->addItem("bar");
@ -1677,6 +1727,7 @@ public:
void tst_QComboBox::ensureReturnIsIgnored()
{
ReturnClass r;
r.move(200, 200);
r.show();
QTest::keyClick(r.edit, Qt::Key_Return);
@ -1716,6 +1767,10 @@ void tst_QComboBox::findText()
QFETCH(QString, search);
QFETCH(int, result);
TestWidget topLevel;
topLevel.show();
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
QComboBox *testWidget = topLevel.comboBox();
testWidget->clear();
testWidget->addItems(items);
@ -1824,6 +1879,7 @@ void tst_QComboBox::flaggedItems()
QFETCH(int, expectedIndex);
QComboBox comboBox;
setFrameless(&comboBox);
QListWidget listWidget;
listWidget.addItems(itemList);
@ -1836,6 +1892,7 @@ void tst_QComboBox::flaggedItems()
comboBox.setModel(listWidget.model());
comboBox.setView(&listWidget);
comboBox.move(200, 200);
comboBox.show();
QApplication::setActiveWindow(&comboBox);
comboBox.activateWindow();
@ -1987,6 +2044,8 @@ void tst_QComboBox::itemListPosition()
//we test QFontComboBox because it has the specific behaviour to set a fixed size
//to the list view
QWidget topLevel;
topLevel.resize(200, 200);
topLevel.move(100, 100);
QFontComboBox combo(&topLevel);
//the code to get the available screen space is copied from QComboBox code
@ -2047,6 +2106,8 @@ void tst_QComboBox::task190351_layout()
QApplication::setStyle(QStyleFactory::create(QLatin1String("Fusion")));
QComboBox listCombo;
listCombo.move(200, 200);
setFrameless(&listCombo);
QListWidget *list = new QListWidget();
listCombo.setModel(list->model());
listCombo.setView(list);
@ -2111,7 +2172,10 @@ void tst_QComboBox::task191329_size()
const QString oldStyle = QApplication::style()->objectName();
QApplication::setStyle(QStyleFactory::create(QLatin1String("Fusion")));
QComboBox tableCombo;
setFrameless(&tableCombo);
tableCombo.move(200, 200);
int rows;
if (QApplication::desktop()->screenGeometry().height() < 480)
rows = 8;
@ -2159,6 +2223,8 @@ void tst_QComboBox::task190205_setModelAdjustToContents()
finalContent << "bar" << "foooooooobar";
QComboBox box;
setFrameless(&box);
box.move(100, 100);
box.setSizeAdjustPolicy(QComboBox::AdjustToContents);
box.addItems(initialContent);
box.show();
@ -2169,6 +2235,9 @@ void tst_QComboBox::task190205_setModelAdjustToContents()
box.setModel(new QStringListModel(finalContent));
QComboBox correctBox;
setFrameless(&correctBox);
correctBox.move(400, 100);
correctBox.addItems(finalContent);
correctBox.show();
@ -2210,6 +2279,8 @@ void tst_QComboBox::task248169_popupWithMinimalSize()
void tst_QComboBox::task247863_keyBoardSelection()
{
QComboBox combo;
setFrameless(&combo);
combo.move(200, 200);
combo.setEditable(false);
combo.addItem( QLatin1String("111"));
combo.addItem( QLatin1String("222"));
@ -2230,6 +2301,8 @@ void tst_QComboBox::task247863_keyBoardSelection()
void tst_QComboBox::task220195_keyBoardSelection2()
{
QComboBox combo;
setFrameless(&combo);
combo.move(200, 200);
combo.setEditable(false);
combo.addItem( QLatin1String("foo1"));
combo.addItem( QLatin1String("foo2"));
@ -2315,6 +2388,7 @@ void tst_QComboBox::noScrollbar()
QWidget topLevel;
QComboBox comboBox(&topLevel);
comboBox.addItems(initialContent);
topLevel.move(200, 200);
topLevel.show();
comboBox.resize(200, comboBox.height());
QTRY_VERIFY(comboBox.isVisible());
@ -2331,6 +2405,7 @@ void tst_QComboBox::noScrollbar()
QComboBox comboBox;
comboBox.setModel(table->model());
comboBox.setView(table);
comboBox.move(200, 200);
comboBox.show();
QTRY_VERIFY(comboBox.isVisible());
comboBox.resize(200, comboBox.height());
@ -2447,6 +2522,7 @@ void tst_QComboBox::task260974_menuItemRectangleForComboBoxPopup()
QComboBox comboBox;
comboBox.setStyle(&style);
comboBox.addItem("Item 1");
comboBox.move(200, 200);
comboBox.show();
QTRY_VERIFY(comboBox.isVisible());
@ -2511,8 +2587,11 @@ void tst_QComboBox::keyBoardNavigationWithMouse()
{
QComboBox combo;
combo.setEditable(false);
setFrameless(&combo);
combo.move(200, 200);
for (int i = 0; i < 80; i++)
combo.addItem( QString::number(i));
combo.show();
QApplication::setActiveWindow(&combo);
QVERIFY(QTest::qWaitForWindowActive(&combo));
@ -2523,7 +2602,7 @@ void tst_QComboBox::keyBoardNavigationWithMouse()
combo.setFocus();
QTRY_VERIFY(combo.hasFocus());
QTest::keyClick(testWidget->lineEdit(), Qt::Key_Space);
QTest::keyClick(combo.lineEdit(), Qt::Key_Space);
QTest::qWait(30);
QTRY_VERIFY(combo.view());
QTRY_VERIFY(combo.view()->isVisible());
@ -2568,6 +2647,7 @@ void tst_QComboBox::keyBoardNavigationWithMouse()
void tst_QComboBox::task_QTBUG_1071_changingFocusEmitsActivated()
{
QWidget w;
w.move(200, 200);
QVBoxLayout layout(&w);
QComboBox cb;
cb.setEditable(true);
@ -2603,6 +2683,7 @@ void tst_QComboBox::maxVisibleItems()
content += QString::number(i);
comboBox.addItems(content);
comboBox.move(200, 200);
comboBox.show();
comboBox.resize(200, comboBox.height());
QTRY_VERIFY(comboBox.isVisible());