Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev

This commit is contained in:
Frederik Gladhorn 2014-02-11 15:12:00 +01:00 committed by The Qt Project
commit df62c31807
162 changed files with 1100 additions and 500 deletions

12
INSTALL
View File

@ -1,10 +1,10 @@
INSTALLING Qt Source Package Version %VERSION%.
For full installation instructions for each supported platform, please
see http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/installation.html,
For instructions on building and installing Qt for each supported platform,
please see http://qt-project.org/doc/qt-%SHORTVERSION%/build-sources.html,
or follow one of these links:
Mac OS X: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-mac.html
Windows: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-win.html
Windows CE: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-wince.html
X11 Platforms: http://qt-project.org/doc/qt-%SHORTVERSION%/qtdoc/install-x11.html
Mac OS X: http://qt-project.org/doc/qt-%SHORTVERSION%/macosx-building.html
Windows: http://qt-project.org/doc/qt-%SHORTVERSION%/windows-building.html
X11 Platforms: http://qt-project.org/doc/qt-%SHORTVERSION%/linux-building.html
Windows CE: http://qt-project.org/doc/qt-%SHORTVERSION%/install-wince.html

164
dist/changes-5.2.1 vendored Normal file
View 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.

View File

@ -77,12 +77,9 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
"QtWidgets/Stickman Example" \
"QtWidgets/Move Blocks Example" \
"QtWidgets/Border Layout Example" \
"QtWidgets/Dynamic Layouts Example" \
"QtWidgets/Flow Layout Example" \
"QtWidgets/MDI Example" \
"QtWidgets/Dock Widgets Example" \
"QtWidgets/Recent Files Example" \
"QtWidgets/Menus Example" \
"QtWidgets/Concentric Circles Example" \
"QtWidgets/Gradients" \
"QtWidgets/Font Sampler Example" \
@ -90,38 +87,23 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
"QtWidgets/Transformations Example" \
"QtWidgets/Syntax Highlighter Example" \
"QtWidgets/Calendar Example" \
"QtWidgets/Movie Example" \
"QtWidgets/Validators Example" \
"QtWidgets/Analog Clock Example" \
"QtWidgets/Calculator Example" \
"QtWidgets/Mouse Button Tester" \
"QtWidgets/Character Map Example" \
"QtWidgets/Wiggly Example" \
"QtWidgets/Digital Clock Example" \
"QtWidgets/Elided Label Example" \
"QtWidgets/Image Viewer Example" \
"QtWidgets/Sliders Example" \
"QtWidgets/Tetrix Example" \
"QtWidgets/Group Box Example" \
"QtWidgets/Spin Boxes Example" \
"QtWidgets/Undo Framework" \
"QtWidgets/Regular Expressions Example" \
"QtWidgets/Colliding Mice Example" \
"QtWidgets/Basic Graphics Layouts Example" \
"QtWidgets/40000 Chips" \
"QtWidgets/Diagram Scene Example" \
"QtWidgets/Drag and Drop Robot Example" \
"QtWidgets/Elastic Nodes Example" \
"QtWidgets/Pad Navigator Example" \
"QtWidgets/Anchor Layout Example" \
"QtWidgets/Weather Anchor Layout Example" \
"QtConcurrent/Image Scaling Example" \
"QtConcurrent/QtConcurrent Progress Dialog Example" \
"QtNetwork/Torrent Example" \
"QtNetwork/Network Chat Example" \
"QtSQL/Master Detail Example" \
"QtOpenGL/Cube OpenGL ES 2.0 example" \
"QtOpenGL/Textures Example" \
"QtLinguist/Arrow Pad Example" \
"QtGui/Raster 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 Example" \
"QtMultimedia/QML Camera Example" \
"QtMultimedia/Audio Output Example" \
"QtSVG/Text Object Example" \
"QtQML/Qt Quick Examples - XMLHttpRequest" \
"QtQuick/Qt Quick Particles Examples - *" \
"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 - Key Interaction" \
"QtQuick/Qt Quick Examples - Text" \
@ -147,21 +133,15 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
"QtWidgets/Interview" \
"QtWidgets/Spreadsheet" \
"QtWidgets/Pixelator Example" \
"QtWidgets/Class Wizard Example" \
"QtWidgets/Animated Tiles Example" \
"QtWidgets/Basic Layouts Example" \
"QtWidgets/Application Example" \
"QtWidgets/Affine Transformations" \
"QtWidgets/Image Composition Example" \
"QtWidgets/Basic Drawing Example" \
"QtWidgets/Vector Deformation" \
"QtWidgets/Painter Paths Example" \
"QtWidgets/Text Edit" \
"QtWidgets/Style Sheet Example" \
"QtWidgets/Code Editor Example" \
"QtWidgets/Window Flags Example" \
"QtWidgets/Scribble Example" \
"QtWidgets/Shaped Clock Example" \
"QtWidgets/Line Edits Example" \
"QtWidgets/Calendar Widget 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 - Methods Example" \
"QtQML/Extending QML - Signal Support Example" \
"QtQML/Extending QML - Attached Properties Example" \
"QtWidgets/Address Book Example"
"QtQML/Extending QML - Attached Properties Example"
manifestmeta.android.tags = android

View File

@ -111,12 +111,6 @@ Cpp.ignoretokens += \
QT_FASTCALL \
QT_MUTEX_LOCK_NOEXCEPT \
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
Cpp.ignoredirectives += \

View File

@ -4,7 +4,6 @@ CONFIG += no_docs_target
SUBDIRS = \
dbus \
embedded \
gestures \
gui \
ipc \
json \

View File

@ -63,7 +63,7 @@
\endlist
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.
Our class contains some data and a few private slots:

View File

@ -33,7 +33,7 @@
This example is intended to be run alongside 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

View File

@ -47,7 +47,7 @@
large set of problems, including synchronous network I/O and
database access, where the user interface must remain responsive
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.
The Mandelbrot application supports zooming and scrolling using

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -47,9 +47,9 @@
If you want to learn how to make your own application extensible
through plugins, we recommend that you start by reading this
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{plugandpaintplugins/extrafilters}{Extra Filters}
\l{tools/plugandpaintplugins/extrafilters}{Extra Filters}
overviews, which show how to implement static and dynamic
plugins, respectively.
@ -126,8 +126,8 @@
a good idea to include a version number in the string, as we did
above.
The \l{plugandpaintplugins/basictools}{Basic Tools} plugin
and the \l{plugandpaintplugins/extrafilters}{Extra Filters}
The \l{tools/plugandpaintplugins/basictools}{Basic Tools} plugin
and the \l{tools/plugandpaintplugins/extrafilters}{Extra Filters}
plugin shows how to derive from \c BrushInterface, \c
ShapeInterface, and \c FilterInterface.
@ -275,7 +275,7 @@
\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
available to the application. This requires using the
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 point, you might want to take a look at the
\l{plugandpaintplugins/basictools}{Basic Tools} example
\l{tools/plugandpaintplugins/basictools}{Basic Tools} example
plugin.
*/
@ -316,7 +316,7 @@
\title Plug & Paint Basic Tools Example
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
example, we will review the four steps involved in writing a Qt
plugin:
@ -333,7 +333,7 @@
\snippet tools/plugandpaintplugins/basictools/basictoolsplugin.h 0
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
INCLUDEPATH entry to the \c .pro file with the path to Qt's \c
examples/tools directory.
@ -344,7 +344,7 @@
The \c Q_INTERFACES() macro is necessary to tell \l{moc}, Qt's
meta-object compiler, that the base classes are plugin
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.
For an explanation for the \c Q_PLUGIN_METADATA() macro see
\l {Exporting the Plugin}.
@ -473,7 +473,7 @@
To make the plugin a static plugin, all that is required is to
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
in its \c .pro file.
@ -501,15 +501,15 @@
\title Plug & Paint Extra Filters Example
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
\l{plugandpaintplugins/basictools}{Basic Tools} plugin.
\l{tools/plugandpaintplugins/basictools}{Basic Tools} plugin.
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
\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).
Here's the project file for building the Extra Filters plugin:

