Skip to content
This repository has been archived by the owner on Apr 14, 2019. It is now read-only.

Commit

Permalink
default audio profile and view added
Browse files Browse the repository at this point in the history
Update logging dependency from 9.84 to 9.89

This is the newest version that doesn't lead to compile errors. It has
also reduced the amount of "-Wexpansion-to-defined" errors on clang-msvc
by about 80 (from ~400 to 320).

Update easylogging license file

Originally came as LICENCE.txt (notice C instead of S in LICENSE),
renamed to better fit into the git history.

Move logging defines to QMAKE instead of logging.h

Defines done outside of easylogging++.h does not work according to
official documentation
(https://github.com/zuhd-org/easyloggingpp/blob/master/README.md#configuration-macros)

"NOTE: All the macros can be defined in one of the following ways:

1. Define macros using -D option of compiler, for example in case of
g++ you will do g++ source.cpp ... -DELPP_SYSLOG -DELPP_THREAD_SAFE
... (recommended way)

2. Define macros inside "easylogging++.h" (defining macros in other
files won't work)"

Linking to this issue:
abumq/easyloggingpp#590 (comment)

We are using the developer recommended way of defining them by command
line.

What is assumed to be the intention of enabling debug logs before
including easylogging++ never actually did anything, hence this define
is dropped. Newer versions of easylogging++ uses the macro
ELPP_DISABLE_DEBUG_LOGS to _disable_ debug logs. Leaving that macro
undefined satisfies the original intent.

Move easylogging++ include into necessary files

logging.h previously had logic to enable debug logging even on release
builds. This logic was moved to the QMAKE file, hence the logging.h file
is no longer necessary.

Update easylogging++ to 9.96.7, turn on /WX for clang-msvc

Updating from easylogging++ 9.89 to 9.96.7 turns it from a header only
library to one requiring a source file. It has been added to sources
near the other third party includes in the QMAKE to signify that it
isn't a first party file.

Updating easylogging++ also means that clang-msvc can compile without
any warnings, hence turning on warnings as errors for that compiler as
well, to avoid any regressions.

updated to current

fixed formatting

fixed ptt add bug/compilerwarnings/c++14 target

cleaned up .pro file

fixed casting back to c++ style

added default profile and ptt profile view

fixed c++ casts

fixed logic error on getDevice functions
  • Loading branch information
ykeara committed Jan 3, 2019
1 parent 75b7b5d commit b883d2c
Show file tree
Hide file tree
Showing 16 changed files with 7,735 additions and 6,666 deletions.
15 changes: 8 additions & 7 deletions advancedSettings.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#-------------------------------------------------

QT += core gui qml quick multimedia widgets
CONFIG += c++11
CONFIG += c++14

DEFINES += ELPP_THREAD_SAFE ELPP_QT_LOGGING ELPP_NO_DEFAULT_LOG_FILE

lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5.6 or higher")
lessThan(QT_MINOR_VERSION, 6): error("requires Qt 5.6 or higher")
Expand All @@ -18,11 +20,10 @@ TEMPLATE = app
#D9025: overriding '/W4' with '/W3'
QMAKE_CFLAGS_WARN_ON -= -W3
QMAKE_CXXFLAGS_WARN_ON -= -W3
#C4127 was in a third party file with no way to turn off.
QMAKE_CXXFLAGS += /W4 /wd4127

!*clang-msvc{
QMAKE_CXXFLAGS += /WX
}
QMAKE_CXXFLAGS += /WX

}

*g++* {
Expand Down Expand Up @@ -54,7 +55,6 @@ SOURCES += src/main.cpp\
src/tabcontrollers/keyboardinput/KeyboardInputDummy.cpp

HEADERS += src/overlaycontroller.h \
src/logging.h \
src/tabcontrollers/AudioTabController.h \
src/tabcontrollers/ChaperoneTabController.h \
src/tabcontrollers/FixFloorTabController.h \
Expand Down Expand Up @@ -83,7 +83,8 @@ win32 {

INCLUDEPATH += third-party/openvr/headers \
third-party/easylogging++

#easylogging++ used to be a header only lib. Now requires easylogging++.cc
SOURCES += third-party/easylogging++/easylogging++.cc
win32:LIBS += -L"$$PWD/third-party/openvr/lib/win64" -luser32 -lole32
unix:LIBS += -L"$$PWD/third-party/openvr/lib/linux64"
LIBS += -lopenvr_api
Expand Down
3 changes: 3 additions & 0 deletions docs/building_for_windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ For pushing changes to the repo:
2. Clang format. Part of the [LLVM collection](https://releases.llvm.org/download.html).

Additionally, for fully building portable and installer release versions:

3. [7zip](https://www.7-zip.org/download.html)

4. [Nullsoft Scriptable Install System (NSIS)](https://sourceforge.net/projects/nsis/)


<a name="locs_and_envs"></a>
## Locations and Environment Variables

Expand Down
16 changes: 0 additions & 16 deletions src/logging.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <QStandardPaths>
#include <openvr.h>
#include <iostream>
#include "logging.h"
#include <easylogging++.h>

INITIALIZE_EASYLOGGINGPP

Expand Down
2 changes: 1 addition & 1 deletion src/overlaycontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <iostream>
#include <cmath>
#include <openvr.h>
#include "logging.h"
#include <easylogging++.h>
#include "utils/Matrix.h"

// application namespace
Expand Down
2 changes: 1 addition & 1 deletion src/overlaycontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <QQuickRenderControl>
#include <QSoundEffect>
#include <memory>
#include "logging.h"
#include <easylogging++.h>
#include "utils/ChaperoneUtils.h"

#include "tabcontrollers/SteamVRTabController.h"
Expand Down
2 changes: 1 addition & 1 deletion src/res/qml/AudioPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ MyStackViewPage {
//audioProfileComboBox.currentIndex = AudioTabController.audioProfileDefaultIndex+1
}
onPttProfileAdded:{
pttProfileComboBox.currentIndex = AudioTabController.getpttProfileCount()
pttProfileComboBox.currentIndex = AudioTabController.getPttProfileCount()
}

//onAudioProfileDefaultIndexChanged: {
Expand Down
Loading

0 comments on commit b883d2c

Please sign in to comment.