Add ; to Q_UNUSED

This is required to remove the ; from the macro with Qt 6.

Task-number: QTBUG-82978
Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Lars Schmertmann 2020-06-27 14:18:09 +02:00
parent d9cc149995
commit 6ce2f3f26b
187 changed files with 470 additions and 470 deletions

View File

@ -70,7 +70,7 @@ void PrintView::print(QPrinter *printer)
resize(printer->width(), printer->height());
render(printer);
#else
Q_UNUSED(printer)
Q_UNUSED(printer);
#endif
}

View File

@ -570,7 +570,7 @@ void TextEdit::printPreview(QPrinter *printer)
#if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printer)
textEdit->print(printer);
#else
Q_UNUSED(printer)
Q_UNUSED(printer);
#endif
}

View File

@ -130,7 +130,7 @@ TestWidget::TestWidget(QWidget *parent)
//! [6]
void TestWidget::resizeEvent(QResizeEvent *event)
{
Q_UNUSED(event)
Q_UNUSED(event);
int maxWidth = widthSlider->width();
widthSlider->setMaximum(maxWidth);

View File

@ -75,8 +75,8 @@ QSize QEglFS8726MHooks::screenSize() const
EGLNativeWindowType QEglFS8726MHooks::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format)
{
Q_UNUSED(window)
Q_UNUSED(format)
Q_UNUSED(window);
Q_UNUSED(format);
fbdev_window *window = new fbdev_window;
window->width = size.width();

View File

@ -142,12 +142,12 @@ bool QMakeVfs::writeFile(int id, QIODevice::OpenMode mode, VfsFlags flags,
QMutexLocker locker(&m_mutex);
# endif
QString *cont = &m_files[id];
Q_UNUSED(flags)
Q_UNUSED(flags);
if (mode & QIODevice::Append)
*cont += contents;
else
*cont = contents;
Q_UNUSED(errStr)
Q_UNUSED(errStr);
return true;
#else
QFileInfo qfi(fileNameForId(id));
@ -243,7 +243,7 @@ bool QMakeVfs::exists(const QString &fn, VfsFlags flags)
if (it != m_files.constEnd())
return it->constData() != m_magicMissing.constData();
#else
Q_UNUSED(flags)
Q_UNUSED(flags);
#endif
bool ex = IoUtils::fileType(fn) == IoUtils::FileIsRegular;
#ifndef PROEVALUATOR_FULL

View File

@ -147,7 +147,7 @@ QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey, unsigned l
RegCloseKey(handle);
#else
Q_UNUSED(parentHandle);
Q_UNUSED(rSubkey)
Q_UNUSED(rSubkey);
Q_UNUSED(options);
#endif

View File

@ -613,7 +613,7 @@ void EvalHandler::message(int type, const QString &msg, const QString &fileName,
void EvalHandler::fileMessage(int type, const QString &msg)
{
Q_UNUSED(type)
Q_UNUSED(type);
fprintf(stderr, "%s\n", qPrintable(msg));
}

View File

@ -1076,7 +1076,7 @@ QFileInfo QAbstractFileEngineIterator::currentFileInfo() const
*/
QVariant QAbstractFileEngineIterator::entryInfo(EntryInfoType type) const
{
Q_UNUSED(type)
Q_UNUSED(type);
return QVariant();
}

View File

@ -1100,7 +1100,7 @@ QT_WARNING_DISABLE_DEPRECATED
QResource::addSearchPath(path);
QT_WARNING_POP
#else
Q_UNUSED(path)
Q_UNUSED(path);
#endif
}
#endif

View File

@ -615,7 +615,7 @@ void QFileSystemMetaData::fillFromDirEnt(const QT_DIRENT &entry)
clear();
}
#else
Q_UNUSED(entry)
Q_UNUSED(entry);
#endif
}

View File

@ -1321,9 +1321,9 @@ QFileSystemEntry QFileSystemEngine::currentPath()
bool QFileSystemEngine::createLink(const QFileSystemEntry &source, const QFileSystemEntry &target, QSystemError &error)
{
Q_ASSERT(false);
Q_UNUSED(source)
Q_UNUSED(target)
Q_UNUSED(error)
Q_UNUSED(source);
Q_UNUSED(target);
Q_UNUSED(error);
return false; // TODO implement; - code needs to be moved from qfsfileengine_win.cpp
}

View File

