Merge dev into 5.13

Change-Id: I8113c6d8735a151bd152e6096f8c8b8e63a05474
This commit is contained in:
Paul Wicking 2019-02-01 13:33:25 +01:00
commit 2bc362c9fa
229 changed files with 105270 additions and 1286 deletions

167
dist/changes-5.12.1 vendored Normal file
View File

@ -0,0 +1,167 @@
Qt 5.12.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.12.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- qmake / WinRT:
* Cross-builds will now ignore pre-set values of %INCLUDE% and %LIB%
when building target executables. If necessary, use configure's -I and
-L switches when building Qt, and pass QMAKE_INCDIR and QMAKE_LIBDIR
on qmake's command line when building own projects.
****************************************************************************
* Documentation *
****************************************************************************
- Fixed the icons for the "file save" action that were inaccurate
representations of a 3.5-inch floppy disk (the cut edge was on the wrong
side). Now all floppy representations are physically accurate.
****************************************************************************
* QtCore *
****************************************************************************
- [QTBUG-71256] QString, QByteArray and QLocale's toDouble return an infinity
on overflow (since 5.7), while setting ok to false; this was at odds with
their documented behavior of returning 0 on failure. The documentation now
reflects the actual behavior.
- [QTBUG-71868] QString, QByteArray and QLocale's toFloat returned an
infinity on double-overflow (since 5.7) but returned 0 on a finite double
outside float's range, while setting ok to false; this was at odds with
their documented behavior of returning 0 on any failure. They also
succeeded, returning zero, on underflow of float's range, unless double
underflowed, where they failed. Changed the handling of values outside
float's range to match that of values outside double's range: fail,
returning an infinity on overflow or zero on underflow. The documentation
now reflects the revised behavior, which matches toDouble().
- QCborStreamReader:
* [QTBUG-71426] Made setDevice() clear the last error.
- QCollator:
* [QTBUG-58621] Added support for collation in the C locale, albeit this is
only well-defined for ASCII. Collation sort keys remain unsupported on
Darwin.
- QContiguousCache:
* [QTBUG-52125] Fixed a memory leak.
- QObject:
* [QTBUG-32340] Fixed a bug that caused isSignalConnected() to return
true if the signal was connected and later disconnected.
* [QTBUG-71550] Fixed a bug that caused isSignalConnected() not to
report signals that were connected by the QML engine.
- QPluginLoader:
* [QTBUG-71443] Fixed the parsing of ELF headers (Linux, FreeBSD, Solaris,
etc.), which could cause certain valid plugins to not be deteced as
valid.
- QRegularExpression:
* [QTBUG-72539] The wildcardToRegularExpression method now returns a
properly anchored pattern.
- QSettings:
* [QTBUG-72007] Fixed QSettings parsing of blank spaces after comment lines
in INI-style configuration files.
- QStringListModel:
* setData will now emit the dataChanged() signal only if the string set
is different from the one already contained in the model
- QSysInfo:
* [QTBUG-72489] Now returns "Mojave" in prettyProductName() for macOS
10.14.
- QUrl:
* [QTBUG-71973] Changed the normalization done by
QUrl::NormalizePathSegments) to match what web browsers do for non-local
URLs.
****************************************************************************
* QtGui *
****************************************************************************
- Text:
* Fixed a bug where eliding text could change the height of its bounding
rectangle for certain fonts.
* Improved appearance of monochrome text on some platforms.
* Fixed so ShowTabsAndSpaces will use the correct font.
****************************************************************************
* QtSql *
****************************************************************************
- PostgreSQL:
* Added support for PostgreSQL 11
****************************************************************************
* QtWidgets *
****************************************************************************
- Reverted a Qt 5.12.0 behavior change in QToolTip that made plain tooltip
text be wrapped automatically.
- [QTBUG-72844] Fixed a regression related to accepting a Drag'n'Drop event.
- [QTBUG-27110] Reverted a change that caused a regression related to
styling a QListView using CSS.
- QWidgetLineControl/security:
* Zero-out the string that contains a password entered into the
QLineEdit
* Preallocate a buffer for the string that contains the entered value
when the QLineEdit serves as a password input field to minimize
reallocations.
****************************************************************************
* Platform Specific Changes *
****************************************************************************
- Android:
* QClipboard now supports HTML and URI data.
- Windows:
* Reduced the number of font engines that are created when loading new
fonts, fixing crashes in some special cases where a large number of
fonts are created during a short period of time.
- X11:
* [QTBUG-71296] Fixed a bug with open/close hand cursors not being shown
correctly.
* [QTBUG-46626][QTBUG-70756] Fixed a bug with dialogs hidden by other
windows in certain use cases.
****************************************************************************
* Third-Party Code *
****************************************************************************
- [QTBUG-65503] Removed xkbcommon from bundled sources. This library is
present on all supported platforms. The minimal required version now is
0.5.0.
- Updated bundled SQLite to version 3.26.0.
****************************************************************************
* Tools *
****************************************************************************
- moc now parses enum struct the same way as enum class therefore that
keyword can be used with the Q_ENUM macro as well as Q_FLAG and
Q_DECLARE_FLAGS.

View File

@ -3,7 +3,7 @@
dita.metadata.default.author = Qt Project
dita.metadata.default.permissions = all
dita.metadata.default.publisher = Qt Project
dita.metadata.default.copyryear = 2018
dita.metadata.default.copyryear = 2019
dita.metadata.default.copyrholder = The Qt Company Ltd
dita.metadata.default.audience = programmer

View File

@ -78,7 +78,7 @@ HTML.footer += \
" <ul id=\"menu-footer-submenu\" class=\"right clearfix\"><li id=\"menu-item-1795\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1795\"><a title=\"Sign into your account.\" href=\"https://account.qt.io/login\">Sign In</a></li>\n" \
" <li id=\"menu-item-10375\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-10375\"><a href=\"mailto:feedback@theqtcompany.com?Subject=Feedback%20about%20doc.qt.io%20site\">Feedback</a></li>\n" \
" <li id=\"menu-item-1494\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-1494\"><a href=\"http://qt.io/contact-us/\">Contact us</a></li>\n" \
" <li id=\"menu-item-4472\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-4472\"><a href=\"http://qt.io/about-us/\">© 2018 The Qt Company</a></li>\n" \
" <li id=\"menu-item-4472\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-4472\"><a href=\"http://qt.io/about-us/\">© 2019 The Qt Company</a></li>\n" \
" </ul>\n" \
"</div>\n" \
"</div>\n" \

View File

@ -8,7 +8,7 @@ HTML.footer = \
"</div>\n" \
"<div class=\"footer\">\n" \
" <p>\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2018 The Qt Company Ltd.\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2019 The Qt Company Ltd.\n" \
" Documentation contributions included herein are the copyrights of\n" \
" their respective owners.<br/>" \
" The documentation provided herein is licensed under the terms of the" \

View File

@ -5,7 +5,7 @@
HTML.footer = \
" </div>\n" \
" <p class=\"copy-notice\">\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2018 The Qt Company Ltd.\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2019 The Qt Company Ltd.\n" \
" Documentation contributions included herein are the copyrights of\n" \
" their respective owners. " \
" The documentation provided herein is licensed under the terms of the" \

View File

