Another round of replacing 0 with nullptr
This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
b5fc1e4e26
commit
564b59d903
@ -85,7 +85,7 @@ class NicknameDialog: public QDialog, public Ui::NicknameDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
NicknameDialog(QWidget *parent = 0);
|
||||
NicknameDialog(QWidget *parent = nullptr);
|
||||
};
|
||||
|
||||
#endif // CHAT_H
|
||||
|
@ -71,7 +71,7 @@ Q_SIGNALS:
|
||||
void crashed();
|
||||
|
||||
protected:
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
|
||||
void timerEvent(QTimerEvent *event);
|
||||
|
||||
private:
|
||||
|
@ -59,7 +59,7 @@ class Controller : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Controller(QWidget *parent = 0);
|
||||
Controller(QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
void timerEvent(QTimerEvent *event);
|
||||
|
@ -298,7 +298,7 @@ class DigiFlip : public QMainWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DigiFlip(QWidget *parent = 0)
|
||||
DigiFlip(QWidget *parent = nullptr)
|
||||
: QMainWindow(parent)
|
||||
{
|
||||
m_hour = new Digits(this);
|
||||
|
@ -87,7 +87,7 @@ class ColorList : public QWidget, public Flickable
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ColorList(QWidget *parent = 0)
|
||||
ColorList(QWidget *parent = nullptr)
|
||||
: QWidget(parent) {
|
||||
m_offset = 0;
|
||||
m_height = QFontMetrics(font()).height() + 5;
|
||||
|
@ -110,7 +110,7 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
FlightInfo(QMainWindow *parent = 0): QMainWindow(parent) {
|
||||
FlightInfo(QMainWindow *parent = nullptr): QMainWindow(parent) {
|
||||
|
||||
QWidget *w = new QWidget(this);
|
||||
ui.setupUi(w);
|
||||
|
@ -61,7 +61,7 @@ class LightMaps: public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
LightMaps(QWidget *parent = 0);
|
||||
LightMaps(QWidget *parent = nullptr);
|
||||
void setCenter(qreal lat, qreal lng);
|
||||
|
||||
public slots:
|
||||
@ -94,4 +94,4 @@ private:
|
||||
bool invert;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -65,7 +65,7 @@ class SlippyMap: public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SlippyMap(QObject *parent = 0);
|
||||
SlippyMap(QObject *parent = nullptr);
|
||||
void invalidate();
|
||||
void render(QPainter *p, const QRect &rect);
|
||||
void pan(const QPoint &delta);
|
||||
|
@ -70,7 +70,7 @@ int world_map[WORLD_SIZE][WORLD_SIZE] = {
|
||||
class Raycasting: public QWidget
|
||||
{
|
||||
public:
|
||||
Raycasting(QWidget *parent = 0)
|
||||
Raycasting(QWidget *parent = nullptr)
|
||||
: QWidget(parent)
|
||||
, angle(0.5)
|
||||
, playerPos(1.5, 1.5)
|
||||
|
@ -58,7 +58,7 @@ class StyleWidget : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
StyleWidget(QWidget *parent = 0);
|
||||
StyleWidget(QWidget *parent = nullptr);
|
||||
|
||||
private:
|
||||
Ui_StyleWidget m_ui;
|
||||
|
@ -58,7 +58,7 @@ class RasterWindow : public QWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit RasterWindow(QWindow *parent = 0);
|
||||
explicit RasterWindow(QWindow *parent = nullptr);
|
||||
|
||||
virtual void render(QPainter *painter);
|
||||
|
||||
|
@ -58,7 +58,7 @@ class MyDialog : public QDialog, public Ui::MyDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MyDialog(QWidget *parent = 0);
|
||||
MyDialog(QWidget *parent = nullptr);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -54,7 +54,7 @@
|
||||
class Window : public QWindow
|
||||
{
|
||||
public:
|
||||
Window(QWindow *parent = 0);
|
||||
Window(QWindow *parent = nullptr);
|
||||
Window(QScreen *screen);
|
||||
|
||||
protected:
|
||||
|
@ -70,7 +70,7 @@ class Window : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Window(QWidget *parent = 0);
|
||||
Window(QWidget *parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void updateButtons(int row);
|
||||
|
@ -60,7 +60,7 @@ class MySortFilterProxyModel : public QSortFilterProxyModel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MySortFilterProxyModel(QObject *parent = 0);
|
||||
MySortFilterProxyModel(QObject *parent = nullptr);
|
||||
|
||||
QDate filterMinimumDate() const { return minDate; }
|
||||
void setFilterMinimumDate(QDate date);
|
||||
|
@ -60,7 +60,7 @@ class ImageModel : public QAbstractTableModel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ImageModel(QObject *parent = 0);
|
||||
ImageModel(QObject *parent = nullptr);
|
||||
|
||||
void setImage(const QImage &image);
|
||||
|
||||
|
@ -68,7 +68,7 @@ class Dialog : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Dialog(QWidget *parent = 0);
|
||||
Dialog(QWidget *parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void buttonsOrientationChanged(int index);
|
||||
|
@ -59,7 +59,7 @@ class CircleWidget : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CircleWidget(QWidget *parent = 0);
|
||||
CircleWidget(QWidget *parent = nullptr);
|
||||
|
||||
void setFloatBased(bool floatBased);
|
||||
void setAntialiased(bool antialiased);
|
||||
|
@ -65,7 +65,7 @@ class Highlighter : public QSyntaxHighlighter
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Highlighter(QTextDocument *parent = 0);
|
||||
Highlighter(QTextDocument *parent = nullptr);
|
||||
|
||||
protected:
|
||||
void highlightBlock(const QString &text) override;
|
||||
|
@ -65,7 +65,7 @@ class MainWindow : public QMainWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(QWidget *parent = 0);
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
|
||||
public slots:
|
||||
void about();
|
||||
|
@ -70,7 +70,7 @@ class TextEdit : public QMainWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TextEdit(QWidget *parent = 0);
|
||||
TextEdit(QWidget *parent = nullptr);
|
||||
|
||||
bool load(const QString &f);
|
||||
|
||||
|
@ -60,7 +60,7 @@ class XbelTree : public QTreeWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
XbelTree(QWidget *parent = 0);
|
||||
XbelTree(QWidget *parent = nullptr);
|
||||
|
||||
bool read(QIODevice *device);
|
||||
bool write(QIODevice *device) const;
|
||||
@ -75,9 +75,9 @@ private slots:
|
||||
|
||||
private:
|
||||
void parseFolderElement(const QDomElement &element,
|
||||
QTreeWidgetItem *parentItem = 0);
|
||||
QTreeWidgetItem *parentItem = nullptr);
|
||||
QTreeWidgetItem *createItem(const QDomElement &element,
|
||||
QTreeWidgetItem *parentItem = 0);
|
||||
QTreeWidgetItem *parentItem = nullptr);
|
||||
|
||||
QDomDocument domDocument;
|
||||
QIcon folderIcon;
|
||||
|
@ -70,7 +70,7 @@ class RSSListing : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RSSListing(QWidget *widget = 0);
|
||||
RSSListing(QWidget *widget = nullptr);
|
||||
|
||||
public slots:
|
||||
void fetch();
|
||||
|
@ -106,7 +106,7 @@ class MyClass : public QObject
|
||||
Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY priorityChanged)
|
||||
|
||||
public:
|
||||
MyClass(QObject *parent = 0);
|
||||
MyClass(QObject *parent = nullptr);
|
||||
~MyClass();
|
||||
|
||||
enum Priority { High, Low, VeryHigh, VeryLow };
|
||||
|
@ -58,7 +58,7 @@ class FilterObject : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FilterObject(QObject *parent = 0);
|
||||
FilterObject(QObject *parent = nullptr);
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
void setFilteredObject(QObject *object);
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
class MyItemModel : public QStandardItemModel
|
||||
{
|
||||
public:
|
||||
MyItemModel(QWidget *parent = 0);
|
||||
MyItemModel(QWidget *parent = nullptr);
|
||||
};
|
||||
|
||||
MyItemModel::MyItemModel(QWidget *parent)
|
||||
@ -65,7 +65,7 @@ MyItemModel::MyItemModel(QWidget *parent)
|
||||
class Widget : public QWidget
|
||||
{
|
||||
public:
|
||||
Widget(QWidget *parent = 0);
|
||||
Widget(QWidget *parent = nullptr);
|
||||
};
|
||||
|
||||
Widget::Widget(QWidget *parent)
|
||||
|
@ -55,7 +55,7 @@
|
||||
class Widget : public QWidget
|
||||
{
|
||||
public:
|
||||
Widget(QWidget *parent = 0);
|
||||
Widget(QWidget *parent = nullptr);
|
||||
|
||||
void constCharPointer();
|
||||
void constCharArray();
|
||||
|
@ -55,7 +55,7 @@ using namespace std;
|
||||
class Widget : public QWidget
|
||||
{
|
||||
public:
|
||||
Widget(QWidget *parent = 0);
|
||||
Widget(QWidget *parent = nullptr);
|
||||
};
|
||||
|
||||
Widget::Widget(QWidget *parent)
|
||||
|
@ -53,7 +53,7 @@
|
||||
class Widget : public QWidget
|
||||
{
|
||||
public:
|
||||
Widget(QWidget *parent = 0);
|
||||
Widget(QWidget *parent = nullptr);
|
||||
};
|
||||
|
||||
Widget::Widget(QWidget *parent)
|
||||
|
@ -1184,7 +1184,7 @@ Q_CORE_EXPORT QString qtTrId(const char *id, int n = -1);
|
||||
# define dynamic_cast QT_PREPEND_NAMESPACE(qt_dynamic_cast_check)
|
||||
|
||||
template<typename T, typename X>
|
||||
T qt_dynamic_cast_check(X, T* = 0)
|
||||
T qt_dynamic_cast_check(X, T* = nullptr)
|
||||
{ return T::dynamic_cast_will_always_fail_because_rtti_is_disabled; }
|
||||
#endif
|
||||
|
||||
|
@ -567,7 +567,7 @@ QString QFileSystemEngine::nativeAbsoluteFilePath(const QString &path)
|
||||
// can be //server or //server/share
|
||||
QString absPath;
|
||||
QVarLengthArray<wchar_t, MAX_PATH> buf(qMax(MAX_PATH, path.size() + 1));
|
||||
wchar_t *fileName = 0;
|
||||
wchar_t *fileName = nullptr;
|
||||
DWORD retLen = GetFullPathName((wchar_t*)path.utf16(), buf.size(), buf.data(), &fileName);
|
||||
if (retLen > (DWORD)buf.size()) {
|
||||
buf.resize(retLen);
|
||||
|
@ -406,7 +406,7 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths,
|
||||
pathInfo = fileInfo;
|
||||
|
||||
// Look for a thread
|
||||
QWindowsFileSystemWatcherEngineThread *thread = 0;
|
||||
QWindowsFileSystemWatcherEngineThread *thread = nullptr;
|
||||
QWindowsFileSystemWatcherEngine::Handle handle;
|
||||
QList<QWindowsFileSystemWatcherEngineThread *>::const_iterator jt, end;
|
||||
end = threads.constEnd();
|
||||
|
@ -134,7 +134,7 @@ static QString getExternalStoragePublicDirectory(const char *directoryField)
|
||||
* Locations where applications can place persistent files it owns.
|
||||
* E.g., /storage/org.app/Music
|
||||
*/
|
||||
static QString getExternalFilesDir(const char *directoryField = 0)
|
||||
static QString getExternalFilesDir(const char *directoryField = nullptr)
|
||||
{
|
||||
QString &path = (*androidDirCache)[QLatin1String("APPNAME_%1").arg(QLatin1String(directoryField))];
|
||||
if (!path.isEmpty())
|
||||
|
@ -62,7 +62,7 @@ class Q_CORE_EXPORT QWindowsPipeReader : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWindowsPipeReader(QObject *parent = 0);
|
||||
explicit QWindowsPipeReader(QObject *parent = nullptr);
|
||||
~QWindowsPipeReader();
|
||||
|
||||
void setHandle(HANDLE hPipeReadEnd);
|
||||
|
@ -111,7 +111,7 @@ class Q_CORE_EXPORT QWindowsPipeWriter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWindowsPipeWriter(HANDLE pipeWriteEnd, QObject *parent = 0);
|
||||
explicit QWindowsPipeWriter(HANDLE pipeWriteEnd, QObject *parent = nullptr);
|
||||
~QWindowsPipeWriter();
|
||||
|
||||
bool write(const QByteArray &ba);
|
||||
|
@ -209,7 +209,7 @@ class Q_CORE_EXPORT QEventDispatcherCoreFoundation : public QAbstractEventDispat
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QEventDispatcherCoreFoundation(QObject *parent = 0);
|
||||
explicit QEventDispatcherCoreFoundation(QObject *parent = nullptr);
|
||||
void startingUp() override;
|
||||
~QEventDispatcherCoreFoundation();
|
||||
|
||||
|
@ -162,8 +162,8 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
|
||||
#else
|
||||
auto q = reinterpret_cast<QEventDispatcherWin32 *>(GetWindowLong(hwnd, GWL_USERDATA));
|
||||
#endif
|
||||
QEventDispatcherWin32Private *d = 0;
|
||||
if (q != 0)
|
||||
QEventDispatcherWin32Private *d = nullptr;
|
||||
if (q != nullptr)
|
||||
d = q->d_func();
|
||||
|
||||
switch (message) {
|
||||
@ -187,7 +187,7 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
|
||||
break;
|
||||
}
|
||||
if (type >= 0) {
|
||||
Q_ASSERT(d != 0);
|
||||
Q_ASSERT(d != nullptr);
|
||||
QSNDict *sn_vec[4] = { &d->sn_read, &d->sn_write, &d->sn_except, &d->sn_read };
|
||||
QSNDict *dict = sn_vec[type];
|
||||
|
||||
@ -217,7 +217,7 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
|
||||
return 0;
|
||||
}
|
||||
case WM_QT_ACTIVATENOTIFIERS: {
|
||||
Q_ASSERT(d != 0);
|
||||
Q_ASSERT(d != nullptr);
|
||||
|
||||
// Postpone activation if we have unhandled socket notifier messages
|
||||
// in the queue. WM_QT_ACTIVATENOTIFIERS will be posted again as a result of
|
||||
@ -242,7 +242,7 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
|
||||
return 0;
|
||||
}
|
||||
case WM_TIMER:
|
||||
Q_ASSERT(d != 0);
|
||||
Q_ASSERT(d != nullptr);
|
||||
|
||||
if (wp == d->sendPostedEventsTimerId)
|
||||
q->sendPostedEvents();
|
||||
@ -250,7 +250,7 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
|
||||
d->sendTimerEvent(wp);
|
||||
return 0;
|
||||
case WM_QT_SENDPOSTEDEVENTS:
|
||||
Q_ASSERT(d != 0);
|
||||
Q_ASSERT(d != nullptr);
|
||||
|
||||
// We send posted events manually, if the window procedure was invoked
|
||||
// by the foreign event loop (e.g. from the native modal dialog).
|
||||
@ -268,7 +268,7 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
|
||||
LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
|
||||
{
|
||||
QEventDispatcherWin32 *q = qobject_cast<QEventDispatcherWin32 *>(QAbstractEventDispatcher::instance());
|
||||
Q_ASSERT(q != 0);
|
||||
Q_ASSERT(q != nullptr);
|
||||
QEventDispatcherWin32Private *d = q->d_func();
|
||||
MSG *msg = reinterpret_cast<MSG *>(lp);
|
||||
// Windows unexpectedly passes PM_NOYIELD flag to the hook procedure,
|
||||
|
@ -73,7 +73,7 @@ class Q_CORE_EXPORT QEventDispatcherWin32 : public QAbstractEventDispatcher
|
||||
Q_DECLARE_PRIVATE(QEventDispatcherWin32)
|
||||
|
||||
public:
|
||||
explicit QEventDispatcherWin32(QObject *parent = 0);
|
||||
explicit QEventDispatcherWin32(QObject *parent = nullptr);
|
||||
~QEventDispatcherWin32();
|
||||
|
||||
bool QT_ENSURE_STACK_ALIGNED_FOR_SSE processEvents(QEventLoop::ProcessEventsFlags flags) override;
|
||||
@ -103,7 +103,7 @@ public:
|
||||
HWND internalHwnd();
|
||||
|
||||
protected:
|
||||
QEventDispatcherWin32(QEventDispatcherWin32Private &dd, QObject *parent = 0);
|
||||
QEventDispatcherWin32(QEventDispatcherWin32Private &dd, QObject *parent = nullptr);
|
||||
virtual void sendPostedEvents();
|
||||
void doUnregisterSocketNotifier(QSocketNotifier *notifier);
|
||||
void doUnregisterEventNotifier(QWinEventNotifier *notifier);
|
||||
|
@ -81,7 +81,7 @@ static QByteArray toBinaryEncClassName(const QByteArray &className)
|
||||
return QByteArray(className).replace('/', '.');
|
||||
}
|
||||
|
||||
static jclass getCachedClass(const QByteArray &classBinEnc, bool *isCached = 0)
|
||||
static jclass getCachedClass(const QByteArray &classBinEnc, bool *isCached = nullptr)
|
||||
{
|
||||
QReadLocker locker(cachedClassesLock);
|
||||
const QHash<QString, jclass>::const_iterator &it = cachedClasses->constFind(QString::fromLatin1(classBinEnc));
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
~QJNIEnvironmentPrivate();
|
||||
JNIEnv *operator->();
|
||||
operator JNIEnv*() const;
|
||||
static jclass findClass(const char *className, JNIEnv *env = 0);
|
||||
static jclass findClass(const char *className, JNIEnv *env = nullptr);
|
||||
|
||||
private:
|
||||
friend class QAndroidJniEnvironment;
|
||||
|
@ -579,7 +579,7 @@ const QMetaObject *QMetaType::metaObject() const
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn void *QMetaType::create(const void *copy = 0) const
|
||||
\fn void *QMetaType::create(const void *copy = nullptr) const
|
||||
\since 5.0
|
||||
|
||||
Returns a copy of \a copy, assuming it is of the type that this
|
||||
@ -624,7 +624,7 @@ void QMetaType::destroy(void *data) const
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn void *QMetaType::construct(void *where, const void *copy = 0) const
|
||||
\fn void *QMetaType::construct(void *where, const void *copy = nullptr) const
|
||||
\since 5.0
|
||||
|
||||
Constructs a value of the type that this QMetaType instance
|
||||
|
@ -177,7 +177,7 @@ int qt_poll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts)
|
||||
}
|
||||
|
||||
fd_set read_fds, write_fds, except_fds;
|
||||
struct timeval tv, *ptv = 0;
|
||||
struct timeval tv, *ptv = nullptr;
|
||||
|
||||
if (timeout_ts) {
|
||||
tv = timespecToTimeval(*timeout_ts);
|
||||
|
@ -207,7 +207,7 @@ public:
|
||||
namespace Qt {
|
||||
template <typename Functor>
|
||||
auto makePropertyBinding(Functor &&f, const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION,
|
||||
std::enable_if_t<std::is_invocable_v<Functor>> * = 0)
|
||||
std::enable_if_t<std::is_invocable_v<Functor>> * = nullptr)
|
||||
{
|
||||
return QPropertyBinding<std::invoke_result_t<Functor>>(std::forward<Functor>(f), location);
|
||||
}
|
||||
@ -321,7 +321,7 @@ public:
|
||||
#ifndef Q_CLANG_QDOC
|
||||
template <typename Functor>
|
||||
explicit QProperty(Functor &&f, const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION,
|
||||
typename std::enable_if_t<std::is_invocable_r_v<T, Functor&>> * = 0)
|
||||
typename std::enable_if_t<std::is_invocable_r_v<T, Functor&>> * = nullptr)
|
||||
: QProperty(QPropertyBinding<T>(std::forward<Functor>(f), location))
|
||||
{}
|
||||
#else
|
||||
@ -821,7 +821,7 @@ public:
|
||||
#ifndef Q_CLANG_QDOC
|
||||
template <typename Functor>
|
||||
explicit QObjectBindableProperty(Functor &&f, const QPropertyBindingSourceLocation &location = QT_PROPERTY_DEFAULT_BINDING_LOCATION,
|
||||
typename std::enable_if_t<std::is_invocable_r_v<T, Functor&>> * = 0)
|
||||
typename std::enable_if_t<std::is_invocable_r_v<T, Functor&>> * = nullptr)
|
||||
: QObjectBindableProperty(QPropertyBinding<T>(std::forward<Functor>(f), location))
|
||||
{}
|
||||
#else
|
||||
|
@ -76,7 +76,7 @@ namespace {
|
||||
static QString windowsErrorString(int errorCode)
|
||||
{
|
||||
QString ret;
|
||||
wchar_t *string = 0;
|
||||
wchar_t *string = nullptr;
|
||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
errorCode,
|
||||
|
@ -103,7 +103,7 @@ int QMachOParser::parse(const char *m_s, ulong fdlen, const QString &library, QS
|
||||
return ns(QLibrary::tr("file too small"), library, errorString);
|
||||
|
||||
// find out if this is a fat Mach-O binary first
|
||||
const my_mach_header *header = 0;
|
||||
const my_mach_header *header = nullptr;
|
||||
const fat_header *fat = reinterpret_cast<const fat_header *>(m_s);
|
||||
if (fat->magic == qToBigEndian(FAT_MAGIC)) {
|
||||
// find our architecture in the binary
|
||||
|
@ -895,7 +895,7 @@ bool QThread::isRunning() const
|
||||
}
|
||||
|
||||
// No threads: so we can just use static variables
|
||||
static QThreadData *data = 0;
|
||||
static QThreadData *data = nullptr;
|
||||
|
||||
QThreadData *QThreadData::current(bool createIfNecessary)
|
||||
{
|
||||
|
@ -208,7 +208,7 @@ public:
|
||||
class QThreadPrivate : public QObjectPrivate
|
||||
{
|
||||
public:
|
||||
QThreadPrivate(QThreadData *d = 0);
|
||||
QThreadPrivate(QThreadData *d = nullptr);
|
||||
~QThreadPrivate();
|
||||
|
||||
mutable QMutex mutex;
|
||||
|
@ -126,7 +126,7 @@ QT_BEGIN_NAMESPACE
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template <typename T, typename Cleanup> QScopedPointer<T, Cleanup>::QScopedPointer(T *p = 0)
|
||||
\fn template <typename T, typename Cleanup> QScopedPointer<T, Cleanup>::QScopedPointer(T *p = nullptr)
|
||||
|
||||
Constructs this QScopedPointer instance and sets its pointer to \a p.
|
||||
*/
|
||||
@ -242,7 +242,7 @@ QT_BEGIN_NAMESPACE
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template <typename T, typename Cleanup> void QScopedPointer<T, Cleanup>::reset(T *other = 0)
|
||||
\fn template <typename T, typename Cleanup> void QScopedPointer<T, Cleanup>::reset(T *other = nullptr)
|
||||
|
||||
Deletes the existing object it is pointing to (if any), and sets its pointer to
|
||||
\a other. QScopedPointer now owns \a other and will delete it in its
|
||||
|
@ -64,7 +64,7 @@ template <typename T, typename Cleanup = QScopedPointerDeleter<T> >
|
||||
class QCustomScopedPointer : public QScopedPointer<T, Cleanup>
|
||||
{
|
||||
public:
|
||||
explicit inline QCustomScopedPointer(T *p = 0)
|
||||
explicit inline QCustomScopedPointer(T *p = nullptr)
|
||||
: QScopedPointer<T, Cleanup>(p)
|
||||
{
|
||||
}
|
||||
@ -107,7 +107,7 @@ template <typename T>
|
||||
class QScopedSharedPointer : public QCustomScopedPointer<T, QScopedPointerSharedDeleter<T> >
|
||||
{
|
||||
public:
|
||||
explicit inline QScopedSharedPointer(T *p = 0)
|
||||
explicit inline QScopedSharedPointer(T *p = nullptr)
|
||||
: QCustomScopedPointer<T, QScopedPointerSharedDeleter<T> >(p)
|
||||
{
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ void (*qdbus_resolve_me(const char *name))();
|
||||
#if !defined QT_LINKED_LIBDBUS
|
||||
|
||||
#if QT_CONFIG(library)
|
||||
static QLibrary *qdbus_libdbus = 0;
|
||||
static QLibrary *qdbus_libdbus = nullptr;
|
||||
|
||||
void qdbus_unloadLibDBus()
|
||||
{
|
||||
@ -66,7 +66,7 @@ void qdbus_unloadLibDBus()
|
||||
qdbus_libdbus->unload();
|
||||
}
|
||||
delete qdbus_libdbus;
|
||||
qdbus_libdbus = 0;
|
||||
qdbus_libdbus = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -118,7 +118,7 @@ bool qdbus_loadLibDBus()
|
||||
}
|
||||
|
||||
delete lib;
|
||||
lib = 0;
|
||||
lib = nullptr;
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
|
@ -130,9 +130,9 @@ void MainWindow::showList()
|
||||
headerLabels << tr("Lists");
|
||||
treeWidget->setHeaderLabels(headerLabels);
|
||||
|
||||
QTreeWidgetItem *parentItem = 0;
|
||||
QTreeWidgetItem *parentItem = nullptr;
|
||||
QTreeWidgetItem *item;
|
||||
QTreeWidgetItem *lastItem = 0;
|
||||
QTreeWidgetItem *lastItem = nullptr;
|
||||
parentItems.clear();
|
||||
previousItems.clear();
|
||||
|
||||
|
@ -1752,7 +1752,7 @@ void restoreOverrideCursor();
|
||||
static QFont font();
|
||||
static QFont font(const QWidget*);
|
||||
static QFont font(const char *className);
|
||||
static void setFont(const QFont &, const char* className = 0);
|
||||
static void setFont(const QFont &, const char *className = nullptr);
|
||||
static QFontMetrics fontMetrics();
|
||||
|
||||
#ifndef QT_NO_CLIPBOARD
|
||||
|
@ -68,7 +68,7 @@ typedef double GLdouble;
|
||||
unsigned clamped = qMin(unsigned(error - GL_INVALID_ENUM), 4U); \
|
||||
const char *errors[] = { "GL_INVALID_ENUM", "GL_INVALID_VALUE", "GL_INVALID_OPERATION", "Unknown" }; \
|
||||
printf("GL error at %s:%d: %s\n", __FILE__, __LINE__, errors[clamped]); \
|
||||
int *value = 0; \
|
||||
int *value = nullptr; \
|
||||
*value = 0; \
|
||||
}
|
||||
#else
|
||||
|
@ -510,7 +510,7 @@ void QMacCGContext::initialize(const QImage *image, QPainter *painter)
|
||||
clip &= painterClip;
|
||||
}
|
||||
|
||||
qt_mac_clip_cg(context, clip, 0);
|
||||
qt_mac_clip_cg(context, clip, nullptr);
|
||||
|
||||
CGContextTranslateCTM(context, deviceTransform.dx(), deviceTransform.dy());
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ class Q_GUI_EXPORT QWindowsGuiEventDispatcher : public QEventDispatcherWin32
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QWindowsGuiEventDispatcher(QObject *parent = 0);
|
||||
explicit QWindowsGuiEventDispatcher(QObject *parent = nullptr);
|
||||
|
||||
static const char *windowsMessageName(UINT msg);
|
||||
|
||||
|
@ -84,7 +84,7 @@ QStaticTextUserData::~QStaticTextUserData()
|
||||
class MyWidget: public QWidget
|
||||
{
|
||||
public:
|
||||
MyWidget(QWidget *parent = 0) : QWidget(parent), m_staticText("This is static text")
|
||||
MyWidget(QWidget *parent = nullptr) : QWidget(parent), m_staticText("This is static text")
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *)
|
||||
|
@ -1139,7 +1139,7 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request, const Q
|
||||
int dpi,
|
||||
const QSharedPointer<QWindowsFontEngineData> &data)
|
||||
{
|
||||
QFontEngine *fe = 0;
|
||||
QFontEngine *fe = nullptr;
|
||||
|
||||
LOGFONT lf = fontDefToLOGFONT(request, faceName);
|
||||
const bool preferClearTypeAA = lf.lfQuality == CLEARTYPE_QUALITY;
|
||||
|
@ -642,7 +642,7 @@ qreal QWindowsFontEngine::minRightBearing() const
|
||||
HDC hdc = m_fontEngineData->hdc;
|
||||
SelectObject(hdc, hfont);
|
||||
if (ttf) {
|
||||
ABC *abc = 0;
|
||||
ABC *abc = nullptr;
|
||||
int n = tm.tmLastChar - tm.tmFirstChar;
|
||||
if (n <= max_font_count) {
|
||||
abc = new ABC[n+1];
|
||||
@ -706,7 +706,7 @@ static inline QPointF qt_to_qpointf(const POINTFX &pt, qreal scale, qreal stretc
|
||||
#endif
|
||||
|
||||
static bool addGlyphToPath(glyph_t glyph, const QFixedPoint &position, HDC hdc,
|
||||
QPainterPath *path, bool ttf, glyph_metrics_t *metric = 0,
|
||||
QPainterPath *path, bool ttf, glyph_metrics_t *metric = nullptr,
|
||||
qreal scale = 1.0, qreal stretch = 1.0)
|
||||
{
|
||||
MAT2 mat;
|
||||
|
@ -115,7 +115,7 @@ public:
|
||||
bool supportsTransformation(const QTransform &transform) const override;
|
||||
|
||||
#ifndef Q_CC_MINGW
|
||||
void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0) override;
|
||||
void getGlyphBearings(glyph_t glyph, qreal *leftBearing = nullptr, qreal *rightBearing = nullptr) override;
|
||||
#endif
|
||||
|
||||
bool hasUnreliableGlyphOutline() const override;
|
||||
|
@ -209,7 +209,7 @@ static QSet<QByteArray> interfaceNames(int socket)
|
||||
static QNetworkInterfacePrivate *findInterface(int socket, QList<QNetworkInterfacePrivate *> &interfaces,
|
||||
struct ifreq &req)
|
||||
{
|
||||
QNetworkInterfacePrivate *iface = 0;
|
||||
QNetworkInterfacePrivate *iface = nullptr;
|
||||
int ifindex = 0;
|
||||
|
||||
#if !defined(QT_NO_IPV6IFNAME) || defined(SIOCGIFINDEX)
|
||||
@ -618,7 +618,7 @@ static QList<QNetworkInterfacePrivate *> interfaceListing()
|
||||
for (ifaddrs *ptr = interfaceListing; ptr; ptr = ptr->ifa_next) {
|
||||
// Find the interface
|
||||
QLatin1String name(ptr->ifa_name);
|
||||
QNetworkInterfacePrivate *iface = 0;
|
||||
QNetworkInterfacePrivate *iface = nullptr;
|
||||
QList<QNetworkInterfacePrivate *>::Iterator if_it = interfaces.begin();
|
||||
for ( ; if_it != interfaces.end(); ++if_it)
|
||||
if ((*if_it)->name == name) {
|
||||
|
@ -60,7 +60,7 @@ class QDeviceDiscoveryDummy : public QDeviceDiscovery
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QDeviceDiscoveryDummy(QDeviceTypes types, QObject *parent = 0);
|
||||
QDeviceDiscoveryDummy(QDeviceTypes types, QObject *parent = nullptr);
|
||||
QStringList scanConnectedDevices() override;
|
||||
};
|
||||
|
||||
|
@ -60,7 +60,7 @@ class QDeviceDiscoveryStatic : public QDeviceDiscovery
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QDeviceDiscoveryStatic(QDeviceTypes types, QObject *parent = 0);
|
||||
QDeviceDiscoveryStatic(QDeviceTypes types, QObject *parent = nullptr);
|
||||
QStringList scanConnectedDevices() override;
|
||||
|
||||
private:
|
||||
|
@ -60,7 +60,7 @@ QDeviceDiscovery *QDeviceDiscovery::create(QDeviceTypes types, QObject *parent)
|
||||
{
|
||||
qCDebug(lcDD) << "udev device discovery for type" << types;
|
||||
|
||||
QDeviceDiscovery *helper = 0;
|
||||
QDeviceDiscovery *helper = nullptr;
|
||||
struct udev *udev;
|
||||
|
||||
udev = udev_new();
|
||||
|
@ -250,8 +250,8 @@ QEvdevKeyboardHandler::KeycodeAction QEvdevKeyboardHandler::processKeycode(quint
|
||||
KeycodeAction result = None;
|
||||
bool first_press = pressed && !autorepeat;
|
||||
|
||||
const QEvdevKeyboardMap::Mapping *map_plain = 0;
|
||||
const QEvdevKeyboardMap::Mapping *map_withmod = 0;
|
||||
const QEvdevKeyboardMap::Mapping *map_plain = nullptr;
|
||||
const QEvdevKeyboardMap::Mapping *map_withmod = nullptr;
|
||||
|
||||
quint8 modifiers = m_modifiers;
|
||||
|
||||
|
@ -64,7 +64,7 @@ class QTsLibMouseHandler : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QTsLibMouseHandler(const QString &key, const QString &specification, QObject *parent = 0);
|
||||
QTsLibMouseHandler(const QString &key, const QString &specification, QObject *parent = nullptr);
|
||||
~QTsLibMouseHandler();
|
||||
|
||||
private slots:
|
||||
|
@ -98,7 +98,7 @@ namespace QtAndroidAccessibility
|
||||
|
||||
QAccessibleInterface *interfaceFromId(jint objectId)
|
||||
{
|
||||
QAccessibleInterface *iface = 0;
|
||||
QAccessibleInterface *iface = nullptr;
|
||||
if (objectId == -1) {
|
||||
QWindow *win = qApp->focusWindow();
|
||||
if (win)
|
||||
@ -164,7 +164,7 @@ namespace QtAndroidAccessibility
|
||||
QPoint pos = QHighDpi::fromNativePixels(QPoint(int(x), int(y)), root->window());
|
||||
|
||||
QAccessibleInterface *child = root->childAt(pos.x(), pos.y());
|
||||
QAccessibleInterface *lastChild = 0;
|
||||
QAccessibleInterface *lastChild = nullptr;
|
||||
while (child && (child != lastChild)) {
|
||||
lastChild = child;
|
||||
child = child->childAt(pos.x(), pos.y());
|
||||
|
@ -96,9 +96,9 @@ namespace QtAndroid
|
||||
};
|
||||
void setSystemUiVisibility(SystemUiVisibility uiVisibility);
|
||||
|
||||
jobject createBitmap(QImage img, JNIEnv *env = 0);
|
||||
jobject createBitmap(QImage img, JNIEnv *env = nullptr);
|
||||
jobject createBitmap(int width, int height, QImage::Format format, JNIEnv *env);
|
||||
jobject createBitmapDrawable(jobject bitmap, JNIEnv *env = 0);
|
||||
jobject createBitmapDrawable(jobject bitmap, JNIEnv *env = nullptr);
|
||||
|
||||
const char *classErrorMsgFmt();
|
||||
const char *methodErrorMsgFmt();
|
||||
|
@ -59,12 +59,12 @@ using namespace QtAndroid;
|
||||
namespace QtAndroidMenu
|
||||
{
|
||||
static QList<QAndroidPlatformMenu *> pendingContextMenus;
|
||||
static QAndroidPlatformMenu *visibleMenu = 0;
|
||||
static QAndroidPlatformMenu *visibleMenu = nullptr;
|
||||
static QRecursiveMutex visibleMenuMutex;
|
||||
|
||||
static QSet<QAndroidPlatformMenuBar *> menuBars;
|
||||
static QAndroidPlatformMenuBar *visibleMenuBar = 0;
|
||||
static QWindow *activeTopLevelWindow = 0;
|
||||
static QAndroidPlatformMenuBar *visibleMenuBar = nullptr;
|
||||
static QWindow *activeTopLevelWindow = nullptr;
|
||||
static QRecursiveMutex menuBarMutex;
|
||||
|
||||
static jmethodID openContextMenuMethodID = 0;
|
||||
|
@ -48,7 +48,7 @@ class QAndroidEventDispatcher : public QUnixEventDispatcherQPA
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QAndroidEventDispatcher(QObject *parent = 0);
|
||||
explicit QAndroidEventDispatcher(QObject *parent = nullptr);
|
||||
~QAndroidEventDispatcher();
|
||||
void start();
|
||||
void stop();
|
||||
|
@ -91,7 +91,7 @@ private:
|
||||
|
||||
} // namespace anonymous
|
||||
|
||||
static QAndroidInputContext *m_androidInputContext = 0;
|
||||
static QAndroidInputContext *m_androidInputContext = nullptr;
|
||||
static char const *const QtNativeInputConnectionClassName = "org/qtproject/qt/android/QtNativeInputConnection";
|
||||
static char const *const QtExtractedTextClassName = "org/qtproject/qt/android/QtExtractedText";
|
||||
static jclass m_extractedTextClass = 0;
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
QPlatformIntegration * QDirectFbIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
||||
{
|
||||
Q_UNUSED(paramList);
|
||||
QDirectFbIntegration *integration = 0;
|
||||
QDirectFbIntegration *integration = nullptr;
|
||||
|
||||
if (!system.compare(QLatin1String("directfb"), Qt::CaseInsensitive))
|
||||
integration = new QDirectFbIntegration;
|
||||
|
@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
|
||||
extern QDirectFBEGLHooks platform_hook;
|
||||
static QDirectFBEGLHooks *hooks = &platform_hook;
|
||||
#else
|
||||
static QDirectFBEGLHooks *hooks = 0;
|
||||
static QDirectFBEGLHooks *hooks = nullptr;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
IDirectFB *QDirectFbConvenience::dfbInterface()
|
||||
{
|
||||
static IDirectFB *dfb = 0;
|
||||
static IDirectFB *dfb = nullptr;
|
||||
if (!dfb) {
|
||||
DFBResult result = DirectFBCreate(&dfb);
|
||||
if (result != DFB_OK) {
|
||||
@ -247,7 +247,7 @@ QEvent::Type QDirectFbConvenience::eventType(DFBWindowEventType type)
|
||||
return QEvent::None;
|
||||
}
|
||||
}
|
||||
QDirectFbKeyMap *QDirectFbConvenience::dfbKeymap = 0;
|
||||
QDirectFbKeyMap *QDirectFbConvenience::dfbKeymap = nullptr;
|
||||
QDirectFbKeyMap *QDirectFbConvenience::keyMap()
|
||||
{
|
||||
if (!dfbKeymap)
|
||||
|
@ -98,13 +98,13 @@ template <typename T>
|
||||
class QDirectFBPointer : public QScopedPointer<T, QDirectFBInterfaceCleanupHandler<T> >
|
||||
{
|
||||
public:
|
||||
QDirectFBPointer(T *t = 0)
|
||||
QDirectFBPointer(T *t = nullptr)
|
||||
: QScopedPointer<T, QDirectFBInterfaceCleanupHandler<T> >(t)
|
||||
{}
|
||||
|
||||
T** outPtr()
|
||||
{
|
||||
this->reset(0);
|
||||
this->reset(nullptr);
|
||||
return &this->d;
|
||||
}
|
||||
};
|
||||
|
@ -52,7 +52,7 @@ class QIntegrityHIDManager : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QIntegrityHIDManager(const QString &key, const QString &specification, QObject *parent = 0);
|
||||
QIntegrityHIDManager(const QString &key, const QString &specification, QObject *parent = nullptr);
|
||||
~QIntegrityHIDManager();
|
||||
|
||||
void run(void);
|
||||
|
@ -52,7 +52,7 @@ class QIosOptionalPlugin_NSPhotoLibrary : public QObject, QIosOptionalPluginInte
|
||||
Q_INTERFACES(QIosOptionalPluginInterface)
|
||||
|
||||
public:
|
||||
explicit QIosOptionalPlugin_NSPhotoLibrary(QObject* = 0) {};
|
||||
explicit QIosOptionalPlugin_NSPhotoLibrary(QObject * = nullptr) {};
|
||||
~QIosOptionalPlugin_NSPhotoLibrary() {}
|
||||
|
||||
UIViewController* createImagePickerController(QIOSFileDialog *fileDialog) const override
|
||||
|
@ -54,7 +54,7 @@ static QThreadStorage<QString> g_iteratorCurrentUrl;
|
||||
static QThreadStorage<QPointer<QIOSAssetData> > g_assetDataCache;
|
||||
|
||||
static const int kBufferSize = 10;
|
||||
static ALAsset *kNoAsset = 0;
|
||||
static ALAsset *kNoAsset = nullptr;
|
||||
|
||||
static bool ensureAuthorizationDialogNotBlocked()
|
||||
{
|
||||
@ -366,7 +366,7 @@ bool QIOSFileEngineAssetsLibrary::close()
|
||||
// Delete later, so that we can reuse the asset if a QFile is
|
||||
// opened with the same path during the same event loop cycle.
|
||||
m_data->deleteLater();
|
||||
m_data = 0;
|
||||
m_data = nullptr;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -410,7 +410,7 @@ qint64 QIOSFileEngineAssetsLibrary::read(char *data, qint64 maxlen)
|
||||
if (!bytesRead)
|
||||
return 0;
|
||||
|
||||
NSError *error = 0;
|
||||
NSError *error = nullptr;
|
||||
[[asset defaultRepresentation] getBytes:(uint8_t *)data fromOffset:m_offset length:bytesRead error:&error];
|
||||
|
||||
if (error) {
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
bool processPostedEvents() override;
|
||||
|
||||
protected:
|
||||
explicit QIOSEventDispatcher(QObject *parent = 0);
|
||||
explicit QIOSEventDispatcher(QObject *parent = nullptr);
|
||||
};
|
||||
|
||||
class QIOSJumpingEventDispatcher : public QIOSEventDispatcher
|
||||
@ -61,7 +61,7 @@ class QIOSJumpingEventDispatcher : public QIOSEventDispatcher
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QIOSJumpingEventDispatcher(QObject *parent = 0);
|
||||
QIOSJumpingEventDispatcher(QObject *parent = nullptr);
|
||||
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
|
||||
|
||||
// Public since we can't friend Objective-C methods
|
||||
@ -76,4 +76,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QIOSEVENTDISPATCHER_H
|
||||
#endif // QIOSEVENTDISPATCHER_H
|
||||
|
@ -185,7 +185,7 @@ FirstResponderCandidate::FirstResponderCandidate(UIResponder *responder)
|
||||
{
|
||||
}
|
||||
|
||||
UIResponder *FirstResponderCandidate::s_firstResponderCandidate = 0;
|
||||
UIResponder *FirstResponderCandidate::s_firstResponderCandidate = nullptr;
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -111,7 +111,7 @@ public:
|
||||
void scrollToCursor();
|
||||
void scroll(int y);
|
||||
|
||||
void updateKeyboardState(NSNotification *notification = 0);
|
||||
void updateKeyboardState(NSNotification *notification = nullptr);
|
||||
|
||||
const ImeState &imeState() { return m_imeState; }
|
||||
const KeyboardState &keyboardState() { return m_keyboardState; }
|
||||
|
@ -54,7 +54,7 @@
|
||||
// m_currentMenu points to the currently visible menu.
|
||||
// Only one menu will be visible at a time, and if a second menu
|
||||
// is shown on top of a first, the first one will be told to hide.
|
||||
QIOSMenu *QIOSMenu::m_currentMenu = 0;
|
||||
QIOSMenu *QIOSMenu::m_currentMenu = nullptr;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@ -441,7 +441,7 @@ void QIOSMenu::dismiss()
|
||||
break;
|
||||
}
|
||||
|
||||
m_currentMenu = 0;
|
||||
m_currentMenu = nullptr;
|
||||
m_visible = false;
|
||||
}
|
||||
|
||||
@ -458,13 +458,13 @@ void QIOSMenu::toggleShowUsingUIMenuController(bool show)
|
||||
Q_ASSERT(m_menuController);
|
||||
[[UIMenuController sharedMenuController] setMenuVisible:NO animated:YES];
|
||||
[m_menuController release];
|
||||
m_menuController = 0;
|
||||
m_menuController = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void QIOSMenu::toggleShowUsingUIPickerView(bool show)
|
||||
{
|
||||
static QObject *focusObjectWithPickerView = 0;
|
||||
static QObject *focusObjectWithPickerView = nullptr;
|
||||
|
||||
if (show) {
|
||||
Q_ASSERT(!m_pickerView);
|
||||
@ -477,12 +477,12 @@ void QIOSMenu::toggleShowUsingUIPickerView(bool show)
|
||||
} else {
|
||||
Q_ASSERT(focusObjectWithPickerView);
|
||||
focusObjectWithPickerView->removeEventFilter(this);
|
||||
focusObjectWithPickerView = 0;
|
||||
focusObjectWithPickerView = nullptr;
|
||||
|
||||
Q_ASSERT(m_pickerView);
|
||||
[m_pickerView listenForKeyboardWillHideNotification:NO];
|
||||
[m_pickerView release];
|
||||
m_pickerView = 0;
|
||||
m_pickerView = nullptr;
|
||||
|
||||
qApp->inputMethod()->update(Qt::ImEnabled | Qt::ImPlatformData);
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ class QQnxAbstractNavigator : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQnxAbstractNavigator(QObject *parent = 0);
|
||||
explicit QQnxAbstractNavigator(QObject *parent = nullptr);
|
||||
~QQnxAbstractNavigator();
|
||||
|
||||
bool invokeUrl(const QUrl &url);
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
enum KeyboardMode { Default, Url, Email, Web, NumPunc, Number, Symbol, Phone, Pin, Password, Alphanumeric };
|
||||
enum EnterKeyType { DefaultReturn, Connect, Done, Go, Join, Next, Search, Send, Submit };
|
||||
|
||||
explicit QQnxAbstractVirtualKeyboard(QObject *parent = 0);
|
||||
explicit QQnxAbstractVirtualKeyboard(QObject *parent = nullptr);
|
||||
|
||||
virtual bool showKeyboard() = 0;
|
||||
virtual bool hideKeyboard() = 0;
|
||||
|
@ -77,7 +77,7 @@ QQnxBuffer::QQnxBuffer(screen_buffer_t buffer)
|
||||
|
||||
// Get access to buffer's data
|
||||
errno = 0;
|
||||
uchar *dataPtr = 0;
|
||||
uchar *dataPtr = nullptr;
|
||||
Q_SCREEN_CRITICALERROR(
|
||||
screen_get_buffer_property_pv(buffer, SCREEN_PROPERTY_POINTER, (void **)&dataPtr),
|
||||
"Failed to query buffer pointer");
|
||||
|
@ -55,8 +55,8 @@ public:
|
||||
virtual ~QQnxBuffer();
|
||||
|
||||
screen_buffer_t nativeBuffer() const { return m_buffer; }
|
||||
const QImage *image() const { return (m_buffer != 0) ? &m_image : 0; }
|
||||
QImage *image() { return (m_buffer != 0) ? &m_image : 0; }
|
||||
const QImage *image() const { return (m_buffer != nullptr) ? &m_image : nullptr; }
|
||||
QImage *image() { return (m_buffer != nullptr) ? &m_image : nullptr; }
|
||||
|
||||
QRect rect() const { return m_image.rect(); }
|
||||
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
ButtonDown
|
||||
};
|
||||
|
||||
explicit QQnxButtonEventNotifier(QObject *parent = 0);
|
||||
explicit QQnxButtonEventNotifier(QObject *parent = nullptr);
|
||||
~QQnxButtonEventNotifier();
|
||||
|
||||
public Q_SLOTS:
|
||||
|
@ -76,8 +76,8 @@
|
||||
static QQnxInputContext *sInputContextInstance;
|
||||
static QColor sSelectedColor(0,0xb8,0,85);
|
||||
|
||||
static const input_session_t *sSpellCheckSession = 0;
|
||||
static const input_session_t *sInputSession = 0;
|
||||
static const input_session_t *sSpellCheckSession = nullptr;
|
||||
static const input_session_t *sInputSession = nullptr;
|
||||
static bool isSessionOkay(input_session_t *ic)
|
||||
{
|
||||
return ic !=0 && sInputSession != 0 && ic->component_id == sInputSession->component_id;
|
||||
@ -515,13 +515,13 @@ static spannable_string_t *toSpannableString(const QString &text)
|
||||
}
|
||||
|
||||
|
||||
static const input_session_t *(*p_ictrl_open_session)(connection_interface_t *) = 0;
|
||||
static void (*p_ictrl_close_session)(input_session_t *) = 0;
|
||||
static int32_t (*p_ictrl_dispatch_event)(event_t*) = 0;
|
||||
static int32_t (*p_imf_client_init)() = 0;
|
||||
static void (*p_imf_client_disconnect)() = 0;
|
||||
static int32_t (*p_vkb_init_selection_service)() = 0;
|
||||
static int32_t (*p_ictrl_get_num_active_sessions)() = 0;
|
||||
static const input_session_t *(*p_ictrl_open_session)(connection_interface_t *) = nullptr;
|
||||
static void (*p_ictrl_close_session)(input_session_t *) = nullptr;
|
||||
static int32_t (*p_ictrl_dispatch_event)(event_t*) = nullptr;
|
||||
static int32_t (*p_imf_client_init)() = nullptr;
|
||||
static void (*p_imf_client_disconnect)() = nullptr;
|
||||
static int32_t (*p_vkb_init_selection_service)() = nullptr;
|
||||
static int32_t (*p_ictrl_get_num_active_sessions)() = nullptr;
|
||||
static bool s_imfInitFailed = false;
|
||||
|
||||
static bool imfAvailable()
|
||||
@ -602,7 +602,7 @@ QQnxInputContext::~QQnxInputContext()
|
||||
qInputContextDebug();
|
||||
|
||||
Q_ASSERT(sInputContextInstance == this);
|
||||
sInputContextInstance = 0;
|
||||
sInputContextInstance = nullptr;
|
||||
|
||||
if (!imfAvailable())
|
||||
return;
|
||||
@ -735,7 +735,7 @@ void QQnxInputContext::closeSession()
|
||||
|
||||
if (sInputSession) {
|
||||
p_ictrl_close_session((input_session_t *)sInputSession);
|
||||
sInputSession = 0;
|
||||
sInputSession = nullptr;
|
||||
}
|
||||
// These are likely already in the right state but this depends on the text control
|
||||
// having called reset or commit. So, just in case, set them to proper values.
|
||||
|
@ -48,7 +48,7 @@ class QQnxNavigatorEventHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQnxNavigatorEventHandler(QObject *parent = 0);
|
||||
explicit QQnxNavigatorEventHandler(QObject *parent = nullptr);
|
||||
|
||||
bool handleOrientationCheck(int angle);
|
||||
void handleOrientationChange(int angle);
|
||||
|
@ -51,7 +51,7 @@ class QQnxNavigatorEventNotifier : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQnxNavigatorEventNotifier(QQnxNavigatorEventHandler *eventHandler, QObject *parent = 0);
|
||||
explicit QQnxNavigatorEventNotifier(QQnxNavigatorEventHandler *eventHandler, QObject *parent = nullptr);
|
||||
~QQnxNavigatorEventNotifier();
|
||||
|
||||
public Q_SLOTS:
|
||||
|
@ -50,7 +50,7 @@ class QQnxNavigatorPps : public QQnxAbstractNavigator
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QQnxNavigatorPps(QObject *parent = 0);
|
||||
explicit QQnxNavigatorPps(QObject *parent = nullptr);
|
||||
~QQnxNavigatorPps();
|
||||
|
||||
protected:
|
||||
|
@ -89,7 +89,7 @@ void QQnxRasterBackingStore::flush(QWindow *window, const QRegion ®ion, const
|
||||
if (!m_needsPosting)
|
||||
return;
|
||||
|
||||
QQnxWindow *targetWindow = 0;
|
||||
QQnxWindow *targetWindow = nullptr;
|
||||
if (window)
|
||||
targetWindow = static_cast<QQnxWindow *>(window->handle());
|
||||
|
||||
|
@ -566,7 +566,7 @@ void QQnxWindow::removeFromParent()
|
||||
if (Q_UNLIKELY(!m_parentWindow->m_childWindows.removeAll(this)))
|
||||
qFatal("QQnxWindow: Window Hierarchy broken; window has parent, but parent hasn't got child.");
|
||||
else
|
||||
m_parentWindow = 0;
|
||||
m_parentWindow = nullptr;
|
||||
} else if (m_screen) {
|
||||
m_screen->removeWindow(this);
|
||||
}
|
||||
@ -634,7 +634,7 @@ void QQnxWindow::lower()
|
||||
|
||||
void QQnxWindow::requestActivateWindow()
|
||||
{
|
||||
QQnxWindow *focusWindow = 0;
|
||||
QQnxWindow *focusWindow = nullptr;
|
||||
if (QGuiApplication::focusWindow())
|
||||
focusWindow = static_cast<QQnxWindow*>(QGuiApplication::focusWindow()->handle());
|
||||
|
||||
@ -664,7 +664,7 @@ void QQnxWindow::requestActivateWindow()
|
||||
platformScreen->rootWindow()->m_windowGroupName == currentWindow->m_parentGroupName) {
|
||||
currentWindow = platformScreen->rootWindow();
|
||||
} else {
|
||||
currentWindow = 0;
|
||||
currentWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -454,7 +454,7 @@ void QWasmCompositor::drawFrameWindow(QWasmFrameOptions options, QPainter *paint
|
||||
const QColor &c2 = options.palette.shadow().color();
|
||||
const QColor &c3 = options.palette.midlight().color();
|
||||
const QColor &c4 = options.palette.dark().color();
|
||||
const QBrush *fill = 0;
|
||||
const QBrush *fill = nullptr;
|
||||
|
||||
const qreal devicePixelRatio = painter->device()->devicePixelRatio();
|
||||
if (!qFuzzyCompare(devicePixelRatio, qreal(1))) {
|
||||
|
@ -320,7 +320,7 @@ static void init_direct(QXcbColormapPrivate *d, bool ownColormap)
|
||||
XStoreColors(X11->display, d->colormap, colorTable.data(), colorTable.count());
|
||||
}
|
||||
|
||||
static QXcbColormap **cmaps = 0;
|
||||
static QXcbColormap **cmaps = nullptr;
|
||||
|
||||
void QXcbColormap::initialize()
|
||||
{
|
||||
@ -343,7 +343,7 @@ void QXcbColormap::initialize()
|
||||
d->visual = DefaultVisual(display, i);
|
||||
d->defaultVisual = true;
|
||||
|
||||
Visual *argbVisual = 0;
|
||||
Visual *argbVisual = nullptr;
|
||||
|
||||
if (X11->visual && i == DefaultScreen(display)) {
|
||||
// only use the outside colormap on the default screen
|
||||
@ -356,7 +356,7 @@ void QXcbColormap::initialize()
|
||||
d->visual = find_visual(display, i, X11->visual_class, X11->visual_id,
|
||||
&d->depth, &d->defaultVisual);
|
||||
} else if (!X11->custom_cmap) {
|
||||
XStandardColormap *stdcmap = 0;
|
||||
XStandardColormap *stdcmap = nullptr;
|
||||
int ncmaps = 0;
|
||||
|
||||
#if QT_CONFIG(xrender)
|
||||
|
@ -282,9 +282,9 @@ static uint n_bits(uint v)
|
||||
return i;
|
||||
}
|
||||
|
||||
static uint *red_scale_table = 0;
|
||||
static uint *green_scale_table = 0;
|
||||
static uint *blue_scale_table = 0;
|
||||
static uint *red_scale_table = nullptr;
|
||||
static uint *green_scale_table = nullptr;
|
||||
static uint *blue_scale_table = nullptr;
|
||||
|
||||
static void cleanup_scale_tables()
|
||||
{
|
||||
@ -546,10 +546,10 @@ void QX11PlatformPixmap::fromImage(const QImage &img, Qt::ImageConversionFlags f
|
||||
|
||||
Display *dpy = xinfo.display();
|
||||
Visual *visual = (Visual *)xinfo.visual();
|
||||
XImage *xi = 0;
|
||||
XImage *xi = nullptr;
|
||||
bool trucol = (visual->c_class >= TrueColor);
|
||||
size_t nbytes = image.sizeInBytes();
|
||||
uchar *newbits= 0;
|
||||
uchar *newbits= nullptr;
|
||||
|
||||
#if QT_CONFIG(xrender)
|
||||
if (alphaCheck.hasXRenderAndAlpha()) {
|
||||
|
@ -725,7 +725,7 @@ void QTessellatorPrivate::cancelCoincidingEdges()
|
||||
{
|
||||
Vertex **vv = vertices.sorted;
|
||||
|
||||
QCoincidingEdge *tl = 0;
|
||||
QCoincidingEdge *tl = nullptr;
|
||||
int tlSize = 0;
|
||||
|
||||
for (int i = 0; i < vertices.nPoints - 1; ++i) {
|
||||
|
@ -95,9 +95,9 @@ static xcb_window_t xdndProxy(QXcbConnection *c, xcb_window_t w)
|
||||
if (reply && reply->type == XCB_ATOM_WINDOW) {
|
||||
xcb_window_t p = *((xcb_window_t *)xcb_get_property_value(reply.get()));
|
||||
if (proxy != p)
|
||||
proxy = 0;
|
||||
proxy = XCB_NONE;
|
||||
} else {
|
||||
proxy = 0;
|
||||
proxy = XCB_NONE;
|
||||
}
|
||||
|
||||
return proxy;
|
||||
@ -690,7 +690,7 @@ int QXcbDrag::findTransactionByTime(xcb_timestamp_t timestamp)
|
||||
|
||||
#if 0
|
||||
// for embedding only
|
||||
static QWidget* current_embedding_widget = 0;
|
||||
static QWidget* current_embedding_widget = nullptr;
|
||||
static xcb_client_message_event_t last_enter_event;
|
||||
|
||||
|
||||
|
@ -1052,7 +1052,7 @@ QVariant QDB2Result::data(int field)
|
||||
return *d->valueCache[field];
|
||||
|
||||
|
||||
QVariant* v = 0;
|
||||
QVariant *v = nullptr;
|
||||
switch (info.metaType().id()) {
|
||||
case QVariant::LongLong:
|
||||
v = new QVariant((qint64) qGetBigIntData(d->hStmt, field, isNull));
|
||||
|
@ -72,8 +72,8 @@ class Q_EXPORT_SQLDRIVER_DB2 QDB2Driver : public QSqlDriver
|
||||
friend class QDB2ResultPrivate;
|
||||
|
||||
public:
|
||||
explicit QDB2Driver(QObject* parent = 0);
|
||||
QDB2Driver(Qt::HANDLE env, Qt::HANDLE con, QObject* parent = 0);
|
||||
explicit QDB2Driver(QObject *parent = nullptr);
|
||||
QDB2Driver(Qt::HANDLE env, Qt::HANDLE con, QObject *parent = nullptr);
|
||||
~QDB2Driver();
|
||||
bool hasFeature(DriverFeature) const override;
|
||||
void close() override;
|
||||
|
@ -487,7 +487,7 @@ QVariant QIBaseResultPrivate::fetchBlob(ISC_QUAD *bId)
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static QList<QVariant> toList(char** buf, int count, T* = 0)
|
||||
static QList<QVariant> toList(char** buf, int count, T* = nullptr)
|
||||
{
|
||||
QList<QVariant> res;
|
||||
for (int i = 0; i < count; ++i) {
|
||||
@ -624,7 +624,7 @@ QVariant QIBaseResultPrivate::fetchArray(int pos, ISC_QUAD *arr)
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static char* fillList(char *buffer, const QList<QVariant> &list, T* = 0)
|
||||
static char* fillList(char *buffer, const QList<QVariant> &list, T* = nullptr)
|
||||
{
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
T val;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user