View File

@ -43,9 +43,9 @@
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:
\snippet examples/gestures/imagegestures/imagewidget.h class definition begin
\snippet gestures/imagegestures/imagewidget.h class definition begin
\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
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
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()
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
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
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
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
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
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
to make it more convenient for developers to discover which direction, if

View File

@ -7,6 +7,6 @@ SOURCES = imagewidget.cpp \
mainwidget.cpp
# install
target.path = $$[QT_INSTALL_EXAMPLES]/gestures/imagegestures
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/gestures/imagegestures
INSTALLS += target

View File

@ -9,6 +9,7 @@ SUBDIRS = \
dialogs \
draganddrop \
effects \
gestures \
graphicsview \
itemviews \
layouts \

View File

@ -12,10 +12,6 @@ include(gcc-base.conf)
QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__=4
QMAKE_CFLAGS_DEBUG += -gdwarf-2
QMAKE_CXXFLAGS_DEBUG += -gdwarf-2
QMAKE_OBJECTIVE_CFLAGS = $$QMAKE_CFLAGS
QMAKE_OBJECTIVE_CFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF

View File

@ -119,6 +119,14 @@ DEFINES += QT_BUILDING_QT
win32 {
INCLUDEPATH += tmp
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++* {

View File

@ -716,7 +716,7 @@
and \l{QMAKE_FRAMEWORK_VERSION} variables. By default, the values used for
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.
\section2 Creating and Moving Xcode Projects
@ -810,7 +810,7 @@
\snippet code/doc_src_qmake-manual.pro 23
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}.
*/
@ -1999,7 +1999,7 @@
platform, the variable will be forwarded to the MACOSX_DEPLOYMENT_TARGET
environment variable, which is interpreted by the compiler or linker.
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.
\section1 QMAKE_MAKEFILE
@ -2092,7 +2092,6 @@
\row \li dbus \li \l{Qt D-Bus}
\row \li declarative \li \l{Qt Quick 1} (deprecated)
\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 help \li \l{Qt Help}
\row \li multimedia \li \l{Qt Multimedia}
@ -3273,7 +3272,7 @@
\li \l{QMAKE_EXT_UI} modifies the extension used for \QD UI files
(usually in \l{FORMS}).
\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
\l{LEXSOURCES}).
\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.
Platform-specific variables are not described here. For more information,
see \l{Deploying an Application on Windows} and
\l{Developing Qt Applications for Mac OS X}.
see \l{Qt for Windows - Deployment} and \l{Qt for Mac OS X}.
\target Application
\section1 Building an Application

View File

@ -795,7 +795,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
mkt << "\\\n\t";
++added;
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());
}
}
}

View File

@ -729,11 +729,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" ";
if(project->first("TEMPLATE") == "app") {
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"
<< "@sed ";
foreach (const ProString &arg, commonSedArgs)
t << arg;
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,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "

View File

@ -953,13 +953,15 @@ static inline QString toString(compileAsManagedOptions option)
return QString();
}
static inline QString toString(debugOption option)
static inline QString toString(debugOption option, DotNET compilerVersion)
{
switch (option) {
case debugUnknown:
case debugLineInfoOnly:
break;
case debugDisabled:
if (compilerVersion <= NET2010)
break;
return "None";
case debugOldStyleInfo:
return "OldStyle";
@ -1425,6 +1427,17 @@ static inline triState toTriState(termSvrAwarenessType option)
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)
{
xml
@ -1444,7 +1457,8 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
<< attrTagS(_CompileAsManaged, toString(tool.CompileAsManaged))
<< attrTagT(_CompileAsWinRT, tool.CompileAsWinRT)
<< attrTagT(_CreateHotpatchableImage, tool.CreateHotpatchableImage)
<< attrTagS(_DebugInformationFormat, toString(tool.DebugInformationFormat))
<< attrTagS(_DebugInformationFormat, toString(tool.DebugInformationFormat,
tool.config->CompilerVersion))
<< attrTagT(_DisableLanguageExtensions, tool.DisableLanguageExtensions)
<< attrTagX(_DisableSpecificWarnings, tool.DisableSpecificWarnings, ";")
<< attrTagS(_EnableEnhancedInstructionSet, toString(tool.EnableEnhancedInstructionSet))
@ -1480,7 +1494,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCLCompilerTool &tool)
<< attrTagS(_PreprocessOutputPath, tool.PreprocessOutputPath)
<< attrTagT(_PreprocessSuppressLineNumbers, tool.PreprocessSuppressLineNumbers)
<< attrTagT(_PreprocessToFile, toTriState(tool.GeneratePreprocessedFile))
<< attrTagS(_ProgramDataBaseFileName, tool.ProgramDataBaseFileName)
<< fixedProgramDataBaseFileNameOutput(tool)
<< attrTagS(_ProcessorNumber, tool.MultiProcessorCompilationProcessorCount)
<< attrTagS(_RuntimeLibrary, toString(tool.RuntimeLibrary))
<< attrTagT(_RuntimeTypeInfo, tool.RuntimeTypeInfo)

View File

@ -525,7 +525,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;
}

View File

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

View File

@ -46,8 +46,8 @@
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of QIODevice. This header file may change from version to
// This file is not part of the Qt API.
// This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.

View File

@ -26,7 +26,7 @@ qhp.QtCore.subprojects.classes.sortPages = true
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 += ..

View File

@ -1988,7 +1988,7 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
conditions that it would not otherwise know about. However, there is no
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_ASSUME will tell the compiler not to generate code for those conditions.
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
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
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
Q_DECL_NOTHROW instead.
\sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT_EXPR
\sa Q_DECL_NOTHROW, Q_DECL_NOEXCEPT
*/
/*!

View File

@ -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: 4097) /* typedef-name 'identifier1' used as synonym for class-name 'identifier2' */
# pragma warning(disable: 4706) /* assignment within conditional expression */
# pragma warning(disable: 4786) /* 'identifier' : identifier was truncated to 'number' characters in the debug information */
# if _MSC_VER <= 1310 // MSVC 2003
# 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: 4231) /* nonstandard extension used : 'identifier' before template explicit instantiation */
# if _MSC_VER < 1800 // MSVC 2013
# pragma warning(disable: 4231) /* nonstandard extension used : 'identifier' before template explicit instantiation */
# endif
# pragma warning(disable: 4710) /* function not inlined */
# pragma warning(disable: 4530) /* C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc */
# elif defined(Q_CC_BOR)

