Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
Fixed qtzeroconf compilation on Win10 with MinGW (#326)
Browse files Browse the repository at this point in the history
- Fixed DEFINES in remote.pro to not override defines of qtzeroconf
- Additional include for MinGW in CommonServices.h
- Fixed missing returns for MSVC compiler

This fixes #326
  • Loading branch information
zehnm committed Nov 3, 2019
1 parent 90655ce commit b8c2b09
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
4 changes: 4 additions & 0 deletions qtzeroconf/bonjour-sdk/CommonServices.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ extern "C" {
#define WIN32_LEAN_AND_MEAN // Needed to avoid redefinitions by Windows interfaces.
#endif

#if ( defined( __MINGW32__ ) )
#include <stdint.h>
#endif

#if ( defined( __MWERKS__ ) )

#if ( __option( c9x ) )
Expand Down
13 changes: 1 addition & 12 deletions remote.pro
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ TRANSLATIONS = translations/bg_BG.ts \

# include zeroconf
include(qtzeroconf/qtzeroconf.pri)
DEFINES = QZEROCONF_STATIC
DEFINES += QZEROCONF_STATIC

# Wiringpi config, only on raspberry pi
equals(QT_ARCH, arm): {
Expand All @@ -145,8 +145,6 @@ RCC_DIR = $$PWD/build/$$DESTINATION_PATH/qrc
UI_DIR = $$PWD/build/$$DESTINATION_PATH/ui

win32 {
message(Handling win32 specific configuration)

# copy plugin files
CONFIG += file_copies

Expand All @@ -160,18 +158,11 @@ win32 {
icons.files = $$files($$PWD/icons/*.*)
icons.path = $$DESTDIR/icons
} else:linux {
message(Handling 'linux' configuration)

CONFIG += file_copies
COPIES += extraData
extraData.files = $$PWD/config.json $$PWD/translations.json
extraData.path = $$DESTDIR

# copy plugin files
#COPIES += plugins
#plugins.files = $$files($$PWD/plugins/*.*)
#plugins.path = $$DESTDIR/plugins

#copy fonts
COPIES += fonts
fonts.files = $$files($$PWD/fonts/*.*)
Expand All @@ -182,8 +173,6 @@ win32 {
icons.files = $$files($$PWD/icons/*.*)
icons.path = $$DESTDIR/icons
} else:macx {
message(Handling macOS specific configuration)

APP_QML_FILES.files = $$PWD/config.json $$PWD/translations.json
APP_QML_FILES.path = Contents/Resources
QMAKE_BUNDLE_DATA += APP_QML_FILES
Expand Down
1 change: 1 addition & 0 deletions sources/entities/entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ QVariantMap Entity::getDataToSave()

bool Entity::update(const QVariantMap &attributes)
{
return false;
}

void Entity::setFavorite(bool value)
Expand Down
1 change: 1 addition & 0 deletions sources/entities/remote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ QString Remote::Type = "remote";

bool Remote::update(const QVariantMap &attributes)
{
return false;
}

// transport and media controls
Expand Down
2 changes: 2 additions & 0 deletions sources/hardware/drv2605.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "drv2605.h"
#include "../notifications.h"

// FIXME use strategy pattern for architecture specific device driver instead of multiple #ifdef __arm__
drv2605::drv2605()
{
#ifdef __arm__
Expand Down Expand Up @@ -64,6 +65,7 @@ bool drv2605::init()

return true;
#endif
return false;
}
#ifdef __arm__
void drv2605::setWaveform(uint8_t slot, uint8_t w)
Expand Down

0 comments on commit b8c2b09

Please sign in to comment.