Fix typos in docs and comments
Found by codespell Pick-to: 6.4 Change-Id: Ie3e301a23830c773a2e9aff487c702a223d246eb Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
37bad1f43b
commit
9d2cc4dd76
@ -23,7 +23,7 @@ HTML.navigationseparator = \
|
|||||||
"<span class=\"naviSeparator\"> ◦ </span>\n"
|
"<span class=\"naviSeparator\"> ◦ </span>\n"
|
||||||
|
|
||||||
# Add some padding around code snippets, as we cannot
|
# Add some padding around code snippets, as we cannot
|
||||||
# currectly style them for QTextBrowser using only CSS.
|
# correctly style them for QTextBrowser using only CSS.
|
||||||
codeindent = 1
|
codeindent = 1
|
||||||
codeprefix = "\n"
|
codeprefix = "\n"
|
||||||
codesuffix = "\n"
|
codesuffix = "\n"
|
||||||
|
@ -125,7 +125,7 @@
|
|||||||
|
|
||||||
\snippet bindableproperties/bindablesubscription/bindableuser.h bindable-user-class
|
\snippet bindableproperties/bindablesubscription/bindableuser.h bindable-user-class
|
||||||
|
|
||||||
The second differenece is in the implementation of these calsses. First of
|
The second difference is in the implementation of these classes. First of
|
||||||
all, the dependencies between \c subscription and \c user are now tracked via
|
all, the dependencies between \c subscription and \c user are now tracked via
|
||||||
binding expressions:
|
binding expressions:
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@
|
|||||||
rendering parameters in local variables. As usual, we protect
|
rendering parameters in local variables. As usual, we protect
|
||||||
accesses to the member variables using the class's mutex. Storing
|
accesses to the member variables using the class's mutex. Storing
|
||||||
the member variables in local variables allows us to minimize the
|
the member variables in local variables allows us to minimize the
|
||||||
amout of code that needs to be protected by a mutex. This ensures
|
amount of code that needs to be protected by a mutex. This ensures
|
||||||
that the main thread will never have to block for too long when
|
that the main thread will never have to block for too long when
|
||||||
it needs to access \c{RenderThread}'s member variables (e.g., in
|
it needs to access \c{RenderThread}'s member variables (e.g., in
|
||||||
\c render()).
|
\c render()).
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
\snippet threads/semaphores/semaphores.cpp 0
|
\snippet threads/semaphores/semaphores.cpp 0
|
||||||
|
|
||||||
\c DataSize is the amout of data that the producer will generate.
|
\c DataSize is the amount of data that the producer will generate.
|
||||||
To keep the example as simple as possible, we make it a constant.
|
To keep the example as simple as possible, we make it a constant.
|
||||||
\c BufferSize is the size of the circular buffer. It is less than
|
\c BufferSize is the size of the circular buffer. It is less than
|
||||||
\c DataSize, meaning that at some point the producer will reach
|
\c DataSize, meaning that at some point the producer will reach
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
allow for gaps. If your cache needs to quickly jump back and forth between
|
allow for gaps. If your cache needs to quickly jump back and forth between
|
||||||
rows with significant gaps between them consider using QCache instead.
|
rows with significant gaps between them consider using QCache instead.
|
||||||
|
|
||||||
And thats it. A perfectly reasonable cache, using minimal memory for a very large
|
And that's it. A perfectly reasonable cache, using minimal memory for a very large
|
||||||
list. In this case the accessor for getting the words into the cache
|
list. In this case the accessor for getting the words into the cache
|
||||||
generates random information rather than fixed information. This allows you
|
generates random information rather than fixed information. This allows you
|
||||||
to see how the cache range is kept for a local number of rows when running the
|
to see how the cache range is kept for a local number of rows when running the
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
\snippet blockingfortuneclient/blockingclient.cpp 1
|
\snippet blockingfortuneclient/blockingclient.cpp 1
|
||||||
|
|
||||||
The requestNewFortune() slot calls FortuneThread::requestNewFortune(),
|
The requestNewFortune() slot calls FortuneThread::requestNewFortune(),
|
||||||
which \e shedules the request. When the thread has received a new fortune
|
which \e schedules the request. When the thread has received a new fortune
|
||||||
and emits newFortune(), our showFortune() slot is called:
|
and emits newFortune(), our showFortune() slot is called:
|
||||||
|
|
||||||
\snippet blockingfortuneclient/blockingclient.cpp 2
|
\snippet blockingfortuneclient/blockingclient.cpp 2
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
\ingroup examples-widgets-opengl
|
\ingroup examples-widgets-opengl
|
||||||
\title Cube OpenGL ES 2.0 example
|
\title Cube OpenGL ES 2.0 example
|
||||||
|
|
||||||
\brief The Cube OpenGL ES 2.0 example shows how to write mouse rotateable
|
\brief The Cube OpenGL ES 2.0 example shows how to write mouse rotatable
|
||||||
textured 3D cube using OpenGL ES 2.0 with Qt. It shows how to handle
|
textured 3D cube using OpenGL ES 2.0 with Qt. It shows how to handle
|
||||||
polygon geometries efficiently and how to write simple vertex and
|
polygon geometries efficiently and how to write simple vertex and
|
||||||
fragment shader for programmable graphics pipeline. In addition it
|
fragment shader for programmable graphics pipeline. In addition it
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
The example consists of a single class, \c TableEditor, which is a
|
The example consists of a single class, \c TableEditor, which is a
|
||||||
custom dialog widget that allows the user to modify data stored in
|
custom dialog widget that allows the user to modify data stored in
|
||||||
a database. We will first review the class definiton and how to
|
a database. We will first review the class definition and how to
|
||||||
use the class, then we will take a look at the implementation.
|
use the class, then we will take a look at the implementation.
|
||||||
|
|
||||||
\section1 TableEditor Class Definition
|
\section1 TableEditor Class Definition
|
||||||
@ -40,7 +40,7 @@
|
|||||||
We are also going to show how a table view can be used to cache
|
We are also going to show how a table view can be used to cache
|
||||||
any changes to the data until the user explicitly requests to
|
any changes to the data until the user explicitly requests to
|
||||||
submit them. For that reason we need to declare a \c submit() slot
|
submit them. For that reason we need to declare a \c submit() slot
|
||||||
in additon to the model and the editor's buttons.
|
in addition to the model and the editor's buttons.
|
||||||
|
|
||||||
\table 100%
|
\table 100%
|
||||||
\header \li Connecting to a Database
|
\header \li Connecting to a Database
|
||||||
|
@ -283,7 +283,7 @@
|
|||||||
|
|
||||||
The \c findWindow() function, on the other hand, is frequently
|
The \c findWindow() function, on the other hand, is frequently
|
||||||
used. It is called from the \c showInformation() function to
|
used. It is called from the \c showInformation() function to
|
||||||
detemine whether a window is already created for the given
|
determine whether a window is already created for the given
|
||||||
item (whenever we create an \c InformationWindow object, we
|
item (whenever we create an \c InformationWindow object, we
|
||||||
store a reference to it in the \c informationWindows list). The
|
store a reference to it in the \c informationWindows list). The
|
||||||
latter function is in turn called from our custom \c
|
latter function is in turn called from our custom \c
|
||||||
|
@ -200,7 +200,7 @@
|
|||||||
is started. We start the event loop by calling the application's
|
is started. We start the event loop by calling the application's
|
||||||
\l{QApplication::}{exec()} function; the result returned by this function
|
\l{QApplication::}{exec()} function; the result returned by this function
|
||||||
is used as the return value from the \c main() function. At this point,
|
is used as the return value from the \c main() function. At this point,
|
||||||
it becomes apparent why we instanciated \c AddressBook on the stack: It
|
it becomes apparent why we instantiated \c AddressBook on the stack: It
|
||||||
will now go out of scope. Therefore, \c AddressBook and all its child widgets
|
will now go out of scope. Therefore, \c AddressBook and all its child widgets
|
||||||
will be deleted, thus preventing memory leaks.
|
will be deleted, thus preventing memory leaks.
|
||||||
*/
|
*/
|
||||||
|
@ -171,7 +171,7 @@ QScrollArea provides a viewport onto the \c CharacterWidget when we set
|
|||||||
its widget and handles much of the work needed to provide a scrolling
|
its widget and handles much of the work needed to provide a scrolling
|
||||||
viewport.
|
viewport.
|
||||||
|
|
||||||
The font combo box is automatically popuplated with a list of available
|
The font combo box is automatically populated with a list of available
|
||||||
fonts. We list the available styles for the current font in the style
|
fonts. We list the available styles for the current font in the style
|
||||||
combobox using the following function:
|
combobox using the following function:
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@
|
|||||||
|
|
||||||
Because the complexity of arbitrary shape-shape intersection grows
|
Because the complexity of arbitrary shape-shape intersection grows
|
||||||
with an order of magnitude when the shapes are complex, this
|
with an order of magnitude when the shapes are complex, this
|
||||||
operation can be noticably time consuming. An alternative approach
|
operation can be noticeably time consuming. An alternative approach
|
||||||
is to reimplement the \l
|
is to reimplement the \l
|
||||||
{QGraphicsItem::collidesWithItem()}{collidesWithItem()} function
|
{QGraphicsItem::collidesWithItem()}{collidesWithItem()} function
|
||||||
to provide your own custom item and shape collision algorithm.
|
to provide your own custom item and shape collision algorithm.
|
||||||
|
@ -295,7 +295,7 @@
|
|||||||
|
|
||||||
This snippet has a somewhat random outcome: once in a while, a special
|
This snippet has a somewhat random outcome: once in a while, a special
|
||||||
image is assigned to the drag object's mime data. The pixmap is also
|
image is assigned to the drag object's mime data. The pixmap is also
|
||||||
assiged as the drag object's pixmap. This will ensure that you can see the
|
assigned as the drag object's pixmap. This will ensure that you can see the
|
||||||
image that is being dragged as a pixmap under the mouse cursor.
|
image that is being dragged as a pixmap under the mouse cursor.
|
||||||
|
|
||||||
\snippet graphicsview/dragdroprobot/coloritem.cpp 7
|
\snippet graphicsview/dragdroprobot/coloritem.cpp 7
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
\l{TreeItem::data}{data()} function to read entries in the \c itemData
|
\l{TreeItem::data}{data()} function to read entries in the \c itemData
|
||||||
list and a \l{TreeItem::setData}{setData()} function to allow them to
|
list and a \l{TreeItem::setData}{setData()} function to allow them to
|
||||||
be modified.
|
be modified.
|
||||||
As with other functions in the item, this simplifies the implemention
|
As with other functions in the item, this simplifies the implementation
|
||||||
of the model's \l{QAbstractItemModel::}{data()} and
|
of the model's \l{QAbstractItemModel::}{data()} and
|
||||||
\l{QAbstractItemModel::}{setData()} functions.
|
\l{QAbstractItemModel::}{setData()} functions.
|
||||||
|
|
||||||
|
@ -331,7 +331,7 @@
|
|||||||
collection of small items that all move around, it's unnecessary for
|
collection of small items that all move around, it's unnecessary for
|
||||||
Graphics View to waste time finding accurate update regions, so we set the
|
Graphics View to waste time finding accurate update regions, so we set the
|
||||||
QGraphicsView::BoundingRectViewportUpdate viewport update mode. The default
|
QGraphicsView::BoundingRectViewportUpdate viewport update mode. The default
|
||||||
would work fine, but this mode is noticably faster for this example.
|
would work fine, but this mode is noticeably faster for this example.
|
||||||
|
|
||||||
To improve rendering quality, we set QPainter::Antialiasing.
|
To improve rendering quality, we set QPainter::Antialiasing.
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@
|
|||||||
\snippet dialogs/findfiles/window.cpp 10
|
\snippet dialogs/findfiles/window.cpp 10
|
||||||
|
|
||||||
The private \c createComboBox() function is also called from the
|
The private \c createComboBox() function is also called from the
|
||||||
contructor. We create a QComboBox with the given text, and make it
|
constructor. We create a QComboBox with the given text, and make it
|
||||||
editable.
|
editable.
|
||||||
|
|
||||||
When the user enters a new string in an editable combobox, the
|
When the user enters a new string in an editable combobox, the
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
constructor, or by using the \l{QPainter::}{begin()} method as we
|
constructor, or by using the \l{QPainter::}{begin()} method as we
|
||||||
do in this example. The \l{QPainter::}{end()} method deactivates
|
do in this example. The \l{QPainter::}{end()} method deactivates
|
||||||
it. Note that the latter function is called automatically upon
|
it. Note that the latter function is called automatically upon
|
||||||
destruction when the painter is actived by its constructor. The
|
destruction when the painter is activated by its constructor. The
|
||||||
QPainter::Antialiasing render hint ensures that the paint engine
|
QPainter::Antialiasing render hint ensures that the paint engine
|
||||||
will antialias the edges of primitives if possible.
|
will antialias the edges of primitives if possible.
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
\image frozencolumn-example.png "Screenshot of the example"
|
\image frozencolumn-example.png "Screenshot of the example"
|
||||||
|
|
||||||
We use Qt's model/view framework to implement a table with its first
|
We use Qt's model/view framework to implement a table with its first
|
||||||
column frozen. This technique can be aplied to several columns or rows,
|
column frozen. This technique can be applied to several columns or rows,
|
||||||
as long as they are on the edge of the table.
|
as long as they are on the edge of the table.
|
||||||
|
|
||||||
The model/view framework allows for one model to be displayed in different
|
The model/view framework allows for one model to be displayed in different
|
||||||
|
@ -305,7 +305,7 @@
|
|||||||
receive tablet proximity events and forward them to \c TabletCanvas.
|
receive tablet proximity events and forward them to \c TabletCanvas.
|
||||||
The \c TabletEnterProximity and \c TabletLeaveProximity events are sent to
|
The \c TabletEnterProximity and \c TabletLeaveProximity events are sent to
|
||||||
the QApplication object, while other tablet events are sent to the QWidget's
|
the QApplication object, while other tablet events are sent to the QWidget's
|
||||||
\c event() hander, which sends them on to \l{QWidget::}{tabletEvent()}.
|
\c event() handler, which sends them on to \l{QWidget::}{tabletEvent()}.
|
||||||
|
|
||||||
|
|
||||||
\section1 TabletApplication Class Implementation
|
\section1 TabletApplication Class Implementation
|
||||||
|
@ -178,7 +178,7 @@
|
|||||||
making each shape item appear at its defined position. But
|
making each shape item appear at its defined position. But
|
||||||
remember to translate the coordinate system back when the item is
|
remember to translate the coordinate system back when the item is
|
||||||
drawn, otherwise the next shape item will appear at a position
|
drawn, otherwise the next shape item will appear at a position
|
||||||
relative to the item we drawed last.
|
relative to the item drawn last.
|
||||||
|
|
||||||
\snippet widgets/tooltips/sortingbox.cpp 10
|
\snippet widgets/tooltips/sortingbox.cpp 10
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@
|
|||||||
coordinate system around the origin (called shearing) using the
|
coordinate system around the origin (called shearing) using the
|
||||||
QPainter::shear() function.
|
QPainter::shear() function.
|
||||||
|
|
||||||
All the tranformation operations operate on QPainter's
|
All the transformation operations operate on QPainter's
|
||||||
tranformation matrix that you can retrieve using the
|
transformation matrix that you can retrieve using the
|
||||||
QPainter::worldTransform() function. A matrix transforms a point in the
|
QPainter::worldTransform() function. A matrix transforms a point in the
|
||||||
plane to another point. For more information about the
|
plane to another point. For more information about the
|
||||||
transformation matrix, see the \l {Coordinate System} and
|
transformation matrix, see the \l {Coordinate System} and
|
||||||
@ -265,11 +265,11 @@
|
|||||||
\snippet painting/transformations/window.cpp 1
|
\snippet painting/transformations/window.cpp 1
|
||||||
|
|
||||||
Then we create the \c RenderArea widgets that will render their
|
Then we create the \c RenderArea widgets that will render their
|
||||||
shapes with coordinate tranformations. By default the applied
|
shapes with coordinate transformations. By default the applied
|
||||||
operation is \uicontrol {No Transformation}, i.e. the shapes are
|
operation is \uicontrol {No Transformation}, i.e. the shapes are
|
||||||
rendered within the default coordinate system. We create and
|
rendered within the default coordinate system. We create and
|
||||||
initialize the associated \l {QComboBox}es with items
|
initialize the associated \l {QComboBox}es with items
|
||||||
corresponding to the various transformation operations decribed by
|
corresponding to the various transformation operations described by
|
||||||
the global \c Operation enum.
|
the global \c Operation enum.
|
||||||
|
|
||||||
We also connect the \l {QComboBox}es' \l
|
We also connect the \l {QComboBox}es' \l
|
||||||
@ -335,10 +335,10 @@
|
|||||||
also has good support for coordinate transformations. With the
|
also has good support for coordinate transformations. With the
|
||||||
Transformations application you can scale, rotate and translate
|
Transformations application you can scale, rotate and translate
|
||||||
QPainter's coordinate system. The order in which these
|
QPainter's coordinate system. The order in which these
|
||||||
tranformations are applied is essential for the result.
|
transformations are applied is essential for the result.
|
||||||
|
|
||||||
All the tranformation operations operate on QPainter's
|
All the transformation operations operate on QPainter's
|
||||||
tranformation matrix. For more information about the
|
transformation matrix. For more information about the
|
||||||
transformation matrix, see the \l {Coordinate System} and
|
transformation matrix, see the \l {Coordinate System} and
|
||||||
QTransform documentation.
|
QTransform documentation.
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ hr { height: 1px; border-width: 0; }
|
|||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; font-style:italic;">Try adding text to the cells in the table and experiment with the alignment of the paragraphs.</p>
|
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt; font-style:italic;">Try adding text to the cells in the table and experiment with the alignment of the paragraphs.</p>
|
||||||
<h2 style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Hyperlinks</span></h2>
|
<h2 style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Hyperlinks</span></h2>
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">QTextEdit is designed to support hyperlinks between documents, and this feature is used extensively in </span><span style=" font-size:11pt; font-style:italic;">Qt Assistant</span><span style=" font-size:11pt;">. Hyperlinks are automatically created when an HTML file is imported into an editor. Since the rich text framework supports hyperlinks natively, they can also be created programatically.</span></p>
|
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">QTextEdit is designed to support hyperlinks between documents, and this feature is used extensively in </span><span style=" font-size:11pt; font-style:italic;">Qt Assistant</span><span style=" font-size:11pt;">. Hyperlinks are automatically created when an HTML file is imported into an editor. Since the rich text framework supports hyperlinks natively, they can also be created programmatically.</span></p>
|
||||||
<h2 style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Undo and Redo</span></h2>
|
<h2 style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Undo and Redo</span></h2>
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;">Full support for undo and redo operations is built into QTextEdit and the underlying rich text framework. Operations on a document can be packaged together to make editing a more comfortable experience for the user.</p>
|
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;">Full support for undo and redo operations is built into QTextEdit and the underlying rich text framework. Operations on a document can be packaged together to make editing a more comfortable experience for the user.</p>
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-style:italic;">Try making changes to this document and press Ctrl+Z to undo them. You can always recover the original contents of the document.</span> </p></body></html>
|
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-style:italic;">Try making changes to this document and press Ctrl+Z to undo them. You can always recover the original contents of the document.</span> </p></body></html>
|
||||||
|
@ -91,7 +91,7 @@ is used extensively in
|
|||||||
[Qt Assistant](http://doc.qt.io/qt-5/qtassistant-index.html). Hyperlinks are
|
[Qt Assistant](http://doc.qt.io/qt-5/qtassistant-index.html). Hyperlinks are
|
||||||
automatically created when an HTML file is imported into an editor. Since the
|
automatically created when an HTML file is imported into an editor. Since the
|
||||||
rich text framework supports hyperlinks natively, they can also be created
|
rich text framework supports hyperlinks natively, they can also be created
|
||||||
programatically.
|
programmatically.
|
||||||
|
|
||||||
## Undo and Redo
|
## Undo and Redo
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class CursorView extends ImageView
|
|||||||
mHandle = handle;
|
mHandle = handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when the handle was moved programatically , with the delta amount in pixels
|
// Called when the handle was moved programmatically , with the delta amount in pixels
|
||||||
public void adjusted(int dx, int dy) {
|
public void adjusted(int dx, int dy) {
|
||||||
m_offsetX += dx;
|
m_offsetX += dx;
|
||||||
m_offsetY += dy;
|
m_offsetY += dy;
|
||||||
|
@ -565,7 +565,7 @@ QNativeFilePermissions::QNativeFilePermissions(std::optional<QFileDevice::Permis
|
|||||||
Return pointer to a \c SECURITY_ATTRIBUTES object describing the permissions.
|
Return pointer to a \c SECURITY_ATTRIBUTES object describing the permissions.
|
||||||
|
|
||||||
The returned pointer many be null if default permissions were requested or
|
The returned pointer many be null if default permissions were requested or
|
||||||
during bootstrap. The calles must call \c isOk() to check if the object
|
during bootstrap. The callers must call \c isOk() to check if the object
|
||||||
was successfully constructed before using this method.
|
was successfully constructed before using this method.
|
||||||
*/
|
*/
|
||||||
SECURITY_ATTRIBUTES *QNativeFilePermissions::securityAttributes()
|
SECURITY_ATTRIBUTES *QNativeFilePermissions::securityAttributes()
|
||||||
@ -1157,7 +1157,7 @@ bool QFileSystemEngine::fillPermissions(const QFileSystemEntry &entry, QFileSyst
|
|||||||
// Check for generic permissions and file-specific bits that most closely
|
// Check for generic permissions and file-specific bits that most closely
|
||||||
// represent POSIX permissions.
|
// represent POSIX permissions.
|
||||||
|
|
||||||
// Contants like FILE_GENERIC_{READ,WRITE,EXECUTE} cannot be used
|
// Constants like FILE_GENERIC_{READ,WRITE,EXECUTE} cannot be used
|
||||||
// here because they contain permission bits shared between all of them.
|
// here because they contain permission bits shared between all of them.
|
||||||
if (accessMask & (GENERIC_READ | FILE_READ_DATA))
|
if (accessMask & (GENERIC_READ | FILE_READ_DATA))
|
||||||
data.entryFlags |= readFlags;
|
data.entryFlags |= readFlags;
|
||||||
|
@ -613,7 +613,7 @@ void QEventDispatcherWasm::socketError(int socket, int err, const char* msg, voi
|
|||||||
// Emscripten makes socket callbacks while the main thread is busy-waiting for a mutex,
|
// Emscripten makes socket callbacks while the main thread is busy-waiting for a mutex,
|
||||||
// which can cause deadlocks if the callback code also tries to lock the same mutex.
|
// which can cause deadlocks if the callback code also tries to lock the same mutex.
|
||||||
// This is most easily reproducible by adding print statements, where each print requires
|
// This is most easily reproducible by adding print statements, where each print requires
|
||||||
// taking a mutex lock. Work around this by runnign the callback asynchronously, i.e. by using
|
// taking a mutex lock. Work around this by running the callback asynchronously, i.e. by using
|
||||||
// a native zero-timer, to make sure the main thread stack is completely unwond before calling
|
// a native zero-timer, to make sure the main thread stack is completely unwond before calling
|
||||||
// the Qt handler.
|
// the Qt handler.
|
||||||
// It is currently unclear if this problem is caused by code in Qt or in Emscripten, or
|
// It is currently unclear if this problem is caused by code in Qt or in Emscripten, or
|
||||||
@ -702,7 +702,7 @@ void QEventDispatcherWasm::setSocketState(int socket, bool setReadyRead, bool se
|
|||||||
state.readyRead |= setReadyRead;
|
state.readyRead |= setReadyRead;
|
||||||
state.readyWrite |= setReadyWrite;
|
state.readyWrite |= setReadyWrite;
|
||||||
|
|
||||||
// Wake any waiters for the given readyness. The waiter consumes
|
// Wake any waiters for the given readiness. The waiter consumes
|
||||||
// the ready state, returning the socket to not-ready.
|
// the ready state, returning the socket to not-ready.
|
||||||
if (QEventDispatcherWasm *waiter = state.waiter)
|
if (QEventDispatcherWasm *waiter = state.waiter)
|
||||||
if ((state.readyRead && state.waitForReadyRead) || (state.readyWrite && state.waitForReadyWrite))
|
if ((state.readyRead && state.waitForReadyRead) || (state.readyWrite && state.waitForReadyWrite))
|
||||||
@ -828,7 +828,7 @@ void QEventDispatcherWasm::runOnMainThread(std::function<void(void)> fn)
|
|||||||
fn();
|
fn();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Runs a function on the main thread. The function alwas runs asynchronously,
|
// Runs a function on the main thread. The function always runs asynchronously,
|
||||||
// also if the calling thread is the main thread.
|
// also if the calling thread is the main thread.
|
||||||
void QEventDispatcherWasm::runOnMainThreadAsync(std::function<void(void)> fn)
|
void QEventDispatcherWasm::runOnMainThreadAsync(std::function<void(void)> fn)
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@
|
|||||||
|
|
||||||
This is as for the two-argument and three-argument forms, supported by
|
This is as for the two-argument and three-argument forms, supported by
|
||||||
std::hypot(), but with as many numeric parameters as you care to pass to
|
std::hypot(), but with as many numeric parameters as you care to pass to
|
||||||
it. Uses \a first and each of the \a rest as co-ordinates, performing a
|
it. Uses \a first and each of the \a rest as coordinates, performing a
|
||||||
calculation equivalent to squaring each, summing and returning the square
|
calculation equivalent to squaring each, summing and returning the square
|
||||||
root, save that underflow and overflow are avoided as far as possible.
|
root, save that underflow and overflow are avoided as far as possible.
|
||||||
|
|
||||||
|
@ -252,13 +252,13 @@ void Uint8Array::set(const Uint8Array &source)
|
|||||||
m_uint8Array.call<void>("set", source.m_uint8Array); // copies source content
|
m_uint8Array.call<void>("set", source.m_uint8Array); // copies source content
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copies the Uint8Array conent to a destination on the heap
|
// Copies the Uint8Array content to a destination on the heap
|
||||||
void Uint8Array::copyTo(char *destination) const
|
void Uint8Array::copyTo(char *destination) const
|
||||||
{
|
{
|
||||||
Uint8Array(destination, length()).set(*this);
|
Uint8Array(destination, length()).set(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copies the Uint8Array conent to a destination on the heap
|
// Copies the Uint8Array content to a destination on the heap
|
||||||
void Uint8Array::copy(char *destination, const Uint8Array &source)
|
void Uint8Array::copy(char *destination, const Uint8Array &source)
|
||||||
{
|
{
|
||||||
Uint8Array(destination, source.length()).set(source);
|
Uint8Array(destination, source.length()).set(source);
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
%token IMPLIED "IMPLIED"
|
%token IMPLIED "IMPLIED"
|
||||||
%token FIXED "FIXED"
|
%token FIXED "FIXED"
|
||||||
|
|
||||||
-- conent spec
|
-- content spec
|
||||||
%token EMPTY "EMPTY"
|
%token EMPTY "EMPTY"
|
||||||
%token ANY "ANY"
|
%token ANY "ANY"
|
||||||
%token PCDATA "PCDATA"
|
%token PCDATA "PCDATA"
|
||||||
|
@ -423,7 +423,7 @@ void Continuation<Function, ResultType, ParentResultType>::runFunction()
|
|||||||
fulfillPromiseWithResult();
|
fulfillPromiseWithResult();
|
||||||
} else {
|
} else {
|
||||||
// This assert normally should never fail, this is to make sure
|
// This assert normally should never fail, this is to make sure
|
||||||
// that nothing unexpected happend.
|
// that nothing unexpected happened.
|
||||||
static_assert(std::is_invocable_v<Function, QFuture<ParentResultType>>,
|
static_assert(std::is_invocable_v<Function, QFuture<ParentResultType>>,
|
||||||
"The continuation is not invocable with the provided arguments");
|
"The continuation is not invocable with the provided arguments");
|
||||||
fulfillPromise(parentFuture);
|
fulfillPromise(parentFuture);
|
||||||
@ -438,7 +438,7 @@ void Continuation<Function, ResultType, ParentResultType>::runFunction()
|
|||||||
fulfillVoidPromise();
|
fulfillVoidPromise();
|
||||||
} else {
|
} else {
|
||||||
// This assert normally should never fail, this is to make sure
|
// This assert normally should never fail, this is to make sure
|
||||||
// that nothing unexpected happend.
|
// that nothing unexpected happened.
|
||||||
static_assert(std::is_invocable_v<Function, QFuture<ParentResultType>>,
|
static_assert(std::is_invocable_v<Function, QFuture<ParentResultType>>,
|
||||||
"The continuation is not invocable with the provided arguments");
|
"The continuation is not invocable with the provided arguments");
|
||||||
function(parentFuture);
|
function(parentFuture);
|
||||||
|
@ -860,7 +860,7 @@ bool QFutureInterfaceBase::isChainCanceled() const
|
|||||||
while (parent) {
|
while (parent) {
|
||||||
// If the future is in Canceled state because it had an exception, we want to
|
// If the future is in Canceled state because it had an exception, we want to
|
||||||
// continue checking the chain of parents for cancellation, otherwise if the exception
|
// continue checking the chain of parents for cancellation, otherwise if the exception
|
||||||
// is handeled inside the chain, it won't be interrupted even though cancellation has
|
// is handled inside the chain, it won't be interrupted even though cancellation has
|
||||||
// been requested.
|
// been requested.
|
||||||
if ((parent->state.loadRelaxed() & Canceled) && !parent->hasException)
|
if ((parent->state.loadRelaxed() & Canceled) && !parent->hasException)
|
||||||
return true;
|
return true;
|
||||||
|
@ -49,7 +49,7 @@ public:
|
|||||||
void release();
|
void release();
|
||||||
static QReadWriteLockPrivate *allocate();
|
static QReadWriteLockPrivate *allocate();
|
||||||
|
|
||||||
// Recusive mutex handling
|
// Recursive mutex handling
|
||||||
Qt::HANDLE currentWriter = {};
|
Qt::HANDLE currentWriter = {};
|
||||||
|
|
||||||
struct Reader {
|
struct Reader {
|
||||||
|
@ -484,7 +484,7 @@ bool QSemaphore::tryAcquire(int n, int timeout)
|
|||||||
|
|
||||||
It is equivalent to calling \c{tryAcquire(1, timeout)}, where the call
|
It is equivalent to calling \c{tryAcquire(1, timeout)}, where the call
|
||||||
times out on the given \a timeout value. The function returns \c true
|
times out on the given \a timeout value. The function returns \c true
|
||||||
on accquiring the resource successfully.
|
on acquiring the resource successfully.
|
||||||
|
|
||||||
\sa tryAcquire(), try_acquire(), try_acquire_until()
|
\sa tryAcquire(), try_acquire(), try_acquire_until()
|
||||||
*/
|
*/
|
||||||
|
@ -249,7 +249,7 @@ int getCurrentStandardUtcOffset()
|
|||||||
#else
|
#else
|
||||||
qTzSet();
|
qTzSet();
|
||||||
const time_t curr = time(nullptr);
|
const time_t curr = time(nullptr);
|
||||||
/* Set t to the UTC represntation of curr; the time whose local standard
|
/* Set t to the UTC representation of curr; the time whose local standard
|
||||||
time representation coincides with that differs from curr by local time's
|
time representation coincides with that differs from curr by local time's
|
||||||
standard offset. Note that gmtime() leaves the tm_isdst flag set to 0,
|
standard offset. Note that gmtime() leaves the tm_isdst flag set to 0,
|
||||||
so mktime() will, even if local time is currently using DST, return the
|
so mktime() will, even if local time is currently using DST, return the
|
||||||
|
@ -429,7 +429,7 @@ QDBusConnection &QDBusConnection::operator=(const QDBusConnection &other)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Opens a connection of type \a type to one of the known busses and
|
Opens a connection of type \a type to one of the known buses and
|
||||||
associate with it the connection name \a name. Returns a
|
associate with it the connection name \a name. Returns a
|
||||||
QDBusConnection object associated with that connection.
|
QDBusConnection object associated with that connection.
|
||||||
*/
|
*/
|
||||||
|
@ -39,7 +39,7 @@ QT_END_NAMESPACE
|
|||||||
|
|
||||||
This function needs to handle all messages to the path of the
|
This function needs to handle all messages to the path of the
|
||||||
virtual object, when the SubPath option is specified.
|
virtual object, when the SubPath option is specified.
|
||||||
The service, path, interface and methos are all part of the \a message.
|
The service, path, interface and methods are all part of the \a message.
|
||||||
Parameter \a connection is the connection handle.
|
Parameter \a connection is the connection handle.
|
||||||
Must return \c true when the message is handled, otherwise \c false (will generate dbus error message).
|
Must return \c true when the message is handled, otherwise \c false (will generate dbus error message).
|
||||||
*/
|
*/
|
||||||
|
@ -275,7 +275,7 @@ Q_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core");
|
|||||||
\value AlertMessage An object that is used to alert the user.
|
\value AlertMessage An object that is used to alert the user.
|
||||||
\value Animation An object that displays an animation.
|
\value Animation An object that displays an animation.
|
||||||
\value Application The application's main window.
|
\value Application The application's main window.
|
||||||
\value Assistant An object that provids interactive help.
|
\value Assistant An object that provides interactive help.
|
||||||
\value Border An object that represents a border.
|
\value Border An object that represents a border.
|
||||||
\value ButtonDropDown A button that drops down a list of items.
|
\value ButtonDropDown A button that drops down a list of items.
|
||||||
\value ButtonDropGrid A button that drops down a grid.
|
\value ButtonDropGrid A button that drops down a grid.
|
||||||
|
@ -151,7 +151,7 @@ QPlatformServices *QPlatformIntegration::services() const
|
|||||||
/*!
|
/*!
|
||||||
\enum QPlatformIntegration::Capability
|
\enum QPlatformIntegration::Capability
|
||||||
|
|
||||||
Capabilities are used to determing specific features of a platform integration
|
Capabilities are used to determine specific features of a platform integration
|
||||||
|
|
||||||
\value ThreadedPixmaps The platform uses a pixmap implementation that is reentrant
|
\value ThreadedPixmaps The platform uses a pixmap implementation that is reentrant
|
||||||
and can be used from multiple threads, like the raster paint engine and QImage based
|
and can be used from multiple threads, like the raster paint engine and QImage based
|
||||||
|
@ -460,7 +460,7 @@ void QQuaternion::getEulerAngles(float *pitch, float *yaw, float *roll) const
|
|||||||
// "A tutorial on SE(3) transformation parameterizations and on-manifold optimization".
|
// "A tutorial on SE(3) transformation parameterizations and on-manifold optimization".
|
||||||
|
|
||||||
// We can only detect Gimbal lock when we normalize, which we can't do when
|
// We can only detect Gimbal lock when we normalize, which we can't do when
|
||||||
// length is nearly zero. Do so before multiplying co-ordinates, to avoid
|
// length is nearly zero. Do so before multiplying coordinates, to avoid
|
||||||
// underflow.
|
// underflow.
|
||||||
const float len = length();
|
const float len = length();
|
||||||
const bool rescale = !qFuzzyIsNull(len);
|
const bool rescale = !qFuzzyIsNull(len);
|
||||||
|
@ -179,7 +179,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
/*!
|
/*!
|
||||||
\fn void QVector2D::normalize()
|
\fn void QVector2D::normalize()
|
||||||
|
|
||||||
Normalizes the currect vector in place. Nothing happens if this
|
Normalizes the current vector in place. Nothing happens if this
|
||||||
vector is a null vector or the length of the vector is very close to 1.
|
vector is a null vector or the length of the vector is very close to 1.
|
||||||
|
|
||||||
\sa length(), normalized()
|
\sa length(), normalized()
|
||||||
@ -656,7 +656,7 @@ QDataStream &operator>>(QDataStream &stream, QVector2D &vector)
|
|||||||
/*!
|
/*!
|
||||||
\fn void QVector3D::normalize()
|
\fn void QVector3D::normalize()
|
||||||
|
|
||||||
Normalizes the currect vector in place. Nothing happens if this
|
Normalizes the current vector in place. Nothing happens if this
|
||||||
vector is a null vector or the length of the vector is very close to 1.
|
vector is a null vector or the length of the vector is very close to 1.
|
||||||
|
|
||||||
\sa length(), normalized()
|
\sa length(), normalized()
|
||||||
@ -1332,7 +1332,7 @@ QDataStream &operator>>(QDataStream &stream, QVector3D &vector)
|
|||||||
/*!
|
/*!
|
||||||
\fn void QVector4D::normalize()
|
\fn void QVector4D::normalize()
|
||||||
|
|
||||||
Normalizes the currect vector in place. Nothing happens if this
|
Normalizes the current vector in place. Nothing happens if this
|
||||||
vector is a null vector or the length of the vector is very close to 1.
|
vector is a null vector or the length of the vector is very close to 1.
|
||||||
|
|
||||||
\sa length(), normalized()
|
\sa length(), normalized()
|
||||||
|
@ -360,7 +360,7 @@ bool QX11Info::isCompositingManagerRunning(int screen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns a new peeker id or -1 if some interal error has occurred.
|
Returns a new peeker id or -1 if some internal error has occurred.
|
||||||
Each peeker id is associated with an index in the buffered native
|
Each peeker id is associated with an index in the buffered native
|
||||||
event queue.
|
event queue.
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ qint32 QX11Info::generatePeekerId()
|
|||||||
Removes \a peekerId, which was earlier obtained via generatePeekerId().
|
Removes \a peekerId, which was earlier obtained via generatePeekerId().
|
||||||
|
|
||||||
Returns \c true on success or \c false if unknown peeker id was
|
Returns \c true on success or \c false if unknown peeker id was
|
||||||
provided or some interal error has occurred.
|
provided or some internal error has occurred.
|
||||||
|
|
||||||
\sa generatePeekerId()
|
\sa generatePeekerId()
|
||||||
*/
|
*/
|
||||||
|
@ -4304,7 +4304,7 @@ QDebug operator<<(QDebug dbg, const QRhiShaderResourceBindings &srb)
|
|||||||
|
|
||||||
Support for non-fill polygon modes is optional and is indicated by the
|
Support for non-fill polygon modes is optional and is indicated by the
|
||||||
QRhi::NonFillPolygonMode feature. With OpenGL ES and some Vulkan
|
QRhi::NonFillPolygonMode feature. With OpenGL ES and some Vulkan
|
||||||
implementations the feature will likely be reported as unspported, which
|
implementations the feature will likely be reported as unsupported, which
|
||||||
then means values other than Fill cannot be used.
|
then means values other than Fill cannot be used.
|
||||||
|
|
||||||
\value Fill The interior of the polygon is filled (default)
|
\value Fill The interior of the polygon is filled (default)
|
||||||
@ -4571,7 +4571,7 @@ QRhiResource::Type QRhiGraphicsPipeline::resourceType() const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\enum QRhiSwapChain::Format
|
\enum QRhiSwapChain::Format
|
||||||
Decribes the swapchain format. The default format is SDR.
|
Describes the swapchain format. The default format is SDR.
|
||||||
|
|
||||||
\value SDR 8-bit RGBA or BGRA, depending on the backend and platform. With
|
\value SDR 8-bit RGBA or BGRA, depending on the backend and platform. With
|
||||||
OpenGL ES in particular, it could happen that the platform provides less
|
OpenGL ES in particular, it could happen that the platform provides less
|
||||||
|
@ -562,7 +562,7 @@ QString QNetworkDiskCachePrivate::uniqueFileName(const QUrl &url)
|
|||||||
const QByteArray hash = QCryptographicHash::hash(cleanUrl.toEncoded(), QCryptographicHash::Sha1);
|
const QByteArray hash = QCryptographicHash::hash(cleanUrl.toEncoded(), QCryptographicHash::Sha1);
|
||||||
// convert sha1 to base36 form and return first 8 bytes for use as string
|
// convert sha1 to base36 form and return first 8 bytes for use as string
|
||||||
const QByteArray id = QByteArray::number(*(qlonglong*)hash.data(), 36).left(8);
|
const QByteArray id = QByteArray::number(*(qlonglong*)hash.data(), 36).left(8);
|
||||||
// generates <one-char subdir>/<8-char filname.d>
|
// generates <one-char subdir>/<8-char filename.d>
|
||||||
uint code = (uint)id.at(id.length()-1) % 16;
|
uint code = (uint)id.at(id.length()-1) % 16;
|
||||||
QString pathFragment = QString::number(code, 16) + u'/' + QLatin1StringView(id) + CACHE_POSTFIX;
|
QString pathFragment = QString::number(code, 16) + u'/' + QLatin1StringView(id) + CACHE_POSTFIX;
|
||||||
|
|
||||||
|
@ -784,7 +784,7 @@ bool QHostAddress::operator==(const QHostAddress &other) const
|
|||||||
Returns \c true if this host address is the same as the \a other address
|
Returns \c true if this host address is the same as the \a other address
|
||||||
given; otherwise returns \c false.
|
given; otherwise returns \c false.
|
||||||
|
|
||||||
The parameter \a mode controls which conversions are preformed between addresses
|
The parameter \a mode controls which conversions are performed between addresses
|
||||||
of differing protocols. If no \a mode is given, \c TolerantConversion is performed
|
of differing protocols. If no \a mode is given, \c TolerantConversion is performed
|
||||||
by default.
|
by default.
|
||||||
|
|
||||||
|
@ -1696,7 +1696,7 @@ TlsKey *X509Certificate::publicKey() const
|
|||||||
/*!
|
/*!
|
||||||
\class TlsCryptograph
|
\class TlsCryptograph
|
||||||
\internal (Network-private)
|
\internal (Network-private)
|
||||||
\brief TlsCryptograph is an abstract class, that allows a TLS pluging to implement QSslSocket.
|
\brief TlsCryptograph is an abstract class, that allows a TLS plugin to implement QSslSocket.
|
||||||
|
|
||||||
This abstract base class provides an interface that must be reimplemented by a TLS plugin,
|
This abstract base class provides an interface that must be reimplemented by a TLS plugin,
|
||||||
that supports QSslSocket. A class, implementing TlsCryptograph's interface, is responsible
|
that supports QSslSocket. A class, implementing TlsCryptograph's interface, is responsible
|
||||||
|
@ -127,7 +127,7 @@
|
|||||||
all color components so it can be defined to colorp or lowp depending upon
|
all color components so it can be defined to colorp or lowp depending upon
|
||||||
the implementation.
|
the implementation.
|
||||||
|
|
||||||
So there are differnt frament shader main functions, depending on the
|
So there are different fragment shader main functions, depending on the
|
||||||
number & type of pipelines the fragment needs to go through.
|
number & type of pipelines the fragment needs to go through.
|
||||||
|
|
||||||
The choice of which main() fragment shader string to use depends on:
|
The choice of which main() fragment shader string to use depends on:
|
||||||
|
@ -34,8 +34,8 @@ public:
|
|||||||
{
|
{
|
||||||
#if !QT_CONFIG(opengles2)
|
#if !QT_CONFIG(opengles2)
|
||||||
// There is nothing that says QOpenGLFramebufferObjectFormat needs a current
|
// There is nothing that says QOpenGLFramebufferObjectFormat needs a current
|
||||||
// context, so we need a fallback just to be safe, even though in pratice there
|
// context, so we need a fallback just to be safe, even though in practice there
|
||||||
// will usually be a context current.
|
// will usually be a current context.
|
||||||
QOpenGLContext *ctx = QOpenGLContext::currentContext();
|
QOpenGLContext *ctx = QOpenGLContext::currentContext();
|
||||||
const bool isES = ctx ? ctx->isOpenGLES() : QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL;
|
const bool isES = ctx ? ctx->isOpenGLES() : QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL;
|
||||||
internal_format = isES ? GL_RGBA : GL_RGBA8;
|
internal_format = isES ? GL_RGBA : GL_RGBA8;
|
||||||
|
@ -151,7 +151,7 @@ void QOpenGL2PaintEngineExPrivate::useSimpleShader()
|
|||||||
|
|
||||||
\note Any code or Qt API that internally activates or binds will
|
\note Any code or Qt API that internally activates or binds will
|
||||||
not affect the cache used by this function, which means they will
|
not affect the cache used by this function, which means they will
|
||||||
lead to inconsisent state. QPainter::beginNativePainting() takes
|
lead to inconsistent state. QPainter::beginNativePainting() takes
|
||||||
care of resetting the cache, so for user–code this is fine, but
|
care of resetting the cache, so for user–code this is fine, but
|
||||||
internally in the paint engine care must be taken to not call
|
internally in the paint engine care must be taken to not call
|
||||||
functions that may activate or bind under our feet.
|
functions that may activate or bind under our feet.
|
||||||
|
@ -3253,7 +3253,7 @@ bool QOpenGLTexture::isFixedSamplePositions() const
|
|||||||
create the mutable storage. You can use the other
|
create the mutable storage. You can use the other
|
||||||
allocateStorage() overload to specify exactly the pixel format
|
allocateStorage() overload to specify exactly the pixel format
|
||||||
and the pixel type to use when allocating mutable storage;
|
and the pixel type to use when allocating mutable storage;
|
||||||
this is particulary useful under certain OpenGL ES implementations
|
this is particularly useful under certain OpenGL ES implementations
|
||||||
(notably, OpenGL ES 2), where the pixel format and the pixel type
|
(notably, OpenGL ES 2), where the pixel format and the pixel type
|
||||||
used at allocation time must perfectly match the format
|
used at allocation time must perfectly match the format
|
||||||
and the type passed to any subsequent setData() call.
|
and the type passed to any subsequent setData() call.
|
||||||
@ -3318,7 +3318,7 @@ bool QOpenGLTexture::isStorageAllocated() const
|
|||||||
Attempts to create a texture view onto this texture. A texture
|
Attempts to create a texture view onto this texture. A texture
|
||||||
view is somewhat analogous to a view in SQL in that it presents
|
view is somewhat analogous to a view in SQL in that it presents
|
||||||
a restricted or reinterpreted view of the original data. Texture
|
a restricted or reinterpreted view of the original data. Texture
|
||||||
views do not allocate any more server-side storage, insted relying
|
views do not allocate any more server-side storage, instead relying
|
||||||
on the storage buffer of the source texture.
|
on the storage buffer of the source texture.
|
||||||
|
|
||||||
Texture views are only available when using immutable storage. For
|
Texture views are only available when using immutable storage. For
|
||||||
@ -4421,7 +4421,7 @@ float QOpenGLTexture::maximumAnisotropy() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets the wrap (or repeat mode) for all texture dimentions to \a mode.
|
Sets the wrap (or repeat mode) for all texture dimensions to \a mode.
|
||||||
|
|
||||||
\sa wrapMode()
|
\sa wrapMode()
|
||||||
*/
|
*/
|
||||||
|
@ -554,7 +554,7 @@ void QOpenGLWindow::resizeGL(int w, int h)
|
|||||||
|
|
||||||
\note When using a partial update behavior, like \c PartialUpdateBlend, the
|
\note When using a partial update behavior, like \c PartialUpdateBlend, the
|
||||||
output of the previous paintGL() call is preserved and, after the additional
|
output of the previous paintGL() call is preserved and, after the additional
|
||||||
drawing perfomed in the current invocation of the function, the content is
|
drawing performed in the current invocation of the function, the content is
|
||||||
blitted or blended over the content drawn directly to the window in
|
blitted or blended over the content drawn directly to the window in
|
||||||
paintUnderGL().
|
paintUnderGL().
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
loading which means applications are not directly linking to an GL
|
loading which means applications are not directly linking to an GL
|
||||||
implementation and thus direct function calls are not feasible.
|
implementation and thus direct function calls are not feasible.
|
||||||
|
|
||||||
In paintGL() the current context is always accessible by caling
|
In paintGL() the current context is always accessible by calling
|
||||||
QOpenGLContext::currentContext(). From this context an already initialized,
|
QOpenGLContext::currentContext(). From this context an already initialized,
|
||||||
ready-to-be-used QOpenGLFunctions instance is retrievable by calling
|
ready-to-be-used QOpenGLFunctions instance is retrievable by calling
|
||||||
QOpenGLContext::functions(). An alternative to prefixing every GL call is to
|
QOpenGLContext::functions(). An alternative to prefixing every GL call is to
|
||||||
@ -1425,7 +1425,7 @@ bool QOpenGLWidget::event(QEvent *e)
|
|||||||
if (isHidden())
|
if (isHidden())
|
||||||
break;
|
break;
|
||||||
Q_FALLTHROUGH();
|
Q_FALLTHROUGH();
|
||||||
case QEvent::Show: // reparenting may not lead to a resize so reinitalize on Show too
|
case QEvent::Show: // reparenting may not lead to a resize so reinitialize on Show too
|
||||||
if (d->initialized && !d->wrapperTexture && window()->windowHandle()) {
|
if (d->initialized && !d->wrapperTexture && window()->windowHandle()) {
|
||||||
// Special case: did grabFramebuffer() for a hidden widget that then became visible.
|
// Special case: did grabFramebuffer() for a hidden widget that then became visible.
|
||||||
// Recreate all resources since the context now needs to share with the TLW's.
|
// Recreate all resources since the context now needs to share with the TLW's.
|
||||||
|
@ -901,7 +901,7 @@ void QEvdevTouchScreenHandlerThread::filterAndSendTouchPoints()
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Update our estimate for the touch rate. We're making the assumption
|
// Update our estimate for the touch rate. We're making the assumption
|
||||||
// that this value will be mostly accurate with the occational bump,
|
// that this value will be mostly accurate with the occasional bump,
|
||||||
// so we're weighting the existing value high compared to the update.
|
// so we're weighting the existing value high compared to the update.
|
||||||
const double ratio = 0.9;
|
const double ratio = 0.9;
|
||||||
m_touchRate = sqrt(m_touchRate * m_touchRate * ratio + touchDelta * touchDelta * (1.0 - ratio));
|
m_touchRate = sqrt(m_touchRate * m_touchRate * ratio + touchDelta * touchDelta * (1.0 - ratio));
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
// In less fortunate cases one may need to build on a system with dev headers
|
// In less fortunate cases one may need to build on a system with dev headers
|
||||||
// from the dark ages. Let's pull a GL and define the missing stuff outselves.
|
// from the dark ages. Let's pull a GL and define the missing stuff ourselves.
|
||||||
|
|
||||||
#ifndef DRM_PLANE_TYPE_OVERLAY
|
#ifndef DRM_PLANE_TYPE_OVERLAY
|
||||||
#define DRM_PLANE_TYPE_OVERLAY 0
|
#define DRM_PLANE_TYPE_OVERLAY 0
|
||||||
|
@ -65,7 +65,7 @@ QOscBundle::QOscBundle(const QByteArray &data)
|
|||||||
|
|
||||||
if (oscTimeEpoch == 0 && oscTimePico == 1) {
|
if (oscTimeEpoch == 0 && oscTimePico == 1) {
|
||||||
// "The time tag value consisting of 63 zero bits followed by a
|
// "The time tag value consisting of 63 zero bits followed by a
|
||||||
// one in the least signifigant bit is a special case meaning
|
// one in the least significant bit is a special case meaning
|
||||||
// "immediately.""
|
// "immediately.""
|
||||||
isImmediate = true;
|
isImmediate = true;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ QList<QInputMethodEvent::Attribute> QIBusAttributeList::imAttributes() const
|
|||||||
QHash<QPair<int, int>, QTextCharFormat> rangeAttrs;
|
QHash<QPair<int, int>, QTextCharFormat> rangeAttrs;
|
||||||
const int numAttributes = attributes.size();
|
const int numAttributes = attributes.size();
|
||||||
|
|
||||||
// Merge text fomats for identical ranges into a single QTextFormat.
|
// Merge text formats for identical ranges into a single QTextFormat.
|
||||||
for (int i = 0; i < numAttributes; ++i) {
|
for (int i = 0; i < numAttributes; ++i) {
|
||||||
const QIBusAttribute &attr = attributes.at(i);
|
const QIBusAttribute &attr = attributes.at(i);
|
||||||
const QTextCharFormat &format = attr.format();
|
const QTextCharFormat &format = attr.format();
|
||||||
|
@ -145,7 +145,7 @@ QCocoaTouch::getCurrentTouchPointList(NSEvent *event, bool acceptSingleTouch)
|
|||||||
|
|
||||||
// Next: sadly, we need to check that our touch hash is in
|
// Next: sadly, we need to check that our touch hash is in
|
||||||
// sync with cocoa. This is typically not the case after a system
|
// sync with cocoa. This is typically not the case after a system
|
||||||
// gesture happend (like a four-finger-swipe to show expose).
|
// gesture happened (like a four-finger-swipe to show expose).
|
||||||
|
|
||||||
if (_touchCount != _currentTouches.size()) {
|
if (_touchCount != _currentTouches.size()) {
|
||||||
// Remove all instances, and basically start from scratch:
|
// Remove all instances, and basically start from scratch:
|
||||||
|
@ -188,7 +188,7 @@ public:
|
|||||||
|
|
||||||
// We can only load images from the asset library async. And this might take time, since it
|
// We can only load images from the asset library async. And this might take time, since it
|
||||||
// involves showing the authorization dialog. But the QFile API is synchronuous, so we need to
|
// involves showing the authorization dialog. But the QFile API is synchronuous, so we need to
|
||||||
// wait until we have access to the data. [ALAssetLibrary assetForUrl:] will shedule a block on
|
// wait until we have access to the data. [ALAssetLibrary assetForUrl:] will schedule a block on
|
||||||
// the current thread. But instead of spinning the event loop to force the block to execute, we
|
// the current thread. But instead of spinning the event loop to force the block to execute, we
|
||||||
// wrap the call inside a synchronuous dispatch queue so that it executes on another thread.
|
// wrap the call inside a synchronuous dispatch queue so that it executes on another thread.
|
||||||
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
|
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
|
|
||||||
// "Called on the delegate when the user has taken action to dismiss the
|
// "Called on the delegate when the user has taken action to dismiss the
|
||||||
// presentation successfully, after all animations are finished.
|
// presentation successfully, after all animations are finished.
|
||||||
// This is not called if the presentation is dismissed programatically."
|
// This is not called if the presentation is dismissed programmatically."
|
||||||
|
|
||||||
// So if document picker's view was dismissed, for example by swiping it away,
|
// So if document picker's view was dismissed, for example by swiping it away,
|
||||||
// we got this method called. But not if the dialog was cancelled or a file
|
// we got this method called. But not if the dialog was cancelled or a file
|
||||||
|
@ -51,7 +51,7 @@ static void executeBlockWithoutAnimation(Block block)
|
|||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
QIOSEditMenu is just a wrapper class around UIMenuController to
|
QIOSEditMenu is just a wrapper class around UIMenuController to
|
||||||
ease showing and hiding it correcly.
|
ease showing and hiding it correctly.
|
||||||
*/
|
*/
|
||||||
@interface QIOSEditMenu : NSObject
|
@interface QIOSEditMenu : NSObject
|
||||||
@property (nonatomic, assign) BOOL visible;
|
@property (nonatomic, assign) BOOL visible;
|
||||||
@ -792,7 +792,7 @@ static void executeBlockWithoutAnimation(Block block)
|
|||||||
SelectionPair selection = querySelection();
|
SelectionPair selection = querySelection();
|
||||||
int touchTextPos = QPlatformInputContext::queryFocusObject(Qt::ImCursorPosition, touchPoint).toInt();
|
int touchTextPos = QPlatformInputContext::queryFocusObject(Qt::ImCursorPosition, touchPoint).toInt();
|
||||||
|
|
||||||
// Ensure that the handels cannot be dragged past each other
|
// Ensure that the handles cannot be dragged past each other
|
||||||
if (_dragOnCursor)
|
if (_dragOnCursor)
|
||||||
selection.second = (touchTextPos > selection.first) ? touchTextPos : selection.first + 1;
|
selection.second = (touchTextPos > selection.first) ? touchTextPos : selection.first + 1;
|
||||||
else
|
else
|
||||||
@ -920,7 +920,7 @@ static void executeBlockWithoutAnimation(Block block)
|
|||||||
// But note, we only want to hide the menu, and not clear the selection.
|
// But note, we only want to hide the menu, and not clear the selection.
|
||||||
// Only when the user taps inside the input area do we want to clear the
|
// Only when the user taps inside the input area do we want to clear the
|
||||||
// selection as well. This is different from native behavior, but done so
|
// selection as well. This is different from native behavior, but done so
|
||||||
// deliberatly for cross-platform consistency. This will let the user click on
|
// deliberately for cross-platform consistency. This will let the user click on
|
||||||
// e.g "Bold" and "Italic" buttons elsewhere in the UI to modify the selected text.
|
// e.g "Bold" and "Italic" buttons elsewhere in the UI to modify the selected text.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -933,7 +933,7 @@ static void executeBlockWithoutAnimation(Block block)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// When no menu is showing, and the touch is inside the input
|
// When no menu is showing, and the touch is inside the input
|
||||||
// area, we check if we should show it. We wan't to do so if
|
// area, we check if we should show it. We want to do so if
|
||||||
// the tap doesn't result in the cursor changing position.
|
// the tap doesn't result in the cursor changing position.
|
||||||
_cursorPosOnPress = QInputMethod::queryFocusObject(Qt::ImCursorPosition, QVariant()).toInt();
|
_cursorPosOnPress = QInputMethod::queryFocusObject(Qt::ImCursorPosition, QVariant()).toInt();
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
|
|
||||||
// By keeping the responder (QIOSTextInputResponder in this case)
|
// By keeping the responder (QIOSTextInputResponder in this case)
|
||||||
// retained, we ensure that all messages sent to the view during
|
// retained, we ensure that all messages sent to the view during
|
||||||
// its lifetime in a window hierarcy will be able to traverse the
|
// its lifetime in a window hierarchy will be able to traverse the
|
||||||
// responder chain.
|
// responder chain.
|
||||||
- (void)willMoveToWindow:(UIWindow *)window
|
- (void)willMoveToWindow:(UIWindow *)window
|
||||||
{
|
{
|
||||||
|
@ -205,7 +205,7 @@
|
|||||||
{
|
{
|
||||||
// The initial frame computed during startup may happen before the view has
|
// The initial frame computed during startup may happen before the view has
|
||||||
// a window, meaning our calculations above will be wrong. We ensure that the
|
// a window, meaning our calculations above will be wrong. We ensure that the
|
||||||
// frame is set correctly once we have a window to base our calulations on.
|
// frame is set correctly once we have a window to base our calculations on.
|
||||||
[self setFrame:self.window.bounds];
|
[self setFrame:self.window.bounds];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -405,7 +405,7 @@
|
|||||||
// Prevent recursion caused by updating the status bar appearance (position
|
// Prevent recursion caused by updating the status bar appearance (position
|
||||||
// or visibility), which in turn may cause a layout of our subviews, and
|
// or visibility), which in turn may cause a layout of our subviews, and
|
||||||
// a reset of window-states, which themselves affect the view controller
|
// a reset of window-states, which themselves affect the view controller
|
||||||
// properties such as the statusbar visibilty.
|
// properties such as the statusbar visibility.
|
||||||
if (m_updatingProperties)
|
if (m_updatingProperties)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ QIOSWindow::~QIOSWindow()
|
|||||||
// According to the UIResponder documentation, Cocoa Touch should react to system interruptions
|
// According to the UIResponder documentation, Cocoa Touch should react to system interruptions
|
||||||
// that "might cause the view to be removed from the window" by sending touchesCancelled, but in
|
// that "might cause the view to be removed from the window" by sending touchesCancelled, but in
|
||||||
// practice this doesn't seem to happen when removing the view from its superview. To ensure that
|
// practice this doesn't seem to happen when removing the view from its superview. To ensure that
|
||||||
// Qt's internal state for touch and mouse handling is kept consistent, we therefor have to force
|
// Qt's internal state for touch and mouse handling is kept consistent, we therefore have to force
|
||||||
// cancellation of all touch events.
|
// cancellation of all touch events.
|
||||||
[m_view touchesCancelled:[NSSet set] withEvent:0];
|
[m_view touchesCancelled:[NSSet set] withEvent:0];
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ void QIOSWindow::requestActivateWindow()
|
|||||||
{
|
{
|
||||||
// Note that several windows can be active at the same time if they exist in the same
|
// Note that several windows can be active at the same time if they exist in the same
|
||||||
// hierarchy (transient children). But only one window can be QGuiApplication::focusWindow().
|
// hierarchy (transient children). But only one window can be QGuiApplication::focusWindow().
|
||||||
// Dispite the name, 'requestActivateWindow' means raise and transfer focus to the window:
|
// Despite the name, 'requestActivateWindow' means raise and transfer focus to the window:
|
||||||
if (blockedByModal())
|
if (blockedByModal())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -422,7 +422,7 @@ void QWasmCompositor::requestUpdateWindow(QWasmWindow *window, UpdateRequestDeli
|
|||||||
requestUpdate();
|
requestUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Requests an upate/new frame using RequestAnimationFrame
|
// Requests an update/new frame using RequestAnimationFrame
|
||||||
void QWasmCompositor::requestUpdate()
|
void QWasmCompositor::requestUpdate()
|
||||||
{
|
{
|
||||||
if (m_requestAnimationFrameId != -1)
|
if (m_requestAnimationFrameId != -1)
|
||||||
|
@ -119,7 +119,7 @@ QWasmIntegration::QWasmIntegration()
|
|||||||
}
|
}
|
||||||
} else if (!qtCanvasElements.isUndefined()) {
|
} else if (!qtCanvasElements.isUndefined()) {
|
||||||
qWarning() << "The qtCanvaseElements property is deprecated. Qt will stop reading"
|
qWarning() << "The qtCanvaseElements property is deprecated. Qt will stop reading"
|
||||||
<< "it in some future veresion, please use qtContainerElements instead";
|
<< "it in some future version, please use qtContainerElements instead";
|
||||||
emscripten::val length = qtCanvasElements["length"];
|
emscripten::val length = qtCanvasElements["length"];
|
||||||
int count = length.as<int>();
|
int count = length.as<int>();
|
||||||
for (int i = 0; i < count; ++i)
|
for (int i = 0; i < count; ++i)
|
||||||
|
@ -173,7 +173,7 @@ bool QWasmScreen::hasSpecialHtmlTargets() const
|
|||||||
{
|
{
|
||||||
static bool gotIt = []{
|
static bool gotIt = []{
|
||||||
// specialHTMLTargets is a JavaScript Array if available. Note that it is
|
// specialHTMLTargets is a JavaScript Array if available. Note that it is
|
||||||
// an abort() function if not, so a simple isUndefined() test wont't work here.
|
// an abort() function if not, so a simple isUndefined() test won't work here.
|
||||||
return emscripten::val::module_property("specialHTMLTargets")
|
return emscripten::val::module_property("specialHTMLTargets")
|
||||||
["constructor"]["name"].as<std::string>() == std::string("Array");
|
["constructor"]["name"].as<std::string>() == std::string("Array");
|
||||||
}();
|
}();
|
||||||
@ -286,7 +286,7 @@ void QWasmScreen::updateQScreenAndCanvasRenderSize()
|
|||||||
m_canvas.set("width", canvasSize.width());
|
m_canvas.set("width", canvasSize.width());
|
||||||
m_canvas.set("height", canvasSize.height());
|
m_canvas.set("height", canvasSize.height());
|
||||||
|
|
||||||
// Returns the html elments document/body position
|
// Returns the html elements document/body position
|
||||||
auto getElementBodyPosition = [](const emscripten::val &element) -> QPoint {
|
auto getElementBodyPosition = [](const emscripten::val &element) -> QPoint {
|
||||||
emscripten::val bodyRect = element["ownerDocument"]["body"].call<emscripten::val>("getBoundingClientRect");
|
emscripten::val bodyRect = element["ownerDocument"]["body"].call<emscripten::val>("getBoundingClientRect");
|
||||||
emscripten::val canvasRect = element.call<emscripten::val>("getBoundingClientRect");
|
emscripten::val canvasRect = element.call<emscripten::val>("getBoundingClientRect");
|
||||||
|
@ -1440,7 +1440,7 @@ void QWindowCreationContext::applyToMinMaxInfo(MINMAXINFO *mmi) const
|
|||||||
\list
|
\list
|
||||||
\li Raster type: handleWmPaint() is implemented to
|
\li Raster type: handleWmPaint() is implemented to
|
||||||
to bitblt the image. The DC can be accessed
|
to bitblt the image. The DC can be accessed
|
||||||
via getDC/Relase DC, which has a special handling
|
via getDC/releaseDC, which has special handling
|
||||||
when within a paint event (in that case, the DC obtained
|
when within a paint event (in that case, the DC obtained
|
||||||
from BeginPaint() is returned).
|
from BeginPaint() is returned).
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
// The size of the preview we display for selected image files. We set height
|
// The size of the preview we display for selected image files. We set height
|
||||||
// larger than width because generally there is more free space vertically
|
// larger than width because generally there is more free space vertically
|
||||||
// than horiztonally (setting the preview image will alway expand the width of
|
// than horizontally (setting the preview image will always expand the width of
|
||||||
// the dialog, but usually not the height). The image's aspect ratio will always
|
// the dialog, but usually not the height). The image's aspect ratio will always
|
||||||
// be preserved.
|
// be preserved.
|
||||||
#define PREVIEW_WIDTH 256
|
#define PREVIEW_WIDTH 256
|
||||||
|
@ -372,7 +372,7 @@ void QMYSQLResult::cleanup()
|
|||||||
if (d->result)
|
if (d->result)
|
||||||
mysql_free_result(d->result);
|
mysql_free_result(d->result);
|
||||||
|
|
||||||
// must iterate trough leftover result sets from multi-selects or stored procedures
|
// must iterate through leftover result sets from multi-selects or stored procedures
|
||||||
// if this isn't done subsequent queries will fail with "Commands out of sync"
|
// if this isn't done subsequent queries will fail with "Commands out of sync"
|
||||||
while (driver() && d->drv_d_func()->mysql && mysql_next_result(d->drv_d_func()->mysql) == 0) {
|
while (driver() && d->drv_d_func()->mysql && mysql_next_result(d->drv_d_func()->mysql) == 0) {
|
||||||
MYSQL_RES *res = mysql_store_result(d->drv_d_func()->mysql);
|
MYSQL_RES *res = mysql_store_result(d->drv_d_func()->mysql);
|
||||||
|
@ -1563,7 +1563,7 @@ bool QOCICols::execBatch(QOCIResultPrivate *d, QVariantList &boundValues, bool a
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//finaly we can execute
|
//finally we can execute
|
||||||
r = OCIStmtExecute(d->svc, d->sql, d->err,
|
r = OCIStmtExecute(d->svc, d->sql, d->err,
|
||||||
arrayBind ? 1 : columns[0].recordCount,
|
arrayBind ? 1 : columns[0].recordCount,
|
||||||
0, NULL, NULL,
|
0, NULL, NULL,
|
||||||
|
@ -1258,7 +1258,7 @@ bool QPSQLDriver::commitTransaction()
|
|||||||
// XXX
|
// XXX
|
||||||
// This hack is used to tell if the transaction has succeeded for the protocol versions of
|
// This hack is used to tell if the transaction has succeeded for the protocol versions of
|
||||||
// PostgreSQL below. For 7.x and other protocol versions we are left in the dark.
|
// PostgreSQL below. For 7.x and other protocol versions we are left in the dark.
|
||||||
// This hack can dissapear once there is an API to query this sort of information.
|
// This hack can disappear once there is an API to query this sort of information.
|
||||||
if (d->pro >= QPSQLDriver::Version8) {
|
if (d->pro >= QPSQLDriver::Version8) {
|
||||||
transaction_failed = qstrcmp(PQcmdStatus(res), "ROLLBACK") == 0;
|
transaction_failed = qstrcmp(PQcmdStatus(res), "ROLLBACK") == 0;
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,7 @@ void QPageSetupWidget::initUnits()
|
|||||||
m_ui.unitCombo->addItem(tr("Didot (DD)"), QVariant::fromValue(QPageLayout::Didot));
|
m_ui.unitCombo->addItem(tr("Didot (DD)"), QVariant::fromValue(QPageLayout::Didot));
|
||||||
m_ui.unitCombo->addItem(tr("Cicero (CC)"), QVariant::fromValue(QPageLayout::Cicero));
|
m_ui.unitCombo->addItem(tr("Cicero (CC)"), QVariant::fromValue(QPageLayout::Cicero));
|
||||||
|
|
||||||
// Initailly default to locale measurement system, mm if metric, in otherwise
|
// Initially default to locale measurement system, mm if metric, in otherwise
|
||||||
m_ui.unitCombo->setCurrentIndex(QLocale().measurementSystem() != QLocale::MetricSystem);
|
m_ui.unitCombo->setCurrentIndex(QLocale().measurementSystem() != QLocale::MetricSystem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -675,7 +675,7 @@ void QPrintDialogPrivate::selectPrinter(const QPrinter::OutputFormat outputForma
|
|||||||
options.grayscale->setChecked(true);
|
options.grayscale->setChecked(true);
|
||||||
|
|
||||||
// duplex priorities to be as follows:
|
// duplex priorities to be as follows:
|
||||||
// 1) a user-selected duplex value in the dialog has highest prority
|
// 1) a user-selected duplex value in the dialog has highest priority
|
||||||
// 2) duplex value set in the QPrinter
|
// 2) duplex value set in the QPrinter
|
||||||
QPrint::DuplexMode duplex;
|
QPrint::DuplexMode duplex;
|
||||||
if (explicitDuplexMode != QPrint::DuplexAuto && supportedDuplexMode.contains(explicitDuplexMode))
|
if (explicitDuplexMode != QPrint::DuplexAuto && supportedDuplexMode.contains(explicitDuplexMode))
|
||||||
|
@ -431,7 +431,7 @@ public:
|
|||||||
|
|
||||||
Note the difference between Point and DevicePixel. The Point unit is
|
Note the difference between Point and DevicePixel. The Point unit is
|
||||||
defined to be 1/72th of an inch, while the DevicePixel unit is
|
defined to be 1/72th of an inch, while the DevicePixel unit is
|
||||||
resolution dependant and is based on the actual pixels, or dots, on
|
resolution dependent and is based on the actual pixels, or dots, on
|
||||||
the printer.
|
the printer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ void QBenchmarkTestMethodData::setResult(
|
|||||||
\internal
|
\internal
|
||||||
|
|
||||||
The QBenchmarkIterationController class is used by the QBENCHMARK macro to
|
The QBenchmarkIterationController class is used by the QBENCHMARK macro to
|
||||||
drive the benchmarking loop. It is repsonsible for starting and stopping
|
drive the benchmarking loop. It is responsible for starting and stopping
|
||||||
the timing measurements as well as calling the result reporting functions.
|
the timing measurements as well as calling the result reporting functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ const char * QTest::benchmarkMetricName(QBenchmarkMetric metric)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\since 4.7
|
\since 4.7
|
||||||
Retuns the units of measure for the specified \a metric.
|
Returns the units of measure for the specified \a metric.
|
||||||
*/
|
*/
|
||||||
const char * QTest::benchmarkMetricUnit(QBenchmarkMetric metric)
|
const char * QTest::benchmarkMetricUnit(QBenchmarkMetric metric)
|
||||||
{
|
{
|
||||||
|
@ -1065,7 +1065,7 @@ QBenchmarkResult qMedian(const QList<QBenchmarkResult> &container)
|
|||||||
|
|
||||||
const int middle = count / 2;
|
const int middle = count / 2;
|
||||||
|
|
||||||
// ### handle even-sized containers here by doing an aritmetic mean of the two middle items.
|
// ### handle even-sized containers here by doing an arithmetic mean of the two middle items.
|
||||||
return containerCopy.at(middle);
|
return containerCopy.at(middle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2166,7 +2166,7 @@ static void initEnvironment()
|
|||||||
test that was executed with qExec() can't run another test via qExec() and
|
test that was executed with qExec() can't run another test via qExec() and
|
||||||
threads are not allowed to call qExec() simultaneously.
|
threads are not allowed to call qExec() simultaneously.
|
||||||
|
|
||||||
If you have programatically created the arguments, as opposed to getting them
|
If you have programmatically created the arguments, as opposed to getting them
|
||||||
from the arguments in \c main(), it is likely of interest to use
|
from the arguments in \c main(), it is likely of interest to use
|
||||||
QTest::qExec(QObject *, const QStringList &) since it is Unicode safe.
|
QTest::qExec(QObject *, const QStringList &) since it is Unicode safe.
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ namespace QTestPrivate {
|
|||||||
|
|
||||||
/*! \internal
|
/*! \internal
|
||||||
\class AppNapDisabler
|
\class AppNapDisabler
|
||||||
\brief Disables App Nap by registereing a bacground activity.
|
\brief Disables App Nap by registering a background activity.
|
||||||
|
|
||||||
App Nap remains disabled as long as the AppNapDisabler instance
|
App Nap remains disabled as long as the AppNapDisabler instance
|
||||||
exists.
|
exists.
|
||||||
|
@ -78,7 +78,7 @@ enum DebugSymbolsType
|
|||||||
{
|
{
|
||||||
UnknownSymbols = 0, // Unknown.
|
UnknownSymbols = 0, // Unknown.
|
||||||
NoSymbols = 1, // No usable symbols.
|
NoSymbols = 1, // No usable symbols.
|
||||||
LinkedSymbols = 2, // Link to symols available.
|
LinkedSymbols = 2, // Link to symbols available.
|
||||||
BuildIdSymbols = 4, // BuildId available.
|
BuildIdSymbols = 4, // BuildId available.
|
||||||
PlainSymbols = 8, // Ordinary symbols available.
|
PlainSymbols = 8, // Ordinary symbols available.
|
||||||
FastSymbols = 16 // Dwarf index available.
|
FastSymbols = 16 // Dwarf index available.
|
||||||
|
@ -752,7 +752,7 @@ static inline QStringList qmlCacheFileFilters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// File entry filter function for updateFile() that returns a list of files for
|
// File entry filter function for updateFile() that returns a list of files for
|
||||||
// QML import trees: DLLs (matching debgug) and .qml/,js, etc.
|
// QML import trees: DLLs (matching debug) and .qml/,js, etc.
|
||||||
class QmlDirectoryFileEntryFunction {
|
class QmlDirectoryFileEntryFunction {
|
||||||
public:
|
public:
|
||||||
enum Flags {
|
enum Flags {
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
\section1 Simple Widget Examples
|
\section1 Simple Widget Examples
|
||||||
|
|
||||||
Each of theses simple widget examples is written entirely within
|
Each of these simple widget examples is written entirely within
|
||||||
the \c main() function.
|
the \c main() function.
|
||||||
|
|
||||||
\list
|
\list
|
||||||
|
@ -3213,7 +3213,7 @@ bool QGraphicsItem::filtersChildEvents() const
|
|||||||
\since 4.6
|
\since 4.6
|
||||||
|
|
||||||
If \a enabled is true, this item is set to filter all events for
|
If \a enabled is true, this item is set to filter all events for
|
||||||
all its children (i.e., all events intented for any of its
|
all its children (i.e., all events intended for any of its
|
||||||
children are instead sent to this item); otherwise, if \a enabled
|
children are instead sent to this item); otherwise, if \a enabled
|
||||||
is false, this item will only handle its own events. The default
|
is false, this item will only handle its own events. The default
|
||||||
value is false.
|
value is false.
|
||||||
@ -3255,7 +3255,7 @@ bool QGraphicsItem::handlesChildEvents() const
|
|||||||
\deprecated
|
\deprecated
|
||||||
|
|
||||||
If \a enabled is true, this item is set to handle all events for
|
If \a enabled is true, this item is set to handle all events for
|
||||||
all its children (i.e., all events intented for any of its
|
all its children (i.e., all events intended for any of its
|
||||||
children are instead sent to this item); otherwise, if \a enabled
|
children are instead sent to this item); otherwise, if \a enabled
|
||||||
is false, this item will only handle its own events. The default
|
is false, this item will only handle its own events. The default
|
||||||
value is false.
|
value is false.
|
||||||
|
@ -545,7 +545,7 @@ void QGraphicsSceneIndex::clear()
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
This method is called when an \a item has been deleted.
|
This method is called when an \a item has been deleted.
|
||||||
The default implementation call removeItem. Be carefull,
|
The default implementation calls removeItem. Be careful,
|
||||||
if your implementation of removeItem use pure virtual method
|
if your implementation of removeItem use pure virtual method
|
||||||
of QGraphicsItem like boundingRect(), then you should reimplement
|
of QGraphicsItem like boundingRect(), then you should reimplement
|
||||||
this method.
|
this method.
|
||||||
|
@ -3804,7 +3804,7 @@ bool QGraphicsView::isTransformed() const
|
|||||||
|
|
||||||
\snippet code/src_gui_graphicsview_qgraphicsview.cpp 7
|
\snippet code/src_gui_graphicsview_qgraphicsview.cpp 7
|
||||||
|
|
||||||
To simplify interation with items using a transformed view, QGraphicsView
|
To simplify interaction with items using a transformed view, QGraphicsView
|
||||||
provides mapTo... and mapFrom... functions that can translate between
|
provides mapTo... and mapFrom... functions that can translate between
|
||||||
scene and view coordinates. For example, you can call mapToScene() to map
|
scene and view coordinates. For example, you can call mapToScene() to map
|
||||||
a view coordinate to a floating point scene coordinate, or mapFromScene()
|
a view coordinate to a floating point scene coordinate, or mapFromScene()
|
||||||
|
@ -1333,7 +1333,7 @@ void QListView::setSelection(const QRect &rect, QItemSelectionModel::SelectionFl
|
|||||||
if (!d->selectionModel)
|
if (!d->selectionModel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// if we are wrapping, we can only selecte inside the contents rectangle
|
// if we are wrapping, we can only select inside the contents rectangle
|
||||||
int w = qMax(d->contentsSize().width(), d->viewport->width());
|
int w = qMax(d->contentsSize().width(), d->viewport->width());
|
||||||
int h = qMax(d->contentsSize().height(), d->viewport->height());
|
int h = qMax(d->contentsSize().height(), d->viewport->height());
|
||||||
if (d->wrap && !QRect(0, 0, w, h).intersects(rect))
|
if (d->wrap && !QRect(0, 0, w, h).intersects(rect))
|
||||||
|
@ -113,7 +113,7 @@ protected:
|
|||||||
#ifndef QT_NO_STYLE_STYLESHEET
|
#ifndef QT_NO_STYLE_STYLESHEET
|
||||||
public slots:
|
public slots:
|
||||||
/** \internal
|
/** \internal
|
||||||
Cleanup the _q_stylesheet_parent propery.
|
Cleanup the _q_stylesheet_parent property.
|
||||||
*/
|
*/
|
||||||
void styleSheetParentDestroyed() {
|
void styleSheetParentDestroyed() {
|
||||||
setProperty("_q_stylesheet_parent", QVariant());
|
setProperty("_q_stylesheet_parent", QVariant());
|
||||||
|
@ -1050,7 +1050,7 @@ void QAbstractButton::keyPressEvent(QKeyEvent *e)
|
|||||||
// cleaned up when fixing task 194373. It's here to ensure that we
|
// cleaned up when fixing task 194373. It's here to ensure that we
|
||||||
// keep compatibility outside QAbstractItemView.
|
// keep compatibility outside QAbstractItemView.
|
||||||
d->moveFocus(e->key());
|
d->moveFocus(e->key());
|
||||||
if (hasFocus()) // nothing happend, propagate
|
if (hasFocus()) // nothing happened, propagate
|
||||||
e->ignore();
|
e->ignore();
|
||||||
} else {
|
} else {
|
||||||
// Prefer parent widget, use this if parent is absent
|
// Prefer parent widget, use this if parent is absent
|
||||||
|
@ -926,7 +926,7 @@ int QTabBar::addTab(const QIcon& icon, const QString &text)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Inserts a new tab with text \a text at position \a index. If \a
|
Inserts a new tab with text \a text at position \a index. If \a
|
||||||
index is out of range, the new tab is appened. Returns the new
|
index is out of range, the new tab is appended. Returns the new
|
||||||
tab's index.
|
tab's index.
|
||||||
*/
|
*/
|
||||||
int QTabBar::insertTab(int index, const QString &text)
|
int QTabBar::insertTab(int index, const QString &text)
|
||||||
@ -1405,7 +1405,7 @@ void QTabBar::setCurrentIndex(int index)
|
|||||||
// If the size hint depends on whether the tab is selected (for instance a style
|
// If the size hint depends on whether the tab is selected (for instance a style
|
||||||
// sheet rule that sets a bold font on the 'selected' tab) then we need to
|
// sheet rule that sets a bold font on the 'selected' tab) then we need to
|
||||||
// re-layout the entire tab bar. To minimize the cost, do that only if the
|
// re-layout the entire tab bar. To minimize the cost, do that only if the
|
||||||
// size hint changes for the tab that becomes the current tab (the old curent tab
|
// size hint changes for the tab that becomes the current tab (the old current tab
|
||||||
// will most certainly do the same). QTBUG-6905
|
// will most certainly do the same). QTBUG-6905
|
||||||
if (tabRect(index).size() != tabSizeHint(index))
|
if (tabRect(index).size() != tabSizeHint(index))
|
||||||
d->layoutTabs();
|
d->layoutTabs();
|
||||||
|
@ -2083,7 +2083,7 @@ void QTextEdit::setCursorWidth(int width)
|
|||||||
\brief whether the text edit accepts rich text insertions by the user
|
\brief whether the text edit accepts rich text insertions by the user
|
||||||
\since 4.1
|
\since 4.1
|
||||||
|
|
||||||
When this propery is set to false text edit will accept only
|
When this property is set to false text edit will accept only
|
||||||
plain text input from the user. For example through clipboard or drag and drop.
|
plain text input from the user. For example through clipboard or drag and drop.
|
||||||
|
|
||||||
This property's default is true.
|
This property's default is true.
|
||||||
|
@ -4134,7 +4134,7 @@ void QDomElementPrivate::save(QTextStream& s, int depth, int indent) const
|
|||||||
n.toText().data() directly on the node, because the node may not
|
n.toText().data() directly on the node, because the node may not
|
||||||
be a text element.
|
be a text element.
|
||||||
|
|
||||||
You can get a list of all the decendents of an element which have
|
You can get a list of all the descendents of an element which have
|
||||||
a specified tag name with elementsByTagName() or
|
a specified tag name with elementsByTagName() or
|
||||||
elementsByTagNameNS().
|
elementsByTagNameNS().
|
||||||
|
|
||||||
|
@ -3079,7 +3079,7 @@ void tst_QFuture::cancelContinuations()
|
|||||||
|
|
||||||
#ifndef QT_NO_EXCEPTIONS
|
#ifndef QT_NO_EXCEPTIONS
|
||||||
// The chain is cancelled in the middle of execution of continuations,
|
// The chain is cancelled in the middle of execution of continuations,
|
||||||
// while there's an exception in the chain, which is handeled inside
|
// while there's an exception in the chain, which is handled inside
|
||||||
// the continuations.
|
// the continuations.
|
||||||
{
|
{
|
||||||
QPromise<int> promise;
|
QPromise<int> promise;
|
||||||
|
@ -102,7 +102,7 @@ void tst_QImageWriter::getSetCheck()
|
|||||||
|
|
||||||
QCOMPARE((QIODevice *) var1, obj1.device());
|
QCOMPARE((QIODevice *) var1, obj1.device());
|
||||||
// The class should possibly handle a 0-pointer as a device, since
|
// The class should possibly handle a 0-pointer as a device, since
|
||||||
// there is a default contructor, so it's "handling" a 0 device by default.
|
// there is a default constructor, so it's "handling" a 0 device by default.
|
||||||
// For example: QMovie::setDevice(0) works just fine
|
// For example: QMovie::setDevice(0) works just fine
|
||||||
obj1.setDevice((QIODevice *)0);
|
obj1.setDevice((QIODevice *)0);
|
||||||
QCOMPARE((QIODevice *) 0, obj1.device());
|
QCOMPARE((QIODevice *) 0, obj1.device());
|
||||||
|
@ -83,7 +83,7 @@ is used extensively in
|
|||||||
[Qt Assistant](http://doc.qt.io/qt-5/qtassistant-index.html). Hyperlinks are
|
[Qt Assistant](http://doc.qt.io/qt-5/qtassistant-index.html). Hyperlinks are
|
||||||
automatically created when an HTML file is imported into an editor. Since the
|
automatically created when an HTML file is imported into an editor. Since the
|
||||||
rich text framework supports hyperlinks natively, they can also be created
|
rich text framework supports hyperlinks natively, they can also be created
|
||||||
programatically.
|
programmatically.
|
||||||
|
|
||||||
## Undo and Redo
|
## Undo and Redo
|
||||||
|
|
||||||
|
@ -10253,7 +10253,7 @@ void tst_QWidget::taskQTBUG_4055_sendSyntheticEnterLeave()
|
|||||||
QTRY_COMPARE(child.numEnterEvents, 1);
|
QTRY_COMPARE(child.numEnterEvents, 1);
|
||||||
QCOMPARE(child.numMouseMoveEvents, 0);
|
QCOMPARE(child.numMouseMoveEvents, 0);
|
||||||
|
|
||||||
// Sending synthetic enter/leave trough the parent's mousePressEvent handler.
|
// Sending synthetic enter/leave through the parent's mousePressEvent handler.
|
||||||
parent.child = &child;
|
parent.child = &child;
|
||||||
|
|
||||||
child.hide();
|
child.hide();
|
||||||
|
@ -4105,7 +4105,7 @@ void tst_QLineEdit::QTBUG13520_textNotVisible()
|
|||||||
QString sometext("01-ST16-01SIL-MPL001wfgsdfgsdgsdfgsdfgsdfgsdfgsdfg");
|
QString sometext("01-ST16-01SIL-MPL001wfgsdfgsdgsdfgsdfgsdfgsdfgsdfg");
|
||||||
le.setText(sometext);
|
le.setText(sometext);
|
||||||
le.setCursorPosition(0);
|
le.setCursorPosition(0);
|
||||||
QTest::qWait(100); //just make sure we get he lineedit correcly painted
|
QTest::qWait(100); //just make sure we get he lineedit correctly painted
|
||||||
|
|
||||||
auto expectedCursorCoordinate = le.width() - le.fontMetrics().horizontalAdvance(sometext);
|
auto expectedCursorCoordinate = le.width() - le.fontMetrics().horizontalAdvance(sometext);
|
||||||
// cursor does not leave widget to the left:
|
// cursor does not leave widget to the left:
|
||||||
|
@ -303,7 +303,7 @@ quint32 hashlittle( const void *key, size_t length, quint32 initval)
|
|||||||
* rest of the string. Every machine with memory protection I've seen
|
* rest of the string. Every machine with memory protection I've seen
|
||||||
* does it on word boundaries, so is OK with this. But VALGRIND will
|
* does it on word boundaries, so is OK with this. But VALGRIND will
|
||||||
* still catch it and complain. The masking trick does make the hash
|
* still catch it and complain. The masking trick does make the hash
|
||||||
* noticably faster for short strings (like English words).
|
* noticeably faster for short strings (like English words).
|
||||||
*/
|
*/
|
||||||
#ifndef VALGRIND
|
#ifndef VALGRIND
|
||||||
|
|
||||||
@ -511,7 +511,7 @@ void hashlittle2(
|
|||||||
* rest of the string. Every machine with memory protection I've seen
|
* rest of the string. Every machine with memory protection I've seen
|
||||||
* does it on word boundaries, so is OK with this. But VALGRIND will
|
* does it on word boundaries, so is OK with this. But VALGRIND will
|
||||||
* still catch it and complain. The masking trick does make the hash
|
* still catch it and complain. The masking trick does make the hash
|
||||||
* noticably faster for short strings (like English words).
|
* noticeably faster for short strings (like English words).
|
||||||
*/
|
*/
|
||||||
#ifndef VALGRIND
|
#ifndef VALGRIND
|
||||||
|
|
||||||
@ -711,7 +711,7 @@ quint32 hashbig( const void *key, size_t length, quint32 initval)
|
|||||||
* rest of the string. Every machine with memory protection I've seen
|
* rest of the string. Every machine with memory protection I've seen
|
||||||
* does it on word boundaries, so is OK with this. But VALGRIND will
|
* does it on word boundaries, so is OK with this. But VALGRIND will
|
||||||
* still catch it and complain. The masking trick does make the hash
|
* still catch it and complain. The masking trick does make the hash
|
||||||
* noticably faster for short strings (like English words).
|
* noticeably faster for short strings (like English words).
|
||||||
*/
|
*/
|
||||||
#ifndef VALGRIND
|
#ifndef VALGRIND
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ void tst_QHash::initTestCase()
|
|||||||
// lots of strings with alphabetical characters, vaguely reminiscent of
|
// lots of strings with alphabetical characters, vaguely reminiscent of
|
||||||
// a dictionary.
|
// a dictionary.
|
||||||
//
|
//
|
||||||
// this programatically generates a series like:
|
// this programmatically generates a series like:
|
||||||
// AAAAAA
|
// AAAAAA
|
||||||
// AAAAAB
|
// AAAAAB
|
||||||
// AAAAAC
|
// AAAAAC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user