summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.cmake3
-rw-r--r--mkspecs/features/default_pre.prf15
-rw-r--r--src/corelib/animation/qpauseanimation.cpp9
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.cpp8
-rw-r--r--src/corelib/kernel/qtimer.cpp8
-rw-r--r--src/corelib/thread/qsemaphore.cpp19
-rw-r--r--src/corelib/time/qdatetimeparser.cpp18
-rw-r--r--src/gui/image/qmovie.cpp8
-rw-r--r--src/gui/platform/unix/dbustray/qdbustrayicon.cpp8
-rw-r--r--src/gui/rhi/qrhi.cpp5
-rw-r--r--src/gui/rhi/qrhi_p.h1
-rw-r--r--src/gui/rhi/qrhid3d11.cpp4
-rw-r--r--src/gui/rhi/qrhigles2.cpp13
-rw-r--r--src/gui/rhi/qrhimetal.mm2
-rw-r--r--src/gui/rhi/qrhivulkan.cpp4
-rw-r--r--tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp17
16 files changed, 112 insertions, 30 deletions
diff --git a/configure.cmake b/configure.cmake
index 88e0c360dd..840d5f586c 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -360,6 +360,7 @@ qt_feature("gc_binaries" PRIVATE
CONDITION NOT QT_FEATURE_shared
)
qt_feature("use_bfd_linker"
+ PRIVATE # special case
LABEL "bfd"
AUTODETECT false
CONDITION NOT WIN32 AND NOT INTEGRITY AND NOT WASM AND TEST_use_bfd_linker
@@ -372,6 +373,7 @@ qt_feature("use_gold_linker_alias"
CONDITION NOT WIN32 AND NOT INTEGRITY AND NOT WASM AND TEST_use_gold_linker
)
qt_feature("use_gold_linker"
+ PRIVATE # special case
LABEL "gold"
AUTODETECT false
CONDITION NOT WIN32 AND NOT INTEGRITY AND NOT WASM AND NOT rtems AND TEST_use_gold_linker
@@ -380,6 +382,7 @@ qt_feature("use_gold_linker"
)
qt_feature_config("use_gold_linker" QMAKE_PRIVATE_CONFIG)
qt_feature("use_lld_linker"
+ PRIVATE # special case
LABEL "lld"
AUTODETECT false
CONDITION NOT WIN32 AND NOT INTEGRITY AND NOT WASM AND TEST_use_lld_linker
diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf
index 1c24bf071a..bad84b24f1 100644
--- a/mkspecs/features/default_pre.prf
+++ b/mkspecs/features/default_pre.prf
@@ -11,19 +11,4 @@ CONFIG = \
testcase_targets import_plugins import_qpa_plugin \
$$CONFIG
-!build_pass:!isEmpty(QT_LICHECK):!QTDIR_build {
- #
- # call license checker (but cache result for one day)
- #
- today = $$section(_DATE_, " ", 0, 2)
- !isEqual(QMAKE_LICHECK_TIMESTAMP, $$today) {
- !system("$$system_quote($$system_path($$[QT_HOST_BINS/src]/$$QT_LICHECK)) check" \
- "$$QT_RELEASE_DATE $$[QMAKE_SPEC] $$[QMAKE_XSPEC]"): \
- error("License check failed! Giving up ...")
-
- cache(QMAKE_LICHECK_TIMESTAMP, set stash, today)
- }
- unset(today)
-}
-
load(toolchain)
diff --git a/src/corelib/animation/qpauseanimation.cpp b/src/corelib/animation/qpauseanimation.cpp
index c2599da692..04d8cca273 100644
--- a/src/corelib/animation/qpauseanimation.cpp
+++ b/src/corelib/animation/qpauseanimation.cpp
@@ -129,8 +129,13 @@ void QPauseAnimation::setDuration(int msecs)
return;
}
Q_D(QPauseAnimation);
- d->duration.setValue(msecs);
- d->duration.notify();
+
+ if (msecs != d->duration) {
+ d->duration = msecs;
+ d->duration.notify();
+ } else {
+ d->duration.removeBindingUnlessInWrapper();
+ }
}
QBindable<int> QPauseAnimation::bindableDuration()
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
index 9fb66b023a..a5bb56245a 100644
--- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
@@ -3001,8 +3001,9 @@ bool QSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &
if (d->filter_data.pattern().isEmpty())
return true;
+
+ int column_count = d->model->columnCount(source_parent);
if (d->filter_column == -1) {
- int column_count = d->model->columnCount(source_parent);
for (int column = 0; column < column_count; ++column) {
QModelIndex source_index = d->model->index(source_row, column, source_parent);
QString key = d->model->data(source_index, d->filter_role).toString();
@@ -3011,9 +3012,10 @@ bool QSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &
}
return false;
}
- QModelIndex source_index = d->model->index(source_row, d->filter_column, source_parent);
- if (!source_index.isValid()) // the column may not exist
+
+ if (d->filter_column >= column_count) // the column may not exist
return true;
+ QModelIndex source_index = d->model->index(source_row, d->filter_column, source_parent);
QString key = d->model->data(source_index, d->filter_role).toString();
return d->filter_data.match(key).hasMatch();
}
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index 0946e1af48..333e6c24ba 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -257,9 +257,11 @@ void QTimer::start()
void QTimer::start(int msec)
{
Q_D(QTimer);
+ const bool intervalChanged = msec != d->inter;
d->inter.setValue(msec);
start();
- d->inter.notify();
+ if (intervalChanged)
+ d->inter.notify();
}
@@ -753,6 +755,7 @@ QBindable<bool> QTimer::bindableSingleShot()
void QTimer::setInterval(int msec)
{
Q_D(QTimer);
+ const bool intervalChanged = msec != d->inter;
d->inter.setValue(msec);
if (d->id != INV_TIMER) { // create new timer
QObject::killTimer(d->id); // restart timer
@@ -761,7 +764,8 @@ void QTimer::setInterval(int msec)
// as timer state actually does not change
}
- d->inter.markDirty();
+ if (intervalChanged)
+ d->inter.markDirty();
}
int QTimer::interval() const
diff --git a/src/corelib/thread/qsemaphore.cpp b/src/corelib/thread/qsemaphore.cpp
index 5111d80ac6..45983d47ab 100644
--- a/src/corelib/thread/qsemaphore.cpp
+++ b/src/corelib/thread/qsemaphore.cpp
@@ -200,14 +200,21 @@ futexSemaphoreTryAcquire_loop(QBasicAtomicInteger<quintptr> &u, quintptr curValu
// indicate we're waiting
start_wait:
- auto ptr = futexLow32(&u);
+ auto ptr = [&u]() {
+ if constexpr (futexHasWaiterCount)
+ return futexLow32(&u);
+ else
+ return &u;
+ }();
if (n > 1 || !futexHasWaiterCount) {
u.fetchAndOrRelaxed(futexNeedsWakeAllBit);
curValue |= futexNeedsWakeAllBit;
- if (n > 1 && futexHasWaiterCount) {
- ptr = futexHigh32(&u);
- //curValue >>= 32; // but this is UB in 32-bit, so roundabout:
- curValue = quint64(curValue) >> 32;
+ if constexpr (futexHasWaiterCount) {
+ if (n > 1) {
+ ptr = futexHigh32(&u);
+ // curValue >>= 32; // but this is UB in 32-bit, so roundabout:
+ curValue = quint64(curValue) >> 32;
+ }
}
}
@@ -397,7 +404,7 @@ void QSemaphore::release(int n)
futexWakeOp(*futexLow32(&u), n, INT_MAX, *futexHigh32(&u), FUTEX_OP(op, oparg, cmp, cmparg));
}
#else
- // Unset the bit and wake everyone. There are two possibibilies
+ // Unset the bit and wake everyone. There are two possibilities
// under which a thread can set the bit between the AND and the
// futexWake:
// 1) it did see the new counter value, but it wasn't enough for
diff --git a/src/corelib/time/qdatetimeparser.cpp b/src/corelib/time/qdatetimeparser.cpp
index d85a904450..2a16adedbf 100644
--- a/src/corelib/time/qdatetimeparser.cpp
+++ b/src/corelib/time/qdatetimeparser.cpp
@@ -1740,6 +1740,24 @@ QDateTimeParser::findTimeZoneName(QStringView str, const QDateTime &when) const
int index = std::distance(str.cbegin(),
std::find_if(str.cbegin(), str.cend(), invalidZoneNameCharacter));
+ // Limit name fragments (between slashes) to 20 characters.
+ // (Valid time-zone IDs are allowed up to 14 and Android has quirks up to 17.)
+ // Limit number of fragments to six; no known zone name has more than four.
+ int lastSlash = -1;
+ int count = 0;
+ Q_ASSERT(index <= str.size());
+ while (lastSlash < index) {
+ int slash = str.indexOf(QLatin1Char('/'), lastSlash + 1);
+ if (slash < 0)
+ slash = index; // i.e. the end of the candidate text
+ else if (++count > 5)
+ index = slash; // Truncate
+ if (slash - lastSlash > 20)
+ index = lastSlash + 20; // Truncate
+ // If any of those conditions was met, index <= slash, so this exits the loop:
+ lastSlash = slash;
+ }
+
for (; index > systemLength; --index) { // Find longest match
str.truncate(index);
QTimeZone zone(str.toLatin1());
diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp
index a293d358cf..b00d3ff25c 100644
--- a/src/gui/image/qmovie.cpp
+++ b/src/gui/image/qmovie.cpp
@@ -929,8 +929,12 @@ void QMovie::setSpeed(int percentSpeed)
Q_D(QMovie);
if (!d->speed && d->movieState == Running)
d->nextImageTimer.start(nextFrameDelay());
- d->speed.setValue(percentSpeed);
- d->speed.notify();
+ if (percentSpeed != d->speed) {
+ d->speed = percentSpeed;
+ d->speed.notify();
+ } else {
+ d->speed.removeBindingUnlessInWrapper();
+ }
}
int QMovie::speed() const
diff --git a/src/gui/platform/unix/dbustray/qdbustrayicon.cpp b/src/gui/platform/unix/dbustray/qdbustrayicon.cpp
index 1194e4ac66..892a99d726 100644
--- a/src/gui/platform/unix/dbustray/qdbustrayicon.cpp
+++ b/src/gui/platform/unix/dbustray/qdbustrayicon.cpp
@@ -208,6 +208,14 @@ QTemporaryFile *QDBusTrayIcon::tempIcon(const QIcon &icon)
uint pid = session.interface()->servicePid(KDEWatcherService).value();
QString processName = QLockFilePrivate::processNameByPid(pid);
necessary = processName.endsWith(QLatin1String("indicator-application-service"));
+ if (!necessary) {
+ necessary = session.interface()->isServiceRegistered(
+ QStringLiteral("com.canonical.indicator.application"));
+ }
+ if (!necessary) {
+ necessary = session.interface()->isServiceRegistered(
+ QStringLiteral("org.ayatana.indicator.application"));
+ }
if (!necessary && QGuiApplication::desktopSettingsAware()) {
// Accessing to process name might be not allowed if the application
// is confined, thus we can just rely on the current desktop in use
diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp
index fea688e9cd..8c24f11079 100644
--- a/src/gui/rhi/qrhi.cpp
+++ b/src/gui/rhi/qrhi.cpp
@@ -2378,6 +2378,8 @@ QRhiResource::Type QRhiRenderBuffer::resourceType() const
\value R16 One component, unsigned normalized 16 bit.
+ \value RG16 Two component, unsigned normalized 16 bit.
+
\value RED_OR_ALPHA8 Either same as R8, or is a similar format with the component swizzled to alpha,
depending on \l{QRhi::RedOrAlpha8IsRed}{RedOrAlpha8IsRed}.
@@ -4533,6 +4535,9 @@ void QRhiImplementation::textureFormatInfo(QRhiTexture::Format format, const QSi
case QRhiTexture::R16:
bpc = 2;
break;
+ case QRhiTexture::RG16:
+ bpc = 4;
+ break;
case QRhiTexture::RED_OR_ALPHA8:
bpc = 1;
break;
diff --git a/src/gui/rhi/qrhi_p.h b/src/gui/rhi/qrhi_p.h
index a4d65a661a..b43d490ea9 100644
--- a/src/gui/rhi/qrhi_p.h
+++ b/src/gui/rhi/qrhi_p.h
@@ -765,6 +765,7 @@ public:
R8,
RG8,
R16,
+ RG16,
RED_OR_ALPHA8,
RGBA16F,
diff --git a/src/gui/rhi/qrhid3d11.cpp b/src/gui/rhi/qrhid3d11.cpp
index addb058d4d..46851ad612 100644
--- a/src/gui/rhi/qrhid3d11.cpp
+++ b/src/gui/rhi/qrhid3d11.cpp
@@ -1214,6 +1214,8 @@ static inline DXGI_FORMAT toD3DTextureFormat(QRhiTexture::Format format, QRhiTex
return DXGI_FORMAT_R8G8_UNORM;
case QRhiTexture::R16:
return DXGI_FORMAT_R16_UNORM;
+ case QRhiTexture::RG16:
+ return DXGI_FORMAT_R16G16_UNORM;
case QRhiTexture::RED_OR_ALPHA8:
return DXGI_FORMAT_R8_UNORM;
@@ -1300,6 +1302,8 @@ static inline QRhiTexture::Format colorTextureFormatFromDxgiFormat(DXGI_FORMAT f
return QRhiTexture::RG8;
case DXGI_FORMAT_R16_UNORM:
return QRhiTexture::R16;
+ case DXGI_FORMAT_R16G16_UNORM:
+ return QRhiTexture::RG16;
default: // this cannot assert, must warn and return unknown
qWarning("DXGI_FORMAT %d is not a recognized uncompressed color format", format);
break;
diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp
index c2035869c3..8eaf02f817 100644
--- a/src/gui/rhi/qrhigles2.cpp
+++ b/src/gui/rhi/qrhigles2.cpp
@@ -160,6 +160,10 @@ QT_BEGIN_NAMESPACE
#define GL_R16 0x822A
#endif
+#ifndef GL_RG16
+#define GL_RG16 0x822C
+#endif
+
#ifndef GL_RED
#define GL_RED 0x1903
#endif
@@ -822,6 +826,12 @@ static inline void toGlTextureFormat(QRhiTexture::Format format, const QRhiGles2
*glformat = GL_RED;
*gltype = GL_UNSIGNED_SHORT;
break;
+ case QRhiTexture::RG16:
+ *glintformat = GL_RG16;
+ *glsizedintformat = *glintformat;
+ *glformat = GL_RG;
+ *gltype = GL_UNSIGNED_SHORT;
+ break;
case QRhiTexture::R8:
*glintformat = GL_R8;
*glsizedintformat = *glintformat;
@@ -926,6 +936,9 @@ bool QRhiGles2::isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture
case QRhiTexture::R16:
return caps.r16Format;
+ case QRhiTexture::RG16:
+ return caps.r16Format;
+
case QRhiTexture::RGBA16F:
case QRhiTexture::RGBA32F:
return caps.floatFormats;
diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm
index ab255f74df..850b3a91aa 100644
--- a/src/gui/rhi/qrhimetal.mm
+++ b/src/gui/rhi/qrhimetal.mm
@@ -2348,6 +2348,8 @@ static inline MTLPixelFormat toMetalTextureFormat(QRhiTexture::Format format, QR
#endif
case QRhiTexture::R16:
return MTLPixelFormatR16Unorm;
+ case QRhiTexture::RG16:
+ return MTLPixelFormatRG16Unorm;
case QRhiTexture::RED_OR_ALPHA8:
return MTLPixelFormatR8Unorm;
diff --git a/src/gui/rhi/qrhivulkan.cpp b/src/gui/rhi/qrhivulkan.cpp
index 26d6de498b..e7e31b1b2d 100644
--- a/src/gui/rhi/qrhivulkan.cpp
+++ b/src/gui/rhi/qrhivulkan.cpp
@@ -886,6 +886,8 @@ static inline VkFormat toVkTextureFormat(QRhiTexture::Format format, QRhiTexture
return srgb ? VK_FORMAT_R8G8_SRGB : VK_FORMAT_R8G8_UNORM;
case QRhiTexture::R16:
return VK_FORMAT_R16_UNORM;
+ case QRhiTexture::RG16:
+ return VK_FORMAT_R16G16_UNORM;
case QRhiTexture::RED_OR_ALPHA8:
return VK_FORMAT_R8_UNORM;
@@ -993,6 +995,8 @@ static inline QRhiTexture::Format colorTextureFormatFromVkFormat(VkFormat format
return QRhiTexture::RG8;
case VK_FORMAT_R16_UNORM:
return QRhiTexture::R16;
+ case VK_FORMAT_R16G16_UNORM:
+ return QRhiTexture::RG16;
default: // this cannot assert, must warn and return unknown
qWarning("VkFormat %d is not a recognized uncompressed color format", format);
break;
diff --git a/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp b/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp
index e1ea7a4552..90972caa57 100644
--- a/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qconcatenatetablesproxymodel/tst_qconcatenatetablesproxymodel.cpp
@@ -117,6 +117,7 @@ private Q_SLOTS:
void shouldPropagateDropAfterLastRow_data();
void shouldPropagateDropAfterLastRow();
void qtbug91788();
+ void qtbug91878();
private:
QStandardItemModel mod;
@@ -843,6 +844,22 @@ void tst_QConcatenateTablesProxyModel::qtbug91788()
QCOMPARE(proxyConcat.columnCount(), 0);
}
+void tst_QConcatenateTablesProxyModel::qtbug91878()
+{
+ QStandardItemModel m;
+ m.setRowCount(4);
+ m.setColumnCount(4);
+
+ QConcatenateTablesProxyModel pm;
+ QSortFilterProxyModel proxyFilter;
+ proxyFilter.setSourceModel(&pm);
+ proxyFilter.setFilterFixedString("something");
+ pm.addSourceModel(&m); // This should not assert
+
+ QCOMPARE(pm.columnCount(), 4);
+ QCOMPARE(pm.rowCount(), 4);
+}
+
QTEST_GUILESS_MAIN(tst_QConcatenateTablesProxyModel)
#include "tst_qconcatenatetablesproxymodel.moc"