@ -66,9 +66,9 @@ QFileSystemIterator::QFileSystemIterator(const QFileSystemEntry &entry, QDir::Fi
, dirEntry(nullptr)
, lastError(0)
{
Q_UNUSED(filters)
Q_UNUSED(nameFilters)
Q_UNUSED(flags)
Q_UNUSED(filters);
Q_UNUSED(nameFilters);
Q_UNUSED(flags);
if ((dir = QT_OPENDIR(nativePath.constData())) == nullptr) {
lastError = errno;

View File

@ -57,8 +57,8 @@ QFileSystemIterator::QFileSystemIterator(const QFileSystemEntry &entry, QDir::Fi
, uncShareIndex(0)
, onlyDirs(false)
{
Q_UNUSED(nameFilters)
Q_UNUSED(flags)
Q_UNUSED(nameFilters);
Q_UNUSED(flags);
if (nativePath.endsWith(QLatin1String(".lnk"))) {
QFileSystemMetaData metaData;
QFileSystemEntry link = QFileSystemEngine::getLinkTarget(entry, metaData);

View File

@ -102,7 +102,7 @@ static void checkWarnMessage(const QIODevice *device, const char *function, cons
d << ", \"" << QDir::toNativeSeparators(f->fileName()) << '"';
d << ')';
#else
Q_UNUSED(device)
Q_UNUSED(device);
#endif // !QT_NO_QOBJECT
d << ": " << what;
#else

View File

@ -126,7 +126,7 @@ QSettingsPrivate *QSettingsPrivate::create(QSettings::Format format,
const QString &organization,
const QString &application)
{
Q_UNUSED(format)
Q_UNUSED(format);
if (organization == QLatin1String("Qt"))
{
QString organizationDomain = QCoreApplication::organizationDomain();

View File

@ -84,7 +84,7 @@ static void appendOrganizationAndApp(QString &path) // Courtesy qstandardpaths_u
if (!appName.isEmpty())
path += QLatin1Char('/') + appName;
#else // !QT_BOOTSTRAPPED
Q_UNUSED(path)
Q_UNUSED(path);
#endif
}

View File

@ -242,7 +242,7 @@ static bool createFileFromTemplate(NativeFileHandle &file, QTemporaryFileName &t
return false;
}
#else // POSIX
Q_UNUSED(flags)
Q_UNUSED(flags);
file = QT_OPEN(path.constData(),
QT_OPEN_CREAT | QT_OPEN_EXCL | QT_OPEN_RDWR | QT_OPEN_LARGEFILE,
static_cast<mode_t>(mode));

View File

@ -1942,9 +1942,9 @@ bool QAbstractItemModel::canDropMimeData(const QMimeData *data, Qt::DropAction a
int row, int column,
const QModelIndex &parent) const
{
Q_UNUSED(row)
Q_UNUSED(column)
Q_UNUSED(parent)
Q_UNUSED(row);
Q_UNUSED(column);
Q_UNUSED(parent);
if (!(action & supportedDropActions()))
return false;

View File

@ -470,9 +470,9 @@ void QIdentityProxyModelPrivate::_q_sourceColumnsInserted(const QModelIndex &par
{
Q_ASSERT(parent.isValid() ? parent.model() == model : true);
Q_Q(QIdentityProxyModel);
Q_UNUSED(parent)
Q_UNUSED(start)
Q_UNUSED(end)
Q_UNUSED(parent);
Q_UNUSED(start);
Q_UNUSED(end);
q->endInsertColumns();
}
@ -481,11 +481,11 @@ void QIdentityProxyModelPrivate::_q_sourceColumnsMoved(const QModelIndex &source
Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true);
Q_ASSERT(destParent.isValid() ? destParent.model() == model : true);
Q_Q(QIdentityProxyModel);
Q_UNUSED(sourceParent)
Q_UNUSED(sourceStart)
Q_UNUSED(sourceEnd)
Q_UNUSED(destParent)
Q_UNUSED(dest)
Q_UNUSED(sourceParent);
Q_UNUSED(sourceStart);
Q_UNUSED(sourceEnd);
Q_UNUSED(destParent);
Q_UNUSED(dest);
q->endMoveColumns();
}
@ -493,9 +493,9 @@ void QIdentityProxyModelPrivate::_q_sourceColumnsRemoved(const QModelIndex &pare
{
Q_ASSERT(parent.isValid() ? parent.model() == model : true);
Q_Q(QIdentityProxyModel);
Q_UNUSED(parent)
Q_UNUSED(start)
Q_UNUSED(end)
Q_UNUSED(parent);
Q_UNUSED(start);
Q_UNUSED(end);
q->endRemoveColumns();
}
@ -605,9 +605,9 @@ void QIdentityProxyModelPrivate::_q_sourceRowsInserted(const QModelIndex &parent
{
Q_ASSERT(parent.isValid() ? parent.model() == model : true);
Q_Q(QIdentityProxyModel);
Q_UNUSED(parent)
Q_UNUSED(start)
Q_UNUSED(end)
Q_UNUSED(parent);
Q_UNUSED(start);
Q_UNUSED(end);
q->endInsertRows();
}
@ -616,11 +616,11 @@ void QIdentityProxyModelPrivate::_q_sourceRowsMoved(const QModelIndex &sourcePar
Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true);
Q_ASSERT(destParent.isValid() ? destParent.model() == model : true);
Q_Q(QIdentityProxyModel);
Q_UNUSED(sourceParent)
Q_UNUSED(sourceStart)
Q_UNUSED(sourceEnd)
Q_UNUSED(destParent)
Q_UNUSED(dest)
Q_UNUSED(sourceParent);
Q_UNUSED(sourceStart);
Q_UNUSED(sourceEnd);
Q_UNUSED(destParent);
Q_UNUSED(dest);
q->endMoveRows();
}
@ -628,9 +628,9 @@ void QIdentityProxyModelPrivate::_q_sourceRowsRemoved(const QModelIndex &parent,
{
Q_ASSERT(parent.isValid() ? parent.model() == model : true);
Q_Q(QIdentityProxyModel);
Q_UNUSED(parent)
Q_UNUSED(start)
Q_UNUSED(end)
Q_UNUSED(parent);
Q_UNUSED(start);
Q_UNUSED(end);
q->endRemoveRows();
}

View File

@ -440,8 +440,8 @@ bool QTransposeProxyModel::moveColumns(const QModelIndex &sourceParent, int sour
*/
void QTransposeProxyModel::sort(int column, Qt::SortOrder order)
{
Q_UNUSED(column)
Q_UNUSED(order)
Q_UNUSED(column);
Q_UNUSED(order);
return;
}

View File

@ -2237,8 +2237,8 @@ bool QCoreApplicationPrivate::isTranslatorInstalled(QTranslator *translator)
QString QCoreApplication::translate(const char *context, const char *sourceText,
const char *disambiguation, int n)
{
Q_UNUSED(context)
Q_UNUSED(disambiguation)
Q_UNUSED(context);
Q_UNUSED(disambiguation);
QString ret = QString::fromUtf8(sourceText);
if (n >= 0)
ret.replace(QLatin1String("%n"), QString::number(n));

View File

@ -46,7 +46,7 @@ static const char logTag[] = "QtCore";
Q_CORE_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved)
{
Q_UNUSED(reserved)
Q_UNUSED(reserved);
static bool initialized = false;
if (initialized)

View File

@ -747,7 +747,7 @@ template <typename T, bool Accepted = true>
struct QMetaTypeFunctionHelper {
static void Destruct(void *t)
{
Q_UNUSED(t) // Silence MSVC that warns for POD types.
Q_UNUSED(t); // Silence MSVC that warns for POD types.
static_cast<T*>(t)->~T();
}

View File

@ -208,7 +208,7 @@ namespace Qt {
return QPropertyBinding<std::invoke_result_t<Functor>>(std::forward<Functor>(f), location);
}
// Work around bogus warning
Q_UNUSED(QtPrivate::is_variant_v<bool>)
Q_UNUSED(QtPrivate::is_variant_v<bool>);
}
}

View File

@ -116,7 +116,7 @@ timespec qAbsTimespec(const timespec &t)
bool QTimerInfoList::timeChanged(timespec *delta)
{
#ifdef Q_OS_NACL
Q_UNUSED(delta)
Q_UNUSED(delta);
return false; // Calling "times" crashes.
#endif
struct tms unused;

View File

@ -1109,7 +1109,7 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
*/
void QJsonArray::detach(uint reserve)
{
Q_UNUSED(reserve)
Q_UNUSED(reserve);
Q_ASSERT(!reserve);
detach2(0);
}

View File

@ -1421,7 +1421,7 @@ QJsonObject::const_iterator QJsonObject::constFindImpl(T key) const
*/
void QJsonObject::detach(uint reserve)
{
Q_UNUSED(reserve)
Q_UNUSED(reserve);
Q_ASSERT(!reserve);
detach2(reserve);
}

View File

@ -676,7 +676,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
switch (res) {
case Z_OK: {
Q_ASSERT(len <= alloc);
Q_UNUSED(alloc)
Q_UNUSED(alloc);
d.data()[len] = '\0';
d.size = len;
return QByteArray(d);

View File

@ -775,7 +775,7 @@ void QThread::setTerminationEnabled(bool enabled)
Q_ASSERT_X(thr != nullptr, "QThread::setTerminationEnabled()",
"Current thread was not started with QThread.");
Q_UNUSED(thr)
Q_UNUSED(thr);
#if defined(Q_OS_ANDROID)
Q_UNUSED(enabled);
#else

View File

@ -229,7 +229,7 @@ DWORD WINAPI qt_adopted_thread_watcher_function(LPVOID)
QThread *thread = data->thread;
Q_ASSERT(thread);
auto thread_p = static_cast<QThreadPrivate *>(QObjectPrivate::get(thread));
Q_UNUSED(thread_p)
Q_UNUSED(thread_p);
Q_ASSERT(!thread_p->finished);
QThreadPrivate::finish(thread);
}

View File

@ -198,15 +198,15 @@ QString QTimeZonePrivate::displayName(QTimeZone::TimeType timeType,
QTimeZone::NameType nameType,
const QLocale &locale) const
{
Q_UNUSED(timeType)
Q_UNUSED(nameType)
Q_UNUSED(locale)
Q_UNUSED(timeType);
Q_UNUSED(nameType);
Q_UNUSED(locale);
return QString();
}
QString QTimeZonePrivate::abbreviation(qint64 atMSecsSinceEpoch) const
{
Q_UNUSED(atMSecsSinceEpoch)
Q_UNUSED(atMSecsSinceEpoch);
return QString();
}
@ -217,13 +217,13 @@ int QTimeZonePrivate::offsetFromUtc(qint64 atMSecsSinceEpoch) const
int QTimeZonePrivate::standardTimeOffset(qint64 atMSecsSinceEpoch) const
{
Q_UNUSED(atMSecsSinceEpoch)
Q_UNUSED(atMSecsSinceEpoch);
return invalidSeconds();
}
int QTimeZonePrivate::daylightTimeOffset(qint64 atMSecsSinceEpoch) const
{
Q_UNUSED(atMSecsSinceEpoch)
Q_UNUSED(atMSecsSinceEpoch);
return invalidSeconds();
}
@ -234,13 +234,13 @@ bool QTimeZonePrivate::hasDaylightTime() const
bool QTimeZonePrivate::isDaylightTime(qint64 atMSecsSinceEpoch) const
{
Q_UNUSED(atMSecsSinceEpoch)
Q_UNUSED(atMSecsSinceEpoch);
return false;
}
QTimeZonePrivate::Data QTimeZonePrivate::data(qint64 forMSecsSinceEpoch) const
{
Q_UNUSED(forMSecsSinceEpoch)
Q_UNUSED(forMSecsSinceEpoch);
return invalidData();
}
@ -454,13 +454,13 @@ bool QTimeZonePrivate::hasTransitions() const
QTimeZonePrivate::Data QTimeZonePrivate::nextTransition(qint64 afterMSecsSinceEpoch) const
{
Q_UNUSED(afterMSecsSinceEpoch)
Q_UNUSED(afterMSecsSinceEpoch);
return invalidData();
}
QTimeZonePrivate::Data QTimeZonePrivate::previousTransition(qint64 beforeMSecsSinceEpoch) const
{
Q_UNUSED(beforeMSecsSinceEpoch)
Q_UNUSED(beforeMSecsSinceEpoch);
return invalidData();
}
@ -877,8 +877,8 @@ QString QUtcTimeZonePrivate::displayName(QTimeZone::TimeType timeType,
QTimeZone::NameType nameType,
const QLocale &locale) const
{
Q_UNUSED(timeType)
Q_UNUSED(locale)
Q_UNUSED(timeType);
Q_UNUSED(locale);
if (nameType == QTimeZone::ShortName)
return m_abbreviation;
else if (nameType == QTimeZone::OffsetName)
@ -888,19 +888,19 @@ QString QUtcTimeZonePrivate::displayName(QTimeZone::TimeType timeType,
QString QUtcTimeZonePrivate::abbreviation(qint64 atMSecsSinceEpoch) const
{
Q_UNUSED(atMSecsSinceEpoch)
Q_UNUSED(atMSecsSinceEpoch);
return m_abbreviation;
}
qint32 QUtcTimeZonePrivate::standardTimeOffset(qint64 atMSecsSinceEpoch) const
{
Q_UNUSED(atMSecsSinceEpoch)
Q_UNUSED(atMSecsSinceEpoch);
return m_offsetFromUtc;
}
qint32 QUtcTimeZonePrivate::daylightTimeOffset(qint64 atMSecsSinceEpoch) const
{
Q_UNUSED(atMSecsSinceEpoch)
Q_UNUSED(atMSecsSinceEpoch);
return 0;
}

View File

@ -440,7 +440,7 @@ QTimeZonePrivate::Data QIcuTimeZonePrivate::nextTransition(qint64 afterMSecsSinc
#if U_ICU_VERSION_MAJOR_NUM == 50
return ucalTimeZoneTransition(m_ucal, UCAL_TZ_TRANSITION_NEXT, afterMSecsSinceEpoch);
#else
Q_UNUSED(afterMSecsSinceEpoch)
Q_UNUSED(afterMSecsSinceEpoch);
return invalidData();
#endif // U_ICU_VERSION_MAJOR_NUM == 50
}
@ -452,7 +452,7 @@ QTimeZonePrivate::Data QIcuTimeZonePrivate::previousTransition(qint64 beforeMSec
#if U_ICU_VERSION_MAJOR_NUM == 50
return ucalTimeZoneTransition(m_ucal, UCAL_TZ_TRANSITION_PREVIOUS, beforeMSecsSinceEpoch);
#else
Q_UNUSED(beforeMSecsSinceEpoch)
Q_UNUSED(beforeMSecsSinceEpoch);
return invalidData();
#endif // U_ICU_VERSION_MAJOR_NUM == 50
}

View File

@ -888,8 +888,8 @@ QString QTzTimeZonePrivate::displayName(qint64 atMSecsSinceEpoch,
if (m_icu->isValid())
return m_icu->displayName(atMSecsSinceEpoch, nameType, locale);
#else
Q_UNUSED(nameType)
Q_UNUSED(locale)
Q_UNUSED(nameType);
Q_UNUSED(locale);
#endif
return abbreviation(atMSecsSinceEpoch);
}
@ -906,9 +906,9 @@ QString QTzTimeZonePrivate::displayName(QTimeZone::TimeType timeType,
if (m_icu->isValid())
return m_icu->displayName(timeType, nameType, locale);
#else
Q_UNUSED(timeType)
Q_UNUSED(nameType)
Q_UNUSED(locale)
Q_UNUSED(timeType);
Q_UNUSED(nameType);
Q_UNUSED(locale);
#endif
// If no ICU available then have to use abbreviations instead
// Abbreviations don't have GenericTime

View File

@ -1037,7 +1037,7 @@ QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p)
static const bool threads = q_dbus_threads_init_default();
if (::isDebugging == -1)
::isDebugging = qEnvironmentVariableIntValue("QDBUS_DEBUG");
Q_UNUSED(threads)
Q_UNUSED(threads);
#ifdef QDBUS_THREAD_DEBUG
if (::isDebugging > 1)

View File

@ -984,7 +984,7 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
}
// send a cursor update
Q_UNUSED(cursorPosition)
Q_UNUSED(cursorPosition);
// QDBusVariant cursorData;
// cursorData.setVariant(QVariant::fromValue(cursorPosition));
// QVariantList args = packDBusSignalArguments(QString(), cursorPosition, 0, QVariant::fromValue(cursorData));
@ -1790,7 +1790,7 @@ bool AtSpiAdaptor::textInterface(QAccessibleInterface *interface, const QString
} else if (function == QLatin1String("GetAttributeRun")) {
int offset = message.arguments().at(0).toInt();
bool includeDefaults = message.arguments().at(1).toBool();
Q_UNUSED(includeDefaults)
Q_UNUSED(includeDefaults);
connection.send(message.createReply(getAttributes(interface, offset, includeDefaults)));
} else if (function == QLatin1String("GetAttributeValue")) {
int offset = message.arguments().at(0).toInt();

View File

@ -142,7 +142,7 @@ bool QAccessibleCache::containsObject(QObject *obj) const
QAccessible::Id QAccessibleCache::insert(QObject *object, QAccessibleInterface *iface) const
{
Q_ASSERT(iface);
Q_UNUSED(object)
Q_UNUSED(object);
// object might be 0
Q_ASSERT(!containsObject(object));

View File

@ -120,7 +120,7 @@ inline void QBlittablePlatformPixmap::markRasterOverlay(const QRectF &rect)
#ifdef QT_BLITTER_RASTEROVERLAY
markRasterOverlayImpl(rect);
#else
Q_UNUSED(rect)
Q_UNUSED(rect);
#endif
}
@ -129,7 +129,7 @@ inline void QBlittablePlatformPixmap::markRasterOverlay(const QVectorPath &path)
#ifdef QT_BLITTER_RASTEROVERLAY
markRasterOverlayImpl(path.convertToPainterPath().boundingRect());
#else
Q_UNUSED(path)
Q_UNUSED(path);
#endif
}
@ -141,8 +141,8 @@ inline void QBlittablePlatformPixmap::markRasterOverlay(const QPointF &pos, cons
rect.moveBottomLeft(pos);
markRasterOverlay(rect);
#else
Q_UNUSED(pos)
Q_UNUSED(ti)
Q_UNUSED(pos);
Q_UNUSED(ti);
#endif
}
@ -153,8 +153,8 @@ inline void QBlittablePlatformPixmap::markRasterOverlay(const QRect *rects, int
markRasterOverlay(rects[i]);
}
#else
Q_UNUSED(rects)
Q_UNUSED(rectCount)
Q_UNUSED(rects);
Q_UNUSED(rectCount);
#endif
}
inline void QBlittablePlatformPixmap::markRasterOverlay(const QRectF *rects, int rectCount)
@ -164,8 +164,8 @@ inline void QBlittablePlatformPixmap::markRasterOverlay(const QRectF *rects, int
markRasterOverlay(rects[i]);
}
#else
Q_UNUSED(rects)
Q_UNUSED(rectCount)
Q_UNUSED(rects);
Q_UNUSED(rectCount);
#endif
}
@ -203,7 +203,7 @@ inline void QBlittablePlatformPixmap::unmarkRasterOverlay(const QRectF &rect)
#ifdef QT_BLITTER_RASTEROVERLAY
unmarkRasterOverlayImpl(rect);
#else
Q_UNUSED(rect)
Q_UNUSED(rect);
#endif
}

View File

@ -531,7 +531,7 @@ void QPngHandlerPrivate::readPngTexts(png_info *info)
text_ptr++;
}
#else
Q_UNUSED(info)
Q_UNUSED(info);
#endif
}

View File

@ -2676,7 +2676,7 @@ void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::T
processMouseEvent(&mouseEvent);
}
#else
Q_UNUSED(e)
Q_UNUSED(e);
#endif
}
@ -2690,7 +2690,7 @@ void QGuiApplicationPrivate::processTabletEnterProximityEvent(QWindowSystemInter
ev.setTimestamp(e->timestamp);
QGuiApplication::sendSpontaneousEvent(qGuiApp, &ev);
#else
Q_UNUSED(e)
Q_UNUSED(e);
#endif
}
@ -2704,7 +2704,7 @@ void QGuiApplicationPrivate::processTabletLeaveProximityEvent(QWindowSystemInter
ev.setTimestamp(e->timestamp);
QGuiApplication::sendSpontaneousEvent(qGuiApp, &ev);
#else
Q_UNUSED(e)
Q_UNUSED(e);
#endif
}
@ -4196,7 +4196,7 @@ void QGuiApplicationPrivate::notifyThemeChanged()
#if QT_CONFIG(draganddrop)
void QGuiApplicationPrivate::notifyDragStarted(const QDrag *drag)
{
Q_UNUSED(drag)
Q_UNUSED(drag);
}
#endif

View File

@ -179,7 +179,7 @@ inline QRectF scale(const QRectF &rect, qreal scaleFactor, QPoint origin = QPoin
inline QMargins scale(const QMargins &margins, qreal scaleFactor, QPoint origin = QPoint(0, 0))
{
Q_UNUSED(origin)
Q_UNUSED(origin);
return QMargins(qRound(qreal(margins.left()) * scaleFactor), qRound(qreal(margins.top()) * scaleFactor),
qRound(qreal(margins.right()) * scaleFactor), qRound(qreal(margins.bottom()) * scaleFactor));
}

View File

@ -741,7 +741,7 @@ QStringList QFileDialogOptions::supportedSchemes() const
void QPlatformFileDialogHelper::selectMimeTypeFilter(const QString &filter)
{
Q_UNUSED(filter)
Q_UNUSED(filter);
}
QString QPlatformFileDialogHelper::selectedMimeTypeFilter() const
@ -790,7 +790,7 @@ QStringList QPlatformFileDialogHelper::cleanFilterList(const QString &filter)
f = match.captured(2);
return f.split(QLatin1Char(' '), Qt::SkipEmptyParts);
#else
Q_UNUSED(filter)
Q_UNUSED(filter);
return QStringList();
#endif
}

View File

@ -255,10 +255,10 @@ bool QPlatformGraphicsBufferHelper::bindSWToTexture(const QPlatformGraphicsBuffe
return true;
#else
Q_UNUSED(graphicsBuffer)
Q_UNUSED(swizzleRandB)
Q_UNUSED(premultipliedB)
Q_UNUSED(subRect)
Q_UNUSED(graphicsBuffer);
Q_UNUSED(swizzleRandB);
Q_UNUSED(premultipliedB);
Q_UNUSED(subRect);
return false;
#endif // QT_NO_OPENGL
}

View File

@ -106,7 +106,7 @@ bool QPlatformInputContext::isValid() const
*/
bool QPlatformInputContext::hasCapability(Capability capability) const
{
Q_UNUSED(capability)
Q_UNUSED(capability);
return true;
}
@ -136,7 +136,7 @@ void QPlatformInputContext::update(Qt::InputMethodQueries)
*/
void QPlatformInputContext::invokeAction(QInputMethod::Action action, int cursorPosition)
{
Q_UNUSED(cursorPosition)
Q_UNUSED(cursorPosition);
// Default behavior for simple ephemeral input contexts. Some
// complex input contexts should not be reset here.
if (action == QInputMethod::Click)
@ -151,7 +151,7 @@ void QPlatformInputContext::invokeAction(QInputMethod::Action action, int cursor
*/
bool QPlatformInputContext::filterEvent(const QEvent *event)
{
Q_UNUSED(event)
Q_UNUSED(event);
return false;
}
@ -251,7 +251,7 @@ void QPlatformInputContext::emitInputDirectionChanged(Qt::LayoutDirection newDir
*/
void QPlatformInputContext::setFocusObject(QObject *object)
{
Q_UNUSED(object)
Q_UNUSED(object);
}
/*!

View File

@ -324,7 +324,7 @@ QPlatformSharedGraphicsCache *QPlatformIntegration::createPlatformSharedGraphics
*/
QPaintEngine *QPlatformIntegration::createImagePaintEngine(QPaintDevice *paintDevice) const
{
Q_UNUSED(paintDevice)
Q_UNUSED(paintDevice);
return nullptr;
}
@ -472,7 +472,7 @@ QStringList QPlatformIntegration::themeNames() const
class QPlatformTheme *QPlatformIntegration::createPlatformTheme(const QString &name) const
{
Q_UNUSED(name)
Q_UNUSED(name);
return new QPlatformTheme;
}
@ -483,7 +483,7 @@ class QPlatformTheme *QPlatformIntegration::createPlatformTheme(const QString &n
*/
QPlatformOffscreenSurface *QPlatformIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const
{
Q_UNUSED(surface)
Q_UNUSED(surface);
return nullptr;
}

View File

@ -52,15 +52,15 @@ QPlatformIntegrationPlugin::~QPlatformIntegrationPlugin()
QPlatformIntegration *QPlatformIntegrationPlugin::create(const QString &key, const QStringList &paramList)
{
Q_UNUSED(key)
Q_UNUSED(key);
Q_UNUSED(paramList);
return nullptr;
}
QPlatformIntegration *QPlatformIntegrationPlugin::create(const QString &key, const QStringList &paramList, int &argc, char **argv)
{
Q_UNUSED(argc)
Q_UNUSED(argv)
Q_UNUSED(argc);
Q_UNUSED(argv);
return create(key, paramList); // Fallback for platform plugins that do not implement the argc/argv version.
}

View File

@ -137,7 +137,7 @@ QFunctionPointer QPlatformNativeInterface::platformFunction(const QByteArray &fu
*/
QVariantMap QPlatformNativeInterface::windowProperties(QPlatformWindow *window) const
{
Q_UNUSED(window)
Q_UNUSED(window);
return QVariantMap();
}

View File

@ -118,14 +118,14 @@ QStringList QPlatformSessionManager::discardCommand() const
void QPlatformSessionManager::setManagerProperty(const QString &name, const QString &value)
{
Q_UNUSED(name)
Q_UNUSED(value)
Q_UNUSED(name);
Q_UNUSED(value);
}
void QPlatformSessionManager::setManagerProperty(const QString &name, const QStringList &value)
{
Q_UNUSED(name)
Q_UNUSED(value)
Q_UNUSED(name);
Q_UNUSED(value);
}
bool QPlatformSessionManager::isPhase2() const

View File

@ -410,7 +410,7 @@ const QPalette *QPlatformTheme::palette(Palette type) const
const QFont *QPlatformTheme::font(Font type) const
{
Q_UNUSED(type)
Q_UNUSED(type);
return nullptr;
}
@ -698,7 +698,7 @@ QString QPlatformTheme::standardButtonText(int button) const
QKeySequence QPlatformTheme::standardButtonShortcut(int button) const
{
Q_UNUSED(button)
Q_UNUSED(button);
return QKeySequence();
}
#endif // QT_CONFIG(shortcut)

View File

@ -492,7 +492,7 @@ bool QPlatformWindow::windowEvent(QEvent *event)
bool QPlatformWindow::startSystemResize(Qt::Edges edges)
{
Q_UNUSED(edges)
Q_UNUSED(edges);
return false;
}
@ -519,7 +519,7 @@ bool QPlatformWindow::startSystemMove()
void QPlatformWindow::setFrameStrutEventsEnabled(bool enabled)
{
Q_UNUSED(enabled) // Do not warn as widgets enable it by default causing warnings with XCB.
Q_UNUSED(enabled); // Do not warn as widgets enable it by default causing warnings with XCB.
}
/*!
@ -607,7 +607,7 @@ QSize QPlatformWindow::constrainWindowSize(const QSize &size)
void QPlatformWindow::setAlertState(bool enable)
{
Q_UNUSED(enable)
Q_UNUSED(enable);
}
/*!

View File

@ -571,7 +571,7 @@ void QWindowPrivate::clearFocusObject()
// implement heightForWidth().
QRectF QWindowPrivate::closestAcceptableGeometry(const QRectF &rect) const
{
Q_UNUSED(rect)
Q_UNUSED(rect);
return QRectF();
}

View File

@ -473,16 +473,16 @@ bool QWindowSystemInterface::handleShortcutEvent(QWindow *window, ulong timestam
return shortcutMap.tryShortcut(&keyEvent);
#else
Q_UNUSED(window)
Q_UNUSED(timestamp)
Q_UNUSED(keyCode)
Q_UNUSED(modifiers)
Q_UNUSED(nativeScanCode)
Q_UNUSED(nativeVirtualKey)
Q_UNUSED(nativeModifiers)
Q_UNUSED(text)
Q_UNUSED(autorepeat)
Q_UNUSED(count)
Q_UNUSED(window);
Q_UNUSED(timestamp);
Q_UNUSED(keyCode);
Q_UNUSED(modifiers);
Q_UNUSED(nativeScanCode);
Q_UNUSED(nativeVirtualKey);
Q_UNUSED(nativeModifiers);
Q_UNUSED(text);
Q_UNUSED(autorepeat);
Q_UNUSED(count);
return false;
#endif
}
@ -528,7 +528,7 @@ bool QWindowSystemInterface::handleExtendedKeyEvent(QWindow *window, ulong times
return true;
}
#else
Q_UNUSED(tryShortcutOverride)
Q_UNUSED(tryShortcutOverride);
#endif
QWindowSystemInterfacePrivate::KeyEvent * e =
@ -1222,13 +1222,13 @@ Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int
// Then as QShortcutEvent
return shortcutMap.tryShortcut(&qevent);
#else
Q_UNUSED(o)
Q_UNUSED(timestamp)
Q_UNUSED(k)
Q_UNUSED(mods)
Q_UNUSED(text)
Q_UNUSED(autorep)
Q_UNUSED(count)
Q_UNUSED(o);
Q_UNUSED(timestamp);
Q_UNUSED(k);
Q_UNUSED(mods);
Q_UNUSED(text);
Q_UNUSED(autorep);
Q_UNUSED(count);
return false;
#endif
}

View File

@ -103,7 +103,7 @@ bool QDBusMenuAdaptor::AboutToShow(int id)
QList<int> QDBusMenuAdaptor::AboutToShowGroup(const QList<int> &ids, QList<int> &idErrors)
{
qCDebug(qLcMenu) << ids;
Q_UNUSED(idErrors)
Q_UNUSED(idErrors);
idErrors.clear();
for (int id : ids)
AboutToShow(id);
@ -112,8 +112,8 @@ QList<int> QDBusMenuAdaptor::AboutToShowGroup(const QList<int> &ids, QList<int>
void QDBusMenuAdaptor::Event(int id, const QString &eventId, const QDBusVariant &data, uint timestamp)
{
Q_UNUSED(data)
Q_UNUSED(timestamp)
Q_UNUSED(data);
Q_UNUSED(timestamp);
QDBusPlatformMenuItem *item = QDBusPlatformMenuItem::byId(id);
qCDebug(qLcMenu) << id << (item ? item->text() : QLatin1String("")) << eventId;
if (item && eventId == QLatin1String("clicked"))

View File

@ -214,7 +214,7 @@ QDBusMenuItem::QDBusMenuItem(const QDBusPlatformMenuItem *item)
QDBusMenuItemList QDBusMenuItem::items(const QList<int> &ids, const QStringList &propertyNames)
{
Q_UNUSED(propertyNames)
Q_UNUSED(propertyNames);
QDBusMenuItemList ret;
const QList<const QDBusPlatformMenuItem *> items = QDBusPlatformMenuItem::byIds(ids);
ret.reserve(items.size());

View File

@ -57,7 +57,7 @@ struct GUserEventSource
static gboolean userEventSourcePrepare(GSource *source, gint *timeout)
{
Q_UNUSED(timeout)
Q_UNUSED(timeout);
GUserEventSource *userEventSource = reinterpret_cast<GUserEventSource *>(source);
return userEventSource->d->wakeUpCalled;
}

View File

@ -220,7 +220,7 @@ static inline QDBusMessage xdgDesktopPortalOpenFile(const QUrl &url)
return QDBusConnection::sessionBus().call(message);
}
#else
Q_UNUSED(url)
Q_UNUSED(url);
#endif
return QDBusMessage::createError(QDBusError::InternalError, qt_error_string());
@ -357,14 +357,14 @@ QByteArray QGenericUnixServices::desktopEnvironment() const
bool QGenericUnixServices::openUrl(const QUrl &url)
{
Q_UNUSED(url)
Q_UNUSED(url);
qWarning("openUrl() not supported on this platform");
return false;
}
bool QGenericUnixServices::openDocument(const QUrl &url)
{
Q_UNUSED(url)
Q_UNUSED(url);
qWarning("openDocument() not supported on this platform");
return false;
}

View File

@ -637,7 +637,7 @@ bool QNullTexture::create()
bool QNullTexture::createFrom(QRhiTexture::NativeTexture src)
{
Q_UNUSED(src)
Q_UNUSED(src);
QRHI_RES_RHI(QRhiNull);
const bool isCube = m_flags.testFlag(CubeMap);
const bool hasMipMaps = m_flags.testFlag(MipMapped);

View File

@ -103,12 +103,12 @@ bool qt_useHarfbuzzNG()
int QFontEngine::getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints)
{
Q_UNUSED(glyph)
Q_UNUSED(flags)
Q_UNUSED(point)
Q_UNUSED(xpos)
Q_UNUSED(ypos)
Q_UNUSED(nPoints)
Q_UNUSED(glyph);
Q_UNUSED(flags);
Q_UNUSED(point);
Q_UNUSED(xpos);
Q_UNUSED(ypos);
Q_UNUSED(nPoints);
return Err_Not_Covered;
}
@ -954,9 +954,9 @@ void QFontEngine::getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metr
*/
bool QFontEngine::getSfntTableData(uint tag, uchar *buffer, uint *length) const
{
Q_UNUSED(tag)
Q_UNUSED(buffer)
Q_UNUSED(length)
Q_UNUSED(tag);
Q_UNUSED(buffer);
Q_UNUSED(length);
return false;
}
@ -1538,7 +1538,7 @@ QFontEngineBox::~QFontEngineBox()
glyph_t QFontEngineBox::glyphIndex(uint ucs4) const
{
Q_UNUSED(ucs4)
Q_UNUSED(ucs4);
return 0;
}

View File

@ -219,7 +219,7 @@ QTextImageHandler::QTextImageHandler(QObject *parent)
QSizeF QTextImageHandler::intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format)
{
Q_UNUSED(posInDocument)
Q_UNUSED(posInDocument);
const QTextImageFormat imageFormat = format.toImageFormat();
if (QCoreApplication::instance()->thread() != QThread::currentThread())
@ -236,7 +236,7 @@ QImage QTextImageHandler::image(QTextDocument *doc, const QTextImageFormat &imag
void QTextImageHandler::drawObject(QPainter *p, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format)
{
Q_UNUSED(posInDocument)
Q_UNUSED(posInDocument);
const QTextImageFormat imageFormat = format.toImageFormat();
if (QCoreApplication::instance()->thread() != QThread::currentThread()) {

View File

@ -111,7 +111,7 @@ static int CbText(MD_TEXTTYPE type, const MD_CHAR *text, MD_SIZE size, void *use
static void CbDebugLog(const char *msg, void *userdata)
{
Q_UNUSED(userdata)
Q_UNUSED(userdata);
qCDebug(lcMD) << msg;
}
@ -314,7 +314,7 @@ int QTextMarkdownImporter::cbEnterBlock(int blockType, void *det)
int QTextMarkdownImporter::cbLeaveBlock(int blockType, void *detail)
{
Q_UNUSED(detail)
Q_UNUSED(detail);
switch (blockType) {
case MD_BLOCK_P:
m_listItem = false;
@ -432,7 +432,7 @@ int QTextMarkdownImporter::cbEnterSpan(int spanType, void *det)
int QTextMarkdownImporter::cbLeaveSpan(int spanType, void *detail)
{
Q_UNUSED(detail)
Q_UNUSED(detail);
QTextCharFormat charFmt;
if (!m_spanFormatStack.isEmpty()) {
m_spanFormatStack.pop();

View File

@ -830,7 +830,7 @@ QStringList QFontconfigDatabase::fallbacksForFamily(const QString &family, QFont
static FcPattern *queryFont(const FcChar8 *file, const QByteArray &data, int id, FcBlanks *blanks, int *count)
{
#if FC_VERSION < 20402
Q_UNUSED(data)
Q_UNUSED(data);
return FcFreeTypeQuery(file, id, blanks, count);
#else
if (data.isEmpty())

View File

@ -725,8 +725,8 @@ QWindowsFontDatabase::QWindowsFontDatabase()
// Properties accessed by QWin32PrintEngine (Qt Print Support)
static const int hfontMetaTypeId = qRegisterMetaType<HFONT>();
static const int logFontMetaTypeId = qRegisterMetaType<LOGFONT>();
Q_UNUSED(hfontMetaTypeId)
Q_UNUSED(logFontMetaTypeId)
Q_UNUSED(hfontMetaTypeId);
Q_UNUSED(logFontMetaTypeId);
if (lcQpaFonts().isDebugEnabled()) {
QSharedPointer<QWindowsFontEngineData> d = data();

View File

@ -960,7 +960,7 @@ QWindowsNativeImage *QWindowsFontEngine::drawGDIGlyph(HFONT font, glyph_t glyph,
const QTransform &t,
QImage::Format mask_format)
{
Q_UNUSED(mask_format)
Q_UNUSED(mask_format);
glyph_metrics_t gm = boundingBox(glyph);
// printf(" -> for glyph %4x\n", glyph);

View File

@ -61,7 +61,7 @@ struct AstcHeader
bool QAstcHandler::canRead(const QByteArray &suffix, const QByteArray &block)
{
Q_UNUSED(suffix)
Q_UNUSED(suffix);
return block.startsWith("\x13\xAB\xA1\x5C");
}

View File

@ -105,7 +105,7 @@ struct KTXMipmapLevel {
bool QKtxHandler::canRead(const QByteArray &suffix, const QByteArray &block)
{
Q_UNUSED(suffix)
Q_UNUSED(suffix);
return (qstrncmp(block.constData(), ktxIdentifier, KTX_IDENTIFIER_LENGTH) == 0);
}

View File

@ -67,7 +67,7 @@ static PkmType typeMap[5] = {
bool QPkmHandler::canRead(const QByteArray &suffix, const QByteArray &block)
{
Q_UNUSED(suffix)
Q_UNUSED(suffix);
return block.startsWith("PKM ");
}

View File

@ -215,7 +215,7 @@ int QUndoCommand::id() const
bool QUndoCommand::mergeWith(const QUndoCommand *command)
{
Q_UNUSED(command)
Q_UNUSED(command);
return false;
}

View File

@ -169,7 +169,7 @@ static QByteArray makeCacheKey(QUrl &url, QNetworkProxy *proxy, const QString &p
}
}
#else
Q_UNUSED(proxy)
Q_UNUSED(proxy);
#endif
if (!peerVerifyName.isEmpty())
result += QLatin1Char(':') + peerVerifyName;

View File

@ -564,7 +564,7 @@ void QNetworkReplyImplPrivate::appendDownstreamData(QIODevice *data)
void QNetworkReplyImplPrivate::appendDownstreamData(const QByteArray &data)
{
Q_UNUSED(data)
Q_UNUSED(data);
// TODO implement
// TODO call

View File

@ -408,9 +408,9 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN
#else
void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestName, const QHostAddress &nameserver, QDnsLookupReply *reply)
{
Q_UNUSED(requestType)
Q_UNUSED(requestName)
Q_UNUSED(nameserver)
Q_UNUSED(requestType);
Q_UNUSED(requestName);
Q_UNUSED(nameserver);
reply->error = QDnsLookup::ResolverError;
reply->errorString = tr("Resolver library can't be loaded: No runtime library loading support");
return;

View File

@ -61,8 +61,8 @@ QNetworkConnectionMonitor::QNetworkConnectionMonitor()
QNetworkConnectionMonitor::QNetworkConnectionMonitor(const QHostAddress &local, const QHostAddress &remote)
: QObject(*new QNetworkConnectionMonitorPrivate)
{
Q_UNUSED(local)
Q_UNUSED(remote)
Q_UNUSED(local);
Q_UNUSED(remote);
}
QNetworkConnectionMonitor::~QNetworkConnectionMonitor()
@ -71,8 +71,8 @@ QNetworkConnectionMonitor::~QNetworkConnectionMonitor()
bool QNetworkConnectionMonitor::setTargets(const QHostAddress &local, const QHostAddress &remote)
{
Q_UNUSED(local)
Q_UNUSED(remote)
Q_UNUSED(local);
Q_UNUSED(remote);
return false;
}
@ -140,7 +140,7 @@ bool QNetworkStatusMonitor::isEnabled()
void QNetworkStatusMonitor::reachabilityChanged(bool online)
{
Q_UNUSED(online)
Q_UNUSED(online);
}
QT_END_NAMESPACE

View File

@ -344,7 +344,7 @@ QT_END_INCLUDE_NAMESPACE
static QList<QNetworkInterfacePrivate *> createInterfaces(ifaddrs *rawList)
{
Q_UNUSED(getMtu)
Q_UNUSED(getMtu);
QList<QNetworkInterfacePrivate *> interfaces;
QDuplicateTracker<QString> seenInterfaces;
QDuplicateTracker<int> seenIndexes;
@ -400,7 +400,7 @@ static void getAddressExtraInfo(QNetworkAddressEntry *entry, struct sockaddr *sa
{
Q_UNUSED(entry);
Q_UNUSED(sa);
Q_UNUSED(ifname)
Q_UNUSED(ifname);
}
# elif defined(Q_OS_BSD4)
@ -568,7 +568,7 @@ static void getAddressExtraInfo(QNetworkAddressEntry *entry, struct sockaddr *sa
static QList<QNetworkInterfacePrivate *> createInterfaces(ifaddrs *rawList)
{
Q_UNUSED(getMtu)
Q_UNUSED(getMtu);
QList<QNetworkInterfacePrivate *> interfaces;
// make sure there's one entry for each interface
@ -600,7 +600,7 @@ static void getAddressExtraInfo(QNetworkAddressEntry *entry, struct sockaddr *sa
{
Q_UNUSED(entry);
Q_UNUSED(sa);
Q_UNUSED(ifname)
Q_UNUSED(ifname);
}
# endif

View File

@ -157,7 +157,7 @@ static QByteArray qt_prettyDebug(const char *data, int len, int maxLength)
}
#define WS_ERROR_DEBUG(x) verboseWSErrorDebug(x);
#define WS_ERROR_DEBUG(x) verboseWSErrorDebug(x)
#else

View File

@ -1611,9 +1611,9 @@ qint64 QSocks5SocketEngine::readDatagram(char *data, qint64 maxlen, QIpPacketHea
}
return copyLen;
#else
Q_UNUSED(data)
Q_UNUSED(maxlen)
Q_UNUSED(header)
Q_UNUSED(data);
Q_UNUSED(maxlen);
Q_UNUSED(header);
return -1;
#endif // QT_NO_UDPSOCKET
}
@ -1658,9 +1658,9 @@ qint64 QSocks5SocketEngine::writeDatagram(const char *data, qint64 len, const QI
return len;
#else
Q_UNUSED(data)
Q_UNUSED(len)
Q_UNUSED(header)
Q_UNUSED(data);
Q_UNUSED(len);
Q_UNUSED(header);
return -1;
#endif // QT_NO_UDPSOCKET
}

View File

@ -594,7 +594,7 @@ extern "C" int q_dgram_create(BIO *bio)
extern "C" int q_dgram_destroy(BIO *bio)
{
Q_UNUSED(bio)
Q_UNUSED(bio);
return 1;
}
@ -862,7 +862,7 @@ void QDtlsPrivateOpenSSL::TimeoutHandler::stop()
void QDtlsPrivateOpenSSL::TimeoutHandler::timerEvent(QTimerEvent *event)
{
Q_UNUSED(event)
Q_UNUSED(event);
Q_ASSERT(timerId != -1);
killTimer(timerId);

View File

@ -104,7 +104,7 @@ static int q_DH_check(DH *dh, int *status)
// errors from the error queue, but it's not needed anyway
// - see the 'isSafeDH' below, how it returns immediately
// on 0.
Q_UNUSED(status)
Q_UNUSED(status);
return result;
}

View File

@ -2340,7 +2340,7 @@ void QSslSocketPrivate::_q_stateChangedSlot(QAbstractSocket::SocketState state)
*/
void QSslSocketPrivate::_q_errorSlot(QAbstractSocket::SocketError error)
{
Q_UNUSED(error)
Q_UNUSED(error);
#ifdef QSSLSOCKET_DEBUG
Q_Q(QSslSocket);
qCDebug(lcSsl) << "QSslSocket::_q_errorSlot(" << error << ')';

View File

@ -625,8 +625,8 @@ void QSslSocketBackendPrivate::transmit()
QList<QSslError> (QSslSocketBackendPrivate::verify)(QList<QSslCertificate> certificateChain, const QString &hostName)
{
Q_UNIMPLEMENTED();
Q_UNUSED(certificateChain)
Q_UNUSED(hostName)
Q_UNUSED(certificateChain);
Q_UNUSED(hostName);
QList<QSslError> errors;
errors << QSslError(QSslError::UnspecifiedError);
@ -640,11 +640,11 @@ bool QSslSocketBackendPrivate::importPkcs12(QIODevice *device,
const QByteArray &passPhrase)
{
Q_UNIMPLEMENTED();
Q_UNUSED(device)
Q_UNUSED(key)
Q_UNUSED(cert)
Q_UNUSED(caCertificates)
Q_UNUSED(passPhrase)
Q_UNUSED(device);
Q_UNUSED(key);
Q_UNUSED(cert);
Q_UNUSED(caCertificates);
Q_UNUSED(passPhrase);
return false;
}

View File

@ -376,7 +376,7 @@ int q_ssl_sess_set_new_cb(SSL *ssl, SSL_SESSION *session)
int qt_OCSP_status_server_callback(SSL *ssl, void *ocspRequest)
{
Q_UNUSED(ocspRequest)
Q_UNUSED(ocspRequest);
if (!ssl)
return SSL_TLSEXT_ERR_ALERT_FATAL;

View File

@ -468,7 +468,7 @@ void q_printEglConfig(EGLDisplay display, EGLConfig config)
QSizeF q_physicalScreenSizeFromFb(int framebufferDevice, const QSize &screenSize)
{
#ifndef Q_OS_LINUX
Q_UNUSED(framebufferDevice)
Q_UNUSED(framebufferDevice);
#endif
const int defaultPhysicalDpi = 100;
static QSizeF size;
@ -521,7 +521,7 @@ QSizeF q_physicalScreenSizeFromFb(int framebufferDevice, const QSize &screenSize
QSize q_screenSizeFromFb(int framebufferDevice)
{
#ifndef Q_OS_LINUX
Q_UNUSED(framebufferDevice)
Q_UNUSED(framebufferDevice);
#endif
const int defaultWidth = 800;
const int defaultHeight = 600;
@ -565,7 +565,7 @@ QSize q_screenSizeFromFb(int framebufferDevice)
int q_screenDepthFromFb(int framebufferDevice)
{
#ifndef Q_OS_LINUX
Q_UNUSED(framebufferDevice)
Q_UNUSED(framebufferDevice);
#endif
const int defaultDepth = 32;
static int depth = qEnvironmentVariableIntValue("QT_QPA_EGLFS_DEPTH");
@ -594,7 +594,7 @@ int q_screenDepthFromFb(int framebufferDevice)
qreal q_refreshRateFromFb(int framebufferDevice)
{
#ifndef Q_OS_LINUX
Q_UNUSED(framebufferDevice)
Q_UNUSED(framebufferDevice);
#endif
static qreal rate = 0;

View File

@ -169,7 +169,7 @@ void QEvdevTabletData::report()
QEvdevTabletHandler::QEvdevTabletHandler(const QString &device, const QString &spec, QObject *parent)
: QObject(parent), m_fd(-1), m_device(device), m_notifier(0), d(0)
{
Q_UNUSED(spec)
Q_UNUSED(spec);
setObjectName(QLatin1String("Evdev Tablet Handler"));

View File

@ -1011,7 +1011,7 @@ void QKmsDevice::parseCrtcProperties(uint32_t crtcId, QKmsOutput *output)
}
enumerateProperties(objProps, [output](drmModePropertyPtr prop, quint64 value) {
Q_UNUSED(value)
Q_UNUSED(value);
if (!strcasecmp(prop->name, "mode_id"))
output->modeIdPropertyId = prop->prop_id;
else if (!strcasecmp(prop->name, "active"))

View File

@ -897,8 +897,8 @@ void QAndroidInputContext::update(Qt::InputMethodQueries queries)
void QAndroidInputContext::invokeAction(QInputMethod::Action action, int cursorPosition)
{
#warning TODO Handle at least QInputMethod::ContextMenu action
Q_UNUSED(action)
Q_UNUSED(cursorPosition)
Q_UNUSED(action);
Q_UNUSED(cursorPosition);
//### click should be passed to the IM, but in the meantime it's better to ignore it than to do something wrong
// if (action == QInputMethod::Click)
// commit();

View File

@ -79,9 +79,9 @@ bool QAndroidPlatformMessageDialogHelper::show(Qt::WindowFlags windowFlags
, Qt::WindowModality windowModality
, QWindow *parent)
{
Q_UNUSED(windowFlags)
Q_UNUSED(windowModality)
Q_UNUSED(parent)
Q_UNUSED(windowFlags);
Q_UNUSED(windowModality);
Q_UNUSED(parent);
QSharedPointer<QMessageDialogOptions> opt = options();
if (!opt.data())
return false;

View File

@ -197,9 +197,9 @@ QJNIObjectPrivate QAndroidPlatformFileDialogHelper::getFileDialogIntent(const QS
bool QAndroidPlatformFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent)
{
Q_UNUSED(windowFlags)
Q_UNUSED(windowModality)
Q_UNUSED(parent)
Q_UNUSED(windowFlags);
Q_UNUSED(windowModality);
Q_UNUSED(parent);
bool isDirDialog = false;

View File

@ -104,7 +104,7 @@ void QAndroidPlatformMenu::syncMenuItem(QPlatformMenuItem *menuItem)
void QAndroidPlatformMenu::syncSeparatorsCollapsible(bool enable)
{
Q_UNUSED(enable)
Q_UNUSED(enable);
}
void QAndroidPlatformMenu::setText(const QString &text)

View File

@ -118,7 +118,7 @@ bool QAndroidPlatformMenuItem::isSeparator() const
void QAndroidPlatformMenuItem::setFont(const QFont &font)
{
Q_UNUSED(font)
Q_UNUSED(font);
}
void QAndroidPlatformMenuItem::setRole(QPlatformMenuItem::MenuRole role)
@ -153,7 +153,7 @@ bool QAndroidPlatformMenuItem::isChecked() const
void QAndroidPlatformMenuItem::setShortcut(const QKeySequence &shortcut)
{
Q_UNUSED(shortcut)
Q_UNUSED(shortcut);
}
void QAndroidPlatformMenuItem::setEnabled(bool enabled)
@ -170,7 +170,7 @@ bool QAndroidPlatformMenuItem::isEnabled() const
void QAndroidPlatformMenuItem::setIconSize(int size)
{
Q_UNUSED(size)
Q_UNUSED(size);
}
QT_END_NAMESPACE

View File

@ -94,7 +94,7 @@ void QCocoaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
void QCocoaAccessibility::setRootObject(QObject *o)
{
Q_UNUSED(o)
Q_UNUSED(o);
}
void QCocoaAccessibility::initialize()

View File

@ -205,7 +205,7 @@ void QCocoaMenuItem::setIsSeparator(bool isSeparator)
void QCocoaMenuItem::setFont(const QFont &font)
{
Q_UNUSED(font)
Q_UNUSED(font);
}
void QCocoaMenuItem::setRole(MenuRole role)

View File

@ -95,7 +95,7 @@
- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange
{
Q_UNUSED(replacementRange)
Q_UNUSED(replacementRange);
if (m_sendKeyEvent && m_composingText.isEmpty() && [aString isEqualToString:m_inputSource]) {
// don't send input method events for simple text input (let handleKeyEvent send key events instead)
@ -129,7 +129,7 @@
- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange
{
Q_UNUSED(replacementRange)
Q_UNUSED(replacementRange);
QString preeditString;
QList<QInputMethodEvent::Attribute> attrs;
@ -199,7 +199,7 @@
- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
{
Q_UNUSED(actualRange)
Q_UNUSED(actualRange);
QObject *fo = m_platformWindow->window()->focusObject();
if (!fo)
return nil;
@ -255,8 +255,8 @@
- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
{
Q_UNUSED(aRange)
Q_UNUSED(actualRange)
Q_UNUSED(aRange);
Q_UNUSED(actualRange);
QObject *fo = m_platformWindow->window()->focusObject();
if (!fo)
@ -305,7 +305,7 @@
- (void)textInputContextKeyboardSelectionDidChangeNotification:(NSNotification *)textInputContextKeyboardSelectionDidChangeNotification
{
Q_UNUSED(textInputContextKeyboardSelectionDidChangeNotification)
Q_UNUSED(textInputContextKeyboardSelectionDidChangeNotification);
if (([NSApp keyWindow] == self.window) && self.window.firstResponder == self) {
if (QCocoaInputContext *ic = qobject_cast<QCocoaInputContext *>(QCocoaIntegration::instance()->inputContext()))
ic->updateLocale();

View File

@ -217,7 +217,7 @@
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent
{
Q_UNUSED(theEvent)
Q_UNUSED(theEvent);
if (!m_platformWindow)
return NO;
if ([self isTransparentForUserInput])
@ -548,7 +548,7 @@
- (void)mouseEnteredImpl:(NSEvent *)theEvent
{
Q_UNUSED(theEvent)
Q_UNUSED(theEvent);
if (!m_platformWindow)
return;

View File

@ -127,7 +127,7 @@ QSize QEglFSBrcmIntegration::screenSize() const
EGLNativeWindowType QEglFSBrcmIntegration::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format)
{
Q_UNUSED(window)
Q_UNUSED(window);
return createDispmanxLayer(QPoint(0, 0), size, 1, format.hasAlpha() ? DISPMANX_FLAGS_ALPHA_FROM_SOURCE : DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS);
}

View File

@ -90,8 +90,8 @@ EGLNativeDisplayType QEglFSVivIntegration::platformDisplay() const
EGLNativeWindowType QEglFSVivIntegration::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format)
{
Q_UNUSED(window)
Q_UNUSED(format)
Q_UNUSED(window);
Q_UNUSED(format);
EGLNativeWindowType eglWindow = static_cast<EGLNativeWindowType>(fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height()));
return eglWindow;

View File

@ -83,8 +83,8 @@ EGLNativeDisplayType QEglFSVivWaylandIntegration::platformDisplay() const
EGLNativeWindowType QEglFSVivWaylandIntegration::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format)
{
Q_UNUSED(window)
Q_UNUSED(format)
Q_UNUSED(window);
Q_UNUSED(format);
EGLNativeWindowType eglWindow = static_cast<EGLNativeWindowType>(fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height()));
return eglWindow;

View File

@ -67,7 +67,7 @@
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
Q_UNUSED(picker)
Q_UNUSED(picker);
emit m_fileDialog->reject();
}

View File

@ -96,7 +96,7 @@
- (void)documentPickerWasCancelled:(UIDocumentPickerViewController *)controller
{
Q_UNUSED(controller)
Q_UNUSED(controller);
emit m_fileDialog->reject();
}

View File

@ -588,7 +588,7 @@ static void executeBlockWithoutAnimation(Block block)
- (BOOL)acceptTouchesBegan:(QPointF)touchPoint
{
Q_UNUSED(touchPoint)
Q_UNUSED(touchPoint);
Q_UNREACHABLE();
return NO;
}
@ -601,7 +601,7 @@ static void executeBlockWithoutAnimation(Block block)
- (void)updateFocalPoint:(QPointF)touchPoint
{
Q_UNUSED(touchPoint)
Q_UNUSED(touchPoint);
Q_UNREACHABLE();
}

View File

@ -627,15 +627,15 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
// Check first if QIOSMenu should handle the action before continuing up the responder chain
return [QIOSMenu::menuActionTarget() targetForAction:action withSender:sender] != 0;
#else
Q_UNUSED(action)
Q_UNUSED(sender)
Q_UNUSED(action);
Q_UNUSED(sender);
return false;
#endif
}
- (id)forwardingTargetForSelector:(SEL)selector
{
Q_UNUSED(selector)
Q_UNUSED(selector);
#ifndef Q_OS_TVOS
return QIOSMenu::menuActionTarget();
#else

View File

@ -187,7 +187,7 @@ QFunctionPointer QLinuxFbIntegration::platformFunction(const QByteArray &functio
else if (function == QLinuxFbFunctions::switchLangTypeIdentifier())
return QFunctionPointer(switchLangStatic);
#else
Q_UNUSED(function)
Q_UNUSED(function);
#endif
return 0;

View File

@ -104,7 +104,7 @@ QPlatformNativeInterface *QOffscreenX11Integration::nativeInterface() const
void *QOffscreenX11Integration::nativeResourceForScreen(const QByteArray &resource, QScreen *screen)
{
Q_UNUSED(screen)
Q_UNUSED(screen);
if (resource.toLower() == QByteArrayLiteral("display") ) {
if (!m_connection)
m_connection.reset(new QOffscreenX11Connection);

View File

@ -134,7 +134,7 @@ QPlatformNativeInterface::NativeResourceForIntegrationFunction QQnxNativeInterfa
if (resource == "blackberryIMFCheckSpelling")
return reinterpret_cast<NativeResourceForIntegrationFunction>(QQnxInputContext::checkSpelling);
#else
Q_UNUSED(resource)
Q_UNUSED(resource);
#endif
return 0;
}

Some files were not shown because too many files have changed in this diff Show More