Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
12
INSTALL
@ -1,10 +1,10 @@
|
|||||||
INSTALLING Qt Source Package Version %VERSION%.
|
INSTALLING Qt Source Package Version %VERSION%.
|
||||||
|
|
||||||
For full installation instructions for each supported platform, please
|
For instructions on building and installing Qt for each supported platform,
|
||||||
see http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/installation.html,
|
please see http://qt-project.org/doc/qt-%SHORTVERSION%/build-sources.html,
|
||||||
or follow one of these links:
|
or follow one of these links:
|
||||||
|
|
||||||
Mac OS X: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-mac.html
|
Mac OS X: http://qt-project.org/doc/qt-%SHORTVERSION%/macosx-building.html
|
||||||
Windows: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-win.html
|
Windows: http://qt-project.org/doc/qt-%SHORTVERSION%/windows-building.html
|
||||||
Windows CE: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-wince.html
|
X11 Platforms: http://qt-project.org/doc/qt-%SHORTVERSION%/linux-building.html
|
||||||
X11 Platforms: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-x11.html
|
Windows CE: http://qt-project.org/doc/qt-%SHORTVERSION%/install-wince.html
|
||||||
|
164
dist/changes-5.2.1
vendored
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
Qt 5.2.1 is a bug-fix release. It maintains both forward and backward
|
||||||
|
compatibility (source and binary) with Qt 5.2.0.
|
||||||
|
|
||||||
|
For more details, refer to the online documentation included in this
|
||||||
|
distribution. The documentation is also available online:
|
||||||
|
|
||||||
|
http://qt-project.org/doc/qt-5.2
|
||||||
|
|
||||||
|
The Qt version 5.2 series is binary compatible with the 5.1.x series.
|
||||||
|
Applications compiled for 5.1 will continue to run with 5.2.
|
||||||
|
|
||||||
|
Some of the changes listed in this file include issue tracking numbers
|
||||||
|
corresponding to tasks in the Qt Bug Tracker:
|
||||||
|
|
||||||
|
http://bugreports.qt-project.org/
|
||||||
|
|
||||||
|
Each of these identifiers can be entered in the bug tracker to obtain more
|
||||||
|
information about a particular change.
|
||||||
|
|
||||||
|
****************************************************************************
|
||||||
|
* Important Behavior Changes *
|
||||||
|
****************************************************************************
|
||||||
|
|
||||||
|
- [QTBUG-34345][QTBUG-26008][QTBUG-26430] QPrinter no longer allows you to
|
||||||
|
set an invalid printer name.
|
||||||
|
- [QTBUG-34141] Parsing of Qt::ISODate by QDate::fromString() and
|
||||||
|
QDateTime()::fromString() is not as lenient as before, the date
|
||||||
|
component separators are now required to be non-numeric. This means a
|
||||||
|
string like "2000901901" will no longer be recognized as a valid ISO
|
||||||
|
Date, but "2000/01/01" will still be even though it doesn't strictly
|
||||||
|
meet the ISO format of "2000-01-01".
|
||||||
|
|
||||||
|
****************************************************************************
|
||||||
|
* Library *
|
||||||
|
****************************************************************************
|
||||||
|
|
||||||
|
QtCore
|
||||||
|
------
|
||||||
|
|
||||||
|
- [QTBUG-35069] Fixed a bug that caused negative number input using '-' to
|
||||||
|
be rejected because the current locale uses U+2212. QLocale::toString()
|
||||||
|
as well as QIntValidator and QDoubleValidator now accept both '-' and
|
||||||
|
U+2212, as well as the locale minus sign. QString also accepts '-' and
|
||||||
|
U+2212.
|
||||||
|
- Fixed sign conversion warnings in code using QMetaTypeId.
|
||||||
|
|
||||||
|
- QTemporaryDir:
|
||||||
|
* Fixed a bug in QTemporaryDir name generator that dramatically reduced
|
||||||
|
randomness of the name.
|
||||||
|
|
||||||
|
- QThread:
|
||||||
|
* [QTBUG-34840] Fixed handle leaks on Windows.
|
||||||
|
|
||||||
|
QtGui
|
||||||
|
-----
|
||||||
|
|
||||||
|
- [QTBUG-35421] Fixed crash when sending accessibility updates when the
|
||||||
|
corresponding widget does not have a corresponding QAccessibleInterface.
|
||||||
|
This showed on Mac for example with QStatusBar.
|
||||||
|
- Qt's generic font database now adds OpenType fonts (.otf).
|
||||||
|
|
||||||
|
- Accessibility
|
||||||
|
* On Linux action names were returned as empty strings in AT-SPI
|
||||||
|
getActions, now returns the proper names.
|
||||||
|
|
||||||
|
- QKeySequence:
|
||||||
|
* [QTBUG-24406] return Qt::Key_unknown with invalid modifiers on OS X
|
||||||
|
|
||||||
|
- Text:
|
||||||
|
* [QTBUG-35740] Fixed regression when shaping some strings containing
|
||||||
|
characters from multiple fonts.
|
||||||
|
|
||||||
|
QtPrintSupport
|
||||||
|
--------------
|
||||||
|
|
||||||
|
- [QTBUG-34700][QTBUG-35500] Fixed bugs that caused QtPrintSupport
|
||||||
|
not to report the correct the paper sizes on Windows and on OS X.
|
||||||
|
|
||||||
|
QtSql
|
||||||
|
-----
|
||||||
|
|
||||||
|
- IBase support:
|
||||||
|
* [QTBUG-33345] Custom port numbers are now supported.
|
||||||
|
* [QTBUG-13435] Fixed the internal state of IBase driver after a failed
|
||||||
|
open call.
|
||||||
|
|
||||||
|
- MySQL / MariaDB support:
|
||||||
|
* [QTBUG-31124] Fixed handling of fractions of second.
|
||||||
|
|
||||||
|
- Oracle support:
|
||||||
|
* [QTBUG-34794] Fixed the compilation
|
||||||
|
|
||||||
|
- Sqlite support:
|
||||||
|
* [QTBUG-24200] Fixed handling of fractions of second.
|
||||||
|
* [QTBUG-35186] Fixed evaluation of driver options
|
||||||
|
|
||||||
|
QtTestLib
|
||||||
|
---------
|
||||||
|
|
||||||
|
- [QTBUG-34630] The (default) plain text logger on Windows now logs to
|
||||||
|
either the system debug log (in case no console is open), or stdout, not
|
||||||
|
both.
|
||||||
|
|
||||||
|
QtWidgets
|
||||||
|
---------
|
||||||
|
|
||||||
|
- QSpinBox:
|
||||||
|
* [QTBUG-20691] Entering positive values with the '+' prefix is now
|
||||||
|
allowed.
|
||||||
|
|
||||||
|
****************************************************************************
|
||||||
|
* Platform Specific Changes *
|
||||||
|
****************************************************************************
|
||||||
|
|
||||||
|
Android
|
||||||
|
-------
|
||||||
|
|
||||||
|
- [QTBUG-34984] Added workarounds for OpenGL bugs on Samsung Galaxy
|
||||||
|
Tab 3.
|
||||||
|
|
||||||
|
OS X
|
||||||
|
----
|
||||||
|
|
||||||
|
- [QTBUG-34411] Implemented QMainWindow::setUnifiedTitleAndToolBarOnMac.
|
||||||
|
|
||||||
|
X11 / XCB
|
||||||
|
---------
|
||||||
|
|
||||||
|
- [QTBUG-32683] Fixed a bug that caused Qt applications to think the
|
||||||
|
screen DPI had changed when it had not, after connecting or
|
||||||
|
disconnecting monitors.
|
||||||
|
|
||||||
|
Windows
|
||||||
|
-------
|
||||||
|
|
||||||
|
- [QTBUG-8361] Maximizing frameless windows will no longer cover the
|
||||||
|
taskbar
|
||||||
|
- [QTBUG-34799] Updated QWidgetBackingStore and the Windows
|
||||||
|
implementation to support Qt::WA_StaticContents.
|
||||||
|
- [QTBUG-35357] Fixed a regression from Qt4 in QProcess that
|
||||||
|
prevented altering the pipe modes of stdin in the child process.
|
||||||
|
|
||||||
|
|
||||||
|
****************************************************************************
|
||||||
|
* Tools *
|
||||||
|
****************************************************************************
|
||||||
|
|
||||||
|
configure & build system
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
- [QTBUG-34949] EGL works with desktop OpenGL now
|
||||||
|
- A build from source will not install the Qt DLLs into lib/ any more.
|
||||||
|
The canonical location is bin/.
|
||||||
|
|
||||||
|
qmake
|
||||||
|
-----
|
||||||
|
|
||||||
|
- [QTBUG-35530] Fixed the detection of multiple VS installations.
|
||||||
|
- [QTBUG-35610] Fixed the generation of VS 2010 project files.
|
||||||
|
- [QTBUG-32412] Numerous fixes to Windows PDB file handling.
|
||||||
|
- [QTBUG-3883] Fixed make distclean not removing static library targets.
|
||||||
|
- Added makespec for clang using libc++ on Linux.
|
||||||
|
- qmake will not look for mkspecs/ directories in project trees any more.
|
||||||
|
Use .qmake.conf and/or .qmake.cache to "anchor" project roots.
|
@ -77,12 +77,9 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
|
|||||||
"QtWidgets/Stickman Example" \
|
"QtWidgets/Stickman Example" \
|
||||||
"QtWidgets/Move Blocks Example" \
|
"QtWidgets/Move Blocks Example" \
|
||||||
"QtWidgets/Border Layout Example" \
|
"QtWidgets/Border Layout Example" \
|
||||||
"QtWidgets/Dynamic Layouts Example" \
|
|
||||||
"QtWidgets/Flow Layout Example" \
|
"QtWidgets/Flow Layout Example" \
|
||||||
"QtWidgets/MDI Example" \
|
|
||||||
"QtWidgets/Dock Widgets Example" \
|
"QtWidgets/Dock Widgets Example" \
|
||||||
"QtWidgets/Recent Files Example" \
|
"QtWidgets/Recent Files Example" \
|
||||||
"QtWidgets/Menus Example" \
|
|
||||||
"QtWidgets/Concentric Circles Example" \
|
"QtWidgets/Concentric Circles Example" \
|
||||||
"QtWidgets/Gradients" \
|
"QtWidgets/Gradients" \
|
||||||
"QtWidgets/Font Sampler Example" \
|
"QtWidgets/Font Sampler Example" \
|
||||||
@ -90,38 +87,23 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
|
|||||||
"QtWidgets/Transformations Example" \
|
"QtWidgets/Transformations Example" \
|
||||||
"QtWidgets/Syntax Highlighter Example" \
|
"QtWidgets/Syntax Highlighter Example" \
|
||||||
"QtWidgets/Calendar Example" \
|
"QtWidgets/Calendar Example" \
|
||||||
"QtWidgets/Movie Example" \
|
|
||||||
"QtWidgets/Validators Example" \
|
|
||||||
"QtWidgets/Analog Clock Example" \
|
"QtWidgets/Analog Clock Example" \
|
||||||
"QtWidgets/Calculator Example" \
|
"QtWidgets/Calculator Example" \
|
||||||
"QtWidgets/Mouse Button Tester" \
|
"QtWidgets/Mouse Button Tester" \
|
||||||
"QtWidgets/Character Map Example" \
|
"QtWidgets/Character Map Example" \
|
||||||
"QtWidgets/Wiggly Example" \
|
|
||||||
"QtWidgets/Digital Clock Example" \
|
"QtWidgets/Digital Clock Example" \
|
||||||
"QtWidgets/Elided Label Example" \
|
"QtWidgets/Elided Label Example" \
|
||||||
"QtWidgets/Image Viewer Example" \
|
|
||||||
"QtWidgets/Sliders Example" \
|
"QtWidgets/Sliders Example" \
|
||||||
"QtWidgets/Tetrix Example" \
|
"QtWidgets/Tetrix Example" \
|
||||||
"QtWidgets/Group Box Example" \
|
"QtWidgets/Group Box Example" \
|
||||||
"QtWidgets/Spin Boxes Example" \
|
|
||||||
"QtWidgets/Undo Framework" \
|
"QtWidgets/Undo Framework" \
|
||||||
"QtWidgets/Regular Expressions Example" \
|
|
||||||
"QtWidgets/Colliding Mice Example" \
|
"QtWidgets/Colliding Mice Example" \
|
||||||
"QtWidgets/Basic Graphics Layouts Example" \
|
|
||||||
"QtWidgets/40000 Chips" \
|
|
||||||
"QtWidgets/Diagram Scene Example" \
|
"QtWidgets/Diagram Scene Example" \
|
||||||
"QtWidgets/Drag and Drop Robot Example" \
|
|
||||||
"QtWidgets/Elastic Nodes Example" \
|
"QtWidgets/Elastic Nodes Example" \
|
||||||
"QtWidgets/Pad Navigator Example" \
|
|
||||||
"QtWidgets/Anchor Layout Example" \
|
|
||||||
"QtWidgets/Weather Anchor Layout Example" \
|
"QtWidgets/Weather Anchor Layout Example" \
|
||||||
"QtConcurrent/Image Scaling Example" \
|
|
||||||
"QtConcurrent/QtConcurrent Progress Dialog Example" \
|
|
||||||
"QtNetwork/Torrent Example" \
|
"QtNetwork/Torrent Example" \
|
||||||
"QtNetwork/Network Chat Example" \
|
"QtNetwork/Network Chat Example" \
|
||||||
"QtSQL/Master Detail Example" \
|
"QtSQL/Master Detail Example" \
|
||||||
"QtOpenGL/Cube OpenGL ES 2.0 example" \
|
|
||||||
"QtOpenGL/Textures Example" \
|
|
||||||
"QtLinguist/Arrow Pad Example" \
|
"QtLinguist/Arrow Pad Example" \
|
||||||
"QtGui/Raster Window Example" \
|
"QtGui/Raster Window Example" \
|
||||||
"QtGui/Analog Clock Window Example" \
|
"QtGui/Analog Clock Window Example" \
|
||||||
@ -129,12 +111,16 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
|
|||||||
"QtMultimedia/QML Video Shader Effects Example" \
|
"QtMultimedia/QML Video Shader Effects Example" \
|
||||||
"QtMultimedia/QML Video Example" \
|
"QtMultimedia/QML Video Example" \
|
||||||
"QtMultimedia/QML Camera Example" \
|
"QtMultimedia/QML Camera Example" \
|
||||||
"QtMultimedia/Audio Output Example" \
|
|
||||||
"QtSVG/Text Object Example" \
|
"QtSVG/Text Object Example" \
|
||||||
"QtQML/Qt Quick Examples - XMLHttpRequest" \
|
"QtQML/Qt Quick Examples - XMLHttpRequest" \
|
||||||
"QtQuick/Qt Quick Particles Examples - *" \
|
"QtQuick/Qt Quick Particles Examples - *" \
|
||||||
"QtQuick/Qt Quick Examples - Touch Interaction" \
|
"QtQuick/Qt Quick Examples - Touch Interaction" \
|
||||||
"QtQuick/Scene Graph - *" \
|
"QtQuick/Scene Graph - Custom Geometry" \
|
||||||
|
"QtQuick/Scene Graph - Graph" \
|
||||||
|
"QtQuick/Scene Graph - OpenGL Under QML" \
|
||||||
|
"QtQuick/Scene Graph - Painted Item" \
|
||||||
|
"QtQuick/Scene Graph - Rendering FBOs" \
|
||||||
|
"QtQuick/Scene Graph - Simple Material" \
|
||||||
"QtQuick/Qt Quick Examples - Image Elements" \
|
"QtQuick/Qt Quick Examples - Image Elements" \
|
||||||
"QtQuick/Qt Quick Examples - Key Interaction" \
|
"QtQuick/Qt Quick Examples - Key Interaction" \
|
||||||
"QtQuick/Qt Quick Examples - Text" \
|
"QtQuick/Qt Quick Examples - Text" \
|
||||||
@ -147,21 +133,15 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
|
|||||||
"QtWidgets/Interview" \
|
"QtWidgets/Interview" \
|
||||||
"QtWidgets/Spreadsheet" \
|
"QtWidgets/Spreadsheet" \
|
||||||
"QtWidgets/Pixelator Example" \
|
"QtWidgets/Pixelator Example" \
|
||||||
"QtWidgets/Class Wizard Example" \
|
|
||||||
"QtWidgets/Animated Tiles Example" \
|
"QtWidgets/Animated Tiles Example" \
|
||||||
"QtWidgets/Basic Layouts Example" \
|
|
||||||
"QtWidgets/Application Example" \
|
|
||||||
"QtWidgets/Affine Transformations" \
|
"QtWidgets/Affine Transformations" \
|
||||||
"QtWidgets/Image Composition Example" \
|
"QtWidgets/Image Composition Example" \
|
||||||
"QtWidgets/Basic Drawing Example" \
|
"QtWidgets/Basic Drawing Example" \
|
||||||
"QtWidgets/Vector Deformation" \
|
"QtWidgets/Vector Deformation" \
|
||||||
"QtWidgets/Painter Paths Example" \
|
"QtWidgets/Painter Paths Example" \
|
||||||
"QtWidgets/Text Edit" \
|
|
||||||
"QtWidgets/Style Sheet Example" \
|
"QtWidgets/Style Sheet Example" \
|
||||||
"QtWidgets/Code Editor Example" \
|
"QtWidgets/Code Editor Example" \
|
||||||
"QtWidgets/Window Flags Example" \
|
|
||||||
"QtWidgets/Scribble Example" \
|
"QtWidgets/Scribble Example" \
|
||||||
"QtWidgets/Shaped Clock Example" \
|
|
||||||
"QtWidgets/Line Edits Example" \
|
"QtWidgets/Line Edits Example" \
|
||||||
"QtWidgets/Calendar Widget Example" \
|
"QtWidgets/Calendar Widget Example" \
|
||||||
"QtWidgets/Completer Example" \
|
"QtWidgets/Completer Example" \
|
||||||
@ -169,8 +149,7 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
|
|||||||
"QtQML/Extending QML - Grouped Properties Example" \
|
"QtQML/Extending QML - Grouped Properties Example" \
|
||||||
"QtQML/Extending QML - Methods Example" \
|
"QtQML/Extending QML - Methods Example" \
|
||||||
"QtQML/Extending QML - Signal Support Example" \
|
"QtQML/Extending QML - Signal Support Example" \
|
||||||
"QtQML/Extending QML - Attached Properties Example" \
|
"QtQML/Extending QML - Attached Properties Example"
|
||||||
"QtWidgets/Address Book Example"
|
|
||||||
|
|
||||||
manifestmeta.android.tags = android
|
manifestmeta.android.tags = android
|
||||||
|
|
||||||
|
@ -111,12 +111,6 @@ Cpp.ignoretokens += \
|
|||||||
QT_FASTCALL \
|
QT_FASTCALL \
|
||||||
QT_MUTEX_LOCK_NOEXCEPT \
|
QT_MUTEX_LOCK_NOEXCEPT \
|
||||||
QT_WIDGET_PLUGIN_EXPORT \
|
QT_WIDGET_PLUGIN_EXPORT \
|
||||||
QT_BEGIN_NAMESPACE_NFC \
|
|
||||||
QT_END_NAMESPACE_NFC \
|
|
||||||
QT_USE_NAMESPACE_NFC \
|
|
||||||
QT_BEGIN_NAMESPACE_BLUETOOTH \
|
|
||||||
QT_END_NAMESPACE_BLUETOOTH \
|
|
||||||
QT_USE_NAMESPACE_BLUETOOTH \
|
|
||||||
QWEBKIT_EXPORT
|
QWEBKIT_EXPORT
|
||||||
|
|
||||||
Cpp.ignoredirectives += \
|
Cpp.ignoredirectives += \
|
||||||
|
@ -4,7 +4,6 @@ CONFIG += no_docs_target
|
|||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
dbus \
|
dbus \
|
||||||
embedded \
|
embedded \
|
||||||
gestures \
|
|
||||||
gui \
|
gui \
|
||||||
ipc \
|
ipc \
|
||||||
json \
|
json \
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
In this example, we will demonstrate the asynchronous approach. The
|
In this example, we will demonstrate the asynchronous approach. The
|
||||||
\l{blockingfortuneclient}{Blocking Fortune Client} example
|
\l{blockingfortuneclient}{Blocking Fortune Client Example}
|
||||||
illustrates the synchronous approach.
|
illustrates the synchronous approach.
|
||||||
|
|
||||||
Our class contains some data and a few private slots:
|
Our class contains some data and a few private slots:
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
This example is intended to be run alongside the
|
This example is intended to be run alongside the
|
||||||
\l{fortuneclient}{Fortune Client} example or the
|
\l{fortuneclient}{Fortune Client} example or the
|
||||||
\l{blockingfortuneclient}{Blocking Fortune Client} example.
|
\l{blockingfortuneclient}{Blocking Fortune Client Example}.
|
||||||
|
|
||||||
\image fortuneserver-example.png Screenshot of the Fortune Server example
|
\image fortuneserver-example.png Screenshot of the Fortune Server example
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
large set of problems, including synchronous network I/O and
|
large set of problems, including synchronous network I/O and
|
||||||
database access, where the user interface must remain responsive
|
database access, where the user interface must remain responsive
|
||||||
while some heavy operation is taking place. The \l
|
while some heavy operation is taking place. The \l
|
||||||
network/blockingfortuneclient example shows the same principle at
|
{Blocking Fortune Client Example} shows the same principle at
|
||||||
work in a TCP client.
|
work in a TCP client.
|
||||||
|
|
||||||
The Mandelbrot application supports zooming and scrolling using
|
The Mandelbrot application supports zooming and scrolling using
|
||||||
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 253 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 192 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
@ -47,9 +47,9 @@
|
|||||||
If you want to learn how to make your own application extensible
|
If you want to learn how to make your own application extensible
|
||||||
through plugins, we recommend that you start by reading this
|
through plugins, we recommend that you start by reading this
|
||||||
overview, which explains how to make an application use plugins.
|
overview, which explains how to make an application use plugins.
|
||||||
Afterward, you can read the
|
Afterwards, you can read the
|
||||||
\l{tools/plugandpaintplugins/basictools}{Basic Tools} and
|
\l{tools/plugandpaintplugins/basictools}{Basic Tools} and
|
||||||
\l{plugandpaintplugins/extrafilters}{Extra Filters}
|
\l{tools/plugandpaintplugins/extrafilters}{Extra Filters}
|
||||||
overviews, which show how to implement static and dynamic
|
overviews, which show how to implement static and dynamic
|
||||||
plugins, respectively.
|
plugins, respectively.
|
||||||
|
|
||||||
@ -126,8 +126,8 @@
|
|||||||
a good idea to include a version number in the string, as we did
|
a good idea to include a version number in the string, as we did
|
||||||
above.
|
above.
|
||||||
|
|
||||||
The \l{plugandpaintplugins/basictools}{Basic Tools} plugin
|
The \l{tools/plugandpaintplugins/basictools}{Basic Tools} plugin
|
||||||
and the \l{plugandpaintplugins/extrafilters}{Extra Filters}
|
and the \l{tools/plugandpaintplugins/extrafilters}{Extra Filters}
|
||||||
plugin shows how to derive from \c BrushInterface, \c
|
plugin shows how to derive from \c BrushInterface, \c
|
||||||
ShapeInterface, and \c FilterInterface.
|
ShapeInterface, and \c FilterInterface.
|
||||||
|
|
||||||
@ -275,7 +275,7 @@
|
|||||||
|
|
||||||
\section1 Importing Static Plugins
|
\section1 Importing Static Plugins
|
||||||
|
|
||||||
The \l{plugandpaintplugins/basictools}{Basic Tools} plugin
|
The \l{tools/plugandpaintplugins/basictools}{Basic Tools} plugin
|
||||||
is built as a static plugin, to ensure that it is always
|
is built as a static plugin, to ensure that it is always
|
||||||
available to the application. This requires using the
|
available to the application. This requires using the
|
||||||
Q_IMPORT_PLUGIN() macro somewhere in the application (in a \c
|
Q_IMPORT_PLUGIN() macro somewhere in the application (in a \c
|
||||||
@ -307,7 +307,7 @@
|
|||||||
|
|
||||||
This completes our review of the Plug & Paint application. At
|
This completes our review of the Plug & Paint application. At
|
||||||
this point, you might want to take a look at the
|
this point, you might want to take a look at the
|
||||||
\l{plugandpaintplugins/basictools}{Basic Tools} example
|
\l{tools/plugandpaintplugins/basictools}{Basic Tools} example
|
||||||
plugin.
|
plugin.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -316,7 +316,7 @@
|
|||||||
\title Plug & Paint Basic Tools Example
|
\title Plug & Paint Basic Tools Example
|
||||||
|
|
||||||
The Basic Tools example is a static plugin for the
|
The Basic Tools example is a static plugin for the
|
||||||
\l{plugandpaint}{Plug & Paint} example. It provides a set
|
\l{tools/plugandpaint}{Plug & Paint} example. It provides a set
|
||||||
of basic brushes, shapes, and filters. Through the Basic Tools
|
of basic brushes, shapes, and filters. Through the Basic Tools
|
||||||
example, we will review the four steps involved in writing a Qt
|
example, we will review the four steps involved in writing a Qt
|
||||||
plugin:
|
plugin:
|
||||||
@ -333,7 +333,7 @@
|
|||||||
\snippet tools/plugandpaintplugins/basictools/basictoolsplugin.h 0
|
\snippet tools/plugandpaintplugins/basictools/basictoolsplugin.h 0
|
||||||
|
|
||||||
We start by including \c interfaces.h, which defines the plugin
|
We start by including \c interfaces.h, which defines the plugin
|
||||||
interfaces for the \l{plugandpaint}{Plug & Paint}
|
interfaces for the \l{tools/plugandpaint}{Plug & Paint}
|
||||||
application. For the \c #include to work, we need to add an \c
|
application. For the \c #include to work, we need to add an \c
|
||||||
INCLUDEPATH entry to the \c .pro file with the path to Qt's \c
|
INCLUDEPATH entry to the \c .pro file with the path to Qt's \c
|
||||||
examples/tools directory.
|
examples/tools directory.
|
||||||
@ -344,7 +344,7 @@
|
|||||||
The \c Q_INTERFACES() macro is necessary to tell \l{moc}, Qt's
|
The \c Q_INTERFACES() macro is necessary to tell \l{moc}, Qt's
|
||||||
meta-object compiler, that the base classes are plugin
|
meta-object compiler, that the base classes are plugin
|
||||||
interfaces. Without the \c Q_INTERFACES() macro, we couldn't use
|
interfaces. Without the \c Q_INTERFACES() macro, we couldn't use
|
||||||
\l qobject_cast() in the \l{plugandpaint}{Plug & Paint}
|
\l qobject_cast() in the \l{tools/plugandpaint}{Plug & Paint}
|
||||||
application to detect interfaces.
|
application to detect interfaces.
|
||||||
For an explanation for the \c Q_PLUGIN_METADATA() macro see
|
For an explanation for the \c Q_PLUGIN_METADATA() macro see
|
||||||
\l {Exporting the Plugin}.
|
\l {Exporting the Plugin}.
|
||||||
@ -473,7 +473,7 @@
|
|||||||
|
|
||||||
To make the plugin a static plugin, all that is required is to
|
To make the plugin a static plugin, all that is required is to
|
||||||
specify \c static in addition to \c plugin. The
|
specify \c static in addition to \c plugin. The
|
||||||
\l{plugandpaintplugins/extrafilters}{Extra Filters} plugin,
|
\l{tools/plugandpaintplugins/extrafilters}{Extra Filters} plugin,
|
||||||
which is compiled as a dynamic plugin, doesn't specify \c static
|
which is compiled as a dynamic plugin, doesn't specify \c static
|
||||||
in its \c .pro file.
|
in its \c .pro file.
|
||||||
|
|
||||||
@ -501,15 +501,15 @@
|
|||||||
\title Plug & Paint Extra Filters Example
|
\title Plug & Paint Extra Filters Example
|
||||||
|
|
||||||
The Extra Filters example is a plugin for the
|
The Extra Filters example is a plugin for the
|
||||||
\l{plugandpaint}{Plug & Paint} example. It provides a set
|
\l{tools/plugandpaint}{Plug & Paint} example. It provides a set
|
||||||
of filters in addition to those provided by the
|
of filters in addition to those provided by the
|
||||||
\l{plugandpaintplugins/basictools}{Basic Tools} plugin.
|
\l{tools/plugandpaintplugins/basictools}{Basic Tools} plugin.
|
||||||
|
|
||||||
Since the approach is identical to
|
Since the approach is identical to
|
||||||
\l{plugandpaintplugins/basictools}{Basic Tools}, we won't
|
\l{tools/plugandpaintplugins/basictools}{Basic Tools}, we won't
|
||||||
review the code here. The only part of interest is the
|
review the code here. The only part of interest is the
|
||||||
\c .pro file, since Extra Filters is a dynamic plugin
|
\c .pro file, since Extra Filters is a dynamic plugin
|
||||||
(\l{plugandpaintplugins/basictools}{Basic Tools} is
|
(\l{tools/plugandpaintplugins/basictools}{Basic Tools} is
|
||||||
linked statically into the Plug & Paint executable).
|
linked statically into the Plug & Paint executable).
|
||||||
|
|
||||||
Here's the project file for building the Extra Filters plugin:
|
Here's the project file for building the Extra Filters plugin:
|
||||||
|
@ -43,9 +43,9 @@
|
|||||||
The \c ImageWidget class is a simple QWidget subclass that reimplements the general
|
The \c ImageWidget class is a simple QWidget subclass that reimplements the general
|
||||||
QWidget::event() handler function in addition to several more specific event handlers:
|
QWidget::event() handler function in addition to several more specific event handlers:
|
||||||
|
|
||||||
\snippet examples/gestures/imagegestures/imagewidget.h class definition begin
|
\snippet gestures/imagegestures/imagewidget.h class definition begin
|
||||||
\dots
|
\dots
|
||||||
\snippet examples/gestures/imagegestures/imagewidget.h class definition end
|
\snippet gestures/imagegestures/imagewidget.h class definition end
|
||||||
|
|
||||||
We also implement a private helper function, \c gestureEvent(), to help manage
|
We also implement a private helper function, \c gestureEvent(), to help manage
|
||||||
gesture events delivered to the widget, and three functions to perform actions
|
gesture events delivered to the widget, and three functions to perform actions
|
||||||
@ -56,7 +56,7 @@
|
|||||||
In the widget's constructor, we begin by setting up various parameters that will
|
In the widget's constructor, we begin by setting up various parameters that will
|
||||||
be used to control the way images are displayed.
|
be used to control the way images are displayed.
|
||||||
|
|
||||||
\snippet examples/gestures/imagegestures/imagewidget.cpp constructor
|
\snippet gestures/imagegestures/imagewidget.cpp constructor
|
||||||
|
|
||||||
We enable three of the standard gestures for the widget by calling QWidget::grabGesture()
|
We enable three of the standard gestures for the widget by calling QWidget::grabGesture()
|
||||||
with the types of gesture we need. These will be recognized by the application's
|
with the types of gesture we need. These will be recognized by the application's
|
||||||
@ -65,7 +65,7 @@
|
|||||||
Since QWidget does not define a specific event handler for gestures, the widget
|
Since QWidget does not define a specific event handler for gestures, the widget
|
||||||
needs to reimplement the general QWidget::event() to receive gesture events.
|
needs to reimplement the general QWidget::event() to receive gesture events.
|
||||||
|
|
||||||
\snippet examples/gestures/imagegestures/imagewidget.cpp event handler
|
\snippet gestures/imagegestures/imagewidget.cpp event handler
|
||||||
|
|
||||||
We implement the event handler to delegate gesture events to a private function
|
We implement the event handler to delegate gesture events to a private function
|
||||||
specifically written for the task, and pass all other events to QWidget's
|
specifically written for the task, and pass all other events to QWidget's
|
||||||
@ -76,7 +76,7 @@
|
|||||||
used on a widget at any particular time, we can check for each gesture type
|
used on a widget at any particular time, we can check for each gesture type
|
||||||
using the QGestureEvent::gesture() function:
|
using the QGestureEvent::gesture() function:
|
||||||
|
|
||||||
\snippet examples/gestures/imagegestures/imagewidget.cpp gesture event handler
|
\snippet gestures/imagegestures/imagewidget.cpp gesture event handler
|
||||||
|
|
||||||
If a QGesture object is supplied for a certain type of gesture, we call a special
|
If a QGesture object is supplied for a certain type of gesture, we call a special
|
||||||
purpose function to deal with it, casting the gesture object to the appropriate
|
purpose function to deal with it, casting the gesture object to the appropriate
|
||||||
@ -87,7 +87,7 @@
|
|||||||
gesture associated with a brushing or swiping motion on the user's display or
|
gesture associated with a brushing or swiping motion on the user's display or
|
||||||
input device:
|
input device:
|
||||||
|
|
||||||
\snippet examples/gestures/imagegestures/imagewidget.cpp swipe function
|
\snippet gestures/imagegestures/imagewidget.cpp swipe function
|
||||||
|
|
||||||
The QSwipeGesture class provides specialized functions and defines a enum
|
The QSwipeGesture class provides specialized functions and defines a enum
|
||||||
to make it more convenient for developers to discover which direction, if
|
to make it more convenient for developers to discover which direction, if
|
@ -7,6 +7,6 @@ SOURCES = imagewidget.cpp \
|
|||||||
mainwidget.cpp
|
mainwidget.cpp
|
||||||
|
|
||||||
# install
|
# install
|
||||||
target.path = $$[QT_INSTALL_EXAMPLES]/gestures/imagegestures
|
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/gestures/imagegestures
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
|
@ -9,6 +9,7 @@ SUBDIRS = \
|
|||||||
dialogs \
|
dialogs \
|
||||||
draganddrop \
|
draganddrop \
|
||||||
effects \
|
effects \
|
||||||
|
gestures \
|
||||||
graphicsview \
|
graphicsview \
|
||||||
itemviews \
|
itemviews \
|
||||||
layouts \
|
layouts \
|
||||||
|
@ -12,10 +12,6 @@ include(gcc-base.conf)
|
|||||||
|
|
||||||
QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__=4
|
QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__=4
|
||||||
|
|
||||||
QMAKE_CFLAGS_DEBUG += -gdwarf-2
|
|
||||||
|
|
||||||
QMAKE_CXXFLAGS_DEBUG += -gdwarf-2
|
|
||||||
|
|
||||||
QMAKE_OBJECTIVE_CFLAGS = $$QMAKE_CFLAGS
|
QMAKE_OBJECTIVE_CFLAGS = $$QMAKE_CFLAGS
|
||||||
QMAKE_OBJECTIVE_CFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
|
QMAKE_OBJECTIVE_CFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
|
||||||
QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
||||||
|
@ -119,6 +119,14 @@ DEFINES += QT_BUILDING_QT
|
|||||||
win32 {
|
win32 {
|
||||||
INCLUDEPATH += tmp
|
INCLUDEPATH += tmp
|
||||||
CONFIG += skip_target_version_ext
|
CONFIG += skip_target_version_ext
|
||||||
|
# If the code is really "unsafe" then it is unsafe on
|
||||||
|
# other platforms as well; so fixing these warnings just
|
||||||
|
# for MSVC builds, would clutter the code and wouldn't help
|
||||||
|
# in fixing issues that might exist on other platforms.
|
||||||
|
# Using the same functions across all supported platforms
|
||||||
|
# keeps the code clean and helps in writing code that is
|
||||||
|
# safe across all platforms.
|
||||||
|
DEFINES *= _CRT_SECURE_NO_WARNINGS
|
||||||
}
|
}
|
||||||
|
|
||||||
aix-g++* {
|
aix-g++* {
|
||||||
|
@ -716,7 +716,7 @@
|
|||||||
and \l{QMAKE_FRAMEWORK_VERSION} variables. By default, the values used for
|
and \l{QMAKE_FRAMEWORK_VERSION} variables. By default, the values used for
|
||||||
these variables are obtained from the \l{TARGET} and \l{VERSION} variables.
|
these variables are obtained from the \l{TARGET} and \l{VERSION} variables.
|
||||||
|
|
||||||
See \l{Deploying an Application on Mac OS X} for more information about
|
See \l{Qt for Mac OS X - Deployment} for more information about
|
||||||
deploying applications and libraries.
|
deploying applications and libraries.
|
||||||
|
|
||||||
\section2 Creating and Moving Xcode Projects
|
\section2 Creating and Moving Xcode Projects
|
||||||
@ -810,7 +810,7 @@
|
|||||||
\snippet code/doc_src_qmake-manual.pro 23
|
\snippet code/doc_src_qmake-manual.pro 23
|
||||||
|
|
||||||
This is discussed in more detail in the
|
This is discussed in more detail in the
|
||||||
\l{Deploying an Application on Windows#Manifest files}
|
\l{Qt for Windows - Deployment#Manifest files}
|
||||||
{deployment guide for Windows}.
|
{deployment guide for Windows}.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -1999,7 +1999,7 @@
|
|||||||
platform, the variable will be forwarded to the MACOSX_DEPLOYMENT_TARGET
|
platform, the variable will be forwarded to the MACOSX_DEPLOYMENT_TARGET
|
||||||
environment variable, which is interpreted by the compiler or linker.
|
environment variable, which is interpreted by the compiler or linker.
|
||||||
For more information, see the
|
For more information, see the
|
||||||
\l{Deploying an Application on Mac OS X#Mac OS X Version Dependencies}{Deploying
|
\l{Qt for Mac OS X - Deployment#Mac OS X Version Dependencies}{Deploying
|
||||||
an Application on Mac OS X} document.
|
an Application on Mac OS X} document.
|
||||||
|
|
||||||
\section1 QMAKE_MAKEFILE
|
\section1 QMAKE_MAKEFILE
|
||||||
@ -2092,7 +2092,6 @@
|
|||||||
\row \li dbus \li \l{Qt D-Bus}
|
\row \li dbus \li \l{Qt D-Bus}
|
||||||
\row \li declarative \li \l{Qt Quick 1} (deprecated)
|
\row \li declarative \li \l{Qt Quick 1} (deprecated)
|
||||||
\row \li designer \li \l{Qt Designer}
|
\row \li designer \li \l{Qt Designer}
|
||||||
\row \li designercomponents \li \l{Qt Designer Components}
|
|
||||||
\row \li gui (included by default) \li \l{Qt GUI}
|
\row \li gui (included by default) \li \l{Qt GUI}
|
||||||
\row \li help \li \l{Qt Help}
|
\row \li help \li \l{Qt Help}
|
||||||
\row \li multimedia \li \l{Qt Multimedia}
|
\row \li multimedia \li \l{Qt Multimedia}
|
||||||
@ -3273,7 +3272,7 @@
|
|||||||
\li \l{QMAKE_EXT_UI} modifies the extension used for \QD UI files
|
\li \l{QMAKE_EXT_UI} modifies the extension used for \QD UI files
|
||||||
(usually in \l{FORMS}).
|
(usually in \l{FORMS}).
|
||||||
\li \l{QMAKE_EXT_PRL} modifies the extension placed on
|
\li \l{QMAKE_EXT_PRL} modifies the extension placed on
|
||||||
\l{#LibDepend}{library dependency files}.
|
\l{LibDepend}{library dependency files}.
|
||||||
\li \l{QMAKE_EXT_LEX} changes the suffix used in Lex files (usually in
|
\li \l{QMAKE_EXT_LEX} changes the suffix used in Lex files (usually in
|
||||||
\l{LEXSOURCES}).
|
\l{LEXSOURCES}).
|
||||||
\li \l{QMAKE_EXT_YACC} changes the suffix used in Yacc files (usually in
|
\li \l{QMAKE_EXT_YACC} changes the suffix used in Yacc files (usually in
|
||||||
@ -4335,8 +4334,7 @@
|
|||||||
them uses project-specific variables to customize output files.
|
them uses project-specific variables to customize output files.
|
||||||
|
|
||||||
Platform-specific variables are not described here. For more information,
|
Platform-specific variables are not described here. For more information,
|
||||||
see \l{Deploying an Application on Windows} and
|
see \l{Qt for Windows - Deployment} and \l{Qt for Mac OS X}.
|
||||||
\l{Developing Qt Applications for Mac OS X}.
|
|
||||||
|
|
||||||
\target Application
|
\target Application
|
||||||
\section1 Building an Application
|
\section1 Building an Application
|
||||||
|
@ -795,7 +795,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
mkt << "\\\n\t";
|
mkt << "\\\n\t";
|
||||||
++added;
|
++added;
|
||||||
const QString file_name = fileFixify(fn, Option::output_dir, Option::output_dir);
|
const QString file_name = fileFixify(fn, Option::output_dir, Option::output_dir);
|
||||||
mkt << " " << replaceExtraCompilerVariables(tmp_out.first().toQString(), file_name, QString());
|
mkt << " " << replaceExtraCompilerVariables(Option::fixPathToTargetOS(tmp_out.first().toQString(), false), file_name, QString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -729,11 +729,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" ";
|
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" ";
|
||||||
if(project->first("TEMPLATE") == "app") {
|
if(project->first("TEMPLATE") == "app") {
|
||||||
QString icon = fileFixify(var("ICON"));
|
QString icon = fileFixify(var("ICON"));
|
||||||
|
QString bundleIdentifier = "com.yourcompany." + var("QMAKE_BUNDLE");
|
||||||
|
if (bundleIdentifier.endsWith(".app"))
|
||||||
|
bundleIdentifier.chop(4);
|
||||||
t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
|
t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
|
||||||
<< "@sed ";
|
<< "@sed ";
|
||||||
foreach (const ProString &arg, commonSedArgs)
|
foreach (const ProString &arg, commonSedArgs)
|
||||||
t << arg;
|
t << arg;
|
||||||
t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" "
|
t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" "
|
||||||
|
<< "-e \"s,@BUNDLEIDENTIFIER@," << bundleIdentifier << ",g\" "
|
||||||
<< "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" "
|
<< "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" "
|
||||||
<< "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
|
<< "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
|
||||||
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
|
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
|
||||||
|
@ -953,13 +953,15 @@ static inline QString toString(compileAsManagedOptions option)
|
|||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QString toString(debugOption option)
|
static inline QString toString(debugOption option, DotNET compilerVersion)
|
||||||
{
|
{
|
||||||
switch (option) {
|
switch (option) {
|
||||||
case debugUnknown:
|
case debugUnknown:
|
||||||
case debugLineInfoOnly:
|
case debugLineInfoOnly:
|
||||||
break;
|
break;
|
||||||
case debugDisabled:
|
case debugDisabled:
|
||||||
|
if (compilerVersion <= NET2010)
|
||||||
|
break;
|
||||||
return "None";
|
return "None";
|
||||||
case debugOldStyleInfo:
|
case debugOldStyleInfo:
|
||||||
return "OldStyle";
|
return "OldStyle";
|
||||||
@ -1425,6 +1427,17 @@ static inline triState toTriState(termSvrAwarenessType option)
|
|||||||
return unset;
|
return unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static XmlOutput::xml_output fixedProgramDataBaseFileNameOutput(const VCCLCompilerTool &tool)
|
||||||
|
{
|
||||||
|
if (tool.config->CompilerVersion >= NET2012
|
||||||
|
&& tool.DebugInformationFormat == debugDisabled
|
||||||
|
&& tool.ProgramDataBaseFileName.isEmpty()) {
|
||||||
|
// Force the creation of an empty tag to work-around Visual Studio bug. See QTBUG-35570.
|
||||||
|
return tagValue(_ProgramDataBaseFileName, tool.ProgramDataBaseFileName);
|
||||||
|
}
|
||||||
|
return attrTagS(_ProgramDataBaseFileName, tool.ProgramDataBaseFileName);
|
||||||
|
}
|
||||||
|
|
||||||
void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
|
void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
|
||||||
{
|
{
|
||||||
xml
|
xml
|
||||||
@ -1444,7 +1457,8 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
|
|||||||
<< attrTagS(_CompileAsManaged, toString(tool.CompileAsManaged))
|
<< attrTagS(_CompileAsManaged, toString(tool.CompileAsManaged))
|
||||||
<< attrTagT(_CompileAsWinRT, tool.CompileAsWinRT)
|
<< attrTagT(_CompileAsWinRT, tool.CompileAsWinRT)
|
||||||
<< attrTagT(_CreateHotpatchableImage, tool.CreateHotpatchableImage)
|
<< attrTagT(_CreateHotpatchableImage, tool.CreateHotpatchableImage)
|
||||||
<< attrTagS(_DebugInformationFormat, toString(tool.DebugInformationFormat))
|
<< attrTagS(_DebugInformationFormat, toString(tool.DebugInformationFormat,
|
||||||
|
tool.config->CompilerVersion))
|
||||||
<< attrTagT(_DisableLanguageExtensions, tool.DisableLanguageExtensions)
|
<< attrTagT(_DisableLanguageExtensions, tool.DisableLanguageExtensions)
|
||||||
<< attrTagX(_DisableSpecificWarnings, tool.DisableSpecificWarnings, ";")
|
<< attrTagX(_DisableSpecificWarnings, tool.DisableSpecificWarnings, ";")
|
||||||
<< attrTagS(_EnableEnhancedInstructionSet, toString(tool.EnableEnhancedInstructionSet))
|
<< attrTagS(_EnableEnhancedInstructionSet, toString(tool.EnableEnhancedInstructionSet))
|
||||||
@ -1480,7 +1494,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
|
|||||||
<< attrTagS(_PreprocessOutputPath, tool.PreprocessOutputPath)
|
<< attrTagS(_PreprocessOutputPath, tool.PreprocessOutputPath)
|
||||||
<< attrTagT(_PreprocessSuppressLineNumbers, tool.PreprocessSuppressLineNumbers)
|
<< attrTagT(_PreprocessSuppressLineNumbers, tool.PreprocessSuppressLineNumbers)
|
||||||
<< attrTagT(_PreprocessToFile, toTriState(tool.GeneratePreprocessedFile))
|
<< attrTagT(_PreprocessToFile, toTriState(tool.GeneratePreprocessedFile))
|
||||||
<< attrTagS(_ProgramDataBaseFileName, tool.ProgramDataBaseFileName)
|
<< fixedProgramDataBaseFileNameOutput(tool)
|
||||||
<< attrTagS(_ProcessorNumber, tool.MultiProcessorCompilationProcessorCount)
|
<< attrTagS(_ProcessorNumber, tool.MultiProcessorCompilationProcessorCount)
|
||||||
<< attrTagS(_RuntimeLibrary, toString(tool.RuntimeLibrary))
|
<< attrTagS(_RuntimeLibrary, toString(tool.RuntimeLibrary))
|
||||||
<< attrTagT(_RuntimeTypeInfo, tool.RuntimeTypeInfo)
|
<< attrTagT(_RuntimeTypeInfo, tool.RuntimeTypeInfo)
|
||||||
|
2
src/3rdparty/angle/src/libEGL/Display.cpp
vendored
@ -525,7 +525,7 @@ void Display::initVendorString()
|
|||||||
if (mRenderer && mRenderer->getLUID(&adapterLuid))
|
if (mRenderer && mRenderer->getLUID(&adapterLuid))
|
||||||
{
|
{
|
||||||
char adapterLuidString[64];
|
char adapterLuidString[64];
|
||||||
sprintf_s(adapterLuidString, sizeof(adapterLuidString), " (adapter LUID: %08x%08x)", adapterLuid.HighPart, adapterLuid.LowPart);
|
snprintf(adapterLuidString, sizeof(adapterLuidString), " (adapter LUID: %08l%08l)", adapterLuid.HighPart, adapterLuid.LowPart);
|
||||||
|
|
||||||
mVendorString += adapterLuidString;
|
mVendorString += adapterLuidString;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
From 58a797397378aff3aa039a8b2a2d7011fe788737 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kai Koehne <kai.koehne@digia.com>
|
||||||
|
Date: Tue, 21 Jan 2014 10:23:38 +0100
|
||||||
|
Subject: [PATCH] Fix compilation of ANGLE with mingw-tdm64 gcc 4.8.1
|
||||||
|
|
||||||
|
Do not rely on sprintf_s being declared/defined. This also fixes
|
||||||
|
deployment to Windows XP.
|
||||||
|
|
||||||
|
See https://chromium-review.googlesource.com/#/c/182975/ for a similar
|
||||||
|
commit proposed upstream.
|
||||||
|
|
||||||
|
Task-number: QTBUG-36242
|
||||||
|
Change-Id: I520e2f61aeab34963e7a57baafd413c7db93f110
|
||||||
|
---
|
||||||
|
src/3rdparty/angle/src/libEGL/Display.cpp | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/3rdparty/angle/src/libEGL/Display.cpp b/src/3rdparty/angle/src/libEGL/Display.cpp
|
||||||
|
index a382c3b..82b48ce 100644
|
||||||
|
--- a/src/3rdparty/angle/src/libEGL/Display.cpp
|
||||||
|
+++ b/src/3rdparty/angle/src/libEGL/Display.cpp
|
||||||
|
@@ -523,7 +523,7 @@ void Display::initVendorString()
|
||||||
|
if (mRenderer && mRenderer->getLUID(&adapterLuid))
|
||||||
|
{
|
||||||
|
char adapterLuidString[64];
|
||||||
|
- sprintf_s(adapterLuidString, sizeof(adapterLuidString), " (adapter LUID: %08x%08x)", adapterLuid.HighPart, adapterLuid.LowPart);
|
||||||
|
+ snprintf(adapterLuidString, sizeof(adapterLuidString), " (adapter LUID: %08l%08l)", adapterLuid.HighPart, adapterLuid.LowPart);
|
||||||
|
|
||||||
|
mVendorString += adapterLuidString;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.8.5.2.msysgit.0
|
||||||
|
|
@ -46,8 +46,8 @@
|
|||||||
// W A R N I N G
|
// W A R N I N G
|
||||||
// -------------
|
// -------------
|
||||||
//
|
//
|
||||||
// This file is not part of the Qt API. It exists for the convenience
|
// This file is not part of the Qt API.
|
||||||
// of QIODevice. This header file may change from version to
|
// This header file may change from version to
|
||||||
// version without notice, or even be removed.
|
// version without notice, or even be removed.
|
||||||
//
|
//
|
||||||
// We mean it.
|
// We mean it.
|
||||||
|
@ -26,7 +26,7 @@ qhp.QtCore.subprojects.classes.sortPages = true
|
|||||||
|
|
||||||
tagfile = ../../../doc/qtcore/qtcore.tags
|
tagfile = ../../../doc/qtcore/qtcore.tags
|
||||||
|
|
||||||
depends += qtgui qtwidgets qtnetwork qtdoc qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake
|
depends += qtgui qtwidgets qtnetwork qtdoc qtmacextras qtquick qtlinguist qtdesigner qtconcurrent qtxml qmake
|
||||||
|
|
||||||
headerdirs += ..
|
headerdirs += ..
|
||||||
|
|
||||||
|
@ -1988,7 +1988,7 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
|
|||||||
conditions that it would not otherwise know about. However, there is no
|
conditions that it would not otherwise know about. However, there is no
|
||||||
guarantee that the compiler will actually use those hints.
|
guarantee that the compiler will actually use those hints.
|
||||||
|
|
||||||
This macro could be considered a "lighter" version of \l{Q_ASSERT}. While
|
This macro could be considered a "lighter" version of \l{Q_ASSERT()}. While
|
||||||
Q_ASSERT will abort the program's execution if the condition is false,
|
Q_ASSERT will abort the program's execution if the condition is false,
|
||||||
Q_ASSUME will tell the compiler not to generate code for those conditions.
|
Q_ASSUME will tell the compiler not to generate code for those conditions.
|
||||||
Therefore, it is important that the assumptions always hold, otherwise
|
Therefore, it is important that the assumptions always hold, otherwise
|
||||||
@ -3359,7 +3359,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
|
|||||||
If you need C++11 noexcept semantics, don't use this macro, use
|
If you need C++11 noexcept semantics, don't use this macro, use
|
||||||
Q_DECL_NOEXCEPT/Q_DECL_NOEXCEPT_EXPR instead.
|
Q_DECL_NOEXCEPT/Q_DECL_NOEXCEPT_EXPR instead.
|
||||||
|
|
||||||
\sa Q_DECL_NOEXCEPT, Q_DECL_NOEXCEPT_EXPR
|
\sa Q_DECL_NOEXCEPT, Q_DECL_NOEXCEPT_EXPR()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -3413,7 +3413,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
|
|||||||
function can't possibly throw, don't use this macro, use
|
function can't possibly throw, don't use this macro, use
|
||||||
Q_DECL_NOTHROW instead.
|
Q_DECL_NOTHROW instead.
|
||||||
|
|
||||||
\sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT_EXPR
|
\sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT_EXPR()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -3435,7 +3435,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
|
|||||||
function can't possibly throw, don't use this macro, use
|
function can't possibly throw, don't use this macro, use
|
||||||
Q_DECL_NOTHROW instead.
|
Q_DECL_NOTHROW instead.
|
||||||
|
|
||||||
\sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT_EXPR
|
\sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -838,9 +838,13 @@ Q_CORE_EXPORT void qFreeAligned(void *ptr);
|
|||||||
# pragma warning(disable: 4800) /* 'type' : forcing value to bool 'true' or 'false' (performance warning) */
|
# pragma warning(disable: 4800) /* 'type' : forcing value to bool 'true' or 'false' (performance warning) */
|
||||||
# pragma warning(disable: 4097) /* typedef-name 'identifier1' used as synonym for class-name 'identifier2' */
|
# pragma warning(disable: 4097) /* typedef-name 'identifier1' used as synonym for class-name 'identifier2' */
|
||||||
# pragma warning(disable: 4706) /* assignment within conditional expression */
|
# pragma warning(disable: 4706) /* assignment within conditional expression */
|
||||||
|
# if _MSC_VER <= 1310 // MSVC 2003
|
||||||
# pragma warning(disable: 4786) /* 'identifier' : identifier was truncated to 'number' characters in the debug information */
|
# pragma warning(disable: 4786) /* 'identifier' : identifier was truncated to 'number' characters in the debug information */
|
||||||
|
# endif
|
||||||
# pragma warning(disable: 4355) /* 'this' : used in base member initializer list */
|
# pragma warning(disable: 4355) /* 'this' : used in base member initializer list */
|
||||||
|
# if _MSC_VER < 1800 // MSVC 2013
|
||||||
# pragma warning(disable: 4231) /* nonstandard extension used : 'identifier' before template explicit instantiation */
|
# pragma warning(disable: 4231) /* nonstandard extension used : 'identifier' before template explicit instantiation */
|
||||||
|
# endif
|
||||||
# pragma warning(disable: 4710) /* function not inlined */
|
# pragma warning(disable: 4710) /* function not inlined */
|
||||||
# pragma warning(disable: 4530) /* C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc */
|
# pragma warning(disable: 4530) /* C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc */
|
||||||
# elif defined(Q_CC_BOR)
|
# elif defined(Q_CC_BOR)
|
||||||
|
@ -1246,6 +1246,32 @@ static void qDefaultMsgHandler(QtMsgType type, const char *buf)
|
|||||||
qDefaultMessageHandler(type, emptyContext, QString::fromLocal8Bit(buf));
|
qDefaultMessageHandler(type, emptyContext, QString::fromLocal8Bit(buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(Q_COMPILER_THREAD_LOCAL) || (defined(Q_CC_MSVC) && !defined(Q_OS_WINCE))
|
||||||
|
#if defined(Q_CC_MSVC)
|
||||||
|
static __declspec(thread) bool msgHandlerGrabbed = false;
|
||||||
|
#else
|
||||||
|
static thread_local bool msgHandlerGrabbed = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static bool grabMessageHandler()
|
||||||
|
{
|
||||||
|
if (msgHandlerGrabbed)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
msgHandlerGrabbed = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ungrabMessageHandler()
|
||||||
|
{
|
||||||
|
msgHandlerGrabbed = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
static bool grabMessageHandler() { return true; }
|
||||||
|
static void ungrabMessageHandler() { }
|
||||||
|
#endif // (Q_COMPILER_THREAD_LOCAL) || ((Q_CC_MSVC) && !(Q_OS_WINCE))
|
||||||
|
|
||||||
static void qt_message_print(QtMsgType msgType, const QMessageLogContext &context, const QString &message)
|
static void qt_message_print(QtMsgType msgType, const QMessageLogContext &context, const QString &message)
|
||||||
{
|
{
|
||||||
#ifndef QT_BOOTSTRAPPED
|
#ifndef QT_BOOTSTRAPPED
|
||||||
@ -1263,6 +1289,9 @@ static void qt_message_print(QtMsgType msgType, const QMessageLogContext &contex
|
|||||||
if (!messageHandler)
|
if (!messageHandler)
|
||||||
messageHandler = qDefaultMessageHandler;
|
messageHandler = qDefaultMessageHandler;
|
||||||
|
|
||||||
|
// prevent recursion in case the message handler generates messages
|
||||||
|
// itself, e.g. by using Qt API
|
||||||
|
if (grabMessageHandler()) {
|
||||||
// prefer new message handler over the old one
|
// prefer new message handler over the old one
|
||||||
if (msgHandler == qDefaultMsgHandler
|
if (msgHandler == qDefaultMsgHandler
|
||||||
|| messageHandler != qDefaultMessageHandler) {
|
|| messageHandler != qDefaultMessageHandler) {
|
||||||
@ -1270,6 +1299,10 @@ static void qt_message_print(QtMsgType msgType, const QMessageLogContext &contex
|
|||||||
} else {
|
} else {
|
||||||
(*msgHandler)(msgType, message.toLocal8Bit().constData());
|
(*msgHandler)(msgType, message.toLocal8Bit().constData());
|
||||||
}
|
}
|
||||||
|
ungrabMessageHandler();
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "%s", message.toLocal8Bit().constData());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void qt_message_fatal(QtMsgType, const QMessageLogContext &context, const QString &message)
|
static void qt_message_fatal(QtMsgType, const QMessageLogContext &context, const QString &message)
|
||||||
|
@ -716,11 +716,12 @@ QString QDir::absoluteFilePath(const QString &fileName) const
|
|||||||
return fileName;
|
return fileName;
|
||||||
|
|
||||||
d->resolveAbsoluteEntry();
|
d->resolveAbsoluteEntry();
|
||||||
|
const QString absoluteDirPath = d->absoluteDirEntry.filePath();
|
||||||
if (fileName.isEmpty())
|
if (fileName.isEmpty())
|
||||||
return d->absoluteDirEntry.filePath();
|
return absoluteDirPath;
|
||||||
if (!d->absoluteDirEntry.isRoot())
|
if (!absoluteDirPath.endsWith(QLatin1Char('/')))
|
||||||
return d->absoluteDirEntry.filePath() % QLatin1Char('/') % fileName;
|
return absoluteDirPath % QLatin1Char('/') % fileName;
|
||||||
return d->absoluteDirEntry.filePath() % fileName;
|
return absoluteDirPath % fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -102,7 +102,7 @@ QFileSelectorPrivate::QFileSelectorPrivate()
|
|||||||
your code might look something like this:
|
your code might look something like this:
|
||||||
\code
|
\code
|
||||||
QString defaultsPath = "data/defaults.conf";
|
QString defaultsPath = "data/defaults.conf";
|
||||||
#if defined(Q_OS_LINUX_ANDROID)
|
#if defined(Q_OS_ANDROID)
|
||||||
defaultsPath = "data/android/defaults.conf";
|
defaultsPath = "data/android/defaults.conf";
|
||||||
#elif defined(Q_OS_BLACKBERRY)
|
#elif defined(Q_OS_BLACKBERRY)
|
||||||
defaultsPath = "data/blackberry/defaults.conf";
|
defaultsPath = "data/blackberry/defaults.conf";
|
||||||
@ -157,7 +157,7 @@ QFileSelectorPrivate::QFileSelectorPrivate()
|
|||||||
Selectors normally available are
|
Selectors normally available are
|
||||||
\list
|
\list
|
||||||
\li platform, any of the following strings which match the platform the application is running
|
\li platform, any of the following strings which match the platform the application is running
|
||||||
on: android, blackberry, ios, mac, linux, wince, unix, windows.
|
on: android, blackberry, ios, osx, darwin, mac, linux, wince, unix, windows.
|
||||||
\li locale, same as QLocale::system().name().
|
\li locale, same as QLocale::system().name().
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
@ -368,18 +368,22 @@ QStringList QFileSelectorPrivate::platformSelectors()
|
|||||||
# endif
|
# endif
|
||||||
#elif defined(Q_OS_UNIX)
|
#elif defined(Q_OS_UNIX)
|
||||||
ret << QStringLiteral("unix");
|
ret << QStringLiteral("unix");
|
||||||
# if defined(Q_OS_LINUX_ANDROID)
|
# if defined(Q_OS_ANDROID)
|
||||||
ret << QStringLiteral("android");
|
ret << QStringLiteral("android");
|
||||||
# elif defined(Q_OS_BLACKBERRY)
|
# elif defined(Q_OS_BLACKBERRY)
|
||||||
ret << QStringLiteral("blackberry");
|
ret << QStringLiteral("blackberry");
|
||||||
# elif defined(Q_OS_QNX)
|
# elif defined(Q_OS_QNX)
|
||||||
ret << QStringLiteral("qnx");
|
ret << QStringLiteral("qnx");
|
||||||
# elif defined(Q_OS_IOS)
|
|
||||||
ret << QStringLiteral("ios");
|
|
||||||
# elif defined(Q_OS_LINUX)
|
# elif defined(Q_OS_LINUX)
|
||||||
ret << QStringLiteral("linux");
|
ret << QStringLiteral("linux");
|
||||||
# elif defined(Q_OS_MAC)
|
# elif defined(Q_OS_DARWIN)
|
||||||
ret << QStringLiteral("mac");
|
ret << QStringLiteral("darwin");
|
||||||
|
ret << QStringLiteral("mac"); // compatibility synonym
|
||||||
|
# if defined(Q_OS_IOS)
|
||||||
|
ret << QStringLiteral("ios");
|
||||||
|
# elif defined(Q_OS_OSX)
|
||||||
|
ret << QStringLiteral("osx");
|
||||||
|
# endif
|
||||||
# else
|
# else
|
||||||
struct utsname u;
|
struct utsname u;
|
||||||
if (uname(&u) != -1)
|
if (uname(&u) != -1)
|
||||||
|
@ -259,9 +259,10 @@ QIODevicePrivate::~QIODevicePrivate()
|
|||||||
|
|
||||||
\value NotOpen The device is not open.
|
\value NotOpen The device is not open.
|
||||||
\value ReadOnly The device is open for reading.
|
\value ReadOnly The device is open for reading.
|
||||||
\value WriteOnly The device is open for writing.
|
\value WriteOnly The device is open for writing. Note that this mode implies
|
||||||
|
Truncate.
|
||||||
\value ReadWrite The device is open for reading and writing.
|
\value ReadWrite The device is open for reading and writing.
|
||||||
\value Append The device is opened in append mode, so that all data is
|
\value Append The device is opened in append mode so that all data is
|
||||||
written to the end of the file.
|
written to the end of the file.
|
||||||
\value Truncate If possible, the device is truncated before it is opened.
|
\value Truncate If possible, the device is truncated before it is opened.
|
||||||
All earlier contents of the device are lost.
|
All earlier contents of the device are lost.
|
||||||
|
@ -72,7 +72,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory,
|
|||||||
\section1 Checking category configuration
|
\section1 Checking category configuration
|
||||||
|
|
||||||
QLoggingCategory provides \l isDebugEnabled(), \l isWarningEnabled(),
|
QLoggingCategory provides \l isDebugEnabled(), \l isWarningEnabled(),
|
||||||
\l isCriticalEnabled(), \l isTraceEnabled(), as well as \l isEnabled()
|
\l isCriticalEnabled(), as well as \l isEnabled()
|
||||||
to check whether messages for the given message type should be logged.
|
to check whether messages for the given message type should be logged.
|
||||||
|
|
||||||
\note The qCDebug(), qCWarning(), qCCritical() macros prevent arguments
|
\note The qCDebug(), qCWarning(), qCCritical() macros prevent arguments
|
||||||
|
@ -458,10 +458,21 @@ void QSortFilterProxyModelPrivate::sort()
|
|||||||
*/
|
*/
|
||||||
bool QSortFilterProxyModelPrivate::update_source_sort_column()
|
bool QSortFilterProxyModelPrivate::update_source_sort_column()
|
||||||
{
|
{
|
||||||
Q_Q(QSortFilterProxyModel);
|
|
||||||
QModelIndex proxy_index = q->index(0, proxy_sort_column, QModelIndex());
|
|
||||||
int old_source_sort_column = source_sort_column;
|
int old_source_sort_column = source_sort_column;
|
||||||
source_sort_column = q->mapToSource(proxy_index).column();
|
|
||||||
|
if (proxy_sort_column == -1) {
|
||||||
|
source_sort_column = -1;
|
||||||
|
} else {
|
||||||
|
// We cannot use index mapping here because in case of a still-empty
|
||||||
|
// proxy model there's no valid proxy index we could map to source.
|
||||||
|
// So always use the root mapping directly instead.
|
||||||
|
Mapping *m = create_mapping(QModelIndex()).value();
|
||||||
|
if (proxy_sort_column < m->source_columns.size())
|
||||||
|
source_sort_column = m->source_columns.at(proxy_sort_column);
|
||||||
|
else
|
||||||
|
source_sort_column = -1;
|
||||||
|
}
|
||||||
|
|
||||||
return old_source_sort_column != source_sort_column;
|
return old_source_sort_column != source_sort_column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,9 +206,9 @@ public:
|
|||||||
const char *member, Qt::ConnectionType type = Qt::AutoConnection) const;
|
const char *member, Qt::ConnectionType type = Qt::AutoConnection) const;
|
||||||
|
|
||||||
#ifdef Q_QDOC
|
#ifdef Q_QDOC
|
||||||
static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type);
|
static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type = Qt::AutoConnection);
|
||||||
static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor);
|
static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor);
|
||||||
static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type);
|
static QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type = Qt::AutoConnection);
|
||||||
#else
|
#else
|
||||||
//Connect a signal to a pointer to qobject member function
|
//Connect a signal to a pointer to qobject member function
|
||||||
template <typename Func1, typename Func2>
|
template <typename Func1, typename Func2>
|
||||||
|
@ -2833,8 +2833,8 @@ static bool canConvertMetaObject(int fromId, int toId, QObject *fromObject)
|
|||||||
|
|
||||||
\snippet code/src_corelib_kernel_qvariant.cpp 10
|
\snippet code/src_corelib_kernel_qvariant.cpp 10
|
||||||
|
|
||||||
\sa convert(), QSequentialIterable, qRegisterSequentialConverter(), QAssociativeIterable,
|
\sa convert(), QSequentialIterable, Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE(), QAssociativeIterable,
|
||||||
qRegisterAssociativeConverter()
|
Q_DECLARE_ASSOCIATIVE_CONTAINER_METATYPE()
|
||||||
*/
|
*/
|
||||||
bool QVariant::canConvert(int targetTypeId) const
|
bool QVariant::canConvert(int targetTypeId) const
|
||||||
{
|
{
|
||||||
@ -3334,7 +3334,7 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p)
|
|||||||
|
|
||||||
\snippet code/src_corelib_kernel_qvariant.cpp 9
|
\snippet code/src_corelib_kernel_qvariant.cpp 9
|
||||||
|
|
||||||
\sa setValue(), fromValue(), canConvert(), qRegisterSequentialConverter()
|
\sa setValue(), fromValue(), canConvert(), Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \fn bool QVariant::canConvert() const
|
/*! \fn bool QVariant::canConvert() const
|
||||||
|
@ -374,6 +374,7 @@ private:
|
|||||||
|
|
||||||
static QBasicMutex qt_library_mutex;
|
static QBasicMutex qt_library_mutex;
|
||||||
static QLibraryStore *qt_library_data = 0;
|
static QLibraryStore *qt_library_data = 0;
|
||||||
|
static bool qt_library_data_once;
|
||||||
|
|
||||||
QLibraryStore::~QLibraryStore()
|
QLibraryStore::~QLibraryStore()
|
||||||
{
|
{
|
||||||
@ -429,8 +430,11 @@ Q_DESTRUCTOR_FUNCTION(qlibraryCleanup)
|
|||||||
// must be called with a locked mutex
|
// must be called with a locked mutex
|
||||||
QLibraryStore *QLibraryStore::instance()
|
QLibraryStore *QLibraryStore::instance()
|
||||||
{
|
{
|
||||||
if (Q_UNLIKELY(!qt_library_data))
|
if (Q_UNLIKELY(!qt_library_data_once && !qt_library_data)) {
|
||||||
|
// only create once per process lifetime
|
||||||
qt_library_data = new QLibraryStore;
|
qt_library_data = new QLibraryStore;
|
||||||
|
qt_library_data_once = true;
|
||||||
|
}
|
||||||
return qt_library_data;
|
return qt_library_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -440,11 +444,14 @@ inline QLibraryPrivate *QLibraryStore::findOrCreate(const QString &fileName, con
|
|||||||
QLibraryStore *data = instance();
|
QLibraryStore *data = instance();
|
||||||
|
|
||||||
// check if this library is already loaded
|
// check if this library is already loaded
|
||||||
QLibraryPrivate *lib = data->libraryMap.value(fileName);
|
QLibraryPrivate *lib = 0;
|
||||||
|
if (Q_LIKELY(data))
|
||||||
|
lib = data->libraryMap.value(fileName);
|
||||||
if (!lib)
|
if (!lib)
|
||||||
lib = new QLibraryPrivate(fileName, version);
|
lib = new QLibraryPrivate(fileName, version);
|
||||||
|
|
||||||
// track this library
|
// track this library
|
||||||
|
if (Q_LIKELY(data))
|
||||||
data->libraryMap.insert(fileName, lib);
|
data->libraryMap.insert(fileName, lib);
|
||||||
|
|
||||||
lib->libraryRefCount.ref();
|
lib->libraryRefCount.ref();
|
||||||
@ -464,9 +471,11 @@ inline void QLibraryStore::releaseLibrary(QLibraryPrivate *lib)
|
|||||||
// no one else is using
|
// no one else is using
|
||||||
Q_ASSERT(lib->libraryUnloadCount.load() == 0);
|
Q_ASSERT(lib->libraryUnloadCount.load() == 0);
|
||||||
|
|
||||||
|
if (Q_LIKELY(data)) {
|
||||||
QLibraryPrivate *that = data->libraryMap.take(lib->fileName);
|
QLibraryPrivate *that = data->libraryMap.take(lib->fileName);
|
||||||
Q_ASSERT(lib == that);
|
Q_ASSERT(lib == that);
|
||||||
Q_UNUSED(that);
|
Q_UNUSED(that);
|
||||||
|
}
|
||||||
delete lib;
|
delete lib;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -662,9 +662,6 @@
|
|||||||
This function requires the item type (in the example above,
|
This function requires the item type (in the example above,
|
||||||
QString) to implement \c operator<().
|
QString) to implement \c operator<().
|
||||||
|
|
||||||
See the \l{<QtAlgorithms>#binaryFind example}{detailed
|
|
||||||
description} for an example usage.
|
|
||||||
|
|
||||||
\sa qLowerBound(), qUpperBound(), {random access iterators}
|
\sa qLowerBound(), qUpperBound(), {random access iterators}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -119,14 +119,6 @@ QT_BEGIN_NAMESPACE
|
|||||||
\since 5.2
|
\since 5.2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn QBitArray &QBitArray::operator=(QBitArray &&other)
|
|
||||||
|
|
||||||
Move-assigns \a other to this QBitArray instance.
|
|
||||||
|
|
||||||
\since 5.2
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*! \fn QBitArray::QBitArray()
|
/*! \fn QBitArray::QBitArray()
|
||||||
|
|
||||||
Constructs an empty bit array.
|
Constructs an empty bit array.
|
||||||
@ -464,6 +456,7 @@ void QBitArray::fill(bool value, int begin, int end)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \fn QBitArray &QBitArray::operator=(QBitArray &&other)
|
/*! \fn QBitArray &QBitArray::operator=(QBitArray &&other)
|
||||||
|
\since 5.2
|
||||||
|
|
||||||
Moves \a other to this bit array and returns a reference to
|
Moves \a other to this bit array and returns a reference to
|
||||||
this bit array.
|
this bit array.
|
||||||
|
@ -1303,12 +1303,10 @@ void QByteArray::chop(int n)
|
|||||||
returns a reference to this byte array. The Unicode data is
|
returns a reference to this byte array. The Unicode data is
|
||||||
converted into 8-bit characters using QString::toUtf8().
|
converted into 8-bit characters using QString::toUtf8().
|
||||||
|
|
||||||
If the QString contains non-ASCII Unicode characters, using this
|
You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
|
||||||
operator can lead to loss of information. You can disable this
|
compile your applications. You then need to call QString::toUtf8() (or
|
||||||
operator by defining \c QT_NO_CAST_TO_ASCII when you compile your
|
QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
|
||||||
applications. You then need to call QString::toUtf8() (or
|
convert the data to \c{const char *}.
|
||||||
QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
|
|
||||||
explicitly if you want to convert the data to \c{const char *}.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \fn QByteArray &QByteArray::operator+=(const char *str)
|
/*! \fn QByteArray &QByteArray::operator+=(const char *str)
|
||||||
@ -1667,12 +1665,10 @@ QByteArray &QByteArray::append(const QByteArray &ba)
|
|||||||
Appends the string \a str to this byte array. The Unicode data is
|
Appends the string \a str to this byte array. The Unicode data is
|
||||||
converted into 8-bit characters using QString::toUtf8().
|
converted into 8-bit characters using QString::toUtf8().
|
||||||
|
|
||||||
If the QString contains non-ASCII Unicode characters, using this
|
You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
|
||||||
function can lead to loss of information. You can disable this
|
compile your applications. You then need to call QString::toUtf8() (or
|
||||||
function by defining \c QT_NO_CAST_TO_ASCII when you compile your
|
QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
|
||||||
applications. You then need to call QString::toUtf8() (or
|
convert the data to \c{const char *}.
|
||||||
QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
|
|
||||||
explicitly if you want to convert the data to \c{const char *}.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -2148,12 +2144,10 @@ QByteArray &QByteArray::replace(char before, const QByteArray &after)
|
|||||||
string \a after. The Unicode data is converted into 8-bit
|
string \a after. The Unicode data is converted into 8-bit
|
||||||
characters using QString::toUtf8().
|
characters using QString::toUtf8().
|
||||||
|
|
||||||
If the QString contains non-ASCII Unicode characters, using this
|
You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
|
||||||
function can lead to loss of information. You can disable this
|
compile your applications. You then need to call QString::toUtf8() (or
|
||||||
function by defining \c QT_NO_CAST_TO_ASCII when you compile your
|
QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
|
||||||
applications. You then need to call QString::toUtf8() (or
|
convert the data to \c{const char *}.
|
||||||
QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
|
|
||||||
explicitly if you want to convert the data to \c{const char *}.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \fn QByteArray &QByteArray::replace(char before, const char *after)
|
/*! \fn QByteArray &QByteArray::replace(char before, const char *after)
|
||||||
|
@ -79,7 +79,7 @@ public:
|
|||||||
This class is used to describe an option on the command line. It allows
|
This class is used to describe an option on the command line. It allows
|
||||||
different ways of defining the same option with multiple aliases possible.
|
different ways of defining the same option with multiple aliases possible.
|
||||||
It is also used to describe how the option is used - it may be a flag (e.g. \c{-v})
|
It is also used to describe how the option is used - it may be a flag (e.g. \c{-v})
|
||||||
or take an argument (e.g. \c{-o file}).
|
or take a value (e.g. \c{-o file}).
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
\snippet code/src_corelib_tools_qcommandlineoption.cpp 0
|
\snippet code/src_corelib_tools_qcommandlineoption.cpp 0
|
||||||
@ -232,8 +232,8 @@ void QCommandLineOptionPrivate::setNames(const QStringList &nameList)
|
|||||||
for the documentation of the option in the help output. An option with names \c{o} and \c{output},
|
for the documentation of the option in the help output. An option with names \c{o} and \c{output},
|
||||||
and a value name of \c{file} will appear as \c{-o, --output <file>}.
|
and a value name of \c{file} will appear as \c{-o, --output <file>}.
|
||||||
|
|
||||||
Call QCommandLineParser::argument() if you expect the option to be present
|
Call QCommandLineParser::value() if you expect the option to be present
|
||||||
only once, and QCommandLineParser::arguments() if you expect that option
|
only once, and QCommandLineParser::values() if you expect that option
|
||||||
to be present multiple times.
|
to be present multiple times.
|
||||||
|
|
||||||
\sa valueName()
|
\sa valueName()
|
||||||
|
@ -512,7 +512,7 @@ public:
|
|||||||
Q_DECL_CONSTEXPR inline QRectF translated(qreal dx, qreal dy) const;
|
Q_DECL_CONSTEXPR inline QRectF translated(qreal dx, qreal dy) const;
|
||||||
Q_DECL_CONSTEXPR inline QRectF translated(const QPointF &p) const;
|
Q_DECL_CONSTEXPR inline QRectF translated(const QPointF &p) const;
|
||||||
|
|
||||||
inline void moveTo(qreal x, qreal t);
|
inline void moveTo(qreal x, qreal y);
|
||||||
inline void moveTo(const QPointF &p);
|
inline void moveTo(const QPointF &p);
|
||||||
|
|
||||||
inline void setRect(qreal x, qreal y, qreal w, qreal h);
|
inline void setRect(qreal x, qreal y, qreal w, qreal h);
|
||||||
|
@ -7858,7 +7858,7 @@ QString &QString::setRawData(const QChar *unicode, int size)
|
|||||||
|
|
||||||
\snippet code/src_corelib_tools_qstring.cpp 6
|
\snippet code/src_corelib_tools_qstring.cpp 6
|
||||||
|
|
||||||
\sa QString, QLatin1Char, QStringLiteral
|
\sa QString, QLatin1Char, {QStringLiteral()}{QStringLiteral}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \fn QLatin1String::QLatin1String(const char *str)
|
/*! \fn QLatin1String::QLatin1String(const char *str)
|
||||||
|
@ -1069,13 +1069,13 @@ inline QT_ASCII_CAST_WARN bool operator==(const char *s1, const QString &s2)
|
|||||||
inline QT_ASCII_CAST_WARN bool operator!=(const char *s1, const QString &s2)
|
inline QT_ASCII_CAST_WARN bool operator!=(const char *s1, const QString &s2)
|
||||||
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) != 0; }
|
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) != 0; }
|
||||||
inline QT_ASCII_CAST_WARN bool operator<(const char *s1, const QString &s2)
|
inline QT_ASCII_CAST_WARN bool operator<(const char *s1, const QString &s2)
|
||||||
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) < 0; }
|
|
||||||
inline QT_ASCII_CAST_WARN bool operator>(const char *s1, const QString &s2)
|
|
||||||
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) > 0; }
|
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) > 0; }
|
||||||
|
inline QT_ASCII_CAST_WARN bool operator>(const char *s1, const QString &s2)
|
||||||
|
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) < 0; }
|
||||||
inline QT_ASCII_CAST_WARN bool operator<=(const char *s1, const QString &s2)
|
inline QT_ASCII_CAST_WARN bool operator<=(const char *s1, const QString &s2)
|
||||||
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) <= 0; }
|
|
||||||
inline QT_ASCII_CAST_WARN bool operator>=(const char *s1, const QString &s2)
|
|
||||||
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) >= 0; }
|
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) >= 0; }
|
||||||
|
inline QT_ASCII_CAST_WARN bool operator>=(const char *s1, const QString &s2)
|
||||||
|
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) <= 0; }
|
||||||
|
|
||||||
inline QT_ASCII_CAST_WARN bool operator==(const char *s1, QLatin1String s2)
|
inline QT_ASCII_CAST_WARN bool operator==(const char *s1, QLatin1String s2)
|
||||||
{ return QString::fromUtf8(s1) == s2; }
|
{ return QString::fromUtf8(s1) == s2; }
|
||||||
|
@ -254,7 +254,10 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef Q_CC_MSVC
|
#ifdef Q_CC_MSVC
|
||||||
# pragma warning ( disable : 4345 ) // behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
|
// behavior change: an object of POD type constructed with an initializer of the form ()
|
||||||
|
// will be default-initialized
|
||||||
|
# pragma warning ( push )
|
||||||
|
# pragma warning ( disable : 4345 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@ -270,7 +273,7 @@ void QVector<T>::defaultConstruct(T *from, T *to)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_CC_MSVC
|
#ifdef Q_CC_MSVC
|
||||||
# pragma warning ( default: 4345 )
|
# pragma warning ( pop )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
@ -128,12 +128,7 @@ QDBusMetaObjectGenerator::QDBusMetaObjectGenerator(const QString &interfaceName,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_DBUS_EXPORT bool qt_dbus_metaobject_skip_annotations = false;
|
static int registerComplexDBusType(const char *typeName)
|
||||||
|
|
||||||
QDBusMetaObjectGenerator::Type
|
|
||||||
QDBusMetaObjectGenerator::findType(const QByteArray &signature,
|
|
||||||
const QDBusIntrospection::Annotations &annotations,
|
|
||||||
const char *direction, int id)
|
|
||||||
{
|
{
|
||||||
struct QDBusRawTypeHandler {
|
struct QDBusRawTypeHandler {
|
||||||
static void destroy(void *)
|
static void destroy(void *)
|
||||||
@ -159,6 +154,22 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
return QMetaType::registerNormalizedType(typeName, QDBusRawTypeHandler::destroy,
|
||||||
|
QDBusRawTypeHandler::create,
|
||||||
|
QDBusRawTypeHandler::destruct,
|
||||||
|
QDBusRawTypeHandler::construct,
|
||||||
|
sizeof(void *),
|
||||||
|
QMetaType::MovableType,
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_DBUS_EXPORT bool qt_dbus_metaobject_skip_annotations = false;
|
||||||
|
|
||||||
|
QDBusMetaObjectGenerator::Type
|
||||||
|
QDBusMetaObjectGenerator::findType(const QByteArray &signature,
|
||||||
|
const QDBusIntrospection::Annotations &annotations,
|
||||||
|
const char *direction, int id)
|
||||||
|
{
|
||||||
Type result;
|
Type result;
|
||||||
result.id = QVariant::Invalid;
|
result.id = QVariant::Invalid;
|
||||||
|
|
||||||
@ -195,13 +206,7 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
|
|||||||
// type is still unknown or doesn't match back to the signature that it
|
// type is still unknown or doesn't match back to the signature that it
|
||||||
// was expected to, so synthesize a fake type
|
// was expected to, so synthesize a fake type
|
||||||
typeName = "QDBusRawType<0x" + signature.toHex() + ">*";
|
typeName = "QDBusRawType<0x" + signature.toHex() + ">*";
|
||||||
type = QMetaType::registerType(typeName, QDBusRawTypeHandler::destroy,
|
type = registerComplexDBusType(typeName);
|
||||||
QDBusRawTypeHandler::create,
|
|
||||||
QDBusRawTypeHandler::destruct,
|
|
||||||
QDBusRawTypeHandler::construct,
|
|
||||||
sizeof(void *),
|
|
||||||
QMetaType::MovableType,
|
|
||||||
0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
result.name = typeName;
|
result.name = typeName;
|
||||||
@ -217,7 +222,7 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
|
|||||||
type = QVariant::Map;
|
type = QVariant::Map;
|
||||||
} else {
|
} else {
|
||||||
result.name = "QDBusRawType::" + signature;
|
result.name = "QDBusRawType::" + signature;
|
||||||
type = -1;
|
type = registerComplexDBusType(result.name);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
result.name = QMetaType::typeName(type);
|
result.name = QMetaType::typeName(type);
|
||||||
|
@ -87,8 +87,6 @@ QAccessiblePlugin::~QAccessiblePlugin()
|
|||||||
|
|
||||||
Creates and returns a QAccessibleInterface implementation for the
|
Creates and returns a QAccessibleInterface implementation for the
|
||||||
class \a key and the object \a object. Keys are case sensitive.
|
class \a key and the object \a object. Keys are case sensitive.
|
||||||
|
|
||||||
\sa keys()
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -29,6 +29,9 @@ tagfile = ../../../doc/qtgui/qtgui.tags
|
|||||||
|
|
||||||
depends += \
|
depends += \
|
||||||
qtcore \
|
qtcore \
|
||||||
|
qtimageformats \
|
||||||
|
qtmacextras \
|
||||||
|
qtmultimedia \
|
||||||
qtnetwork \
|
qtnetwork \
|
||||||
qtopengl \
|
qtopengl \
|
||||||
qtsvg \
|
qtsvg \
|
||||||
|
@ -81,7 +81,7 @@ contains(QT_CONFIG, angle) {
|
|||||||
!isEmpty(QMAKE_LIBDIR_OPENGL_ES2): CMAKE_OPENGL_LIBDIR = $$cmakePortablePaths($$QMAKE_LIBDIR_OPENGL_ES2)
|
!isEmpty(QMAKE_LIBDIR_OPENGL_ES2): CMAKE_OPENGL_LIBDIR = $$cmakePortablePaths($$QMAKE_LIBDIR_OPENGL_ES2)
|
||||||
CMAKE_GL_HEADER_NAME = GLES2/gl2.h
|
CMAKE_GL_HEADER_NAME = GLES2/gl2.h
|
||||||
CMAKE_QT_OPENGL_IMPLEMENTATION = GLESv2
|
CMAKE_QT_OPENGL_IMPLEMENTATION = GLESv2
|
||||||
} else {
|
} else:contains(QT_CONFIG, opengl) {
|
||||||
!isEmpty(QMAKE_INCDIR_OPENGL): CMAKE_GL_INCDIRS = $$cmakeTargetPaths($$QMAKE_INCDIR_OPENGL)
|
!isEmpty(QMAKE_INCDIR_OPENGL): CMAKE_GL_INCDIRS = $$cmakeTargetPaths($$QMAKE_INCDIR_OPENGL)
|
||||||
CMAKE_OPENGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_OPENGL)
|
CMAKE_OPENGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_OPENGL)
|
||||||
CMAKE_OPENGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_OPENGL)
|
CMAKE_OPENGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_OPENGL)
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include "qicon_p.h"
|
#include "qicon_p.h"
|
||||||
#include "qiconengine.h"
|
#include "qiconengine.h"
|
||||||
#include "qiconengineplugin.h"
|
#include "qiconengineplugin.h"
|
||||||
|
#include "qimagereader.h"
|
||||||
#include "private/qfactoryloader_p.h"
|
#include "private/qfactoryloader_p.h"
|
||||||
#include "private/qiconloader_p.h"
|
#include "private/qiconloader_p.h"
|
||||||
#include "qpainter.h"
|
#include "qpainter.h"
|
||||||
@ -365,18 +366,20 @@ void QPixmapIconEngine::addPixmap(const QPixmap &pixmap, QIcon::Mode mode, QIcon
|
|||||||
void QPixmapIconEngine::addFile(const QString &fileName, const QSize &_size, QIcon::Mode mode, QIcon::State state)
|
void QPixmapIconEngine::addFile(const QString &fileName, const QSize &_size, QIcon::Mode mode, QIcon::State state)
|
||||||
{
|
{
|
||||||
if (!fileName.isEmpty()) {
|
if (!fileName.isEmpty()) {
|
||||||
QSize size = _size;
|
|
||||||
QPixmap pixmap;
|
|
||||||
|
|
||||||
QString abs = fileName;
|
QString abs = fileName;
|
||||||
if (fileName.at(0) != QLatin1Char(':'))
|
if (fileName.at(0) != QLatin1Char(':'))
|
||||||
abs = QFileInfo(fileName).absoluteFilePath();
|
abs = QFileInfo(fileName).absoluteFilePath();
|
||||||
|
QImageReader reader(abs);
|
||||||
|
|
||||||
|
do {
|
||||||
|
QSize size = _size;
|
||||||
|
QPixmap pixmap;
|
||||||
|
|
||||||
for (int i = 0; i < pixmaps.count(); ++i) {
|
for (int i = 0; i < pixmaps.count(); ++i) {
|
||||||
if (pixmaps.at(i).mode == mode && pixmaps.at(i).state == state) {
|
if (pixmaps.at(i).mode == mode && pixmaps.at(i).state == state) {
|
||||||
QPixmapIconEngineEntry *pe = &pixmaps[i];
|
QPixmapIconEngineEntry *pe = &pixmaps[i];
|
||||||
if (size == QSize()) {
|
if (size == QSize()) {
|
||||||
pixmap = QPixmap(abs);
|
pixmap.convertFromImage(reader.read());
|
||||||
size = pixmap.size();
|
size = pixmap.size();
|
||||||
}
|
}
|
||||||
if (pe->size == QSize() && pe->pixmap.isNull()) {
|
if (pe->size == QSize() && pe->pixmap.isNull()) {
|
||||||
@ -396,6 +399,7 @@ void QPixmapIconEngine::addFile(const QString &fileName, const QSize &_size, QIc
|
|||||||
QPixmapIconEngineEntry e(abs, size, mode, state);
|
QPixmapIconEngineEntry e(abs, size, mode, state);
|
||||||
e.pixmap = pixmap;
|
e.pixmap = pixmap;
|
||||||
pixmaps += e;
|
pixmaps += e;
|
||||||
|
} while (reader.jumpToNextImage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -519,10 +519,11 @@ QPixmap PixmapEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State st
|
|||||||
return cachedPixmap;
|
return cachedPixmap;
|
||||||
} else {
|
} else {
|
||||||
if (basePixmap.size() != actualSize)
|
if (basePixmap.size() != actualSize)
|
||||||
basePixmap = basePixmap.scaled(actualSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
cachedPixmap = basePixmap.scaled(actualSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||||
|
else
|
||||||
cachedPixmap = basePixmap;
|
cachedPixmap = basePixmap;
|
||||||
if (QGuiApplication *guiApp = qobject_cast<QGuiApplication *>(qApp))
|
if (QGuiApplication *guiApp = qobject_cast<QGuiApplication *>(qApp))
|
||||||
cachedPixmap = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(guiApp))->applyQIconStyleHelper(mode, basePixmap);
|
cachedPixmap = static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(guiApp))->applyQIconStyleHelper(mode, cachedPixmap);
|
||||||
QPixmapCache::insert(key, cachedPixmap);
|
QPixmapCache::insert(key, cachedPixmap);
|
||||||
}
|
}
|
||||||
return cachedPixmap;
|
return cachedPixmap;
|
||||||
|
@ -79,8 +79,6 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
Installs a QPictureIO picture I/O handler for the picture format \a
|
Installs a QPictureIO picture I/O handler for the picture format \a
|
||||||
format. Returns \c true on success.
|
format. Returns \c true on success.
|
||||||
|
|
||||||
\sa keys()
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,8 +95,6 @@ QGenericPlugin::~QGenericPlugin()
|
|||||||
Implement this function to create a driver matching the type
|
Implement this function to create a driver matching the type
|
||||||
specified by the given \a key and \a specification parameters. Note that
|
specified by the given \a key and \a specification parameters. Note that
|
||||||
keys are case-insensitive.
|
keys are case-insensitive.
|
||||||
|
|
||||||
\sa keys()
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
#include <QtCore/private/qthread_p.h>
|
#include <QtCore/private/qthread_p.h>
|
||||||
#include <QtCore/qdir.h>
|
#include <QtCore/qdir.h>
|
||||||
#include <QtCore/qlibraryinfo.h>
|
#include <QtCore/qlibraryinfo.h>
|
||||||
|
#include <QtCore/qnumeric.h>
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
#ifndef QT_NO_ACCESSIBILITY
|
#ifndef QT_NO_ACCESSIBILITY
|
||||||
#include "qaccessible.h"
|
#include "qaccessible.h"
|
||||||
@ -111,7 +112,7 @@ Q_GUI_EXPORT bool qt_is_gui_used = true;
|
|||||||
Qt::MouseButtons QGuiApplicationPrivate::mouse_buttons = Qt::NoButton;
|
Qt::MouseButtons QGuiApplicationPrivate::mouse_buttons = Qt::NoButton;
|
||||||
Qt::KeyboardModifiers QGuiApplicationPrivate::modifier_buttons = Qt::NoModifier;
|
Qt::KeyboardModifiers QGuiApplicationPrivate::modifier_buttons = Qt::NoModifier;
|
||||||
|
|
||||||
QPointF QGuiApplicationPrivate::lastCursorPosition(0.0, 0.0);
|
QPointF QGuiApplicationPrivate::lastCursorPosition(qInf(), qInf());
|
||||||
|
|
||||||
bool QGuiApplicationPrivate::tabletState = false;
|
bool QGuiApplicationPrivate::tabletState = false;
|
||||||
QWindow *QGuiApplicationPrivate::tabletPressTarget = 0;
|
QWindow *QGuiApplicationPrivate::tabletPressTarget = 0;
|
||||||
|
@ -79,8 +79,8 @@ QT_BEGIN_NAMESPACE
|
|||||||
QWindow directly. Still, it is possible to render directly to a QWindow
|
QWindow directly. Still, it is possible to render directly to a QWindow
|
||||||
with QBackingStore or QOpenGLContext, when wanting to keep dependencies to
|
with QBackingStore or QOpenGLContext, when wanting to keep dependencies to
|
||||||
a minimum or when wanting to use OpenGL directly. The
|
a minimum or when wanting to use OpenGL directly. The
|
||||||
\l{gui/rasterwindow}{Raster Window} and \l{gui/openglwindow}{OpenGL Window}
|
\l{Raster Window Example} and \l{OpenGL Window Example}
|
||||||
examples are useful reference examples for how to render to a QWindow using
|
are useful reference examples for how to render to a QWindow using
|
||||||
either approach.
|
either approach.
|
||||||
|
|
||||||
\section1 Resource management
|
\section1 Resource management
|
||||||
|
@ -432,9 +432,11 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi
|
|||||||
samples = 0;
|
samples = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef QT_OPENGL_ES_2
|
||||||
GLint maxSamples;
|
GLint maxSamples;
|
||||||
glGetIntegerv(GL_MAX_SAMPLES, &maxSamples);
|
glGetIntegerv(GL_MAX_SAMPLES, &maxSamples);
|
||||||
samples = qBound(0, int(samples), int(maxSamples));
|
samples = qBound(0, int(samples), int(maxSamples));
|
||||||
|
#endif
|
||||||
|
|
||||||
size = sz;
|
size = sz;
|
||||||
target = texture_target;
|
target = texture_target;
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qopengltexturecache_p.h"
|
#include "qopengltexturecache_p.h"
|
||||||
|
#include <qopenglfunctions.h>
|
||||||
#include <private/qopenglcontext_p.h>
|
#include <private/qopenglcontext_p.h>
|
||||||
#include <private/qimagepixmapcleanuphooks_p.h>
|
#include <private/qimagepixmapcleanuphooks_p.h>
|
||||||
#include <qpa/qplatformpixmap.h>
|
#include <qpa/qplatformpixmap.h>
|
||||||
@ -128,6 +129,20 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QPixmap &
|
|||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// returns the highest number closest to v, which is a power of 2
|
||||||
|
// NB! assumes 32 bit ints
|
||||||
|
static int qt_next_power_of_two(int v)
|
||||||
|
{
|
||||||
|
v--;
|
||||||
|
v |= v >> 1;
|
||||||
|
v |= v >> 2;
|
||||||
|
v |= v >> 4;
|
||||||
|
v |= v >> 8;
|
||||||
|
v |= v >> 16;
|
||||||
|
++v;
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QImage &image)
|
GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QImage &image)
|
||||||
{
|
{
|
||||||
if (image.isNull())
|
if (image.isNull())
|
||||||
@ -144,7 +159,19 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QImage &i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GLuint id = bindTexture(context, key, image);
|
QImage img = image;
|
||||||
|
if (!context->functions()->hasOpenGLFeature(QOpenGLFunctions::NPOTTextures)) {
|
||||||
|
// Scale the pixmap if needed. GL textures needs to have the
|
||||||
|
// dimensions 2^n+2(border) x 2^m+2(border), unless we're using GL
|
||||||
|
// 2.0 or use the GL_TEXTURE_RECTANGLE texture target
|
||||||
|
int tx_w = qt_next_power_of_two(image.width());
|
||||||
|
int tx_h = qt_next_power_of_two(image.height());
|
||||||
|
if (tx_w != image.width() || tx_h != image.height()) {
|
||||||
|
img = img.scaled(tx_w, tx_h);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GLuint id = bindTexture(context, key, img);
|
||||||
if (id > 0)
|
if (id > 0)
|
||||||
QImagePixmapCleanupHooks::enableCleanupHooks(image);
|
QImagePixmapCleanupHooks::enableCleanupHooks(image);
|
||||||
|
|
||||||
|
@ -199,7 +199,8 @@ static const HB_FontClass hb_fontClass = {
|
|||||||
static HB_Error hb_getSFntTable(void *font, HB_Tag tableTag, HB_Byte *buffer, HB_UInt *length)
|
static HB_Error hb_getSFntTable(void *font, HB_Tag tableTag, HB_Byte *buffer, HB_UInt *length)
|
||||||
{
|
{
|
||||||
QFontEngine *fe = (QFontEngine *)font;
|
QFontEngine *fe = (QFontEngine *)font;
|
||||||
if (!fe->getSfntTableData(tableTag, buffer, length))
|
Q_ASSERT(fe->faceData.get_font_table);
|
||||||
|
if (!fe->faceData.get_font_table(fe->faceData.user_data, tableTag, buffer, length))
|
||||||
return HB_Err_Invalid_Argument;
|
return HB_Err_Invalid_Argument;
|
||||||
return HB_Err_Ok;
|
return HB_Err_Ok;
|
||||||
}
|
}
|
||||||
@ -210,6 +211,13 @@ static void hb_freeFace(void *face)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static bool qt_get_font_table_default(void *user_data, uint tag, uchar *buffer, uint *length)
|
||||||
|
{
|
||||||
|
QFontEngine *fe = (QFontEngine *)user_data;
|
||||||
|
return fe->getSfntTableData(tag, buffer, length);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef QT_BUILD_INTERNAL
|
#ifdef QT_BUILD_INTERNAL
|
||||||
// for testing purpose only, not thread-safe!
|
// for testing purpose only, not thread-safe!
|
||||||
static QList<QFontEngine *> *enginesCollector = 0;
|
static QList<QFontEngine *> *enginesCollector = 0;
|
||||||
@ -238,6 +246,9 @@ QFontEngine::QFontEngine()
|
|||||||
font_(0), font_destroy_func(0),
|
font_(0), font_destroy_func(0),
|
||||||
face_(0), face_destroy_func(0)
|
face_(0), face_destroy_func(0)
|
||||||
{
|
{
|
||||||
|
faceData.user_data = this;
|
||||||
|
faceData.get_font_table = qt_get_font_table_default;
|
||||||
|
|
||||||
cache_cost = 0;
|
cache_cost = 0;
|
||||||
fsType = 0;
|
fsType = 0;
|
||||||
symbol = false;
|
symbol = false;
|
||||||
|
@ -116,6 +116,21 @@ QT_BEGIN_NAMESPACE
|
|||||||
#define TRUNC(x) ((x) >> 6)
|
#define TRUNC(x) ((x) >> 6)
|
||||||
#define ROUND(x) (((x)+32) & -64)
|
#define ROUND(x) (((x)+32) & -64)
|
||||||
|
|
||||||
|
static bool ft_getSfntTable(void *user_data, uint tag, uchar *buffer, uint *length)
|
||||||
|
{
|
||||||
|
FT_Face face = (FT_Face)user_data;
|
||||||
|
|
||||||
|
bool result = false;
|
||||||
|
if (FT_IS_SFNT(face)) {
|
||||||
|
FT_ULong len = *length;
|
||||||
|
result = FT_Load_Sfnt_Table(face, tag, 0, buffer, &len) == FT_Err_Ok;
|
||||||
|
*length = len;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// -------------------------- Freetype support ------------------------------
|
// -------------------------- Freetype support ------------------------------
|
||||||
|
|
||||||
class QtFreetypeData
|
class QtFreetypeData
|
||||||
@ -408,15 +423,7 @@ QFontEngine::Properties QFreetypeFace::properties() const
|
|||||||
|
|
||||||
bool QFreetypeFace::getSfntTable(uint tag, uchar *buffer, uint *length) const
|
bool QFreetypeFace::getSfntTable(uint tag, uchar *buffer, uint *length) const
|
||||||
{
|
{
|
||||||
bool result = false;
|
return ft_getSfntTable(face, tag, buffer, length);
|
||||||
#if (FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) > 20103
|
|
||||||
if (FT_IS_SFNT(face)) {
|
|
||||||
FT_ULong len = *length;
|
|
||||||
result = FT_Load_Sfnt_Table(face, tag, 0, buffer, &len) == FT_Err_Ok;
|
|
||||||
*length = len;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Some fonts (such as MingLiu rely on hinting to scale different
|
/* Some fonts (such as MingLiu rely on hinting to scale different
|
||||||
@ -761,6 +768,8 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format,
|
|||||||
fontDef.styleName = QString::fromUtf8(face->style_name);
|
fontDef.styleName = QString::fromUtf8(face->style_name);
|
||||||
|
|
||||||
if (!freetype->hbFace) {
|
if (!freetype->hbFace) {
|
||||||
|
faceData.user_data = face;
|
||||||
|
faceData.get_font_table = ft_getSfntTable;
|
||||||
freetype->hbFace = harfbuzzFace();
|
freetype->hbFace = harfbuzzFace();
|
||||||
freetype->hbFace_destroy_func = face_destroy_func;
|
freetype->hbFace_destroy_func = face_destroy_func;
|
||||||
} else {
|
} else {
|
||||||
@ -1179,7 +1188,7 @@ QFixed QFontEngineFT::emSquareSize() const
|
|||||||
|
|
||||||
bool QFontEngineFT::getSfntTableData(uint tag, uchar *buffer, uint *length) const
|
bool QFontEngineFT::getSfntTableData(uint tag, uchar *buffer, uint *length) const
|
||||||
{
|
{
|
||||||
return freetype->getSfntTable(tag, buffer, length);
|
return ft_getSfntTable(freetype->face, tag, buffer, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
int QFontEngineFT::synthesized() const
|
int QFontEngineFT::synthesized() const
|
||||||
|
@ -85,6 +85,7 @@ enum HB_Compat_Error {
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef void (*qt_destroy_func_t) (void *user_data);
|
typedef void (*qt_destroy_func_t) (void *user_data);
|
||||||
|
typedef bool (*qt_get_font_table_func_t) (void *user_data, uint tag, uchar *buffer, uint *length);
|
||||||
|
|
||||||
class Q_GUI_EXPORT QFontEngine
|
class Q_GUI_EXPORT QFontEngine
|
||||||
{
|
{
|
||||||
@ -279,6 +280,10 @@ public:
|
|||||||
mutable qt_destroy_func_t font_destroy_func;
|
mutable qt_destroy_func_t font_destroy_func;
|
||||||
mutable void *face_;
|
mutable void *face_;
|
||||||
mutable qt_destroy_func_t face_destroy_func;
|
mutable qt_destroy_func_t face_destroy_func;
|
||||||
|
struct FaceData {
|
||||||
|
void *user_data;
|
||||||
|
qt_get_font_table_func_t get_font_table;
|
||||||
|
} faceData;
|
||||||
|
|
||||||
uint cache_cost; // amount of mem used in kb by the font
|
uint cache_cost; // amount of mem used in kb by the font
|
||||||
uint fsType : 16;
|
uint fsType : 16;
|
||||||
|
@ -616,19 +616,22 @@ hb_font_funcs_t *hb_qt_get_font_funcs()
|
|||||||
|
|
||||||
|
|
||||||
static hb_blob_t *
|
static hb_blob_t *
|
||||||
_hb_qt_get_font_table(hb_face_t * /*face*/, hb_tag_t tag, void *user_data)
|
_hb_qt_reference_table(hb_face_t * /*face*/, hb_tag_t tag, void *user_data)
|
||||||
{
|
{
|
||||||
QFontEngine *fe = (QFontEngine *)user_data;
|
QFontEngine::FaceData *data = (QFontEngine::FaceData *)user_data;
|
||||||
Q_ASSERT(fe);
|
Q_ASSERT(data);
|
||||||
|
|
||||||
|
qt_get_font_table_func_t get_font_table = data->get_font_table;
|
||||||
|
Q_ASSERT(get_font_table);
|
||||||
|
|
||||||
uint length = 0;
|
uint length = 0;
|
||||||
if (Q_UNLIKELY(!fe->getSfntTableData(tag, 0, &length) || length == 0))
|
if (Q_UNLIKELY(!get_font_table(data->user_data, tag, 0, &length) || length == 0))
|
||||||
return hb_blob_get_empty();
|
return hb_blob_get_empty();
|
||||||
|
|
||||||
char *buffer = (char *)malloc(length);
|
char *buffer = (char *)malloc(length);
|
||||||
Q_CHECK_PTR(buffer);
|
Q_CHECK_PTR(buffer);
|
||||||
|
|
||||||
if (Q_UNLIKELY(!fe->getSfntTableData(tag, reinterpret_cast<uchar *>(buffer), &length)))
|
if (Q_UNLIKELY(!get_font_table(data->user_data, tag, reinterpret_cast<uchar *>(buffer), &length)))
|
||||||
length = 0;
|
length = 0;
|
||||||
|
|
||||||
return hb_blob_create(const_cast<const char *>(buffer), length,
|
return hb_blob_create(const_cast<const char *>(buffer), length,
|
||||||
@ -639,9 +642,14 @@ _hb_qt_get_font_table(hb_face_t * /*face*/, hb_tag_t tag, void *user_data)
|
|||||||
static inline hb_face_t *
|
static inline hb_face_t *
|
||||||
_hb_qt_face_create(QFontEngine *fe)
|
_hb_qt_face_create(QFontEngine *fe)
|
||||||
{
|
{
|
||||||
hb_face_t *face;
|
Q_ASSERT(fe);
|
||||||
|
|
||||||
face = hb_face_create_for_tables(_hb_qt_get_font_table, (void *)fe, NULL);
|
QFontEngine::FaceData *data = (QFontEngine::FaceData *)malloc(sizeof(QFontEngine::FaceData));
|
||||||
|
Q_CHECK_PTR(data);
|
||||||
|
data->user_data = fe->faceData.user_data;
|
||||||
|
data->get_font_table = fe->faceData.get_font_table;
|
||||||
|
|
||||||
|
hb_face_t *face = hb_face_create_for_tables(_hb_qt_reference_table, (void *)data, free);
|
||||||
if (Q_UNLIKELY(hb_face_is_immutable(face))) {
|
if (Q_UNLIKELY(hb_face_is_immutable(face))) {
|
||||||
hb_face_destroy(face);
|
hb_face_destroy(face);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1879,8 +1879,10 @@ QFontEngine *QTextEngine::fontEngine(const QScriptItem &si, QFixed *ascent, QFix
|
|||||||
feCache.prevFontEngine = engine;
|
feCache.prevFontEngine = engine;
|
||||||
feCache.prevScript = script;
|
feCache.prevScript = script;
|
||||||
engine->ref.ref();
|
engine->ref.ref();
|
||||||
if (feCache.prevScaledFontEngine)
|
if (feCache.prevScaledFontEngine) {
|
||||||
releaseCachedFontEngine(feCache.prevScaledFontEngine);
|
releaseCachedFontEngine(feCache.prevScaledFontEngine);
|
||||||
|
feCache.prevScaledFontEngine = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (si.analysis.flags & QFont::SmallCaps) {
|
if (si.analysis.flags & QFont::SmallCaps) {
|
||||||
if (feCache.prevScaledFontEngine) {
|
if (feCache.prevScaledFontEngine) {
|
||||||
|
@ -224,12 +224,7 @@ static void ensureInitialized()
|
|||||||
\note The network and roaming support in QNetworkAccessManager is conditional
|
\note The network and roaming support in QNetworkAccessManager is conditional
|
||||||
upon the platform supporting connection management. The
|
upon the platform supporting connection management. The
|
||||||
\l QNetworkConfigurationManager::NetworkSessionRequired can be used to
|
\l QNetworkConfigurationManager::NetworkSessionRequired can be used to
|
||||||
detect whether QNetworkAccessManager utilizes this feature. Currently only
|
detect whether QNetworkAccessManager utilizes this feature.
|
||||||
Meego/Harmattan platforms provide connection management support.
|
|
||||||
|
|
||||||
\note This feature cannot be used in combination with the Bearer Management
|
|
||||||
API as provided by QtMobility. Applications have to migrate to the Qt version
|
|
||||||
of Bearer Management.
|
|
||||||
|
|
||||||
\sa QNetworkRequest, QNetworkReply, QNetworkProxy
|
\sa QNetworkRequest, QNetworkReply, QNetworkProxy
|
||||||
*/
|
*/
|
||||||
|
@ -559,6 +559,20 @@ qint64 QNetworkDiskCache::expire()
|
|||||||
break;
|
break;
|
||||||
QString name = i.value();
|
QString name = i.value();
|
||||||
QFile file(name);
|
QFile file(name);
|
||||||
|
|
||||||
|
if (name.contains(PREPARED_SLASH)) {
|
||||||
|
QHashIterator<QIODevice*, QCacheItem*> iterator(d->inserting);
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
iterator.next();
|
||||||
|
QCacheItem *item = iterator.value();
|
||||||
|
if (item && item->file && item->file->fileName() == name) {
|
||||||
|
delete item->file;
|
||||||
|
item->file = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
qint64 size = file.size();
|
qint64 size = file.size();
|
||||||
file.remove();
|
file.remove();
|
||||||
totalSize -= size;
|
totalSize -= size;
|
||||||
|
@ -161,6 +161,8 @@ void QNetworkReplyFileImpl::abort()
|
|||||||
qint64 QNetworkReplyFileImpl::bytesAvailable() const
|
qint64 QNetworkReplyFileImpl::bytesAvailable() const
|
||||||
{
|
{
|
||||||
Q_D(const QNetworkReplyFileImpl);
|
Q_D(const QNetworkReplyFileImpl);
|
||||||
|
if (!d->realFile.isOpen())
|
||||||
|
return QNetworkReply::bytesAvailable();
|
||||||
return QNetworkReply::bytesAvailable() + d->realFile.bytesAvailable();
|
return QNetworkReply::bytesAvailable() + d->realFile.bytesAvailable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,7 +183,11 @@ qint64 QNetworkReplyFileImpl::size() const
|
|||||||
qint64 QNetworkReplyFileImpl::readData(char *data, qint64 maxlen)
|
qint64 QNetworkReplyFileImpl::readData(char *data, qint64 maxlen)
|
||||||
{
|
{
|
||||||
Q_D(QNetworkReplyFileImpl);
|
Q_D(QNetworkReplyFileImpl);
|
||||||
|
if (!d->realFile.isOpen())
|
||||||
|
return -1;
|
||||||
qint64 ret = d->realFile.read(data, maxlen);
|
qint64 ret = d->realFile.read(data, maxlen);
|
||||||
|
if (bytesAvailable() == 0 && d->realFile.isOpen())
|
||||||
|
d->realFile.close();
|
||||||
if (ret == 0 && bytesAvailable() == 0)
|
if (ret == 0 && bytesAvailable() == 0)
|
||||||
return -1;
|
return -1;
|
||||||
else
|
else
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
#include <arpa/nameser_compat.h>
|
#include <arpa/nameser_compat.h>
|
||||||
#include <resolv.h>
|
#include <resolv.h>
|
||||||
|
|
||||||
#ifdef __GNU_LIBRARY__
|
#if defined(__GNU_LIBRARY__) && !defined(__UCLIBC__)
|
||||||
# include <gnu/lib-names.h>
|
# include <gnu/lib-names.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
# include <resolv.h>
|
# include <resolv.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __GNU_LIBRARY__
|
#if defined(__GNU_LIBRARY__) && !defined(__UCLIBC__)
|
||||||
# include <gnu/lib-names.h>
|
# include <gnu/lib-names.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2221,7 +2221,7 @@ bool QAbstractSocket::waitForBytesWritten(int msecs)
|
|||||||
if (readyToWrite) {
|
if (readyToWrite) {
|
||||||
if (d->canWriteNotification()) {
|
if (d->canWriteNotification()) {
|
||||||
#if defined (QABSTRACTSOCKET_DEBUG)
|
#if defined (QABSTRACTSOCKET_DEBUG)
|
||||||
qDebug("QAbstractSocket::waitForBytesWritten returns \c true");
|
qDebug("QAbstractSocket::waitForBytesWritten returns true");
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -33,9 +33,8 @@
|
|||||||
|
|
||||||
\image opengl-examples.png
|
\image opengl-examples.png
|
||||||
|
|
||||||
These examples describe how to use the Qt OpenGL Module. For new code,
|
These examples describe how to use the \l {Qt OpenGL} module. For new code,
|
||||||
please use the OpenGL classes in the \l {Qt GUI Module}.
|
please use the OpenGL classes in the \l {Qt GUI} module.
|
||||||
|
|
||||||
|
|
||||||
Qt provides support for integration with OpenGL implementations on all
|
Qt provides support for integration with OpenGL implementations on all
|
||||||
platforms, giving developers the opportunity to display hardware accelerated
|
platforms, giving developers the opportunity to display hardware accelerated
|
||||||
|
@ -554,7 +554,6 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
|
|||||||
&& funcs.hasOpenGLExtension(QOpenGLExtensions::PackedDepthStencil)) {
|
&& funcs.hasOpenGLExtension(QOpenGLExtensions::PackedDepthStencil)) {
|
||||||
// depth and stencil buffer needs another extension
|
// depth and stencil buffer needs another extension
|
||||||
funcs.glGenRenderbuffers(1, &depth_buffer);
|
funcs.glGenRenderbuffers(1, &depth_buffer);
|
||||||
Q_ASSERT(!funcs.glIsRenderbuffer(depth_buffer));
|
|
||||||
funcs.glBindRenderbuffer(GL_RENDERBUFFER, depth_buffer);
|
funcs.glBindRenderbuffer(GL_RENDERBUFFER, depth_buffer);
|
||||||
Q_ASSERT(funcs.glIsRenderbuffer(depth_buffer));
|
Q_ASSERT(funcs.glIsRenderbuffer(depth_buffer));
|
||||||
if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample))
|
if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample))
|
||||||
@ -581,7 +580,6 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
|
|||||||
|| (attachment == QGLFramebufferObject::Depth)))
|
|| (attachment == QGLFramebufferObject::Depth)))
|
||||||
{
|
{
|
||||||
funcs.glGenRenderbuffers(1, &depth_buffer);
|
funcs.glGenRenderbuffers(1, &depth_buffer);
|
||||||
Q_ASSERT(!funcs.glIsRenderbuffer(depth_buffer));
|
|
||||||
funcs.glBindRenderbuffer(GL_RENDERBUFFER, depth_buffer);
|
funcs.glBindRenderbuffer(GL_RENDERBUFFER, depth_buffer);
|
||||||
Q_ASSERT(funcs.glIsRenderbuffer(depth_buffer));
|
Q_ASSERT(funcs.glIsRenderbuffer(depth_buffer));
|
||||||
if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)) {
|
if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)) {
|
||||||
@ -621,7 +619,6 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
|
|||||||
|
|
||||||
if (stencil_buffer == 0 && (attachment == QGLFramebufferObject::CombinedDepthStencil)) {
|
if (stencil_buffer == 0 && (attachment == QGLFramebufferObject::CombinedDepthStencil)) {
|
||||||
funcs.glGenRenderbuffers(1, &stencil_buffer);
|
funcs.glGenRenderbuffers(1, &stencil_buffer);
|
||||||
Q_ASSERT(!funcs.glIsRenderbuffer(stencil_buffer));
|
|
||||||
funcs.glBindRenderbuffer(GL_RENDERBUFFER, stencil_buffer);
|
funcs.glBindRenderbuffer(GL_RENDERBUFFER, stencil_buffer);
|
||||||
Q_ASSERT(funcs.glIsRenderbuffer(stencil_buffer));
|
Q_ASSERT(funcs.glIsRenderbuffer(stencil_buffer));
|
||||||
if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)) {
|
if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)) {
|
||||||
@ -779,7 +776,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
|
|||||||
|
|
||||||
\note This class has been deprecated in favor of QOpenGLFramebufferObject.
|
\note This class has been deprecated in favor of QOpenGLFramebufferObject.
|
||||||
|
|
||||||
\sa {Framebuffer Object Example}
|
\sa {Framebuffer Object 2 Example}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@
|
|||||||
Pbuffers are provided by the OpenGL \c pbuffer extension; call
|
Pbuffers are provided by the OpenGL \c pbuffer extension; call
|
||||||
hasOpenGLPbuffer() to find out if the system provides pbuffers.
|
hasOpenGLPbuffer() to find out if the system provides pbuffers.
|
||||||
|
|
||||||
\sa {opengl/pbuffers}{Pbuffers Example}
|
\sa {Pixel Buffers Example}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <private/qopenglextensions_p.h>
|
#include <private/qopenglextensions_p.h>
|
||||||
|
@ -102,24 +102,28 @@ QDeviceDiscovery::~QDeviceDiscovery()
|
|||||||
QStringList QDeviceDiscovery::scanConnectedDevices()
|
QStringList QDeviceDiscovery::scanConnectedDevices()
|
||||||
{
|
{
|
||||||
QStringList devices;
|
QStringList devices;
|
||||||
|
QDir dir;
|
||||||
// check for input devices
|
|
||||||
QDir dir(QString::fromLatin1(QT_EVDEV_DEVICE_PATH));
|
|
||||||
dir.setFilter(QDir::System);
|
dir.setFilter(QDir::System);
|
||||||
|
|
||||||
|
// check for input devices
|
||||||
|
if (m_types & Device_InputMask) {
|
||||||
|
dir.setPath(QString::fromLatin1(QT_EVDEV_DEVICE_PATH));
|
||||||
foreach (const QString &deviceFile, dir.entryList()) {
|
foreach (const QString &deviceFile, dir.entryList()) {
|
||||||
QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
|
QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
|
||||||
if (checkDeviceType(absoluteFilePath))
|
if (checkDeviceType(absoluteFilePath))
|
||||||
devices << absoluteFilePath;
|
devices << absoluteFilePath;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// check for drm devices
|
// check for drm devices
|
||||||
|
if (m_types & Device_VideoMask) {
|
||||||
dir.setPath(QString::fromLatin1(QT_DRM_DEVICE_PATH));
|
dir.setPath(QString::fromLatin1(QT_DRM_DEVICE_PATH));
|
||||||
foreach (const QString &deviceFile, dir.entryList()) {
|
foreach (const QString &deviceFile, dir.entryList()) {
|
||||||
QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
|
QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
|
||||||
if (checkDeviceType(absoluteFilePath))
|
if (checkDeviceType(absoluteFilePath))
|
||||||
devices << absoluteFilePath;
|
devices << absoluteFilePath;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef QT_QPA_DEVICE_DISCOVERY_DEBUG
|
#ifdef QT_QPA_DEVICE_DISCOVERY_DEBUG
|
||||||
qWarning() << "DeviceDiscovery found matching devices" << devices;
|
qWarning() << "DeviceDiscovery found matching devices" << devices;
|
||||||
|
@ -157,10 +157,12 @@ void QEvdevTouchScreenData::registerDevice()
|
|||||||
#define LONG_BITS (sizeof(long) << 3)
|
#define LONG_BITS (sizeof(long) << 3)
|
||||||
#define NUM_LONGS(bits) (((bits) + LONG_BITS - 1) / LONG_BITS)
|
#define NUM_LONGS(bits) (((bits) + LONG_BITS - 1) / LONG_BITS)
|
||||||
|
|
||||||
|
#if defined(QT_NO_MTDEV)
|
||||||
static inline bool testBit(long bit, const long *array)
|
static inline bool testBit(long bit, const long *array)
|
||||||
{
|
{
|
||||||
return (array[bit / LONG_BITS] >> bit % LONG_BITS) & 1;
|
return (array[bit / LONG_BITS] >> bit % LONG_BITS) & 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &specification, QObject *parent)
|
QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &specification, QObject *parent)
|
||||||
: QObject(parent), m_notify(0), m_fd(-1), d(0)
|
: QObject(parent), m_notify(0), m_fd(-1), d(0)
|
||||||
@ -345,19 +347,50 @@ QEvdevTouchScreenHandler::~QEvdevTouchScreenHandler()
|
|||||||
void QEvdevTouchScreenHandler::readData()
|
void QEvdevTouchScreenHandler::readData()
|
||||||
{
|
{
|
||||||
::input_event buffer[32];
|
::input_event buffer[32];
|
||||||
|
int events = 0;
|
||||||
|
|
||||||
|
#if !defined(QT_NO_MTDEV)
|
||||||
|
forever {
|
||||||
|
do {
|
||||||
|
events = mtdev_get(m_mtdev, m_fd, buffer, sizeof(buffer) / sizeof(::input_event));
|
||||||
|
// keep trying mtdev_get if we get interrupted. note that we do not
|
||||||
|
// (and should not) handle EAGAIN; EAGAIN means that reading would
|
||||||
|
// block and we'll get back here later to try again anyway.
|
||||||
|
} while (events == -1 && errno == EINTR);
|
||||||
|
|
||||||
|
// 0 events is EOF, -1 means error, handle both in the same place
|
||||||
|
if (events <= 0)
|
||||||
|
goto err;
|
||||||
|
|
||||||
|
// process our shiny new events
|
||||||
|
for (int i = 0; i < events; ++i)
|
||||||
|
d->processInputEvent(&buffer[i]);
|
||||||
|
|
||||||
|
// and try to get more
|
||||||
|
}
|
||||||
|
#else
|
||||||
int n = 0;
|
int n = 0;
|
||||||
for (; ;) {
|
for (; ;) {
|
||||||
#if !defined(QT_NO_MTDEV)
|
events = QT_READ(m_fd, reinterpret_cast<char*>(buffer) + n, sizeof(buffer) - n);
|
||||||
int result = mtdev_get(m_mtdev, m_fd, buffer, sizeof(buffer) / sizeof(::input_event));
|
if (events <= 0)
|
||||||
if (result > 0)
|
goto err;
|
||||||
result *= sizeof(::input_event);
|
n += events;
|
||||||
#else
|
if (n % sizeof(::input_event) == 0)
|
||||||
int result = QT_READ(m_fd, reinterpret_cast<char*>(buffer) + n, sizeof(buffer) - n);
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
n /= sizeof(::input_event);
|
||||||
|
|
||||||
|
for (int i = 0; i < n; ++i)
|
||||||
|
d->processInputEvent(&buffer[i]);
|
||||||
#endif
|
#endif
|
||||||
if (!result) {
|
return;
|
||||||
|
|
||||||
|
err:
|
||||||
|
if (!events) {
|
||||||
qWarning("evdevtouch: Got EOF from input device");
|
qWarning("evdevtouch: Got EOF from input device");
|
||||||
return;
|
return;
|
||||||
} else if (result < 0) {
|
} else if (events < 0) {
|
||||||
if (errno != EINTR && errno != EAGAIN) {
|
if (errno != EINTR && errno != EAGAIN) {
|
||||||
qErrnoWarning(errno, "evdevtouch: Could not read from input device");
|
qErrnoWarning(errno, "evdevtouch: Could not read from input device");
|
||||||
if (errno == ENODEV) { // device got disconnected -> stop reading
|
if (errno == ENODEV) { // device got disconnected -> stop reading
|
||||||
@ -368,19 +401,9 @@ void QEvdevTouchScreenHandler::readData()
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
n += result;
|
|
||||||
if (n % sizeof(::input_event) == 0)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
n /= sizeof(::input_event);
|
|
||||||
|
|
||||||
for (int i = 0; i < n; ++i)
|
|
||||||
d->processInputEvent(&buffer[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QEvdevTouchScreenData::addTouchPoint(const Contact &contact, Qt::TouchPointStates *combinedStates)
|
void QEvdevTouchScreenData::addTouchPoint(const Contact &contact, Qt::TouchPointStates *combinedStates)
|
||||||
{
|
{
|
||||||
QWindowSystemInterface::TouchPoint tp;
|
QWindowSystemInterface::TouchPoint tp;
|
||||||
@ -412,20 +435,32 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
|
|||||||
|
|
||||||
if (data->code == ABS_MT_POSITION_X || (m_singleTouch && data->code == ABS_X)) {
|
if (data->code == ABS_MT_POSITION_X || (m_singleTouch && data->code == ABS_X)) {
|
||||||
m_currentData.x = qBound(hw_range_x_min, data->value, hw_range_x_max);
|
m_currentData.x = qBound(hw_range_x_min, data->value, hw_range_x_max);
|
||||||
if (m_typeB || m_singleTouch)
|
if (m_singleTouch)
|
||||||
m_contacts[m_currentSlot].x = m_currentData.x;
|
m_contacts[m_currentSlot].x = m_currentData.x;
|
||||||
|
if (m_typeB) {
|
||||||
|
m_contacts[m_currentSlot].x = m_currentData.x;
|
||||||
|
if (m_contacts[m_currentSlot].state == Qt::TouchPointStationary)
|
||||||
|
m_contacts[m_currentSlot].state = Qt::TouchPointMoved;
|
||||||
|
}
|
||||||
} else if (data->code == ABS_MT_POSITION_Y || (m_singleTouch && data->code == ABS_Y)) {
|
} else if (data->code == ABS_MT_POSITION_Y || (m_singleTouch && data->code == ABS_Y)) {
|
||||||
m_currentData.y = qBound(hw_range_y_min, data->value, hw_range_y_max);
|
m_currentData.y = qBound(hw_range_y_min, data->value, hw_range_y_max);
|
||||||
if (m_typeB || m_singleTouch)
|
if (m_singleTouch)
|
||||||
m_contacts[m_currentSlot].y = m_currentData.y;
|
m_contacts[m_currentSlot].y = m_currentData.y;
|
||||||
|
if (m_typeB) {
|
||||||
|
m_contacts[m_currentSlot].y = m_currentData.y;
|
||||||
|
if (m_contacts[m_currentSlot].state == Qt::TouchPointStationary)
|
||||||
|
m_contacts[m_currentSlot].state = Qt::TouchPointMoved;
|
||||||
|
}
|
||||||
} else if (data->code == ABS_MT_TRACKING_ID) {
|
} else if (data->code == ABS_MT_TRACKING_ID) {
|
||||||
m_currentData.trackingId = data->value;
|
m_currentData.trackingId = data->value;
|
||||||
if (m_typeB) {
|
if (m_typeB) {
|
||||||
if (m_currentData.trackingId == -1)
|
if (m_currentData.trackingId == -1) {
|
||||||
m_contacts[m_currentSlot].state = Qt::TouchPointReleased;
|
m_contacts[m_currentSlot].state = Qt::TouchPointReleased;
|
||||||
else
|
} else {
|
||||||
|
m_contacts[m_currentSlot].state = Qt::TouchPointPressed;
|
||||||
m_contacts[m_currentSlot].trackingId = m_currentData.trackingId;
|
m_contacts[m_currentSlot].trackingId = m_currentData.trackingId;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (data->code == ABS_MT_TOUCH_MAJOR) {
|
} else if (data->code == ABS_MT_TOUCH_MAJOR) {
|
||||||
m_currentData.maj = data->value;
|
m_currentData.maj = data->value;
|
||||||
if (data->value == 0)
|
if (data->value == 0)
|
||||||
@ -468,8 +503,11 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
|
|||||||
it.next();
|
it.next();
|
||||||
Contact &contact(it.value());
|
Contact &contact(it.value());
|
||||||
|
|
||||||
|
if (!contact.state)
|
||||||
|
continue;
|
||||||
|
|
||||||
int key = m_typeB ? it.key() : contact.trackingId;
|
int key = m_typeB ? it.key() : contact.trackingId;
|
||||||
if (m_lastContacts.contains(key)) {
|
if (!m_typeB && m_lastContacts.contains(key)) {
|
||||||
const Contact &prev(m_lastContacts.value(key));
|
const Contact &prev(m_lastContacts.value(key));
|
||||||
if (contact.state == Qt::TouchPointReleased) {
|
if (contact.state == Qt::TouchPointReleased) {
|
||||||
// Copy over the previous values for released points, just in case.
|
// Copy over the previous values for released points, just in case.
|
||||||
@ -483,7 +521,7 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Avoid reporting a contact in released state more than once.
|
// Avoid reporting a contact in released state more than once.
|
||||||
if (contact.state == Qt::TouchPointReleased
|
if (!m_typeB && contact.state == Qt::TouchPointReleased
|
||||||
&& !m_lastContacts.contains(key)) {
|
&& !m_lastContacts.contains(key)) {
|
||||||
it.remove();
|
it.remove();
|
||||||
continue;
|
continue;
|
||||||
@ -509,8 +547,14 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
|
|||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
it.next();
|
it.next();
|
||||||
Contact &contact(it.value());
|
Contact &contact(it.value());
|
||||||
if (contact.state == Qt::TouchPointReleased)
|
if (contact.state == Qt::TouchPointReleased) {
|
||||||
|
if (m_typeB)
|
||||||
|
contact.state = static_cast<Qt::TouchPointState>(0);
|
||||||
|
else
|
||||||
it.remove();
|
it.remove();
|
||||||
|
} else {
|
||||||
|
contact.state = Qt::TouchPointStationary;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lastContacts = m_contacts;
|
m_lastContacts = m_contacts;
|
||||||
|
@ -61,17 +61,12 @@ quint64 spiStatesFromQState(QAccessible::State state)
|
|||||||
{
|
{
|
||||||
quint64 spiState = 0;
|
quint64 spiState = 0;
|
||||||
|
|
||||||
|
if (state.editable)
|
||||||
setSpiStateBit(&spiState, ATSPI_STATE_EDITABLE);
|
setSpiStateBit(&spiState, ATSPI_STATE_EDITABLE);
|
||||||
|
if (!state.disabled) {
|
||||||
setSpiStateBit(&spiState, ATSPI_STATE_ENABLED);
|
setSpiStateBit(&spiState, ATSPI_STATE_ENABLED);
|
||||||
setSpiStateBit(&spiState, ATSPI_STATE_SHOWING);
|
|
||||||
setSpiStateBit(&spiState, ATSPI_STATE_VISIBLE);
|
|
||||||
setSpiStateBit(&spiState, ATSPI_STATE_SENSITIVE);
|
setSpiStateBit(&spiState, ATSPI_STATE_SENSITIVE);
|
||||||
|
|
||||||
if (state.disabled) {
|
|
||||||
unsetSpiStateBit(&spiState, ATSPI_STATE_ENABLED);
|
|
||||||
unsetSpiStateBit(&spiState, ATSPI_STATE_SENSITIVE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.selected)
|
if (state.selected)
|
||||||
setSpiStateBit(&spiState, ATSPI_STATE_SELECTED);
|
setSpiStateBit(&spiState, ATSPI_STATE_SELECTED);
|
||||||
if (state.focused)
|
if (state.focused)
|
||||||
@ -95,9 +90,9 @@ quint64 spiStatesFromQState(QAccessible::State state)
|
|||||||
setSpiStateBit(&spiState, ATSPI_STATE_BUSY);
|
setSpiStateBit(&spiState, ATSPI_STATE_BUSY);
|
||||||
if (state.marqueed || state.animated)
|
if (state.marqueed || state.animated)
|
||||||
setSpiStateBit(&spiState, ATSPI_STATE_ANIMATED);
|
setSpiStateBit(&spiState, ATSPI_STATE_ANIMATED);
|
||||||
if (state.invisible || state.offscreen) {
|
if (!state.invisible && !state.offscreen) {
|
||||||
unsetSpiStateBit(&spiState, ATSPI_STATE_SHOWING);
|
setSpiStateBit(&spiState, ATSPI_STATE_SHOWING);
|
||||||
unsetSpiStateBit(&spiState, ATSPI_STATE_VISIBLE);
|
setSpiStateBit(&spiState, ATSPI_STATE_VISIBLE);
|
||||||
}
|
}
|
||||||
if (state.sizeable)
|
if (state.sizeable)
|
||||||
setSpiStateBit(&spiState, ATSPI_STATE_RESIZABLE);
|
setSpiStateBit(&spiState, ATSPI_STATE_RESIZABLE);
|
||||||
@ -118,10 +113,8 @@ quint64 spiStatesFromQState(QAccessible::State state)
|
|||||||
// if (state.HasPopup)
|
// if (state.HasPopup)
|
||||||
if (state.modal)
|
if (state.modal)
|
||||||
setSpiStateBit(&spiState, ATSPI_STATE_MODAL);
|
setSpiStateBit(&spiState, ATSPI_STATE_MODAL);
|
||||||
|
if (state.multiLine)
|
||||||
// Not implemented in Qt
|
setSpiStateBit(&spiState, ATSPI_STATE_MULTI_LINE);
|
||||||
// if (state.singleLine)
|
|
||||||
// setSpiStateBit(&spiState, ATSPI_STATE_SINGLE_LINE);
|
|
||||||
|
|
||||||
return spiState;
|
return spiState;
|
||||||
}
|
}
|
||||||
|
@ -318,19 +318,23 @@ void QKdeThemePrivate::readKdeSystemPalette(const QSettings &kdeSettings, QPalet
|
|||||||
const QBrush buttonBrushDark = QBrush(button.darker(v > 128 ? 200 : 50));
|
const QBrush buttonBrushDark = QBrush(button.darker(v > 128 ? 200 : 50));
|
||||||
const QBrush buttonBrushDark150 = QBrush(button.darker(v > 128 ? 150 : 75));
|
const QBrush buttonBrushDark150 = QBrush(button.darker(v > 128 ? 150 : 75));
|
||||||
const QBrush buttonBrushLight150 = QBrush(button.lighter(v > 128 ? 150 : 75));
|
const QBrush buttonBrushLight150 = QBrush(button.lighter(v > 128 ? 150 : 75));
|
||||||
|
const QBrush buttonBrushLight = QBrush(button.lighter(v > 128 ? 200 : 50));
|
||||||
|
|
||||||
pal->setBrush(QPalette::Disabled, QPalette::WindowText, buttonBrushDark);
|
pal->setBrush(QPalette::Disabled, QPalette::WindowText, buttonBrushDark);
|
||||||
pal->setBrush(QPalette::Disabled, QPalette::ButtonText, buttonBrushDark);
|
pal->setBrush(QPalette::Disabled, QPalette::ButtonText, buttonBrushDark);
|
||||||
pal->setBrush(QPalette::Disabled, QPalette::Button, buttonBrush);
|
pal->setBrush(QPalette::Disabled, QPalette::Button, buttonBrush);
|
||||||
pal->setBrush(QPalette::Disabled, QPalette::Light, buttonBrushLight150);
|
|
||||||
pal->setBrush(QPalette::Disabled, QPalette::Dark, buttonBrushDark);
|
|
||||||
pal->setBrush(QPalette::Disabled, QPalette::Mid, buttonBrushDark150);
|
|
||||||
pal->setBrush(QPalette::Disabled, QPalette::Text, buttonBrushDark);
|
pal->setBrush(QPalette::Disabled, QPalette::Text, buttonBrushDark);
|
||||||
pal->setBrush(QPalette::Disabled, QPalette::BrightText, whiteBrush);
|
pal->setBrush(QPalette::Disabled, QPalette::BrightText, whiteBrush);
|
||||||
pal->setBrush(QPalette::Disabled, QPalette::Base, buttonBrush);
|
pal->setBrush(QPalette::Disabled, QPalette::Base, buttonBrush);
|
||||||
pal->setBrush(QPalette::Disabled, QPalette::Window, buttonBrush);
|
pal->setBrush(QPalette::Disabled, QPalette::Window, buttonBrush);
|
||||||
pal->setBrush(QPalette::Disabled, QPalette::Highlight, buttonBrushDark150);
|
pal->setBrush(QPalette::Disabled, QPalette::Highlight, buttonBrushDark150);
|
||||||
pal->setBrush(QPalette::Disabled, QPalette::HighlightedText, buttonBrushLight150);
|
pal->setBrush(QPalette::Disabled, QPalette::HighlightedText, buttonBrushLight150);
|
||||||
|
|
||||||
|
// set calculated colors for all groups
|
||||||
|
pal->setBrush(QPalette::Light, buttonBrushLight);
|
||||||
|
pal->setBrush(QPalette::Midlight, buttonBrushLight150);
|
||||||
|
pal->setBrush(QPalette::Mid, buttonBrushDark150);
|
||||||
|
pal->setBrush(QPalette::Dark, buttonBrushDark);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -247,6 +247,8 @@ QAccessibleInterface *AccessibleFactory::create(const QString &classname, QObjec
|
|||||||
iface = 0;
|
iface = 0;
|
||||||
} else if (classname == QLatin1String("QWidget")) {
|
} else if (classname == QLatin1String("QWidget")) {
|
||||||
iface = new QAccessibleWidget(widget);
|
iface = new QAccessibleWidget(widget);
|
||||||
|
} else if (classname == QLatin1String("QWindowContainer")) {
|
||||||
|
iface = new QAccessibleWindowContainer(widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
return iface;
|
return iface;
|
||||||
|
@ -57,6 +57,8 @@
|
|||||||
#include <qstyle.h>
|
#include <qstyle.h>
|
||||||
#include <qstyleoption.h>
|
#include <qstyleoption.h>
|
||||||
#include <qtextdocument.h>
|
#include <qtextdocument.h>
|
||||||
|
#include <qwindow.h>
|
||||||
|
#include <private/qwindowcontainer_p.h>
|
||||||
#include <QtCore/qvarlengtharray.h>
|
#include <QtCore/qvarlengtharray.h>
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
@ -845,7 +847,38 @@ QProgressBar *QAccessibleProgressBar::progressBar() const
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
QAccessibleWindowContainer::QAccessibleWindowContainer(QWidget *w)
|
||||||
|
: QAccessibleWidget(w)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
int QAccessibleWindowContainer::childCount() const
|
||||||
|
{
|
||||||
|
if (container()->containedWindow())
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int QAccessibleWindowContainer::indexOfChild(const QAccessibleInterface *child) const
|
||||||
|
{
|
||||||
|
if (child->object() == container()->containedWindow())
|
||||||
|
return 0;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
QAccessibleInterface *QAccessibleWindowContainer::child(int i) const
|
||||||
|
{
|
||||||
|
if (i == 0)
|
||||||
|
return QAccessible::queryAccessibleInterface(container()->containedWindow());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QWindowContainer *QAccessibleWindowContainer::container() const
|
||||||
|
{
|
||||||
|
return static_cast<QWindowContainer *>(widget());
|
||||||
|
}
|
||||||
|
|
||||||
#endif // QT_NO_ACCESSIBILITY
|
#endif // QT_NO_ACCESSIBILITY
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
@ -195,6 +195,19 @@ protected:
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
class QWindowContainer;
|
||||||
|
class QAccessibleWindowContainer : public QAccessibleWidget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QAccessibleWindowContainer(QWidget *w);
|
||||||
|
int childCount() const Q_DECL_OVERRIDE;
|
||||||
|
int indexOfChild(const QAccessibleInterface *child) const Q_DECL_OVERRIDE;
|
||||||
|
QAccessibleInterface *child(int i) const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
private:
|
||||||
|
QWindowContainer *container() const;
|
||||||
|
};
|
||||||
|
|
||||||
#endif // QT_NO_ACCESSIBILITY
|
#endif // QT_NO_ACCESSIBILITY
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
"QScrollArea",
|
"QScrollArea",
|
||||||
"QCalendarWidget",
|
"QCalendarWidget",
|
||||||
"QDockWidget",
|
"QDockWidget",
|
||||||
"QDesktopScreenWidget"
|
"QDesktopScreenWidget",
|
||||||
|
"QWindowContainer"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -325,6 +325,14 @@ namespace QtAndroid
|
|||||||
return m_qtTag;
|
return m_qtTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString deviceName()
|
||||||
|
{
|
||||||
|
QString manufacturer = QJNIObjectPrivate::getStaticObjectField("android/os/Build", "MANUFACTURER", "Ljava/lang/String;").toString();
|
||||||
|
QString model = QJNIObjectPrivate::getStaticObjectField("android/os/Build", "MODEL", "Ljava/lang/String;").toString();
|
||||||
|
|
||||||
|
return manufacturer + QStringLiteral(" ") + model;
|
||||||
|
}
|
||||||
|
|
||||||
int createSurface(AndroidSurfaceClient *client, const QRect &geometry, bool onTop)
|
int createSurface(AndroidSurfaceClient *client, const QRect &geometry, bool onTop)
|
||||||
{
|
{
|
||||||
QJNIEnvironmentPrivate env;
|
QJNIEnvironmentPrivate env;
|
||||||
@ -369,6 +377,7 @@ namespace QtAndroid
|
|||||||
x, y, w, h);
|
x, y, w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void destroySurface(int surfaceId)
|
void destroySurface(int surfaceId)
|
||||||
{
|
{
|
||||||
QMutexLocker lock(&m_surfacesMutex);
|
QMutexLocker lock(&m_surfacesMutex);
|
||||||
@ -385,7 +394,8 @@ namespace QtAndroid
|
|||||||
m_destroySurfaceMethodID,
|
m_destroySurfaceMethodID,
|
||||||
surfaceId);
|
surfaceId);
|
||||||
}
|
}
|
||||||
}
|
} // namespace QtAndroid
|
||||||
|
|
||||||
|
|
||||||
static jboolean startQtAndroidPlugin(JNIEnv* /*env*/, jobject /*object*//*, jobject applicationAssetManager*/)
|
static jboolean startQtAndroidPlugin(JNIEnv* /*env*/, jobject /*object*//*, jobject applicationAssetManager*/)
|
||||||
{
|
{
|
||||||
|
@ -116,5 +116,6 @@ namespace QtAndroid
|
|||||||
const char *methodErrorMsgFmt();
|
const char *methodErrorMsgFmt();
|
||||||
const char *qtTagText();
|
const char *qtTagText();
|
||||||
|
|
||||||
|
QString deviceName();
|
||||||
}
|
}
|
||||||
#endif // ANDROID_APP_H
|
#endif // ANDROID_APP_H
|
||||||
|
@ -47,20 +47,21 @@
|
|||||||
|
|
||||||
#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
|
#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
|
||||||
|
|
||||||
#include <qpa/qplatformwindow.h>
|
|
||||||
#include <qpa/qwindowsysteminterface.h>
|
#include <qpa/qwindowsysteminterface.h>
|
||||||
|
#include <qpa/qplatformwindow.h>
|
||||||
|
|
||||||
|
#warning sort the headers
|
||||||
#include "androidjnimain.h"
|
#include "androidjnimain.h"
|
||||||
#include "qabstracteventdispatcher.h"
|
#include "qabstracteventdispatcher.h"
|
||||||
#include "qandroidplatformaccessibility.h"
|
|
||||||
#include "qandroidplatformclipboard.h"
|
|
||||||
#include "qandroidplatformfontdatabase.h"
|
|
||||||
#include "qandroidplatformbackingstore.h"
|
|
||||||
#include "qandroidplatformopenglcontext.h"
|
|
||||||
#include "qandroidplatformopenglwindow.h"
|
|
||||||
#include "qandroidplatformrasterwindow.h"
|
#include "qandroidplatformrasterwindow.h"
|
||||||
#include "qandroidplatformscreen.h"
|
#include "qandroidplatformopenglwindow.h"
|
||||||
|
#include "qandroidplatformbackingstore.h"
|
||||||
#include "qandroidplatformservices.h"
|
#include "qandroidplatformservices.h"
|
||||||
|
#include "qandroidplatformfontdatabase.h"
|
||||||
|
#include "qandroidplatformclipboard.h"
|
||||||
|
#include "qandroidplatformaccessibility.h"
|
||||||
|
#include "qandroidplatformopenglcontext.h"
|
||||||
|
#include "qandroidplatformscreen.h"
|
||||||
#include "qandroidplatformtheme.h"
|
#include "qandroidplatformtheme.h"
|
||||||
#include "qandroidsystemlocale.h"
|
#include "qandroidsystemlocale.h"
|
||||||
|
|
||||||
@ -85,6 +86,10 @@ void *QAndroidPlatformNativeInterface::nativeResourceForIntegration(const QByteA
|
|||||||
return &m_palettes;
|
return &m_palettes;
|
||||||
if (resource == "AndroidStyleFonts")
|
if (resource == "AndroidStyleFonts")
|
||||||
return &m_fonts;
|
return &m_fonts;
|
||||||
|
if (resource == "AndroidDeviceName") {
|
||||||
|
static QString deviceName = QtAndroid::deviceName();
|
||||||
|
return &deviceName;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,11 +124,23 @@ QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶
|
|||||||
|
|
||||||
m_androidFDB = new QAndroidPlatformFontDatabase();
|
m_androidFDB = new QAndroidPlatformFontDatabase();
|
||||||
m_androidPlatformServices = new QAndroidPlatformServices();
|
m_androidPlatformServices = new QAndroidPlatformServices();
|
||||||
|
|
||||||
|
#ifndef QT_NO_CLIPBOARD
|
||||||
m_androidPlatformClipboard = new QAndroidPlatformClipboard();
|
m_androidPlatformClipboard = new QAndroidPlatformClipboard();
|
||||||
|
#endif
|
||||||
|
|
||||||
m_androidSystemLocale = new QAndroidSystemLocale;
|
m_androidSystemLocale = new QAndroidSystemLocale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QAndroidPlatformIntegration::needsWorkaround()
|
||||||
|
{
|
||||||
|
static bool needsWorkaround =
|
||||||
|
QtAndroid::deviceName().compare(QStringLiteral("samsung SM-T211"), Qt::CaseInsensitive) == 0
|
||||||
|
|| QtAndroid::deviceName().compare(QStringLiteral("samsung SM-T210"), Qt::CaseInsensitive) == 0
|
||||||
|
|| QtAndroid::deviceName().compare(QStringLiteral("samsung SM-T215"), Qt::CaseInsensitive) == 0;
|
||||||
|
return needsWorkaround;
|
||||||
|
}
|
||||||
|
|
||||||
bool QAndroidPlatformIntegration::hasCapability(Capability cap) const
|
bool QAndroidPlatformIntegration::hasCapability(Capability cap) const
|
||||||
{
|
{
|
||||||
switch (cap) {
|
switch (cap) {
|
||||||
@ -131,7 +148,10 @@ bool QAndroidPlatformIntegration::hasCapability(Capability cap) const
|
|||||||
case ApplicationState: return true;
|
case ApplicationState: return true;
|
||||||
case NativeWidgets: return true;
|
case NativeWidgets: return true;
|
||||||
case OpenGL: return true;
|
case OpenGL: return true;
|
||||||
case ThreadedOpenGL: return true;
|
case ThreadedOpenGL:
|
||||||
|
if (needsWorkaround())
|
||||||
|
return false;
|
||||||
|
// fall through
|
||||||
default:
|
default:
|
||||||
return QPlatformIntegration::hasCapability(cap);
|
return QPlatformIntegration::hasCapability(cap);
|
||||||
}
|
}
|
||||||
@ -173,6 +193,11 @@ QAndroidPlatformIntegration::~QAndroidPlatformIntegration()
|
|||||||
delete m_androidPlatformNativeInterface;
|
delete m_androidPlatformNativeInterface;
|
||||||
delete m_androidFDB;
|
delete m_androidFDB;
|
||||||
delete m_androidSystemLocale;
|
delete m_androidSystemLocale;
|
||||||
|
|
||||||
|
#ifndef QT_NO_CLIPBOARD
|
||||||
|
delete m_androidPlatformClipboard;
|
||||||
|
#endif
|
||||||
|
|
||||||
QtAndroid::setAndroidPlatformIntegration(NULL);
|
QtAndroid::setAndroidPlatformIntegration(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,11 +209,7 @@ QPlatformFontDatabase *QAndroidPlatformIntegration::fontDatabase() const
|
|||||||
#ifndef QT_NO_CLIPBOARD
|
#ifndef QT_NO_CLIPBOARD
|
||||||
QPlatformClipboard *QAndroidPlatformIntegration::clipboard() const
|
QPlatformClipboard *QAndroidPlatformIntegration::clipboard() const
|
||||||
{
|
{
|
||||||
static QAndroidPlatformClipboard *clipboard = 0;
|
return m_androidPlatformClipboard;
|
||||||
if (!clipboard)
|
|
||||||
clipboard = new QAndroidPlatformClipboard;
|
|
||||||
|
|
||||||
return clipboard;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -121,8 +121,9 @@ public:
|
|||||||
QTouchDevice *touchDevice() const { return m_touchDevice; }
|
QTouchDevice *touchDevice() const { return m_touchDevice; }
|
||||||
void setTouchDevice(QTouchDevice *touchDevice) { m_touchDevice = touchDevice; }
|
void setTouchDevice(QTouchDevice *touchDevice) { m_touchDevice = touchDevice; }
|
||||||
|
|
||||||
private:
|
static bool needsWorkaround();
|
||||||
EGLDisplay m_eglDisplay;
|
EGLDisplay m_eglDisplay;
|
||||||
|
private:
|
||||||
|
|
||||||
QTouchDevice *m_touchDevice;
|
QTouchDevice *m_touchDevice;
|
||||||
|
|
||||||
@ -143,7 +144,11 @@ private:
|
|||||||
QPainter *m_compositePainter;
|
QPainter *m_compositePainter;
|
||||||
QAndroidPlatformNativeInterface *m_androidPlatformNativeInterface;
|
QAndroidPlatformNativeInterface *m_androidPlatformNativeInterface;
|
||||||
QAndroidPlatformServices *m_androidPlatformServices;
|
QAndroidPlatformServices *m_androidPlatformServices;
|
||||||
|
|
||||||
|
#ifndef QT_NO_CLIPBOARD
|
||||||
QPlatformClipboard *m_androidPlatformClipboard;
|
QPlatformClipboard *m_androidPlatformClipboard;
|
||||||
|
#endif
|
||||||
|
|
||||||
QAndroidSystemLocale *m_androidSystemLocale;
|
QAndroidSystemLocale *m_androidSystemLocale;
|
||||||
#ifndef QT_NO_ACCESSIBILITY
|
#ifndef QT_NO_ACCESSIBILITY
|
||||||
mutable QPlatformAccessibility *m_accessibility;
|
mutable QPlatformAccessibility *m_accessibility;
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
#include "qandroidplatformopenglcontext.h"
|
#include "qandroidplatformopenglcontext.h"
|
||||||
#include "qandroidplatformopenglwindow.h"
|
#include "qandroidplatformopenglwindow.h"
|
||||||
|
#include "qandroidplatformintegration.h"
|
||||||
|
|
||||||
#include <QSurface>
|
#include <QSurface>
|
||||||
#include <QtGui/private/qopenglcontext_p.h>
|
#include <QtGui/private/qopenglcontext_p.h>
|
||||||
@ -64,12 +65,14 @@ void QAndroidPlatformOpenGLContext::swapBuffers(QPlatformSurface *surface)
|
|||||||
bool QAndroidPlatformOpenGLContext::makeCurrent(QPlatformSurface *surface)
|
bool QAndroidPlatformOpenGLContext::makeCurrent(QPlatformSurface *surface)
|
||||||
{
|
{
|
||||||
bool ret = QEGLPlatformContext::makeCurrent(surface);
|
bool ret = QEGLPlatformContext::makeCurrent(surface);
|
||||||
|
QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context());
|
||||||
|
|
||||||
const char *rendererString = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
|
const char *rendererString = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
|
||||||
if (rendererString != 0 && qstrncmp(rendererString, "Android Emulator", 16) == 0) {
|
if (rendererString != 0 && qstrncmp(rendererString, "Android Emulator", 16) == 0)
|
||||||
QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context());
|
|
||||||
ctx_d->workaround_missingPrecisionQualifiers = true;
|
ctx_d->workaround_missingPrecisionQualifiers = true;
|
||||||
}
|
|
||||||
|
if (!ctx_d->workaround_brokenFBOReadBack && QAndroidPlatformIntegration::needsWorkaround())
|
||||||
|
ctx_d->workaround_brokenFBOReadBack = true;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -665,8 +665,10 @@ void QCocoaFileDialogHelper::selectNameFilter(const QString &filter)
|
|||||||
const int index = options()->nameFilters().indexOf(filter);
|
const int index = options()->nameFilters().indexOf(filter);
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
|
QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
|
||||||
if (!delegate)
|
if (!delegate) {
|
||||||
|
options()->setInitiallySelectedNameFilter(filter);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
[delegate->mPopUpButton selectItemAtIndex:index];
|
[delegate->mPopUpButton selectItemAtIndex:index];
|
||||||
[delegate filterChanged:nil];
|
[delegate filterChanged:nil];
|
||||||
}
|
}
|
||||||
@ -676,7 +678,7 @@ QString QCocoaFileDialogHelper::selectedNameFilter() const
|
|||||||
{
|
{
|
||||||
QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
|
QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
|
||||||
if (!delegate)
|
if (!delegate)
|
||||||
return QString();
|
return options()->initiallySelectedNameFilter();
|
||||||
int index = [delegate->mPopUpButton indexOfSelectedItem];
|
int index = [delegate->mPopUpButton indexOfSelectedItem];
|
||||||
if (index >= options()->nameFilters().count())
|
if (index >= options()->nameFilters().count())
|
||||||
return QString();
|
return QString();
|
||||||
|
@ -254,6 +254,7 @@ QHash<QPlatformTheme::Font, QFont *> qt_mac_createRoleFonts()
|
|||||||
fonts.insert(QPlatformTheme::ListBoxFont, qt_mac_qfontForThemeFont(kThemeViewsFont));
|
fonts.insert(QPlatformTheme::ListBoxFont, qt_mac_qfontForThemeFont(kThemeViewsFont));
|
||||||
fonts.insert(QPlatformTheme::TitleBarFont, qt_mac_qfontForThemeFont(kThemeWindowTitleFont));
|
fonts.insert(QPlatformTheme::TitleBarFont, qt_mac_qfontForThemeFont(kThemeWindowTitleFont));
|
||||||
fonts.insert(QPlatformTheme::MenuFont, qt_mac_qfontForThemeFont(kThemeMenuItemFont));
|
fonts.insert(QPlatformTheme::MenuFont, qt_mac_qfontForThemeFont(kThemeMenuItemFont));
|
||||||
|
fonts.insert(QPlatformTheme::MenuBarFont, qt_mac_qfontForThemeFont(kThemeMenuItemFont));
|
||||||
fonts.insert(QPlatformTheme::ComboMenuItemFont, qt_mac_qfontForThemeFont(kThemeSystemFont));
|
fonts.insert(QPlatformTheme::ComboMenuItemFont, qt_mac_qfontForThemeFont(kThemeSystemFont));
|
||||||
fonts.insert(QPlatformTheme::HeaderViewFont, qt_mac_qfontForThemeFont(kThemeSmallSystemFont));
|
fonts.insert(QPlatformTheme::HeaderViewFont, qt_mac_qfontForThemeFont(kThemeSmallSystemFont));
|
||||||
fonts.insert(QPlatformTheme::TipLabelFont, qt_mac_qfontForThemeFont(kThemeSmallSystemFont));
|
fonts.insert(QPlatformTheme::TipLabelFont, qt_mac_qfontForThemeFont(kThemeSmallSystemFont));
|
||||||
|