From e0dc27d791cd2106f661bd3d949281aaf1239990 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 8 Jul 2014 11:01:50 +0200 Subject: Doc: Hide QTextInlineObject constructor from the documentation The constructor takes an internal class instance as a parameter, and is not meant to be used externally. Add a note in the description and hide the constructor. Task-number: QTBUG-39785 Change-Id: Ice850f0968880f3933ebb7ae83efeaeed85441cb Reviewed-by: Konstantin Ritt Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qtextlayout.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui') diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index ede7426ffc..4879ae51d7 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -108,6 +108,10 @@ QT_BEGIN_NAMESPACE This class is only used if the text layout is used to lay out parts of a QTextDocument. + Normally, you do not need to create a QTextInlineObject. It is + used by QAbstractTextDocumentLayout to handle inline objects when + implementing a custom layout. + The inline object has various attributes that can be set, for example using, setWidth(), setAscent(), and setDescent(). The rectangle it occupies is given by rect(), and its direction by @@ -117,6 +121,7 @@ QT_BEGIN_NAMESPACE /*! \fn QTextInlineObject::QTextInlineObject(int i, QTextEngine *e) + \internal Creates a new inline object for the item at position \a i in the text engine \a e. -- cgit v1.2.3 From 8ee19816c87918136ea84f8451ab9e9c9764c8de Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 3 Jul 2014 14:52:21 +0200 Subject: CMake: Don't check the existence of GL files in the Qt5Gui package. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The GL libraries are optional, so they should not be added to the DEPENDENT libraries of Qt5::Gui if not found. Task-number: QTBUG-39859 Change-Id: Ib0e01da56a9fb5048a6ad8e0e9cede07fe0cf43b Reviewed-by: Lisandro Damián Nicanor Pérez Meyer Reviewed-by: Stephen Kelly --- src/gui/Qt5GuiConfigExtras.cmake.in | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/gui') diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in index d734e56d23..9a846d435e 100644 --- a/src/gui/Qt5GuiConfigExtras.cmake.in +++ b/src/gui/Qt5GuiConfigExtras.cmake.in @@ -66,7 +66,8 @@ if (NOT _qt5gui_OPENGL_INCLUDE_DIR) endif() unset(_GL_INCDIRS) -_qt5_Gui_check_file_exists(${_qt5gui_OPENGL_INCLUDE_DIR}) +# Don\'t check for existence of the "_qt5gui_OPENGL_INCLUDE_DIR" because it is +# optional. list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR}) set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR}) @@ -105,13 +106,18 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs) ) !!IF mac set(Qt5Gui_${_cmake_lib_name}_LIBRARY "${Qt5Gui_${_cmake_lib_name}_LIBRARY}/${_lib}") + if (NOT EXISTS "${Qt5Gui_${_cmake_lib_name}_LIBRARY}") + set(Qt5Gui_${_cmake_lib_name}_LIBRARY) + endif() !!ENDIF - if (WIN32 AND NOT Qt5Gui_${_cmake_lib_name}_LIBRARY) + if (NOT Qt5Gui_${_cmake_lib_name}_LIBRARY) # The above find_library call doesn\'t work for finding # libraries in Windows SDK paths outside of the proper - # environment. Just add the library name to the result - # variable instead. - # We avoid doing this in the first case because Qt may be + # environment, even if the libraries are present. In other + # cases it is OK for the libraries to not be found + # because they are optional dependencies of Qt5Gui, needed + # only if the qopengl.h header is used. + # We try to find the libraries in the first place because Qt may be # compiled with another set of GL libraries (such as coming # from ANGLE). The point of these find calls is to try to # find the same binaries as Qt is compiled with (as they are @@ -119,7 +125,6 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs) # above with paths known to qmake. set(_Qt5Gui_${_cmake_lib_name}_LIBRARY_DONE TRUE) unset(Qt5Gui_${_cmake_lib_name}_LIBRARY CACHE) - list(APPEND Qt5Gui_${Name}_LIBRARIES ${_lib}) else() add_library(Qt5::Gui_${_cmake_lib_name} SHARED IMPORTED) set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Qt5Gui_${Name}_INCLUDE_DIRS}) @@ -152,11 +157,6 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs) endif() endif() endforeach() - if (NOT CMAKE_CROSSCOMPILING) - foreach(_dir ${Qt5Gui_${Name}_INCLUDE_DIRS}) - _qt5_Gui_check_file_exists(${_dir}) - endforeach() - endif() endmacro() -- cgit v1.2.3 From a71e285133087714034f3c84a758980c85b3801e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 14 Jul 2014 13:53:23 +0200 Subject: Ensure transient parents are top level widgets. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a dialog was parented on a native child widget, its window handle was used as a transient parent. This confused QPlatformWindow::initialGeometry() among other things. Use top level window as is in Qt 4. Task-number: QTBUG-40195 Change-Id: Ic82adc276175f92adde825fb2551274351e41f30 Reviewed-by: Jørgen Lind --- src/gui/kernel/qwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui') diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 40e9b9723a..d6f9fad070 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1083,6 +1083,11 @@ Qt::WindowState QWindow::windowState() const void QWindow::setTransientParent(QWindow *parent) { Q_D(QWindow); + if (parent && !parent->isTopLevel()) { + qWarning() << Q_FUNC_INFO << parent << "must be a top level window."; + return; + } + d->transientParent = parent; QGuiApplicationPrivate::updateBlockedStatus(this); -- cgit v1.2.3