From da6e7a58a47fb836872987bdf3d15890715e2805 Mon Sep 17 00:00:00 2001 From: Roland Winklmeier Date: Sat, 18 Jan 2014 20:12:02 +0100 Subject: [PATCH] Add ifdefs arround native windows code to fix linux build - There was some native windows code not properly covered by ifdefs. - handlePushToTalk() is not yet implemented on linux. Add a dummy. --- samples/blackgui/mainwindow_menus.cpp | 2 ++ src/blackcore/voice_vatlib.h | 3 +++ src/blackcore/voice_vatlib_ptt.cpp | 4 +++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/samples/blackgui/mainwindow_menus.cpp b/samples/blackgui/mainwindow_menus.cpp index 608a6b645..c695e8cbb 100644 --- a/samples/blackgui/mainwindow_menus.cpp +++ b/samples/blackgui/mainwindow_menus.cpp @@ -69,10 +69,12 @@ void MainWindow::audioIconContextMenu(const QPoint &position) if (!this->m_contextMenuAudio) { this->m_contextMenuAudio = new QMenu(this); +#if defined(Q_OS_WIN) if (QSysInfo::WindowsVersion && QSysInfo::WV_NT_based) { this->m_contextMenuAudio->addAction("Mixer"); } +#endif } QAction *selectedItem = this->m_contextMenuAudio->exec(globalPosition); diff --git a/src/blackcore/voice_vatlib.h b/src/blackcore/voice_vatlib.h index b4a5e3004..dab8e02d8 100644 --- a/src/blackcore/voice_vatlib.h +++ b/src/blackcore/voice_vatlib.h @@ -13,7 +13,10 @@ #include #include #include + +#if defined(Q_OS_WIN) #include +#endif namespace BlackCore { diff --git a/src/blackcore/voice_vatlib_ptt.cpp b/src/blackcore/voice_vatlib_ptt.cpp index d76d4ca6f..9eb883081 100644 --- a/src/blackcore/voice_vatlib_ptt.cpp +++ b/src/blackcore/voice_vatlib_ptt.cpp @@ -13,7 +13,7 @@ namespace BlackCore CVoiceVatlib *CVoiceVatlib::CKeyboard::s_voice = nullptr; -#ifdef Q_OS_WIN +#if defined(Q_OS_WIN) HHOOK CVoiceVatlib::CKeyboard::s_keyboardHook = nullptr; @@ -72,6 +72,8 @@ namespace BlackCore } } +#else + void CVoiceVatlib::handlePushToTalk() {} #endif } // namespace