@ -181,6 +181,13 @@ void RenderWindow::setupVertexAttribs()
m_vbo.release();
}
bool RenderWindow::event(QEvent *ev)
{
if (ev->type() == QEvent::UpdateRequest)
render();
return QWindow::event(ev);
}
void RenderWindow::render()
{
if (!m_context->makeCurrent(this)) {
@ -227,9 +234,5 @@ void RenderWindow::render()
m_angle += 1.0f;
// Instead of 0 wait a few more milliseconds before rendering again. This is
// only here to make the UI widgets more responsive on slower machines. We
// can afford it since our rendering is so lightweight.
const int interval = 5;
QTimer::singleShot(interval, this, &RenderWindow::render);
requestUpdate();
}

View File

@ -72,6 +72,9 @@ signals:
void ready();
void error(const QString &msg);
protected:
bool event(QEvent *ev) override;
private slots:
void render();

View File

@ -98,6 +98,15 @@ void HelloWindow::exposeEvent(QExposeEvent *)
m_renderer->render();
}
bool HelloWindow::event(QEvent *ev)
{
if (ev->type() == QEvent::UpdateRequest) {
m_renderer->render();
requestUpdate();
}
return QWindow::event(ev);
}
void HelloWindow::mousePressEvent(QMouseEvent *)
{
updateColor();
@ -132,7 +141,7 @@ void Renderer::setAnimating(HelloWindow *window, bool animating)
if (animating) {
m_windows << window;
if (m_windows.size() == 1)
QTimer::singleShot(0, this, &Renderer::render);
window->requestUpdate();
} else {
m_currentWindow = 0;
m_windows.removeOne(window);
@ -196,8 +205,6 @@ void Renderer::render()
m_context->swapBuffers(surface);
m_fAngle += 1.0f;
QTimer::singleShot(0, this, &Renderer::render);
}
Q_GLOBAL_STATIC(QMutex, initMutex)

View File

@ -112,11 +112,12 @@ public:
QColor color() const;
void updateColor();
protected:
bool event(QEvent *ev) override;
void exposeEvent(QExposeEvent *event) override;
private:
void mousePressEvent(QMouseEvent *) override;
private:
int m_colorIndex;
QColor m_color;
const QSharedPointer<Renderer> m_renderer;

View File

@ -118,7 +118,7 @@ void QAnimationState::setAnimation(QAbstractAnimation *animation)
}
/*!
Returns the animation handle by this animation state, or 0 if there is no animation.
Returns the animation handle by this animation state, or \nullptr if there is no animation.
*/
QAbstractAnimation* QAnimationState::animation() const
{

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "analogclock.h"
#include <QtWidgets>
//! [0] //! [1]
AnalogClock::AnalogClock(QWidget *parent)
//! [0] //! [2]

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "button.h"
#include <QtWidgets>
//! [0]
Button::Button(const QString &text, QWidget *parent)
: QToolButton(parent)

View File

@ -48,13 +48,13 @@
**
****************************************************************************/
#include "button.h"
#include "calculator.h"
#include <QtWidgets>
#include <cmath>
#include "button.h"
#include "calculator.h"
//! [0]
Calculator::Calculator(QWidget *parent)
: QWidget(parent)

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "characterwidget.h"
#include <QtWidgets>
//! [0]
CharacterWidget::CharacterWidget(QWidget *parent)
: QWidget(parent), columns(16), lastKey(-1)

View File

@ -52,7 +52,6 @@
#define CHARACTERWIDGET_H
#include <QFont>
#include <QPoint>
#include <QSize>
#include <QString>
#include <QWidget>

View File

@ -170,8 +170,8 @@ void MainWindow::findStyles(const QFont &font)
//! [7]
//! [8]
QString style;
foreach (style, fontDatabase.styles(font.family()))
const QStringList styles = fontDatabase.styles(font.family());
for (const QString &style : styles)
styleCombo->addItem(style);
int styleIndex = styleCombo->findText(currentItem);
@ -201,15 +201,16 @@ void MainWindow::findSizes(const QFont &font)
// sizeCombo signals are now blocked until end of scope
sizeCombo->clear();
int size;
if (fontDatabase.isSmoothlyScalable(font.family(), fontDatabase.styleString(font))) {
foreach (size, QFontDatabase::standardSizes()) {
const QList<int> sizes = QFontDatabase::standardSizes();
for (const int size : sizes) {
sizeCombo->addItem(QVariant(size).toString());
sizeCombo->setEditable(true);
}
} else {
foreach (size, fontDatabase.smoothSizes(font.family(), fontDatabase.styleString(font))) {
const QList<int> sizes = fontDatabase.smoothSizes(font.family(), fontDatabase.styleString(font));
for (const int size : sizes ) {
sizeCombo->addItem(QVariant(size).toString());
sizeCombo->setEditable(false);
}

View File

@ -52,7 +52,6 @@
#define CODEEDITOR_H
#include <QPlainTextEdit>
#include <QObject>
QT_BEGIN_NAMESPACE
class QPaintEvent;

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "digitalclock.h"
#include <QtWidgets>
//! [0]
DigitalClock::DigitalClock(QWidget *parent)
: QLCDNumber(parent)

View File

@ -51,8 +51,8 @@
#include "elidedlabel.h"
#include <QPainter>
#include <QSizePolicy>
#include <QTextLayout>
#include <QDebug>
//! [0]
ElidedLabel::ElidedLabel(const QString &text, QWidget *parent)

View File

@ -51,11 +51,8 @@
#ifndef ELIDEDLABEL_H
#define ELIDEDLABEL_H
#include <QtWidgets/QFrame>
#include <QtCore/QRect>
#include <QtGui/QResizeEvent>
#include <QtCore/QString>
#include <QtWidgets/QWidget>
#include <QFrame>
#include <QString>
//! [0]
class ElidedLabel : public QFrame

View File

@ -50,7 +50,7 @@
#include "testwidget.h"
#include <QtWidgets/QApplication>
#include <QApplication>
//! [0]
int main( int argc, char *argv[] )

View File

@ -51,14 +51,13 @@
#include "testwidget.h"
#include "elidedlabel.h"
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSizePolicy>
#include <QtWidgets/QGridLayout>
#include <QGridLayout>
#include <QLabel>
#include <QPushButton>
//! [0]
TestWidget::TestWidget(QWidget *parent):
QWidget(parent)
TestWidget::TestWidget(QWidget *parent)
: QWidget(parent)
{
const QString romeo = tr(
"But soft, what light through yonder window breaks? / "
@ -116,7 +115,7 @@ TestWidget::TestWidget(QWidget *parent):
//! [3]
//! [4]
QGridLayout *layout = new QGridLayout();
QGridLayout *layout = new QGridLayout;
layout->addWidget(label, 0, 1, Qt::AlignCenter);
layout->addWidget(switchButton, 0, 2);
layout->addWidget(exitButton, 0, 3);

View File

@ -51,10 +51,9 @@
#ifndef TESTWIDGET_H
#define TESTWIDGET_H
#include <QtWidgets/QWidget>
#include <QtCore/QStringList>
#include <QtWidgets/QSlider>
#include <QtWidgets/QComboBox>
#include <QSlider>
#include <QStringList>
#include <QWidget>
class ElidedLabel;

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "iconpreviewarea.h"
#include <QtWidgets>
//! [0]
IconPreviewArea::IconPreviewArea(QWidget *parent)
: QWidget(parent)

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "iconsizespinbox.h"
#include <QtWidgets>
//! [0]
IconSizeSpinBox::IconSizeSpinBox(QWidget *parent)
: QSpinBox(parent)

View File

@ -48,11 +48,11 @@
**
****************************************************************************/
#include <QtWidgets>
#include "imagedelegate.h"
#include "iconpreviewarea.h"
#include <QtWidgets>
//! [0]
ImageDelegate::ImageDelegate(QObject *parent)
: QItemDelegate(parent)

View File

@ -122,7 +122,8 @@ void MainWindow::changeStyle(bool checked)
Q_ASSERT(style);
QApplication::setStyle(style);
foreach (QAbstractButton *button, sizeButtonGroup->buttons()) {
const QList<QAbstractButton*> buttons = sizeButtonGroup->buttons();
for (QAbstractButton *button : buttons) {
const QStyle::PixelMetric metric = static_cast<QStyle::PixelMetric>(sizeButtonGroup->id(button));
const int value = style->pixelMetric(metric);
switch (metric) {
@ -230,7 +231,8 @@ void MainWindow::addImages(const QString &directory)
{
QFileDialog fileDialog(this, tr("Open Images"), directory);
QStringList mimeTypeFilters;
foreach (const QByteArray &mimeTypeName, QImageReader::supportedMimeTypes())
const QList<QByteArray> mimeTypes = QImageReader::supportedMimeTypes();
for (const QByteArray &mimeTypeName : mimeTypes)
mimeTypeFilters.append(mimeTypeName);
mimeTypeFilters.sort();
fileDialog.setMimeTypeFilters(mimeTypeFilters);
@ -246,7 +248,7 @@ void MainWindow::addImages(const QString &directory)
void MainWindow::loadImages(const QStringList &fileNames)
{
foreach (const QString &fileName, fileNames) {
for (const QString &fileName : fileNames) {
const int row = imagesTable->rowCount();
imagesTable->setRowCount(row + 1);
//! [13]
@ -469,7 +471,8 @@ void MainWindow::createActions()
QMenu *viewMenu = menuBar()->addMenu(tr("&View"));
styleActionGroup = new QActionGroup(this);
foreach (const QString &styleName, QStyleFactory::keys()) {
const QStringList styleKeys = QStyleFactory::keys();
for (const QString &styleName : styleKeys) {
QAction *action = new QAction(tr("%1 Style").arg(styleName), styleActionGroup);
action->setData(styleName);
action->setCheckable(true);
@ -508,8 +511,9 @@ void MainWindow::createContextMenu()
//! [31]
void MainWindow::checkCurrentStyle()
{
foreach (QAction *action, styleActionGroup->actions()) {
QString styleName = action->data().toString();
const QList<QAction *> actions = styleActionGroup->actions();
for (QAction *action : actions) {
const QString styleName = action->data().toString();
QScopedPointer<QStyle> candidate(QStyleFactory::create(styleName));
Q_ASSERT(!candidate.isNull());
if (candidate->metaObject()->className()

View File

@ -60,8 +60,6 @@ QT_BEGIN_NAMESPACE
class QAction;
class QActionGroup;
class QLabel;
class QMenu;
class QRadioButton;
class QButtonGroup;
class QTableWidget;
QT_END_NAMESPACE

View File

@ -48,6 +48,8 @@
**
****************************************************************************/
#include "imageviewer.h"
#include <QtWidgets>
#if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h>
@ -56,8 +58,6 @@
#endif
#endif
#include "imageviewer.h"
//! [0]
ImageViewer::ImageViewer(QWidget *parent)
: QMainWindow(parent), imageLabel(new QLabel),
@ -151,7 +151,7 @@ static void initializeImageFileDialog(QFileDialog &dialog, QFileDialog::AcceptMo
QStringList mimeTypeFilters;
const QByteArrayList supportedMimeTypes = acceptMode == QFileDialog::AcceptOpen
? QImageReader::supportedMimeTypes() : QImageWriter::supportedMimeTypes();
foreach (const QByteArray &mimeTypeName, supportedMimeTypes)
for (const QByteArray &mimeTypeName : supportedMimeTypes)
mimeTypeFilters.append(mimeTypeName);
mimeTypeFilters.sort();
dialog.setMimeTypeFilters(mimeTypeFilters);

View File

@ -54,7 +54,6 @@
#include <QWidget>
QT_BEGIN_NAMESPACE
class QComboBox;
class QLineEdit;
QT_END_NAMESPACE

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "movieplayer.h"
#include <QtWidgets>
MoviePlayer::MoviePlayer(QWidget *parent)
: QWidget(parent)
{

View File

@ -153,8 +153,9 @@ void MainWindow::createActions()
openAct->setShortcuts(QKeySequence::Open);
connect(openAct, &QAction::triggered, this, &MainWindow::open);
foreach (QByteArray format, QImageWriter::supportedImageFormats()) {
QString text = tr("%1...").arg(QString(format).toUpper());
const QList<QByteArray> imageFormats = QImageWriter::supportedImageFormats();
for (const QByteArray &format : imageFormats) {
QString text = tr("%1...").arg(QString::fromLatin1(format).toUpper());
QAction *action = new QAction(text, this);
action->setData(format);
@ -193,7 +194,7 @@ void MainWindow::createMenus()
//! [15] //! [16]
{
saveAsMenu = new QMenu(tr("&Save As"), this);
foreach (QAction *action, saveAsActs)
for (QAction *action : qAsConst(saveAsActs))
saveAsMenu->addAction(action);
fileMenu = new QMenu(tr("&File"), this);

View File

@ -48,6 +48,8 @@
**
****************************************************************************/
#include "scribblearea.h"
#include <QtWidgets>
#if defined(QT_PRINTSUPPORT_LIB)
#include <QtPrintSupport/qtprintsupportglobal.h>
@ -57,8 +59,6 @@
#endif
#endif
#include "scribblearea.h"
//! [0]
ScribbleArea::ScribbleArea(QWidget *parent)
: QWidget(parent)

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "slidersgroup.h"
#include <QtWidgets>
//! [0]
SlidersGroup::SlidersGroup(Qt::Orientation orientation, const QString &title,
QWidget *parent)

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "norwegianwoodstyle.h"
#include <QtWidgets>
NorwegianWoodStyle::NorwegianWoodStyle() :
QProxyStyle(QStyleFactory::create("windows"))
{

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "norwegianwoodstyle.h"
#include "widgetgallery.h"
#include "norwegianwoodstyle.h"
#include <QtWidgets>
//! [0]
WidgetGallery::WidgetGallery(QWidget *parent)

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "stylesheeteditor.h"
#include <QtWidgets>
StyleSheetEditor::StyleSheetEditor(QWidget *parent)
: QDialog(parent)
{

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "tabletapplication.h"
#include <QtWidgets>
//! [0]
bool TabletApplication::event(QEvent *event)
{

View File

@ -48,12 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include <stdlib.h>
#include "tetrixwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "tetrixboard.h"
#include <QtWidgets>
//! [0]
TetrixBoard::TetrixBoard(QWidget *parent)
: QFrame(parent)

View File

@ -48,12 +48,10 @@
**
****************************************************************************/
#include <QtCore>
#include <stdlib.h>
#include "tetrixpiece.h"
#include <QtCore>
//! [0]
void TetrixPiece::setRandomShape()
{

View File

@ -51,7 +51,6 @@
#ifndef TETRIXWINDOW_H
#define TETRIXWINDOW_H
#include <QFrame>
#include <QWidget>
QT_BEGIN_NAMESPACE

View File

@ -48,8 +48,6 @@
**
****************************************************************************/
#include <QtWidgets>
#include "shapeitem.h"
//! [0]

View File

@ -48,12 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include <stdlib.h>
#include "sortingbox.h"
#include <QtWidgets>
//! [0]
SortingBox::SortingBox(QWidget *parent)
: QWidget(parent)
@ -140,7 +138,7 @@ void SortingBox::paintEvent(QPaintEvent * /* event */)
{
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
foreach (ShapeItem shapeItem, shapeItems) {
for (const ShapeItem &shapeItem : qAsConst(shapeItems)) {
//! [8] //! [9]
painter.translate(shapeItem.position());
//! [9] //! [10]

View File

@ -51,10 +51,10 @@
#ifndef SORTINGBOX_H
#define SORTINGBOX_H
#include <QWidget>
#include "shapeitem.h"
#include <QWidget>
QT_BEGIN_NAMESPACE
class QAction;
class QPoint;

View File

@ -59,7 +59,9 @@ LocaleSelector::LocaleSelector(QWidget *parent)
int index = 0;
for (int _lang = QLocale::C; _lang <= QLocale::LastLanguage; ++_lang) {
QLocale::Language lang = static_cast<QLocale::Language>(_lang);
foreach (const QLocale &l, QLocale::matchingLocales(lang, QLocale::AnyScript, QLocale::AnyCountry)) {
const QList<QLocale> locales =
QLocale::matchingLocales(lang, QLocale::AnyScript, QLocale::AnyCountry);
for (const QLocale &l : locales) {
QString label = QLocale::languageToString(l.language());
label += QLatin1Char('/');
label += QLocale::countryToString(l.country());

View File

@ -48,12 +48,12 @@
**
****************************************************************************/
#include <QLineEdit>
#include <QVBoxLayout>
#include "dialog.h"
#include "wigglywidget.h"
#include <QLineEdit>
#include <QVBoxLayout>
//! [0]
Dialog::Dialog(QWidget *parent)
: QDialog(parent)

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QApplication>
#include "dialog.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "wigglywidget.h"
#include <QtWidgets>
//! [0]
WigglyWidget::WigglyWidget(QWidget *parent)
: QWidget(parent)

View File

@ -48,10 +48,10 @@
**
****************************************************************************/
#include <QtWidgets>
#include "previewwindow.h"
#include <QtWidgets>
//! [0]
PreviewWindow::PreviewWindow(QWidget *parent)
: QWidget(parent)

View File

@ -14,6 +14,7 @@ include(unix.conf)
QMAKE_RESOURCE = /Developer/Tools/Rez
QMAKE_EXTENSION_SHLIB = dylib
QMAKE_EXTENSIONS_AUX_SHLIB = tbd
QMAKE_LIBDIR =
# sdk.prf will prefix the proper SDK sysroot

View File

@ -531,8 +531,11 @@ defineTest(qtConfResolveLibs) {
unix {
# Under UNIX, we look for actual shared libraries, in addition
# to static ones.
shexts = $$QMAKE_EXTENSION_SHLIB $$QMAKE_EXTENSIONS_AUX_SHLIB
for (ext, shexts) {
lcan += $${QMAKE_PREFIX_SHLIB}$${lib}.$${ext}
}
lcan += \
$${QMAKE_PREFIX_SHLIB}$${lib}.$${QMAKE_EXTENSION_SHLIB} \
$${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB}
} else {
# Under Windows, we look only for static libraries, as even for DLLs

View File

@ -1,4 +1,4 @@
QMAKE_TARGET_COMPANY = The Qt Company Ltd.
isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ Application Development Framework
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2018 The Qt Company Ltd.
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2019 The Qt Company Ltd.

View File

@ -10,7 +10,6 @@ build_pass {
windeployqt.commands = $$QMAKE_WINDEPLOYQT $$WINDEPLOYQT_OPTIONS -list target $$WINDEPLOYQT_TARGET > $$WINDEPLOYQT_OUTPUT
windeployqt_clean.commands = if exist $$WINDEPLOYQT_OUTPUT for /f %i in ($$WINDEPLOYQT_OUTPUT) do $$QMAKE_DEL_FILE %~fi && $$QMAKE_DEL_DIR %~pi
QMAKE_EXTRA_TARGETS += windeployqt_clean
DISTCLEAN_DEPS += windeployqt_clean
QMAKE_DISTCLEAN += $$WINDEPLOYQT_OUTPUT
} else {

View File

@ -20,7 +20,6 @@ EMCC_COMMON_LFLAGS = \
-s NO_EXIT_RUNTIME=0 \
-s ERROR_ON_UNDEFINED_SYMBOLS=1 \
--bind \
-s \"BINARYEN_METHOD=\'native-wasm\'\" \
-s \"BINARYEN_TRAP_MODE=\'clamp\'\"
# The -s arguments can also be used with release builds,

View File

@ -0,0 +1,19 @@
#
# qmake configuration for winrt-arm64-msvc2017
#
# Written for Microsoft Visual C++ 2017
#
include(../common/winrt_winphone/qmake.conf)
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 arm64 __arm64__ __arm64__
QMAKE_CFLAGS += -FS
QMAKE_CXXFLAGS += -FS
QMAKE_LFLAGS += /MACHINE:arm64 /NODEFAULTLIB:kernel32.lib
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
VCPROJ_ARCH = arm64
WINSDK_VER = 10.0
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
WINRT_MANIFEST.architecture = arm64

View File

@ -0,0 +1,40 @@
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the qmake spec of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "../common/winrt_winphone/qplatformdefs.h"

View File

@ -424,6 +424,9 @@ MakefileGenerator::init()
}
incs.append(project->specDir());
const auto platform = v["QMAKE_PLATFORM"];
resolveDependenciesInFrameworks = platform.contains("darwin");
const char * const cacheKeys[] = { "_QMAKE_STASH_", "_QMAKE_SUPER_CACHE_", nullptr };
for (int i = 0; cacheKeys[i]; ++i) {
if (v[cacheKeys[i]].isEmpty())
@ -1839,6 +1842,33 @@ static QStringList splitDeps(const QString &indeps, bool lineMode)
return deps;
}
QString MakefileGenerator::resolveDependency(const QDir &outDir, const QString &file)
{
const QList<QMakeLocalFileName> &depdirs = QMakeSourceFileInfo::dependencyPaths();
for (const auto &depdir : depdirs) {
const QString &local = depdir.local();
QString lf = outDir.absoluteFilePath(local + '/' + file);
if (exists(lf))
return lf;
if (resolveDependenciesInFrameworks) {
// Given a file like "QtWidgets/QWidget", try to resolve it
// as framework header "QtWidgets.framework/Headers/QWidget".
int cut = file.indexOf('/');
if (cut < 0 || cut + 1 >= file.size())
continue;
QStringRef framework = file.leftRef(cut);
QStringRef include = file.midRef(cut + 1);
if (local.endsWith('/' + framework + ".framework/Headers")) {
lf = outDir.absoluteFilePath(local + '/' + include);
if (exists(lf))
return lf;
}
}
}
return {};
}
void
MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
{
@ -1991,16 +2021,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
} else if (exists(absFile)) {
file = absFile;
} else {
QString localFile;
QList<QMakeLocalFileName> depdirs = QMakeSourceFileInfo::dependencyPaths();
for (QList<QMakeLocalFileName>::Iterator dit = depdirs.begin();
dit != depdirs.end(); ++dit) {
QString lf = outDir.absoluteFilePath((*dit).local() + '/' + file);
if (exists(lf)) {
localFile = lf;
break;
}
}
QString localFile = resolveDependency(outDir, file);
if (localFile.isEmpty()) {
if (exists(file))
warn_msg(WarnDeprecated, ".depend_command for extra compiler %s"
@ -2088,16 +2109,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
} else if (exists(absFile)) {
file = absFile;
} else {
QString localFile;
QList<QMakeLocalFileName> depdirs = QMakeSourceFileInfo::dependencyPaths();
for (QList<QMakeLocalFileName>::Iterator dit = depdirs.begin();
dit != depdirs.end(); ++dit) {
QString lf = outDir.absoluteFilePath((*dit).local() + '/' + file);
if (exists(lf)) {
localFile = lf;
break;
}
}
QString localFile = resolveDependency(outDir, file);
if (localFile.isEmpty()) {
if (exists(file))
warn_msg(WarnDeprecated, ".depend_command for extra compiler %s"

View File

@ -55,6 +55,7 @@ class MakefileGenerator : protected QMakeSourceFileInfo
{
QString spec;
bool no_io;
bool resolveDependenciesInFrameworks = false;
QHash<QString, bool> init_compiler_already;
QString makedir, chkexists;
QString build_args();
@ -82,6 +83,7 @@ protected:
void writeExportedVariables(QTextStream &t);
void writeExtraVariables(QTextStream &t);
void writeExtraTargets(QTextStream &t);
QString resolveDependency(const QDir &outDir, const QString &file);
void writeExtraCompilerTargets(QTextStream &t);
void writeExtraCompilerVariables(QTextStream &t);
bool writeDummyMakefile(QTextStream &t);

View File

@ -84,6 +84,8 @@ Win32MakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
if (impexts.isEmpty())
impexts = project->values("QMAKE_EXTENSION_STATICLIB");
QList<QMakeLocalFileName> dirs;
for (const ProString &dlib : project->values("QMAKE_DEFAULT_LIBDIRS"))
dirs.append(QMakeLocalFileName(dlib.toQString()));
static const char * const lflags[] = { "LIBS", "LIBS_PRIVATE",
"QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", nullptr };
for (int i = 0; lflags[i]; i++) {

View File

@ -7,7 +7,7 @@
"Description": "strtoll() and strtoull() are functions for converting a string to (unsigned) long long integer.",
"Homepage": "https://github.com/freebsd/freebsd/",
"Upstream": "https://raw.githubusercontent.com/freebsd/freebsd/raw/tree/master/lib/libc/stdlib/$file",
"DownloadLocation": "https://github.com/freebsd/freebsd/tree/master/lib/libc/stdlib",
"Version": "upstream has complicated with std locales; do not update",
"Version": "18b29f3fb8abee5d57ed8f4a44f806bec7e0eeff",
"License": "BSD 3-clause \"New\" or \"Revised\" License",

View File

@ -69,8 +69,11 @@ DEFINES += FT2_BUILD_LIBRARY
DEFINES += FT_CONFIG_OPTION_SYSTEM_ZLIB
include(../zlib_dependency.pri)
DEFINES += FT_CONFIG_OPTION_USE_PNG
include($$OUT_PWD/../../gui/qtgui-config.pri)
QMAKE_USE_PRIVATE += libpng
QT_FOR_CONFIG += gui-private
qtConfig(png) {
DEFINES += FT_CONFIG_OPTION_USE_PNG
QMAKE_USE_PRIVATE += libpng
}
DEFINES += TT_CONFIG_OPTION_SUBPIXEL_HINTING

View File

@ -6,8 +6,8 @@
"Description": "SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.",
"Homepage": "https://www.sqlite.org/",
"Version": "3.24.0",
"DownloadLocation": "https://www.sqlite.org/2018/sqlite-amalgamation-3240000.zip",
"Version": "3.26.0",
"DownloadLocation": "https://www.sqlite.org/2018/sqlite-amalgamation-3260000.zip",
"License": "Public Domain",
"Copyright": "The authors disclaim copyright to the source code. However, a license can be obtained if needed."
}

File diff suppressed because it is too large Load Diff

View File

@ -123,9 +123,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION "3.25.2"
#define SQLITE_VERSION_NUMBER 3025002
#define SQLITE_SOURCE_ID "2018-09-25 19:08:10 fb90e7189ae6d62e77ba3a308ca5d683f90bbe633cf681865365b8e92792d1c7"
#define SQLITE_VERSION "3.26.0"
#define SQLITE_VERSION_NUMBER 3026000
#define SQLITE_SOURCE_ID "2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238b4f9"
/*
** CAPI3REF: Run-Time Library Version Numbers
@ -2017,6 +2017,7 @@ struct sqlite3_mem_methods {
** is invoked.
**
** <dl>
** [[SQLITE_DBCONFIG_LOOKASIDE]]
** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
** <dd> ^This option takes three additional arguments that determine the
** [lookaside memory allocator] configuration for the [database connection].
@ -2039,6 +2040,7 @@ struct sqlite3_mem_methods {
** memory is in use leaves the configuration unchanged and returns
** [SQLITE_BUSY].)^</dd>
**
** [[SQLITE_DBCONFIG_ENABLE_FKEY]]
** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
** <dd> ^This option is used to enable or disable the enforcement of
** [foreign key constraints]. There should be two additional arguments.
@ -2049,6 +2051,7 @@ struct sqlite3_mem_methods {
** following this call. The second parameter may be a NULL pointer, in
** which case the FK enforcement setting is not reported back. </dd>
**
** [[SQLITE_DBCONFIG_ENABLE_TRIGGER]]
** <dt>SQLITE_DBCONFIG_ENABLE_TRIGGER</dt>
** <dd> ^This option is used to enable or disable [CREATE TRIGGER | triggers].
** There should be two additional arguments.
@ -2059,6 +2062,7 @@ struct sqlite3_mem_methods {
** following this call. The second parameter may be a NULL pointer, in
** which case the trigger setting is not reported back. </dd>
**
** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]]
** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>
** <dd> ^This option is used to enable or disable the two-argument
** version of the [fts3_tokenizer()] function which is part of the
@ -2072,6 +2076,7 @@ struct sqlite3_mem_methods {
** following this call. The second parameter may be a NULL pointer, in
** which case the new setting is not reported back. </dd>
**
** [[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION]]
** <dt>SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION</dt>
** <dd> ^This option is used to enable or disable the [sqlite3_load_extension()]
** interface independently of the [load_extension()] SQL function.
@ -2089,7 +2094,7 @@ struct sqlite3_mem_methods {
** be a NULL pointer, in which case the new setting is not reported back.
** </dd>
**
** <dt>SQLITE_DBCONFIG_MAINDBNAME</dt>
** [[SQLITE_DBCONFIG_MAINDBNAME]] <dt>SQLITE_DBCONFIG_MAINDBNAME</dt>
** <dd> ^This option is used to change the name of the "main" database
** schema. ^The sole argument is a pointer to a constant UTF8 string
** which will become the new schema name in place of "main". ^SQLite
@ -2098,6 +2103,7 @@ struct sqlite3_mem_methods {
** until after the database connection closes.
** </dd>
**
** [[SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE]]
** <dt>SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE</dt>
** <dd> Usually, when a database in wal mode is closed or detached from a
** database handle, SQLite checks if this will mean that there are now no
@ -2111,7 +2117,7 @@ struct sqlite3_mem_methods {
** have been disabled - 0 if they are not disabled, 1 if they are.
** </dd>
**
** <dt>SQLITE_DBCONFIG_ENABLE_QPSG</dt>
** [[SQLITE_DBCONFIG_ENABLE_QPSG]] <dt>SQLITE_DBCONFIG_ENABLE_QPSG</dt>
** <dd>^(The SQLITE_DBCONFIG_ENABLE_QPSG option activates or deactivates
** the [query planner stability guarantee] (QPSG). When the QPSG is active,
** a single SQL query statement will always use the same algorithm regardless
@ -2127,7 +2133,7 @@ struct sqlite3_mem_methods {
** following this call.
** </dd>
**
** <dt>SQLITE_DBCONFIG_TRIGGER_EQP</dt>
** [[SQLITE_DBCONFIG_TRIGGER_EQP]] <dt>SQLITE_DBCONFIG_TRIGGER_EQP</dt>
** <dd> By default, the output of EXPLAIN QUERY PLAN commands does not
** include output for any operations performed by trigger programs. This
** option is used to set or clear (the default) a flag that governs this
@ -2139,7 +2145,7 @@ struct sqlite3_mem_methods {
** it is not disabled, 1 if it is.
** </dd>
**
** <dt>SQLITE_DBCONFIG_RESET_DATABASE</dt>
** [[SQLITE_DBCONFIG_RESET_DATABASE]] <dt>SQLITE_DBCONFIG_RESET_DATABASE</dt>
** <dd> Set the SQLITE_DBCONFIG_RESET_DATABASE flag and then run
** [VACUUM] in order to reset a database back to an empty database
** with no schema and no content. The following process works even for
@ -2158,6 +2164,18 @@ struct sqlite3_mem_methods {
** Because resetting a database is destructive and irreversible, the
** process requires the use of this obscure API and multiple steps to help
** ensure that it does not happen by accident.
**
** [[SQLITE_DBCONFIG_DEFENSIVE]] <dt>SQLITE_DBCONFIG_DEFENSIVE</dt>
** <dd>The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the
** "defensive" flag for a database connection. When the defensive
** flag is enabled, language features that allow ordinary SQL to
** deliberately corrupt the database file are disabled. The disabled
** features include but are not limited to the following:
** <ul>
** <li> The [PRAGMA writable_schema=ON] statement.
** <li> Writes to the [sqlite_dbpage] virtual table.
** <li> Direct writes to [shadow tables].
** </ul>
** </dd>
** </dl>
*/
@ -2171,7 +2189,8 @@ struct sqlite3_mem_methods {
#define SQLITE_DBCONFIG_ENABLE_QPSG 1007 /* int int* */
#define SQLITE_DBCONFIG_TRIGGER_EQP 1008 /* int int* */
#define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* int int* */
#define SQLITE_DBCONFIG_MAX 1009 /* Largest DBCONFIG */
#define SQLITE_DBCONFIG_DEFENSIVE 1010 /* int int* */
#define SQLITE_DBCONFIG_MAX 1010 /* Largest DBCONFIG */
/*
** CAPI3REF: Enable Or Disable Extended Result Codes
@ -3609,9 +3628,19 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
** on this hint by avoiding the use of [lookaside memory] so as not to
** deplete the limited store of lookaside memory. Future versions of
** SQLite may act on this hint differently.
**
** [[SQLITE_PREPARE_NORMALIZE]] ^(<dt>SQLITE_PREPARE_NORMALIZE</dt>
** <dd>The SQLITE_PREPARE_NORMALIZE flag indicates that a normalized
** representation of the SQL statement should be calculated and then
** associated with the prepared statement, which can be obtained via
** the [sqlite3_normalized_sql()] interface.)^ The semantics used to
** normalize a SQL statement are unspecified and subject to change.
** At a minimum, literal values will be replaced with suitable
** placeholders.
** </dl>
*/
#define SQLITE_PREPARE_PERSISTENT 0x01
#define SQLITE_PREPARE_NORMALIZE 0x02
/*
** CAPI3REF: Compiling An SQL Statement
@ -3769,6 +3798,11 @@ SQLITE_API int sqlite3_prepare16_v3(
** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8
** string containing the SQL text of prepared statement P with
** [bound parameters] expanded.
** ^The sqlite3_normalized_sql(P) interface returns a pointer to a UTF-8
** string containing the normalized SQL text of prepared statement P. The
** semantics used to normalize a SQL statement are unspecified and subject
** to change. At a minimum, literal values will be replaced with suitable
** placeholders.
**
** ^(For example, if a prepared statement is created using the SQL
** text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345
@ -3784,14 +3818,16 @@ SQLITE_API int sqlite3_prepare16_v3(
** bound parameter expansions. ^The [SQLITE_OMIT_TRACE] compile-time
** option causes sqlite3_expanded_sql() to always return NULL.
**
** ^The string returned by sqlite3_sql(P) is managed by SQLite and is
** automatically freed when the prepared statement is finalized.
** ^The strings returned by sqlite3_sql(P) and sqlite3_normalized_sql(P)
** are managed by SQLite and are automatically freed when the prepared
** statement is finalized.
** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
** is obtained from [sqlite3_malloc()] and must be free by the application
** by passing it to [sqlite3_free()].
*/
SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
SQLITE_API char *sqlite3_expanded_sql(sqlite3_stmt *pStmt);
SQLITE_API const char *sqlite3_normalized_sql(sqlite3_stmt *pStmt);
/*
** CAPI3REF: Determine If An SQL Statement Writes The Database
@ -6281,6 +6317,9 @@ struct sqlite3_module {
int (*xSavepoint)(sqlite3_vtab *pVTab, int);
int (*xRelease)(sqlite3_vtab *pVTab, int);
int (*xRollbackTo)(sqlite3_vtab *pVTab, int);
/* The methods above are in versions 1 and 2 of the sqlite_module object.
** Those below are for version 3 and greater. */
int (*xShadowName)(const char*);
};
/*
@ -7203,6 +7242,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
#define SQLITE_TESTCTRL_ISKEYWORD 16 /* NOT USED */
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
#define SQLITE_TESTCTRL_INTERNAL_FUNCTIONS 17
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
@ -8615,6 +8655,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
** can use to customize and optimize their behavior.
**
** <dl>
** [[SQLITE_VTAB_CONSTRAINT_SUPPORT]]
** <dt>SQLITE_VTAB_CONSTRAINT_SUPPORT
** <dd>Calls of the form
** [sqlite3_vtab_config](db,SQLITE_VTAB_CONSTRAINT_SUPPORT,X) are supported,
@ -9384,7 +9425,7 @@ struct sqlite3_rtree_query_info {
sqlite3_int64 iRowid; /* Rowid for current entry */
sqlite3_rtree_dbl rParentScore; /* Score of parent node */
int eParentWithin; /* Visibility of parent node */
int eWithin; /* OUT: Visiblity */
int eWithin; /* OUT: Visibility */
sqlite3_rtree_dbl rScore; /* OUT: Write the score here */
/* The following fields are only available in 3.8.11 and later */
sqlite3_value **apSqlParam; /* Original SQL values of parameters */
@ -9880,12 +9921,38 @@ SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession);
** consecutively. There is no chance that the iterator will visit a change
** the applies to table X, then one for table Y, and then later on visit
** another change for table X.
**
** The behavior of sqlite3changeset_start_v2() and its streaming equivalent
** may be modified by passing a combination of
** [SQLITE_CHANGESETSTART_INVERT | supported flags] as the 4th parameter.
**
** Note that the sqlite3changeset_start_v2() API is still <b>experimental</b>
** and therefore subject to change.
*/
SQLITE_API int sqlite3changeset_start(
sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */
int nChangeset, /* Size of changeset blob in bytes */
void *pChangeset /* Pointer to blob containing changeset */
);
SQLITE_API int sqlite3changeset_start_v2(
sqlite3_changeset_iter **pp, /* OUT: New changeset iterator handle */
int nChangeset, /* Size of changeset blob in bytes */
void *pChangeset, /* Pointer to blob containing changeset */
int flags /* SESSION_CHANGESETSTART_* flags */
);
/*
** CAPI3REF: Flags for sqlite3changeset_start_v2
**
** The following flags may passed via the 4th parameter to
** [sqlite3changeset_start_v2] and [sqlite3changeset_start_v2_strm]:
**
** <dt>SQLITE_CHANGESETAPPLY_INVERT <dd>
** Invert the changeset while iterating through it. This is equivalent to
** inverting a changeset using sqlite3changeset_invert() before applying it.
** It is an error to specify this flag with a patchset.
*/
#define SQLITE_CHANGESETSTART_INVERT 0x0002
/*
@ -10540,7 +10607,7 @@ SQLITE_API int sqlite3changeset_apply_v2(
),
void *pCtx, /* First argument passed to xConflict */
void **ppRebase, int *pnRebase, /* OUT: Rebase data */
int flags /* Combination of SESSION_APPLY_* flags */
int flags /* SESSION_CHANGESETAPPLY_* flags */
);
/*
@ -10558,8 +10625,14 @@ SQLITE_API int sqlite3changeset_apply_v2(
** causes the sessions module to omit this savepoint. In this case, if the
** caller has an open transaction or savepoint when apply_v2() is called,
** it may revert the partially applied changeset by rolling it back.
**
** <dt>SQLITE_CHANGESETAPPLY_INVERT <dd>
** Invert the changeset before applying it. This is equivalent to inverting
** a changeset using sqlite3changeset_invert() before applying it. It is
** an error to specify this flag with a patchset.
*/
#define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001
#define SQLITE_CHANGESETAPPLY_INVERT 0x0002
/*
** CAPI3REF: Constants Passed To The Conflict Handler
@ -10953,6 +11026,12 @@ SQLITE_API int sqlite3changeset_start_strm(
int (*xInput)(void *pIn, void *pData, int *pnData),
void *pIn
);
SQLITE_API int sqlite3changeset_start_v2_strm(
sqlite3_changeset_iter **pp,
int (*xInput)(void *pIn, void *pData, int *pnData),
void *pIn,
int flags
);
SQLITE_API int sqlite3session_changeset_strm(
sqlite3_session *pSession,
int (*xOutput)(void *pOut, const void *pData, int nData),
@ -10979,6 +11058,45 @@ SQLITE_API int sqlite3rebaser_rebase_strm(
void *pOut
);
/*
** CAPI3REF: Configure global parameters
**
** The sqlite3session_config() interface is used to make global configuration
** changes to the sessions module in order to tune it to the specific needs
** of the application.
**
** The sqlite3session_config() interface is not threadsafe. If it is invoked
** while any other thread is inside any other sessions method then the
** results are undefined. Furthermore, if it is invoked after any sessions
** related objects have been created, the results are also undefined.
**
** The first argument to the sqlite3session_config() function must be one
** of the SQLITE_SESSION_CONFIG_XXX constants defined below. The
** interpretation of the (void*) value passed as the second parameter and
** the effect of calling this function depends on the value of the first
** parameter.
**
** <dl>
** <dt>SQLITE_SESSION_CONFIG_STRMSIZE<dd>
** By default, the sessions module streaming interfaces attempt to input
** and output data in approximately 1 KiB chunks. This operand may be used
** to set and query the value of this configuration setting. The pointer
** passed as the second argument must point to a value of type (int).
** If this value is greater than 0, it is used as the new streaming data
** chunk size for both input and output. Before returning, the (int) value
** pointed to by pArg is set to the final value of the streaming interface
** chunk size.
** </dl>
**
** This function returns SQLITE_OK if successful, or an SQLite error code
** otherwise.
*/
SQLITE_API int sqlite3session_config(int op, void *pArg);
/*
** CAPI3REF: Values for sqlite3session_config().
*/
#define SQLITE_SESSION_CONFIG_STRMSIZE 1
/*
** Make sure we can call this stuff from C++.

View File

@ -612,7 +612,7 @@ public abstract class QtLoader {
}
if (m_qtLibs != null) {
String libPrefix = apkDeployFromSystem ? libsDir + "lib" : localPrefix + "lib/lib";
String libPrefix = libsDir + "lib";
for (int i = 0; i < m_qtLibs.length; i++)
libraryList.add(libPrefix + m_qtLibs[i] + ".so");
}

View File

@ -1,5 +1,17 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest package="org.qtproject.example" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28"/>
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
<!-- %%INSERT_PERMISSIONS -->
<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
Remove the comment if you do not require these default features. -->
<!-- %%INSERT_FEATURES -->
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
android:name="org.qtproject.qt5.android.bindings.QtActivity"
@ -70,15 +82,4 @@
</application>
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
<!-- %%INSERT_PERMISSIONS -->
<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
Remove the comment if you do not require these default features. -->
<!-- %%INSERT_FEATURES -->
</manifest>

View File

@ -83,8 +83,12 @@ QString QWindowsLocalCodec::convertToUnicode(const char *chars, int length, Conv
len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,
prev, 2, wc.data(), wc.length());
if (len) {
prepend = true;
sp.append(QChar(wc[0]));
if (mblen == 1) {
state->remainingChars = 0;
return sp;
}
prepend = true;
mb++;
mblen--;
wc[0] = 0;

View File

@ -45,6 +45,9 @@ excludedirs += snippets
excludefiles += ../../../examples/widgets/tools/customcompleter/doc/src/customcompleter.qdoc \
../../../examples/widgets/tools/codecs/doc/src/codecs.qdoc
# Included in qttestlib.qdocconf instead
excludefiles += ../kernel/qtestsupport_core.cpp
manifestmeta.highlighted.names = "QtCore/JSON Save Game Example" \
"QtCore/Local Fortune*"

View File

@ -86,7 +86,7 @@
that it doesn't require RTTI support and it works across dynamic
library boundaries. It attempts to cast its argument to the pointer
type specified in angle-brackets, returning a non-zero pointer if the
object is of the correct type (determined at run-time), or 0
object is of the correct type (determined at run-time), or \nullptr
if the object's type is incompatible.
For example, let's assume \c MyWidget inherits from QWidget and

View File

@ -2050,6 +2050,8 @@ static const char *osVer_helper(QOperatingSystemVersion version = QOperatingSyst
return "Sierra";
case 13:
return "High Sierra";
case 14:
return "Mojave";
}
}
// unknown, future version

View File

@ -348,7 +348,7 @@ template <> inline bool mul_overflow(qint64 v1, qint64 v2, qint64 *r)
// as signed for the low bits and use a signed right shift to verify that
// 'high' is nothing but sign bits that match the sign of 'low'.
qint64 high = __mulh(v1, v2);
qint64 high = Q_SMULH(v1, v2);
*r = qint64(quint64(v1) * quint64(v2));
return (*r >> 63) != high;
}

View File

@ -748,6 +748,21 @@ static int drivePrefixLength(const QString &path)
}
#endif // Q_OS_WIN
static bool treatAsAbsolute(const QString &path)
{
// ### Qt 6: be consistent about absolute paths
// QFileInfo will use the right FS-engine for virtual file-systems
// (e.g. resource paths). Unfortunately, for real file-systems, it relies
// on QFileSystemEntry's isRelative(), which is flawed on MS-Win, ignoring
// its (correct) isAbsolute(). So only use that isAbsolute() unless there's
// a colon in the path.
// FIXME: relies on virtual file-systems having colons in their prefixes.
// The case of an MS-absolute C:/... path happens to work either way.
return (path.contains(QLatin1Char(':')) && QFileInfo(path).isAbsolute())
|| QFileSystemEntry(path).isAbsolute();
}
/*!
Returns the path name of a file in the directory. Does \e not
check if the file actually exists in the directory; but see
@ -759,13 +774,10 @@ static int drivePrefixLength(const QString &path)
*/
QString QDir::filePath(const QString &fileName) const
{
const QDirPrivate* d = d_ptr.constData();
// Mistrust our own isAbsolutePath() for real files; Q_OS_WIN needs a drive.
if (fileName.startsWith(QLatin1Char(':')) // i.e. resource path
? isAbsolutePath(fileName) : QFileSystemEntry(fileName).isAbsolute()) {
if (treatAsAbsolute(fileName))
return fileName;
}
const QDirPrivate* d = d_ptr.constData();
QString ret = d->dirEntry.filePath();
if (fileName.isEmpty())
return ret;
@ -793,13 +805,10 @@ QString QDir::filePath(const QString &fileName) const
*/
QString QDir::absoluteFilePath(const QString &fileName) const
{
const QDirPrivate* d = d_ptr.constData();
// Mistrust our own isAbsolutePath() for real files; Q_OS_WIN needs a drive.
if (fileName.startsWith(QLatin1Char(':')) // i.e. resource path
? isAbsolutePath(fileName) : QFileSystemEntry(fileName).isAbsolute()) {
if (treatAsAbsolute(fileName))
return fileName;
}
const QDirPrivate* d = d_ptr.constData();
d->resolveAbsoluteEntry();
const QString absoluteDirPath = d->absoluteDirEntry.filePath();
if (fileName.isEmpty())
@ -2164,9 +2173,10 @@ bool QDir::match(const QString &filter, const QString &fileName)
This method is shared with QUrl, so it doesn't deal with QDir::separator(),
nor does it remove the trailing slash, if any.
*/
Q_AUTOTEST_EXPORT QString qt_normalizePathSegments(const QString &name, bool allowUncPaths,
bool *ok = nullptr)
QString qt_normalizePathSegments(const QString &name, QDirPrivate::PathNormalizations flags, bool *ok)
{
const bool allowUncPaths = QDirPrivate::AllowUncPaths & flags;
const bool isRemote = QDirPrivate::RemotePath & flags;
const int len = name.length();
if (ok)
@ -2188,14 +2198,30 @@ Q_AUTOTEST_EXPORT QString qt_normalizePathSegments(const QString &name, bool all
i -= prefixLength;
// replicate trailing slash (i > 0 checks for emptiness of input string p)
if (i > 0 && p[i] == '/') {
// except for remote paths because there can be /../ or /./ ending
if (i > 0 && p[i] == '/' && !isRemote) {
out[--used] = '/';
--i;
}
auto isDot = [](const ushort *p, int i) {
return i > 1 && p[i - 1] == '.' && p[i - 2] == '/';
};
auto isDotDot = [](const ushort *p, int i) {
return i > 2 && p[i - 1] == '.' && p[i - 2] == '.' && p[i - 3] == '/';
};
while (i >= 0) {
// remove trailing slashes
// copy trailing slashes for remote urls
if (p[i] == '/') {
if (isRemote && !up) {
if (isDot(p, i)) {
i -= 2;
continue;
}
out[--used] = p[i];
}
--i;
continue;
}
@ -2207,10 +2233,17 @@ Q_AUTOTEST_EXPORT QString qt_normalizePathSegments(const QString &name, bool all
}
// detect up dir
if (i >= 1 && p[i] == '.' && p[i-1] == '.'
&& (i == 1 || (i >= 2 && p[i-2] == '/'))) {
if (i >= 1 && p[i] == '.' && p[i-1] == '.' && (i < 2 || p[i - 2] == '/')) {
++up;
i -= 2;
i -= i >= 2 ? 3 : 2;
if (isRemote) {
// moving up should consider empty path segments too (/path//../ -> /path/)
while (i > 0 && up && p[i] == '/') {
--up;
--i;
}
}
continue;
}
@ -2220,7 +2253,27 @@ Q_AUTOTEST_EXPORT QString qt_normalizePathSegments(const QString &name, bool all
// skip or copy
while (i >= 0) {
if (p[i] == '/') { // do not copy slashes
if (p[i] == '/') {
// copy all slashes as is for remote urls if they are not part of /./ or /../
if (isRemote && !up) {
while (i > 0 && p[i] == '/' && !isDotDot(p, i)) {
if (isDot(p, i)) {
i -= 2;
continue;
}
out[--used] = p[i];
--i;
}
// in case of /./, jump over
if (isDot(p, i))
i -= 2;
break;
}
--i;
break;
}
@ -2241,7 +2294,7 @@ Q_AUTOTEST_EXPORT QString qt_normalizePathSegments(const QString &name, bool all
*ok = prefixLength == 0 || up == 0;
// add remaining '..'
while (up) {
while (up && !isRemote) {
if (used != len && out[used] != '/') // is not empty and there isn't already a '/'
out[--used] = '/';
out[--used] = '.';
@ -2287,7 +2340,7 @@ static QString qt_cleanPath(const QString &path, bool *ok)
if (dir_separator != QLatin1Char('/'))
name.replace(dir_separator, QLatin1Char('/'));
QString ret = qt_normalizePathSegments(name, OSSupportsUncPaths, ok);
QString ret = qt_normalizePathSegments(name, OSSupportsUncPaths ? QDirPrivate::AllowUncPaths : QDirPrivate::DefaultNormalization, ok);
// Strip away last slash except for root directories
if (ret.length() > 1 && ret.endsWith(QLatin1Char('/'))) {

View File

@ -59,6 +59,14 @@ QT_BEGIN_NAMESPACE
class QDirPrivate : public QSharedData
{
public:
enum PathNormalization {
DefaultNormalization = 0x00,
AllowUncPaths = 0x01,
RemotePath = 0x02
};
Q_DECLARE_FLAGS(PathNormalizations, PathNormalization)
Q_FLAGS(PathNormalizations)
explicit QDirPrivate(const QString &path, const QStringList &nameFilters_ = QStringList(),
QDir::SortFlags sort_ = QDir::SortFlags(QDir::Name | QDir::IgnoreCase),
QDir::Filters filters_ = QDir::AllEntries);
@ -97,6 +105,10 @@ public:
mutable QFileSystemMetaData metaData;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QDirPrivate::PathNormalizations)
Q_AUTOTEST_EXPORT QString qt_normalizePathSegments(const QString &name, QDirPrivate::PathNormalizations flags, bool *ok = nullptr);
QT_END_NAMESPACE
#endif

View File

@ -700,7 +700,7 @@ bool QFileDevice::setPermissions(Permissions permissions)
Any mapping options can be passed through \a flags.
Returns a pointer to the memory or 0 if there is an error.
Returns a pointer to the memory or \nullptr if there is an error.
\sa unmap()
*/
@ -711,11 +711,11 @@ uchar *QFileDevice::map(qint64 offset, qint64 size, MemoryMapFlags flags)
&& d->fileEngine->supportsExtension(QAbstractFileEngine::MapExtension)) {
unsetError();
uchar *address = d->fileEngine->map(offset, size, flags);
if (address == 0)
if (address == nullptr)
d->setError(d->fileEngine->error(), d->fileEngine->errorString());
return address;
}
return 0;
return nullptr;
}
/*!

View File

@ -1038,8 +1038,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
if (what & QFileSystemMetaData::Permissions)
fillPermissions(fname, data, what);
if ((what & QFileSystemMetaData::LinkType)
&& data.missingFlags(QFileSystemMetaData::LinkType)) {
if (what & QFileSystemMetaData::LinkType) {
data.knownFlagsMask |= QFileSystemMetaData::LinkType;
if (data.fileAttribute_ & FILE_ATTRIBUTE_REPARSE_POINT) {
WIN32_FIND_DATA findData;

View File

@ -608,7 +608,7 @@ qint64 QResource::size() const
Returns direct access to a read only segment of data that this resource
represents. If the resource is compressed the data returns is
compressed and qUncompress() must be used to access the data. If the
resource is a directory 0 is returned.
resource is a directory \nullptr is returned.
\sa size(), isCompressed(), isFile()
*/

View File

@ -253,7 +253,8 @@
and contains no query or fragment, a local file path is returned.
\value StripTrailingSlash The trailing slash is removed from the path, if one is present.
\value NormalizePathSegments Modifies the path to remove redundant directory separators,
and to resolve "."s and ".."s (as far as possible).
and to resolve "."s and ".."s (as far as possible). For non-local paths, adjacent
slashes are preserved.
Note that the case folding rules in \l{RFC 3491}{Nameprep}, which QUrl
conforms to, require host names to always be converted to lower case,
@ -419,10 +420,9 @@
#endif
#include "private/qipaddress_p.h"
#include "qurlquery.h"
#include "private/qdir_p.h"
QT_BEGIN_NAMESPACE
extern QString qt_normalizePathSegments(const QString &name, bool allowUncPaths,
bool *ok = nullptr); // qdir.cpp
inline static bool isHex(char c)
{
@ -930,7 +930,7 @@ inline void QUrlPrivate::appendPath(QString &appendTo, QUrl::FormattingOptions o
{
QString thePath = path;
if (options & QUrl::NormalizePathSegments) {
thePath = qt_normalizePathSegments(path, false);
thePath = qt_normalizePathSegments(path, isLocalFile() ? QDirPrivate::DefaultNormalization : QDirPrivate::RemotePath);
}
QStringRef thePathRef(&thePath);

View File

@ -216,8 +216,8 @@ private:
Constructs a new instance of this class. You can pass up to ten arguments
(\a val0, \a val1, \a val2, \a val3, \a val4, \a val5, \a val6, \a val7,
\a val8, and \a val9) to the constructor. Returns the new object, or 0 if
no suitable constructor is available.
\a val8, and \a val9) to the constructor. Returns the new object, or
\nullptr if no suitable constructor is available.
Note that only constructors that are declared with the Q_INVOKABLE
modifier are made available through the meta-object system.
@ -321,8 +321,8 @@ const char *QMetaObject::className() const
/*!
\fn QMetaObject *QMetaObject::superClass() const
Returns the meta-object of the superclass, or 0 if there is no
such object.
Returns the meta-object of the superclass, or \nullptr if there is
no such object.
\sa className()
*/
@ -2615,7 +2615,7 @@ int QMetaEnum::keyCount() const
}
/*!
Returns the key with the given \a index, or 0 if no such key exists.
Returns the key with the given \a index, or \nullptr if no such key exists.
\sa keyCount(), value(), valueToKey()
*/
@ -2737,7 +2737,7 @@ int QMetaEnum::keyToValue(const char *key, bool *ok) const
/*!
Returns the string that is used as the name of the given
enumeration \a value, or 0 if \a value is not defined.
enumeration \a value, or \nullptr if \a value is not defined.
For flag types, use valueToKeys().

View File

@ -421,8 +421,8 @@ struct DefinedTypesFilter {
pointer of this type. (given by QVariant::data for example)
If the type is an enumeration, flags() contains QMetaType::IsEnumeration, and this function
returns the QMetaObject of the enclosing object if the enum was registered as a Q_ENUM or 0
otherwise
returns the QMetaObject of the enclosing object if the enum was registered as a Q_ENUM or
\nullptr otherwise
\sa QMetaType::metaObjectForType(), QMetaType::flags()
*/

View File

@ -1763,7 +1763,7 @@ void QObject::killTimer(int id)
\fn template<typename T> T *QObject::findChild(const QString &name, Qt::FindChildOptions options) const
Returns the child of this object that can be cast into type T and
that is called \a name, or 0 if there is no such object.
that is called \a name, or \nullptr if there is no such object.
Omitting the \a name argument causes all object names to be matched.
The search is performed recursively, unless \a options specifies the
option FindDirectChildrenOnly.
@ -4342,6 +4342,12 @@ QDebug operator<<(QDebug dbg, const QObject *o)
in a QVariant, you can convert them to strings. Likewise, passing them to
QDebug will print out their names.
Mind that the enum values are stored as signed \c int in the meta object system.
Registering enumerations with values outside the range of values valid for \c int
will lead to overflows and potentially undefined behavior when accessing them through
the meta object system. QML, for example, does access registered enumerations through
the meta object system.
\sa {Qt's Property System}
*/
@ -4393,6 +4399,12 @@ QDebug operator<<(QDebug dbg, const QObject *o)
used in a QVariant, you can convert them to strings. Likewise, passing them
to QDebug will print out their names.
Mind that the enum values are stored as signed \c int in the meta object system.
Registering enumerations with values outside the range of values valid for \c int
will lead to overflows and potentially undefined behavior when accessing them through
the meta object system. QML, for example, does access registered enumerations through
the meta object system.
\sa {Qt's Property System}
*/
@ -4450,7 +4462,7 @@ QDebug operator<<(QDebug dbg, const QObject *o)
macro, it must appear in the private section of a class definition.
Q_GADGETs can have Q_ENUM, Q_PROPERTY and Q_INVOKABLE, but they cannot have
signals or slots
signals or slots.
Q_GADGET makes a class member, \c{staticMetaObject}, available.
\c{staticMetaObject} is of type QMetaObject and provides access to the

View File

@ -59,8 +59,7 @@ Q_CORE_EXPORT void QTestPrivate::qSleep(int ms)
#endif
}
/*! \fn template <typename Functor> bool qWaitFor(Functor predicate, int timeout)
\relates QTest
/*! \fn template <typename Functor> bool QTest::qWaitFor(Functor predicate, int timeout)
Waits for \a timeout milliseconds or until the \a predicate returns true.
@ -77,8 +76,7 @@ Q_CORE_EXPORT void QTestPrivate::qSleep(int ms)
*/
/*! \fn void qWait(int ms)
\relates QTest
/*! \fn void QTest::qWait(int ms)
Waits for \a ms milliseconds. While waiting, events will be processed and
your test will stay responsive to user interface events or network communication.

View File

@ -368,7 +368,7 @@ QDataStream::~QDataStream()
/*!
\fn QIODevice *QDataStream::device() const
Returns the I/O device currently set, or 0 if no
Returns the I/O device currently set, or \nullptr if no
device is currently set.
\sa setDevice()
@ -377,7 +377,7 @@ QDataStream::~QDataStream()
/*!
void QDataStream::setDevice(QIODevice *d)
Sets the I/O device to \a d, which can be 0
Sets the I/O device to \a d, which can be \nullptr
to unset to current I/O device.
\sa device()

View File

@ -1332,7 +1332,7 @@ void QTextStream::setDevice(QIODevice *device)
/*!
Returns the current device associated with the QTextStream,
or 0 if no device has been assigned.
or \nullptr if no device has been assigned.
\sa setDevice(), string()
*/
@ -1369,8 +1369,8 @@ void QTextStream::setString(QString *string, QIODevice::OpenMode openMode)
}
/*!
Returns the current string assigned to the QTextStream, or 0 if no
string has been assigned.
Returns the current string assigned to the QTextStream, or
\nullptr if no string has been assigned.
\sa setString(), device()
*/

View File

@ -223,7 +223,7 @@ QString QXmlStreamReaderPrivate::resolveUndeclaredEntity(const QString &name)
The stream reader does \e not take ownership of the resolver. It's
the callers responsibility to ensure that the resolver is valid
during the entire life-time of the stream reader object, or until
another resolver or 0 is set.
another resolver or \nullptr is set.
\sa entityResolver()
*/
@ -236,7 +236,7 @@ void QXmlStreamReader::setEntityResolver(QXmlStreamEntityResolver *resolver)
/*!
\since 4.4
Returns the entity resolver, or 0 if there is no entity resolver.
Returns the entity resolver, or \nullptr if there is no entity resolver.
\sa setEntityResolver()
*/
@ -480,7 +480,7 @@ void QXmlStreamReader::setDevice(QIODevice *device)
/*!
Returns the current device associated with the QXmlStreamReader,
or 0 if no device has been assigned.
or \nullptr if no device has been assigned.
\sa setDevice()
*/
@ -3315,7 +3315,7 @@ void QXmlStreamWriter::setDevice(QIODevice *device)
/*!
Returns the current device associated with the QXmlStreamWriter,
or 0 if no device has been assigned.
or \nullptr if no device has been assigned.
\sa setDevice()
*/

View File

@ -155,7 +155,8 @@ QAbstractState::~QAbstractState()
}
/*!
Returns this state's parent state, or 0 if the state has no parent state.
Returns this state's parent state, or \nullptr if the state has no
parent state.
*/
QState *QAbstractState::parentState() const
{
@ -166,8 +167,8 @@ QState *QAbstractState::parentState() const
}
/*!
Returns the state machine that this state is part of, or 0 if the state is
not part of a state machine.
Returns the state machine that this state is part of, or \nullptr if
the state is not part of a state machine.
*/
QStateMachine *QAbstractState::machine() const
{

View File

@ -195,8 +195,8 @@ QAbstractTransition::~QAbstractTransition()
}
/*!
Returns the source state of this transition, or 0 if this transition has no
source state.
Returns the source state of this transition, or \nullptr if this
transition has no source state.
*/
QState *QAbstractTransition::sourceState() const
{
@ -205,14 +205,14 @@ QState *QAbstractTransition::sourceState() const
}
/*!
Returns the target state of this transition, or 0 if the transition has no
target.
Returns the target state of this transition, or \nullptr if the
transition has no target.
*/
QAbstractState *QAbstractTransition::targetState() const
{
Q_D(const QAbstractTransition);
if (d->targetStates.isEmpty())
return 0;
return nullptr;
return d->targetStates.first().data();
}
@ -325,8 +325,8 @@ void QAbstractTransition::setTransitionType(TransitionType type)
}
/*!
Returns the state machine that this transition is part of, or 0 if the
transition is not part of a state machine.
Returns the state machine that this transition is part of, or
\nullptr if the transition is not part of a state machine.
*/
QStateMachine *QAbstractTransition::machine() const
{

View File

@ -473,7 +473,8 @@ void QState::onExit(QEvent *event)
}
/*!
Returns this state's initial state, or 0 if the state has no initial state.
Returns this state's initial state, or \nullptr if the state has no
initial state.
*/
QAbstractState *QState::initialState() const
{

View File

@ -70,7 +70,7 @@
To look up objects in the cache, use object() or
operator[](). This function looks up an object by its key, and
returns either a pointer to the cached object (which is owned by
the cache) or 0.
the cache) or \nullptr.
If you want to remove an object from the cache for a particular key,
call remove(). This will also delete the object. If you want to
@ -171,7 +171,7 @@
/*! \fn template <class Key, class T> T *QCache<Key, T>::object(const Key &key) const
Returns the object associated with key \a key, or 0 if the key does
Returns the object associated with key \a key, or \nullptr if the key does
not exist in the cache.
\warning The returned object is owned by QCache and may be
@ -190,7 +190,7 @@
/*! \fn template <class Key, class T> T *QCache<Key, T>::operator[](const Key &key) const
Returns the object associated with key \a key, or 0 if the key does
Returns the object associated with key \a key, or \nullptr if the key does
not exist in the cache.
This is the same as object().

View File

@ -293,7 +293,7 @@ static void cpuidFeatures07_00(uint &ebx, uint &ecx, uint &edx)
#endif
}
#ifdef Q_OS_WIN
#if defined(Q_OS_WIN) && !(defined(Q_CC_GNU) || defined(Q_CC_GHS))
// fallback overload in case this intrinsic does not exist: unsigned __int64 _xgetbv(unsigned int);
inline quint64 _xgetbv(__int64) { return 0; }
#endif

View File

@ -239,7 +239,8 @@
"sources": [
{ "type": "pkgConfig", "args": "freetype2" },
{ "type": "freetype", "libs": "-lfreetype", "condition": "!config.wasm" },
{ "libs": "-s USE_FREETYPE=1", "condition": "config.wasm" }
{ "libs": "-s USE_FREETYPE=1", "condition": "config.wasm" },
{ "libs": "-lfreetype" }
],
"use": [
{ "lib": "zlib", "condition": "features.system-zlib" }
@ -1436,7 +1437,7 @@
},
"eglfs_x11": {
"label": "EGLFS X11",
"condition": "features.eglfs && features.xcb && features.xcb-xlib && features.egl_x11",
"condition": "features.eglfs && features.xcb-xlib && features.egl_x11",
"output": [ "privateFeature" ]
},
"gif": {
@ -1569,7 +1570,6 @@
},
"xcb-xlib": {
"label": "XCB Xlib",
"emitIf": "features.xcb",
"condition": "features.xlib && libs.xcb_xlib",
"output": [ "privateFeature" ]
},

View File

@ -54,7 +54,10 @@ exampledirs += ../../../examples/gui \
imagedirs += images \
../../../examples/gui/doc/images \
../../../doc/src/images \
../../../doc/src/images
# Included in qttestlib.qdocconf instead
excludefiles += ../kernel/qtestsupport_gui.cpp
manifestmeta.highlighted.names = "QtGui/Analog Clock Window Example"

View File

@ -310,6 +310,7 @@ QBitmap QBitmap::transformed(const QTransform &matrix) const
return bm;
}
#if QT_DEPRECATED_SINCE(5, 13)
/*!
\overload
\obsolete
@ -321,5 +322,6 @@ QBitmap QBitmap::transformed(const QMatrix &matrix) const
{
return transformed(QTransform(matrix));
}
#endif
QT_END_NAMESPACE

View File

@ -76,7 +76,10 @@ public:
static QBitmap fromData(const QSize &size, const uchar *bits,
QImage::Format monoFormat = QImage::Format_MonoLSB);
#if QT_DEPRECATED_SINCE(5, 13)
QT_DEPRECATED_X("Use QBitmap::transformed(QTransform) instead")
QBitmap transformed(const QMatrix &) const;
#endif
QBitmap transformed(const QTransform &matrix) const;
typedef QExplicitlySharedDataPointer<QPlatformPixmap> DataPtr;

View File

@ -188,7 +188,7 @@ static bool read_dib_infoheader(QDataStream &s, BMP_INFOHDR &bi)
if (!(comp == BMP_RGB || (nbits == 4 && comp == BMP_RLE4) ||
(nbits == 8 && comp == BMP_RLE8) || ((nbits == 16 || nbits == 32) && comp == BMP_BITFIELDS)))
return false; // weird compression type
if (bi.biWidth < 0 || quint64(bi.biWidth) * qAbs(bi.biHeight) > 16384 * 16384)
if (bi.biWidth <= 0 || !bi.biHeight || quint64(bi.biWidth) * qAbs(bi.biHeight) > 16384 * 16384)
return false;
return true;

View File

@ -3570,7 +3570,7 @@ void QImage::rgbSwapped_inplace()
The loader attempts to read the image using the specified \a format, e.g.,
PNG or JPG. If \a format is not specified (which is the default), it is
auto-detected based on the file's suffix and header. For details, see
{QImageReader::setAutoDetectImageFormat()}{QImageReader}.
QImageReader::setAutoDetectImageFormat().
The file name can either refer to an actual file on disk or to one
of the application's embedded resources. See the

View File

@ -416,6 +416,7 @@ QByteArray QImageIOHandler::format() const
\sa read(), QIODevice::peek()
*/
#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
@ -426,6 +427,7 @@ QByteArray QImageIOHandler::name() const
{
return format();
}
#endif
/*!
Writes the image \a image to the assigned device. Returns \c true on

View File

@ -69,7 +69,10 @@ public:
void setFormat(const QByteArray &format) const;
QByteArray format() const;
#if QT_DEPRECATED_SINCE(5, 13)
QT_DEPRECATED_X("Use QImageIOHandler::format() instead")
virtual QByteArray name() const;
#endif
virtual bool canRead() const = 0;
virtual bool read(QImage *image) = 0;

View File

@ -648,6 +648,7 @@ QImageIOHandler::Transformations QImageWriter::transformation() const
return d->transformation;
}
#if QT_DEPRECATED_SINCE(5, 13)
/*!
\obsolete
@ -679,6 +680,7 @@ QString QImageWriter::description() const
{
return d->description;
}
#endif
/*!
\since 4.1

View File

@ -100,9 +100,12 @@ public:
QImageIOHandler::Transformations transformation() const;
void setTransformation(QImageIOHandler::Transformations orientation);
// Obsolete as of 4.1
#if QT_DEPRECATED_SINCE(5, 13)
QT_DEPRECATED_X("Use QImageWriter::setText() instead")
void setDescription(const QString &description);
QT_DEPRECATED_X("Use QImageReader::text() instead")
QString description() const;
#endif
void setText(const QString &key, const QString &text);

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