diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-07-03 14:54:37 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-08-27 09:37:30 +0200 |
commit | fb9703effba15e4c2a3f40d73960d78bcf6cccf7 (patch) | |
tree | 61bc3ee34a8e805ad07cdc2a59e5a9fb26277cad | |
parent | b5f040f18dd74da49900164fcaeea8d7398d32be (diff) |
Remove usages of deprecated APIs
Replaced:
QColor::dark() -> QColor::darker()
QImage::byteCount() -> QImage::sizeInBytes()
qMemCopy() -> memcpy()
Task-number: QTBUG-76491
Change-Id: I5f820454fdb494a28df3f44a37e81ccd622104bd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r-- | src/designer/src/plugins/tools/view3d/view3d.cpp | 2 | ||||
-rw-r--r-- | src/makeqpf/qpf2.cpp | 2 | ||||
-rw-r--r-- | src/makeqpf/qpf2.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/designer/src/plugins/tools/view3d/view3d.cpp b/src/designer/src/plugins/tools/view3d/view3d.cpp index 91700f650..3ae8bdf47 100644 --- a/src/designer/src/plugins/tools/view3d/view3d.cpp +++ b/src/designer/src/plugins/tools/view3d/view3d.cpp @@ -217,7 +217,7 @@ void QView3DWidget::initializeGL() glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - qglClearColor(palette().color(QPalette::Window).dark()); + qglClearColor(palette().color(QPalette::Window).darker()); glColor3f (1.0, 1.0, 1.0); glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL); diff --git a/src/makeqpf/qpf2.cpp b/src/makeqpf/qpf2.cpp index c56ec391a..41e958d82 100644 --- a/src/makeqpf/qpf2.cpp +++ b/src/makeqpf/qpf2.cpp @@ -556,7 +556,7 @@ void QPF::addGlyphs(QFontEngine *fe, const QList<CharacterRange> &ranges) ; } - memcpy(data, img.bits(), img.byteCount()); + memcpy(data, img.bits(), static_cast<size_t>(img.sizeInBytes())); } } } diff --git a/src/makeqpf/qpf2.h b/src/makeqpf/qpf2.h index 6dbddcb0b..db02493ea 100644 --- a/src/makeqpf/qpf2.h +++ b/src/makeqpf/qpf2.h @@ -84,7 +84,7 @@ public: void addInt8(qint8 value) { *addBytes(sizeof(value)) = quint8(value); } void addByteArray(const QByteArray &string) { uchar *data = addBytes(string.length()); - qMemCopy(data, string.constData(), string.length()); + memcpy(data, string.constData(), static_cast<size_t>(string.length())); } void align4() { while (qpf.size() & 3) { addUInt8('\0'); } } |