View File

@ -1246,6 +1246,32 @@ static void qDefaultMsgHandler(QtMsgType type, const char *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)
{
#ifndef QT_BOOTSTRAPPED
@ -1263,12 +1289,19 @@ static void qt_message_print(QtMsgType msgType, const QMessageLogContext &contex
if (!messageHandler)
messageHandler = qDefaultMessageHandler;
// prefer new message handler over the old one
if (msgHandler == qDefaultMsgHandler
|| messageHandler != qDefaultMessageHandler) {
(*messageHandler)(msgType, context, message);
// 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
if (msgHandler == qDefaultMsgHandler
|| messageHandler != qDefaultMessageHandler) {
(*messageHandler)(msgType, context, message);
} else {
(*msgHandler)(msgType, message.toLocal8Bit().constData());
}
ungrabMessageHandler();
} else {
(*msgHandler)(msgType, message.toLocal8Bit().constData());
fprintf(stderr, "%s", message.toLocal8Bit().constData());
}
}

View File

@ -716,11 +716,12 @@ QString QDir::absoluteFilePath(const QString &fileName) const
return fileName;
d->resolveAbsoluteEntry();
const QString absoluteDirPath = d->absoluteDirEntry.filePath();
if (fileName.isEmpty())
return d->absoluteDirEntry.filePath();
if (!d->absoluteDirEntry.isRoot())
return d->absoluteDirEntry.filePath() % QLatin1Char('/') % fileName;
return d->absoluteDirEntry.filePath() % fileName;
return absoluteDirPath;
if (!absoluteDirPath.endsWith(QLatin1Char('/')))
return absoluteDirPath % QLatin1Char('/') % fileName;
return absoluteDirPath % fileName;
}
/*!

View File

@ -102,7 +102,7 @@ QFileSelectorPrivate::QFileSelectorPrivate()
your code might look something like this:
\code
QString defaultsPath = "data/defaults.conf";
#if defined(Q_OS_LINUX_ANDROID)
#if defined(Q_OS_ANDROID)
defaultsPath = "data/android/defaults.conf";
#elif defined(Q_OS_BLACKBERRY)
defaultsPath = "data/blackberry/defaults.conf";
@ -157,7 +157,7 @@ QFileSelectorPrivate::QFileSelectorPrivate()
Selectors normally available are
\list
\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().
\endlist
@ -368,18 +368,22 @@ QStringList QFileSelectorPrivate::platformSelectors()
# endif
#elif defined(Q_OS_UNIX)
ret << QStringLiteral("unix");
# if defined(Q_OS_LINUX_ANDROID)
# if defined(Q_OS_ANDROID)
ret << QStringLiteral("android");
# elif defined(Q_OS_BLACKBERRY)
ret << QStringLiteral("blackberry");
# elif defined(Q_OS_QNX)
ret << QStringLiteral("qnx");
# elif defined(Q_OS_IOS)
ret << QStringLiteral("ios");
# elif defined(Q_OS_LINUX)
ret << QStringLiteral("linux");
# elif defined(Q_OS_MAC)
ret << QStringLiteral("mac");
# elif defined(Q_OS_DARWIN)
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
struct utsname u;
if (uname(&u) != -1)

View File

@ -259,9 +259,10 @@ QIODevicePrivate::~QIODevicePrivate()
\value NotOpen The device is not open.
\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 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.
\value Truncate If possible, the device is truncated before it is opened.
All earlier contents of the device are lost.

View File

@ -72,7 +72,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QLoggingCategory, qtDefaultCategory,
\section1 Checking category configuration
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.
\note The qCDebug(), qCWarning(), qCCritical() macros prevent arguments

View File

@ -458,10 +458,21 @@ void QSortFilterProxyModelPrivate::sort()
*/
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;
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;
}

View File

@ -206,9 +206,9 @@ public:
const char *member, Qt::ConnectionType type = Qt::AutoConnection) const;
#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, 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
//Connect a signal to a pointer to qobject member function
template <typename Func1, typename Func2>

View File

@ -2833,8 +2833,8 @@ static bool canConvertMetaObject(int fromId, int toId, QObject *fromObject)
\snippet code/src_corelib_kernel_qvariant.cpp 10
\sa convert(), QSequentialIterable, qRegisterSequentialConverter(), QAssociativeIterable,
qRegisterAssociativeConverter()
\sa convert(), QSequentialIterable, Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE(), QAssociativeIterable,
Q_DECLARE_ASSOCIATIVE_CONTAINER_METATYPE()
*/
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
\sa setValue(), fromValue(), canConvert(), qRegisterSequentialConverter()
\sa setValue(), fromValue(), canConvert(), Q_DECLARE_SEQUENTIAL_CONTAINER_METATYPE()
*/
/*! \fn bool QVariant::canConvert() const

View File

@ -374,6 +374,7 @@ private:
static QBasicMutex qt_library_mutex;
static QLibraryStore *qt_library_data = 0;
static bool qt_library_data_once;
QLibraryStore::~QLibraryStore()
{
@ -429,8 +430,11 @@ Q_DESTRUCTOR_FUNCTION(qlibraryCleanup)
// must be called with a locked mutex
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_once = true;
}
return qt_library_data;
}
@ -440,12 +444,15 @@ inline QLibraryPrivate *QLibraryStore::findOrCreate(const QString &fileName, con
QLibraryStore *data = instance();
// 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)
lib = new QLibraryPrivate(fileName, version);
// track this library
data->libraryMap.insert(fileName, lib);
if (Q_LIKELY(data))
data->libraryMap.insert(fileName, lib);
lib->libraryRefCount.ref();
return lib;
@ -464,9 +471,11 @@ inline void QLibraryStore::releaseLibrary(QLibraryPrivate *lib)
// no one else is using
Q_ASSERT(lib->libraryUnloadCount.load() == 0);
QLibraryPrivate *that = data->libraryMap.take(lib->fileName);
Q_ASSERT(lib == that);
Q_UNUSED(that);
if (Q_LIKELY(data)) {
QLibraryPrivate *that = data->libraryMap.take(lib->fileName);
Q_ASSERT(lib == that);
Q_UNUSED(that);
}
delete lib;
}

View File

@ -662,9 +662,6 @@
This function requires the item type (in the example above,
QString) to implement \c operator<().
See the \l{<QtAlgorithms>#binaryFind example}{detailed
description} for an example usage.
\sa qLowerBound(), qUpperBound(), {random access iterators}
*/

View File

