Fix coding style in android platform and style plugins

Change-Id: Ic0a1150178c571ea0c20a045ad7520d23d6d878c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Xing LinKun 2021-03-30 17:59:02 +08:00 committed by Volker Hilsheimer
parent ae0fe7d4da
commit 6a7d2da7dd
4 changed files with 9 additions and 9 deletions

View File

@ -76,9 +76,8 @@ bool AndroidContentFileEngine::open(QIODevice::OpenMode openMode)
QJniObject::fromString(fileName(DefaultName)).object(),
QJniObject::fromString(openModeStr).object());
if (fd < 0) {
if (fd < 0)
return false;
}
return QFSFileEngine::open(openMode, fd, QFile::AutoCloseHandle);
}

View File

@ -109,13 +109,13 @@ void *QAndroidPlatformNativeInterface::nativeResourceForIntegration(const QByteA
if (resource == "AndroidStandardPalette") {
if (m_androidStyle)
return &m_androidStyle->m_standardPalette;
else
return nullptr;
}
if (resource == "AndroidQWidgetFonts") {
if (m_androidStyle)
return &m_androidStyle->m_QWidgetsFonts;
else
return nullptr;
}
if (resource == "AndroidDeviceName") {

View File

@ -191,7 +191,7 @@ QSurfaceFormat QAndroidPlatformOpenGLWindow::format() const
{
if (m_nativeWindow == 0)
return window()->requestedFormat();
else
return m_format;
}

View File

@ -1352,9 +1352,10 @@ void QAndroidStyle::AndroidLayerDrawable::draw(QPainter *painter, const QStyleOp
QAndroidStyle::AndroidDrawable *QAndroidStyle::AndroidLayerDrawable::layer(int id) const
{
for (const LayerType &layer : m_layers)
for (const LayerType &layer : m_layers) {
if (layer.first == id)
return layer.second;
}
return 0;
}