Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ia7328524f2cd9d5995ac8705f0fe0bf570b2e831
This commit is contained in:
commit
f80b7995f3
@ -321,10 +321,10 @@ function(QT5_ADD_BIG_RESOURCES outfiles )
|
||||
add_custom_command(OUTPUT ${tmpoutfile}
|
||||
COMMAND ${Qt5Core_RCC_EXECUTABLE} ${rcc_options} --name ${outfilename} --pass 1 --output ${tmpoutfile} ${infile}
|
||||
DEPENDS ${infile} ${_rc_depends} "${out_depends}" VERBATIM)
|
||||
set_source_files_properties(${tmpoutfile} PROPERTIES SKIP_AUTOMOC ON)
|
||||
set_source_files_properties(${tmpoutfile} PROPERTIES SKIP_AUTOUIC ON)
|
||||
add_custom_target(big_resources_${outfilename} ALL DEPENDS ${tmpoutfile})
|
||||
add_library(rcc_object_${outfilename} OBJECT ${tmpoutfile})
|
||||
set_target_properties(rcc_object_${outfilename} PROPERTIES AUTOMOC OFF)
|
||||
set_target_properties(rcc_object_${outfilename} PROPERTIES AUTOUIC OFF)
|
||||
add_dependencies(rcc_object_${outfilename} big_resources_${outfilename})
|
||||
add_custom_command(OUTPUT ${outfile}
|
||||
COMMAND ${Qt5Core_RCC_EXECUTABLE}
|
||||
|
@ -1085,7 +1085,7 @@ QAbstractAnimation::State QAbstractAnimation::state() const
|
||||
|
||||
/*!
|
||||
If this animation is part of a QAnimationGroup, this function returns a
|
||||
pointer to the group; otherwise, it returns 0.
|
||||
pointer to the group; otherwise, it returns \nullptr.
|
||||
|
||||
\sa QAnimationGroup::addAnimation()
|
||||
*/
|
||||
|
@ -1242,7 +1242,7 @@ QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba)
|
||||
\obsolete
|
||||
|
||||
Returns the codec used by QObject::tr() on its argument. If this
|
||||
function returns 0 (the default), tr() assumes Latin-1.
|
||||
function returns \nullptr (the default), tr() assumes Latin-1.
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
@ -555,7 +555,7 @@ typedef struct _FILE_ID_INFO {
|
||||
|
||||
#endif // if defined (Q_CC_MINGW) && WINVER < 0x0602
|
||||
|
||||
// File ID for Windows up to version 7.
|
||||
// File ID for Windows up to version 7 and FAT32 drives
|
||||
static inline QByteArray fileId(HANDLE handle)
|
||||
{
|
||||
#ifndef Q_OS_WINRT
|
||||
@ -588,6 +588,8 @@ QByteArray fileIdWin8(HANDLE handle)
|
||||
result += ':';
|
||||
// Note: MinGW-64's definition of FILE_ID_128 differs from the MSVC one.
|
||||
result += QByteArray(reinterpret_cast<const char *>(&infoEx.FileId), int(sizeof(infoEx.FileId))).toHex();
|
||||
} else {
|
||||
result = fileId(handle); // GetFileInformationByHandleEx() is observed to fail for FAT32, QTBUG-74759
|
||||
}
|
||||
return result;
|
||||
#else // !QT_BOOTSTRAPPED && !QT_BUILD_QMAKE
|
||||
|
@ -162,7 +162,7 @@ QAbstractEventDispatcher::~QAbstractEventDispatcher()
|
||||
Returns a pointer to the event dispatcher object for the specified
|
||||
\a thread. If \a thread is zero, the current thread is used. If no
|
||||
event dispatcher exists for the specified thread, this function
|
||||
returns 0.
|
||||
returns \nullptr.
|
||||
|
||||
\b{Note:} If Qt is built without thread support, the \a thread
|
||||
argument is ignored.
|
||||
|
@ -2931,7 +2931,7 @@ bool QCoreApplication::hasPendingEvents()
|
||||
|
||||
/*!
|
||||
Returns a pointer to the event dispatcher object for the main thread. If no
|
||||
event dispatcher exists for the thread, this function returns 0.
|
||||
event dispatcher exists for the thread, this function returns \nullptr.
|
||||
*/
|
||||
QAbstractEventDispatcher *QCoreApplication::eventDispatcher()
|
||||
{
|
||||
|
@ -349,7 +349,7 @@ bool QMetaObject::inherits(const QMetaObject *metaObject) const Q_DECL_NOEXCEPT
|
||||
\internal
|
||||
|
||||
Returns \a obj if object \a obj inherits from this
|
||||
meta-object; otherwise returns 0.
|
||||
meta-object; otherwise returns \nullptr.
|
||||
*/
|
||||
QObject *QMetaObject::cast(QObject *obj) const
|
||||
{
|
||||
@ -361,7 +361,7 @@ QObject *QMetaObject::cast(QObject *obj) const
|
||||
\internal
|
||||
|
||||
Returns \a obj if object \a obj inherits from this
|
||||
meta-object; otherwise returns 0.
|
||||
meta-object; otherwise returns \nullptr.
|
||||
*/
|
||||
const QObject *QMetaObject::cast(const QObject *obj) const
|
||||
{
|
||||
|
@ -2346,7 +2346,7 @@ static void err_info_about_objects(const char * func,
|
||||
|
||||
/*!
|
||||
Returns a pointer to the object that sent the signal, if called in
|
||||
a slot activated by a signal; otherwise it returns 0. The pointer
|
||||
a slot activated by a signal; otherwise it returns \nullptr. The pointer
|
||||
is valid only during the execution of the slot that calls this
|
||||
function from this object's thread context.
|
||||
|
||||
|
@ -999,7 +999,7 @@ void QLibrary::setFileNameAndVersion(const QString &fileName, const QString &ver
|
||||
|
||||
/*!
|
||||
Returns the address of the exported symbol \a symbol. The library is
|
||||
loaded if necessary. The function returns 0 if the symbol could
|
||||
loaded if necessary. The function returns \nullptr if the symbol could
|
||||
not be resolved or if the library could not be loaded.
|
||||
|
||||
Example:
|
||||
@ -1032,7 +1032,7 @@ QFunctionPointer QLibrary::resolve(const char *symbol)
|
||||
include the platform-specific file suffix; (see \l{fileName}). The
|
||||
library remains loaded until the application exits.
|
||||
|
||||
The function returns 0 if the symbol could not be resolved or if
|
||||
The function returns \nullptr if the symbol could not be resolved or if
|
||||
the library could not be loaded.
|
||||
|
||||
\sa resolve()
|
||||
@ -1052,7 +1052,7 @@ QFunctionPointer QLibrary::resolve(const QString &fileName, const char *symbol)
|
||||
(see \l{fileName}). The library remains loaded until the application exits.
|
||||
\a verNum is ignored on Windows.
|
||||
|
||||
The function returns 0 if the symbol could not be resolved or if
|
||||
The function returns \nullptr if the symbol could not be resolved or if
|
||||
the library could not be loaded.
|
||||
|
||||
\sa resolve()
|
||||
@ -1073,7 +1073,7 @@ QFunctionPointer QLibrary::resolve(const QString &fileName, int verNum, const ch
|
||||
(see \l{fileName}). The library remains loaded until the application exits.
|
||||
\a version is ignored on Windows.
|
||||
|
||||
The function returns 0 if the symbol could not be resolved or if
|
||||
The function returns \nullptr if the symbol could not be resolved or if
|
||||
the library could not be loaded.
|
||||
|
||||
\sa resolve()
|
||||
|
@ -174,7 +174,7 @@ QPluginLoader::~QPluginLoader()
|
||||
|
||||
/*!
|
||||
Returns the root component object of the plugin. The plugin is
|
||||
loaded if necessary. The function returns 0 if the plugin could
|
||||
loaded if necessary. The function returns \nullptr if the plugin could
|
||||
not be loaded or if the root component object could not be
|
||||
instantiated.
|
||||
|
||||
|
@ -920,7 +920,7 @@ QThreadPrivate::~QThreadPrivate()
|
||||
\since 5.0
|
||||
|
||||
Returns a pointer to the event dispatcher object for the thread. If no event
|
||||
dispatcher exists for the thread, this function returns 0.
|
||||
dispatcher exists for the thread, this function returns \nullptr.
|
||||
*/
|
||||
QAbstractEventDispatcher *QThread::eventDispatcher() const
|
||||
{
|
||||
|
@ -875,7 +875,7 @@
|
||||
\b without ensuring that it cannot get deleted. To have that guarantee,
|
||||
use toStrongRef(), which returns a QSharedPointer object. If this
|
||||
function can determine that the pointer has already been deleted, it
|
||||
returns 0.
|
||||
returns \nullptr.
|
||||
|
||||
It is ok to obtain the value of the pointer and using that value itself,
|
||||
like for example in debugging statements:
|
||||
|
@ -1145,6 +1145,15 @@ bool QTextCursor::isNull() const
|
||||
\a pos using a \c MoveMode specified by \a m. The cursor is positioned
|
||||
between characters.
|
||||
|
||||
\note The "characters" in this case refer to the string of QChar
|
||||
objects, i.e. 16-bit Unicode characters, and \a pos is considered
|
||||
an index into this string. This does not necessarily correspond to
|
||||
individual graphemes in the writing system, as a single grapheme may
|
||||
be represented by multiple Unicode characters, such as in the case
|
||||
of surrogate pairs, linguistic ligatures or diacritics. For a more
|
||||
generic approach to navigating the document, use movePosition(),
|
||||
which will respect the actual grapheme boundaries in the text.
|
||||
|
||||
\sa position(), movePosition(), anchor()
|
||||
*/
|
||||
void QTextCursor::setPosition(int pos, MoveMode m)
|
||||
@ -1176,6 +1185,13 @@ void QTextCursor::setPosition(int pos, MoveMode m)
|
||||
Returns the absolute position of the cursor within the document.
|
||||
The cursor is positioned between characters.
|
||||
|
||||
\note The "characters" in this case refer to the string of QChar
|
||||
objects, i.e. 16-bit Unicode characters, and the position is considered
|
||||
an index into this string. This does not necessarily correspond to
|
||||
individual graphemes in the writing system, as a single grapheme may
|
||||
be represented by multiple Unicode characters, such as in the case
|
||||
of surrogate pairs, linguistic ligatures or diacritics.
|
||||
|
||||
\sa setPosition(), movePosition(), anchor(), positionInBlock()
|
||||
*/
|
||||
int QTextCursor::position() const
|
||||
@ -1192,6 +1208,13 @@ int QTextCursor::position() const
|
||||
|
||||
This is equivalent to \c{ position() - block().position()}.
|
||||
|
||||
\note The "characters" in this case refer to the string of QChar
|
||||
objects, i.e. 16-bit Unicode characters, and the position is considered
|
||||
an index into this string. This does not necessarily correspond to
|
||||
individual graphemes in the writing system, as a single grapheme may
|
||||
be represented by multiple Unicode characters, such as in the case
|
||||
of surrogate pairs, linguistic ligatures or diacritics.
|
||||
|
||||
\sa position()
|
||||
*/
|
||||
int QTextCursor::positionInBlock() const
|
||||
|
@ -163,12 +163,14 @@
|
||||
return NSViewLayerContentsRedrawDuringViewResize;
|
||||
}
|
||||
|
||||
#if 0 // Disabled until we enable lazy backingstore resizing
|
||||
- (NSViewLayerContentsPlacement)layerContentsPlacement
|
||||
{
|
||||
// Always place the layer at top left without any automatic scaling,
|
||||
// so that we can re-use larger layers when resizing a window down.
|
||||
return NSViewLayerContentsPlacementTopLeft;
|
||||
}
|
||||
#endif
|
||||
|
||||
- (void)updateMetalLayerDrawableSize:(CAMetalLayer *)layer
|
||||
{
|
||||
|
@ -286,7 +286,7 @@
|
||||
QStyleOption to a subclass (e.g., QStyleOptionFocusRect). For
|
||||
safety, you can use qstyleoption_cast() to ensure that the
|
||||
pointer type is correct. If the object isn't of the right type,
|
||||
qstyleoption_cast() returns 0. For example:
|
||||
qstyleoption_cast() returns \nullptr. For example:
|
||||
|
||||
\snippet code/doc_src_qt4-styles.cpp 0
|
||||
|
||||
|
@ -1860,7 +1860,7 @@ void QTableWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft,
|
||||
\fn QTableWidgetItem *QTableWidget::itemAt(int ax, int ay) const
|
||||
|
||||
Returns the item at the position equivalent to QPoint(\a{ax}, \a{ay}) in
|
||||
the table widget's coordinate system, or returns 0 if the specified point
|
||||
the table widget's coordinate system, or returns \nullptr if the specified point
|
||||
is not covered by an item in the table widget.
|
||||
|
||||
\sa item()
|
||||
|
@ -59,25 +59,22 @@ class tst_QSizeGrip : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public slots:
|
||||
void initTestCase();
|
||||
void cleanupTestCase();
|
||||
void cleanup();
|
||||
|
||||
private slots:
|
||||
void hideAndShowOnWindowStateChange_data();
|
||||
void hideAndShowOnWindowStateChange();
|
||||
void orientation();
|
||||
void dontCrashOnTLWChange();
|
||||
|
||||
private:
|
||||
QLineEdit *dummyWidget;
|
||||
};
|
||||
|
||||
class TestWidget : public QWidget
|
||||
{
|
||||
public:
|
||||
TestWidget(QWidget *parent = 0, Qt::WindowFlags flags = 0) : QWidget(parent, flags) {}
|
||||
QSize sizeHint() const { return QSize(300, 200); }
|
||||
void changeEvent(QEvent *event)
|
||||
using QWidget::QWidget;
|
||||
|
||||
QSize sizeHint() const override { return QSize(300, 200); }
|
||||
void changeEvent(QEvent *event) override
|
||||
{
|
||||
QWidget::changeEvent(event);
|
||||
if (isWindow() && event->type() == QEvent::WindowStateChange)
|
||||
@ -85,16 +82,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
void tst_QSizeGrip::initTestCase()
|
||||
void tst_QSizeGrip::cleanup()
|
||||
{
|
||||
dummyWidget = new QLineEdit;
|
||||
dummyWidget->show();
|
||||
}
|
||||
|
||||
void tst_QSizeGrip::cleanupTestCase()
|
||||
{
|
||||
delete dummyWidget;
|
||||
dummyWidget = 0;
|
||||
QVERIFY(QApplication::topLevelWidgets().isEmpty());
|
||||
}
|
||||
|
||||
void tst_QSizeGrip::hideAndShowOnWindowStateChange_data()
|
||||
@ -111,46 +101,45 @@ void tst_QSizeGrip::hideAndShowOnWindowStateChange()
|
||||
QSKIP("Broken on WinRT - QTBUG-68297");
|
||||
#endif
|
||||
|
||||
QWidget *parentWidget = windowType == Qt::Window ? 0 : new QWidget;
|
||||
TestWidget *widget = new TestWidget(parentWidget, Qt::WindowFlags(windowType));
|
||||
QSizeGrip *sizeGrip = new QSizeGrip(widget);
|
||||
QScopedPointer<QWidget> parentWidget;
|
||||
if (windowType != Qt::Window)
|
||||
parentWidget.reset(new QWidget);
|
||||
QScopedPointer<TestWidget> widget(new TestWidget(parentWidget.data(), Qt::WindowFlags(windowType)));
|
||||
QSizeGrip *sizeGrip = new QSizeGrip(widget.data());
|
||||
|
||||
// Normal.
|
||||
if (parentWidget)
|
||||
parentWidget->show();
|
||||
else
|
||||
widget->show();
|
||||
QVERIFY(sizeGrip->isVisible());
|
||||
QTRY_VERIFY(sizeGrip->isVisible());
|
||||
|
||||
widget->showFullScreen();
|
||||
QVERIFY(!sizeGrip->isVisible());
|
||||
QTRY_VERIFY(!sizeGrip->isVisible());
|
||||
|
||||
widget->showNormal();
|
||||
QVERIFY(sizeGrip->isVisible());
|
||||
QTRY_VERIFY(sizeGrip->isVisible());
|
||||
|
||||
widget->showMaximized();
|
||||
#ifndef Q_OS_MAC
|
||||
QVERIFY(!sizeGrip->isVisible());
|
||||
QTRY_VERIFY(!sizeGrip->isVisible());
|
||||
#else
|
||||
QEXPECT_FAIL("", "QTBUG-23681", Abort);
|
||||
QVERIFY(sizeGrip->isVisible());
|
||||
#endif
|
||||
|
||||
widget->showNormal();
|
||||
QVERIFY(sizeGrip->isVisible());
|
||||
QTRY_VERIFY(sizeGrip->isVisible());
|
||||
|
||||
sizeGrip->hide();
|
||||
QVERIFY(!sizeGrip->isVisible());
|
||||
QTRY_VERIFY(!sizeGrip->isVisible());
|
||||
|
||||
widget->showFullScreen();
|
||||
widget->showNormal();
|
||||
QVERIFY(!sizeGrip->isVisible());
|
||||
QTRY_VERIFY(!sizeGrip->isVisible());
|
||||
widget->showMaximized();
|
||||
widget->showNormal();
|
||||
QVERIFY(!sizeGrip->isVisible());
|
||||
|
||||
delete widget;
|
||||
delete parentWidget;
|
||||
QTRY_VERIFY(!sizeGrip->isVisible());
|
||||
}
|
||||
|
||||
void tst_QSizeGrip::orientation()
|
||||
@ -196,10 +185,10 @@ void tst_QSizeGrip::dontCrashOnTLWChange()
|
||||
QMdiArea mdiArea;
|
||||
mdiArea.show();
|
||||
|
||||
QMainWindow *mw = new QMainWindow();
|
||||
QMdiSubWindow *mdi = mdiArea.addSubWindow(mw);
|
||||
QScopedPointer<QMainWindow> mw(new QMainWindow);
|
||||
QMdiSubWindow *mdi = mdiArea.addSubWindow(mw.data());
|
||||
mw->statusBar()->setSizeGripEnabled(true);
|
||||
mdiArea.removeSubWindow(mw);
|
||||
mdiArea.removeSubWindow(mw.data());
|
||||
delete mdi;
|
||||
mw->show();
|
||||
|
||||
@ -209,7 +198,7 @@ void tst_QSizeGrip::dontCrashOnTLWChange()
|
||||
QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort);
|
||||
#endif
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&mdiArea));
|
||||
QVERIFY(QTest::qWaitForWindowExposed(mw));
|
||||
QVERIFY(QTest::qWaitForWindowExposed(mw.data()));
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_QSizeGrip)
|
||||
|
Loading…
x
Reference in New Issue
Block a user