@ -119,14 +119,6 @@ QT_BEGIN_NAMESPACE
\since 5.2
*/
/*!
\fn QBitArray &QBitArray::operator=(QBitArray &&other)
Move-assigns \a other to this QBitArray instance.
\since 5.2
*/
/*! \fn QBitArray::QBitArray()
Constructs an empty bit array.
@ -464,6 +456,7 @@ void QBitArray::fill(bool value, int begin, int end)
*/
/*! \fn QBitArray &QBitArray::operator=(QBitArray &&other)
\since 5.2
Moves \a other to this bit array and returns a reference to
this bit array.

View File

@ -1303,12 +1303,10 @@ void QByteArray::chop(int n)
returns a reference to this byte array. The Unicode data is
converted into 8-bit characters using QString::toUtf8().
If the QString contains non-ASCII Unicode characters, using this
operator can lead to loss of information. You can disable this
operator by defining \c QT_NO_CAST_TO_ASCII when you compile your
applications. You then need to call QString::toUtf8() (or
QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
explicitly if you want to convert the data to \c{const char *}.
You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
compile your applications. You then need to call QString::toUtf8() (or
QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
convert the data to \c{const char *}.
*/
/*! \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
converted into 8-bit characters using QString::toUtf8().
If the QString contains non-ASCII Unicode characters, using this
function can lead to loss of information. You can disable this
function by defining \c QT_NO_CAST_TO_ASCII when you compile your
applications. You then need to call QString::toUtf8() (or
QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
explicitly if you want to convert the data to \c{const char *}.
You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
compile your applications. You then need to call QString::toUtf8() (or
QString::toLatin1() 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
characters using QString::toUtf8().
If the QString contains non-ASCII Unicode characters, using this
function can lead to loss of information. You can disable this
function by defining \c QT_NO_CAST_TO_ASCII when you compile your
applications. You then need to call QString::toUtf8() (or
QString::toLatin1() or QString::toUtf8() or QString::toLocal8Bit())
explicitly if you want to convert the data to \c{const char *}.
You can disable this function by defining \c QT_NO_CAST_TO_ASCII when you
compile your applications. You then need to call QString::toUtf8() (or
QString::toLatin1() or QString::toLocal8Bit()) explicitly if you want to
convert the data to \c{const char *}.
*/
/*! \fn QByteArray &QByteArray::replace(char before, const char *after)

View File

@ -79,7 +79,7 @@ public:
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.
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:
\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},
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
only once, and QCommandLineParser::arguments() if you expect that option
Call QCommandLineParser::value() if you expect the option to be present
only once, and QCommandLineParser::values() if you expect that option
to be present multiple times.
\sa valueName()

View File

@ -512,7 +512,7 @@ public:
Q_DECL_CONSTEXPR inline QRectF translated(qreal dx, qreal dy) 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 setRect(qreal x, qreal y, qreal w, qreal h);

View File

@ -7858,7 +7858,7 @@ QString &QString::setRawData(const QChar *unicode, int size)
\snippet code/src_corelib_tools_qstring.cpp 6
\sa QString, QLatin1Char, QStringLiteral
\sa QString, QLatin1Char, {QStringLiteral()}{QStringLiteral}
*/
/*! \fn QLatin1String::QLatin1String(const char *str)

View File

@ -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)
{ 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)
{ 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)
{ 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)
{ return QString::compare_helper(s2.constData(), s2.size(), s1, -1) <= 0; }
inline QT_ASCII_CAST_WARN bool operator==(const char *s1, QLatin1String s2)
{ return QString::fromUtf8(s1) == s2; }

View File

@ -254,7 +254,10 @@ private:
};
#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
template <typename T>
@ -270,7 +273,7 @@ void QVector<T>::defaultConstruct(T *from, T *to)
}
#ifdef Q_CC_MSVC
# pragma warning ( default: 4345 )
# pragma warning ( pop )
#endif
template <typename T>

View File

@ -128,12 +128,7 @@ QDBusMetaObjectGenerator::QDBusMetaObjectGenerator(const QString &interfaceName,
}
}
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)
static int registerComplexDBusType(const char *typeName)
{
struct QDBusRawTypeHandler {
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;
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
// was expected to, so synthesize a fake type
typeName = "QDBusRawType<0x" + signature.toHex() + ">*";
type = QMetaType::registerType(typeName, QDBusRawTypeHandler::destroy,
QDBusRawTypeHandler::create,
QDBusRawTypeHandler::destruct,
QDBusRawTypeHandler::construct,
sizeof(void *),
QMetaType::MovableType,
0);
type = registerComplexDBusType(typeName);
}
result.name = typeName;
@ -217,7 +222,7 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
type = QVariant::Map;
} else {
result.name = "QDBusRawType::" + signature;
type = -1;
type = registerComplexDBusType(result.name);
}
} else {
result.name = QMetaType::typeName(type);

View File

@ -87,8 +87,6 @@ QAccessiblePlugin::~QAccessiblePlugin()
Creates and returns a QAccessibleInterface implementation for the
class \a key and the object \a object. Keys are case sensitive.
\sa keys()
*/
QT_END_NAMESPACE

View File

@ -29,6 +29,9 @@ tagfile = ../../../doc/qtgui/qtgui.tags
depends += \
qtcore \
qtimageformats \
qtmacextras \
qtmultimedia \
qtnetwork \
qtopengl \
qtsvg \

View File

@ -81,7 +81,7 @@ contains(QT_CONFIG, angle) {
!isEmpty(QMAKE_LIBDIR_OPENGL_ES2): CMAKE_OPENGL_LIBDIR = $$cmakePortablePaths($$QMAKE_LIBDIR_OPENGL_ES2)
CMAKE_GL_HEADER_NAME = GLES2/gl2.h
CMAKE_QT_OPENGL_IMPLEMENTATION = GLESv2
} else {
} else:contains(QT_CONFIG, opengl) {
!isEmpty(QMAKE_INCDIR_OPENGL): CMAKE_GL_INCDIRS = $$cmakeTargetPaths($$QMAKE_INCDIR_OPENGL)
CMAKE_OPENGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_OPENGL)
CMAKE_OPENGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_OPENGL)

View File

