Merge integration refs/builds/qtci/dev/1617798649
This commit is contained in:
commit
fecba62d32
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -765,6 +765,7 @@ public:
|
||||
R8,
|
||||
RG8,
|
||||
R16,
|
||||
RG16,
|
||||
RED_OR_ALPHA8,
|
||||
|
||||
RGBA16F,
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user