Merge remote-tracking branch 'origin/release' into stable
Change-Id: I2e2bf789b0fe8442ed623bc0c8aef591235cdabe
This commit is contained in:
commit
8e04691543
144
dist/changes-5.2.0
vendored
144
dist/changes-5.2.0
vendored
@ -48,6 +48,10 @@ information about a particular change.
|
|||||||
* QUrl now normalizes the path given in setPath, removing ./ and ../ and
|
* QUrl now normalizes the path given in setPath, removing ./ and ../ and
|
||||||
duplicate slashes.
|
duplicate slashes.
|
||||||
|
|
||||||
|
- QWheelEvent has gained a "phase" attribute and may now be sent with
|
||||||
|
zero delta() in order to indicate beginning and end of transient
|
||||||
|
scrolling.
|
||||||
|
|
||||||
****************************************************************************
|
****************************************************************************
|
||||||
* Library *
|
* Library *
|
||||||
****************************************************************************
|
****************************************************************************
|
||||||
@ -290,6 +294,9 @@ QtGui
|
|||||||
- [QTBUG-27349] Reintroduced command line argument for positioning
|
- [QTBUG-27349] Reintroduced command line argument for positioning
|
||||||
windows (-geometry on X11, -qwindowgeometry on other platforms)
|
windows (-geometry on X11, -qwindowgeometry on other platforms)
|
||||||
|
|
||||||
|
- [QTBUG-28832] Fixed regression from Qt 4 when using
|
||||||
|
QTextOption::ShowLineAndParagraphSeparators.
|
||||||
|
|
||||||
QtNetwork
|
QtNetwork
|
||||||
---------
|
---------
|
||||||
|
|
||||||
@ -353,12 +360,24 @@ Changes in Qt 5.2.0
|
|||||||
QtWidgets
|
QtWidgets
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
- Added class QKeySequenceEdit.
|
||||||
|
- Added QMaxCocoaViewContainer and QMacNativeWidget classes.
|
||||||
|
- [QTBUG-1016] Added API to control tool tip timing via:
|
||||||
|
* new QToolTip::showTip() overload
|
||||||
|
* QWidget::toolTipDuration() property.
|
||||||
|
* QStyle::SH_ToolTip_WakeUpDelay and SH_ToolTip_FallAsleepDelay
|
||||||
|
style hints.
|
||||||
- [QTBUG-30255] Fixed a bug where spans across empty cells in a grid
|
- [QTBUG-30255] Fixed a bug where spans across empty cells in a grid
|
||||||
layout got broken.
|
layout got broken.
|
||||||
|
- [QTBUG-31569] WA_QuitOnClose now works even if there are other
|
||||||
|
windows that don't have it set.
|
||||||
- [QTBUG-32788] Properly handles Qt::WidgetWithChildrenShortcut
|
- [QTBUG-32788] Properly handles Qt::WidgetWithChildrenShortcut
|
||||||
shortcuts in MDI subwindows now.
|
shortcuts in MDI subwindows now.
|
||||||
- [QTBUG-33078] QWidget::setWindowOpacity() now works when called
|
- [QTBUG-33078] QWidget::setWindowOpacity() now works when called
|
||||||
before QWidget::show().
|
before QWidget::show().
|
||||||
|
- [QTBUG-33104] Fixed a bug where layout items with a Preferred size
|
||||||
|
policy would be treated as fixed size, if mixed with Expanding
|
||||||
|
items having maximumSize set.
|
||||||
- [QTBUG-33247] Changed accessible trees and tables to always expose
|
- [QTBUG-33247] Changed accessible trees and tables to always expose
|
||||||
hidden headers, instead of only exposing the visible headers.
|
hidden headers, instead of only exposing the visible headers.
|
||||||
- [QTBUG-34007] Fixed a crash in tablet support.
|
- [QTBUG-34007] Fixed a crash in tablet support.
|
||||||
@ -384,18 +403,26 @@ QtWidgets
|
|||||||
overriding viewportSizeHint() needs to be recompiled against 5.2 for
|
overriding viewportSizeHint() needs to be recompiled against 5.2 for
|
||||||
this feature to work correctly.
|
this feature to work correctly.
|
||||||
|
|
||||||
|
- QButtonGroup:
|
||||||
|
* [QTBUG-14857] Added buttonToggled() signals.
|
||||||
|
|
||||||
- QColorDialog:
|
- QColorDialog:
|
||||||
* Added a web color QLineEdit.
|
* Added a web color QLineEdit.
|
||||||
* [QTBUG-14332] Added a screen color picker button.
|
* [QTBUG-14332] Added a screen color picker button.
|
||||||
* [QTBUG-31998] Does no longer create widgets when using the
|
* [QTBUG-31998] Does no longer create widgets when using the
|
||||||
platform dialog.
|
platform dialog.
|
||||||
|
* [QTBUG-32054] Fixed a bug with keyboard navigation.
|
||||||
|
|
||||||
- QComboBox:
|
- QComboBox:
|
||||||
|
* [QTBUG-31146] Fixed selection of items with identical text in
|
||||||
|
popup completion.
|
||||||
* Added currentData() convenience function which allows to retrieve
|
* Added currentData() convenience function which allows to retrieve
|
||||||
the user data set for the current item.
|
the user data set for the current item.
|
||||||
|
|
||||||
- QCompleter:
|
- QCompleter:
|
||||||
* [QTBUG-3414] Added filterMode property.
|
* [QTBUG-3414] Added filterMode property.
|
||||||
|
* The activated() signal now passes invalid indexes instead of
|
||||||
|
random bogus ones when falling back to the completion prefix.
|
||||||
|
|
||||||
- QDesktopWidget:
|
- QDesktopWidget:
|
||||||
* [QTBUG-32567] Fixed emission of workAreaResized() signal.
|
* [QTBUG-32567] Fixed emission of workAreaResized() signal.
|
||||||
@ -434,10 +461,16 @@ QtWidgets
|
|||||||
* [QTBUG-33039] Does no longer create widgets when using the
|
* [QTBUG-33039] Does no longer create widgets when using the
|
||||||
platform dialog.
|
platform dialog.
|
||||||
|
|
||||||
|
- QFontComboBox:
|
||||||
|
* [QTBUG-1573] Made QFontComboBox locale-sensitive.
|
||||||
|
|
||||||
- QFontDialog:
|
- QFontDialog:
|
||||||
* Now has finer-grained control over the types of fonts listed,
|
* Now has finer-grained control over the types of fonts listed,
|
||||||
similar to what QFontComboBox already had.
|
similar to what QFontComboBox already had.
|
||||||
|
|
||||||
|
- QGestureManager
|
||||||
|
* Now supports Mac OS X native gestures.
|
||||||
|
|
||||||
- QGraphicsView etc
|
- QGraphicsView etc
|
||||||
* Fixed a crash in QGraphicsProxyWidget.
|
* Fixed a crash in QGraphicsProxyWidget.
|
||||||
* [QTBUG-8061] Allow handling of mouseDoubleClickEvent in
|
* [QTBUG-8061] Allow handling of mouseDoubleClickEvent in
|
||||||
@ -446,16 +479,30 @@ QtWidgets
|
|||||||
Qt::{Contains,Intersets}ItemBoundingRect with items that contain
|
Qt::{Contains,Intersets}ItemBoundingRect with items that contain
|
||||||
the point in the bounding rectangle, but not their (custom)
|
the point in the bounding rectangle, but not their (custom)
|
||||||
shape.
|
shape.
|
||||||
|
* [QTBUG-29945] Fixed drop-shadow and blur effects when using a
|
||||||
|
QGLWidget viewport.
|
||||||
|
|
||||||
|
- QGroupBox:
|
||||||
|
* [QTBUG-33610] The check indicator of a checkable group box is no
|
||||||
|
longer clipped when using a small title font.
|
||||||
|
|
||||||
- QHeaderView:
|
- QHeaderView:
|
||||||
|
* Reduced memory usage by 33%.
|
||||||
* [QTBUG-4346] A maximumSize for sections has been introduced. The
|
* [QTBUG-4346] A maximumSize for sections has been introduced. The
|
||||||
maximum section size is by default the largest possible section
|
maximum section size is by default the largest possible section
|
||||||
size which in Qt 5.2 has been limited to 1048575 pixels.
|
size which in Qt 5.2 has been limited to 1048575 pixels.
|
||||||
|
* [QTBUG-32203] Fixed a painting bug involving hidden and reordered
|
||||||
|
sections.
|
||||||
|
|
||||||
- QInputDialog:
|
- QInputDialog:
|
||||||
* Added getMultiLineText static method.
|
* Added getMultiLineText static method.
|
||||||
|
|
||||||
|
- QLayout:
|
||||||
|
* Added replaceWidget() function.
|
||||||
|
|
||||||
- QLineEdit:
|
- QLineEdit:
|
||||||
|
* [QTBUG-32061] The cursor is now positioned correctly in an empty
|
||||||
|
line edit with placeholder text.
|
||||||
* Keep placeholderText visible when focused, until text is added.
|
* Keep placeholderText visible when focused, until text is added.
|
||||||
* Context-menu actions now have icons.
|
* Context-menu actions now have icons.
|
||||||
* Made it possible to add side widgets.
|
* Made it possible to add side widgets.
|
||||||
@ -467,28 +514,59 @@ QtWidgets
|
|||||||
no longer loses the icon. Also fixed a bug where under certain
|
no longer loses the icon. Also fixed a bug where under certain
|
||||||
conditions code overriding QAbstractItemView::viewOptions() would
|
conditions code overriding QAbstractItemView::viewOptions() would
|
||||||
not be called.
|
not be called.
|
||||||
|
* [QTBUG-21433] Fixed content size calculation when either
|
||||||
|
horizontal or vertical scroll bar policy is always off.
|
||||||
|
|
||||||
|
- QMacStyle:
|
||||||
|
* [QTBUG-31668] Fixed a case where multiple auto-default button
|
||||||
|
animations were running in parallel on OS X
|
||||||
|
|
||||||
|
- QMainWindow:
|
||||||
|
* Added takeCentalWidget() function.
|
||||||
|
|
||||||
|
- QMenu:
|
||||||
|
* Added QMenu::toNSMenu() conversion function (Mac only)
|
||||||
|
* Added QMenu::setAsDockMenu() and qt_mac_set_doc_menu(QMenu *menu)
|
||||||
|
functions (Mac only).
|
||||||
|
* [QTBUG-31664] Moving the mouse over a menu separator now closes
|
||||||
|
any open sub menus.
|
||||||
|
|
||||||
- QMenuBar:
|
- QMenuBar:
|
||||||
* [QTBUG-32807] Menus now close again on second click.
|
* [QTBUG-32807] Menus now close again on second click.
|
||||||
|
* Added QMenuBar::toNSMenu() conversion function (Mac only)
|
||||||
|
|
||||||
- QMessageBox:
|
- QMessageBox:
|
||||||
* May use native message boxes on some platforms now.
|
* May use native message boxes on some platforms now.
|
||||||
|
* setDetailedText() now works after show().
|
||||||
|
* [QTBUG-2450] Added setCheckBox() function.
|
||||||
* [QTBUG-6731] It is now possible to select some or all text from a
|
* [QTBUG-6731] It is now possible to select some or all text from a
|
||||||
QMessageBox and copy it to the clipboard.
|
QMessageBox and copy it to the clipboard.
|
||||||
|
|
||||||
|
- QScrollBar:
|
||||||
|
* Transient scrollbars are now properly shown when starting
|
||||||
|
two-finger scrolling on OS X.
|
||||||
|
|
||||||
- QSizePolicy:
|
- QSizePolicy:
|
||||||
* Added a retainSizeWhenHidden attribute.
|
* Added a retainSizeWhenHidden attribute.
|
||||||
|
|
||||||
- QSpinBox:
|
- QSpinBox:
|
||||||
* Values can now be displayed in different bases
|
* Values can now be displayed in different bases
|
||||||
(cf. displayIntegerBase property)
|
(cf. displayIntegerBase property)
|
||||||
* [QTBUG-31602] Size calculation will now be fixed when stylesheets
|
* [QTBUG-31602][QTBUG-34305] Fixed size calculation when
|
||||||
are used.
|
stylesheets are used.
|
||||||
|
|
||||||
|
- QSplashScreen:
|
||||||
|
* Added message(), a getter for the currently displayed message.
|
||||||
|
|
||||||
- QSplitter:
|
- QSplitter:
|
||||||
* Now gets the default value of opaqueResize property from (new)
|
* Now gets the default value of opaqueResize property from (new)
|
||||||
QStyle::SH_Splitter_OpaqueResize styleHint.
|
QStyle::SH_Splitter_OpaqueResize styleHint.
|
||||||
|
|
||||||
|
- QStyle:
|
||||||
|
* Added SH_ToolTip_WakeUpDelay and SH_ToolTip_FallAsleepDelay.
|
||||||
|
* Fixed SH_ItemView_ActivateItemOnSingleClick not being retrieved
|
||||||
|
correctly from the platform theme.
|
||||||
|
|
||||||
- QSystemTrayIcon:
|
- QSystemTrayIcon:
|
||||||
* [QTBUG-31762] Fixed position of system tray icon on Linux/X11
|
* [QTBUG-31762] Fixed position of system tray icon on Linux/X11
|
||||||
(except Unity).
|
(except Unity).
|
||||||
@ -505,14 +583,26 @@ QtWidgets
|
|||||||
* Added placeholderText akin to QLineEdit.
|
* Added placeholderText akin to QLineEdit.
|
||||||
* Context-menu actions now have icons.
|
* Context-menu actions now have icons.
|
||||||
|
|
||||||
|
- QToolTip:
|
||||||
|
* Added new showText() overload taking a duration.
|
||||||
|
|
||||||
- QTreeView:
|
- QTreeView:
|
||||||
* QTreeView now has setTreePosition to allow the treestructure to
|
* Added setTreePosition() function.
|
||||||
show data from other columns than logicalindex zero.
|
|
||||||
|
- QWidget:
|
||||||
|
* Added window{Title,Icon,IconText}Changed() signals.
|
||||||
|
* Added toolTipDuration property.
|
||||||
|
|
||||||
- QWindowContainer:
|
- QWindowContainer:
|
||||||
* [QTBUG-32177] Sets active window correctly now.
|
* [QTBUG-32177] Sets active window correctly now.
|
||||||
|
* [QTBUG-34138] Will not create native child widgets any more.
|
||||||
|
|
||||||
|
- QWindowsVistaStyle:
|
||||||
|
* [QTBUG-26503] Does no longer draw inapplicable scroll bar
|
||||||
|
grippers on Windows 8.
|
||||||
|
|
||||||
- QWizard:
|
- QWizard:
|
||||||
|
* [QTBUG-26722] The default background pixmap works again on OS X.
|
||||||
* [QTBUG-29924] Gave all buttons an objectName().
|
* [QTBUG-29924] Gave all buttons an objectName().
|
||||||
|
|
||||||
****************************************************************************
|
****************************************************************************
|
||||||
@ -533,10 +623,45 @@ Android
|
|||||||
show the status bar (QWindow::showMaximized()). Use
|
show the status bar (QWindow::showMaximized()). Use
|
||||||
QWindow::showFullScreen() to hide it.
|
QWindow::showFullScreen() to hide it.
|
||||||
- Implemented support for accessibility on Android.
|
- Implemented support for accessibility on Android.
|
||||||
|
- Implemented support for native action bar backend for menu bars in
|
||||||
|
Qt Quick Controls and Qt Widgets.
|
||||||
|
- Implemented support for native popup menus and comboboxes in Qt Quick
|
||||||
|
Controls.
|
||||||
|
- Implemented support for native message boxes in Qt Widgets.
|
||||||
|
- Several improvements to handling dialogs and multiple top-level
|
||||||
|
windows in Qt Widgets.
|
||||||
|
- Implemented automatic inclusion of necessary permissions in manifest
|
||||||
|
when linking against Qt Multimedia.
|
||||||
|
- Fixed crash on startup when running on Android 4.4.
|
||||||
|
- Add requirement for Android SDK version 13 or higher for building
|
||||||
|
Qt application. Note that this is for building only. The application
|
||||||
|
can still be targeted for devices with SDK versions 9 and up.
|
||||||
|
- Default to target SDK version 14 to disable overflow button in
|
||||||
|
system navigation.
|
||||||
|
- New module: Qt Android Extras. Contains convenience APIs for using
|
||||||
|
JNI, and will in the future include support for Android-specific
|
||||||
|
features which do not fit in a cross-platform API.
|
||||||
|
- Implemented support for thread-affinity in qrand() functions.
|
||||||
|
- Fixed several problems with predictive text in soft keyboard.
|
||||||
|
- Made several improvements to stability.
|
||||||
|
- Implemented support for camera and low-latency audio in Qt Multimedia.
|
||||||
|
- Fixed driver-specific bugs in text rendering in Qt Quick 2.
|
||||||
|
- Added preference in default manifest for installing applications to
|
||||||
|
external storage if possible.
|
||||||
|
- Fixed delivery of key press event for the Back key.
|
||||||
|
- Fixed race condition when showing a window in full screen which would
|
||||||
|
cause it to not be maximized.
|
||||||
|
- Fixed input method hints.
|
||||||
|
- Made font point sizes compatible with the interpretation of point
|
||||||
|
sizes on iOS to ease sharing code between the two platforms.
|
||||||
|
- Added support for QAmbientTemperatureSensor, QPressureSensor
|
||||||
|
and QProximitySensor to Qt Sensors.
|
||||||
|
- Removed dependency on Qt Widgets in default build of Qt Quick Controls.
|
||||||
|
|
||||||
OS X
|
OS X
|
||||||
----
|
----
|
||||||
|
|
||||||
|
- Added QMaxCocoaViewContainer and QMacNativeWidget classes.
|
||||||
- Qt for OS X is now identified by the macro Q_OS_OSX. This complements the
|
- Qt for OS X is now identified by the macro Q_OS_OSX. This complements the
|
||||||
existing Q_OS_DARWIN macro (which identifies the open source kernel and
|
existing Q_OS_DARWIN macro (which identifies the open source kernel and
|
||||||
could identify non-Apple products) and Q_OS_MAC, which is defined for
|
could identify non-Apple products) and Q_OS_MAC, which is defined for
|
||||||
@ -547,6 +672,17 @@ OS X
|
|||||||
supported until official announcement by the Qt Project.
|
supported until official announcement by the Qt Project.
|
||||||
- Added a number of functions to QtCore to convert to and from
|
- Added a number of functions to QtCore to convert to and from
|
||||||
CFString/NSString and QString, CFURL/NSURL and QUrl.
|
CFString/NSString and QString, CFURL/NSURL and QUrl.
|
||||||
|
- QGestureManager now supports Mac OS X native gestures.
|
||||||
|
- Added QMenu::setAsDockMenu(), QMenu(Bar)::toNSMenu(),
|
||||||
|
qt_mac_set_doc_menu() functions.
|
||||||
|
- [QTBUG-26722] The QWizard default background pixmap works again.
|
||||||
|
|
||||||
|
BlackBerry
|
||||||
|
----------
|
||||||
|
|
||||||
|
- Cover windows (aka active frames) are now supported. Cover windows must
|
||||||
|
have the Qt::CoverWindow flag set. They are shown when the application
|
||||||
|
is minimized.
|
||||||
|
|
||||||
Windows
|
Windows
|
||||||
-------
|
-------
|
||||||
|
BIN
mkspecs/macx-ios-clang/Default-568h@2x.png
Normal file
BIN
mkspecs/macx-ios-clang/Default-568h@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
@ -173,6 +173,16 @@ macx-xcode {
|
|||||||
ios_device_family.name = TARGETED_DEVICE_FAMILY
|
ios_device_family.name = TARGETED_DEVICE_FAMILY
|
||||||
ios_device_family.value = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY
|
ios_device_family.value = $$QMAKE_IOS_TARGETED_DEVICE_FAMILY
|
||||||
QMAKE_MAC_XCODE_SETTINGS += ios_device_family
|
QMAKE_MAC_XCODE_SETTINGS += ios_device_family
|
||||||
|
|
||||||
|
# Set up default 4-inch iPhone/iPod launch image so that our apps
|
||||||
|
# support the full screen resolution of those devices.
|
||||||
|
launch_image = Default-568h@2x.png
|
||||||
|
copy_image.input = $$QMAKESPEC/$$launch_image
|
||||||
|
copy_image.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$launch_image
|
||||||
|
copy_image.CONFIG = verbatim
|
||||||
|
QMAKE_SUBSTITUTES += copy_image
|
||||||
|
launch_images.files = $$copy_image.output
|
||||||
|
QMAKE_BUNDLE_DATA += launch_images
|
||||||
}
|
}
|
||||||
|
|
||||||
macx-xcode {
|
macx-xcode {
|
||||||
|
@ -1876,7 +1876,7 @@ void QObjectPrivate::setParent_helper(QObject *o)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isDeletingChildren && declarativeData && QAbstractDeclarativeData::parentChanged)
|
if (!wasDeleted && !isDeletingChildren && declarativeData && QAbstractDeclarativeData::parentChanged)
|
||||||
QAbstractDeclarativeData::parentChanged(declarativeData, q, o);
|
QAbstractDeclarativeData::parentChanged(declarativeData, q, o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,9 +49,9 @@
|
|||||||
iterators they accept. For example, qFill() accepts two
|
iterators they accept. For example, qFill() accepts two
|
||||||
\l {forward iterators}. The iterator types required are specified
|
\l {forward iterators}. The iterator types required are specified
|
||||||
for each algorithm. If an iterator of the wrong type is passed (for
|
for each algorithm. If an iterator of the wrong type is passed (for
|
||||||
example, if QList::ConstIterator is passed as an \l {output
|
example, if QList::ConstIterator is passed as an
|
||||||
iterator}), you will always get a compiler error, although not
|
\l {Output Iterators}{output iterator}), you will always get a
|
||||||
necessarily a very informative one.
|
compiler error, although not necessarily a very informative one.
|
||||||
|
|
||||||
Some algorithms have special requirements on the value type
|
Some algorithms have special requirements on the value type
|
||||||
stored in the containers. For example,
|
stored in the containers. For example,
|
||||||
@ -99,7 +99,7 @@
|
|||||||
|
|
||||||
\section2 Output Iterators
|
\section2 Output Iterators
|
||||||
|
|
||||||
An \e{output iterator} is an iterator that can be used for
|
An output iterator is an iterator that can be used for
|
||||||
writing data sequentially to a container or to some output
|
writing data sequentially to a container or to some output
|
||||||
stream. It must provide the following operators: unary \c{*} for
|
stream. It must provide the following operators: unary \c{*} for
|
||||||
writing a value (i.e., \c{*it = val}) and prefix \c{++} for
|
writing a value (i.e., \c{*it = val}) and prefix \c{++} for
|
||||||
|
@ -709,6 +709,12 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
|
|||||||
Example:
|
Example:
|
||||||
|
|
||||||
\snippet code/src_gui_kernel_qevent.cpp 0
|
\snippet code/src_gui_kernel_qevent.cpp 0
|
||||||
|
|
||||||
|
\note On platforms that support scrolling \l{phase()}{phases}, the delta may be null when:
|
||||||
|
\list
|
||||||
|
\li scrolling is about to begin, but the distance did not yet change (Qt::ScrollBegin),
|
||||||
|
\li or scrolling has ended and the distance did not change anymore (Qt::ScrollEnd).
|
||||||
|
\endlist
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -731,6 +737,12 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
|
|||||||
Example:
|
Example:
|
||||||
|
|
||||||
\snippet code/src_gui_kernel_qevent.cpp 0
|
\snippet code/src_gui_kernel_qevent.cpp 0
|
||||||
|
|
||||||
|
\note On platforms that support scrolling \l{phase()}{phases}, the delta may be null when:
|
||||||
|
\list
|
||||||
|
\li scrolling is about to begin, but the distance did not yet change (Qt::ScrollBegin),
|
||||||
|
\li or scrolling has ended and the distance did not change anymore (Qt::ScrollEnd).
|
||||||
|
\endlist
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -830,6 +842,9 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
|
|||||||
\since 5.2
|
\since 5.2
|
||||||
|
|
||||||
Returns the scrolling phase of this wheel event.
|
Returns the scrolling phase of this wheel event.
|
||||||
|
|
||||||
|
\note The Qt::ScrollBegin and Qt::ScrollEnd phases are currently
|
||||||
|
supported only on Mac OS X.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,9 +41,14 @@
|
|||||||
|
|
||||||
#include "qiosapplicationdelegate.h"
|
#include "qiosapplicationdelegate.h"
|
||||||
|
|
||||||
|
#include "qiosintegration.h"
|
||||||
|
#include "qiosservices.h"
|
||||||
#include "qiosviewcontroller.h"
|
#include "qiosviewcontroller.h"
|
||||||
#include "qioswindow.h"
|
#include "qioswindow.h"
|
||||||
|
|
||||||
|
#include <QtGui/private/qguiapplication_p.h>
|
||||||
|
#include <qpa/qplatformintegration.h>
|
||||||
|
|
||||||
#include <QtCore/QtCore>
|
#include <QtCore/QtCore>
|
||||||
|
|
||||||
@implementation QIOSApplicationDelegate
|
@implementation QIOSApplicationDelegate
|
||||||
@ -82,6 +87,21 @@
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
|
||||||
|
{
|
||||||
|
Q_UNUSED(application);
|
||||||
|
Q_UNUSED(sourceApplication);
|
||||||
|
Q_UNUSED(annotation);
|
||||||
|
|
||||||
|
if (!QGuiApplication::instance())
|
||||||
|
return NO;
|
||||||
|
|
||||||
|
QIOSIntegration *iosIntegration = static_cast<QIOSIntegration *>(QGuiApplicationPrivate::platformIntegration());
|
||||||
|
QIOSServices *iosServices = static_cast<QIOSServices *>(iosIntegration->services());
|
||||||
|
|
||||||
|
return iosServices->handleUrl(QUrl::fromNSURL(url));
|
||||||
|
}
|
||||||
|
|
||||||
- (void)dealloc
|
- (void)dealloc
|
||||||
{
|
{
|
||||||
[window release];
|
[window release];
|
||||||
|
@ -189,6 +189,9 @@ void QIOSScreen::updateProperties()
|
|||||||
|
|
||||||
void QIOSScreen::updateStatusBarVisibility()
|
void QIOSScreen::updateStatusBarVisibility()
|
||||||
{
|
{
|
||||||
|
if (!isQtApplication())
|
||||||
|
return;
|
||||||
|
|
||||||
QWindow *focusWindow = QGuiApplication::focusWindow();
|
QWindow *focusWindow = QGuiApplication::focusWindow();
|
||||||
|
|
||||||
// If we don't have a focus window we leave the status
|
// If we don't have a focus window we leave the status
|
||||||
@ -199,20 +202,26 @@ void QIOSScreen::updateStatusBarVisibility()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
UIView *view = reinterpret_cast<UIView *>(focusWindow->handle()->winId());
|
UIView *view = reinterpret_cast<UIView *>(focusWindow->handle()->winId());
|
||||||
|
QIOSViewController *viewController = static_cast<QIOSViewController *>(view.viewController);
|
||||||
|
|
||||||
|
bool currentStatusBarVisibility = [UIApplication sharedApplication].statusBarHidden;
|
||||||
|
if (viewController.prefersStatusBarHidden == currentStatusBarVisibility)
|
||||||
|
return;
|
||||||
|
|
||||||
#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_7_0)
|
#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_7_0)
|
||||||
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_IOS_7_0) {
|
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_IOS_7_0) {
|
||||||
[view.viewController setNeedsStatusBarAppearanceUpdate];
|
[viewController setNeedsStatusBarAppearanceUpdate];
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
updateProperties();
|
||||||
|
});
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
bool wasHidden = [UIApplication sharedApplication].statusBarHidden;
|
|
||||||
QIOSViewController *viewController = static_cast<QIOSViewController *>(view.viewController);
|
|
||||||
[[UIApplication sharedApplication]
|
[[UIApplication sharedApplication]
|
||||||
setStatusBarHidden:[viewController prefersStatusBarHidden]
|
setStatusBarHidden:[viewController prefersStatusBarHidden]
|
||||||
withAnimation:UIStatusBarAnimationNone];
|
withAnimation:UIStatusBarAnimationNone];
|
||||||
|
|
||||||
if ([UIApplication sharedApplication].statusBarHidden != wasHidden)
|
updateProperties();
|
||||||
updateProperties();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,8 @@
|
|||||||
|
|
||||||
#ifndef QIOSSERVICES_H
|
#ifndef QIOSSERVICES_H
|
||||||
#define QIOSSERVICES_H
|
#define QIOSSERVICES_H
|
||||||
|
|
||||||
|
#include <qurl.h>
|
||||||
#include <qpa/qplatformservices.h>
|
#include <qpa/qplatformservices.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@ -50,6 +52,11 @@ class QIOSServices : public QPlatformServices
|
|||||||
public:
|
public:
|
||||||
bool openUrl(const QUrl &url);
|
bool openUrl(const QUrl &url);
|
||||||
bool openDocument(const QUrl &url);
|
bool openDocument(const QUrl &url);
|
||||||
|
|
||||||
|
bool handleUrl(const QUrl &url);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QUrl m_handlingUrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include "qiosservices.h"
|
#include "qiosservices.h"
|
||||||
|
|
||||||
#include <QtCore/qurl.h>
|
#include <QtCore/qurl.h>
|
||||||
|
#include <QtGui/qdesktopservices.h>
|
||||||
|
|
||||||
#import <UIKit/UIApplication.h>
|
#import <UIKit/UIApplication.h>
|
||||||
|
|
||||||
@ -49,6 +50,9 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
bool QIOSServices::openUrl(const QUrl &url)
|
bool QIOSServices::openUrl(const QUrl &url)
|
||||||
{
|
{
|
||||||
|
if (url == m_handlingUrl)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (url.scheme().isEmpty())
|
if (url.scheme().isEmpty())
|
||||||
return openDocument(url);
|
return openDocument(url);
|
||||||
|
|
||||||
@ -66,4 +70,19 @@ bool QIOSServices::openDocument(const QUrl &url)
|
|||||||
return QPlatformServices::openDocument(url);
|
return QPlatformServices::openDocument(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Callback from iOS that the application should handle a URL */
|
||||||
|
bool QIOSServices::handleUrl(const QUrl &url)
|
||||||
|
{
|
||||||
|
QUrl previouslyHandling = m_handlingUrl;
|
||||||
|
m_handlingUrl = url;
|
||||||
|
|
||||||
|
// FIXME: Add platform services callback from QDesktopServices::setUrlHandler
|
||||||
|
// so that we can warn the user if calling setUrlHandler without also setting
|
||||||
|
// up the matching keys in the Info.plist file (CFBundleURLTypes and friends).
|
||||||
|
bool couldHandle = QDesktopServices::openUrl(url);
|
||||||
|
|
||||||
|
m_handlingUrl = previouslyHandling;
|
||||||
|
return couldHandle;
|
||||||
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -152,6 +152,7 @@ private slots:
|
|||||||
void connectBase();
|
void connectBase();
|
||||||
void qmlConnect();
|
void qmlConnect();
|
||||||
void exceptions();
|
void exceptions();
|
||||||
|
void noDeclarativeParentChangedOnDestruction();
|
||||||
};
|
};
|
||||||
|
|
||||||
struct QObjectCreatedOnShutdown
|
struct QObjectCreatedOnShutdown
|
||||||
@ -6233,6 +6234,43 @@ void tst_QObject::exceptions()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef QT_BUILD_INTERNAL
|
||||||
|
static bool parentChangeCalled = false;
|
||||||
|
|
||||||
|
static void testParentChanged(QAbstractDeclarativeData *, QObject *, QObject *)
|
||||||
|
{
|
||||||
|
parentChangeCalled = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void tst_QObject::noDeclarativeParentChangedOnDestruction()
|
||||||
|
{
|
||||||
|
#ifdef QT_BUILD_INTERNAL
|
||||||
|
typedef void (*ParentChangedCallback)(QAbstractDeclarativeData *, QObject *, QObject *);
|
||||||
|
QScopedValueRollback<ParentChangedCallback> rollback(QAbstractDeclarativeData::parentChanged);
|
||||||
|
QAbstractDeclarativeData::parentChanged = testParentChanged;
|
||||||
|
|
||||||
|
QObject *parent = new QObject;
|
||||||
|
QObject *child = new QObject;
|
||||||
|
|
||||||
|
QAbstractDeclarativeData dummy;
|
||||||
|
QObjectPrivate::get(child)->declarativeData = &dummy;
|
||||||
|
|
||||||
|
parentChangeCalled = false;
|
||||||
|
child->setParent(parent);
|
||||||
|
|
||||||
|
QVERIFY(parentChangeCalled);
|
||||||
|
parentChangeCalled = false;
|
||||||
|
|
||||||
|
delete child;
|
||||||
|
QVERIFY(!parentChangeCalled);
|
||||||
|
|
||||||
|
delete parent;
|
||||||
|
#else
|
||||||
|
QSKIP("Needs QT_BUILD_INTERNAL");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// Test for QtPrivate::HasQ_OBJECT_Macro
|
// Test for QtPrivate::HasQ_OBJECT_Macro
|
||||||
Q_STATIC_ASSERT(QtPrivate::HasQ_OBJECT_Macro<tst_QObject>::Value);
|
Q_STATIC_ASSERT(QtPrivate::HasQ_OBJECT_Macro<tst_QObject>::Value);
|
||||||
Q_STATIC_ASSERT(!QtPrivate::HasQ_OBJECT_Macro<SiblingDeleter>::Value);
|
Q_STATIC_ASSERT(!QtPrivate::HasQ_OBJECT_Macro<SiblingDeleter>::Value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user