@ -43,6 +43,7 @@
#include "qicon_p.h"
#include "qiconengine.h"
#include "qiconengineplugin.h"
#include "qimagereader.h"
#include "private/qfactoryloader_p.h"
#include "private/qiconloader_p.h"
#include "qpainter.h"
@ -365,37 +366,40 @@ 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)
{
if (!fileName.isEmpty()) {
QSize size = _size;
QPixmap pixmap;
QString abs = fileName;
if (fileName.at(0) != QLatin1Char(':'))
abs = QFileInfo(fileName).absoluteFilePath();
QImageReader reader(abs);
for (int i = 0; i < pixmaps.count(); ++i) {
if (pixmaps.at(i).mode == mode && pixmaps.at(i).state == state) {
QPixmapIconEngineEntry *pe = &pixmaps[i];
if(size == QSize()) {
pixmap = QPixmap(abs);
size = pixmap.size();
}
if (pe->size == QSize() && pe->pixmap.isNull()) {
pe->pixmap = QPixmap(pe->fileName);
// Reset the devicePixelRatio. The pixmap may be loaded from a @2x file,
// but be used as a 1x pixmap by QIcon.
pe->pixmap.setDevicePixelRatio(1.0);
pe->size = pe->pixmap.size();
}
if(pe->size == size) {
pe->pixmap = pixmap;
pe->fileName = abs;
return;
do {
QSize size = _size;
QPixmap pixmap;
for (int i = 0; i < pixmaps.count(); ++i) {
if (pixmaps.at(i).mode == mode && pixmaps.at(i).state == state) {
QPixmapIconEngineEntry *pe = &pixmaps[i];
if (size == QSize()) {
pixmap.convertFromImage(reader.read());
size = pixmap.size();
}
if (pe->size == QSize() && pe->pixmap.isNull()) {
pe->pixmap = QPixmap(pe->fileName);
// Reset the devicePixelRatio. The pixmap may be loaded from a @2x file,
// but be used as a 1x pixmap by QIcon.
pe->pixmap.setDevicePixelRatio(1.0);
pe->size = pe->pixmap.size();
}
if (pe->size == size) {
pe->pixmap = pixmap;
pe->fileName = abs;
return;
}
}
}
}
QPixmapIconEngineEntry e(abs, size, mode, state);
e.pixmap = pixmap;
pixmaps += e;
QPixmapIconEngineEntry e(abs, size, mode, state);
e.pixmap = pixmap;
pixmaps += e;
} while (reader.jumpToNextImage());
}
}

View File

@ -519,10 +519,11 @@ QPixmap PixmapEntry::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State st
return cachedPixmap;
} else {
if (basePixmap.size() != actualSize)
basePixmap = basePixmap.scaled(actualSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
cachedPixmap = basePixmap;
cachedPixmap = basePixmap.scaled(actualSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
else
cachedPixmap = basePixmap;
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);
}
return cachedPixmap;

View File

@ -79,8 +79,6 @@ QT_BEGIN_NAMESPACE
Installs a QPictureIO picture I/O handler for the picture format \a
format. Returns \c true on success.
\sa keys()
*/

View File

@ -95,8 +95,6 @@ QGenericPlugin::~QGenericPlugin()
Implement this function to create a driver matching the type
specified by the given \a key and \a specification parameters. Note that
keys are case-insensitive.
\sa keys()
*/
QT_END_NAMESPACE

View File

@ -60,6 +60,7 @@
#include <QtCore/private/qthread_p.h>
#include <QtCore/qdir.h>
#include <QtCore/qlibraryinfo.h>
#include <QtCore/qnumeric.h>
#include <QtDebug>
#ifndef QT_NO_ACCESSIBILITY
#include "qaccessible.h"
@ -111,7 +112,7 @@ Q_GUI_EXPORT bool qt_is_gui_used = true;
Qt::MouseButtons QGuiApplicationPrivate::mouse_buttons = Qt::NoButton;
Qt::KeyboardModifiers QGuiApplicationPrivate::modifier_buttons = Qt::NoModifier;
QPointF QGuiApplicationPrivate::lastCursorPosition(0.0, 0.0);
QPointF QGuiApplicationPrivate::lastCursorPosition(qInf(), qInf());
bool QGuiApplicationPrivate::tabletState = false;
QWindow *QGuiApplicationPrivate::tabletPressTarget = 0;

View File

@ -79,8 +79,8 @@ QT_BEGIN_NAMESPACE
QWindow directly. Still, it is possible to render directly to a QWindow
with QBackingStore or QOpenGLContext, when wanting to keep dependencies to
a minimum or when wanting to use OpenGL directly. The
\l{gui/rasterwindow}{Raster Window} and \l{gui/openglwindow}{OpenGL Window}
examples are useful reference examples for how to render to a QWindow using
\l{Raster Window Example} and \l{OpenGL Window Example}
are useful reference examples for how to render to a QWindow using
either approach.
\section1 Resource management

View File

@ -432,9 +432,11 @@ void QOpenGLFramebufferObjectPrivate::init(QOpenGLFramebufferObject *, const QSi
samples = 0;
}
#ifndef QT_OPENGL_ES_2
GLint maxSamples;
glGetIntegerv(GL_MAX_SAMPLES, &maxSamples);
samples = qBound(0, int(samples), int(maxSamples));
#endif
size = sz;
target = texture_target;

View File

@ -40,6 +40,7 @@
****************************************************************************/
#include "qopengltexturecache_p.h"
#include <qopenglfunctions.h>
#include <private/qopenglcontext_p.h>
#include <private/qimagepixmapcleanuphooks_p.h>
#include <qpa/qplatformpixmap.h>
@ -128,6 +129,20 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QPixmap &
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)
{
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)
QImagePixmapCleanupHooks::enableCleanupHooks(image);

View File

@ -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)
{
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_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
// for testing purpose only, not thread-safe!
static QList<QFontEngine *> *enginesCollector = 0;
@ -238,6 +246,9 @@ QFontEngine::QFontEngine()
font_(0), font_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;
fsType = 0;
symbol = false;

View File

@ -116,6 +116,21 @@ QT_BEGIN_NAMESPACE
#define TRUNC(x) ((x) >> 6)
#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 ------------------------------
class QtFreetypeData
@ -408,15 +423,7 @@ QFontEngine::Properties QFreetypeFace::properties() const
bool QFreetypeFace::getSfntTable(uint tag, uchar *buffer, uint *length) const
{
bool result = false;
#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;
return ft_getSfntTable(face, tag, buffer, length);
}
/* 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);
if (!freetype->hbFace) {
faceData.user_data = face;
faceData.get_font_table = ft_getSfntTable;
freetype->hbFace = harfbuzzFace();
freetype->hbFace_destroy_func = face_destroy_func;
} else {
@ -1179,7 +1188,7 @@ QFixed QFontEngineFT::emSquareSize() 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

View File

@ -85,6 +85,7 @@ enum HB_Compat_Error {
};
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
{
@ -279,6 +280,10 @@ public:
mutable qt_destroy_func_t font_destroy_func;
mutable void *face_;
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 fsType : 16;

View File

@ -616,19 +616,22 @@ hb_font_funcs_t *hb_qt_get_font_funcs()
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;
Q_ASSERT(fe);
QFontEngine::FaceData *data = (QFontEngine::FaceData *)user_data;
Q_ASSERT(data);
qt_get_font_table_func_t get_font_table = data->get_font_table;
Q_ASSERT(get_font_table);
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();
char *buffer = (char *)malloc(length);
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;
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 *
_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))) {
hb_face_destroy(face);
return NULL;

View File

@ -1879,8 +1879,10 @@ QFontEngine *QTextEngine::fontEngine(const QScriptItem &si, QFixed *ascent, QFix
feCache.prevFontEngine = engine;
feCache.prevScript = script;
engine->ref.ref();
if (feCache.prevScaledFontEngine)
if (feCache.prevScaledFontEngine) {
releaseCachedFontEngine(feCache.prevScaledFontEngine);
feCache.prevScaledFontEngine = 0;
}
}
if (si.analysis.flags & QFont::SmallCaps) {
if (feCache.prevScaledFontEngine) {

View File

@ -224,12 +224,7 @@ static void ensureInitialized()
\note The network and roaming support in QNetworkAccessManager is conditional
upon the platform supporting connection management. The
\l QNetworkConfigurationManager::NetworkSessionRequired can be used to
detect whether QNetworkAccessManager utilizes this feature. Currently only
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.
detect whether QNetworkAccessManager utilizes this feature.
\sa QNetworkRequest, QNetworkReply, QNetworkProxy
*/

View File

@ -559,6 +559,20 @@ qint64 QNetworkDiskCache::expire()
break;
QString name = i.value();
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();
file.remove();
totalSize -= size;

View File

@ -161,6 +161,8 @@ void QNetworkReplyFileImpl::abort()
qint64 QNetworkReplyFileImpl::bytesAvailable() const
{
Q_D(const QNetworkReplyFileImpl);
if (!d->realFile.isOpen())
return QNetworkReply::bytesAvailable();
return QNetworkReply::bytesAvailable() + d->realFile.bytesAvailable();
}
@ -181,7 +183,11 @@ qint64 QNetworkReplyFileImpl::size() const
qint64 QNetworkReplyFileImpl::readData(char *data, qint64 maxlen)
{
Q_D(QNetworkReplyFileImpl);
if (!d->realFile.isOpen())
return -1;
qint64 ret = d->realFile.read(data, maxlen);
if (bytesAvailable() == 0 && d->realFile.isOpen())
d->realFile.close();
if (ret == 0 && bytesAvailable() == 0)
return -1;
else

View File

@ -52,7 +52,7 @@
#include <arpa/nameser_compat.h>
#include <resolv.h>
#ifdef __GNU_LIBRARY__
#if defined(__GNU_LIBRARY__) && !defined(__UCLIBC__)
# include <gnu/lib-names.h>
#endif

View File

@ -63,7 +63,7 @@
# include <resolv.h>
#endif
#ifdef __GNU_LIBRARY__
#if defined(__GNU_LIBRARY__) && !defined(__UCLIBC__)
# include <gnu/lib-names.h>
#endif

View File

@ -2221,7 +2221,7 @@ bool QAbstractSocket::waitForBytesWritten(int msecs)
if (readyToWrite) {
if (d->canWriteNotification()) {
#if defined (QABSTRACTSOCKET_DEBUG)
qDebug("QAbstractSocket::waitForBytesWritten returns \c true");
qDebug("QAbstractSocket::waitForBytesWritten returns true");
#endif
return true;
}

View File

@ -33,9 +33,8 @@
\image opengl-examples.png
These examples describe how to use the Qt OpenGL Module. For new code,
please use the OpenGL classes in the \l {Qt GUI Module}.
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.
Qt provides support for integration with OpenGL implementations on all
platforms, giving developers the opportunity to display hardware accelerated

View File

@ -554,7 +554,6 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
&& funcs.hasOpenGLExtension(QOpenGLExtensions::PackedDepthStencil)) {
// depth and stencil buffer needs another extension
funcs.glGenRenderbuffers(1, &depth_buffer);
Q_ASSERT(!funcs.glIsRenderbuffer(depth_buffer));
funcs.glBindRenderbuffer(GL_RENDERBUFFER, depth_buffer);
Q_ASSERT(funcs.glIsRenderbuffer(depth_buffer));
if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample))
@ -581,7 +580,6 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
|| (attachment == QGLFramebufferObject::Depth)))
{
funcs.glGenRenderbuffers(1, &depth_buffer);
Q_ASSERT(!funcs.glIsRenderbuffer(depth_buffer));
funcs.glBindRenderbuffer(GL_RENDERBUFFER, depth_buffer);
Q_ASSERT(funcs.glIsRenderbuffer(depth_buffer));
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)) {
funcs.glGenRenderbuffers(1, &stencil_buffer);
Q_ASSERT(!funcs.glIsRenderbuffer(stencil_buffer));
funcs.glBindRenderbuffer(GL_RENDERBUFFER, stencil_buffer);
Q_ASSERT(funcs.glIsRenderbuffer(stencil_buffer));
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.
\sa {Framebuffer Object Example}
\sa {Framebuffer Object 2 Example}
*/

View File

@ -90,7 +90,7 @@
Pbuffers are provided by the OpenGL \c pbuffer extension; call
hasOpenGLPbuffer() to find out if the system provides pbuffers.
\sa {opengl/pbuffers}{Pbuffers Example}
\sa {Pixel Buffers Example}
*/
#include <private/qopenglextensions_p.h>

View File

@ -102,23 +102,27 @@ QDeviceDiscovery::~QDeviceDiscovery()
QStringList QDeviceDiscovery::scanConnectedDevices()
{
QStringList devices;
// check for input devices
QDir dir(QString::fromLatin1(QT_EVDEV_DEVICE_PATH));
QDir dir;
dir.setFilter(QDir::System);
foreach (const QString &deviceFile, dir.entryList()) {
QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
if (checkDeviceType(absoluteFilePath))
devices << absoluteFilePath;
// check for input devices
if (m_types & Device_InputMask) {
dir.setPath(QString::fromLatin1(QT_EVDEV_DEVICE_PATH));
foreach (const QString &deviceFile, dir.entryList()) {
QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
if (checkDeviceType(absoluteFilePath))
devices << absoluteFilePath;
}
}
// check for drm devices
dir.setPath(QString::fromLatin1(QT_DRM_DEVICE_PATH));
foreach (const QString &deviceFile, dir.entryList()) {
QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
if (checkDeviceType(absoluteFilePath))
devices << absoluteFilePath;
if (m_types & Device_VideoMask) {
dir.setPath(QString::fromLatin1(QT_DRM_DEVICE_PATH));
foreach (const QString &deviceFile, dir.entryList()) {
QString absoluteFilePath = dir.absolutePath() + QString::fromLatin1("/") + deviceFile;
if (checkDeviceType(absoluteFilePath))
devices << absoluteFilePath;
}
}
#ifdef QT_QPA_DEVICE_DISCOVERY_DEBUG

View File

@ -157,10 +157,12 @@ void QEvdevTouchScreenData::registerDevice()
#define LONG_BITS (sizeof(long) << 3)
#define NUM_LONGS(bits) (((bits) + LONG_BITS - 1) / LONG_BITS)
#if defined(QT_NO_MTDEV)
static inline bool testBit(long bit, const long *array)
{
return (array[bit / LONG_BITS] >> bit % LONG_BITS) & 1;
}
#endif
QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &specification, QObject *parent)
: QObject(parent), m_notify(0), m_fd(-1), d(0)
@ -345,40 +347,61 @@ QEvdevTouchScreenHandler::~QEvdevTouchScreenHandler()
void QEvdevTouchScreenHandler::readData()
{
::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;
for (; ;) {
#if !defined(QT_NO_MTDEV)
int result = mtdev_get(m_mtdev, m_fd, buffer, sizeof(buffer) / sizeof(::input_event));
if (result > 0)
result *= sizeof(::input_event);
#else
int result = QT_READ(m_fd, reinterpret_cast<char*>(buffer) + n, sizeof(buffer) - n);
#endif
if (!result) {
qWarning("evdevtouch: Got EOF from input device");
return;
} else if (result < 0) {
if (errno != EINTR && errno != EAGAIN) {
qErrnoWarning(errno, "evdevtouch: Could not read from input device");
if (errno == ENODEV) { // device got disconnected -> stop reading
delete m_notify;
m_notify = 0;
QT_CLOSE(m_fd);
m_fd = -1;
}
return;
}
} else {
n += result;
if (n % sizeof(::input_event) == 0)
break;
}
events = QT_READ(m_fd, reinterpret_cast<char*>(buffer) + n, sizeof(buffer) - n);
if (events <= 0)
goto err;
n += events;
if (n % sizeof(::input_event) == 0)
break;
}
n /= sizeof(::input_event);
for (int i = 0; i < n; ++i)
d->processInputEvent(&buffer[i]);
#endif
return;
err:
if (!events) {
qWarning("evdevtouch: Got EOF from input device");
return;
} else if (events < 0) {
if (errno != EINTR && errno != EAGAIN) {
qErrnoWarning(errno, "evdevtouch: Could not read from input device");
if (errno == ENODEV) { // device got disconnected -> stop reading
delete m_notify;
m_notify = 0;
QT_CLOSE(m_fd);
m_fd = -1;
}
return;
}
}
}
void QEvdevTouchScreenData::addTouchPoint(const Contact &contact, Qt::TouchPointStates *combinedStates)
@ -412,19 +435,31 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
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);
if (m_typeB || m_singleTouch)
if (m_singleTouch)
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)) {
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;
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) {
m_currentData.trackingId = data->value;
if (m_typeB) {
if (m_currentData.trackingId == -1)
if (m_currentData.trackingId == -1) {
m_contacts[m_currentSlot].state = Qt::TouchPointReleased;
else
} else {
m_contacts[m_currentSlot].state = Qt::TouchPointPressed;
m_contacts[m_currentSlot].trackingId = m_currentData.trackingId;
}
}
} else if (data->code == ABS_MT_TOUCH_MAJOR) {
m_currentData.maj = data->value;
@ -468,8 +503,11 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
it.next();
Contact &contact(it.value());
if (!contact.state)
continue;
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));
if (contact.state == Qt::TouchPointReleased) {
// 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.
if (contact.state == Qt::TouchPointReleased
if (!m_typeB && contact.state == Qt::TouchPointReleased
&& !m_lastContacts.contains(key)) {
it.remove();
continue;
@ -509,8 +547,14 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
while (it.hasNext()) {
it.next();
Contact &contact(it.value());
if (contact.state == Qt::TouchPointReleased)
it.remove();
if (contact.state == Qt::TouchPointReleased) {
if (m_typeB)
contact.state = static_cast<Qt::TouchPointState>(0);
else
it.remove();
} else {
contact.state = Qt::TouchPointStationary;
}
}
m_lastContacts = m_contacts;

View File

@ -61,17 +61,12 @@ quint64 spiStatesFromQState(QAccessible::State state)
{
quint64 spiState = 0;
setSpiStateBit(&spiState, ATSPI_STATE_EDITABLE);
setSpiStateBit(&spiState, ATSPI_STATE_ENABLED);
setSpiStateBit(&spiState, ATSPI_STATE_SHOWING);
setSpiStateBit(&spiState, ATSPI_STATE_VISIBLE);
setSpiStateBit(&spiState, ATSPI_STATE_SENSITIVE);
if (state.disabled) {
unsetSpiStateBit(&spiState, ATSPI_STATE_ENABLED);
unsetSpiStateBit(&spiState, ATSPI_STATE_SENSITIVE);
if (state.editable)
setSpiStateBit(&spiState, ATSPI_STATE_EDITABLE);
if (!state.disabled) {
setSpiStateBit(&spiState, ATSPI_STATE_ENABLED);
setSpiStateBit(&spiState, ATSPI_STATE_SENSITIVE);
}
if (state.selected)
setSpiStateBit(&spiState, ATSPI_STATE_SELECTED);
if (state.focused)
@ -95,9 +90,9 @@ quint64 spiStatesFromQState(QAccessible::State state)
setSpiStateBit(&spiState, ATSPI_STATE_BUSY);
if (state.marqueed || state.animated)
setSpiStateBit(&spiState, ATSPI_STATE_ANIMATED);
if (state.invisible || state.offscreen) {
unsetSpiStateBit(&spiState, ATSPI_STATE_SHOWING);
unsetSpiStateBit(&spiState, ATSPI_STATE_VISIBLE);
if (!state.invisible && !state.offscreen) {
setSpiStateBit(&spiState, ATSPI_STATE_SHOWING);
setSpiStateBit(&spiState, ATSPI_STATE_VISIBLE);
}
if (state.sizeable)
setSpiStateBit(&spiState, ATSPI_STATE_RESIZABLE);
@ -118,10 +113,8 @@ quint64 spiStatesFromQState(QAccessible::State state)
// if (state.HasPopup)
if (state.modal)
setSpiStateBit(&spiState, ATSPI_STATE_MODAL);
// Not implemented in Qt
// if (state.singleLine)
// setSpiStateBit(&spiState, ATSPI_STATE_SINGLE_LINE);
if (state.multiLine)
setSpiStateBit(&spiState, ATSPI_STATE_MULTI_LINE);
return spiState;
}

View File

@ -318,19 +318,23 @@ void QKdeThemePrivate::readKdeSystemPalette(const QSettings &kdeSettings, QPalet
const QBrush buttonBrushDark = QBrush(button.darker(v > 128 ? 200 : 50));
const QBrush buttonBrushDark150 = QBrush(button.darker(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::ButtonText, buttonBrushDark);
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::BrightText, whiteBrush);
pal->setBrush(QPalette::Disabled, QPalette::Base, buttonBrush);
pal->setBrush(QPalette::Disabled, QPalette::Window, buttonBrush);
pal->setBrush(QPalette::Disabled, QPalette::Highlight, buttonBrushDark150);
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);
}
/*!

View File

@ -247,6 +247,8 @@ QAccessibleInterface *AccessibleFactory::create(const QString &classname, QObjec
iface = 0;
} else if (classname == QLatin1String("QWidget")) {
iface = new QAccessibleWidget(widget);
} else if (classname == QLatin1String("QWindowContainer")) {
iface = new QAccessibleWindowContainer(widget);
}
return iface;

View File

@ -57,6 +57,8 @@
#include <qstyle.h>
#include <qstyleoption.h>
#include <qtextdocument.h>
#include <qwindow.h>
#include <private/qwindowcontainer_p.h>
#include <QtCore/qvarlengtharray.h>
#ifdef Q_OS_MAC
@ -845,7 +847,38 @@ QProgressBar *QAccessibleProgressBar::progressBar() const
}
#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
QT_END_NAMESPACE

View File

@ -195,6 +195,19 @@ protected:
};
#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
QT_END_NAMESPACE

View File

@ -48,6 +48,7 @@
"QScrollArea",
"QCalendarWidget",
"QDockWidget",
"QDesktopScreenWidget"
"QDesktopScreenWidget",
"QWindowContainer"
]
}

View File

@ -325,6 +325,14 @@ namespace QtAndroid
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)
{
QJNIEnvironmentPrivate env;
@ -369,6 +377,7 @@ namespace QtAndroid
x, y, w, h);
}
void destroySurface(int surfaceId)
{
QMutexLocker lock(&m_surfacesMutex);
@ -385,7 +394,8 @@ namespace QtAndroid
m_destroySurfaceMethodID,
surfaceId);
}
}
} // namespace QtAndroid
static jboolean startQtAndroidPlugin(JNIEnv* /*env*/, jobject /*object*//*, jobject applicationAssetManager*/)
{

View File

@ -116,5 +116,6 @@ namespace QtAndroid
const char *methodErrorMsgFmt();
const char *qtTagText();
QString deviceName();
}
#endif // ANDROID_APP_H

View File

@ -47,20 +47,21 @@
#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
#include <qpa/qplatformwindow.h>
#include <qpa/qwindowsysteminterface.h>
#include <qpa/qplatformwindow.h>
#warning sort the headers
#include "androidjnimain.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 "qandroidplatformscreen.h"
#include "qandroidplatformopenglwindow.h"
#include "qandroidplatformbackingstore.h"
#include "qandroidplatformservices.h"
#include "qandroidplatformfontdatabase.h"
#include "qandroidplatformclipboard.h"
#include "qandroidplatformaccessibility.h"
#include "qandroidplatformopenglcontext.h"
#include "qandroidplatformscreen.h"
#include "qandroidplatformtheme.h"
#include "qandroidsystemlocale.h"
@ -85,6 +86,10 @@ void *QAndroidPlatformNativeInterface::nativeResourceForIntegration(const QByteA
return &m_palettes;
if (resource == "AndroidStyleFonts")
return &m_fonts;
if (resource == "AndroidDeviceName") {
static QString deviceName = QtAndroid::deviceName();
return &deviceName;
}
return 0;
}
@ -119,11 +124,23 @@ QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList &para
m_androidFDB = new QAndroidPlatformFontDatabase();
m_androidPlatformServices = new QAndroidPlatformServices();
#ifndef QT_NO_CLIPBOARD
m_androidPlatformClipboard = new QAndroidPlatformClipboard();
#endif
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
{
switch (cap) {
@ -131,7 +148,10 @@ bool QAndroidPlatformIntegration::hasCapability(Capability cap) const
case ApplicationState: return true;
case NativeWidgets: return true;
case OpenGL: return true;
case ThreadedOpenGL: return true;
case ThreadedOpenGL:
if (needsWorkaround())
return false;
// fall through
default:
return QPlatformIntegration::hasCapability(cap);
}
@ -173,6 +193,11 @@ QAndroidPlatformIntegration::~QAndroidPlatformIntegration()
delete m_androidPlatformNativeInterface;
delete m_androidFDB;
delete m_androidSystemLocale;
#ifndef QT_NO_CLIPBOARD
delete m_androidPlatformClipboard;
#endif
QtAndroid::setAndroidPlatformIntegration(NULL);
}
@ -184,11 +209,7 @@ QPlatformFontDatabase *QAndroidPlatformIntegration::fontDatabase() const
#ifndef QT_NO_CLIPBOARD
QPlatformClipboard *QAndroidPlatformIntegration::clipboard() const
{
static QAndroidPlatformClipboard *clipboard = 0;
if (!clipboard)
clipboard = new QAndroidPlatformClipboard;
return clipboard;
return m_androidPlatformClipboard;
}
#endif

View File

@ -121,8 +121,9 @@ public:
QTouchDevice *touchDevice() const { return m_touchDevice; }
void setTouchDevice(QTouchDevice *touchDevice) { m_touchDevice = touchDevice; }
private:
static bool needsWorkaround();
EGLDisplay m_eglDisplay;
private:
QTouchDevice *m_touchDevice;
@ -143,7 +144,11 @@ private:
QPainter *m_compositePainter;
QAndroidPlatformNativeInterface *m_androidPlatformNativeInterface;
QAndroidPlatformServices *m_androidPlatformServices;
#ifndef QT_NO_CLIPBOARD
QPlatformClipboard *m_androidPlatformClipboard;
#endif
QAndroidSystemLocale *m_androidSystemLocale;
#ifndef QT_NO_ACCESSIBILITY
mutable QPlatformAccessibility *m_accessibility;

View File

@ -42,6 +42,7 @@
#include "qandroidplatformopenglcontext.h"
#include "qandroidplatformopenglwindow.h"
#include "qandroidplatformintegration.h"
#include <QSurface>
#include <QtGui/private/qopenglcontext_p.h>
@ -64,12 +65,14 @@ void QAndroidPlatformOpenGLContext::swapBuffers(QPlatformSurface *surface)
bool QAndroidPlatformOpenGLContext::makeCurrent(QPlatformSurface *surface)
{
bool ret = QEGLPlatformContext::makeCurrent(surface);
QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context());
const char *rendererString = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
if (rendererString != 0 && qstrncmp(rendererString, "Android Emulator", 16) == 0) {
QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context());
if (rendererString != 0 && qstrncmp(rendererString, "Android Emulator", 16) == 0)
ctx_d->workaround_missingPrecisionQualifiers = true;
}
if (!ctx_d->workaround_brokenFBOReadBack && QAndroidPlatformIntegration::needsWorkaround())
ctx_d->workaround_brokenFBOReadBack = true;
return ret;
}

View File

@ -665,8 +665,10 @@ void QCocoaFileDialogHelper::selectNameFilter(const QString &filter)
const int index = options()->nameFilters().indexOf(filter);
if (index != -1) {
QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
if (!delegate)
if (!delegate) {
options()->setInitiallySelectedNameFilter(filter);
return;
}
[delegate->mPopUpButton selectItemAtIndex:index];
[delegate filterChanged:nil];
}
@ -676,7 +678,7 @@ QString QCocoaFileDialogHelper::selectedNameFilter() const
{
QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
if (!delegate)
return QString();
return options()->initiallySelectedNameFilter();
int index = [delegate->mPopUpButton indexOfSelectedItem];
if (index >= options()->nameFilters().count())
return QString();

View File

@ -254,6 +254,7 @@ QHash<QPlatformTheme::Font, QFont *> qt_mac_createRoleFonts()
fonts.insert(QPlatformTheme::ListBoxFont, qt_mac_qfontForThemeFont(kThemeViewsFont));
fonts.insert(QPlatformTheme::TitleBarFont, qt_mac_qfontForThemeFont(kThemeWindowTitleFont));
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::HeaderViewFont, qt_mac_qfontForThemeFont(kThemeSmallSystemFont));
fonts.insert(QPlatformTheme::TipLabelFont, qt_mac_qfontForThemeFont(kThemeSmallSystemFont));

Some files were not shown because too many files have changed in this diff Show More