summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/thread/qreadwritelock.cpp8
-rw-r--r--src/corelib/tools/qeasingcurve.cpp4
-rw-r--r--src/widgets/accessible/qaccessiblecolorwell.cpp5
3 files changed, 9 insertions, 8 deletions
diff --git a/src/corelib/thread/qreadwritelock.cpp b/src/corelib/thread/qreadwritelock.cpp
index 96e35dcb965..2a1af2315ca 100644
--- a/src/corelib/thread/qreadwritelock.cpp
+++ b/src/corelib/thread/qreadwritelock.cpp
@@ -234,14 +234,14 @@ QBasicReadWriteLock::contendedTryLockForRead(QDeadlineTimer timeout, void *dd)
return d->recursiveLockForRead(timeout);
auto lock = qt_unique_lock(d->mutex);
- if (d != d_ptr.loadRelaxed()) {
+ if (QReadWriteLockPrivate *dd = d_ptr.loadAcquire(); d != dd) {
// d_ptr has changed: this QReadWriteLock was unlocked before we had
// time to lock d->mutex.
// We are holding a lock to a mutex within a QReadWriteLockPrivate
// that is already released (or even is already re-used). That's ok
// because the QFreeList never frees them.
// Just unlock d->mutex (at the end of the scope) and retry.
- d = d_ptr.loadAcquire();
+ d = dd;
continue;
}
return d->lockForRead(lock, timeout);
@@ -340,11 +340,11 @@ QBasicReadWriteLock::contendedTryLockForWrite(QDeadlineTimer timeout, void *dd)
return d->recursiveLockForWrite(timeout);
auto lock = qt_unique_lock(d->mutex);
- if (d != d_ptr.loadRelaxed()) {
+ if (QReadWriteLockPrivate *dd = d_ptr.loadAcquire(); d != dd) {
// The mutex was unlocked before we had time to lock the mutex.
// We are holding to a mutex within a QReadWriteLockPrivate that is already released
// (or even is already re-used) but that's ok because the QFreeList never frees them.
- d = d_ptr.loadAcquire();
+ d = dd;
continue;
}
return d->lockForWrite(lock, timeout);
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp
index de68a0042ac..ce35e8ccffe 100644
--- a/src/corelib/tools/qeasingcurve.cpp
+++ b/src/corelib/tools/qeasingcurve.cpp
@@ -332,8 +332,6 @@ struct TCBPoint
qreal _c;
qreal _b;
- TCBPoint() {}
- TCBPoint(QPointF point, qreal t, qreal c, qreal b) : _point(point), _t(t), _c(c), _b(b) {}
bool operator==(const TCBPoint &other) const
{
@@ -1381,7 +1379,7 @@ void QEasingCurve::addTCBSegment(const QPointF &nextPoint, qreal t, qreal c, qre
if (!d_ptr->config)
d_ptr->config = curveToFunctionObject(d_ptr->type);
- d_ptr->config->_tcbPoints.append(TCBPoint(nextPoint, t, c, b));
+ d_ptr->config->_tcbPoints.append(TCBPoint{nextPoint, t, c, b});
if (nextPoint == QPointF(1.0, 1.0)) {
d_ptr->config->_bezierCurves = tcbToBezier(d_ptr->config->_tcbPoints);
diff --git a/src/widgets/accessible/qaccessiblecolorwell.cpp b/src/widgets/accessible/qaccessiblecolorwell.cpp
index ca08e511e9a..64fcd2a7fd1 100644
--- a/src/widgets/accessible/qaccessiblecolorwell.cpp
+++ b/src/widgets/accessible/qaccessiblecolorwell.cpp
@@ -3,6 +3,8 @@
#include "private/qaccessiblecolorwell_p.h"
+#include <QtCore/qcoreapplication.h>
+
QT_REQUIRE_CONFIG(accessibility);
#if QT_CONFIG(colordialog)
@@ -14,6 +16,7 @@ class QAccessibleColorWellItem : public QAccessibleInterface
{
QAccessibleColorWell *m_parent;
+ Q_DECLARE_TR_FUNCTIONS(QAccessibleColorWellItem)
public:
QAccessibleColorWellItem(QAccessibleColorWell *parent);
@@ -79,7 +82,7 @@ QString QAccessibleColorWellItem::text(QAccessible::Text t) const
if (t == QAccessible::Name) {
QRgb color = m_parent->colorWell()->rgbValues()[m_parent->indexOfChild(this)];
//: Color specified via its 3 RGB components (red, green, blue)
- return QObject::tr("RGB %1, %2, %3")
+ return tr("RGB %1, %2, %3")
.arg(QString::number(qRed(color)), QString::number(qGreen(color)),
QString::number(qBlue(color)));
}