Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: src/corelib/kernel/qobject.cpp Change-Id: I4780b25665672692b086ee92092e506c814642f2
This commit is contained in:
commit
a59c768489
@ -3,7 +3,7 @@
|
|||||||
dita.metadata.default.author = Qt Project
|
dita.metadata.default.author = Qt Project
|
||||||
dita.metadata.default.permissions = all
|
dita.metadata.default.permissions = all
|
||||||
dita.metadata.default.publisher = Qt Project
|
dita.metadata.default.publisher = Qt Project
|
||||||
dita.metadata.default.copyryear = 2019
|
dita.metadata.default.copyryear = 2020
|
||||||
dita.metadata.default.copyrholder = The Qt Company Ltd
|
dita.metadata.default.copyrholder = The Qt Company Ltd
|
||||||
dita.metadata.default.audience = programmer
|
dita.metadata.default.audience = programmer
|
||||||
|
|
||||||
|
@ -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" \
|
" <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-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-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/\">© 2019 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/\">© 2020 The Qt Company</a></li>\n" \
|
||||||
" </ul>\n" \
|
" </ul>\n" \
|
||||||
"</div>\n" \
|
"</div>\n" \
|
||||||
"</div>\n" \
|
"</div>\n" \
|
||||||
|
@ -8,7 +8,7 @@ HTML.footer = \
|
|||||||
"</div>\n" \
|
"</div>\n" \
|
||||||
"<div class=\"footer\">\n" \
|
"<div class=\"footer\">\n" \
|
||||||
" <p>\n" \
|
" <p>\n" \
|
||||||
" <acronym title=\"Copyright\">©</acronym> 2019 The Qt Company Ltd.\n" \
|
" <acronym title=\"Copyright\">©</acronym> 2020 The Qt Company Ltd.\n" \
|
||||||
" Documentation contributions included herein are the copyrights of\n" \
|
" Documentation contributions included herein are the copyrights of\n" \
|
||||||
" their respective owners.<br/>" \
|
" their respective owners.<br/>" \
|
||||||
" The documentation provided herein is licensed under the terms of the" \
|
" The documentation provided herein is licensed under the terms of the" \
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
HTML.footer = \
|
HTML.footer = \
|
||||||
" </div>\n" \
|
" </div>\n" \
|
||||||
" <p class=\"copy-notice\">\n" \
|
" <p class=\"copy-notice\">\n" \
|
||||||
" <acronym title=\"Copyright\">©</acronym> 2019 The Qt Company Ltd.\n" \
|
" <acronym title=\"Copyright\">©</acronym> 2020 The Qt Company Ltd.\n" \
|
||||||
" Documentation contributions included herein are the copyrights of\n" \
|
" Documentation contributions included herein are the copyrights of\n" \
|
||||||
" their respective owners. " \
|
" their respective owners. " \
|
||||||
" The documentation provided herein is licensed under the terms of the" \
|
" The documentation provided herein is licensed under the terms of the" \
|
||||||
|
@ -182,6 +182,6 @@
|
|||||||
In addition to the functions and slots discussed above, we have
|
In addition to the functions and slots discussed above, we have
|
||||||
also implemented several convenience functions to simplify the
|
also implemented several convenience functions to simplify the
|
||||||
constructor: \c createIconGroupBox(), \c createMessageGroupBox(),
|
constructor: \c createIconGroupBox(), \c createMessageGroupBox(),
|
||||||
\c createActions() and \c createTrayIcon(). See the \l
|
\c createActions() and \c createTrayIcon(). See the \c
|
||||||
{desktop/systray/window.cpp}{window.cpp} file for details.
|
{desktop/systray/window.cpp} file for details.
|
||||||
*/
|
*/
|
||||||
|
@ -136,7 +136,7 @@
|
|||||||
|
|
||||||
\section1 Defining the AddressBook Class
|
\section1 Defining the AddressBook Class
|
||||||
|
|
||||||
The \l{tutorials/addressbook/part1/addressbook.h}{\c addressbook.h} file is
|
The \c{tutorials/addressbook/part1/addressbook.h} file is
|
||||||
used to define the \c AddressBook class.
|
used to define the \c AddressBook class.
|
||||||
|
|
||||||
We start by defining \c AddressBook as a QWidget subclass and declaring
|
We start by defining \c AddressBook as a QWidget subclass and declaring
|
||||||
|
@ -284,6 +284,6 @@
|
|||||||
instance of the QStandardItemModel class, i.e., a generic model
|
instance of the QStandardItemModel class, i.e., a generic model
|
||||||
for storing custom data typically used as a repository for
|
for storing custom data typically used as a repository for
|
||||||
standard Qt data types. Each mail description is added to the
|
standard Qt data types. Each mail description is added to the
|
||||||
model using \c addMail(), another convenience function. See \l
|
model using \c addMail(), another convenience function. See \c
|
||||||
{itemviews/customsortfiltermodel/main.cpp}{main.cpp} for details.
|
{itemviews/customsortfiltermodel/main.cpp} for details.
|
||||||
*/
|
*/
|
||||||
|
@ -320,8 +320,8 @@
|
|||||||
|
|
||||||
The \c setupShapes() function is called from the constructor and
|
The \c setupShapes() function is called from the constructor and
|
||||||
create the QPainterPath objects representing the shapes that are
|
create the QPainterPath objects representing the shapes that are
|
||||||
used in the application. For construction details, see the \l
|
used in the application. For construction details, see the \c
|
||||||
{painting/transformations/window.cpp}{window.cpp} example
|
{painting/transformations/window.cpp} example
|
||||||
file. The shapes are stored in a QList. The QList::append()
|
file. The shapes are stored in a QList. The QList::append()
|
||||||
function inserts the given shape at the end of the list.
|
function inserts the given shape at the end of the list.
|
||||||
|
|
||||||
|
@ -36,7 +36,8 @@ build_pass {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else: contains(TEMPLATE, "lib"):!static:!QTDIR_build:android_install {
|
} else: contains(TEMPLATE, "lib"):!static:!QTDIR_build:android_install {
|
||||||
!contains(TARGET, "_$${QT_ARCH}"): TARGET = $${TARGET}_$${QT_ARCH}
|
tmpvar = $$str_member(TARGET, -$$str_size(QT_ARCH), -1)
|
||||||
|
!equals(tmpvar, $${QT_ARCH}): TARGET = $${TARGET}_$${QT_ARCH}
|
||||||
target.path = /libs/$$ANDROID_TARGET_ARCH/
|
target.path = /libs/$$ANDROID_TARGET_ARCH/
|
||||||
INSTALLS *= target
|
INSTALLS *= target
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
QMAKE_TARGET_COMPANY = The Qt Company Ltd.
|
QMAKE_TARGET_COMPANY = The Qt Company Ltd.
|
||||||
isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
|
isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
|
||||||
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ Application Development Framework
|
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ Application Development Framework
|
||||||
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2019 The Qt Company Ltd.
|
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2020 The Qt Company Ltd.
|
||||||
|
@ -40,3 +40,21 @@ win32|macx {
|
|||||||
HEADERS += debugging.h
|
HEADERS += debugging.h
|
||||||
}
|
}
|
||||||
#! [4]
|
#! [4]
|
||||||
|
|
||||||
|
#! [5]
|
||||||
|
if(win32|macos):CONFIG(debug, debug|release) {
|
||||||
|
# Do something on Windows and macOS,
|
||||||
|
# but only for the debug configuration.
|
||||||
|
}
|
||||||
|
win32|if(macos:CONFIG(debug, debug|release)) {
|
||||||
|
# Do something on Windows (regardless of debug or release)
|
||||||
|
# and on macOS (only for debug).
|
||||||
|
}
|
||||||
|
#! [5]
|
||||||
|
|
||||||
|
#! [6]
|
||||||
|
win32-* {
|
||||||
|
# Matches every mkspec starting with "win32-"
|
||||||
|
SOURCES += win32_specific.cpp
|
||||||
|
}
|
||||||
|
#! [6]
|
||||||
|
@ -4418,6 +4418,20 @@
|
|||||||
|
|
||||||
\snippet qmake/scopes.pro 4
|
\snippet qmake/scopes.pro 4
|
||||||
|
|
||||||
|
If you need to mix both operators, you can use the \c if function to specify
|
||||||
|
operator precedence.
|
||||||
|
|
||||||
|
\snippet qmake/scopes.pro 5
|
||||||
|
|
||||||
|
The condition accepts the wildcard character to match a family of \c{CONFIG}
|
||||||
|
values or mkspec names.
|
||||||
|
|
||||||
|
\snippet qmake/scopes.pro 6
|
||||||
|
|
||||||
|
\note Historically, checking the mkspec name with wildcards like above was
|
||||||
|
qmake's way to check for the platform. Nowadays, we recommend to use values
|
||||||
|
that are defined by the mkspec in the \c QMAKE_PLATFORM variable.
|
||||||
|
|
||||||
You can also provide alternative declarations to those within a scope by
|
You can also provide alternative declarations to those within a scope by
|
||||||
using an \c else scope. Each \c else scope is processed if the conditions
|
using an \c else scope. Each \c else scope is processed if the conditions
|
||||||
for the preceding scopes are false.
|
for the preceding scopes are false.
|
||||||
|
@ -132,23 +132,6 @@ public class QtActivityLoader extends QtLoader {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT < 21) {
|
|
||||||
// fatal error, show the error and quit
|
|
||||||
AlertDialog errorDialog = new AlertDialog.Builder(m_activity).create();
|
|
||||||
if (m_contextInfo.metaData.containsKey("android.app.unsupported_android_version"))
|
|
||||||
errorDialog.setMessage(m_contextInfo.metaData.getString("android.app.unsupported_android_version"));
|
|
||||||
else
|
|
||||||
errorDialog.setMessage("Unsupported Android version.");
|
|
||||||
errorDialog.setButton(m_activity.getResources().getString(android.R.string.ok), new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
errorDialog.show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
m_activity.setTheme(Class.forName("android.R$style").getDeclaredField(QT_ANDROID_DEFAULT_THEME).getInt(null));
|
m_activity.setTheme(Class.forName("android.R$style").getDeclaredField(QT_ANDROID_DEFAULT_THEME).getInt(null));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -71,7 +71,7 @@ QTimer *timer = qobject_cast<QTimer *>(obj);
|
|||||||
// timer == (QObject *)obj
|
// timer == (QObject *)obj
|
||||||
|
|
||||||
QAbstractButton *button = qobject_cast<QAbstractButton *>(obj);
|
QAbstractButton *button = qobject_cast<QAbstractButton *>(obj);
|
||||||
// button == 0
|
// button == nullptr
|
||||||
//! [3]
|
//! [3]
|
||||||
|
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ class MyObject : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MyObject(QObject *parent = 0);
|
MyObject(QObject *parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void timerEvent(QTimerEvent *event) override;
|
void timerEvent(QTimerEvent *event) override;
|
||||||
@ -322,7 +322,7 @@ QObject::connect: Cannot queue arguments of type 'MyType'
|
|||||||
|
|
||||||
|
|
||||||
//! [26]
|
//! [26]
|
||||||
disconnect(myObject, 0, 0, 0);
|
disconnect(myObject, nullptr, nullptr, nullptr);
|
||||||
//! [26]
|
//! [26]
|
||||||
|
|
||||||
|
|
||||||
@ -332,7 +332,7 @@ myObject->disconnect();
|
|||||||
|
|
||||||
|
|
||||||
//! [28]
|
//! [28]
|
||||||
disconnect(myObject, SIGNAL(mySignal()), 0, 0);
|
disconnect(myObject, SIGNAL(mySignal()), nullptr, nullptr);
|
||||||
//! [28]
|
//! [28]
|
||||||
|
|
||||||
|
|
||||||
@ -342,7 +342,7 @@ myObject->disconnect(SIGNAL(mySignal()));
|
|||||||
|
|
||||||
|
|
||||||
//! [30]
|
//! [30]
|
||||||
disconnect(myObject, 0, myReceiver, 0);
|
disconnect(myObject, nullptr, myReceiver, nullptr);
|
||||||
//! [30]
|
//! [30]
|
||||||
|
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ class MyClass : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MyClass(QObject *parent = 0);
|
MyClass(QObject *parent = nullptr);
|
||||||
~MyClass();
|
~MyClass();
|
||||||
|
|
||||||
enum Priority { High, Low, VeryHigh, VeryLow };
|
enum Priority { High, Low, VeryHigh, VeryLow };
|
||||||
@ -467,7 +467,7 @@ QObject::connect(socket, &QTcpSocket::connected, [=] () {
|
|||||||
//! [46]
|
//! [46]
|
||||||
|
|
||||||
//! [47]
|
//! [47]
|
||||||
disconnect(myObject, &MyObject::mySignal(), 0, 0);
|
disconnect(myObject, &MyObject::mySignal(), nullptr, nullptr);
|
||||||
//! [47]
|
//! [47]
|
||||||
|
|
||||||
//! [48]
|
//! [48]
|
||||||
@ -505,7 +505,7 @@ class MyClass : public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MyClass(QWidget *parent = 0);
|
MyClass(QWidget *parent = nullptr);
|
||||||
~MyClass();
|
~MyClass();
|
||||||
|
|
||||||
bool event(QEvent* ev) override
|
bool event(QEvent* ev) override
|
||||||
|
@ -882,7 +882,6 @@
|
|||||||
# define Q_COMPILER_DEFAULT_MEMBERS
|
# define Q_COMPILER_DEFAULT_MEMBERS
|
||||||
# define Q_COMPILER_DELETE_MEMBERS
|
# define Q_COMPILER_DELETE_MEMBERS
|
||||||
/* C++11 features supported in GCC 4.6: */
|
/* C++11 features supported in GCC 4.6: */
|
||||||
# define Q_COMPILER_CONSTEXPR
|
|
||||||
# define Q_COMPILER_NULLPTR
|
# define Q_COMPILER_NULLPTR
|
||||||
# define Q_COMPILER_UNRESTRICTED_UNIONS
|
# define Q_COMPILER_UNRESTRICTED_UNIONS
|
||||||
# define Q_COMPILER_RANGE_FOR
|
# define Q_COMPILER_RANGE_FOR
|
||||||
@ -913,7 +912,11 @@
|
|||||||
# define Q_COMPILER_REF_QUALIFIERS
|
# define Q_COMPILER_REF_QUALIFIERS
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
/* C++11 features are complete as of GCC 4.8.1 */
|
# if Q_CC_GNU >= 500
|
||||||
|
/* GCC 4.6 introduces constexpr, but it's bugged (at least) in the whole
|
||||||
|
* 4.x series, see e.g. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57694 */
|
||||||
|
# define Q_COMPILER_CONSTEXPR
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# if __cplusplus > 201103L
|
# if __cplusplus > 201103L
|
||||||
# if Q_CC_GNU >= 409
|
# if Q_CC_GNU >= 409
|
||||||
|
@ -1165,8 +1165,8 @@ QObjectPrivate::Connection::~Connection()
|
|||||||
\relates QObject
|
\relates QObject
|
||||||
|
|
||||||
Returns the given \a object cast to type T if the object is of type
|
Returns the given \a object cast to type T if the object is of type
|
||||||
T (or of a subclass); otherwise returns 0. If \a object is 0 then
|
T (or of a subclass); otherwise returns \nullptr. If \a object is
|
||||||
it will also return 0.
|
\nullptr then it will also return \nullptr.
|
||||||
|
|
||||||
The class T must inherit (directly or indirectly) QObject and be
|
The class T must inherit (directly or indirectly) QObject and be
|
||||||
declared with the \l Q_OBJECT macro.
|
declared with the \l Q_OBJECT macro.
|
||||||
@ -1518,7 +1518,7 @@ QThread *QObject::thread() const
|
|||||||
the thread affinity is changed. You can handle this event to
|
the thread affinity is changed. You can handle this event to
|
||||||
perform any special processing. Note that any new events that are
|
perform any special processing. Note that any new events that are
|
||||||
posted to this object will be handled in the \a targetThread,
|
posted to this object will be handled in the \a targetThread,
|
||||||
provided it is non-null: when it is \nullptr, no event processing
|
provided it is not \nullptr: when it is \nullptr, no event processing
|
||||||
for this object or its children can happen, as they are no longer
|
for this object or its children can happen, as they are no longer
|
||||||
associated with any thread.
|
associated with any thread.
|
||||||
|
|
||||||
@ -2323,7 +2323,7 @@ void QObject::deleteLater()
|
|||||||
|
|
||||||
If the same \a sourceText is used in different roles within the
|
If the same \a sourceText is used in different roles within the
|
||||||
same context, an additional identifying string may be passed in
|
same context, an additional identifying string may be passed in
|
||||||
\a disambiguation (0 by default). In Qt 4.4 and earlier, this was
|
\a disambiguation (\nullptr by default). In Qt 4.4 and earlier, this was
|
||||||
the preferred way to pass comments to translators.
|
the preferred way to pass comments to translators.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@ -2509,7 +2509,7 @@ QObject *QObject::sender() const
|
|||||||
|
|
||||||
For signals with default parameters, this function will always return
|
For signals with default parameters, this function will always return
|
||||||
the index with all parameters, regardless of which was used with
|
the index with all parameters, regardless of which was used with
|
||||||
connect(). For example, the signal \c {destroyed(QObject *obj = 0)}
|
connect(). For example, the signal \c {destroyed(QObject *obj = \nullptr)}
|
||||||
will have two different indexes (with and without the parameter), but
|
will have two different indexes (with and without the parameter), but
|
||||||
this function will always return the index with a parameter. This does
|
this function will always return the index with a parameter. This does
|
||||||
not apply when overloading signals with different parameters.
|
not apply when overloading signals with different parameters.
|
||||||
@ -2650,7 +2650,7 @@ bool QObject::isSignalConnected(const QMetaMethod &signal) const
|
|||||||
member in the specified class.
|
member in the specified class.
|
||||||
|
|
||||||
\list
|
\list
|
||||||
\li If member.mobj is 0 then both signalIndex and methodIndex are set to -1.
|
\li If member.mobj is \nullptr then both signalIndex and methodIndex are set to -1.
|
||||||
|
|
||||||
\li If specified member is not a member of obj instance class (or one of
|
\li If specified member is not a member of obj instance class (or one of
|
||||||
its parent classes) then both signalIndex and methodIndex are set to -1.
|
its parent classes) then both signalIndex and methodIndex are set to -1.
|
||||||
@ -2789,10 +2789,10 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const char *sign
|
|||||||
{
|
{
|
||||||
if (sender == nullptr || receiver == nullptr || signal == nullptr || method == nullptr) {
|
if (sender == nullptr || receiver == nullptr || signal == nullptr || method == nullptr) {
|
||||||
qWarning("QObject::connect: Cannot connect %s::%s to %s::%s",
|
qWarning("QObject::connect: Cannot connect %s::%s to %s::%s",
|
||||||
sender ? sender->metaObject()->className() : "(null)",
|
sender ? sender->metaObject()->className() : "(nullptr)",
|
||||||
(signal && *signal) ? signal+1 : "(null)",
|
(signal && *signal) ? signal+1 : "(nullptr)",
|
||||||
receiver ? receiver->metaObject()->className() : "(null)",
|
receiver ? receiver->metaObject()->className() : "(nullptr)",
|
||||||
(method && *method) ? method+1 : "(null)");
|
(method && *method) ? method+1 : "(nullptr)");
|
||||||
return QMetaObject::Connection(nullptr);
|
return QMetaObject::Connection(nullptr);
|
||||||
}
|
}
|
||||||
QByteArray tmp_signal_name;
|
QByteArray tmp_signal_name;
|
||||||
@ -2930,9 +2930,9 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const QMetaMetho
|
|||||||
|| signal.methodType() != QMetaMethod::Signal
|
|| signal.methodType() != QMetaMethod::Signal
|
||||||
|| method.methodType() == QMetaMethod::Constructor) {
|
|| method.methodType() == QMetaMethod::Constructor) {
|
||||||
qWarning("QObject::connect: Cannot connect %s::%s to %s::%s",
|
qWarning("QObject::connect: Cannot connect %s::%s to %s::%s",
|
||||||
sender ? sender->metaObject()->className() : "(null)",
|
sender ? sender->metaObject()->className() : "(nullptr)",
|
||||||
signal.methodSignature().constData(),
|
signal.methodSignature().constData(),
|
||||||
receiver ? receiver->metaObject()->className() : "(null)",
|
receiver ? receiver->metaObject()->className() : "(nullptr)",
|
||||||
method.methodSignature().constData() );
|
method.methodSignature().constData() );
|
||||||
return QMetaObject::Connection(nullptr);
|
return QMetaObject::Connection(nullptr);
|
||||||
}
|
}
|
||||||
@ -3034,20 +3034,20 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const QMetaMetho
|
|||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
0 may be used as a wildcard, meaning "any signal", "any receiving
|
\nullptr may be used as a wildcard, meaning "any signal", "any receiving
|
||||||
object", or "any slot in the receiving object", respectively.
|
object", or "any slot in the receiving object", respectively.
|
||||||
|
|
||||||
The \a sender may never be \nullptr. (You cannot disconnect signals
|
The \a sender may never be \nullptr. (You cannot disconnect signals
|
||||||
from more than one object in a single call.)
|
from more than one object in a single call.)
|
||||||
|
|
||||||
If \a signal is 0, it disconnects \a receiver and \a method from
|
If \a signal is \nullptr, it disconnects \a receiver and \a method from
|
||||||
any signal. If not, only the specified signal is disconnected.
|
any signal. If not, only the specified signal is disconnected.
|
||||||
|
|
||||||
If \a receiver is 0, it disconnects anything connected to \a
|
If \a receiver is \nullptr, it disconnects anything connected to \a
|
||||||
signal. If not, slots in objects other than \a receiver are not
|
signal. If not, slots in objects other than \a receiver are not
|
||||||
disconnected.
|
disconnected.
|
||||||
|
|
||||||
If \a method is 0, it disconnects anything that is connected to \a
|
If \a method is \nullptr, it disconnects anything that is connected to \a
|
||||||
receiver. If not, only slots named \a method will be disconnected,
|
receiver. If not, only slots named \a method will be disconnected,
|
||||||
and all other slots are left alone. The \a method must be \nullptr
|
and all other slots are left alone. The \a method must be \nullptr
|
||||||
if \a receiver is left out, so you cannot disconnect a
|
if \a receiver is left out, so you cannot disconnect a
|
||||||
@ -3059,7 +3059,7 @@ bool QObject::disconnect(const QObject *sender, const char *signal,
|
|||||||
const QObject *receiver, const char *method)
|
const QObject *receiver, const char *method)
|
||||||
{
|
{
|
||||||
if (sender == nullptr || (receiver == nullptr && method != nullptr)) {
|
if (sender == nullptr || (receiver == nullptr && method != nullptr)) {
|
||||||
qWarning("QObject::disconnect: Unexpected null parameter");
|
qWarning("QObject::disconnect: Unexpected nullptr parameter");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3185,8 +3185,8 @@ bool QObject::disconnect(const QObject *sender, const char *signal,
|
|||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
QMetaMethod() may be used as wildcard in the meaning "any signal" or "any slot in receiving object".
|
QMetaMethod() may be used as wildcard in the meaning "any signal" or "any slot in receiving object".
|
||||||
In the same way 0 can be used for \a receiver in the meaning "any receiving object". In this case
|
In the same way \nullptr can be used for \a receiver in the meaning "any receiving object".
|
||||||
method should also be QMetaMethod(). \a sender parameter should be never 0.
|
In this case method should also be QMetaMethod(). \a sender parameter should be never \nullptr.
|
||||||
|
|
||||||
\sa disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
|
\sa disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
|
||||||
*/
|
*/
|
||||||
@ -3194,7 +3194,7 @@ bool QObject::disconnect(const QObject *sender, const QMetaMethod &signal,
|
|||||||
const QObject *receiver, const QMetaMethod &method)
|
const QObject *receiver, const QMetaMethod &method)
|
||||||
{
|
{
|
||||||
if (sender == nullptr || (receiver == nullptr && method.mobj != nullptr)) {
|
if (sender == nullptr || (receiver == nullptr && method.mobj != nullptr)) {
|
||||||
qWarning("QObject::disconnect: Unexpected null parameter");
|
qWarning("QObject::disconnect: Unexpected nullptr parameter");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (signal.mobj) {
|
if (signal.mobj) {
|
||||||
@ -3228,7 +3228,7 @@ bool QObject::disconnect(const QObject *sender, const QMetaMethod &signal,
|
|||||||
QMetaObjectPrivate::memberIndexes(sender, signal, &signal_index, &dummy);
|
QMetaObjectPrivate::memberIndexes(sender, signal, &signal_index, &dummy);
|
||||||
QMetaObjectPrivate::memberIndexes(receiver, method, &dummy, &method_index);
|
QMetaObjectPrivate::memberIndexes(receiver, method, &dummy, &method_index);
|
||||||
}
|
}
|
||||||
// If we are here sender is not null. If signal is not null while signal_index
|
// If we are here sender is not nullptr. If signal is not nullptr while signal_index
|
||||||
// is -1 then this signal is not a member of sender.
|
// is -1 then this signal is not a member of sender.
|
||||||
if (signal.mobj && signal_index == -1) {
|
if (signal.mobj && signal_index == -1) {
|
||||||
qWarning("QObject::disconect: signal %s not found on class %s",
|
qWarning("QObject::disconect: signal %s not found on class %s",
|
||||||
@ -3317,7 +3317,7 @@ void QObject::connectNotify(const QMetaMethod &signal)
|
|||||||
\a signal with a specific signal.
|
\a signal with a specific signal.
|
||||||
|
|
||||||
If all signals were disconnected from this object (e.g., the
|
If all signals were disconnected from this object (e.g., the
|
||||||
signal argument to disconnect() was 0), disconnectNotify()
|
signal argument to disconnect() was \nullptr), disconnectNotify()
|
||||||
is only called once, and the \a signal will be an invalid
|
is only called once, and the \a signal will be an invalid
|
||||||
QMetaMethod (QMetaMethod::isValid() returns \c false).
|
QMetaMethod (QMetaMethod::isValid() returns \c false).
|
||||||
|
|
||||||
@ -4917,7 +4917,7 @@ void qDeleteInEventHandler(QObject *o)
|
|||||||
|
|
||||||
\a sender is the sender object
|
\a sender is the sender object
|
||||||
\a signal is a pointer to a pointer to a member signal of the sender
|
\a signal is a pointer to a pointer to a member signal of the sender
|
||||||
\a receiver is the receiver object, may not be null, will be equal to sender when
|
\a receiver is the receiver object, may not be \nullptr, will be equal to sender when
|
||||||
connecting to a static function or a functor
|
connecting to a static function or a functor
|
||||||
\a slot a pointer only used when using Qt::UniqueConnection
|
\a slot a pointer only used when using Qt::UniqueConnection
|
||||||
\a type the Qt::ConnctionType passed as argument to connect
|
\a type the Qt::ConnctionType passed as argument to connect
|
||||||
@ -4925,7 +4925,7 @@ void qDeleteInEventHandler(QObject *o)
|
|||||||
to be used with queued connection
|
to be used with queued connection
|
||||||
must stay valid at least for the whole time of the connection, this function
|
must stay valid at least for the whole time of the connection, this function
|
||||||
do not take ownership. typically static data.
|
do not take ownership. typically static data.
|
||||||
If null, then the types will be computed when the signal is emit in a queued
|
If \nullptr, then the types will be computed when the signal is emit in a queued
|
||||||
connection from the types from the signature.
|
connection from the types from the signature.
|
||||||
\a senderMetaObject is the metaobject used to lookup the signal, the signal must be in
|
\a senderMetaObject is the metaobject used to lookup the signal, the signal must be in
|
||||||
this metaobject
|
this metaobject
|
||||||
@ -4936,7 +4936,7 @@ QMetaObject::Connection QObject::connectImpl(const QObject *sender, void **signa
|
|||||||
const int *types, const QMetaObject *senderMetaObject)
|
const int *types, const QMetaObject *senderMetaObject)
|
||||||
{
|
{
|
||||||
if (!signal) {
|
if (!signal) {
|
||||||
qWarning("QObject::connect: invalid null parameter");
|
qWarning("QObject::connect: invalid nullptr parameter");
|
||||||
if (slotObj)
|
if (slotObj)
|
||||||
slotObj->destroyIfLastRef();
|
slotObj->destroyIfLastRef();
|
||||||
return QMetaObject::Connection();
|
return QMetaObject::Connection();
|
||||||
@ -4976,7 +4976,7 @@ QMetaObject::Connection QObjectPrivate::connectImpl(const QObject *sender, int s
|
|||||||
: "Unknown";
|
: "Unknown";
|
||||||
const char *receiverString = receiver ? receiver->metaObject()->className()
|
const char *receiverString = receiver ? receiver->metaObject()->className()
|
||||||
: "Unknown";
|
: "Unknown";
|
||||||
qWarning("QObject::connect(%s, %s): invalid null parameter", senderString, receiverString);
|
qWarning("QObject::connect(%s, %s): invalid nullptr parameter", senderString, receiverString);
|
||||||
if (slotObj)
|
if (slotObj)
|
||||||
slotObj->destroyIfLastRef();
|
slotObj->destroyIfLastRef();
|
||||||
return QMetaObject::Connection();
|
return QMetaObject::Connection();
|
||||||
@ -5109,20 +5109,20 @@ bool QObject::disconnect(const QMetaObject::Connection &connection)
|
|||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
0 may be used as a wildcard, meaning "any signal", "any receiving
|
\nullptr may be used as a wildcard, meaning "any signal", "any receiving
|
||||||
object", or "any slot in the receiving object", respectively.
|
object", or "any slot in the receiving object", respectively.
|
||||||
|
|
||||||
The \a sender may never be \nullptr. (You cannot disconnect signals
|
The \a sender may never be \nullptr. (You cannot disconnect signals
|
||||||
from more than one object in a single call.)
|
from more than one object in a single call.)
|
||||||
|
|
||||||
If \a signal is 0, it disconnects \a receiver and \a method from
|
If \a signal is \nullptr, it disconnects \a receiver and \a method from
|
||||||
any signal. If not, only the specified signal is disconnected.
|
any signal. If not, only the specified signal is disconnected.
|
||||||
|
|
||||||
If \a receiver is 0, it disconnects anything connected to \a
|
If \a receiver is \nullptr, it disconnects anything connected to \a
|
||||||
signal. If not, slots in objects other than \a receiver are not
|
signal. If not, slots in objects other than \a receiver are not
|
||||||
disconnected.
|
disconnected.
|
||||||
|
|
||||||
If \a method is 0, it disconnects anything that is connected to \a
|
If \a method is \nullptr, it disconnects anything that is connected to \a
|
||||||
receiver. If not, only slots named \a method will be disconnected,
|
receiver. If not, only slots named \a method will be disconnected,
|
||||||
and all other slots are left alone. The \a method must be \nullptr
|
and all other slots are left alone. The \a method must be \nullptr
|
||||||
if \a receiver is left out, so you cannot disconnect a
|
if \a receiver is left out, so you cannot disconnect a
|
||||||
@ -5139,7 +5139,7 @@ bool QObject::disconnect(const QMetaObject::Connection &connection)
|
|||||||
bool QObject::disconnectImpl(const QObject *sender, void **signal, const QObject *receiver, void **slot, const QMetaObject *senderMetaObject)
|
bool QObject::disconnectImpl(const QObject *sender, void **signal, const QObject *receiver, void **slot, const QMetaObject *senderMetaObject)
|
||||||
{
|
{
|
||||||
if (sender == nullptr || (receiver == nullptr && slot != nullptr)) {
|
if (sender == nullptr || (receiver == nullptr && slot != nullptr)) {
|
||||||
qWarning("QObject::disconnect: Unexpected null parameter");
|
qWarning("QObject::disconnect: Unexpected nullptr parameter");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5170,7 +5170,7 @@ bool QObject::disconnectImpl(const QObject *sender, void **signal, const QObject
|
|||||||
QMetaObject::Connection QObjectPrivate::connect(const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
|
QMetaObject::Connection QObjectPrivate::connect(const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
|
||||||
{
|
{
|
||||||
if (!sender) {
|
if (!sender) {
|
||||||
qWarning("QObject::connect: invalid null parameter");
|
qWarning("QObject::connect: invalid nullptr parameter");
|
||||||
if (slotObj)
|
if (slotObj)
|
||||||
slotObj->destroyIfLastRef();
|
slotObj->destroyIfLastRef();
|
||||||
return QMetaObject::Connection();
|
return QMetaObject::Connection();
|
||||||
|
@ -332,9 +332,9 @@ private:
|
|||||||
return Type(quint8(st) | SimpleType);
|
return Type(quint8(st) | SimpleType);
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_DECL_CONSTEXPR static bool isTag_helper(Type t)
|
Q_DECL_CONSTEXPR static bool isTag_helper(Type tt)
|
||||||
{
|
{
|
||||||
return t == Tag || t >= 0x10000;
|
return tt == Tag || tt >= 0x10000;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Q_DECLARE_SHARED(QCborValue)
|
Q_DECLARE_SHARED(QCborValue)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Copyright (C) 2019 Intel Corporation.
|
** Copyright (C) 2019 Intel Corporation.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
@ -651,7 +651,6 @@ int qt_repeatCount(QStringView s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const QLocaleData *default_data = nullptr;
|
static const QLocaleData *default_data = nullptr;
|
||||||
static QLocale::NumberOptions default_number_options = QLocale::DefaultNumberOptions;
|
|
||||||
|
|
||||||
static const QLocaleData *const c_data = locale_data;
|
static const QLocaleData *const c_data = locale_data;
|
||||||
static QLocalePrivate *c_private()
|
static QLocalePrivate *c_private()
|
||||||
@ -834,7 +833,7 @@ QDataStream &operator>>(QDataStream &ds, QLocale &l)
|
|||||||
static const int locale_data_size = sizeof(locale_data)/sizeof(QLocaleData) - 1;
|
static const int locale_data_size = sizeof(locale_data)/sizeof(QLocaleData) - 1;
|
||||||
|
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(QSharedDataPointer<QLocalePrivate>, defaultLocalePrivate,
|
Q_GLOBAL_STATIC_WITH_ARGS(QSharedDataPointer<QLocalePrivate>, defaultLocalePrivate,
|
||||||
(QLocalePrivate::create(defaultData(), default_number_options)))
|
(QLocalePrivate::create(defaultData())))
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(QExplicitlySharedDataPointer<QLocalePrivate>, systemLocalePrivate,
|
Q_GLOBAL_STATIC_WITH_ARGS(QExplicitlySharedDataPointer<QLocalePrivate>, systemLocalePrivate,
|
||||||
(QLocalePrivate::create(systemData())))
|
(QLocalePrivate::create(systemData())))
|
||||||
|
|
||||||
@ -862,8 +861,9 @@ static QLocalePrivate *findLocalePrivate(QLocale::Language language, QLocale::Sc
|
|||||||
QLocale::NumberOptions numberOptions = QLocale::DefaultNumberOptions;
|
QLocale::NumberOptions numberOptions = QLocale::DefaultNumberOptions;
|
||||||
|
|
||||||
// If not found, should default to system
|
// If not found, should default to system
|
||||||
if (data->m_language_id == QLocale::C && language != QLocale::C) {
|
if (data->m_language_id == QLocale::C) {
|
||||||
numberOptions = default_number_options;
|
if (defaultLocalePrivate.exists())
|
||||||
|
numberOptions = defaultLocalePrivate->data()->m_numberOptions;
|
||||||
data = defaultData();
|
data = defaultData();
|
||||||
}
|
}
|
||||||
return QLocalePrivate::create(data, offset, numberOptions);
|
return QLocalePrivate::create(data, offset, numberOptions);
|
||||||
@ -1048,6 +1048,8 @@ uint qHash(const QLocale &key, uint seed) noexcept
|
|||||||
|
|
||||||
Sets the \a options related to number conversions for this
|
Sets the \a options related to number conversions for this
|
||||||
QLocale instance.
|
QLocale instance.
|
||||||
|
|
||||||
|
\sa numberOptions()
|
||||||
*/
|
*/
|
||||||
void QLocale::setNumberOptions(NumberOptions options)
|
void QLocale::setNumberOptions(NumberOptions options)
|
||||||
{
|
{
|
||||||
@ -1060,7 +1062,10 @@ void QLocale::setNumberOptions(NumberOptions options)
|
|||||||
Returns the options related to number conversions for this
|
Returns the options related to number conversions for this
|
||||||
QLocale instance.
|
QLocale instance.
|
||||||
|
|
||||||
By default, no options are set for the standard locales.
|
By default, no options are set for the standard locales, except
|
||||||
|
for the "C" locale, which has OmitGroupSeparator set by default.
|
||||||
|
|
||||||
|
\sa setNumberOptions(), toString(), groupSeparator()
|
||||||
*/
|
*/
|
||||||
QLocale::NumberOptions QLocale::numberOptions() const
|
QLocale::NumberOptions QLocale::numberOptions() const
|
||||||
{
|
{
|
||||||
@ -1170,12 +1175,9 @@ QString QLocale::createSeparatedList(const QStringList &list) const
|
|||||||
void QLocale::setDefault(const QLocale &locale)
|
void QLocale::setDefault(const QLocale &locale)
|
||||||
{
|
{
|
||||||
default_data = locale.d->m_data;
|
default_data = locale.d->m_data;
|
||||||
default_number_options = locale.numberOptions();
|
|
||||||
|
|
||||||
if (defaultLocalePrivate.exists()) {
|
if (defaultLocalePrivate.exists()) // update the cached private
|
||||||
// update the cached private
|
|
||||||
*defaultLocalePrivate = locale.d;
|
*defaultLocalePrivate = locale.d;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -1962,7 +1964,7 @@ double QLocale::toDouble(QStringView s, bool *ok) const
|
|||||||
/*!
|
/*!
|
||||||
Returns a localized string representation of \a i.
|
Returns a localized string representation of \a i.
|
||||||
|
|
||||||
\sa toLongLong()
|
\sa toLongLong(), numberOptions(), zeroDigit(), positiveSign()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QString QLocale::toString(qlonglong i) const
|
QString QLocale::toString(qlonglong i) const
|
||||||
@ -1978,7 +1980,7 @@ QString QLocale::toString(qlonglong i) const
|
|||||||
/*!
|
/*!
|
||||||
\overload
|
\overload
|
||||||
|
|
||||||
\sa toULongLong()
|
\sa toULongLong(), numberOptions(), zeroDigit(), positiveSign()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QString QLocale::toString(qulonglong i) const
|
QString QLocale::toString(qulonglong i) const
|
||||||
@ -2525,6 +2527,12 @@ QDateTime QLocale::toDateTime(const QString &string, const QString &format, QCal
|
|||||||
\since 4.1
|
\since 4.1
|
||||||
|
|
||||||
Returns the decimal point character of this locale.
|
Returns the decimal point character of this locale.
|
||||||
|
|
||||||
|
\note This function shall change to return a QString instead of QChar in
|
||||||
|
Qt6. Callers are encouraged to exploit the QString(QChar) constructor to
|
||||||
|
convert early in preparation for this.
|
||||||
|
|
||||||
|
\sa groupSeparator(), toString()
|
||||||
*/
|
*/
|
||||||
QChar QLocale::decimalPoint() const
|
QChar QLocale::decimalPoint() const
|
||||||
{
|
{
|
||||||
@ -2535,6 +2543,12 @@ QChar QLocale::decimalPoint() const
|
|||||||
\since 4.1
|
\since 4.1
|
||||||
|
|
||||||
Returns the group separator character of this locale.
|
Returns the group separator character of this locale.
|
||||||
|
|
||||||
|
\note This function shall change to return a QString instead of QChar in
|
||||||
|
Qt6. Callers are encouraged to exploit the QString(QChar) constructor to
|
||||||
|
convert early in preparation for this.
|
||||||
|
|
||||||
|
\sa decimalPoint(), toString()
|
||||||
*/
|
*/
|
||||||
QChar QLocale::groupSeparator() const
|
QChar QLocale::groupSeparator() const
|
||||||
{
|
{
|
||||||
@ -2545,6 +2559,12 @@ QChar QLocale::groupSeparator() const
|
|||||||
\since 4.1
|
\since 4.1
|
||||||
|
|
||||||
Returns the percent character of this locale.
|
Returns the percent character of this locale.
|
||||||
|
|
||||||
|
\note This function shall change to return a QString instead of QChar in
|
||||||
|
Qt6. Callers are encouraged to exploit the QString(QChar) constructor to
|
||||||
|
convert early in preparation for this.
|
||||||
|
|
||||||
|
\sa toString()
|
||||||
*/
|
*/
|
||||||
QChar QLocale::percent() const
|
QChar QLocale::percent() const
|
||||||
{
|
{
|
||||||
@ -2555,6 +2575,12 @@ QChar QLocale::percent() const
|
|||||||
\since 4.1
|
\since 4.1
|
||||||
|
|
||||||
Returns the zero digit character of this locale.
|
Returns the zero digit character of this locale.
|
||||||
|
|
||||||
|
\note This function shall change to return a QString instead of QChar in
|
||||||
|
Qt6. Callers are encouraged to exploit the QString(QChar) constructor to
|
||||||
|
convert early in preparation for this.
|
||||||
|
|
||||||
|
\sa toString()
|
||||||
*/
|
*/
|
||||||
QChar QLocale::zeroDigit() const
|
QChar QLocale::zeroDigit() const
|
||||||
{
|
{
|
||||||
@ -2565,6 +2591,12 @@ QChar QLocale::zeroDigit() const
|
|||||||
\since 4.1
|
\since 4.1
|
||||||
|
|
||||||
Returns the negative sign character of this locale.
|
Returns the negative sign character of this locale.
|
||||||
|
|
||||||
|
\note This function shall change to return a QString instead of QChar in
|
||||||
|
Qt6. Callers are encouraged to exploit the QString(QChar) constructor to
|
||||||
|
convert early in preparation for this.
|
||||||
|
|
||||||
|
\sa positiveSign(), toString()
|
||||||
*/
|
*/
|
||||||
QChar QLocale::negativeSign() const
|
QChar QLocale::negativeSign() const
|
||||||
{
|
{
|
||||||
@ -2575,6 +2607,12 @@ QChar QLocale::negativeSign() const
|
|||||||
\since 4.5
|
\since 4.5
|
||||||
|
|
||||||
Returns the positive sign character of this locale.
|
Returns the positive sign character of this locale.
|
||||||
|
|
||||||
|
\note This function shall change to return a QString instead of QChar in
|
||||||
|
Qt6. Callers are encouraged to exploit the QString(QChar) constructor to
|
||||||
|
convert early in preparation for this.
|
||||||
|
|
||||||
|
\sa negativeSign(), toString()
|
||||||
*/
|
*/
|
||||||
QChar QLocale::positiveSign() const
|
QChar QLocale::positiveSign() const
|
||||||
{
|
{
|
||||||
@ -2584,7 +2622,14 @@ QChar QLocale::positiveSign() const
|
|||||||
/*!
|
/*!
|
||||||
\since 4.1
|
\since 4.1
|
||||||
|
|
||||||
Returns the exponential character of this locale.
|
Returns the exponential character of this locale, used to separate exponent
|
||||||
|
from mantissa in some floating-point numeric representations.
|
||||||
|
|
||||||
|
\note This function shall change to return a QString instead of QChar in
|
||||||
|
Qt6. Callers are encouraged to exploit the QString(QChar) constructor to
|
||||||
|
convert early in preparation for this.
|
||||||
|
|
||||||
|
\sa toString(double, char, int)
|
||||||
*/
|
*/
|
||||||
QChar QLocale::exponential() const
|
QChar QLocale::exponential() const
|
||||||
{
|
{
|
||||||
@ -2609,7 +2654,7 @@ static char qToLower(char c)
|
|||||||
|
|
||||||
\a f and \a prec have the same meaning as in QString::number(double, char, int).
|
\a f and \a prec have the same meaning as in QString::number(double, char, int).
|
||||||
|
|
||||||
\sa toDouble()
|
\sa toDouble(), numberOptions(), exponential(), decimalPoint(), zeroDigit(), positiveSign(), percent()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QString QLocale::toString(double i, char f, int prec) const
|
QString QLocale::toString(double i, char f, int prec) const
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2019 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the QtCore module of the Qt Toolkit.
|
** This file is part of the QtCore module of the Qt Toolkit.
|
||||||
@ -1044,8 +1044,8 @@ public:
|
|||||||
QDateTime toDateTime(const QString &string, const QString &format, QCalendar cal) const;
|
QDateTime toDateTime(const QString &string, const QString &format, QCalendar cal) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ### Qt 5: We need to return QString from these function since
|
// ### Qt 6: We need to return QString from these function since
|
||||||
// unicode data contains several characters for these fields.
|
// UTF-16 may need surrogate pairs to represent these fields.
|
||||||
QChar decimalPoint() const;
|
QChar decimalPoint() const;
|
||||||
QChar groupSeparator() const;
|
QChar groupSeparator() const;
|
||||||
QChar percent() const;
|
QChar percent() const;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the QtCore module of the Qt Toolkit.
|
** This file is part of the QtCore module of the Qt Toolkit.
|
||||||
@ -67,16 +67,16 @@ static QByteArray envVarLocale()
|
|||||||
return lang;
|
return lang;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QByteArray getMacLocaleName()
|
static QString getMacLocaleName()
|
||||||
{
|
{
|
||||||
QByteArray result = envVarLocale();
|
QString result = QString::fromLocal8Bit(envVarLocale());
|
||||||
|
|
||||||
QString lang, script, cntry;
|
QString lang, script, cntry;
|
||||||
if (result.isEmpty()
|
if (result.isEmpty()
|
||||||
|| (result != "C" && !qt_splitLocaleName(QString::fromLocal8Bit(result), lang, script, cntry))) {
|
|| (result != QLatin1String("C") && !qt_splitLocaleName(result, lang, script, cntry))) {
|
||||||
QCFType<CFLocaleRef> l = CFLocaleCopyCurrent();
|
QCFType<CFLocaleRef> l = CFLocaleCopyCurrent();
|
||||||
CFStringRef locale = CFLocaleGetIdentifier(l);
|
CFStringRef locale = CFLocaleGetIdentifier(l);
|
||||||
result = QString::fromCFString(locale).toUtf8();
|
result = QString::fromCFString(locale);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -402,10 +402,10 @@ static QVariant macQuoteString(QSystemLocale::QueryType type, const QStringRef &
|
|||||||
|
|
||||||
QLocale QSystemLocale::fallbackUiLocale() const
|
QLocale QSystemLocale::fallbackUiLocale() const
|
||||||
{
|
{
|
||||||
return QLocale(QString::fromUtf8(getMacLocaleName().constData()));
|
return QLocale(getMacLocaleName());
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
|
QVariant QSystemLocale::query(QueryType type, QVariant in) const
|
||||||
{
|
{
|
||||||
QMacAutoReleasePool pool;
|
QMacAutoReleasePool pool;
|
||||||
switch(type) {
|
switch(type) {
|
||||||
|
@ -929,7 +929,7 @@ static int ucstrncmp(const QChar *a, const QChar *b, size_t l)
|
|||||||
};
|
};
|
||||||
|
|
||||||
// we're going to read a[0..15] and b[0..15] (32 bytes)
|
// we're going to read a[0..15] and b[0..15] (32 bytes)
|
||||||
for ( ; a + offset + 16 <= end; offset += 16) {
|
for ( ; end - a >= offset + 16; offset += 16) {
|
||||||
#ifdef __AVX2__
|
#ifdef __AVX2__
|
||||||
__m256i a_data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(a + offset));
|
__m256i a_data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(a + offset));
|
||||||
__m256i b_data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(b + offset));
|
__m256i b_data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(b + offset));
|
||||||
@ -953,7 +953,7 @@ static int ucstrncmp(const QChar *a, const QChar *b, size_t l)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// we're going to read a[0..7] and b[0..7] (16 bytes)
|
// we're going to read a[0..7] and b[0..7] (16 bytes)
|
||||||
if (a + offset + 8 <= end) {
|
if (end - a >= offset + 8) {
|
||||||
__m128i a_data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(a + offset));
|
__m128i a_data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(a + offset));
|
||||||
__m128i b_data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(b + offset));
|
__m128i b_data = _mm_loadu_si128(reinterpret_cast<const __m128i *>(b + offset));
|
||||||
if (isDifferent(a_data, b_data))
|
if (isDifferent(a_data, b_data))
|
||||||
@ -963,7 +963,7 @@ static int ucstrncmp(const QChar *a, const QChar *b, size_t l)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// we're going to read a[0..3] and b[0..3] (8 bytes)
|
// we're going to read a[0..3] and b[0..3] (8 bytes)
|
||||||
if (a + offset + 4 <= end) {
|
if (end - a >= offset + 4) {
|
||||||
__m128i a_data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(a + offset));
|
__m128i a_data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(a + offset));
|
||||||
__m128i b_data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(b + offset));
|
__m128i b_data = _mm_loadl_epi64(reinterpret_cast<const __m128i *>(b + offset));
|
||||||
if (isDifferent(a_data, b_data))
|
if (isDifferent(a_data, b_data))
|
||||||
@ -984,7 +984,7 @@ static int ucstrncmp(const QChar *a, const QChar *b, size_t l)
|
|||||||
if (l >= 8) {
|
if (l >= 8) {
|
||||||
const QChar *end = a + l;
|
const QChar *end = a + l;
|
||||||
const uint16x8_t mask = { 1, 1 << 1, 1 << 2, 1 << 3, 1 << 4, 1 << 5, 1 << 6, 1 << 7 };
|
const uint16x8_t mask = { 1, 1 << 1, 1 << 2, 1 << 3, 1 << 4, 1 << 5, 1 << 6, 1 << 7 };
|
||||||
while (a + 7 < end) {
|
while (end - a > 7) {
|
||||||
uint16x8_t da = vld1q_u16(reinterpret_cast<const uint16_t *>(a));
|
uint16x8_t da = vld1q_u16(reinterpret_cast<const uint16_t *>(a));
|
||||||
uint16x8_t db = vld1q_u16(reinterpret_cast<const uint16_t *>(b));
|
uint16x8_t db = vld1q_u16(reinterpret_cast<const uint16_t *>(b));
|
||||||
|
|
||||||
|
@ -3289,12 +3289,8 @@ QPalette QGuiApplication::palette()
|
|||||||
*/
|
*/
|
||||||
void QGuiApplication::setPalette(const QPalette &pal)
|
void QGuiApplication::setPalette(const QPalette &pal)
|
||||||
{
|
{
|
||||||
if (QGuiApplicationPrivate::app_pal && pal.isCopyOf(*QGuiApplicationPrivate::app_pal))
|
if (!QGuiApplicationPrivate::setPalette(pal))
|
||||||
return;
|
return;
|
||||||
if (!QGuiApplicationPrivate::app_pal)
|
|
||||||
QGuiApplicationPrivate::app_pal = new QPalette(pal);
|
|
||||||
else
|
|
||||||
*QGuiApplicationPrivate::app_pal = pal;
|
|
||||||
|
|
||||||
QCoreApplication::setAttribute(Qt::AA_SetPalette);
|
QCoreApplication::setAttribute(Qt::AA_SetPalette);
|
||||||
|
|
||||||
@ -3302,6 +3298,19 @@ void QGuiApplication::setPalette(const QPalette &pal)
|
|||||||
qGuiApp->d_func()->sendApplicationPaletteChange();
|
qGuiApp->d_func()->sendApplicationPaletteChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QGuiApplicationPrivate::setPalette(const QPalette &palette)
|
||||||
|
{
|
||||||
|
if (app_pal && palette.isCopyOf(*app_pal))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!app_pal)
|
||||||
|
app_pal = new QPalette(palette);
|
||||||
|
else
|
||||||
|
*app_pal = palette;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void QGuiApplicationPrivate::applyWindowGeometrySpecificationTo(QWindow *window)
|
void QGuiApplicationPrivate::applyWindowGeometrySpecificationTo(QWindow *window)
|
||||||
{
|
{
|
||||||
windowGeometrySpecification.applyTo(window);
|
windowGeometrySpecification.applyTo(window);
|
||||||
|
@ -323,6 +323,8 @@ public:
|
|||||||
|
|
||||||
static void resetCachedDevicePixelRatio();
|
static void resetCachedDevicePixelRatio();
|
||||||
|
|
||||||
|
static bool setPalette(const QPalette &palette);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void notifyThemeChanged();
|
virtual void notifyThemeChanged();
|
||||||
virtual void sendApplicationPaletteChange(bool toAllWidgets = false, const char *className = nullptr);
|
virtual void sendApplicationPaletteChange(bool toAllWidgets = false, const char *className = nullptr);
|
||||||
|
@ -69,7 +69,7 @@ public:
|
|||||||
int deviceCount(QInputDeviceManager::DeviceType type) const;
|
int deviceCount(QInputDeviceManager::DeviceType type) const;
|
||||||
void setDeviceCount(QInputDeviceManager::DeviceType type, int count);
|
void setDeviceCount(QInputDeviceManager::DeviceType type, int count);
|
||||||
|
|
||||||
std::array<int, QInputDeviceManager::NumDeviceTypes> m_deviceCount;
|
std::array<int, QInputDeviceManager::NumDeviceTypes> m_deviceCount = {};
|
||||||
|
|
||||||
Qt::KeyboardModifiers keyboardModifiers;
|
Qt::KeyboardModifiers keyboardModifiers;
|
||||||
};
|
};
|
||||||
|
@ -1330,6 +1330,7 @@ void QOpenGL2PaintEngineExPrivate::drawVertexArrays(const float *data, int *stop
|
|||||||
QOpenGL2PaintEngineEx::QOpenGL2PaintEngineEx()
|
QOpenGL2PaintEngineEx::QOpenGL2PaintEngineEx()
|
||||||
: QPaintEngineEx(*(new QOpenGL2PaintEngineExPrivate(this)))
|
: QPaintEngineEx(*(new QOpenGL2PaintEngineExPrivate(this)))
|
||||||
{
|
{
|
||||||
|
gccaps &= ~QPaintEngine::RasterOpModes;
|
||||||
}
|
}
|
||||||
|
|
||||||
QOpenGL2PaintEngineEx::~QOpenGL2PaintEngineEx()
|
QOpenGL2PaintEngineEx::~QOpenGL2PaintEngineEx()
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qlibinputtouch_p.h"
|
#include "qlibinputtouch_p.h"
|
||||||
|
#include "qtouchoutputmapping_p.h"
|
||||||
#include <libinput.h>
|
#include <libinput.h>
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
#include <QtGui/QScreen>
|
#include <QtGui/QScreen>
|
||||||
@ -45,6 +46,8 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
Q_DECLARE_LOGGING_CATEGORY(qLcLibInput)
|
||||||
|
|
||||||
QWindowSystemInterface::TouchPoint *QLibInputTouch::DeviceState::point(int32_t slot)
|
QWindowSystemInterface::TouchPoint *QLibInputTouch::DeviceState::point(int32_t slot)
|
||||||
{
|
{
|
||||||
const int id = qMax(0, slot);
|
const int id = qMax(0, slot);
|
||||||
@ -62,12 +65,23 @@ QLibInputTouch::DeviceState *QLibInputTouch::deviceState(libinput_event_touch *e
|
|||||||
return &m_devState[dev];
|
return &m_devState[dev];
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QPointF getPos(libinput_event_touch *e)
|
QPointF QLibInputTouch::getPos(libinput_event_touch *e)
|
||||||
{
|
{
|
||||||
// TODO Map to correct screen using QTouchOutputMapping.
|
DeviceState *state = deviceState(e);
|
||||||
// Perhaps investigate libinput_device_get_output_name as well.
|
|
||||||
// For now just use the primary screen.
|
|
||||||
QScreen *screen = QGuiApplication::primaryScreen();
|
QScreen *screen = QGuiApplication::primaryScreen();
|
||||||
|
if (!state->m_screenName.isEmpty()) {
|
||||||
|
if (!m_screen) {
|
||||||
|
const QList<QScreen *> screens = QGuiApplication::screens();
|
||||||
|
for (QScreen *s : screens) {
|
||||||
|
if (s->name() == state->m_screenName) {
|
||||||
|
m_screen = s;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (m_screen)
|
||||||
|
screen = m_screen;
|
||||||
|
}
|
||||||
const QRect geom = QHighDpi::toNativePixels(screen->geometry(), screen);
|
const QRect geom = QHighDpi::toNativePixels(screen->geometry(), screen);
|
||||||
const double x = libinput_event_touch_get_x_transformed(e, geom.width());
|
const double x = libinput_event_touch_get_x_transformed(e, geom.width());
|
||||||
const double y = libinput_event_touch_get_y_transformed(e, geom.height());
|
const double y = libinput_event_touch_get_y_transformed(e, geom.height());
|
||||||
@ -76,9 +90,25 @@ static inline QPointF getPos(libinput_event_touch *e)
|
|||||||
|
|
||||||
void QLibInputTouch::registerDevice(libinput_device *dev)
|
void QLibInputTouch::registerDevice(libinput_device *dev)
|
||||||
{
|
{
|
||||||
|
struct udev_device *udev_device;
|
||||||
|
udev_device = libinput_device_get_udev_device(dev);
|
||||||
|
QString devNode = QString::fromUtf8(udev_device_get_devnode(udev_device));
|
||||||
|
QString devName = QString::fromUtf8(libinput_device_get_name(dev));
|
||||||
|
|
||||||
|
qCDebug(qLcLibInput, "libinput: registerDevice %s - %s",
|
||||||
|
qPrintable(devNode), qPrintable(devName));
|
||||||
|
|
||||||
|
QTouchOutputMapping mapping;
|
||||||
|
if (mapping.load()) {
|
||||||
|
m_devState[dev].m_screenName = mapping.screenNameForDeviceNode(devNode);
|
||||||
|
if (!m_devState[dev].m_screenName.isEmpty())
|
||||||
|
qCDebug(qLcLibInput, "libinput: Mapping device %s to screen %s",
|
||||||
|
qPrintable(devNode), qPrintable(m_devState[dev].m_screenName));
|
||||||
|
}
|
||||||
|
|
||||||
QTouchDevice *&td = m_devState[dev].m_touchDevice;
|
QTouchDevice *&td = m_devState[dev].m_touchDevice;
|
||||||
td = new QTouchDevice;
|
td = new QTouchDevice;
|
||||||
td->setName(QString::fromUtf8(libinput_device_get_name(dev)));
|
td->setName(devName);
|
||||||
td->setType(QTouchDevice::TouchScreen);
|
td->setType(QTouchDevice::TouchScreen);
|
||||||
td->setCapabilities(QTouchDevice::Position | QTouchDevice::Area);
|
td->setCapabilities(QTouchDevice::Position | QTouchDevice::Area);
|
||||||
QWindowSystemInterface::registerTouchDevice(td);
|
QWindowSystemInterface::registerTouchDevice(td);
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
#include <QtCore/QHash>
|
#include <QtCore/QHash>
|
||||||
#include <QtCore/QList>
|
#include <QtCore/QList>
|
||||||
|
#include <QtCore/QPointer>
|
||||||
#include <qpa/qwindowsysteminterface.h>
|
#include <qpa/qwindowsysteminterface.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -60,6 +61,7 @@ struct libinput_device;
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class QScreen;
|
||||||
class QLibInputTouch
|
class QLibInputTouch
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -73,15 +75,18 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
struct DeviceState {
|
struct DeviceState {
|
||||||
DeviceState() : m_touchDevice(nullptr) { }
|
DeviceState() : m_touchDevice(nullptr), m_screenName() { }
|
||||||
QWindowSystemInterface::TouchPoint *point(int32_t slot);
|
QWindowSystemInterface::TouchPoint *point(int32_t slot);
|
||||||
QList<QWindowSystemInterface::TouchPoint> m_points;
|
QList<QWindowSystemInterface::TouchPoint> m_points;
|
||||||
QTouchDevice *m_touchDevice;
|
QTouchDevice *m_touchDevice;
|
||||||
|
QString m_screenName;
|
||||||
};
|
};
|
||||||
|
|
||||||
DeviceState *deviceState(libinput_event_touch *e);
|
DeviceState *deviceState(libinput_event_touch *e);
|
||||||
|
QPointF getPos(libinput_event_touch *e);
|
||||||
|
|
||||||
QHash<libinput_device *, DeviceState> m_devState;
|
QHash<libinput_device *, DeviceState> m_devState;
|
||||||
|
mutable QPointer<QScreen> m_screen;
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -745,7 +745,11 @@
|
|||||||
- (UITextPosition *)positionFromPosition:(UITextPosition *)position offset:(NSInteger)offset
|
- (UITextPosition *)positionFromPosition:(UITextPosition *)position offset:(NSInteger)offset
|
||||||
{
|
{
|
||||||
int p = static_cast<QUITextPosition *>(position).index;
|
int p = static_cast<QUITextPosition *>(position).index;
|
||||||
return [QUITextPosition positionWithIndex:p + offset];
|
const int posWithIndex = p + offset;
|
||||||
|
const int textLength = [self currentImeState:Qt::ImSurroundingText].toString().length();
|
||||||
|
if (posWithIndex < 0 || posWithIndex > textLength)
|
||||||
|
return nil;
|
||||||
|
return [QUITextPosition positionWithIndex:posWithIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (UITextPosition *)positionFromPosition:(UITextPosition *)position inDirection:(UITextLayoutDirection)direction offset:(NSInteger)offset
|
- (UITextPosition *)positionFromPosition:(UITextPosition *)position inDirection:(UITextLayoutDirection)direction offset:(NSInteger)offset
|
||||||
|
@ -270,7 +270,7 @@
|
|||||||
When side-effects are unavoidable, ensure that the prior state is restored
|
When side-effects are unavoidable, ensure that the prior state is restored
|
||||||
at the end of the test function, even if the test fails. This commonly
|
at the end of the test function, even if the test fails. This commonly
|
||||||
requires use of an RAII (resource acquisition is initialization) class
|
requires use of an RAII (resource acquisition is initialization) class
|
||||||
that restores state when the function returns, or a \l cleanup() method.
|
that restores state when the function returns, or a \c cleanup() method.
|
||||||
Do not simply put the restoration code at the end of the test. If part of
|
Do not simply put the restoration code at the end of the test. If part of
|
||||||
the test fails, such code will be skipped and the prior state will not be
|
the test fails, such code will be skipped and the prior state will not be
|
||||||
restored.
|
restored.
|
||||||
|
@ -416,6 +416,7 @@ Options parseOptions()
|
|||||||
} else if (argument.compare(QLatin1String("--aab"), Qt::CaseInsensitive) == 0) {
|
} else if (argument.compare(QLatin1String("--aab"), Qt::CaseInsensitive) == 0) {
|
||||||
options.buildAAB = true;
|
options.buildAAB = true;
|
||||||
options.build = true;
|
options.build = true;
|
||||||
|
options.jarSigner = true;
|
||||||
} else if (options.buildAAB && argument.compare(QLatin1String("--no-build"), Qt::CaseInsensitive) == 0) {
|
} else if (options.buildAAB && argument.compare(QLatin1String("--no-build"), Qt::CaseInsensitive) == 0) {
|
||||||
options.build = false;
|
options.build = false;
|
||||||
} else if (argument.compare(QLatin1String("--install"), Qt::CaseInsensitive) == 0) {
|
} else if (argument.compare(QLatin1String("--install"), Qt::CaseInsensitive) == 0) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the tools applications of the Qt Toolkit.
|
** This file is part of the tools applications of the Qt Toolkit.
|
||||||
@ -61,7 +61,7 @@ static const char docTypeHeader[] =
|
|||||||
|
|
||||||
#define PROGRAMNAME "qdbuscpp2xml"
|
#define PROGRAMNAME "qdbuscpp2xml"
|
||||||
#define PROGRAMVERSION "0.2"
|
#define PROGRAMVERSION "0.2"
|
||||||
#define PROGRAMCOPYRIGHT "Copyright (C) 2019 The Qt Company Ltd."
|
#define PROGRAMCOPYRIGHT "Copyright (C) 2020 The Qt Company Ltd."
|
||||||
|
|
||||||
static QString outputFile;
|
static QString outputFile;
|
||||||
static int flags;
|
static int flags;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the tools applications of the Qt Toolkit.
|
** This file is part of the tools applications of the Qt Toolkit.
|
||||||
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
#define PROGRAMNAME "qdbusxml2cpp"
|
#define PROGRAMNAME "qdbusxml2cpp"
|
||||||
#define PROGRAMVERSION "0.8"
|
#define PROGRAMVERSION "0.8"
|
||||||
#define PROGRAMCOPYRIGHT "Copyright (C) 2019 The Qt Company Ltd."
|
#define PROGRAMCOPYRIGHT "Copyright (C) 2020 The Qt Company Ltd."
|
||||||
|
|
||||||
#define ANNOTATION_NO_WAIT "org.freedesktop.DBus.Method.NoReply"
|
#define ANNOTATION_NO_WAIT "org.freedesktop.DBus.Method.NoReply"
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2018 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the QtWidgets module of the Qt Toolkit.
|
** This file is part of the QtWidgets module of the Qt Toolkit.
|
||||||
@ -1890,7 +1890,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title)
|
|||||||
"<p>Qt and the Qt logo are trademarks of The Qt Company Ltd.</p>"
|
"<p>Qt and the Qt logo are trademarks of The Qt Company Ltd.</p>"
|
||||||
"<p>Qt is The Qt Company Ltd product developed as an open source "
|
"<p>Qt is The Qt Company Ltd product developed as an open source "
|
||||||
"project. See <a href=\"http://%3/\">%3</a> for more information.</p>"
|
"project. See <a href=\"http://%3/\">%3</a> for more information.</p>"
|
||||||
).arg(QStringLiteral("2019"),
|
).arg(QStringLiteral("2020"),
|
||||||
QStringLiteral("qt.io/licensing"),
|
QStringLiteral("qt.io/licensing"),
|
||||||
QStringLiteral("qt.io"));
|
QStringLiteral("qt.io"));
|
||||||
QMessageBox *msgBox = new QMessageBox(parent);
|
QMessageBox *msgBox = new QMessageBox(parent);
|
||||||
|
@ -414,11 +414,9 @@ bool Q_WIDGETS_EXPORT qt_tab_all_widgets()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ######## move to QApplicationPrivate
|
// ######## move to QApplicationPrivate
|
||||||
// Default application palettes and fonts (per widget type)
|
// Default fonts (per widget type)
|
||||||
Q_GLOBAL_STATIC(PaletteHash, app_palettes)
|
|
||||||
Q_GLOBAL_STATIC(FontHash, app_fonts)
|
Q_GLOBAL_STATIC(FontHash, app_fonts)
|
||||||
// Exported accessors for use outside of this file
|
// Exported accessor for use outside of this file
|
||||||
PaletteHash *qt_app_palettes_hash() { return app_palettes(); }
|
|
||||||
FontHash *qt_app_fonts_hash() { return app_fonts(); }
|
FontHash *qt_app_fonts_hash() { return app_fonts(); }
|
||||||
|
|
||||||
QWidgetList *QApplicationPrivate::popupWidgets = nullptr; // has keyboard input focus
|
QWidgetList *QApplicationPrivate::popupWidgets = nullptr; // has keyboard input focus
|
||||||
@ -635,7 +633,7 @@ static void setPossiblePalette(const QPalette *palette, const char *className)
|
|||||||
{
|
{
|
||||||
if (palette == nullptr)
|
if (palette == nullptr)
|
||||||
return;
|
return;
|
||||||
QApplicationPrivate::setPalette_helper(*palette, className, false);
|
QApplicationPrivate::setPalette_helper(*palette, className);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QApplicationPrivate::initializeWidgetPaletteHash()
|
void QApplicationPrivate::initializeWidgetPaletteHash()
|
||||||
@ -643,7 +641,8 @@ void QApplicationPrivate::initializeWidgetPaletteHash()
|
|||||||
QPlatformTheme *platformTheme = QGuiApplicationPrivate::platformTheme();
|
QPlatformTheme *platformTheme = QGuiApplicationPrivate::platformTheme();
|
||||||
if (!platformTheme)
|
if (!platformTheme)
|
||||||
return;
|
return;
|
||||||
app_palettes()->clear();
|
|
||||||
|
widgetPalettes.clear();
|
||||||
|
|
||||||
setPossiblePalette(platformTheme->palette(QPlatformTheme::ToolButtonPalette), "QToolButton");
|
setPossiblePalette(platformTheme->palette(QPlatformTheme::ToolButtonPalette), "QToolButton");
|
||||||
setPossiblePalette(platformTheme->palette(QPlatformTheme::ButtonPalette), "QAbstractButton");
|
setPossiblePalette(platformTheme->palette(QPlatformTheme::ButtonPalette), "QAbstractButton");
|
||||||
@ -802,7 +801,7 @@ QApplication::~QApplication()
|
|||||||
delete QApplicationPrivate::app_pal;
|
delete QApplicationPrivate::app_pal;
|
||||||
QApplicationPrivate::app_pal = nullptr;
|
QApplicationPrivate::app_pal = nullptr;
|
||||||
clearSystemPalette();
|
clearSystemPalette();
|
||||||
app_palettes()->clear();
|
QApplicationPrivate::widgetPalettes.clear();
|
||||||
|
|
||||||
delete QApplicationPrivate::sys_font;
|
delete QApplicationPrivate::sys_font;
|
||||||
QApplicationPrivate::sys_font = nullptr;
|
QApplicationPrivate::sys_font = nullptr;
|
||||||
@ -1315,6 +1314,8 @@ void QApplication::setGlobalStrut(const QSize& strut)
|
|||||||
QApplicationPrivate::app_strut = strut;
|
QApplicationPrivate::app_strut = strut;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Widget specific palettes
|
||||||
|
QApplicationPrivate::PaletteHash QApplicationPrivate::widgetPalettes;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QPalette QApplication::palette(const QWidget* widget)
|
\fn QPalette QApplication::palette(const QWidget* widget)
|
||||||
@ -1329,15 +1330,13 @@ void QApplication::setGlobalStrut(const QSize& strut)
|
|||||||
*/
|
*/
|
||||||
QPalette QApplication::palette(const QWidget* w)
|
QPalette QApplication::palette(const QWidget* w)
|
||||||
{
|
{
|
||||||
typedef PaletteHash::const_iterator PaletteHashConstIt;
|
auto &widgetPalettes = QApplicationPrivate::widgetPalettes;
|
||||||
|
if (w && !widgetPalettes.isEmpty()) {
|
||||||
PaletteHash *hash = app_palettes();
|
auto it = widgetPalettes.constFind(w->metaObject()->className());
|
||||||
if (w && hash && hash->size()) {
|
const auto cend = widgetPalettes.constEnd();
|
||||||
PaletteHashConstIt it = hash->constFind(w->metaObject()->className());
|
|
||||||
const PaletteHashConstIt cend = hash->constEnd();
|
|
||||||
if (it != cend)
|
if (it != cend)
|
||||||
return *it;
|
return *it;
|
||||||
for (it = hash->constBegin(); it != cend; ++it) {
|
for (it = widgetPalettes.constBegin(); it != cend; ++it) {
|
||||||
if (w->inherits(it.key()))
|
if (w->inherits(it.key()))
|
||||||
return it.value();
|
return it.value();
|
||||||
}
|
}
|
||||||
@ -1354,17 +1353,17 @@ QPalette QApplication::palette(const QWidget* w)
|
|||||||
*/
|
*/
|
||||||
QPalette QApplication::palette(const char *className)
|
QPalette QApplication::palette(const char *className)
|
||||||
{
|
{
|
||||||
PaletteHash *hash = app_palettes();
|
auto &widgetPalettes = QApplicationPrivate::widgetPalettes;
|
||||||
if (className && hash && hash->size()) {
|
if (className && !widgetPalettes.isEmpty()) {
|
||||||
QHash<QByteArray, QPalette>::ConstIterator it = hash->constFind(className);
|
auto it = widgetPalettes.constFind(className);
|
||||||
if (it != hash->constEnd())
|
if (it != widgetPalettes.constEnd())
|
||||||
return *it;
|
return *it;
|
||||||
}
|
}
|
||||||
|
|
||||||
return QGuiApplication::palette();
|
return QGuiApplication::palette();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash)
|
void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char* className)
|
||||||
{
|
{
|
||||||
QPalette pal = palette;
|
QPalette pal = palette;
|
||||||
|
|
||||||
@ -1372,25 +1371,19 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char*
|
|||||||
QApplicationPrivate::app_style->polish(pal); // NB: non-const reference
|
QApplicationPrivate::app_style->polish(pal); // NB: non-const reference
|
||||||
|
|
||||||
bool all = false;
|
bool all = false;
|
||||||
PaletteHash *hash = app_palettes();
|
|
||||||
if (!className) {
|
if (!className) {
|
||||||
if (QApplicationPrivate::app_pal && pal.isCopyOf(*QApplicationPrivate::app_pal))
|
if (!QGuiApplicationPrivate::setPalette(pal))
|
||||||
return;
|
return;
|
||||||
if (!QApplicationPrivate::app_pal)
|
|
||||||
QApplicationPrivate::app_pal = new QPalette(pal);
|
|
||||||
else
|
|
||||||
*QApplicationPrivate::app_pal = pal;
|
|
||||||
|
|
||||||
if (!QApplicationPrivate::sys_pal || !palette.isCopyOf(*QApplicationPrivate::sys_pal))
|
if (!QApplicationPrivate::sys_pal || !palette.isCopyOf(*QApplicationPrivate::sys_pal))
|
||||||
QCoreApplication::setAttribute(Qt::AA_SetPalette);
|
QCoreApplication::setAttribute(Qt::AA_SetPalette);
|
||||||
|
|
||||||
if (hash && hash->size()) {
|
if (!widgetPalettes.isEmpty()) {
|
||||||
all = true;
|
all = true;
|
||||||
if (clearWidgetPaletteHash)
|
widgetPalettes.clear();
|
||||||
hash->clear();
|
|
||||||
}
|
}
|
||||||
} else if (hash) {
|
} else {
|
||||||
hash->insert(className, pal);
|
widgetPalettes.insert(className, pal);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qApp)
|
if (qApp)
|
||||||
@ -1422,7 +1415,7 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char*
|
|||||||
|
|
||||||
void QApplication::setPalette(const QPalette &palette, const char* className)
|
void QApplication::setPalette(const QPalette &palette, const char* className)
|
||||||
{
|
{
|
||||||
QApplicationPrivate::setPalette_helper(palette, className, /*clearWidgetPaletteHash=*/ true);
|
QApplicationPrivate::setPalette_helper(palette, className);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,9 +94,6 @@ extern QClipboard *qt_clipboard;
|
|||||||
typedef QHash<QByteArray, QFont> FontHash;
|
typedef QHash<QByteArray, QFont> FontHash;
|
||||||
Q_WIDGETS_EXPORT FontHash *qt_app_fonts_hash();
|
Q_WIDGETS_EXPORT FontHash *qt_app_fonts_hash();
|
||||||
|
|
||||||
typedef QHash<QByteArray, QPalette> PaletteHash;
|
|
||||||
PaletteHash *qt_app_palettes_hash();
|
|
||||||
|
|
||||||
#define QApplicationPrivateBase QGuiApplicationPrivate
|
#define QApplicationPrivateBase QGuiApplicationPrivate
|
||||||
|
|
||||||
class Q_WIDGETS_EXPORT QApplicationPrivate : public QApplicationPrivateBase
|
class Q_WIDGETS_EXPORT QApplicationPrivate : public QApplicationPrivateBase
|
||||||
@ -188,11 +185,14 @@ public:
|
|||||||
static bool widgetCount; // Coupled with -widgetcount switch
|
static bool widgetCount; // Coupled with -widgetcount switch
|
||||||
|
|
||||||
static void setSystemPalette(const QPalette &pal);
|
static void setSystemPalette(const QPalette &pal);
|
||||||
static void setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash);
|
static void setPalette_helper(const QPalette &palette, const char* className);
|
||||||
static void initializeWidgetPaletteHash();
|
static void initializeWidgetPaletteHash();
|
||||||
static void initializeWidgetFontHash();
|
static void initializeWidgetFontHash();
|
||||||
static void setSystemFont(const QFont &font);
|
static void setSystemFont(const QFont &font);
|
||||||
|
|
||||||
|
using PaletteHash = QHash<QByteArray, QPalette>;
|
||||||
|
static PaletteHash widgetPalettes;
|
||||||
|
|
||||||
static QApplicationPrivate *instance() { return self; }
|
static QApplicationPrivate *instance() { return self; }
|
||||||
|
|
||||||
#ifdef QT_KEYPAD_NAVIGATION
|
#ifdef QT_KEYPAD_NAVIGATION
|
||||||
|
@ -216,7 +216,7 @@ QDateTimeEdit::~QDateTimeEdit()
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\property QDateTimeEdit::dateTime
|
\property QDateTimeEdit::dateTime
|
||||||
\brief the QDateTime that is set in the QDateTimeEdit
|
\brief The QDateTime that is set in the QDateTimeEdit.
|
||||||
|
|
||||||
When setting this property the timespec of the QDateTimeEdit remains the same
|
When setting this property the timespec of the QDateTimeEdit remains the same
|
||||||
and the timespec of the new QDateTime is ignored.
|
and the timespec of the new QDateTime is ignored.
|
||||||
@ -253,7 +253,7 @@ void QDateTimeEdit::setDateTime(const QDateTime &datetime)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\property QDateTimeEdit::date
|
\property QDateTimeEdit::date
|
||||||
\brief the QDate that is set in the widget
|
\brief The QDate that is set in the widget.
|
||||||
|
|
||||||
By default, this property contains a date that refers to January 1, 2000.
|
By default, this property contains a date that refers to January 1, 2000.
|
||||||
|
|
||||||
@ -290,7 +290,7 @@ void QDateTimeEdit::setDate(const QDate &date)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\property QDateTimeEdit::time
|
\property QDateTimeEdit::time
|
||||||
\brief the QTime that is set in the widget
|
\brief The QTime that is set in the widget.
|
||||||
|
|
||||||
By default, this property contains a time of 00:00:00 and 0 milliseconds.
|
By default, this property contains a time of 00:00:00 and 0 milliseconds.
|
||||||
|
|
||||||
@ -335,7 +335,8 @@ void QDateTimeEdit::setCalendar(QCalendar calendar)
|
|||||||
/*!
|
/*!
|
||||||
\since 4.4
|
\since 4.4
|
||||||
\property QDateTimeEdit::minimumDateTime
|
\property QDateTimeEdit::minimumDateTime
|
||||||
\brief the minimum datetime of the date time edit
|
|
||||||
|
\brief The minimum datetime of the date time edit.
|
||||||
|
|
||||||
Changing this property implicitly updates the \l minimumDate and \l
|
Changing this property implicitly updates the \l minimumDate and \l
|
||||||
minimumTime properties to the date and time parts of this property,
|
minimumTime properties to the date and time parts of this property,
|
||||||
@ -376,7 +377,7 @@ void QDateTimeEdit::setMinimumDateTime(const QDateTime &dt)
|
|||||||
\since 4.4
|
\since 4.4
|
||||||
\property QDateTimeEdit::maximumDateTime
|
\property QDateTimeEdit::maximumDateTime
|
||||||
|
|
||||||
\brief the maximum datetime of the date time edit
|
\brief The maximum datetime of the date time edit.
|
||||||
|
|
||||||
Changing this property implicitly updates the \l maximumDate and \l
|
Changing this property implicitly updates the \l maximumDate and \l
|
||||||
maximumTime properties to the date and time parts of this property,
|
maximumTime properties to the date and time parts of this property,
|
||||||
@ -444,7 +445,7 @@ void QDateTimeEdit::setDateTimeRange(const QDateTime &min, const QDateTime &max)
|
|||||||
/*!
|
/*!
|
||||||
\property QDateTimeEdit::minimumDate
|
\property QDateTimeEdit::minimumDate
|
||||||
|
|
||||||
\brief the minimum date of the date time edit
|
\brief The minimum date of the date time edit.
|
||||||
|
|
||||||
Changing this property updates the date of the \l minimumDateTime property
|
Changing this property updates the date of the \l minimumDateTime property
|
||||||
while preserving the \l minimumTime property. When setting this property,
|
while preserving the \l minimumTime property. When setting this property,
|
||||||
@ -484,7 +485,7 @@ void QDateTimeEdit::clearMinimumDate()
|
|||||||
/*!
|
/*!
|
||||||
\property QDateTimeEdit::maximumDate
|
\property QDateTimeEdit::maximumDate
|
||||||
|
|
||||||
\brief the maximum date of the date time edit
|
\brief The maximum date of the date time edit.
|
||||||
|
|
||||||
Changing this property updates the date of the \l maximumDateTime property
|
Changing this property updates the date of the \l maximumDateTime property
|
||||||
while preserving the \l maximumTime property. When setting this property, the
|
while preserving the \l maximumTime property. When setting this property, the
|
||||||
@ -523,7 +524,7 @@ void QDateTimeEdit::clearMaximumDate()
|
|||||||
/*!
|
/*!
|
||||||
\property QDateTimeEdit::minimumTime
|
\property QDateTimeEdit::minimumTime
|
||||||
|
|
||||||
\brief the minimum time of the date time edit
|
\brief The minimum time of the date time edit.
|
||||||
|
|
||||||
Changing this property updates the time of the \l minimumDateTime property
|
Changing this property updates the time of the \l minimumDateTime property
|
||||||
while preserving the \l minimumDate and \l maximumDate properties. If those
|
while preserving the \l minimumDate and \l maximumDate properties. If those
|
||||||
@ -562,7 +563,7 @@ void QDateTimeEdit::clearMinimumTime()
|
|||||||
/*!
|
/*!
|
||||||
\property QDateTimeEdit::maximumTime
|
\property QDateTimeEdit::maximumTime
|
||||||
|
|
||||||
\brief the maximum time of the date time edit
|
\brief The maximum time of the date time edit.
|
||||||
|
|
||||||
Changing this property updates the time of the \l maximumDateTime property
|
Changing this property updates the time of the \l maximumDateTime property
|
||||||
while preserving the \l minimumDate and \l maximumDate properties. If those
|
while preserving the \l minimumDate and \l maximumDate properties. If those
|
||||||
@ -665,7 +666,7 @@ void QDateTimeEdit::setTimeRange(const QTime &min, const QTime &max)
|
|||||||
/*!
|
/*!
|
||||||
\property QDateTimeEdit::displayedSections
|
\property QDateTimeEdit::displayedSections
|
||||||
|
|
||||||
\brief the currently displayed fields of the date time edit
|
\brief The currently displayed fields of the date time edit.
|
||||||
|
|
||||||
Returns a bit set of the displayed sections for this format.
|
Returns a bit set of the displayed sections for this format.
|
||||||
\a setDisplayFormat(), displayFormat()
|
\a setDisplayFormat(), displayFormat()
|
||||||
@ -680,7 +681,7 @@ QDateTimeEdit::Sections QDateTimeEdit::displayedSections() const
|
|||||||
/*!
|
/*!
|
||||||
\property QDateTimeEdit::currentSection
|
\property QDateTimeEdit::currentSection
|
||||||
|
|
||||||
\brief the current section of the spinbox
|
\brief The current section of the spinbox.
|
||||||
\a setCurrentSection()
|
\a setCurrentSection()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -739,7 +740,7 @@ QDateTimeEdit::Section QDateTimeEdit::sectionAt(int index) const
|
|||||||
|
|
||||||
\property QDateTimeEdit::sectionCount
|
\property QDateTimeEdit::sectionCount
|
||||||
|
|
||||||
\brief the number of sections displayed.
|
\brief The number of sections displayed.
|
||||||
If the format is 'yyyy/yy/yyyy', sectionCount returns 3
|
If the format is 'yyyy/yy/yyyy', sectionCount returns 3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -755,7 +756,7 @@ int QDateTimeEdit::sectionCount() const
|
|||||||
|
|
||||||
\property QDateTimeEdit::currentSectionIndex
|
\property QDateTimeEdit::currentSectionIndex
|
||||||
|
|
||||||
\brief the current section index of the spinbox
|
\brief The current section index of the spinbox.
|
||||||
|
|
||||||
If the format is 'yyyy/MM/dd', the displayText is '2001/05/21', and
|
If the format is 'yyyy/MM/dd', the displayText is '2001/05/21', and
|
||||||
the cursorPosition is 5, currentSectionIndex returns 1. If the
|
the cursorPosition is 5, currentSectionIndex returns 1. If the
|
||||||
@ -879,7 +880,7 @@ QString QDateTimeEdit::sectionText(Section section) const
|
|||||||
/*!
|
/*!
|
||||||
\property QDateTimeEdit::displayFormat
|
\property QDateTimeEdit::displayFormat
|
||||||
|
|
||||||
\brief the format used to display the time/date of the date time edit
|
\brief The format used to display the time/date of the date time edit.
|
||||||
|
|
||||||
This format is described in QDateTime::toString() and QDateTime::fromString()
|
This format is described in QDateTime::toString() and QDateTime::fromString()
|
||||||
|
|
||||||
@ -951,7 +952,7 @@ void QDateTimeEdit::setDisplayFormat(const QString &format)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\property QDateTimeEdit::calendarPopup
|
\property QDateTimeEdit::calendarPopup
|
||||||
\brief the current calendar pop-up show mode.
|
\brief The current calendar pop-up show mode.
|
||||||
\since 4.2
|
\since 4.2
|
||||||
|
|
||||||
The calendar pop-up will be shown upon clicking the arrow button.
|
The calendar pop-up will be shown upon clicking the arrow button.
|
||||||
@ -983,7 +984,7 @@ void QDateTimeEdit::setCalendarPopup(bool enable)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\property QDateTimeEdit::timeSpec
|
\property QDateTimeEdit::timeSpec
|
||||||
\brief the current timespec used by the date time edit.
|
\brief The current timespec used by the date time edit.
|
||||||
\since 4.4
|
\since 4.4
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -823,7 +823,7 @@ void QTextBrowser::setSource(const QUrl &url)
|
|||||||
/*!
|
/*!
|
||||||
Attempts to load the document at the given \a url with the specified \a type.
|
Attempts to load the document at the given \a url with the specified \a type.
|
||||||
|
|
||||||
If \a type is \l {QTextDocument::ResourceType::UnknownResource}{UnknownResource}
|
If \a type is \l {QTextDocument::UnknownResource}{UnknownResource}
|
||||||
(the default), the document type will be detected: that is, if the url ends
|
(the default), the document type will be detected: that is, if the url ends
|
||||||
with an extension of \c{.md}, \c{.mkd} or \c{.markdown}, the document will be
|
with an extension of \c{.md}, \c{.mkd} or \c{.markdown}, the document will be
|
||||||
loaded via \l QTextDocument::setMarkdown(); otherwise it will be loaded via
|
loaded via \l QTextDocument::setMarkdown(); otherwise it will be loaded via
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Copyright (C) 2014 Olivier Goffart <ogoffart@woboq.com>
|
** Copyright (C) 2014 Olivier Goffart <ogoffart@woboq.com>
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
@ -767,18 +767,18 @@ void tst_qmessagehandler::qMessagePattern_data()
|
|||||||
QTest::qWait(10000);
|
QTest::qWait(10000);
|
||||||
QTest::newRow("time") << "/%{time yyyy - MM - d}/%{message}"
|
QTest::newRow("time") << "/%{time yyyy - MM - d}/%{message}"
|
||||||
<< true << (QList<QByteArray>()
|
<< true << (QList<QByteArray>()
|
||||||
<< ('/' + QDateTime::currentDateTime().toString("yyyy - MM - d").toUtf8() + "/qDebug"));
|
<< ('/' + QDateTime::currentDateTime().toString("yyyy - MM - d").toLocal8Bit() + "/qDebug"));
|
||||||
|
|
||||||
QTest::newRow("time-time") << "/%{time yyyy - MM - d}/%{time dd-MM-yy}/%{message}"
|
QTest::newRow("time-time") << "/%{time yyyy - MM - d}/%{time dd-MM-yy}/%{message}"
|
||||||
<< true << (QList<QByteArray>()
|
<< true << (QList<QByteArray>()
|
||||||
<< ('/' + QDateTime::currentDateTime().toString("yyyy - MM - d").toUtf8()
|
<< ('/' + QDateTime::currentDateTime().toString("yyyy - MM - d").toLocal8Bit()
|
||||||
+ '/' + QDateTime::currentDateTime().toString("dd-MM-yy").toUtf8()
|
+ '/' + QDateTime::currentDateTime().toString("dd-MM-yy").toLocal8Bit()
|
||||||
+ "/qDebug"));
|
+ "/qDebug"));
|
||||||
|
|
||||||
QTest::newRow("skipped-time-shown-time")
|
QTest::newRow("skipped-time-shown-time")
|
||||||
<< "/%{if-warning}%{time yyyy - MM - d}%{endif}%{if-debug}%{time dd-MM-yy}%{endif}/%{message}"
|
<< "/%{if-warning}%{time yyyy - MM - d}%{endif}%{if-debug}%{time dd-MM-yy}%{endif}/%{message}"
|
||||||
<< true << (QList<QByteArray>()
|
<< true << (QList<QByteArray>()
|
||||||
<< ('/' + QDateTime::currentDateTime().toString("dd-MM-yy").toUtf8() + "/qDebug"));
|
<< ('/' + QDateTime::currentDateTime().toString("dd-MM-yy").toLocal8Bit() + "/qDebug"));
|
||||||
|
|
||||||
// %{time} should have a padding of 6 so if it takes less than 10 seconds to show
|
// %{time} should have a padding of 6 so if it takes less than 10 seconds to show
|
||||||
// the first message, there should be 5 spaces
|
// the first message, there should be 5 spaces
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the test suite of the Qt Toolkit.
|
** This file is part of the test suite of the Qt Toolkit.
|
||||||
@ -65,7 +65,7 @@ void tst_QNoDebug::noDebugOutput() const
|
|||||||
void tst_QNoDebug::streaming() const
|
void tst_QNoDebug::streaming() const
|
||||||
{
|
{
|
||||||
QDateTime dt(QDate(1,2,3),QTime(4,5,6));
|
QDateTime dt(QDate(1,2,3),QTime(4,5,6));
|
||||||
const QByteArray debugString = dt.toString(u"yyyy-MM-dd HH:mm:ss.zzz t").toLatin1();
|
const QByteArray debugString = dt.toString(u"yyyy-MM-dd HH:mm:ss.zzz t").toLocal8Bit();
|
||||||
const QByteArray message = "QDateTime(" + debugString + " Qt::LocalTime)";
|
const QByteArray message = "QDateTime(" + debugString + " Qt::LocalTime)";
|
||||||
QTest::ignoreMessage(QtWarningMsg, message.constData());
|
QTest::ignoreMessage(QtWarningMsg, message.constData());
|
||||||
qWarning() << dt;
|
qWarning() << dt;
|
||||||
|
@ -6719,16 +6719,16 @@ void tst_QObject::connectWarnings()
|
|||||||
ReceiverObject r1;
|
ReceiverObject r1;
|
||||||
r1.reset();
|
r1.reset();
|
||||||
|
|
||||||
QTest::ignoreMessage(QtWarningMsg, "QObject::connect(SenderObject, ReceiverObject): invalid null parameter");
|
QTest::ignoreMessage(QtWarningMsg, "QObject::connect(SenderObject, ReceiverObject): invalid nullptr parameter");
|
||||||
connect(static_cast<const SenderObject *>(nullptr), &SubSender::signal1, &r1, &ReceiverObject::slot1);
|
connect(static_cast<const SenderObject *>(nullptr), &SubSender::signal1, &r1, &ReceiverObject::slot1);
|
||||||
|
|
||||||
QTest::ignoreMessage(QtWarningMsg, "QObject::connect(SubSender, Unknown): invalid null parameter");
|
QTest::ignoreMessage(QtWarningMsg, "QObject::connect(SubSender, Unknown): invalid nullptr parameter");
|
||||||
connect(&sub, &SubSender::signal1, static_cast<ReceiverObject *>(nullptr), &ReceiverObject::slot1);
|
connect(&sub, &SubSender::signal1, static_cast<ReceiverObject *>(nullptr), &ReceiverObject::slot1);
|
||||||
|
|
||||||
QTest::ignoreMessage(QtWarningMsg, "QObject::connect(SenderObject, ReceiverObject): invalid null parameter");
|
QTest::ignoreMessage(QtWarningMsg, "QObject::connect(SenderObject, ReceiverObject): invalid nullptr parameter");
|
||||||
connect(static_cast<const SenderObject *>(nullptr), &SenderObject::signal1, &r1, &ReceiverObject::slot1);
|
connect(static_cast<const SenderObject *>(nullptr), &SenderObject::signal1, &r1, &ReceiverObject::slot1);
|
||||||
|
|
||||||
QTest::ignoreMessage(QtWarningMsg, "QObject::connect(SenderObject, Unknown): invalid null parameter");
|
QTest::ignoreMessage(QtWarningMsg, "QObject::connect(SenderObject, Unknown): invalid nullptr parameter");
|
||||||
connect(&obj, &SenderObject::signal1, static_cast<ReceiverObject *>(nullptr), &ReceiverObject::slot1);
|
connect(&obj, &SenderObject::signal1, static_cast<ReceiverObject *>(nullptr), &ReceiverObject::slot1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user