mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
refactor: Address (Windows) compile warnings (#840)
* Windows compile errors and (Qt 5.15 deprecation) warnings * Usability - Enable/Disable Instance button Co-authored-by: brindosch <edeltraud70@gmx.de>
This commit is contained in:
@@ -58,7 +58,11 @@ void QtHttpClientWrapper::onClientDataReceived (void)
|
||||
case AwaitingRequest: // "command url version" × 1
|
||||
{
|
||||
QString str = QString::fromUtf8 (line).trimmed ();
|
||||
QStringList parts = str.split (SPACE, QString::SkipEmptyParts);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
QStringList parts = str.split (SPACE, Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList parts = str.split (SPACE, QString::SkipEmptyParts);
|
||||
#endif
|
||||
|
||||
if (parts.size () == 3)
|
||||
{
|
||||
@@ -192,7 +196,12 @@ void QtHttpClientWrapper::onClientDataReceived (void)
|
||||
|
||||
// catch /jsonrpc in url, we need async callback, StaticFileServing is sync
|
||||
QString path = m_currentRequest->getUrl ().path ();
|
||||
QStringList uri_parts = path.split('/', QString::SkipEmptyParts);
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
QStringList uri_parts = path.split('/', Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList uri_parts = path.split('/', QString::SkipEmptyParts);
|
||||
#endif
|
||||
|
||||
if ( ! uri_parts.empty() && uri_parts.at(0) == "json-rpc" )
|
||||
{
|
||||
|
@@ -81,7 +81,11 @@ void StaticFileServing::onRequestNeedsReply (QtHttpRequest * request, QtHttpRepl
|
||||
if (command == QStringLiteral ("GET"))
|
||||
{
|
||||
QString path = request->getUrl ().path ();
|
||||
QStringList uri_parts = path.split('/', QString::SkipEmptyParts);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
QStringList uri_parts = path.split('/', Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList uri_parts = path.split('/', QString::SkipEmptyParts);
|
||||
#endif
|
||||
|
||||
// special uri handling for server commands
|
||||
if ( ! uri_parts.empty() )
|
||||
|
@@ -239,7 +239,7 @@ void WebSocketClient::handleBinaryMessage(QByteArray &data)
|
||||
unsigned width = ((data.at(2) << 8) & 0xFF00) | (data.at(3) & 0xFF);
|
||||
unsigned height = imgSize / width;
|
||||
|
||||
if ( ! (imgSize) % width)
|
||||
if ( imgSize % width > 0 )
|
||||
{
|
||||
Error(_log, "data size is not multiple of width");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user